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

Heiko Oberdiek heiko.oberdiek at googlemail.com
Thu Dec 1 16:09:59 CET 2011


On Thu, Dec 01, 2011 at 03:58:10PM +0100, Zdenek Wagner wrote:

> 2011/12/1 Heiko Oberdiek <heiko.oberdiek at googlemail.com>:
> > On Thu, Dec 01, 2011 at 11:49:30AM +0000, Philip TAYLOR wrote:
> >
> >> Typesetting a restaurant menu, I have run into two problems :
> >> one I can work around, one is completely defeating me.  Here
> >> is the relevant fragment of code --
> >>
> >>       \XeTeXpicfile Resources/Images/IMG_2206.JPG width \hsize \relax
> >>       \XeTeXpicfile Resources/Images/TAR-2.pdf width \hsize \relax
> >>       \vfil \eject
> >>
> >> Problem 1 (work-aroundable) : the \vfill \eject has no effect,
> >> and the image appears above the \halign that follows.
> >
> > D.E. Knuth, "The TeXbook": "Chapter 15: How TeX Makes Lines into Pages":
> >
> > | Whenever TeX is moving an item from the top of the "recent
> > | contributions" to the bottom of the "current page," it discards
> > | a discardable item (glue, kern, or penalty) if the current
> > | page does not contain any boxes.
> >
> > Solution, for example: put \XeTeXpicfile ... in an \hbox.
> >
> That's what I wrote about discardable items but it does not explain
> why \XeTeXpicfile is discarded.

It is not discarded. Only the glue and penalty of "\vfil\eject".
The picture is still there.

Yours sincerely
  Heiko Oberdiek


More information about the XeTeX mailing list