Friday, November 16, 2007

Many TeXnicalities

So it has been a while since my last post. Life has been busy.

Specifically I spent most of last weekend dancing and all of this week working. Starting at about 3:00PM on Friday, November 9th and lasting until about 8:00PM on Sunday, I was doing some form of dance. It started with about an hour of Swing practice with Sarah for another showing of our Aladdin piece followed by the actual performance of it at 5. After that I had an hour of free time before Ballroom practice. You see, there was a competition Sunday, so every free moment I could find was spent meeting with partners.

After that, rather than take the smart route out and go to sleep, I made the long trek over to Machado for about three hours of... dancing.

Saturday was similar. I was meeting with ballroom partners up until it was time to prepare for the one and only SexPowerGod. While that may not have been purely dancing per se, it was most definitely tiring. After that, I had two hours to shower and change into something halfway respectable for the Brown Ballroom Competition for which I had to leave at 5:30AM. Being the largest single-day ballroom comp on the east coast, it went for a while and took the last bits of energy out of me until I could not even successfully point a video camera at stationary dancing couple.

My exhausting weekend aside, this post is about the glories of LaTeX. I picked it up sometime last year when CS22 suggested that all homework be done with it and have become so hooked on it that I almost wrote a $ before a mathematical equation in class today.

For those of you who don't know it, LaTeX is what you would turn to if you feel that word processing should be a subset of programming or feel the need to use Emacs for all aspects of their lives (I added music player to that list last night). Rather than pressing Ctrl-B to make text bold, you would write something like this:

\textbf{Bold text!}

The main point of this post is to gush over two related discoveries I recently made regarding LaTeX and Emacs. They are WhizzyTeX and Active-DVI.

WhizzyTeX is a minor mode for LaTeX editing in Emacs which opens an external viewer to mirror changes made to the source file in real time. So as you type, the dvi file gets update, AUTOMAGICALLY! For plain text this is not that big of a deal, but for complicated mathematical expressions or manipulation of parameters to get a look right, this cuts down on the edit-compile-review loop which can suck time away from creating masterful works. It also has the benefit of real-time error checking beyond what AucTeX already provides, so it can catch mismatched braces or unrecognized control sequences as you (mis-)type them. It is kind of like what I think flymake is like (I have never actually used flymake, so I don't know for sure). Finally, it has some fancy features which depend on Active-DVI (advi) like mouse-editing of LaTeX documents, such as dragging a control to size an hbox. Neat, but not often used.

Advi is like xdvi on steroids. It is a viewer as well as a document style for making snazzy presentations. Seriously, check out some of the stuff on the site. It can embed videos, launch external applications, and even embed those applications in the same window as the presentation, so you could potentially run Emacs within a dvi or even run advi within itself recursively! The possibilities are endless.

Unfortunately I have not had to make a presentation any time within the last couple years, so it is unlikely I will get to take advantage of all of that sweetness, but it is cool to know it's there.

My only gripe so far is that WhizzyTeX necessarily opens a new window for the preview. I have the screen real-estate, but it would be nice not to have to leave Emacs for anything (soon I'll have email in there as well). I did some searching for the possibility of embedding an X11 application within an emacs buffer (like how it displays pictures, but again on some fat 'roids). That way I could have advi sitting in an Emacs buffer and put that in a separate window from the source and have all of that wonderful interaction. I did some searching but was unable to find anything suggesting that this is possible. If anyone knows anything about it, please let me know. My X11 hacking skills are insufficient to just do it myself, so that's out.

Anyway, I'm off to TA CS31. Get more sleep than I did this week!