[XeTeX] Various XeTeX issues

Bruno Voisin bvoisin at mac.com
Wed Sep 6 13:22:25 CEST 2006

Just today I have been applying XeLaTeX to a file originally written  
for standard LaTeX (TeX + dvips + GhostScript) and not using any  
fancy font apart from the CM and AMS fonts. The reason for doing this  
was the following. The platform is Mac OS X Tiger.

It's the final publisher-ready version of a paper, using a journal- 
specific LaTeX style file, and the preferred file format for included  
graphics is EPS:

> The preferred format for figure files is .eps or .tiff at  
> resolution 1200 dpi for lines, 600 dpi for greyscale and 300 dpi  
> for colour (which preferably should also be in CMYK - cyan magenta  
> yellow black - format). However, most standard image formats such  
> as pct, ppm, png, psd, Word, ppt, CorelDraw, ChemDraw, AutoCAD can  
> also be used, but not customized output of software not designed  
> for publishing purposes such as Matlab, nor PDF.

However, some EPS figure files are insanely big (~ 50 MB each -- no  
thanks Mathematica!) and the result with TeX + dvips + GhostScript is  
a huge PDF file (~ 80 MB) for the paper.

Accordingly, as instructed above, I've switched to bitmap TIFF  
versions of the big figures (all prepared from the original  
Mathematica EPS files in Adobe Illustrator CS 2). On Mac OS X, AFAIK  
only XeTeX is able to include TIFF files. Hence, as an experiment I  
have fed XeLaTeX with the original LaTeX input file, with no other  
change than adding the three lines near the beginning:

> %!TEX TS-program = xelatex
> \usepackage{xunicode}
> \DeclareGraphicsExtensions{.tif,.pdf}

All went surprisingly well, without any error (after building the  
latest XeTeX from source yesterday night, to avoid the mathchar bug).  
That, in spite of the fact that the bibliography (prepared manually,  
not using BibTeX) contained several accents entered in the  
traditional TeX way as gravit\'e (gravité), Sch\"ar (Schär), Gr\o n 
\aa s (Grønås), Grubi\v si\'c (Grubišić), and even a German ß  
entered as "s as allowed (I think) by the babel package:

> \foreignlanguage{german}{Abri"s einer einheitlichen Theorie der  
> Gamma- und der
> hypergeometrischen Funktionen}.

where babel had been called as:

> \usepackage[german,french,british]{babel}

I was expecting that, for such things to work in XeTeX, it was as  
least necessary to call the fonts with ":mapping=tex-text".

Does the fact that things work "out-of-the-box" come from:

- The use of CM/AMS fonts only?

- The presence of CM/AMS fonts in Mac Classic (FFIL/LWFN) format in  
my Classic system folder at /System Folder/Fonts/?

- Jonathan's very clever design of XeTeX?

- My misunderstanding of the inner workings of XeTeX?

- A combination of all of the above?

On a side note: to have a look at cross-compatibility, I compiled the  
LaTeX input file also with XeLaTeX + xdvipdfmx instead of XeLaTeX +  
xdv2pdf, after creating a new TeXShop engine containing:

> #!/bin/tcsh
> set path= ($path /usr/local/teTeX/bin/powerpc-apple-darwin-current / 
> usr/local/bin)
> xelatex -output-driver="xdvipdfmx -q -E" "$1"

Given that xdvipdfmx doesn't support the TIFF format, I wasn't  
surprised to see that the TIFF figures are absent from the final PDF  
output. What I didn't expect, though, was that the correct (blank)  
space had been reserved in the PDF output, as if XeTeX had correctly  
been able to read a size specification in the TIFF files but xdvipdfm  
had been unable to include these files. Is this correct assumption?

Finally: I could see no explanation of the -q option to xdvipdfmx,  
recommended by Jonathan. "xdvipdfmx -h" doesn't tell anything about it.

Bruno Voisin

More information about the XeTeX mailing list