# Set a global policy for floats positioning

I have a document with many floats (figures, specifically). I want to be able to change the global floats positioning policy from htbp to just h (or even H with the floats package). For my-own reasons, I don't want to do this by appending the [h] argument to each float env.

One option that I can think of is using a macro:

\newcommand{\mypos}{h} % or htbp
\begin{figure}[\mypos]...


I also prefer not to do that - It is cumbersome.

Is there a way to set the global float positioning argument globally?

-
If you accept an answer, it would be nice to also upvote it. (This is also true for my answer to your question abour listings and subfigure. ;-)) –  lockstep Dec 3 '10 at 12:23

Some lines in the preamble should do the trick.

\makeatletter
\renewcommand{\fps@figure}{!ht}
\renewcommand{\fps@table}{!ht}
\makeatother

-

You may use the floatrow package and its \floatplacement macro:

\usepackage{floatrow}
\floatplacement{figure}{!ht}
\floatplacement{table}{!ht}


Example:

\documentclass{article}

\usepackage{floatrow}
\floatplacement{figure}{!ht}

\usepackage{lipsum}

\begin{document}

\lipsum[1]

\begin{figure}
% \centering% default with "floatrow"
\rule{1cm}{1cm}
\caption{A figure}
\end{figure}

\end{document}


-