How can I require two (large, near page-size) figures (on separate though consecutive/facing pages) to be horizontally aligned? I've tried \begin{figure}[t]
but LaTeX ignores me. If they simply are at the top of the page.
1 Answer
By default, LaTeX's standard document classes will center a float that occupies a page by itself vertically; providing a location specifier such as [t]
won't override this. If you want to the two floats to be top-aligned, you could issue the following commands:
\makeatletter
\setlength{\@fptop}{0\p@}
\setlength{\@fpbot}{0\p@ \@plus 1fil}
\makeatletter
If you want them to be bottom-aligned, just switch the arguments of the two \setlength
instructions.
-
And also you can use a nonstretchable, nonzero unit for
\@fptop
to keep the tops of the figures at the same vertical positions (without losing a sense of balance in the page).– HughCommented Jun 7, 2016 at 4:46 -
@Hugh - Thanks. You had indicated, three years ago, that the figures were "near page-size". As such, setting
\@fptop
to a (nontrivial) positive length might risk pushing one or both figures down so much as to make their bottom edge protrude into the page margin. That's why I had suggested setting\setlength{\@fptop}{0\p@}
. Naturally, if the figures are not nearly as tall as the text block, then choosing0pt
as the length for the top offset may be too cautious.– MicoCommented Jun 7, 2016 at 5:28
\includegraphics{}
maybe inside acenter
environment if you have to. Then you can control the placement precisely with e.g.\vspace*{length-value}
. If you need a captio use the\captionof{figure}{pic description}
command from thecapt-of
orcaption
package\clearpage
to ensure that the graphs start at the top of a new page, right?\clearpage
isn't required, I don't think.