First you will notice that some text is in red. These are comments that do not compile and are set off by starting the line with the percent symbol "%." The comments I have in the sample file should explain much about these commands, but I'll repeat them here.
Everything before the command
\begin{document}is called the preamble and sets up the behavior of your document. I have comments explaining everything in the preamble, but let's look at a few.
\documentclass[12pt]{article}This sets up your document as an "article" with 12 point font.
\usepackage[top=1in, bottom=1in, left=1in, right=1in{geometry}This is a package to set up your margins.
\usepackage{amsmath} \usepackage{amssymb,latexsym} \usepackage{amsxtra} \usepackage{wasysym}These are packages for various mathematics and other symbols.
\usepackage{amsthm}This sets up nice theorem, definition, and example environments.
\usepackage{graphicx}This allows you to easily include graphics and labels in your document.
\usepackage{setspace} \onehalfspacingThis is George Greenwade's package. You can set spacing to be one-half or double using commands right here in the preamble (like \onehalfspacing).
\usepackage{verbatim}Likely you will not need this unless you make LaTeX handouts. This allows you to include LaTeX commands in your document (as text) that do not execute. I use this to show you what LaTeX commands to type.
\usepackage{arcs}You only need this if you are creating notation for arcs in geometry.
You can include all of these in your LaTeX documents until you get good at controlling your own documents.
\theoremstyle{definition}This sets the style for proclamations (theorem, example, lemma, etc.) I like "definition."
\newtheorem{definition}{Definition}[section] \newtheorem{example}{Example}[section] \newtheorem{theorem}{Theorem}[section] \newtheorem{proposition}{Proposition}[section] \newtheorem*{fact}{Fact} \newtheorem{corollary}{Corollary}[section] \newtheorem{lemma}{Lemma}[section]These set up your declarations. For example, the first one writes "Definition" and the section number after you begin a definition. This helps with automatic numbering. The fifth one, with a "*" after it, writes "Fact" after you begin a fact, but the "*" causes it to not have a number. You can put "*" after any one of these if you do not want numbering.
\newcommand{\df}{\displaystyle \frac} \newcommand{\dlim}{\displaystyle \lim} \newcommand{\dint}{\displaystyle \int}The first defines the shortcut "df" to mean "\displaystyle \frac" It is simply a typing convenience.
\begin{document}and ends with
\end{document}In between is where the magic happens.
A new window should open with a PDF file of the document. This is where you really learn LaTeX. You look at the finished document, and go back to the *.tex file to see what commands created it. There is a lot to take in, but it is a great way to learn. The "Stoudt Sample Document.tex" has most of the math and typesetting you will need in undergraduate mathematics.
Back to Dr. Stoudt's home page.