[OS X TeX] Skim SKAutoReloadFileUpdate

Maarten Sneep maarten.sneep at xs4all.nl
Thu Dec 18 23:36:25 CET 2008


On 18 dec 2008, at 23:27, Joseph C. Slater PE, PhD wrote:

> Has anyone else used latexmk as a solution to this? I finally got  
> around to writing a latexmkrc file that works (for me). It preempts  
> the auto feature by executing a revert when completed, but a) it  
> would be nice if that dialog box didn't show up in the future (since  
> the answer would thus always be "no"), and b) it causes every file  
> in Skim to revert because I couldn't get placeholders to work. I  
> will probably post this once I'm more comfortable with it (someone  
> else looks at it and tries it out).

Have a look at the commands I issue from my BBEdit scripts. The  
reloading is done from the shell script.


relevant snippet:

# with pdffile set to the unix path to the pdf file
/usr/bin/osascript \
     -e "set theFile to POSIX file \"${pdffile}\" as alias" \
     -e "tell application \"Skim\"" \
     -e "set theDocs to get documents whose path is (get POSIX path of  
theFile)" \
     -e "if (count of theDocs) > 0 then revert theDocs" \
     -e "open theFile" \
     -e "end tell"

# end

The open theFile should probably reside in the else part of the  
previous if statement, but this works for me, and does not require  
clicking OK in a confirmation dialog.

Maarten



More information about the macostex-archives mailing list