[OS X TeX] ifthenelse in or for engines
Herbert Schulz
herbs at wideopenwest.com
Mon Feb 26 16:17:36 CET 2007
On Feb 26, 2007, at 8:06 AM, Alain Schremmer wrote:
> Friedrich Vosberg wrote:
>
>> Morning.
>>
>> I want to use different engines depending on the name of the file.
>> For example:
>>
>> IF filename CONTAINS *-copy.*
>> USE %!TEX TS-program = copy.engine
>> ELSEIF filename CONTAINS *-draft.*
>> USE %!TEX TS-program = draft.engine
>> ELSE
>> USE %!TEX TS-program = final.engine
>
> For a couple of months now, I have seen "engines" mentioned on this
> list but I thought they had to do with installing this or that
> esoteric piece of program and didn't mind not understanding. The
> above though seems different. Could you elaborate on what the above
> engines, "copy.engine Â… , draft.engine Â… , final.engine Â… "
> would be doing and maybe also on what an engine IS?
>
> Regards
> --schremmer
>
Howdy,
First, as Peter Dybala said, that can't be done in either an engine
file or the source. The best thing is to write a single engine that
does the searching (using grep?) and executes the correct commands
depending upon the search results.
Second, an engine is a set of commands in a script (usually a shell
script) for doing special processing; it is a way of extending the
possible commands that are found in TeXShop's Typeset menu. One
example that comes with TeXShop is the xelatex engine which will run
xelatex on a file. Another example that can be installed is the
pdflatexmk engine (this must be installed with several other files to
make it work) which will run latexmk in pdf mode: latexmk will
automatically run pdflatex, then bibtex and/or makeindex if necessary
and then pdflatex the correct number of times to resolve all (cross)
references.
Good Luck,
Herb Schulz
(herbs at wideopenwest.com)
------------------------- 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