0

This is really interesting. In any editor or formatting language I ever used images and text would appear in the order in which you have entered them. Not so much in LaTeX. I have a following figure:

Blah blah blah: 
\begin{figure}[htb]
  \centering
  \includegraphics[scale=0.8]{image.eps}
  \caption{this is image}
\end{figure}
blah blag. Blah.

These are in the document headers:

\usepackage{graphicx}
\usepackage{grffile} 
\usepackage[outdir=./]{epstopdf}

And the image jumps to the end of the end of my PDF, leaving the text like this:

Blah blah blah: blah blag. Blah.

Which looks stupid. The image looks stupid too, so alone at the end:

image description

  1. Why does LaTeX do this and in which cases it's a good thing?
  2. How to prevent it when it's not a good thing?
  • Your image is much too large for the intended position. And yes floating a picture to a better place is a good thing. http://www.tex.ac.uk/cgi-bin/texfaq2html?label=floats – Ulrike Fischer Mar 15 '15 at 15:41
  • In Word (or it's Libre Office counterpart) or HTML it would fit the place I want it to be. How is it too large? I could see PDFs with larger images between text... – Tomáš Zato Mar 15 '15 at 15:45
  • LaTeX puts images exactly where you place \includegraphics the moving of a figure environment is unrelated to the image, the only purpose of that environment is to tell latex it can move it to help with page breaking. The [htb] option you used restricts the places the float can be placed, so makes it more likely to go to the end – David Carlisle Mar 15 '15 at 15:46
  • Try omitting the [htb] location specifiers and see if that helps. – Mico Mar 15 '15 at 15:48
  • In your image the "intended position" is at the bottom of the page. And that word is not able to float a picture doesn't mean that it is a good thing. But if you want non-floating picture read the FAQ I referred (and in any case add a "p" to the float options as mentioned in the FAQ too). – Ulrike Fischer Mar 15 '15 at 15:49
  • @Mico nothing changed. Not even with 0.5 scale (which already makes the image hilariously small). – Tomáš Zato Mar 15 '15 at 15:50
  • @UlrikeFischer Red thick line marks the intended position. Isn't that clear? How can I make it more clear? – Tomáš Zato Mar 15 '15 at 15:51
  • 3
    If you do not want the text to float, don't put it in a figure environment, but in that case you have to accept worse page breaks. – David Carlisle Mar 15 '15 at 15:55
  • Sorry with "bottom" I didn't meant the last line but "quite at the bottom". There is no place for the image there. – Ulrike Fischer Mar 15 '15 at 15:56

0 Answers0