1

For double-page floats (i.e. pairs of floats that are supposed to appear together on a full spread), the dpfloat package is recommended regularly, and it works pretty well for me too.

However, I've decided to override LaTeX's default vertical alignment of floats, which is centered, and instead specified that every full-page float, regardless of its height, be aligned with the top line of the text area -- i.e., I remove all white space above a full-page float, and put all remaining white space underneath it.

I use @fptop for that.

In theory, one of the benefits of this would be that the two halves of a double-page float, even if they're of different height, will still have, at least, their top borders be aligned, providing for a much more pleasing result aesthetically.

But with dpfloat this isn't the case. The package seems to somehow override the modifications done with @fptop. Floats are vertically centered again. One of the worst effects of this is with double-page floats that consist of two halves of the same image (i.e. same height!) and consequently only have one common caption, placed on the right side. As caption and image are placed inside one box that then gets centered, the two images turn out entirely misaligned, which kind of defeats the purpose of the package in the situation where you need it the most: to keep together things that belong together.

I've looked at dpfloat.sty, of course, but haven't been able to find what causes the problem. Any ideas?

enter image description here

\documentclass[DIV=9,twoside=true]{scrartcl}
\usepackage{blindtext,dpfloat}

%make sure figure starts at text area's top
\makeatletter
\setlength{\@fptop}{0pt}
\makeatother

\begin{document}
\Blindtext

\begin{figure}[p]
\rule{.5\textwidth}{.5\textheight}
\caption{A usual full-page float that's not part of a pair}
\end{figure}%

\Blindtext

\begin{figure}[p]
\begin{leftfullpage}
\rule{.5\textwidth}{.5\textheight}
\end{leftfullpage}
\end{figure}%

\begin{figure}[p]
\begin{fullpage}
\rule{.5\textwidth}{.5\textheight}
\caption{Right half of a double-page float pair with common caption.}
\end{fullpage}
\end{figure}%

\Blindtext

\Blindtext
\end{document} 
1

The package forces the float to be full height so the padding latex adds is never bigger than 0pt, you need instead to affect the way the content is put in the package's full height box (remove \vss from the top)

\documentclass[DIV=9,twoside=true]{scrartcl}
\usepackage{blindtext,dpfloat}

%make sure figure starts at text area's top
\makeatletter
\setlength{\@fptop}{0pt}
\def\endfullpage{\egroup\dp\@@wholepage\z@
   \vbox to\textheight{\unvbox\@@wholepage\vss}}

\def\endleftfullpage{\egroup\dp\@@wholepage\z@
   \vbox to\textheight{\unvbox\@@wholepage\vss}\global\@LPtrue}
\makeatother

\begin{document}
\Blindtext

\begin{figure}[p]
\rule{.5\textwidth}{.5\textheight}
\caption{A usual full-page float that's not part of a pair}
\end{figure}%

\Blindtext

\begin{figure}[p]
\begin{leftfullpage}
\rule{.5\textwidth}{.5\textheight}
\end{leftfullpage}
\end{figure}%

\begin{figure}[p]
\begin{fullpage}
\rule{.5\textwidth}{.5\textheight}
\caption{Right half of a double-page float pair with common caption.}
\end{fullpage}
\end{figure}%

\Blindtext

\Blindtext
\end{document} 
  • 1
    it might be worth asking the package maintainer to take note of \@fptop and \@fpbot rather than unconditionally centering with \vss top and bottom. – David Carlisle Feb 18 '18 at 13:26

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.