Setting up preview for texlipse on OSX

by kai on 15/11/2008



And now for something completely different. When I’m doing writing, I usually try to use LaTeX whenever possible. If you have no idea what I’m talking about – have a look at the Wikipedia entry for LaTeX to get an overview. The 30,000 feet picture is that it’s a way to produce the most beautiful electronic typesetting ever know to mankind.

Anyway – Stefan and I are embarking to write a fairly lengthy document and neither wanted to use a traditional word processor nor Google Docs or Adobe Buzzword.

We came up with a very nice process which comprises or keeping the .tex documents in a subversion repository, having local automated “builds” on our machines and on commit a Hudson server builds a pdf document from our source files and makes it available on a particular URL.

Yes, it’s basically continuous integration for writing large documents with multiple people, really nice. But anyway – I for my part use Eclipse with a plugin called Texlipse for working with .tex documents and I came across a bit of a tricky, undocument issue:

As mentioned above, the plugin triggers an automated build on my machine, but there’s also an integrated preview (a nice toolbar icon resp. keyboard shortcut). In the plugin’s setup, one can browse to the application one would want to use for the preview (that could be Acrobat Pro, Acrobat Reader, Preview or whatever you’d use).

I browsed to the .app files of all of the mentioned. I even went down to some tex-specific preview tools and couldn’t get them to work. The consistent error message of executing the preview was that the application could not be found. Weird.

It actually took my ages to think of the solution. On OS X a .app file is not the executable, it’s nothing more than a container of files. The browse button in setting up the preview application to be used, doesn’t allow to click INTO the contents of that container, but that’s actually where the executable lives.

What you therefore need to do (in this example to use the OS X built-in preview.app) is to point it INTO the app file.

Instead:

/Applications/Preview.app

use

/Applications/Preview.app/Contents/MacOS/Preview

{ 1 comment… read it below or add one }

Ted February 8, 2010 at 8:57 am

try using /usr/bin/open as the command and

-a “Applications/Preview.app” %file

as the arguments. This setup has a bit nicer behavior for me.

Reply

Leave a Comment

Previous post:

Next post: