## Saturday, May 17, 2008

### There's something about LaTeX...

... that makes writing documents fun! It might have something to do with the fact that even with the default settings, the output looks awesome. For a guy whose document-writing experience has been limited to OpenOffice.org and Microsoft Word, the whole thing feels very liberating.

That's another thing: when I make a document in LaTeX, I'm free to use whatever editor I like. MS Word's interface is a mess (2007 perhaps less of a mess), while the load time for OO.o is excessive to the point where I hesitate to open anything that would load it. No more of that crap. From here on, it's Emacs and AUCTeX for me.

The biggest hurdle is rustling the tools together. I use Ubuntu Linux and Emacs already. First thing was to install texlive from the package manager, which installs the tools you need. To integrate with Emacs, just install auctex along with it.

Keys are simple enough: C-c C-c to process/view your document, C-c C-p C-b to generate inline buffer previews for headings and formulas. I'm sure there's more, but I easily use these two key chords more than any other when working with LaTeX docs in Emacs.

LaTeX itself isn't difficult. Here's a simple document:
\documentclass{article}% lol preamble (doesn't appear directly, just informational)\title{The many ways to skin a cat}\author{Some dude}\begin{document}% here's where the fun begins\maketitleNormally, cats aren't the sort of thing you'd even considereating.  But if you're running low on supplies and money hasbeen exhausted, you may be left with no other option that toconsider making the inedible, well, edible.I can break these damn lines up however I want.This is on the same paragraph as the line above.Only empty lines separate paragraphs.I    can type like    a moron, because   like in HTMLthe whitespace in a   paragraph is collapsed intosingle spaces.\end{document}

Making a final PDF is simple too. If you process your document as above, you already have "blah.dvi" derived from the "blah.tex" you were editing/viewing. I already have dvi2pdf available from a command prompt (which I also run in an Emacs buffer using M-x ansi-term), so just run that DVI through that program and a shiny new PDF is created with your doc. Pretty swanky.

And to think there was a day when I thought this kind of stuff was impenetrable.