% ======================================================================== % % Copyright (c) 2006 The University of Washington % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. % % This work has the LPPL maintenance status `maintained'. % % The Current Maintainer of this work is Jim Fox, fox@washington.edu % % ======================================================================== % % % double-page float package % % Jim Fox % fox@washington.edu % http://staff.washington.edu/fox/ % % % Version history % % 2006/10/05: fix footer placement (suggestion by Mark Henning (mh@homolog.de) % 1997/09/21: original \ProvidesPackage{dpfloat}[2006/10/05] \NeedsTeXFormat{LaTeX2e} % This package allows you to format a double-page figure or table % % It provides two environments: % % {fullpage} makes a full page figure or table % {leftfullpage} like fullpage, but guarantees a left side page % % Example use: % % ------------------------------------------------------- % \begin{figure}[p]% will be the left-side figure % \begin{leftfullpage} % ... % \end{leftfullpage} % \end{figure} % \begin{figure}[p]% will be the right-side figure % \begin{fullpage} % ... % \end{fullpage} % \end{figure} % ------------------------------------------------------- % % % LaTeX's output routine is modified to reject left-page floats % if they appear on odd pages (right page). These will then % be moved to the next page (a left page). % % This is obviously dependent upon specific details of the % output routine which are probably subject to change without notice. % \newif\if@LP \@LPfalse % For each float we define a macro indicating whether or not % it is 'left-page' only \newbox\@@wholepage \def\fullpage{\setbox\@@wholepage=\vbox\bgroup} \def\endfullpage{\egroup\dp\@@wholepage\z@ \vbox to\textheight{\vss\unvbox\@@wholepage\vss}} \def\leftfullpage{\setbox\@@wholepage=\vbox\bgroup} \def\endleftfullpage{\egroup\dp\@@wholepage\z@ \vbox to\textheight{\vss\unvbox\@@wholepage\vss}\global\@LPtrue} \let\oldend@float\end@float \def\end@float{% \if@LP\global\@namedef{LP:\expandafter\string\@currbox}{L}% \else \global\@namedef{LP:\expandafter\string\@currbox}{X}% \fi \global\@LPfalse \oldend@float } % Reject a left-page float that appears on an even page \if@twoside % reject a left-side float that appears on an odd page \let\old@xtryfc\@xtryfc \def\@xtryfc #1{% \expandafter\if\csname LP:\string#1\endcsname L% \ifodd\count0\global\@fpmin\maxdimen \typeout{dpfloat moved a leftpage float from page \the\count0.}% \fi\fi \old@xtryfc #1} \else % if you want to do something special for one-sided printing % do it here \fi % assure that any remaining floats are printed \def\@dpf@mtlist{} \AtEndDocument{\ifx\@deferlist\@dpf@mtlist\else\ifodd\count0\else\typeout{dpfloat added a blank page}\clearpage\ \clearpage\fi\fi} % end of dpfloat