Filed under: Software, Education
Using LaTeXiT to display math formulas
TeX is a typesetting standard that, among other things, allows you to typeset complex math formulas. One flavor of Tex is LaTeX, for which LaTeXiT serves as a front-end for on Mac OS X. Using LaTeXiT, one can drag and drop complex math formulas to a number of apps -- Pages, Keynote and TextEdit, to name a few.
While the LaTeXiT workflow is fairly simple and straightforward, getting it setup and running may not prove to be the most clear-cut and easy process.
To get started, download the latest version of LaTeXiT (free download). However, because proper functionality requires several other components, they will need to be installed as well. These components are:
- pdfLaTeX
- ps2pdf
- Ghostscript
PdfLaTeX and ps2pdf are part of the BasicTeX package, while GhostScript is a separate installation package. Luckily, Richard Koch of the University of Oregon Mathematics Department has download links (free) to both packages readily available at his site. After installing the packages, you'll want to configure their paths within the composition pane within LaTeXiT's preferences. The following were the paths of my configuration files:
- pdfLaTeX: /usr/texbin/pdflatex
- Ghostscript: /usr/local/bin/gs-X11
- ps2pdf: /usr/local/texlive/2008basic/bin/universal-darwin/pst2pdf
The two most prominent palettes in LaTeXiT are the LaTeX palette and the viewer/editor palette. Clicking on a symbol, number, letter or notation within the LaTeX palette will result in the corresponding markup appearing within the editor pane of the viewer/editor palette. When the markup of your formula is complete, clicking on the "LaTeXiT" button on the bottom right will produce said formula in the viewer, which is drag-and-droppable across a variety of apps.

In my case, I'm dragging and dropping a formula into Mail.app.

But if you happen to know the markup by heart (for which SmileOnMyMac's TextExpander would be a great timesaver), you can type it within an app and convert it into a formula via OS X's system wide "Services." Here, I'm performing this function within Pages, but can perform it with other apps as well.

LaTeXiT's other features include support for OS X's Automator as well as a host of export formats, including pdf, eps, tiff, and jpg.
A number of other LaTeX front ends are available on the Mac as well -- such as TexShop and TextMate. However, as someone who wasn't too familiar with LaTeX and all of its underpinnings, I found that LaTeXiT provided an easy learning curve as well a good foundation from which I could build upon. After playing around with the markup and its structure, you get the hang of it pretty quick.
(Readers, what is your favorite LaTeX front end for the Mac? A mathematician or physicist I am not, so if you know of a more hassle free setup process for a LaTeX front end, give us your thoughts.)

![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 2)
Peter said 8:34AM on 8-18-2009
TexShop : http://www.uoregon.edu/~koch/texshop/
Reply
bkenney said 8:41AM on 8-18-2009
I love LaTexIt. Very useful. I've been using it for about 2yrs now, mostly for presentations where I can just drag and drop equations into powerpoint. It's essentially a replacement for equation editor but it's not meant to compete against a front end like TexMaker which is for writing documents.
Reply
Barron said 8:49AM on 8-18-2009
The best way to get all the LaTeX dependencies, get LaTeXIt, the wonderful BibDesk, and the best TeX front-end around, TeXShop, is with MacTeX: http://tug.org/mactex/
Reply
gittenlucky said 8:51AM on 8-18-2009
I love TexShop. It is great for engineers and never crashes. I was sick of using MS Office and having files crash after I input a few equations (I'm on a newer, loaded MBP). I highly recommend it for anyone that wants to forget about all the hassles that go with formatting. It is a good replacement for Powerpoint and Work.
Reply
hadesmex said 9:29AM on 8-18-2009
I prefer TexMate. Its LaTeX bundle works very nice
Reply
Richard Brooks said 9:29AM on 8-18-2009
You may not realize it but OS X already has some degree of built in support for equation editing through the Grapher application residing within the Utilities folder.
Bring up the Equation Palate and start typing what you have to type. The arrow keys are good at navigation the equation to put what you want where you want. When you're all done, highlight the whole thing and copy/paste into Pages/Word. The program is smart enough to turn the equation into an image if the copy/paste isn't within the Grapher application. If it's something that can be graphed, great, you have a graph of it too.
Reply
R2B2 said 9:22PM on 8-18-2009
Wow, that's a really great tip... thanks Richard!
Stephen said 9:37AM on 8-18-2009
LaTeX is great. Any time I run into someone using Word I try to convert them. It is so nice to be able to write something and have the program do exactly what you want it to do rather then what it thinks you want it to do. While you will have to invest some time to learn LaTeX, it will definitely save you time in the long run.
Reply
vivek venugopal said 9:44AM on 8-18-2009
Textmate is by far the best front end for Latex. Combined with BibDesk, LateXiT, OmniGraffle your Latex-ing setup is all setup and good to go :)
Reply
Rafe H. said 10:30AM on 8-18-2009
Yep, LateXit and OmniGraffle are must have.
Rafe H. said 10:34AM on 8-18-2009
Another great thing about LaTeXiT - you can set the font size and color, which guarantees you match the surrounding text in your document. Try that with MS Equation Editor.
Reply
David said 10:37AM on 8-18-2009
It's amazing how LaTeX has such long legs. I used it to write most of my papers in grad school, along with my theses (by embedding the formatting commands directly into a text file using Emacs). That was from 1988-1994!
Reply
Christopher said 12:25PM on 8-18-2009
I've never used LaTeXiT, but I have used MathType, and have been very happy!
Reply
Sriram said 12:45PM on 8-18-2009
LaTeXit works best for small snippets of math in a larger document: for example, inserting equations into presentations or figures drawn in Omnigraffle. For full length tex documents, Kile (it comes with KDE) is the best. There are hints to install Kile on OS X at MacOSX Hints, but I haven't been successful. Among native OS X apps, TeXShop and Aquamacs Emacs work fine for me
Reply
Mah said 1:07PM on 8-18-2009
We really need a TeX IDE like Kile (Linux) or TeXnicCenter on Mac OS. Document browser, code folding capability, code completion and bibliography lookup are more or less missing from the Mac TeX editors. Consequently, it is difficult to work on a large project (say a PhD thesis) we the available tools. I write in TeXShop but manage the project with Kile on my old laptop.
Reply
Piet van Oostrum said 3:58PM on 8-18-2009
I always use Emacs to edit my LaTeX code, as well as almost all other text stuff and programming.
Reply
Kris said 1:39PM on 8-18-2009
I just use Grapher and copy and paste my equations into programs from there. It's simple and built right in to OS X!
Reply
David V. said 1:52PM on 8-18-2009
A nice feature of LaTeXiT is that it "round-trips". E.g., if you copied a LaTeXiT equation in Keynote and later review the Keynote document to change the equation, you can drag the equation back into LaTeXiT and it will reproduce the TeX source for the equation — it's then trivial to edit as needed.
Reply
Ben said 2:31PM on 8-18-2009
Am I the only one that uses TextMate?
Reply
rscott said 4:20PM on 8-18-2009
LaTeX does indeed have loooooooong legs!
My favorite front end for LaTeX is TexMaker; I think it is also most Mac-like. TexShop is also a fine front end.
I use LaTeXiT to generate formulas to include in eps graphics that I create with a combination of Mathematica and Illustrator. Works great!
The two best features of LaTeX are
1. It is absolutely free!
2. It never, and I mean never, crashes, freezes or causes any other problems on the Mac.
Randy Scott
Santiago Canyon College
Reply