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

Heiko Oberdiek heiko.oberdiek at googlemail.com
Thu Dec 1 18:44:34 CET 2011


On Thu, Dec 01, 2011 at 04:47:30PM +0000, Philip TAYLOR wrote:

> Heiko Oberdiek wrote:
> 
> >It's your choice to use low level internals. Higher level interfaces
> >are already written and some can also be used with plain TeX:
> >
...
> >\input graphicx.sty
...
> >\includegraphics[width=\hsize]{s1.png}
...
> >Thus there is no need to know the difference between the low level
> >commands \XeTeXpicfile and \XeTeXpdffile for the end user.

> I choose to write in TeX
> because I understand TeX, I like TeX, and I very much appreciate
> the control that TeX gives me.  But when TeX (or, in this case,
> XeTeX) causes problems, and will continue to cause problems for
> others in the future, then I believe that it is important to
> discuss (and, hopefully, resolve) those problems rather than
> simply sweeping them under the counter by saying "Why not use
> existing packages ?".

Because they are solving those problems for you and others now
and in the future. That is one of the main reasons for a package,
providing an easier interface for tricky low level stuff.

> I do not use existing packages because
> I prefer not to, just as I prefer to drive a manual car rather
> than an automatic : I want to be /in control/ of the typesetting,

That comes with the price that you have to deal with the
tricky low level stuff. And as we have seen, old TeX
is even able to surprise much experienced Gurus.

> not dependent on someone else's work (DEK/JK excepted).

You are forgetting the e-TeX people (Peter Breitenlohner et. al.),
xdvipdfmx (Jin-Hwan Cho et. al.), the predecessor dvipdfm(x)
(Mark A. Wicks et. al.), the font people, the people that make
the TeX distribution, ...

Back to the problems:

* non-effective \vfill\eject: documented in "The TeXbook":

  | 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.

  Remark: This should be fixed:
    any boxes. -> any boxes or rules.

* \XeTeXpicfile cannot load PDF files: documentd in

  "The XeTeX reference guide" by Will Robertson:
  | 6 Graphics
  | ...
  | \XeTeXpicfile ...
  | Insert an image. ...
  |
  | \XeTeXpdffile ...
  | Insert (pages of) a PDF. ...

  Remark: It could be improved by saying
  * that both commands insert a whatsit and
  * that they should be used inside a \hbox to avoid trouble
    with discarded items at the top of a page.

Yours sincerely
  Heiko Oberdiek


More information about the XeTeX mailing list