Structural Commands
The following list of commands are those used in the creation of the file
number.tex. They come in 3 types:
-
Commands that appear only in the "preamble" or "topmatter" of the article that you will
not need to think about again if you create yourself a personalized template such as
template.tex.
-
Commands that appear in the LaTex environments discussed.
-
Commands used to control the structure of your document that are not of the
first two types.
\author:
In the top matter, after the title include the command \author{...} where
you put you name in the braces. In the case of the AmS-LaTeX document class
amsart the general form is \author[...]{...} where you can include an optional
shorter version of your name (with only initials on on the first and/or middle names) to
be used as a running header.
\bibliography:
This command applies when using the program bibtex for generating
bibiliographies. One must create a file (number.bib in our case), called the
"bib file" that contains the information for the citations.
The command \bibliography{number} has a single argument as you can see which is
the name of your bib file. Do not put the extension .bib in the argument -
only the root name.
\bibliographystyle:
This command applies when using the program bibtex for generating
bibiliographies and should follow the command \bibliography{...}. This
command has a single argument that specifies the bibliography style to
be used. The most common is "plain" in which case you use the command
\bibliographystyle{plain}. Consult Lamport or Mittlebach for a discussion of
other styles.
\caption:
If you are importing a figure into a LaTeX document using the
figure environment and you want to put a caption on it, you
use the \caption{...} command. The label for the figure to cross-reference
must be put next to the \caption command, not the \begin{figure} command. Thus the
full syntax for the caption command is \caption{...}\label{...}.
\cite:
In the source file when you need to make a reference to an article, book etc.,
you type \cite{...} and in the argument you type the label that you used for that
particular citation in the .bib file.
\date:
If you omit this command in the topmatter then the default is \today. If you want to
put a specific date then type it in the argument to \date{...}. If you do not want
a date then type \date{} with the argument empty.
\documentclass:
This is always the first line (command) in any LaTeX file. It has one mandatory
argument (in braces) and a place for optional arguments (square brackets). The
general syntax is \documentclass[.,.,.]{...}. In the case you use several options,
separate them with commas. For example, \documentclass[10pt,leqno]{article}. This uses
the LaTeX article document class, with 10pt print size and puts the equation numbers
on the left. There are many options and varying defaults based on your document class.
\endinput:
If you are typing a long document and are therefore preparing the various sections
or chapters in separate files, you end each such file with command \endinput. Anything
typed after that will be ignored. These files are created as though you were typing right
in the main document. That is, no preamble or topmatter is required.
\eqref:
Provided you are using the amsmath package (automatically loaded in the amsart
documentclass), when you cross-reference an equation, you do not need to put the
parenthesis around the equation. With \ref you need to put the parenthesis.
\hline:
When using the tabular environment the command produces
a horizontal line the width of the table and is typically used to separate the rows
of the table.
\include:
If you are typing a long document and are therefore preparing the various sections
or chapters in separate files, you tell LaTeX to "include" these files with the
command \include{...}. In the argument to this command, you do not type the .tex
extension part - only type the root part of the filename. For example, if the first
section of your paper is contained in the file section1.tex, to include it, you type
\include{section1}.
\index:
If you are going to create an index for your document using LaTeX's program
makeindex then, for each item you want to index,
simply type \index{...} in the source code as close to the item as possible.
LaTex will take note of the index reference but it will not appear in the typeset
document. The label you put in the argument to \index is what appears in the index.
If you want an item indexed as an indented subitem to and already indexed item,
use the syntax \index{item!subitem}. There are many other
facets to makeindex such as dealing with special symbols. The command \index and the
program makeindex have their cousins, \glossary and \makeglossary.
\item:
When LaTeX's enumerate environment , each numbered
item begins with the command \item.
\label:
If you want to attach a label to an object that you will need to cross-reference, such as
an equation, theorem, table, figure, etc., then immediately after the beginning of the environment,
type \label{...}. For example, in the case of an equation, type
\begin{equation}\label{...} and later you can cross-reference it at any time, using
\ref{...}.
\listoffigures:
Provided you have properly placed all you figures using the
figure environment , all you need to do is include the command
\listoffigures. The location that the list of figures will appear in the body of the
document is determined by where you put the command (normally in the front matter near the
table of contents, list of tables, etc.)
\listoftables:
Provided you have properly placed all you figures using the
table environment , all you need to do is include the command
\listoftables. The location that the list of tables will appear in the body of the
document is determined by where you put the command (normally in the front matter near the
table of contents, list of figures, etc.)
\makeindex:
If you want to run the program makeindex then in the preamble of
your document you need to need to load the package makeidx using the command
\usepackage{makeidx}. Immediately following this include the command \makeindex
\maketitle
In the topmatter of your article you need to include the command \maketitle immediately
before the\begin{abstract} command if you are using the LaTeX document class or
immediately after the \begin{abstract} command if you are using the AmS-LaTeX document
class amsart.
\newcommand:
In the preamble of you document you can include your macros. If there are certain
complex sequences of symbols that constantly appear in your work, then you can define
a simple command sequence to produce this whenever it appears. You do this with the
command: \newcommand{...}{...}. In the first argument, you put the new \command sequence
that you are going to use to produce the complex string that you don't want to type every
time. You must begin it with a backslash. In the second argument you put what that
new command sequence stands for. For example, if the expression $\sqrt(a^2+b^2)$ appears
repeatedly, then you many want to define \newcommand{\rad}{\sqrt(a^2+b^2)} and now all you
have to type is $\rad.$
\newtheorem:
When using the package amsthm invoked with the command \usepackage{amsthm} you need to
declare a \ theoremstyle for each theorem-like
structure such as Theorem, Lemma, Corollary, Proposition, Definition, Remark, etc. Once
this is done, you then need to tell LaTeX what structures will have that style and
how you will label them. For instance, the command \newtheorem{Theorem}{Thm} declares an
environment that typesets the word Theorem at the beginning of the environment in the
typeset document but is called in LaTeX using \begin{Thm}...\end{Thm}.
\notag:
In the equation and align environments (among others) each line is automatically
numbered unless you include the \notag command at the end of each line
you do not want numbered. In the case of the align environment, you need to put the
\notag command before the \\ which always ends the line.
\printindex .
If you are using the program makeindex
to create an index then you need to include the command \printindex to tell LaTeX where
you want the index to be printed. Using this occurs just before the \end{document} command.
\quad:
This is a command that produces a horizontal space. In TeX, an inch is 72 pts.
The command \quad (which works both in text and math mode) is roughly 20 pts. There is
also \qquad for a double quad-space. More generally, an em-space is 10 pts and
you can use the command \hspace{14em} to produce a horizontal space which is
14 X 10 = 140 points and hence is very close to 2 inches long.
\ref:
If you have used the label command \label{***}
to attach a label to a Theorem, equation, section heading or any other object
then you can cross-reference the object using \ref{***}.
\scalebox
The scalebox command can scale a figure, math or text. It is mainly used
in the figure environment .
\tableofcontents:
If you have properly attached a label to every chapter, section, subsection, etc.,
then by including the command \tableofcontents LaTeX will generate a page with
the tableofcontents with pagenumbers, etc. The location is determined by where you
put the command in the source file.
\theoremstyle:
Provided you load the package amsthm by including the command
\usepackage{amsthm} in the preamble, LaTeX provides three styles for what Gratzer calls
"theorem-like structures". These include things like Theorem, Lemma, Corollary,
Proposition, Definition, Remark, Notation, etc.
The 3 styles are essentially three levels of emphatic display.
-
The "plain" style puts the label for the environment in bold print and the text in italics.
-
The "definition" style puts the label for the environment in bold print and the in
standard roman font.
-
The "remark" style puts the label for the environment in italic print and the text in
standard roman font.
For each theorem-like structure you use, include in the preamble of your document
the command \theoremstyle{...} with one of the three styles as the argument.
\title:
This is the only mandatory command in the topmatter. If it is more than one line, then
you separate the lines with \\. If you use the amsart documentclass then
there is an optional shorttitle that is placed in square brackets as in \title{...}
and is used as a "running header."
\textit
If you want text to appear in italics then use the command \textit{...}. This takes care
of the italic correction for you. Similarly, \texttt and \textbf stand for
typewriter text and bold font. There are others.
\usepackage:
Immediately after the \documentclass command at the beginning of
your document, put the \usepackage{.,.,} command with all the
packages you need separated by commas. In chapter 8 of Gratzer's book "Math into LaTeX"
on the AmS-LaTeX document classes, you can find a table showing the "package
interdependencies". If you are using the
LaTeX document class "article" then you almost certainly want the amsmath and amssymb
packages but if you are using the AmS-LaTeX document class "amsart" then you need only load the
latter of these two.