Thanks Nicholas, indeed this is very useful. I just committed a fix with it. It needed a slight change for the event that TeXniscope is not the previewer. Actually, I just changed it completely to use forward-search instead, for the cases where one uses a master file with includes, and has the TM_LATEX_MASTER. This is the replacement:
if [[ $(tr <<<"$V" '[A-Z]' '[a-z]') == texniscope ]]; then /Applications/TeXniscope.app/Contents/Resources/forward- search.sh "$TM_LINE_NUMBER" "$TM_FILEPATH" "$PDF"; fi open -a "$V" "$PDF"
If you've placed TeXniscope somewhere else, then you need to change the path above. On Jun 23, 2006, at 2:04 PM, Nicolas Schmidt wrote:
When I write LaTeX files I run "Typeset & Preview" quite alot, and therefore was annoyed by the fact that I manually have to scroll the preview window to the current line in my TextMate. Hence I customized the "Typeset & Preview" command using TeXniscope's quite useful AppleScript interface. I replaced the line
--- start --- open -a "$V" "$PDF" --- end ---
with
--- start --- open -a "$V" "$PDF" osascript << EOF tell application "TeXniscope" refresh the front document the front document goto line $TM_LINE_NUMBER of source "$TM_FILEPATH" end tell EOF ---- end -----
Perhaps you find that useful.
Haris