[OS X TeX] TeXShop typesetting and macro questions

Claus Gerhardt gerhardt at math.uni-heidelberg.de
Tue Oct 3 20:35:09 CEST 2006


The Applescript below does what you want to do. Notice that the draft  
file should already exist.

Claus

tell application "TeXShop"
	get path of document of window 1
	set fileName to result
end tell
set scriptPath to (do shell script "dirname " & "~/Library/Flashmode/ 
Subroutines/ex")
set scriptPath to scriptPath & "/setnametsn.scpt"
set scriptName to POSIX file scriptPath as alias
set scriptLiB to (load script scriptName)
tell scriptLiB
	set {baseName, texName, pdfName, namePath, dirName, dirNameunquoted,  
logName, logPath, rtfName, docName} to setnametsn(fileName)
end tell

set shellScript to "cd " & dirName & ";"
--set shellScript to shellScript & "~/Library/Flashmode/bin/ 
pdflatexc  " & texName
set shellScript to shellScript & "/usr/local/teTeX/bin/powerpc-apple- 
darwin-current/pdflatex  " & "-jobname=" & baseName & "-draft" & " "  
& texName
do shell script shellScript

------------------------- 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 macostex-archives mailing list