1

In my tex file, I have images that are spaced between paragraphs. However, when I compile the file, the images come out almost all on the same page. Is there a command I can put so that the images are located on the pdf in the same place as they were (relative to the paragraphs) in the tex file?

Thank you!

Edit: Here is an example of part of the tex file. Would a \FloatBarrier before and after the image keep the image within the part of text that I want?

Example:

For notation, let `$xy$` refer to a crossing made by an x-stick and a y-stick. 
We will prove this by contradiction. Without loss of generality, assume that 
we have two `$xy$` crossings (the other crossings are equivalent by rotation). 
(see image 1).

\begin{figure}
\centering
\includegraphics[scale=.2]{2new.png}
\caption{Assuming we have two xy crossings}
\end{figure}

We have two cases: one where the two crossings share a stick and the second 
where they do not. Regarding the former, assume the crossings share an 
x-stick, again without loss of generality by symmetry. 
egreg
  • 1,121,712
Elise
  • 111
  • 2
    images are placed exactly like the letter x they have no additional spacing and appear where they appear in the source. If you wrap an image in a float such as figure environment it acts like a letter x in a float environment would: It floats to wherever LaTeX thinks reasonable. If you don't want it to float, don't put it in a figure. – David Carlisle Feb 03 '14 at 13:39
  • 1
    Welcome to TeX.SX! Can you give an example of how you're organizing the document? – egreg Feb 03 '14 at 13:39
  • David, if I do not use the figure environment, I do see how to number my images or give them captions, as \caption needs to be in the image environment. Is there another way to use captions outside of the image environment? – Elise Feb 03 '14 at 13:58
  • There are two cases: (1) your image must be in the specified place and you don't need a number and a caption; (2) you need a number and a caption and so the image can float. Use \begin{figure}[htp] if you want LaTeX to try putting the image where you prefer. – egreg Feb 03 '14 at 14:01

0 Answers0