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
  • 4
    General note: \label always belongs after \caption, otherwise you label the last label-able item instead. Dec 19, 2011 at 11:25
  • AFAIK, the order of the placement characters is not meaningful. But I don't know enough about it to post a full answer. Dec 19, 2011 at 11:27
  • AFAIK the order is irrelevant. See tex.stackexchange.com/questions/32359/…
    – user2574
    Dec 19, 2011 at 11:40
  • @AxelSommerfeldt Why did you delete your answer?
    – egreg
    Dec 19, 2011 at 11:49
  • 1
    There a long explanation of how the float algorithm works andh ow it can be influenced: tex.stackexchange.com/questions/39017/… Feb 29, 2012 at 14:57

3 Answers 3

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. Dec 19, 2011 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, 2011 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". Dec 19, 2011 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.:) Dec 19, 2011 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/… Feb 29, 2012 at 14:57
  • @FrankMittelbach Could you please also have a look a tex.stackexchange.com/questions/32359/… Feb 29, 2012 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.