[OS X TeX] Testing for fontspec package

Robert Spence spence at saar.de
Tue Sep 4 16:11:48 CEST 2007


Hi,

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:]
\usepackage{ifpdf}
[at appropriate point(s):]
\ifpdf\...\else\...\fi
or:
[in preamble:]
\usepackage{ifxetex}
[at appropriate point(s):]
\ifxetex\...\else\...\fi
?

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
Germany



------------------------- 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 macostex-archives mailing list