Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

How to influence the position of float environments like figure and table in LaTeX?

How to influence the position of float environments like figure and table in LaTeX?

This is a general question and should collect useful answers for all users. I hope we can use this as a reference
by

2 Answers

akshay1995
if the content should be placed in the exact place it was defined in the source document, then the H float modifier from the float package can be used to accomplish this. This differs from the floatless solution discussed in the second paragraph in that it does use a float (even though it doesn't actually float anywhere). This can be useful for instance if a certain floatstyle is used throughout the document (e.g. the ruled and boxed styles from the float package) and we wish to have a consistent look.
pankajshivnani123
There are several possibilities for controlling float placement. The question I see most here is along the lines of "How do I insert an image/table at the point I list it in the source document?".

First I think it is important to note that you don't need to use floats. An includegraphics does not need a surrounding figure and a tabular does not need a surrounding table. If captions are required, the \captionof command from the caption package can be used (perhaps they need to be boxed up to prevent a pagebreak between content and caption).

If a float environment is required, but the "amount of float" has to be limited to keep the content relatively close to the point where it was defined in the source, then the \FloatBarrier command from the placeins package can be used. This command specifies a barrier beyond which floats may not pass.

Login / Signup to Answer the Question.