[XeTeX] tabular in footnote

Heiko Oberdiek heiko.oberdiek at googlemail.com
Wed Dec 7 00:51:49 CET 2011

On Wed, Dec 07, 2011 at 06:30:39AM +0800, Daniel Greenhoe wrote:

> On Wed, Dec 7, 2011 at 5:46 AM, Heiko Oberdiek
> <heiko.oberdiek at googlemail.com> wrote:
> > You have to compile twice at least.
> I compiled at least 8 times using "xelatex Heiko.tex". I still get the
> same error: the text extends below the text area (see attachment). You
> don't get this result on your system?

And I had written:

| The following example addresses calculates the shift to align
| the baseline of the footnote line with the first line of
| the tabular. No time for looking at the problem with the overfull \vbox.

I have seen two problems with your example and one of them solved,
the other remained unsolved. No more, no less.

Taking more time, I see now, that the overfull \vbox is caused
by something different: The header is set to zero (see options
for geometry), but the page number is printed causing the
overfull \vbox. Changing the options of geometry or \pagestyle{empty}
solves the problem.

The exceeding part of the second footnote text is correct behaviour:
TeX tries to align the top and bottom lines of a page in order to
get the baselines at the same position:
* At the top vertical space is added up to \topskip unless
  the height of the first element is larger than \topskip.
* At the bottom the bottom element might have a depth up to
  \maxdepth. The default for \maxdepth with \documentclass[12pt]{book}
  is .5\topskip = 8pt. \maxdepth=0pt doesn't allow the bottom element
  to exceed the textarea. Aligning the last line of the tabular with the
  bottom of the textarea is much more tricky.

  The following assumes that the last line of the tabular contains
  normal text without large depths:



\newsavebox\tl at box
\newcount\c at tlcount
\def\thetlcount{\the\c at tlcount}
  \begin{lrbox}{\tl at box}%
  \zref at savepos
  \zref at labelbyprops{tl at b\thetlcount}{posy}%
  \xdef\g at dp@arstrutbox{%
  \zref at refused{tl at a\thetlcount}%
  \zref at refused{tl at b\thetlcount}%
    \zposy{tl at a\thetlcount}sp-\zposy{tl at b\thetlcount}sp%
    \zref at savepos
    \zref at labelbyprops{tl at a\thetlcount}{posy}%
    \box\tl at box
  }\\*[-\g at dp@arstrutbox]%
  \hbox{\vrule width 0pt depth\g at dp@arstrutbox}%

Yours sincerely
  Heiko Oberdiek

More information about the XeTeX mailing list