LaTeX (pronounced "lah-tek") is the most commonly used variant of TeX, a mathematical typesetting system. It is used by mathematicians, engineers, and many other scientists to produce nice-looking mathematical text. On this page you will find resources for getting started with LaTeX. LaTeX takes a bit of effort to learn, but the effort pays off as ultimately it is much easier to use than an equation editor or other system not designed for mathematics.
To write a LaTeX document, you do not use Microsoft Word (or any other word processor). Instead, you use a text editor, preferably one that comes with your LaTeX installation. A LaTeX document consists of three basic parts: a header (which includes formatting commands), natural language text (e.g. English), and mathematical text. The mathematical text is integrated into the English text but is placed either between dollar signs or other symbols representing the start and end of an equation. There are special commands which produce the various mathematical symbols. A LaTeX document is saved with a .tex extension and is then compiled to produce a pdf.
Here are ways to use/install a LaTeX system for yourself:
- LaTex is already installed on the computers in the Math/Stats department. (Find TeXShop under Applications)
- MacTeX (the system for Mac computers)
Note: Be sure to use the program TeXShop and not LaTeXIt (which also comes bundled with MacTex) You may have to change your settings to ensure that files with the .tex extension open in TeXShop.
- TeXStudio is another LaTeX installation which some people (especially CS oriented types) prefer as it includes features for easier typing.
- proTeXt (the system for Windows)
- other options for installing it on your own computer.
- You can also use LaTeX on the "cloud": for example, ShareLaTeX. Also note that these systems are designed for people collaborating on research papers. You should not share LaTeX code with your classmates. A former MA 274 students writes, "I really liked [ShareLaTeX]. It has a similar user interface to Google Drive and also has a SUPER clear and convenient how-to guide that explains how to do different things in LaTeX and will even open examples of actual code with comments explaining what each step does. You can use the guide even if you don't make an account with the editor, which I actually ended up using a bunch before switching to editing in this program from TexStudio. ShareLaTeX is really useful for those who work the desks in the libraries, since they recently banned personal laptop use at the info desks."
Here are resources to help you write your own LaTeX documents:
- Here is a template for getting started. It consists of two files, which need to be in the same directory on your computer. Save them to a folder on your computer. Don't attempt to open these files in a web browser, use your LaTeX installation. Here are the two files:
- The header file (named LaTeX-header.tex). This file contains special information used by LaTeX when it compiles your document. You don't need to ever edit it (or even open it), but you may do so if you wish. You would edit this file if you want to use a special package or change what font is being used or create new theorem-like environments. At some point you should read the contents, so you have some idea what it's doing.
- The template file (named LaTeX-template.tex). This is a sample HW file. After downloading and reading its contents (in the LaTeX distribution) you should attempt to compile it. If you can't get it to produce a PDF (as below), seek help from me or the TAs. Once you have it working, you can rename it and change its contents for your own purposes.
- When you compile the template file, you should get a PDF that looks like this. You may need to compile it twice to get the internal references to show up.
- The Not So Short Introduction to LaTex. A very useful manual. But you don't need to read the whole thing.
- Can't find the symbol you want? Try Detexify. You can draw the symbol you want and it will tell you the command. You can also look through the entire list of symbols.
- The wikibook LaTeX is also very good.
- Also, remember that Google (or other favorite search engine) is your friend. If you're having a problem, search the web for the answer. Perhaps your answer will be found on StackExchange.