Introduction to LaTeX for CS4252

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. All LaTeX document files should end with the suffix ".tex".

One easy way to generate a nice-looking LaTeX file is to follow these steps:

  • Log into your cunix account.

  • Transfer the above file sample.tex into your account.

  • At the cunix prompt, type "pdflatex 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.pdf" in the directory that contained sample.tex; the pdf file should look like this. (You may also have some other files with names like sample.log and sample.aux; don't worry about those.)

    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.

    Back to main page for CS4252