A fix for LaTeXit under Leopard
Astronomical Software, LaTeX, MacOS X Annoyances March 8th. 2008, 5:02pm[A better fix to this problem is to upgrade to LaTeXit 1.15, which was released on April 16, 2008. It fixes the problems with Leopard and allows you to keep the default /etc/profile file for Leopard.]
Apparently, LaTeXIt, which I use to generate equations with Latex which can then be copied into Apple’s Keynote and Pages documents, locks up on launch a vanilla install of Leopard. This post on MacOSXHints.com provides a hack, but it wasn’t that nice, since it involves re-installing a particular version of latex. It turns out the solution was really much simpler and shows up in the comments on that page. In the comments, user Paolo Bosetti notes that
There is actually a much easier workaround: simply change your
/etc/profilecommenting the following lines (add the “#” at the begining):
# if [ -x /usr/libexec/path_helper ]; then # eval `/usr/libexec/path_helper -s` # fi
and adding the following two:
PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/local/bin:/usr/X11/bin" export PATH
Why so? Apple changed the Leopard way to set thePATHvariable, and now it uses the/usr/libexec/path_helpercommand, which seems having troubles with LaTeXiT spawned bash scripts. If you make this modification to your /etc/profile, you are simply dropping the new path_helper in favour of the plain old way to set thePATHvariable.
This also explains why I wasn’t seeing this on my laptop, since it kept the old /etc/profile file during the upgrade.
Another user comments that the fix could also be done without hacking the /etc/profile but instead just changing ~/.profile such that /opt/local/bin appears in the path last, since /usr/libexec/path_helper is supposed to read ~/.profile. However, I was unable to get this approach to work.









March 24th, 2008 at 4:56 pm
that was helpful; but is not the right way to do it. you can read in here how path_helper actually works, and you will see how to fix it without breaking other things (namely, your fix broke textmate’s latex in my computer): just add a new text file under /etc/paths.d/ that includes the paths you want added, one per line. that fixes latexit, and does not break any other program.
March 24th, 2008 at 6:07 pm
Thanks for that piece of advice. I will note that when I execute
/usr/libexec/path_helper -s, the process hangs. This may be the issue that LaTeXit is having. I tried adding a/etc/paths.d/macportsfile containing the path/opt/local/bin, but/usr/libexec/path_helper -sstill hung. I’ll let you know if I do manage to get this to workMarch 25th, 2008 at 9:17 pm
[...] am having an interesting problem. In my last post, I noted that on some Macs with Leopard installed, deactivating the lines calling [...]
April 16th, 2008 at 10:57 am
[...] the results into programs like Keynote or Pages. It was not fully compatible with Leopard and my fix was a kludge that could break other programs. Pierre Chatelier has released updated LaTeXit to version 1.15.0, which restores Leopard [...]