A Brief Introduction to TeX by Susan Niefield, Union College, Schenectady, NY

To Create or Edit a TeX file, use any editor or word processor, but save the document as a text file. All TeX files should be given a .tex suffix.

1. Modes. TeX has six modes: math mode (entered or exited by typing a $), display math mode (entered or exited by typing a $$), and four modes which are used for ordinary typing. Math mode is used for all math symbols (including letters which represent mathematical objects). Display math mode is for displaying formulas. As long as the mode is correct, TeX automatically spaces whatever is typed.

2. Reserved Symbols. The following symbols have special meanings in TeX and cannot be used as usual in ordinary text.

To include (in your output) any of these reserved symbols (other than \), use math mode and precede the symbol by \. For example, type \& to get &. The \ is obtained using \backslash.

3. Styles. The font produced in ordinary mode is ten point roman. To obtain other styles, type \bf for boldface, \sl for slant, and \it for italic. For example, the heading of this section would be typed as {\bf 3. Styles.}. In math mode, since all letters are automatically typed in italics, use \rm to get letters in roman. To change the size of the type, preface the chosen style with a number. For example, \eightrm produces 8 point roman and \sixsl produces 6 point slant. Such a change will also change the proportions of the letters. Another way to change the size of the print is to use one of \magstep1 through \magstep5, which will magnify the original by 1.2 times the number of steps. To magnify the entire document 1.2 times, use the command \magnification=\magstep1.

4. Spacing. Since TeX automatically spaces everything, it is necessary to know how to tell TeX to do anything that is out of the ordinary. For example, if three spaces are typed between two words, the second and third are ignored. So, to actually get three spaces, something different must be done. For each extra space, type \ and leave a space. A thin space is obtained using \, and a negative thinspace using \!.

To leave a specified amout of horizontal space in a line, use \hskip followed by a space and the amount to be skipped in inches (in), centimeters (cm), or points (pt). For example, \hskip 2in will give 2 inches of horizontal space. To center a line, precede it by \centerline.

To start a new paragraph or line, just skip a line in the text. Since the default setting for the start of a paragraph includes a tab, to avoid an indentation, type \noindent at the beginning of the new paragraph. However, to change this default, type \parindent=0pt at the beginning of the document.

To leave extra space between lines, use \smallskip (for a 3 point space), \medskip (for 2 smallskips), and \bigskip (for 2 medskips). To leave a specific amout of vertical space before the next paragraph, use \vskip followed by a space and the amount to be skipped in inches (in), in centimeters (cm), or in points (pt). This is similar to the hskip command described above.

Warning TeX has something called "glue" that produces a professional looking output. If extra space is left at the bottom of a page, all horizontal blank space will "stretch" to compensate. To get around this, use the command \vfill\eject at the end of any page having blank space.

5. Math Symbols. There are special commands for many symbols (see the accompanying symbols page which is also available as a .dvi file). Here are a few more, most of which necessitate math mode.

All Greek letters are typed using \ followed by the name of the letter, and capitalizing gives the capital Greek letter. For example, \delta gives a lower case delta and \Delta gives an upper case delta. The commands \over, and \choose give fractions and binomial coefficients, respectively. The command for the square root is \sqrt and the nth root is \root n \of.

To avoid the italics in math mode, the following commands can be used: \arcos, \arcsin, \arctan, \arg, \cos, \cosh, \cot, \coth, \csc, \deg, \det, \dim, \exp, \gcd, \hom, \inf, \ker, \lg, \lim, \liminf, \limsup, \ln, \log, \max, \min, \Pr, \sec, \sin, \sinh, \sup, \tan, and \tanh.

6. The End. At the end of any document type \end. If the last page is not full, precede this by \vfill\eject.

7. OzTex. To use OzTeX, double click on the OzTeX icon, the lion. To Run a .tex file, use the TeX Menu. The resulting output is a called .dvi file. To View a .dvi file, use the View Menu. To Print a .dvi file, use the Print command in the File Menu.

Good Luck!