Graphics, Figures & TablesFloat placement

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
rad1982
Posts: 1
Joined: Mon Mar 28, 2011 11:47 am

Float placement

Post by rad1982 »

Hi All

I am writing up my MSc thesis and I have many pictures to add to my document. I am using float package and put picture in the document by:

\begin{figure}[H]
...
\end{figure}

The problem is when I have two pictures in a row which can not fit in one page, LaTeX moves the second one to the next page, which is OK, but it moves the first one to the bottom of the current page and make lots of white space between the text and the figure. I know I can use \clearpage but it would be too impractical as I may add or remove texts and every thing would be mixed up again.

Does anybody know how I can FORCE LaTeX to place the picture in the page without that white space?

Thanks

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Frits
Posts: 169
Joined: Wed Feb 02, 2011 6:02 pm

Float placement

Post by Frits »

I'm not familiar with the H specifier, or with the float package at all. But does this give you the same problem?

Code: Select all

\begin{figure}[h!]
...
\end{figure}
howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Float placement

Post by localghost »

rad1982 wrote:[…] I am using float package and put picture in the document by:

\begin{figure}[H]
...
\end{figure}

The problem is when I have two pictures in a row which can not fit in one page, LaTeX moves the second one to the next page, which is OK, but it moves the first one to the bottom of the current page and make lots of white space between the text and the figure. I know I can use \clearpage but it would be too impractical as I may add or remove texts and every thing would be mixed up again. […]
With this specification for the figure environment it does not longer what it is supposed to do, that is to say float. And if there is not enough space for placing the next (non-floating) figure on the page, the remaining space will be left blank. So live with the result or let it float again by giving appropriate placement parameters.

Code: Select all

\begin{figure}[!ht]
% figure content
\end{figure}
The optional placement parameter as seen above will direct the compiler to "try hard" (!) to place the float where it is declared in the source (h). If that is not possible, the float object will be placed on top (t) of the next page. So it won't float away too much and so be taken out of context.


Best regards and welcome to the board
Thorsten
Post Reply