Troubleshooting Image Display Issues in LaTeX

In summary, you should use {} instead of (), and you might need to delete the 'draft' option in order to get the image to display.
  • #1
fergzzq
2
0
Hi, I am new to LaTeX and am having trouble putting images up on a document; I am using TeXnicCenter (in it u can use .jpg or .pnp files aprently but not .ps). i use

\usepackage(graphicx)
...

\insertgraphic(sample.jpg)

which I thought should be enough to display the image. compiling gives no errors, but when i open the document in GSview or acrobat, I can see a box outlining the image with the name of the image between but not the image itself. what's the problem? thanks for the help, I really appreciate it!
 
Physics news on Phys.org
  • #2
Well, firstly you should use {} instead of (), but I guess that's a typo on here. Erm.. I'm not sure, try using \includegraphics{filename.jpg}. Is the file "filename.jpg" in the correct folder?
 
  • #3
thanks for the response; coincidentally enough, the image i am trying to use is called cristo.jpg haha ... yea that was a typo, I have it on the document as follows:

\usepackage{palatino,url,color,setspace,graphicx,rotating}
...
\begin{document}
\includegraphics[height=60mm]{cristo.jpg}
...
\end{document}

it seems like the program is recognizing the image, becuase the shape of the image is exactly like the cristo image (and i then tried another sample image which was a square, and the boundary show), for some reason it just prints the boundary and name but not the image itself when I compile ... could it be that my settings are wrong? I can't find anything...
thanks again!
 
  • #4
Hello there,

I am using the code:
\begin{figure}
\includegraphics[totalheight=0.8\textheight,viewport=50 260 400 1000,clip]{C:/Costas/Ph.D/documentation/Chapters/Chapter3-Efficient structures/latex development/Book1.pdf} % or png,bmp,pdf
\caption{My pdf figure}
\end{figure}

and I have the same problem. The images don't show up only the rounding frames. I thought that this problem might be in an Adobe Reader add on , so I did corresponded with them, I had no reply so far.
Because I am using LATEX->PDF option I am not quite sure if this will work for a .pdf document nested in another .pdf document...
Thanks.
 
  • #5
I had the same problem today and I figured out it was the option of 'draft' in my case. After I deleted 'draft' option \documentclass[12pt,a4paper, draft]{article}, the image was displayed.
 

1. Why aren't my images showing up in my LaTeX document?

There could be a few reasons for this. One possibility is that you have not included the correct package in your document. Make sure you have included the \usepackage{graphicx} package in your preamble.

2. Do images have to be in a specific format to be included in LaTeX?

Yes, images must be in an EPS, PDF, PNG, or JPEG format in order to be included in a LaTeX document. If your images are in a different format, you can use a conversion tool to change them to one of these accepted formats.

3. How can I resize my images in LaTeX?

You can resize your images using the \includegraphics[width=Xcm]{image_name} command, where X is the desired width in centimeters. You can also use the \scalebox{scale_factor}{\includegraphics{image_name}} command to scale your image by a certain factor.

4. Can I add captions and labels to my images in LaTeX?

Yes, you can add captions and labels to your images using the \caption{caption text} and \label{label_name} commands, respectively. Make sure to place these commands after your \includegraphics command.

5. My images are not appearing in the correct location in my document. How can I fix this?

If your images are not appearing in the desired location, you can use the \begin{figure}[placement] command to specify where you want the image to be placed. Possible placement options include h for "here", t for "top", b for "bottom", and p for "page". You can also use the \centering command to center your image on the page.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
11K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
Back
Top