[OS X TeX] typeset TeX from Mathematica

Gianluca Gorni gorni at dimi.uniud.it
Wed Feb 8 05:37:59 EST 2006

I would like to share a way I have found to have TeXShop
typeset and display automatically a TeX file produced
by Mathematica. I have been using it to generate statistical

I think it only works in Tiger.

Here it is:

First place the following AppleScript with name TeXShopTypeset.scpt
into ~/Library/Mathematica/Applications :

on run argomento
	tell application "Finder"
		set myFile to (get POSIX file (item 1 of argomento) as alias) as  
	end tell
	tell application "TeXShop"
		open myFile
		typeset document (name of myFile)
	end tell
end run

Then define the following function in Mathematica:

TeXShopTypeset[fileNameAndPath_String] :=
    Display["!osascript \
~/Library/Mathematica/Applications/TeXShopTypeset.scpt " <>  
    "", "TEXT"]

Suppose now that you have generated a TeX file in Mathematica,
with path

myFile = "~/Desktop/myTeXfile.tex"

To have it automatically typeset from within Mathematica simply call


I wonder if there is a way to do the same that does not need
an AppleScript.

Good luck,
Gianluca Gorni

------------------------- 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 Archive: http://tug.org/pipermail/macostex-archives/

More information about the MacOSX-TeX mailing list