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:

- If you want to write and compile on your own local machine, LaTeX Wiki/Installation have installation instructions.
- If you want to avoid local installation, try Overleaf. Register with your Berkeley email to get a free Professional account.

Now, to start creating LaTeX documents using your editor:

- LaTeX Wiki/Basics provides gentle introductions and minimal examples.
- Find out how to write any symbol in LaTeX using Detexify or Mathpix.

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:

- https://www.overleaf.com/latex/learn/free-online-introduction-to-latex-part-1
- https://www.overleaf.com/latex/learn/free-online-introduction-to-latex-part-2
- https://www.overleaf.com/latex/learn/free-online-introduction-to-latex-part-3

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