Basic LaTeX

From Advanced Labs Wiki
Revision as of 13:44, 1 February 2012 by Tobias Marriage (talk | contribs)
Jump to navigation Jump to search

This tutorial is a "getting started" document. The TAs will give a more in depth tutorial with realtime feedback etc in the third week, before the first reports are due.

LaTeX is a documentation system in which you specify content and, for the most part, you let the LaTeX system deal with the formatting. It's a bit like a mark-up language (e.g., Hyper Text, which is used to create web pages). The general procedure for creating a document with LaTeX is to create a file (call it report.tex) with the content and special markers indicating things like sections, tables, figures, mathematical symbols, etc, and then you process this with a LaTeX formatter. (Many times you have to run the formatter twice in order to resolve cross-references in the document). LaTeX formatting programs are available freely for Linux/Unix, Mac, and Windows operating systems.

Linux. Open a terminal and, in the directory with your report, execute "pdftex report.tex". This is usually enough to generate a report.pdf under Linux.

Mac. For OSX, I like TeXShop. It has a graphic interface. Under the "Typeset" menu, select "Pdflatex". You enter your "report.tex" in their editor window and press "typeset" in order to generate a pdf.

Windows. Several editors exists. We used WinEdt last year and this worked well.