[OS X TeX] Weird page size problem using XeLaTeX
Bruno Voisin
bvoisin at mac.com
Tue Dec 20 12:45:26 CET 2005
Le 20 déc. 05 à 11:57, Martin Buchmann a écrit :
> i've just discovered XeLaTeX and the fontspec package for
> typesetting christmas cards, that's wonderfull :-)
>
> But there is kind of a problem if i want to use the eso-pic package
> and a landscape a5paper. It's working fine using pdfelatex or if i
> use xelatex without the eso-pic package but if i compile the
> minimal example given below, TeXniscope and Acroread show a whole
> a4 page with just the upper half used instead of a a5 page.
>
> Any ideas what i can do you get it done correctly?
eso-pic seems to be one of those packages that doesn't use driver
files for the different TeX engines (i.e. pdfTeX or dvips or XeTeX
or ...), and that includes instead some hard-coded switches based on
the assumption that you're using either dvips or pdfTeX, to the
exclusion of any other driver:
> \@ifundefined{Gin at driver}{}%
> {%
> \ifx\Gin at driver\@empty\else%
> \filename at parse{\Gin at driver}\def\reserved at a{dvips}%
> \ifx\filename at base\reserved at a\ESO at dvipstrue\fi%
> \fi
> }%
> \ifx\pdfoutput\undefined\else
> \ifx\pdfoutput\relax\else
> \ifcase\pdfoutput\else
> \ESO at dvipsfalse%
> \fi
> \fi
> \fi
> \ifESO at dvips\def\@tempb{eepic}\else\def\@tempb{epic}\fi
> \def\@tempa{dotted}%\def\ESO at gap{\LenToUnit{6\@wholewidth}}%
> \ifx\@tempa\ESO at subgridstyle
> \IfFileExists{\@tempb.sty}%
> {%
> \RequirePackage{\@tempb}
> \renewcommand*\ESO at hline[1]{\ESO at subgridlines\dottedline
> {\ESO at gap}%
> (0,0)(##1,0)}
> \renewcommand*\ESO at vline[1]{\ESO at subgridlines\dottedline
> {\ESO at gap}%
> (0,0)(0,##1)}
> }{}
This code seems to first define dvips as the default driver, then
test whether \pdfoutput is defined and, if yes, notice you're using
pdfTeX instead. Then, with the dvips setting the eepic package is
loaded, and with the pdfTeX setting the epic package is loaded.
Thus, in your case, eso-pic thinks you're using dvips and loads
eepic. The problem is that eepic uses a specific set of \special
commands, such as:
> \special{pn \the\@tempcnta}%
> \special{dt \the\@tempcntb.00\the\@tempcnta}%
and XeTeX probably knows nothing about them. I've not been able to
find anything about these \special's, even in the dvips manual.
I'm not sure whether anything can be done to make XeTeX work with
these packages, other than contacting the authors of eso-pic and
asking them to investigate XeTeX support. You can try to put a copy
of eso-pic.sty inside ~/Library/texmf/tex/latex/, replace the line:
> \ifESO at dvips\def\@tempb{eepic}\else\def\@tempb{epic}\fi
by:
\def\@tempb{epic}
to ensure epic.sty is loaded instead of eepic.sty, and see what
happens. Or does it make a difference if you load the graphics
package after eso-pic (the graphics package detects XeTeX is used and
sets things appropriately, but I'm not sure this might affect epic or
eepic)?
Piet, I'm realizing you've been involved in eepic. D'you think the
above analysis is correct (I'm no expert in these matters)?
Bruno Voisin
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
More information about the macostex-archives
mailing list