[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 ;)


> 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(){ 
-interaction=nonstopmode ~/Documents/diss/frg_typeset.tex; echo 
"done";}" & return & "mylatex"

do shell script myShellScript


--------------------- 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