3

More specifically, how can I set in the preamble the default options for the figure environment to [htb]? I am trying to separate content from format as much as possible and want to avoid writing \begin{figure}[htb] every time I declare a figure.

BlackDog
  • 133
  • 1
    Welcome to TeX.SE! In preamble put \def\fps@figure{htb}, of course inside \makeatletter and \makeatother. – Zarko Mar 27 '17 at 15:25
  • In addition, \def\fps@table{htb} should do the same for tables. – TukieMonster Mar 27 '17 at 15:36
  • @Zarko it works, thanks! Could you write this outside of a comment so that I can mark the question as answered? And thanks TukieMonster as well! – BlackDog Mar 27 '17 at 15:39

2 Answers2

3

Positioning of floats (for figures, etc) you can set in preamble as

\makeatletter% because def contain @ 
    \def\fps@figure{hbt}
    \def\fps@table{hbt}
\makeatother

or even better

\makeatletter% because def contain @ 
    \def\fps@figure{hbtp}
    \def\fps@table{hbtp}
\makeatother
Zarko
  • 296,517
2

Load the float package and use \floatplacement{<float>}{<specs>}:

\usepackage{float}
\floatplacement{figure}{htb}
Werner
  • 603,163