# Secret Tools of the Engineering Grad Student, Part 2: LaTeX

If you are going to write a dissertation (or any other paper for that matter) with significant mathematical content, you will discover that the typesetting of your equations proceeds much better if you use LaTeX. While there is a steep learning curve, you will save a good bit of time down the road if you get comfortable with LaTeX (pronounced “Lay-tech”) early on. Here’s an equation for the Fourier transform rendered with this typesetting system:

This equation is created with the following code:

 F(f) = \int_{-\infty}^\infty f(t) e^{-j2\pi ft} dt

As you can probably figure out, mathematical symbols are created in LaTeX with text keywords preceded by a backslash. In addition to the improved typesetting, this means that you can quickly update many equations at once by simply searching for, and replacing, text strings. Thus, if you wanted to convert the above equation to be a function of g, instead of f, a simple text replacement would update all the equations in one fell swoop. Contrast this to the equation-by-equation corrections required if one is using MathType to typeset mathematics inside a Microsoft Word document.

While there are many benefits to using LaTeX, it does take a little getting used to. In particular, you may find yourself trying to control a lot of factors (margins, paragraph spacing, etc.) that are easy to modify in a word processor, but difficult to adjust in LaTeX. In the beginning, don’t worry about trying to control the output; focus instead on getting your equations to typeset correctly. Also, expect to spend some time searching for documentation. While most everything you will want to do has been done already, it sometimes takes a while to hunt down the correct command. (Hint: If you absolutely must play with the margins, use the geometry package.)

Significant time savings occur with LaTeX because templates for most publications types have already been defined. Thus, if I want to publish an IEEE paper, I simply drop my document into an IEEE template. Same paper in ASME format? Simply change to the appropriate ASME template. Need advanced math formatting commands? Use the AMS package. While similar templates are typically available for Microsoft Word as well, I often find myself hunting from paragraph to paragraph in Word, trying to discover why the formating has gone askew midway through the document. This is rarely a problem in LaTeX. And to produce my dissertation? Simply use the appropriate thesis style (your university may have its own format).

On my XP system (yes, I’m a dinosaur), I’ve had good luck using MikTex as my LaTeX implementation. One of the nicest features about the MikTex software (other than it being free) is that, when it encounters a package name it does not have, it goes out on the net and attempts to find the package for you. This has frequently saved me from having to install such code manually. While any text editor will work to generate LaTeX documents, I’ve always used WinEdt. Although WinEdt is not free, I’ve not regretted the \$30 it cost me for a student license, as it integrates quite nicely with MikTeX.

If you are interested in learning more about using LaTeX, there is some decent documentation on getting started available from the LaTeX project site, as well as the WikiBooks site. When you see references to “LaTeX2e,” this simply indicates the current version of the LaTeX program. Similarly, “LaTeX3″ refers to the next generation of the LaTeX software. Learning LaTex is initially frustrating, but you’re an engineering grad student. You’re not the type to choose the easy path. So download the software and give LaTeX a try. I suggest starting with a study sheet of equations for an upcoming exam. You’ll learn how to construct equations without needing to worry about paragraph formatting.

[Hint: Find an equation you like in Wikipedia? Right click on the equation and access the image properties. The associated text will be the LaTeX code used to generate the equation.]

This entry was posted in Research Tools and tagged , , . Bookmark the permalink. Both comments and trackbacks are currently closed.