7

Is there a way to set the default position option for floats?

I want all float to by default to use the option H. Then I only need to set position parameter for those floats that I do not want to use H.

  • 7
    If your default preference is that the item (a figure or table, right?) should not float, then don't use LaTeX's float-related mechanisms. Simply load the caption package and use its macros \captionof to generate the caption. By the way, be prepared for substandard layouts if you never (or hardly ever) want tables and figures to float. – Mico May 01 '14 at 14:27

2 Answers2

11

The float package already offers a command \floatplacement to do this:

\usepackage{float}
\floatplacement{figure}{H}
\floatplacement{table}{H}
Gonzalo Medina
  • 505,128
4

Put the following in your preamble:

\makeatletter
  \providecommand*\floatlocation[2]{\@namedef{fps@#1}{#2}}
\makeatother
\floatlocation{figure}{H} % for figures
\floatlocation{table}{H}  % for tables