[OS X TeX] Re: ifthenelse in or for engines

Herbert Schulz herbs at wideopenwest.com
Tue Feb 27 14:51:51 CET 2007


On Feb 26, 2007, at 8:16 PM, Bill Rowe wrote:

> On 2/26/07 at 9:17 AM, herbs at wideopenwest.com (Herbert Schulz) wrote:
>
>> 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.
>
> This response seems contradictory to me perhaps because I may have  
> a faulty understanding of "engine" or there are some details missing.
>
> I had though an "engine" file was simply a script that invoked a  
> specific TeX binary. For example, one of the files I have in the in  
> the Engines folder contains the following
>
> #!/bin/tcsh
>
> set path= ($path /usr/local/teTeX/bin/powerpc-apple-darwin-current / 
> usr/local/bin)
> xelatex  "$1"
>
> It seems like it should not be difficult to implement if then else  
> clauses to invoke different binaries here based on whatever  
> criteria was of interest to an user.
>
> What am I missing?

Howdy,

I don't think you're missing anything! It is a shell script and you  
can use all the power of a shell script (the ``language'' varies with  
which shell you use, ergo the first line in the script). I haven't  
tried it but by changing the first line you might be able to execute  
a Perl or Ruby script too.

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