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

Heiko Oberdiek heiko.oberdiek at googlemail.com
Thu Dec 1 15:31:38 CET 2011

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.

> Problem 2 (completely intractable) : XeTeX claims to be unable to find
> "TAR-2.pdf",

Already answered (\XeTeXpdffile).

Yours sincerely
  Heiko Oberdiek

More information about the XeTeX mailing list