Graphics, Figures & TablesStop filling in text from below.

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Philosophaie
Posts: 17
Joined: Sat Mar 21, 2015 8:59 pm

Stop filling in text from below.

Post by Philosophaie »

I have a few graphics and tables in my LaTeX document. When my graphics do not fit on the page it fills in text from below it then puts the graphic on the next page. How do I stop LaTeX from filling in text from below when a graphic or table does not fit on the rest of the page(at least temporarily) and follow the prescribed order?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

Stop filling in text from below.

Post by Stefan Kottwitz »

That's actually the common way in professional books. Text fills out the complete page, while images and tables are moved to a better place when they don't fit any more. That's a great automatism, especially if I think of 300 page books with 100 images or tables. No manual page break optimization necessary, this also would require work again when something changes.

That's also the reason why images (and tables) get a number and a caption.
  • You say "See figure 3" because figure 3 is not directly following, but at the next page or so.
  • You got a caption so you see what the image (or table) means as the surrounding text is not directly related.
That's the meaning of cross-references. Pages are nicely filled with text, text can be read in a flow, images and tables are references and easily seen nearby. A bit strange would be the fixed order with numbering and caption:
In the following figure 1 you can see a duck:

(drawing)
Figure1: A duck
And then the thing with white space at the end of pages.

If you don't want this feature, simply don't use a figure environment and no caption, just \includegraphics and tabular.

Stefan
LaTeX.org admin
jlinkels
Posts: 7
Joined: Fri May 20, 2011 1:58 pm

Re: Stop filling in text from below.

Post by jlinkels »

You could use \FloatBarrier from the placeins package. All floats are forced to be inserted before the \Floatbarrier. It is mostly used to keep a float in a section, as it does not offer fine grained control whether the float moves to the next page.

jlinkels
Post Reply