# Technical Typesetting in LaTeX

 Donald Knuth developed TeX (pronounced "tech", with the “ch” as in the Scottish “loch”) in the 1970s to enable mathematicians, computer scientists, and scientists to produce beautiful documents that include equations. LaTeX is a popular extension to TeX that provides a higher-level user interface, allowing authors to focus more on the content of the document and less on formatting nitty gritty. TeX and LaTeX are free and there are implementations you can download to run TeX/LaTeX on essentially all computing platforms. Besides the clean output, an advantage of LaTeX is the seamless way you incorporate mathematics in the text, without leaving your editor. Here are two examples: $m \frac{d^2 x}{dt^2} + kx = 0$ \newcommand{\pdd}[2]{\frac{\partial^2 #1}{\partial #2^2} $$\nabla^2 \psi = \pdd{\psi}{x} + \pdd{\psi}{y} + \pdd{\psi}{z} = 0$$ 

## Getting TeX

 Download and install TeXLive from MacTeX. This will install all the standard TeX files, as well as some easy-to-use front ends. Try TeXShop and TeXworks to see which one you prefer. Both have lots of menu and template support to get you up and running in a jiffy. Other editors are more powerful. Aquamacs is a free port of GNU Emacs to OS X. It includes AUCTeX, which allows you (after getting everything set up) to see figures and equations typeset within the text editor, which can be nice when working on long documents. TextMate is another popular alternative, which appears to have a free academic license for non-commercial use. Both of these rely on an external PDF viewer. Skim seems to be the current viewer of choice. It is free. For including equations into graphics and presentations, you'll appreciate LaTeXiT (already installed via MacTeX), which incorporates LinkBack technology to allow you to double-click the embedded equations to re-edit them. MikTeX is a popular free implementation of TeX on Windows that you use in conjunction with a text editor. TeXnicCenter is a feature-rich integrated development environment (IDE) for developing LaTeX documents on Microsoft Windows (Windows 9x/ME, NT/2000/XP) freely available under GPL. Many people like the shareware program WinEdt, which has many powerful and convenient features for linking with MikTeX. Linux distributions generally have TeX installed. Emacs is perhaps the editor of choice, although I'm sure there are some fans of vi, or its progeny.

## Resources

There are many fine resources online for learning LaTeX.

Additionally, the Comprehensive TeX Archive Network (CTAN) provides a treasure trove of up-to-date TeX and LaTeX information and sources.

If you are hunting for a symbol, try the Comprehensive LaTeX Symbol List.

If you would like to use LaTeX to prepare a presentation (as in, you are looking for a TeX alternative to PowerPoint), I recommend looking into the beamer package, which is installed automatically by recent versions of teTeX.

## Tips and Tricks

• To type single and double quotation marks, use the back-quote key () for left marks, and the regular apostrophe (') for right marks. Use two of each ( and '') for double quotation marks.
• Use a tilde (~) to type a non-breaking space, especially to prevent a number from being separated from its unit: 3~mm
1. Copy all the text at the start of your working LaTeX source file that appears before the \begin{document}  line to a new file, and save it. Call it something like myfmt.tex
3. Type the command pdflatex -ini and press return.
4. At the prompt, type &pdflatex myfmt.tex\dump and press return.
6. Go back to the original source document and comment out all the selected lines (all the lines before \begin{document}) by starting each line with a percent sign.
7. Go to the top of the file and add the first line:  %&myfmt
8. You may have to enable parsing of the first line to get your TeX implementation to take advantage of this precompiled format file. To do so in TeXShop, open up the preferences dialog and select the Engine tab. In the box for pdfTeX program, LaTeX Program, enter the command pdflatex --shell-escape -parse-first-line`