Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Math Help - Problem inserting image in LaTeX file

  1. #1
    Member
    Joined
    Aug 2007
    Posts
    239

    Problem inserting image in LaTeX file

    When I try to insert an image, all that comes up is the file name. There is no picure. I am using TeXnicCenter, and use the following conversion: LaTeX --> PDF

    Here is the code I typed:
    Code:
     \textbf{5}
    \begin{figure}
    \centering
    \includegraphics{file.JPG}
    \caption{r(t) graph}
    \label{Fig 1}
    \end{figure}
    Any ideas?

    Thanks
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by shilz222 View Post
    When I try to insert an image, all that comes up is the file name. There is no picure. I am using TeXnicCenter, and use the following conversion: LaTeX --> PDF

    Here is the code I typed:
    Code:
     \textbf{5}
    \begin{figure}
    \centering
    \includegraphics{file.JPG}
    \caption{r(t) graph}
    \label{Fig 1}
    \end{figure}
    Any ideas?

    Thanks
    I always have trouble with graphics.

    You could try making sure that the case of the file name is correct (try file.jpg)

    Other than that all I can suggest is that you convert the jpg to an encapsulated postscript file, that always seems to work.

    Another possibility is convert the graphic to a pdf file and try including that.

    And yet another; rather than go from LaTeX to pdf directly, go to postscript and use ghostview/script to convert to pdf.

    Finally every combination of the above.

    Finally finally check that the "usepackage[driver]{graphicsx}" (or whatever you are using) is there and you are using the correct driver.

    RonL
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Aug 2007
    Posts
    239
    Thanks, I have the image in my file now (had to add another package). The only thing now is that the file name of the image is being shown also (even though I didn't type it as a caption).

    I can't seem to get rid of it. So like the file name is this form: C:\My Documents \ blah \ blah (and this appears on the screen)

    Thanks for the help.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    GAMMA Mathematics
    colby2152's Avatar
    Joined
    Nov 2007
    From
    Alexandria, VA
    Posts
    1,172
    Awards
    1
    Quote Originally Posted by shilz222 View Post
    Thanks, I have the image in my file now (had to add another package). The only thing now is that the file name of the image is being shown also (even though I didn't type it as a caption).

    I can't seem to get rid of it. So like the file name is this form: C:\My Documents \ blah \ blah (and this appears on the screen)

    Thanks for the help.
    Try typing {math}equations'n'at...{/math}{img}web address{/img}{math}more equations'n'at...{/math}.

    Is that the direction you wanted to go? I tried putting images within the LaTeX and the web address pops up for it.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Member
    Joined
    Aug 2007
    Posts
    239
    I am not sure what you mean... I am using TeXnic Center.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Member
    Joined
    Aug 2007
    Posts
    239
    This is what I am talking about
    Attached Thumbnails Attached Thumbnails Problem inserting image in LaTeX file-untitled.jpg  
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Member
    Joined
    Aug 2007
    Posts
    239
    has anyone had this problem before?
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Math Engineering Student
    Krizalid's Avatar
    Joined
    Mar 2007
    From
    Santiago, Chile
    Posts
    3,654
    Thanks
    13
    What about working on EPS extension?

    Try to convert your file into a EPS one.
    Follow Math Help Forum on Facebook and Google+

  9. #9
    sup
    sup is offline
    Newbie
    Joined
    Oct 2008
    Posts
    1
    you must remove draft from documentclass - I have been bitten by this just now. At least I suppose we had the same problem.
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Newbie
    Joined
    Jun 2010
    Posts
    3

    same problen

    Hello,

    I was wondering if you manage to solve this problem couple of years ago?

    I have the same, when i insert the figure the title of the file appears on the top. I tried everything, but it still insert it.

    I am using TexShop on Mac, I insert the figure in pdf format.

    I don't have the draft option on.

    Thank you
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Moo
    Moo is offline
    A Cute Angle Moo's Avatar
    Joined
    Mar 2008
    From
    P(I'm here)=1/3, P(I'm there)=t+1/3
    Posts
    5,618
    Thanks
    6
    Hello,

    Use the package
    Code:
    \usepackage{graphicx}
    And then :
    Code:
    \begin{figure}[!h]
    \centering
    \includegraphics[height=10cm,width=10cm]{C:/path/name.jpeg}
    \caption{$\mathcal B(5,1/6)$ : $m<1$}
    \end{figure}
    Be careful with the extension, it can be .jpeg, .JPG, .png, .jpg and maybe others.

    Plus, put C:/../../.. instead of C:\..\..\.. and it will work (at least it always work for me)

    The [!h] will help you put the figure where you want to. But if there isn't enough space if it's at the bottom of the page, it will be put on top of the next page and the text will fill the bottom of the previous page.
    If you want to avoid it, use \newpage, that's the only solution I can see.
    Don't take care of the warning you'll get when you compile. Not that important.

    Note : I'm using TeXmaker, so I don't know if all this stuff will work on TeXshop or anyother program, but I guess it will.
    Follow Math Help Forum on Facebook and Google+

  12. #12
    Newbie
    Joined
    Jun 2010
    Posts
    3
    thank you, I put:

    \begin{figure}[h]
    \begin{center}
    \includegraphics[width=16cm]{FIGURES THESIS/FIGURES THESIS CHAPTER 2/All data coverage SLP.pdf}
    \end{center}
    \caption{Data coverage (\%) ICOADS SLP for four time periods}
    \label{fig:fig2.1}
    \end{figure}

    but it still does put the FIGURES THESIS/FIGURES THESIS CHAPTER 2/All data coverage SLP.pdf on the top of the picture, as a title
    Follow Math Help Forum on Facebook and Google+

  13. #13
    Moo
    Moo is offline
    A Cute Angle Moo's Avatar
    Joined
    Mar 2008
    From
    P(I'm here)=1/3, P(I'm there)=t+1/3
    Posts
    5,618
    Thanks
    6
    [!h], not [h]

    and put the whole path
    Follow Math Help Forum on Facebook and Google+

  14. #14
    Newbie
    Joined
    Jun 2010
    Posts
    3
    \begin{figure}[!h]
    \begin{center}
    \includegraphics[width=16cm]{/Users/irinafoska/PhD/FIGURES THESIS/FIGURES THESIS CHAPTER 2/All data coverage SLP.pdf}
    \end{center}
    \caption{Data coverage (\%) ICOADS SLP for four time periods}
    \label{fig:fig2.1}
    \end{figure}


    still the same
    Follow Math Help Forum on Facebook and Google+

  15. #15
    Moo
    Moo is offline
    A Cute Angle Moo's Avatar
    Joined
    Mar 2008
    From
    P(I'm here)=1/3, P(I'm there)=t+1/3
    Posts
    5,618
    Thanks
    6
    now, the remaining possibility is that your figure is too big to be put where it is, so it is put on a new page !

    make a try in a new document with only a few lines before and after, just to see where it is put
    Follow Math Help Forum on Facebook and Google+

Page 1 of 2 12 LastLast

Similar Math Help Forum Discussions

  1. [SOLVED] Problem Inserting EPS Figure into File
    Posted in the LaTeX Help Forum
    Replies: 19
    Last Post: October 1st 2010, 05:57 PM
  2. Inserting a caret in LaTeX
    Posted in the LaTeX Help Forum
    Replies: 2
    Last Post: January 18th 2010, 11:06 AM
  3. Columns in a LaTeX File
    Posted in the LaTeX Help Forum
    Replies: 1
    Last Post: October 30th 2009, 10:06 PM
  4. Inserting Graphs Into Latex
    Posted in the LaTeX Help Forum
    Replies: 1
    Last Post: September 13th 2009, 09:52 PM

Search Tags


/mathhelpforum @mathhelpforum