[XeTeX] XeTeX, XeTeXpicfile, and counter-intuitive behaviour

Heiko Oberdiek heiko.oberdiek at googlemail.com
Thu Dec 1 18:11:32 CET 2011

On Thu, Dec 01, 2011 at 05:38:04PM +0100, Zdenek Wagner wrote:

> 2011/12/1 Heiko Oberdiek <heiko.oberdiek at googlemail.com>:
> > On Thu, Dec 01, 2011 at 04:51:14PM +0100, Zdenek Wagner wrote:
> >
> >> 2011/12/1 Philip TAYLOR <P.Taylor at rhul.ac.uk>:
> >> >
> >> >
> >> > Heiko Oberdiek wrote:
> >> >
> >> >> No, it's a whatsit. It is *not* discarded, but it isn't a box.
> >> >
> >> >
> >> > Right, so why isn't the \eject honoured ?
> >> >
> >> If I remember it well, whatsit is dimensionless, thus if \XeTeXpicfile
> >> reserves a space, it cannot be just whatsit. Anyway, discardable items
> >> are discarded at the break. They must not be discarded after whatsit.
> >
> > Knuth has decided otherwise. Discardable items are discarded at
> > top of a new page unless there is a box. I have already quoted
> > "The TeXbook".
> >
> Not exactly, it is important that whatsit is not a discardable item.
> If if occurs at the top of the page, all following discardable items
> should be included in the page.

Donald E. Knuth is the address to complain.

> I have not tried your example but I
> think it \vfil\eject will be ignored. There is no \immediate,

Yes this is important, with \immediate the \write would be executed
immediately and vanish. Without \immediate the delayed \write is
stored in a node at the top of the page.

> thus
> \write will be stored and executed on \shipout. \vfil\eject are still
> on the top of the page,

No, the first element is a whatsit (\write).

> \vfil is discardable and will be discarded,

Yes, because there isn't a box before.

> \eject will do nothing because there is no page to be ejected.

The \penalty of \eject that forces the page break is discarded, too.


  \write16{Hello World}


Result of \showlists:

  ### vertical mode entered at line 0
  ### current page:
  \write*{Hello World}

  prevdepth ignored

  ! OK.
  l.14 \showlists

A box or rule (!) is needed to stop discarding discardable items.
(The rule is not meantioned in the already quoted sentence from
"The TeXbook").

Yours sincerely
  Heiko Oberdiek

More information about the XeTeX mailing list