17

When specifying a float's placement, e.g. [htpb], is the order of the arguments specifying the priority of them?

Example:

\begin{figure}[htpb]
\includegraphics[width=0.7\textwidth]{sampleImage}
\caption{Example caption}
\label{fig:sampleImage} 
\end{figure}
8
13

No, the order of the placement options is irrelevant. Every placement option will be stored as bit in a single value, so [tb] and [bt] will give the same value and therefore will have the same result.

See What is the exact purpose of \ftype@<TYPE>? for implementation details.

8
  • if ! is given, ignore all settings by the parameters, like vertical space, number of floats, etc
  • if h is given, try to place it here, if not possible then change h to t, the float then can appear on top of the next page
  • if t is given try to place it on top of the current or next page.
  • if b is given try to place it on bottom of the current or next page.
  • if p is given place the float on the next page without additional text.
2
  • 2
    The question is about if the order matters, not what the single character do. If your list is a priority order, please state so explicitly. – Martin Scharrer Dec 19 '11 at 13:17
  • 1
    Not actually addressing the question but did improve my understanding of how LaTeX treats these parameters. It's a better explanation than the table on en.wikibooks.org/wiki/LaTeX/… – benregn Dec 19 '11 at 14:01
4

The order of placement is irrelevant. You can try it to see for yourself.

\documentclass{octavo}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{figure}[tb]
\rule{5cm}{5cm}
\end{figure}

Another line ...
\end{document}

Changing tb or bt still results in the same output. The 'here' also is immaterial where you place it. Change [bh] and will be placed correctly as 'here'.

4
  • Some official reference with explanation would be much better than "you can try it yourself". – Martin Scharrer Dec 19 '11 at 12:58
  • @MartinScharrer Martin sure, but as AFAIK there is nothing other than the official source2e algorithm and is painfully long and obscure. Will try and summarize when I get some time. Anyway I thought that proving a hypothesis by experiment was an approved scientific method since the Renaissance and the example clearly demonstrates the answer to the OP's question.:) – Yiannis Lazarides Dec 19 '11 at 13:33
  • There is official documentation (in book form) such as the book by Leslie Lamport and TLC. That is the reference documentation. And I would think that the lshort documentation would also cover it (not checked though). And here on the site there is: tex.stackexchange.com/questions/39017/… – Frank Mittelbach Feb 29 '12 at 14:57
  • @FrankMittelbach Could you please also have a look a tex.stackexchange.com/questions/32359/… – Yiannis Lazarides Feb 29 '12 at 15:07

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.