Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Addendum: But How Do You Set It Up?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Addendum: But How Do You Set It Up?
Authored by: deleted_user15 on Jan 13, '07 02:09:26PM
Okay, looks like I can get things to work right from the command-line using osascript. This suggests that I should use
PRESET:    Custom
COMMAND:   osascript
ARGUMENTS: /Path/to/ViM-LaTeX.scpt "%file" %line
which works only if all spaces are properly escaped (so " " -> "\ ").

Well, it kinda works. From the command-line this is a beautiful thing, but when I try to run it from PDFView my system goes haywire... Lines get deleted from my document in ViM, new buffers are created, saves are attempted, applications are hidden, and the Spotlight search field is repeatedly called. But at least something happens.

Thoughts on what might be causing all this?

[ Reply to This | # ]
Answering My Own Question
Authored by: deleted_user15 on Jan 13, '07 02:27:31PM
For those who're having prblems setting this up like I did (either the hint doesn't work, or it gives really pathological responses), here's what you need to do:
  1. Save the linked script somewhere as an AppleScript.
  2. In PDFView, go to Preferences > LaTeX > PDFSync Support and set the preset as Custom, the command as osascript, and the arguments to /Path\ to\ your\ copy\ of/pdf_latex.scpt "%file" %line. Note that you must escape any spaces in your paths here just as you would in a shell.
  3. Make sure you have Enable Access for Assistive Devices enabled in your "Universal Access" system preference pane.
The hint seems to assume that both steps #2 and #3 are obvious, but they weren't to me at least. Hope this helps other people who might be having problems (and sorry for the posts above!).

[ Reply to This | # ]