LaTeX Notes 2010
Homework 5 is affectionately labeled, the LaTeX homework because you are required to turn in solutions generated from a LaTeX source. LaTeX typesets documents beautifully. This is a fantastic opportunity to view that beauty firsthand. I hope most of you will continue to use LaTeX for the rest of the course and the entirety your computer science and mathematics careers.
LaTeX is a document preparation system. It is a set of macros built around the gorgeous TeX typesetting system created by our computer science grandfather Donald Knuth. It espouses the philosophy of separating content from layout. In other words, worry about what you want to present and let somebody else worry about how to present it. There are many good introductions to LaTeX on the web. My personal favorite is the Not So Short Inroduction to LaTeX2e.
Users of LaTeX first create a TeX source file (most indicate this with a .tex extension) which is the primary editing document. The source file is latexed into a device independent file (labeled .dvi) which is easily converted to a number of popular document formats. Here's an example:
- Download the homework 5.
- Latex the document by running latex hw.5 on the command line.
- This produces a device independent file (among other files) called hw.5.dvi.
- You can view the dvi file in X by using xdvi
- You can convert the dvi file to postscript by using dvips -o hw5.solutions.ps hw5.solutions.dvi or to pdf by using dvipdfm.
- You can skip all the DVI mumbo-jumbo by using pdflatex instead of latex. That is, typing pdflatex hw.5 on the command line will yield hw.5.pdf directly.
- I use TeXShop on the macintosh for all my TeX editing.