Inserting images in LaTeX

19,205

Solution 1

Try downsizing the images. Maybe they are too large and so they are moved to the end of the document..

Hope it helps.

Solution 2

You'll have to use graphicx package:

\usepackage{graphicx}

and then you just use \includegraphics

\includegraphics{myfig.pdf}
\includegraphics[width=60mm]{myfig.png}
\includegraphics[height=60mm]{myfig.jpg}
\includegraphics[scale=0.75]{myfig.pdf}
\includegraphics[angle=45,width=52mm]{myfig.jpg}

Solution 3

What code did you use for the \figure environment? In most cases the "h" option should at least help a little bit there.

Solution 4

This is a FAQ: "Moving tables and figures in LaTeX". Note especially the third dot point, which relaxes some of the restrictions LaTeX uses to position floats.

That's the best answer I can give without seeing an example of how large your floats are and how you're inserting them into the document. Provided that they're reasonably-sized, you should have no problem with

\begin{figure}[htbp]
  \includegraphics{myfig}
  \caption{...}
  \label{fig:myfig}
\end{figure}

And note that if the float is too large to fit then it will move to a subsequent page -- this is the whole idea behind getting LaTeX to help you with the formatting. You certainly don't want to end a page prematurely just because there's a figure coming up next that otherwise doesn't fit.

Solution 5

Using [!t] and [!h] in the figure environment, rather than [t], [h] etc seems to help, though I've yet to find a surefire way to get large images in sensible places. Sometimes it works half way through a document, othertimes it doesn't.

Share:
19,205
Arnkrishn
Author by

Arnkrishn

Updated on June 04, 2022

Comments

  • Arnkrishn
    Arnkrishn almost 2 years

    I have a question on inserting images into a LaTeX document. I try to insert images using the keyboard short cut: Ctrl-Alt-G and I'm able to insert images. But the compiled pdf document shows all the images at the end, whereas I want to interleave images with text. Something like the following:

    Text1
    Image1
    Text2
    Image2
    Text3
    Image3
    

    I try to insert images at right positions i.e. in between text, but on compilation, they all appear at the end. I have tried different options provided on the image insertion UI but same result.

    Any idea where I'm going wrong.

    Related SO question.

  • James
    James about 15 years
    You definitely want to use some variation of the \begin{figure} environment! I don't think the author has any problem with inserting the figures themselves.