]>
code.delx.au - monosys/blob - osx_bin/preview
2 # $ pdflatex somefile.tex && preview.sh somefile.pdf
3 # Preview.app will close the file and reopen it
4 # You must run this command first to update your Preview.app bundle to support
6 # $ defaults write /Applications/Preview.app/Contents/Info NSAppleScriptEnabled -bool YES
9 if [ ! -r "${filename}" ]; then
10 echo "Error, could not read ${filename}"
15 tell application "Preview"
16 repeat with theWindow in windows
17 if name of theWindow starts with "$(basename "${filename}")" then