[OS X TeX] OT: Vertically centered pages in a multipage table with longtable?
Bruno Voisin
bvoisin at mac.com
Sun May 9 00:03:06 CEST 2004
Le 7 mai 04, à 17:47, Bruno Voisin a écrit :
>> Hello,
>
> Having had no luck, as usual, with comp.text.tex, I'm trying here, in
> case someone knows the answer to the following non-Mac-specific
> question.
>
>> Is there a way, in a multipage table produced using the longtable
>> environment, the page breaks being defined manually by inserting
>> \newpage commands inside this environment, to obtain vertically
>> centered pages? Namely that, in each individual page, the part of the
>> table occupying this page be vertically centered instead of being
>> pushed towards the top as it is by default.
Answering my own post: I got offlist help from Samuel Lelièvre and
Wendy McKay, who led me towards the solution. The key was not to modify
the \LT at array command from longtable.sty as I had attempted, but the
command \LT at output.
The desired result was obtained:
- For all but the last page of the table, by redefining:
> \setbox\@cclv\vbox{\unvbox\@cclv\copy\LT at foot\vss}%
to:
> \setbox\@cclv\vbox{\vss\unvbox\@cclv\copy\LT at foot\vss}%
- For the last page, by redefining:
> \vbox
>
> {\unvbox\z@\box\ifvoid\LT at lastfoot\LT at foot\else\LT at lastfoot\fi}%
to:
> \null\vfil\vbox
>
> {\unvbox\z@\box\ifvoid\LT at lastfoot\LT at foot\else\LT at lastfoot\fi}%
Many thanks to Samuel and Wendy,
Bruno Voisin
-----------------------------------------------------
Please see <http://www.esm.psu.edu/mac-tex/> for list
guidelines, information, and LaTeX/TeX resources.
More information about the macostex-archives
mailing list