I think this question is novel. Here is the problem I have. I have a relatively short piece of text associated with a lot of figures and a table. I want floats to appear on pages just for floats but in the order I specify. I have set all of the table and figure parameters to [hp] and placed them in the order I want them to appear in the source e.g.
Figure 1
Figure 2
Figure 3
Table 1
Figure 4
Figure 5
The problem I have is that no matter what I do the document typesets like this
Table 1
Figure 1
Figure 2
etc....
I have tried trashing the Aux files before typesetting. I am aware of the endfloats package but I still want latex to place the floats in between larger sections of txts in other parts of the document. Any help is greatly appreciated.
Thanks
t means top: Place it at the top of a page. b means bottom: Place it at the bottom of a page. p means page: Place it on a page containing only floats, such as figures and tables.
It is a Latex convention to start table references by “tab:”, which no only lets you use the same name for a figure (starting with fig:) and a table, but makes it easier to distinguish between figures and tables. Use the command \ref{tab:} to reference a table in the text.
I'll try to explain why the fix by @user476160 (placement modifier hp
instead of just p
) works. A figure
is a float, i.e. an element that cannot be broken across a page. The figure
environment accepts a parameter list with placement hints:
\begin{figure}[placement parameters]
% ...
\end{figure}
The placement specifier h
stands for here and places the figure approximately at the same point as in the source text. The placement specifier p
puts the figure
in a special page that contains only floats:
\begin{figure}[hp]
% ...
\end{figure}
Wikibooks has an excellent article on figure placement if you want to fine-tune your figure and table placement.
I also recommend posting LaTeX-related questions in the TeX Stack Exchange Q&A.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With