Suppose you want to write down some mathematics. How do you do it?
1. Option 1: by hand
This method is recommended for CS202 assignments.
- Advantages
- Don't need to learn any special formatting tools: any symbol you can see you can copy. Very hard to make typographical errors.
- Disadvantages
- Not so good for publishing. Results may be ugly if you have bad handwriting. Results may be even worse if you copy somebody else's bad handwriting.
- Example
2. Option 2: LaTeX
This is what I use for writing papers.
- Advantages
- Very nice formatting. De facto standard for mathematics publishing. Free.
- Disadvantages
- You have to install it and learn it. Can't tell what something looks like until you run it through a program. Cryptic and uniformative 1970's-era error messages.
- Example
The text above was generated by this source code:
\[ \sum_{i=1}^n i = \frac{n(n+1)}{2} \]
although a real LaTeX document would also include some boilerplate around it.
You can find many introductions to LaTeX at http://www.latex-project.org/guides/. LaTeX runs on the computers in the Zoo, and can be made to run on just about anything.
There are front-ends to LaTeX like LyX that try to make it WYSIWYG. I don't use any of them personally.
3. Option 3: Microsoft Word equation editor
This is probably a bad habit to get into.
- Advantages
- There's a good chance you already type things up in Word.
- Disadvantages
- Ugly formatting.
I don't use Word much, so no example.
4. Option 4: ASCII and/or Unicode art
This is the method used on most of the pages on this wiki.
- Advantages
Everybody can read ASCII and most people can read Unicode. No special formatting required. Results are mostly machine-readable (e.g., trying copying the ∑ symbol to the search box above and see what pages contain it).
- Disadvantages
- Very ugly formatting. Writing Unicode on a computer is a bit like writing Chinese—you need to learn how to input each possible character using whatever system you've got. May render strangely on some browsers.
- Example
- sum[i=1 to n] i = n(n+1)/2 (ASCII) or ∑[i=1‥n] i = n(n+1)/2 (Unicode).
Or a fancy version:
n n(n+1) ∑ i = —————— i=1 2
Amazingly enough, many mathematics papers from the typewriter era (pre-1980 or thereabouts) were written like this, often with the more obscure symbols inked in by hand. Fortunately (for readers at least), we don't have to do this any more.