[OS X TeX] TeXShop and Metapost: labels can't be typesetted with LaTeX
Claus Gerhardt
gerhardt at math.uni-heidelberg.de
Wed Sep 27 12:42:57 CEST 2006
The shell script as well as the last Applescript should work in both
cases provided there is .mp file. However, if you use mfpic, then
the .mp file has first to be created by a latex run, so that
mpostcpl would be the right Applescript.
If you would like to use the scripts from Flashmode-TS, you have to
change the shell script in ~/Flashmode/bin.
Claus
On Sep 27, 2006, at 11:04, Franck Pastor wrote:
> Thanks again, it works well for Metapost this time. It seems that I
> need to delve further in the Applescript language, it comes in
> useful :-)
>
> One last question (I promise!): how should I change the script if I
> want to make it work with mptopdf instead of metapost?
>
> Franck Pastor
>
> Le 27-sept.-06 à 01:15, Claus Gerhardt a écrit :
>
>> Sorry, I wasn't aware that your example file should be saved as
>> a .mp file. In this case the script below should do the trick.
>>
>> The script needs Flashmode-downloadable because of the subroutine.
>>
>> 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/TeXShop/bin/mpostc "
>> & baseName
>> do shell script shellScript
>>
>>
>>
>>>
>>> Thanks! mpostcpl does the tricks, as I use mfpic :-)
>>>
>>> However, if I want to compile a Metapost file with mpostc, it
>>> doesn't work ("Applescript Error : TeXShop got an error:
>>> NSReceveirEvaluationScriptError: 4"). I'm starting to think that
>>> the best way to deal with this problem would be a panel in the
>>> preferences...
>>>
>>> Franck Pastor
>>>
>
>
> ------------------------- 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/
>
------------------------- 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