The commands in the preamble are applied to the entire document.
You can choose the margin sizes yourself by changing the following dimensions
before the \begin{document} line.
\setlength{\topmargin}{-0.4in} ( produces a topmargin 0.4in less than the default )
\setlength{\textheight}{9.5in} ( height of main text )
\setlength{\textwidth}{6in} ( width of text )
\setlength{\oddsidemargin}{0.75in} ( odd page left margin is 0.75in more than the default )
\setlength{\evensidemargin}{0.6in} ( even page left margin is 0.6in more than the default )
A table of contents is produced with the
\tableofcontents
command. You put the command right where you want the table of contents to go;
LaTeX does the rest for you. It produces a heading, but it does not
automatically start a new page. If you want a new page after the table of
contents, include a \newpage command after the
\tableofcontents command.
Let's say that in one place of your document, you want to write, "Aardvark nesting habits are well-documented in the literature[67]." In another place of your document you want, "Knudson[67, page 222-223] gives a list of favorite foods of Aardvarks."
This is what you should type in the document.
Aardvark nesting habits are well-documented in the literature \cite{vark:knud}.
and
Knudson \cite[page 222-223]{vark:knud} gives a list of favorite foods of Aardvarks.
Note that {vark:knud} is an identifier you chose for the Aardvark article written by Knudson.
That is the citation part in the next. Now, let's create the bibliography item by using the following commands.
\begin{thebibliography}{99}
... list of items
\bibitem{vark:knud} D.E. Knudson, Memoirs of an Aardvark Lover
...more items
\end{thebibliography}
LaTex keeps a count of bibliography items. The Knudson article happens to be #67 in this list.
Try the following table
\begin{tabular}{|l|r|c|}Things to notice:
There are two basic list-making environments: itemize and enumerate. Try the following lines in a LaTex file and test.
\begin{itemize}A third kind of list is invoked through the "description" command. Try the following lines in a LaTex file.
\begin{description}\hspace[*]{length}
command adds horizontal space. The length of the space
can be expressed in any terms that LaTeX understands, i.e., points, inches, etc.
You can add negative as well as positive space with this command.
Adding negative space is like backspacing. LaTeX removes horizontal space that comes at the end of a line.
If you don't want LaTeX to remove this space, include the optional * argument.
\vspace[*]{length}
command adds vertical space. The length of the space
can be expressed in any terms that LaTeX understands, i.e., points, inches, etc.
You can add negative as well as positive space with this
command. LaTeX removes vertical space that comes at the end of a page. If you don't
want LaTeX to remove this space, include the optional * argument.
\footnote[number]{text}
command places the numbered footnote
"text" at the bottom of the current page. The optional argument,
"number", is used to change the default footnote number. This command
can only be used in outer paragraph mode.
LaTeX can typeset the entire Greek alphabet in both lowercase and uppercase characters. Prefix the name of the Greek letter with a \ to make the letter. For example,
\alpha \beta \gamma \delta etc., it's very intuitive.
To get uppercase letters, capitalize the first letter of the command. For example:
\Theta \Lambda \Xi \Sigma
To create subscripts and super scripts, use the _ (subscript text) and ^ (superscript) commands in math mode.
For example, to print
... assuming that x2 + y2 = z2, then ...
type the following LaTeX line:
... assuming that $x^{2} + y^{2} = z^{2}$, then ...
See how the math mode is invoked with the $ symbol.
type the LaTex line:
\frac{x^{2} - y^{2}}{x^{2} + y^{2}}
A figure in a separate PostScript file can be included in a LaTeX document using the epsfig package. Most mathematical/scientific graphics software allows you to save graphics (figures, diagrams, graphs) in PostScript form; this includes Mathematica, Maple, Matlab, IDL, and xfig. GIF and JPEG images can be converted to PostScript form with ``xv'', among other methods.
The epsfig package is read if you put the line
\usepackage{epsfig}near the top of the LaTeX file. Then, where you want the PostScript image to appear, use commands like this:
\epsfysize=35mm \epsfbox{graph.eps}where ``epsfysize'' is used to indicate the desired height of the figure in your document (you could instead indicate a desired width by using epsfxsize), and \epsfbox{...} encloses the name of the PostScript file.
Two characteristics which the (Encapsulated) PostScript file must have are
If the PostScript file does not include a bounding box line, you can indicate the bounding box numbers manually as options to the epsfbox command, e.g.
\begin{center}