Am 23.06.2006 um 22:31 schrieb Charilaos Skiadas:
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.
Wouldn't it be better to use the TM_TSCOPE variable which the LaTeX bundle help already mentions? Bundles are frequently updated, so editing a hardcoded path in the bundle itself seems not ideal. I for one keep all LaTeX related apps in /Applications/TeX. Something like
"$TM_TSCOPE"/TeXniscope.app/Contents/Resources/forward-search.sh "$TM_LINE_NUMBER" "$TM_FILEPATH" "$PDF";
(I don't quite understand if simply TM_TSCOPE/... would also work. Also the bundle help should probably clarify whether to give the TM_SCOPE path with or without a trailing slash, with or without the app itself etc.)
Christian