Sunday, November 25, 2007

Getting LaTeX to work again in Leopard

LaTeX is essential for the academically right-brained. Leopard broke it. Well, at least indirectly.

Broke? Fonts completely messed up. Simple, yet important, math symbols like asterisk (\ast) and theta (\theta) didn't work anymore.

I tried updating the teTeX distribution with Fink, which is how I originally installed it. That didn't work. Partially because, to my chagrin, teTeX is no longer supported. Also, my Fink seems to be sick thanks to the Leopard upgrade. Fink selfupdate hasn't really worked for me either.

After tinkering a bit more with Fink and Macports (which seemed to require me upgrading to the latest XCode 3.0), I gave up trying to install LaTeX via package manager. I manually installed the latest-and-greatest Mac LaTeX engine: MacTex-2007. That seemed to fix TeXShop for me.

However, it didn't fix LaTeX Equation Editor, which I use for Keynote presentations. The fonts were still all jacked and simple symbols weren't being displayed properly still. What's more, a more complicated version of LaTeX Equation Editor, LaTeXiT wasn't working either. And yes, I changed the location of the executables in the preferences. And yes, I removed the previous installation of TeTeX with Fink.

After some more searching and discovery I figured it out.

According to this page, font caches are being corrupted. Please go ahead and add LaTeX Equation Editor to the list of programs that seem to be screwing up the font cache. Try rebooting. If that doesn't work try running the following commands from the terminal:

sudo rm -rf `lsof | grep | grep Finder | cut -c 66-139`

sudo rm -rf /private/var/folders/*/*/-Caches-/


LaTeXiT should now work. If you start using LaTeX Equation Editor, LaTeXiT will break again. The key solution: don't run Equation Editor ever again. Use LaTeXiT. Please note that other LaTeX programs which are not widely supported may cause the same font problems.


Daniel said...

funny, I experienced the exact same problem with Equation Editor today (half an hour of my precious time to prepare my class gone). I traced the problem quickly to Latex Equation Editor and came to the same conclusion - never use it again and use LatexIt instead (whose interface is nicer anyway ;) )

Anonymous said...

Joe, thanks a lot for your post. You saved my a## :-). Although: the cut -c was not exactly doing it's job on my machine, the length seems to be different... I also uninstalled latex equation editor, downloaded latexit and I am good again. Thanks a lot!

Anonymous said...

I have been having problems with the LaTeX fonts for a couple of years, starting when I installed Keynote 2 either under Jaguar or Panther in 2005. LaTeX Equation Editor became completely unreliable and so did my Keynote presentations and even Preview on a downloaded pdfs from Wiley.

The problem apparently disappeared when I installed Tiger, and I had almost forgotten it after my recent upgrade to Leopard, including Keynote 3. Everything was working smoothly until I opened a couple of old presentations which unintendedly started Keynote 2 (which I never uninstalled till now). Fonts were broken everywhere and i had to restart the machine to get everything working.

Opening the old files with Keynote 3 worked smoothly, so I have now:

1) Uninstalled Keynote 2

2) Uninstalled LaTeX Equation Editor

3) Crossed my fingers

I hope everything keeps on running properly now. It apparently does, so far, with LaTeX-iT, Keynote 3, TeXShop and Preview.

Anonymous said...

With regard to the story I posted yesterday, I meant Keynote 4 where I wrote Keynote 3, of course. Sorry for that :-)


Anonymous said...

After many hours spent to find a solution for Latex Equation Editor corrupted fonts, I found your solution the only one that resolve the problem once for all!


Asended said...

I experienced the same problem. And even without using Equation Editor (I'm using LatexIt instead) the fonts work randomly.
Please help me.

Anonymous said...

Thank you so much for this post. I have been using equation editor for some time now and recently used it for my keynote presentation of my dissertation defense. I installed leopard over the holidays and was updating my talk for an upcoming interview when surprise surprise I could not even type \alpha. I was in a complete panic until your post. This is a life saver.

Anonymous said...

You're my god....thanks for the great hack to get this thing working again!

Anonymous said...

Thank you so much for this tip. I was desperate for preparing my PhD defense.