[OS X TeX] Can a TeXShop engine give the PDF name?
msharpe at ucsd.edu
Wed Dec 4 17:34:47 CET 2013
On Dec 3, 2013, at 4:30 PM, Michael Sharpe <msharpe at ucsd.edu> wrote:
> Though AppleScript can appear flaky, and does indeed change from one version of OSX to another, there is usually a workaround. One of the things that changed a couple of updates ago is that Open in the TeXShop dictionary now leads to error -1712, for reasons I can't explain. If you change your script to catch the error, it will work reliably. Eg,
> osascript << EOF
> tell application "TeXShop"
> open posix file "$cwd/foo.pdf"
> set index of window "$1:foo.pdf" to 1
> tell document "$1:foo.pdf" to refreshpdf
> on error
> end try
> end tell
Sorry---that should have been
osascript << EOF
tell application "TeXShop"
open posix file "$cwd/foo.pdf"
set index of window "$1:foo.pdf" to 1
tell document "$1:foo.pdf" to refreshpdf
More information about the macostex-archives