[OS X TeX] pdflatex in AplleScript

Maarten Sneep maarten.sneep at xs4all.nl
Wed Oct 20 15:44:35 CEST 2004


On 20 okt 2004, at 15:17, Sergei Mariev wrote:

> I am trying to invoke pdflatex from within the AplleScript.

I gave up trying to call latex from AppleScript. Instead I send the 
commands to the terminal application. I found that to be much more 
reliable. For some tricks you can download my shell script & 
applescript combination for BBEdit. Once you figure out how to produce 
teh correct command-line, the shell-script engine may actually be 
useful ;)

http://www.nat.vu.nl/~sneep/tex/

> what can I do to make AppleScript typeset the file and ignore the 
> error message from pdflatex?

Untested: create a shell function or script that returns 0 no matter 
what latex does. A shell function (in bash, may or may not work with 
the default environment you get from within AppleScript) returns 
whatever the last command that is called returns.

set myShellScript to "function mylatex(){ 
/usr/local/teTeX/bin/powerpc-apple-darwin-current/pdflatex  
-interaction=nonstopmode ~/Documents/diss/frg_typeset.tex; echo 
"done";}" & return & "mylatex"

do shell script myShellScript

Maarten

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list