I'm having some issues dealing with figures. It happens that when I have a page with some text and then it comes a figure, with H property, who doesn't fits into the same page as the text, the text itself gets spreaded in that page. here.

Is there a way I can remove theses spaces? What I'd like is that the end of the page would be left blank (even though some people may not think it is the best thing to do). Here is the image with what I would love to have as the output.

Is there any way I can do this?


The \raggedbottom declaration makes all pages the height of the text on that page; No extra vertical space is added. Add that to your document preamble and I believe you'll get the behavior you're looking for.

  • The problem is that this produces the ragged behavior on all pages which is often not desired. May 19 '12 at 12:17

I assume you are using a book type of document class because they normally set \flushbottom as the default, which gives you the behavior you are experiencing. So a trivial solution is, of course, to change that setting to \raggedbottom in the preamble of your document (or the class if this is a private class). However, the downside of this approach is that then all pages will show a ragged behavior which, for a book or manual is normally not desired.

As an alternative you can just make the offending pages come out short by using a command like \maybeflushthispage in front of all the places where you may have to break a page short (i.,e., in your case the in front of all figures of type [H]).







\begin{figure}[H] \rule{5pt}{4cm} \end{figure}

One line here \ldots

\begin{figure}[H] \rule{5pt}{4cm} \end{figure}



If you run this then \maybeflushthispage will flush the page if a break is taken (first page) but will do nothing otherwise (second page):

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.