Introduction to LaTeX for CS4236
LaTeX is a powerful tool for creating documents that contain a lot of mathematical
symbols, equations, etc. It may seem a little strange at first, but you'll soon
be proficient at making and editing simple LaTeX documents. Some of you may
end up thinking that proficiency in LaTeX is the most valuable thing you got
from this course!
The easiest way to get started in LaTeX is to take someone else's LaTeX document
and modify it.
Here is a sample document, called sample.tex, that you can begin with:
sample.tex
To generate a nice-looking LaTeX file, follow these steps:
Log into your cunix account.
Transfer the above file sample.tex into your account.
At the cunix prompt, type "latex sample.tex". If the file sample.tex contains syntax errors
(it shouldn't, at least at first),
a (hopefully) self-explanatory error message will pop up; it will
identify the line number of sample.tex where things went wrong, which should help to
fix it.
You now should have a file "sample.dvi" in the directory that contained sample.tex.
(You'll also have other files sample.log and sample.aux; don't worry about those.)
You may be able to view this file by typing "xdvi sample.dvi". If not, you can
create a postscript file "sample.ps" from "sample.dvi" by typing "dvips sample.dvi -o sample.ps"
(this may take a while the first time you run it, but should be faster for subsequent
runs).
You can then create a .pdf file by typing "ps2pdf sample.ps sample.pdf".
The postscript file should end up looking like this
and the pdf file should look like this.
There are many good sources on the Web for finding out more about LaTeX;
here is a link to one of them. A Google
search for "latex tutorial" will turn up many more.