As mentioned in lecture, use of LaTeX for homework submissions is encouraged. This post will cover the basics on installing and using it and will link useful resources for learning it.
- 1 What is LaTeX? Why should I use it?
- 2 Step 1: Installing LaTeX
- 3 Step 1.5: Installing the 2800 macros
- 4 Step 2: Writing LaTeX
- 5 Step (wait-shouldn't-this-be-before-I-start-writing) 3: Learning LaTeX
- 6 Step 4: Compiling LaTeX
- 7 How do I make _____ in LaTeX?
- 8 I wanna be the very best (at LaTeX)
- 9 Um...no thanks
- 10 Additional Resources
- 11 Getting help
What is LaTeX? Why should I use it?
LaTeX (pronounced LAH-tekh or LAY-tekh, not like an x) is a markup language that produces good looking documents and is particularly well-suited for mathematical and scientific material since it incorporates various symbols and formulas. It can also create fancier things we'll encounter this semester, such as automata and graphs. Knowing LaTeX is a useful skill to have, and will help you produce high-quality homework submissions without the hassle of scanning and uploading huge PDF files.
Step 1: Installing LaTeX
Download and install the distro listed for your OS:
- Windows: MiKTeX
- OS X: MacTeX
- Linux: TeXLive
- Web (non-installation): ShareLaTeX or Overleaf Note: ShareLaTeX does not work with the tex files we have provided; Overleaf does.
Step 1.5: Installing the 2800 macros
To help you get started, we typically distribute LaTeX files for the homeworks on Piazza (in the "resources" section). In addition to the homework files, you also need to have the provided .cls and .sty files in the same directory.
Step 2: Writing LaTeX
- All platforms: TeXWorks, Texmaker, TeXstudio
- Windows only: TeXnicCenter, WinEdt
- OS X only: TeXShop, TextMate
Step (wait-shouldn't-this-be-before-I-start-writing) 3: Learning LaTeX
LaTeX isn't that hard, so feel free to jump in before "learning" it. Like the stereotypical montage in an underdog movie, you will learn what you need in the coming months. That said, below are some well-written tutorials/guides:
See 'Additional Resources' below for more
Step 4: Compiling LaTeX
You need to compile the file you create as a PDF before you submit it on Gradescope. Navigate to your .tex file with your OS command line and enter `pdflatex filename.tex`. The LaTeX distribution should create a pdf file in that directory. Alternatively, the editors mentioned above allow you to generate the pdf directly from their interface.
How do I make _____ in LaTeX?
Following the link for most symbols in this wiki will link to a page with the corresponding LaTeX code (let us know on Piazza if we missed one). You can see Special:WhatLinksHere/LaTeX for a list of all the pages that mention LaTeX, which will include all of the symbols.
The following websites help you easily look up the right symbol:
I wanna be the very best (at LaTeX)
It's fine if you'd rather use Word or scan handwritten work. Modern version of MS Word have decent in-built support for mathematical symbols and equations. However, if you're at all likely to go to grad school or be involved in research, now is a great time to learn something you will unquestionably need in the future. LaTeX is just plain old typing for the most part.
If you wish to ease in to LaTeX, LyX is a document processor that utilizes LaTeX formatting without having you write it directly. It's as easy as it gets, but you'll be faster at writing LaTeX once you have practice, so use LyX for the proverbial dipping of your toe in LaTeX.
Use your preferred search engine, post questions on Piazza, or ask us in office hours. Please keep in mind that questions about course content are necessarily prioritized in office hours.
All credit goes to Divyanshu Tiwari for this post from Fall 2015. Updates from Erik Chan, Jimmy Briggs, Fawn Wong, and Christopher Roman during 2016-2017.