Possible Duplicate:
Keeping tables/figures close to where they are mentioned
How to influence the position of float environments like figure and table in LaTeX?

I'm doing this

\section{Use Case Description}

\caption{Diagramma degli use case}
\includegraphics[width=\textwidth, height=\textheight, keepaspectratio]{UCD.pdf}

\vskip 0.6cm \textbf{Titolo:} UC Create Tag

and then there's the rest of my file.

My problem is that the figure renders correctly but just at the end of the file instead of where I've placed it.

If I put no placement parameters, it renders in the next page (as it is supposed to do, I think).

I would like to render it before anything else, but [h] or [h!] didn't work.

  • It's a FAQ; in this case probably a \clearpage before \section will do. But leave these adjustments for the final revision part of document preparation.
    – egreg
    Jan 1, 2012 at 14:35
  • not really, i've understood how floating should work, but this is an unexpected behaviour. @egreg nothing happened
    – Chobeat
    Jan 1, 2012 at 14:36
  • 3
    Oh, well! I didn't notice width=\textwidth and height=\textheigth! If these produce a figure that's bigger than 70% of the page height, the figure will never be printed "here", but always as a page float.
    – egreg
    Jan 1, 2012 at 14:41
  • @egreg ok now it works.
    – Chobeat
    Jan 1, 2012 at 14:48

1 Answer 1


You should have a look at How to influence the position of float environments like figure and table in LaTeX?, that has very detailed information about float placement.

In particular, your setting of


is probably producing a figure which is higher than the maximum allowed, which by default is 70% of the text height. Moreover you have a section title, quite certainly the cause of even [!h] not working: if the section title height plus the figure height are more than the page height the combination will not be squeezed in a page.

Either put a \clearpage before \section and reduce the figure's height or be content that LaTeX puts the figure on a page by itself (placement option [p]).

  • Is there some way of changing this default maximum height? Nov 19, 2012 at 15:13
  • @FaheemMitha Look at the highest voted answer to this question for a list of the parameters, their meaning and the way to change them.
    – egreg
    Nov 19, 2012 at 17:01

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