LaTeX Guide

You’re welcome to produce your homework PDF in various ways: $\LaTeX$, some other word processor, or neatly handwriting and scanning. We strongly advise using LaTeX. Here’s why:

• LaTeX documents are beautiful and a joy to read.
• LaTeX is ubiquitous across mathematics and the sciences, so learning it is a sound investment.
• Many past CS 170 readers believe that LaTeXed solutions tend to be correct more often.
• CS170 is typically the class where students take time to learn LaTeX, which is a valuable skill to have.

General Homework template: homework_template.tex

If you would like fancier style, use the cs170.sty file. You can just include it as the same folder as your TeX file and include the line \usepackage{cs170}.

To get started, you’ll need a LaTeX editor, on which you write LaTeX code and compile it to PDF:

Now, to start creating LaTeX documents using your editor:

Alternatively, LyX is a version of LaTeX with a GUI. It feels more like the “what you see is what you get” experience of a traditional word processor, while still producing the same beautiful output as raw LaTeX. Here are some tutorials that cover the most basic to slightly advanced LaTeX:

If you get stuck, StackOverflow may be one of your best friends. If you know of other helpful guides or resources, post those too. Happy $\LaTeX$ing!

“Every time I read a LaTeX document, I think, wow, this must be correct!”

— Prof. Christos Papadimitriou, CS 170 Spring 2015