% FROM http://mintaka.sdsu.edu/GF/bibliog/latex/floats.html

% Undoing the dumb defaults
% The default values that cause so much trouble are set in the class file that's invoked by the argument of the \documentclass statement at the beginning of your *.tex file. (For example, if that argument is article, the file that's called in is /usr/share/texmf/tex/latex/base/article.cls.) 

% To override the values that cause the offensive behavior, you use the \setcounter{} command to reset integer values, and \renewcommand{} to reset floating-point values. Like this: 


% Alter some LaTeX defaults for better treatment of figures:
    % See p.105 of ``TeX Unbound'' for suggested values.
    % See pp. 199-200 of Lamport's ``LaTeX'' book for details.
    %   General parameters, for ALL pages:
\renewcommand{\topfraction}{0.9}% max fraction of floats at top
\renewcommand{\bottomfraction}{0.8}% max fraction of floats at bottom
    %   Parameters for TEXT pages (not float pages):
    \setcounter{topnumber}{2}
    \setcounter{bottomnumber}{2}
    \setcounter{totalnumber}{4}     % 2 may work better
    \setcounter{dbltopnumber}{2}    % for 2-column pages
    \renewcommand{\dbltopfraction}{0.9}% fit big float above 2-col. text
    \renewcommand{\textfraction}{0.07}% allow minimal text w. figs
    %   Parameters for FLOAT pages (not text pages):
    \renewcommand{\floatpagefraction}{0.9}% require fuller float pages
    % N.B.: floatpagefraction MUST be less than topfraction !!
    \renewcommand{\dblfloatpagefraction}{0.7}% require fuller float pages

    % remember to use [htp] or [htpb] for placement

% These values can be reset in the preamble of your LaTeX source file; any place before the \begin{document} will do. 


% A remark about the [htp] argument
% Though it's tempting to hope that [htp] gives preference to the [h] (i.e., .here.) option, it doesn't work that way. The arguments in brackets tell LaTeX where it's possible to put the float; their order is unimportant. If you're willing to have floats at the bottom of a page, as well as the top, use [htpb]. 

% Putting an exclamation mark in the list of placement options makes LaTeX ignore all the constraints but \topfraction, \bottomfraction, and the ones with floatpage in their names. 

% The default, [tbp], omits [h], which is not usually what you want. (But note that many journal and book publishers may insist on the [tpb]choices alone.) 


% If you find that liberal values of the float parameters still are causing trouble, you can try forcing a float page with \clearpage to disgorge the accumulated blockage. If you don't want to force a pagebreak, use the afterpage package and tell LaTex  \afterpage{clearpage}, which should force a float page when the current page comes to an end. If floats continue to pile up at the end, you probably have one too big to fit on a page; try reducing its size. 

% Run  texdoc fancyhdr  to read a good discussion of float placement. You may even need to use the float package, in extreme cases. 
