TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I always use floats for figures, tables, graphs, and any other object that is not part of the text. LaTeX do a really good job. Normally I put the definition after the paragraph that contains the reference to the float. It is correct?

Where we have to put float definitions to obtain the best possible positioning of the floating object (decided by LaTeX, without options like h, b, ...)?

share|improve this question
If the question is unclear, please tell me. I will try to improve it! ;) – R. M. Sep 25 '12 at 20:46
This is most likely based on user preference and where you want the floats to end up. Related, if not duplicate: Keeping tables/figures close to where they are mentioned and How to influence the position of float environments like figure and table in LaTeX? – Werner Sep 25 '12 at 20:54
@Werner I don't want to keep floats close to to where we defined it or influence positioning of floats. I want LaTeX to do it completly automatically. I just want to know if there is a "rule" over definition position to obtain the best typographical result. – R. M. Sep 25 '12 at 21:10
up vote 10 down vote accepted

The most natural place is probably to put the float definition at exactly the point of first reference.

If I understand you correctly you are placing the float definition after the paragraph containing the first reference. That has the advantage of making the source text a bit more readable as the paragraph text is not broken by the \begin{figure}... markup, but that is less of a problem if your figure environment is in a separate file as the markup is then just

... text text text \ref{zzz}{\input{file-with-figure-zzz} text text ....

The disadvantage of always putting the float definition at the end of a paragraph is that LaTeX never moves floats forward more than the top of the page that contains the point of definition, so if you have a long paragraph with \ref{zzz} near the start, then if the \begin{figure} is included at the end of the paragraph that is on the next page, there is no way that LaTeX can put the figure on the page with the reference, even if it would fit.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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