[OS X TeX] Testing for fontspec package

Robert Spence spence at saar.de
Tue Sep 4 10:11:48 EDT 2007


On 04 Sep 2007, at 23:59 , <firstian at rcn.com> wrote:

> I have a tex file that needs to be compiled for both xelatex and  
> regular latex (both
> use pdflatex to generate pdf directly). The tex file currently uses  
> fontspec, which
> the regular latex doesn't like. Is there a way to test for whether  
> fontspec is installed
> in the tex file itself, so it can work for both without modifications?

Why not try something like:
[in preamble:]
[at appropriate point(s):]
[in preamble:]
[at appropriate point(s):]

That would assume that fontspec is being used every time when  
processing with xetex (running as xelatex), and never when processing  
with pdf(la)tex. But that would usually be the case.

Good luck,

-- Rob Spence
Applied Linguistics
Saarland University

------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/

More information about the MacOSX-TeX mailing list