[OS X TeX] TeXShop and Metapost: labels can't be typesetted with LaTeX
Claus Gerhardt
gerhardt at math.uni-heidelberg.de
Wed Sep 27 15:19:07 CEST 2006
The script below can be used in any situation where metapost is
invoked either through mfpic or independently of it. If you do not
to see the log file of mpost adjust the script accordingly.
As far as I know the metapost settings in TS do not affect the script
or any script of mine.
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
try
set shellScript to "cd " & dirName & ";"
set shellScript to shellScript & "~/Library/Flashmode/bin/pdflatexc
" & texName
do shell script shellScript
end try
set shellScript to "cd " & dirName & ";"
set shellScript to shellScript & "~/Library/TeXShop/bin/mpostc " &
baseName
do shell script shellScript
try
set fileLog to baseName & ".log"
set fileMlog to baseName & ".mlog"
set shellScript to "cd " & dirName & ";"
set shellScript to shellScript & "cp " & fileLog & " " & fileMlog
do shell script shellScript
set fileMlog to namePath & ".mlog"
set theFile to (POSIX file fileMlog as alias)
tell application "TeXShop"
open theFile
end tell
set shellScript to "cd " & dirName & ";"
set shellScript to shellScript & "~/Library/Flashmode/bin/pdflatexc
" & texName
do shell script shellScript
set thePDF to POSIX file pdfName
set scriptPath to (do shell script "dirname " & "~/Library/Flashmode/
Subroutines/ex")
set scriptPath to scriptPath & "/preview_bbedit.scpt"
set scriptName to POSIX file scriptPath as alias
set scriptLiB to (load script scriptName)
tell scriptLiB
preview_bbedit(docName, thePDF, previewer, process_name)
end tell
end try
------------------------- 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