3

I am writing my thesis, and one of the requirements is that any pages containing only figures or tables must be top-aligned. An additional requirement is that the spacing between consecutive figures or tables must be the same throughout the document.

By default, when I have two or more tables on a float page they are equally spaced and centered vertically. In order to achieve top-alignment, I am using:

\makeatletter
\setlength{\@fptop}{0pt}
\setlength{\@fpbot}{0pt plus 1fil}
\makeatother

This brings the first float on the float page to the top, but it leaves a large amount of white space between the first and second float. I would like to specify the distance between floats on float pages so that it is the same as \floatsep (i.e., so that the spacing between floats is the same as it would be if the two floats were at the top or bottom of a page). Is there an equivalent to \floatsep for float pages? Or is there a way to make all floats top-aligned on a float page?

  • For future reference: Please provide the community with a foundation to work from in the form of a minimal working example (MWE). We want to copy-and-paste-and-compile and see exactly what problem you're experiencing. It'll speed up getting solutions your way and make the problem far more tangible. – Werner Nov 2 '15 at 19:41
4

In addition to setting \@fptop and \@fpbot, also set \@fpsep (to \floatsep, which has a default of 12\p@ \@plus 2\p@ \@minus 2\p@):

\makeatletter
\setlength{\@fptop}{0pt}% default is 0\p@ \@plus 1fil
\setlength{\@fpsep}{\floatsep}% default is 8\p@ \@plus 2fil
%\setlength{\@fpbot}{0pt plus 1fil}% default is 0\p@ \@plus 1fil
\makeatother

I've also given the defaults used in the LaTeX kernel (latex.ltx).

  • Thanks a bunch for the help, Werner! This solved my problem. A MWE would have been difficult to provide for this case because I am using a custom .cls file that does some strange things to floats. – JSchaefer Nov 2 '15 at 22:39
  • @JSchaefer: Especially in cases like that, spoon-feeding us information is important. It seems this time my crystal ball paid off. I knew it was worth the 25c I paid for it. :-| – Werner Nov 2 '15 at 22:40

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.