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


Click here to return to the '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.
But How Do You Set It Up?
Authored by: deleted_user15 on Jan 13, '07 12:42:27PM
This is totally the missing piece of the puzzle for me with regards to editing LaTeX documents under OSX. Only one problem... I've downloaded PDFView, compiled the script, but I can't seem to figure out how to set it up properly beyond this. Under Preferences > LaTeX > PDFSync support I have
PRESET:    Custom
COMMAND:   /Path/to/ViM-LaTeX.scpt
ARGUMENTS: "%file" %line
but get no love. (I reversed the "%file" and %line commands to correspond with the order the arguments seem to be read in the script.) I've also tried compiling the command as an application and running it from the command-line, but only get errors about it being unable to read the first argument.

Any ideas what I'm doing wrong? Thanks.

---
For I dipt into the future, far as human eye could see,
Saw the Vision of the world, and all the wonder that would be...

-- Alfred Lord Tennyson

[ Reply to This | # ]

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 | # ]