abstract
array
center
description
displaymath
document
enumerate
eqnarray
equation
figure
flushleft
flushright
itemize
letter environment: writing letters
list
math
minipage
picture
quotation
quote
tabbing
table
tabular
thebibliography
theorem
titlepage
verbatim
verse
This document is version 2.0 (June 2008) of an unofficial reference manual for LaTeX, a document preparation system. It is intended to cover LaTeX2e, which has been the standard version of LaTeX for many years.
LaTeX is implemented as a macro package for Donald E. Knuth's TeX typesetting program. LaTeX was originally created by Leslie Lamport; it is now maintained by a group of volunteers (http://latex-project.org). The official documentation written by the LaTeX project is available there. Again, the present document is unofficial and has not been reviewed by the LaTeX maintainers.
The LaTeX command typesets a file of text using the TeX program and the LaTeX “macro package” for TeX. To be more specific, it processes an input file containing the text of a document with interspersed commands that describe how the text should be formatted. It produces at least three files as output:
There are other less-common variants of LaTeX (and TeX) as well, which can produce HTML, XML, and other things.
A LaTeX command begins with the command name, which consists of a
\ followed by either (a) a string of letters or (b) a
single non-letter. Arguments contained in square brackets, [],
are optional while arguments contained in braces, {}, are
required.
LaTeX is case sensitive. Enter all commands in lower case unless explicitly directed to do otherwise.
A minimal input file looks like the following:
\documentclass{class}
\begin{document}
your text
\end{document}
where the class is a valid document class for LaTeX. See Document classes, for details of the various document classes available locally.
You may include other LaTeX commands between the \documentclass
and the \begin{document} commands (this area is called the
preamble).
The class of a given document is defined with the command:
\documentclass[options]{class}
The \documentclass command must be the first command in a
LaTeX source file.
Built-in LaTeX document class names are (many other document classes are available as add-ons; see Overview):
article report book letter slides
Standard options are described below.
You can specify so-called global options or class options
to the \documentclass command by enclosing them in square
brackets as usual. To specify more than one option, separate
them with a comma:
\documentclass[option1,option2,...]{class}
Here is the list of the standard class options.
All of the standard classes except slides accept the following
options for selecting the typeface size (default is 10pt):
10pt 11pt 12pt
All of the standard classes accept these options for selecting the paper
size (default is letterpaper):
a4paper a5paper b5paper executivepaper legalpaper letterpaper
draft, finalfinal.
fleqnlandscapeleqnoopenbibtitlepage, notitlepageThese options are not available with the slides class:
onecolumntwocolumnonecolumn.
onesidetwosideoneside, except
for the book class.
The \evensidemargin (\oddsidemargin parameter determines
the distance on even (odd) numbered pages between the left side of the
page and the text's left margin. The defaults vary with the paper
size and whether one- or two-side layout is selected. For one-sided
printing the text is centered, for two-sided, \oddsidemargin is
40% of the difference between \paperwidth and \textwidth
with \evensidemargin the remainder.
openrightopenanyopenright for book.
The slides class offers the option clock for printing
the time at the bottom of each note.
Additional packages are loaded like this:
\usepackage[options]{pkg}
To specify more than one pkg, you can separate them with a
comma, or use multiple \usepackage commands.
Any options given in the \documentclass command that are unknown
by the selected document class are passed on to the packages loaded with
\usepackage.
Two important aspects of selecting a font are specifying a size and a style. The LaTeX commands for doing this are described here.
The following type style commands are supported by LaTeX.
These commands are used like \textit{italic text}. The
corresponding command in parenthesis is the “declaration form”, which
takes no arguments. The scope of the declaration form lasts until the
next type style command or the end of the current group.
The declaration forms are cumulative; i.e., you can say either
\sffamily\bfseries or \bfseries\sffamily to get bold
sans serif.
You can also use the environment form of the declaration forms; for instance,
\begin{ttfamily}...\end{ttfamily}.
\textrm (\rmfamily)\textit (\itshape)\emph\textit and \textrm).
\textmd (\mdseries)\textbf (\bfseries)\textup (\upshape)\textsl (\slshape)\textsf (\sffamily)\textsc (\scshape)\texttt (\ttfamily)\textnormal (\normalfont)\mathrm\mathbf\mathsf\mathtt\mathit(\mit)\mathnormal\mathcalIn addition, the command
\mathversion{bold}
can be used for switching to bold letters and symbols in
formulas. \mathversion{normal} restores the default.
LaTeX also provides these commands, which unconditionally switch to
the given style, that is, are not cumulative. They are used
differently than the above commands, too: {\cmd ...}
instead of \cmd{...}. These are two very different
things.
\bf\cal\em\it\rm\sc\sf\sl\ttThe following standard type size commands are supported by LaTeX. The table shows the command name and the corresponding actual font size used (in points) with the ‘10pt’, ‘11pt’, and ‘12pt’ document size options, respectively (see Document class options).
| Command | 10pt | 11pt | 12pt
|
|---|---|---|---|
\tiny
| 5 | 6 | 6
|
\scriptsize
| 7 | 8 | 8
|
\footnotesize
| 8 | 9 | 10
|
\small
| 9 | 10 | 10.95
|
\normalsize (default)
| 10 | 10.95 | 12
|
\large
| 12 | 12 | 14.4
|
\Large
| 14.4 | 14.4 | 17.28
|
\LARGE
| 17.28 | 17.28 | 20.74
|
\huge
| 20.74 | 20.74 | 24.88
|
\Huge
| 24.88 | 24.88 | 24.88
|
The commands as listed here are “declaration forms”. The scope of
the declaration form lasts until the next type style command or the
end of the current group. You can also use the environment form of
these commands; for instance, \begin{tiny}...\end{tiny}.
These commands are primarily intended for writers of macros and packages. The commands listed here are only a subset of the available ones.
\fontencoding{enc}OT1 and T1.
\fontfamily{family}cmr for Computer Modern Roman
cmss for Computer Modern Sans Serif
cmtt for Computer Modern Typewriter
and numerous others.
\fontseries{series}m Medium (normal)
b Bold
c Condensed
bc Bold condensed
bx Bold extended
and various other combinations.
\fontshape{shape}n Upright (normal)
it Italic
sl Slanted (oblique)
sc Small caps
ui Upright italics
ol Outline
The two last shapes are not available for most font families.
\fontsize{size}{skip}\baselineskip. The unit of both parameters defaults to
pt. The default \baselineskip for the Computer Modern typeface
is 1.2 times the \fontsize.
The line spacing is also multiplied by the value of the
\baselinestretch parameter when the type size changes; the
default is 1. However, the best way to “double space” a document,
if you should be unlucky enough to have to produce such, is to use the
setspace package; see
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=linespace.
\selectfont\selectfont is called.
\usefont{enc}{family}{series}{shape}\fontencoding, \fontfamily,
\fontseries and \fontshape with the given parameters,
followed by \selectfont.
Miscellaneous commands for controlling the general layout of the page.
\onecolumn
The \onecolumn declaration starts a new page and produces
single-column output. This is the default.
\twocolumn\twocolumn[text1col]
The \twocolumn declaration starts a new page and produces
two-column output. If the optional text1col argument is present,
it is typeset in one-column mode before the two-column typesetting
starts.
These parameters control typesetting in two-column output:
\columnsep\columnseprule\columnwidth\textwidth in
single-column text.
These parameters control float behavior in two-column output:
\dbltopfraction\dblfloatpagefraction\dblfloatsep\dbltextfloatsep\flushbottom
The \flushbottom declaration makes all text pages the same
height, adding extra vertical space where necessary to fill out the
page.
This is the default if twocolumn mode is selected
(see Document class options).
\raggedbottom
The \raggedbottom declaration makes all pages the natural
height of the material on that page. No rubber lengths will be
stretched.
\headheightbook class, where it varies with the
type size.
\headsepbook
class, where it varies with the type size.
\footskipbook
class, where it varies with the type size.
\linewidtharticle document in
‘10pt’, it's set to ‘345pt’; in two-column mode, that
becomes ‘229.5pt’.
\textheightarticle or
report document in ‘10pt’, it's set to
‘43\baselineskip’; for book, it's ‘41\baselineskip’.
For ‘11pt’, it's ‘38\baselineskip’ and for ‘12pt’,
‘36\baselineskip’.
\textwidtharticle or report document, it's
‘345pt’ at ‘10pt’, ‘360pt’ at ‘11pt’, and
‘390pt’ at ‘12pt’. For a book document, it's
‘4.5in’ at ‘10pt’, and ‘5in’ at ‘11pt’ or ‘12pt’.
\topmargin\paperheight − 2in −
\headheight − \headsep − \textheight − \footskip, and
then divided by two.
\topskipSectioning commands provide the means to structure your text into units:
\part\chapter\section\subsection\subsubsection\paragraph\subparagraphAll sectioning commands take the same general form, e.g.,
\chapter[toctitle]{title}
In addition to providing the heading title in the main text, the section title can appear in two other places:
You may not want the same text in these places as in the main text. To handle this, the sectioning commands have an optional argument toctitle that, when given, specifies the text for these other places.
Also, all sectioning commands have *-forms that print
title as usual, but do not include a number and do not make an
entry in the table of contents. For instance:
\section*{Preamble}
The \appendix command changes the way following sectional units
are numbered. The \appendix command itself generates no text
and does not affect the numbering of parts. The normal use of this
command is something like
\chapter{A Chapter}
...
\appendix
\chapter{The First Appendix}
One reason for numbering things like figures and equations is to refer the reader to them, as in “See Figure 3 for more details.”
\label \label{key}
A \label command appearing in ordinary text assigns to
key the number of the current sectional unit; one appearing
inside a numbered environment assigns that number to key.
A key name can consist of any sequence of letters, digits, or punctuation characters. Upper and lowercase letters are distinguished.
To avoid accidentally creating two labels with the same name, it is common to use labels consisting of a prefix and a suffix separated by a colon or period. Some conventionally-used prefixes:
chsecfigtabeqThus, a label for a figure would look like fig:snark or
fig.snark.
\pageref{key} \pageref{key}
The \pageref{key} command produces the page number of
the place in the text where the corresponding
\label{key} command appears.
\ref{key} \ref{key}
The \ref command produces the number of the sectional unit,
equation, footnote, figure, ..., of the corresponding
\label command (see \label). It does not produce any text,
such as the word `Section' or `Figure', just the bare number itself.
LaTeX provides many environments for marking off certain text. Each environment begins and ends in the same manner:
\begin{envname}
...
\end{envname}
abstract \begin{abstract}
...
\end{abstract}
Environment for producing an abstract, possibly of multiple paragraphs.
array \begin{array}{template}
col1 text&col1 text&coln}\\
...
\end{array}
Math arrays are produced with the array environment, normally
within an equation environment (see equation). It has a
single mandatory template argument describing the number of
columns and the alignment within them. Each column col is
specified by a single letter that tells how items in that row should
be formatted, as follows:
clrColumn entries are separated by &. Column entries may include
other LaTeX commands. Each row of the array is terminated with
\\.
In the template, the construct @{text} puts text
between columns in each row.
Here's an example:
\begin{equation}
\begin{array}{lrc}
left1 & right1 & centered1 \\
left2 & right2 & centered2 \\
\end{array}
\end{equation}
The \arraycolsep parameter defines half the width of the space
separating columns; the default is ‘5pt’. See tabular, for other
parameters which affect formatting in array environments,
namely \arrayrulewidth and \arraystretch.
The array environment can only be used in math mode.
center \begin{center}
line1 \\
line2 \\
\end{center}
The center environment allows you to create a paragraph
consisting of lines that are centered within the left and right
margins on the current page. Each line is terminated with the
string \\.
\centering
The \centering declaration corresponds to the center
environment. This declaration can be used inside an environment such
as quote or in a parbox. Thus, the text of a figure or
table can be centered on the page by putting a \centering
command at the beginning of the figure or table environment.
Unlike the center environment, the \centering command
does not start a new paragraph; it simply changes how LaTeX formats
paragraph units. To affect a paragraph unit's format, the scope of
the declaration must contain the blank line or \end command (of
an environment such as quote) that ends the paragraph unit.
Here's an example:
\begin{quote}
\centering
first line \\
second line \\
\end{quote}
description \begin{description}
\item [label1] item1
\item [label2] item2
...
\end{description}
The description environment is used to make labelled lists. Each
label is typeset in bold, flush right. The item text may
contain multiple paragraphs.
Another variation: since the bold style is applied to the labels, if
you typeset a label in typewriter using \texttt, you'll get
bold typewriter: \item[\texttt{bold and typewriter}]. This
may be too bold, among other issues. To get just typewriter, use
\tt, which resets all other style variations: \item[{\tt
plain typewriter}].
For details about list spacing, see itemize.
displaymath \begin{displaymath}
math
\end{displaymath}
or
\[math\]
The displaymath environment (\[...\] is a synonym)
typesets the math text on its own line, centered by default.
The global fleqn option makes equations flush left; see
Document class options.
No equation number is added to displaymath text; to get an
equation number, use the equation environment (see equation).
document
The document environment encloses the body of a document.
It is required in every LaTeX document. See Starting & ending.
enumerate \begin{enumerate}
\item item1
\item item2
...
\end{enumerate}
The enumerate environment produces a numbered list. Enumerations
can be nested within one another, up to four levels deep. They can also
be nested within other paragraph-making environments, such as
itemize (see itemize) and description
(see description).
Each item of an enumerated list begins with an \item command.
There must be at least one \item command within the environment.
By default, the numbering at each level is done like this:
The enumerate environment uses the counters \enumi
through \enumiv counters (see Counters). If the optional
argument to \item is given, the counter is not incremented for
that item.
The enumerate environment uses the commands \labelenumi
through \labelenumiv to produce the default label. So, you can
use \renewcommand to change the labels (see \newcommand & \renewcommand). For instance, to have the first level use uppercase
letters:
\renewcommand{\labelenumi}{\Alph{enumi}}
eqnarray \begin{eqnarray} (or eqnarray*)
formula1 \\
formula2 \\
...
\end{eqnarray}
The eqnarray environment is used to display a sequence of
equations or inequalities. It is very much like a three-column
array environment, with consecutive rows separated by \\
and consecutive items within a row separated by an &.
\\* can also be used to separate equations, with its normal
meaning of not allowing a page break at that line.
An equation number is placed on every line unless that line has a
\nonumber command. Alternatively, The *-form of the
environment (\begin{eqnarray*} ... \end{eqnarray*}) will
omit equation numbering entirely, while otherwise being the same as
eqnarray.
The command \lefteqn is used for splitting long formulas across
lines. It typesets its argument in display style flush left in a box of
zero width.
equation \begin{equation}
math
\end{equation}
The equation environment starts a displaymath
environment (see displaymath), e.g., centering the math text
on the page, and also places an equation number in the right margin.
figure \begin{figure}[placement]
figbody
\label{label}
\caption[loftitle]{text}
\end{figure}
Figures are objects that are not part of the normal text, and are instead “floated” to a convenient place, such as the top of a page. Figures will not be split between two pages.
The optional argument [placement] determines where LaTeX will try
to place your figure. There are four places where LaTeX can possibly
put a float:
h (Here) - at the position in the text where the figure
environment appears.
t (Top) - at the top of a text page.
b (Bottom) - at the bottom of a text page.
p (Page of floats) - on a separate float page, which is a page
containing no text, only floats.
The standard report and article classes use the default placement
tbp.
The body of the figure is made up of whatever text, LaTeX commands, etc. you wish.
The \caption command specifies caption text for the
figure. The caption is numbered by default. If loftitle is
present, it is used in the list of figures instead of text
(see Tables of contents).
\floatpagefraction\floatsep\intextsep\textfloatsep\textfraction\topfractionflushleft \begin{flushleft}
line1 \\
line2 \\
...
\end{flushleft}
The flushleft environment allows you to create a paragraph
consisting of lines that are flush to the left-hand margin and ragged
right Each line must be terminated with the string \\.
\raggedright
The \raggedright declaration corresponds to the
flushleft environment. This declaration can be used inside an
environment such as quote or in a parbox.
Unlike the flushleft environment, the \raggedright
command does not start a new paragraph; it only changes how LaTeX
formats paragraph units. To affect a paragraph unit's format, the
scope of the declaration must contain the blank line or \end
command that ends the paragraph unit.
flushright \begin{flushright}
line1 \\
line2 \\
...
\end{flushright}
The flushright environment allows you to create a paragraph
consisting of lines that are flush to the right-hand margin and ragged
left. Each line must be terminated with the string \\.
\raggedleft
The \raggedleft declaration corresponds to the
flushright environment. This declaration can be used inside an
environment such as quote or in a parbox.
Unlike the flushright environment, the \raggedleft
command does not start a new paragraph; it only changes how LaTeX
formats paragraph units. To affect a paragraph unit's format, the
scope of the declaration must contain the blank line or \end
command that ends the paragraph unit.
itemize \begin{itemize}
\item item1
\item item2
...
\end{itemize}
The itemize environment produces an “unordered”, “bulleted”
list. Itemizations can be nested within one another, up to four
levels deep. They can also be nested within other paragraph-making
environments, such as enumerate (see enumerate).
Each item of an itemize list begins with an \item command.
There must be at least one \item command within the environment.
By default, the marks at each level look like this:
The itemize environment uses the commands \labelitemi
through \labelitemiv to produce the default label. So, you can
use \renewcommand to change the labels. For instance, to have
the first level use diamonds:
\renewcommand{\labelitemi}{$\diamond$}
The \leftmargini through \leftmarginvi parameters define
the distance between the left margin of the enclosing environment and
the left margin of the list. By convention, \leftmargin is set
to the appropriate \leftmarginN when a new level of
nesting is entered.
The defaults vary from ‘.5em’ (highest levels of nesting) to ‘2.5em’ (first level), and are a bit reduced in two-column mode. This example greatly reduces the margin space for outermost lists:
\setlength{\leftmargini}{1.25em} % default 2.5em
Some parameters that affect list formatting:
\itemindent\labelsep\labelwidth\listparindent\rightmarginquote,
quotation, and verse environments, where it is set equal
to \leftmargin.
Parameters affecting vertical spacing between list items (rather loose, by default).
\itemsep2pt plus1pt
minus1pt for 10pt documents, 3pt plus2pt minus1pt for
11pt, and 4.5pt plus2pt minus1pt for 12pt.
\parsep\itemsep.
\topsep4pt plus2pt minus2pt for 10pt documents,
6pt plus2pt minus2pt for 11pt, and 9pt plus3pt
minus5pt for 12pt.
\partopsep\topsep when the list environment starts a
paragraph. The default is 2pt plus1pt minus1pt for 10pt
documents, 3pt plus1pt minus1pt for 11pt, and 3pt
plus2pt minus2pt for 12pt.
\topsepEspecially for lists with short items, it may be desirable to elide
space between items. Here is an example defining an itemize*
environment with no extra spacing between items, or between paragraphs
within a single item (\parskip is not list-specific,
see \parskip):
\newenvironment{itemize*}%
{\begin{itemize}%
\setlength{\itemsep}{0pt}%
\setlength{\parsep}{0pt}}%
\setlength{\parskip}{0pt}}%
{\end{itemize}}
letter environment: writing lettersThis environment is used for creating letters. See Letters.
list
The list environment is a generic environment which is used for
defining many of the more specific environments. It is seldom used in
documents, but often in macros.
\begin{list}{labeling}{spacing}
\item item1
\item item2
...
\end{list}
The mandatory labeling argument specifies how items should be
labelled (unless the optional argument is supplied to \item).
This argument is a piece of text that is inserted in a box to form the
label. It can and usually does contain other LaTeX commands.
The mandatory spacing argument contains commands to change the
spacing parameters for the list. This argument will most often be
empty, i.e., {}, which leaves the default spacing.
math \begin{math}
math
\end{math}
The math environment inserts the given math within the
running text. \(...\)) and $...$ are synonyms.
See Math formulas.
minipage \begin{minipage}[position]{width}
text
\end{minipage}
The minipage environment typesets its body text in a
block that will not be broken across pages (similar to the
\parbox command, see \parbox). You may use other
paragraph-making environments inside a minipage (unlike \parbox).
It takes an optional position argument for placing text, and a mandatory width argument for specifying the line width.
By default, paragraphs are not indented in the minipage
environment. You can restore indentation with a command such as
\setlength{\parindent}{1pc} command.
Footnotes in a minipage environment are handled in a way that is
particularly useful for putting footnotes in figures or tables. A
\footnote or \footnotetext command puts the footnote at
the bottom of the minipage instead of at the bottom of the page, and it
uses the \mpfootnote counter instead of the ordinary
footnote counter (see Counters).
However, don't put one minipage inside another if you are using footnotes; they may wind up at the bottom of the wrong minipage.
picture \begin{picture}(width,height)(x offset,y offset)
... picture commands ...
\end{picture}
The picture environment allows you to create just about any
kind of picture you want containing text, lines, arrows and circles.
You tell LaTeX where to put things in the picture by specifying
their coordinates. A coordinate is a number that may have a decimal
point and a minus sign—a number like 5, 0.3 or
-3.1416. A coordinate specifies a length in multiples of the
unit length \unitlength, so if \unitlength has been set
to 1cm, then the coordinate 2.54 specifies a length of 2.54
centimeters. You should only change the value of \unitlength,
using the \setlength command, outside of a picture
environment.
A position is a pair of coordinates, such as (2.4,-5), specifying
the point with x-coordinate 2.4 and y-coordinate -5.
Coordinates are specified in the usual way with respect to an origin,
which is normally at the lower-left corner of the picture. Note that
when a position appears as an argument, it is not enclosed in braces;
the parentheses serve to delimit the argument.
The picture environment has one mandatory argument, which is a
position. It specifies the size of the picture. The environment
produces a rectangular box with width and height determined by this
argument's x- and y-coordinates.
The picture environment also has an optional position
argument, following the size argument, that can change the
origin. (Unlike ordinary optional arguments, this argument is not
contained in square brackets.) The optional argument gives the
coordinates of the point at the lower-left corner of the picture
(thereby determining the origin). For example, if \unitlength
has been set to 1mm, the command
\begin{picture}(100,200)(10,20)
produces a picture of width 100 millimeters and height 200 millimeters, whose lower-left corner is the point (10,20) and whose upper-right corner is therefore the point (110,220). When you first draw a picture, you will omit the optional argument, leaving the origin at the lower-left corner. If you then want to modify your picture by shifting everything, you just add the appropriate optional argument.
The environment's mandatory argument determines the nominal size of the picture. This need bear no relation to how large the picture really is; LaTeX will happily allow you to put things outside the picture, or even off the page. The picture's nominal size is used by LaTeX in determining how much room to leave for it.
Everything that appears in a picture is drawn by the \put
command. The command
\put (11.3,-.3){...}
puts the object specified by ... in the
picture, with its reference point at coordinates (11.3,-.3).
The reference points for various objects will be described below.
The \put command creates an LR box. You can put anything
that can go in an \mbox (see \mbox) in the text argument of
the \put command. When you do this, the reference point will
be the lower left corner of the box.
The picture commands are described in the following sections.
\circle \circle[*]{diameter}
The \circle command produces a circle with a diameter as close
to the specified one as possible. The *-form of the command
draws a solid circle.
Circles up to 40 pt can be drawn.
\makebox
\makebox(width,height)[position]{...}
The \makebox command for the picture environment is similar to
the normal \makebox command except that you must specify a
width and height in multiples of \unitlength.
The optional argument, [position], specifies the quadrant that
your text appears in. You may select up to two of the following:
t - Moves the item to the top of the rectangle
b - Moves the item to the bottom
l - Moves the item to the left
r - Moves the item to the right
See \makebox.
\framebox \framebox(width,height)[pos]{...}
The \framebox command is like \makebox (see previous
section), except that it puts a frame around the outside of the box
that it creates.
The \framebox command produces a rule of thickness
\fboxrule, and leaves a space \fboxsep between the rule
and the contents of the box.
\dashboxDraws a box with a dashed line. Synopsis:
\dashbox{dlen}(rwidth,rheight)[pos]{text}
\dashbox creates a dashed rectangle around text in a
picture environment. Dashes are dlen units long, and the
rectangle has overall width rwidth and height rheight.
The text is positioned at optional pos.
A dashed box looks best when the rwidth and rheight are
multiples of the dlen.
\frame \frame{text}
The \frame command puts a rectangular frame around text.
The reference point is the bottom left corner of the frame. No extra
space is put between the frame and the object.
\line \line(xslope,yslope){length}
The \line command draws a line with the given length and
slope xslope/yslope.
Standard LaTeX can only draw lines with slope = x/y,
where x and y have integer values from −6
through 6. For lines of any slope, not to mention other shapes,
see the curve2e and many many other packages on CTAN.
\linethickness
The \linethickness{dim} command declares the thickness
of horizontal and vertical lines in a picture environment to be
dim, which must be a positive length.
\linethickness does not affect the thickness of slanted lines,
circles, or the quarter circles drawn by \oval.
\thicklines
The \thicklines command is an alternate line thickness for
horizontal and vertical lines in a picture environment;
cf. \linethickness and \thinlines.
\thinlines
The \thinlines command is the default line thickness for
horizontal and vertical lines in a picture environment;
cf. \linethickness and \thicklines.
\multiput \multiput(x,y)(delta_x,delta_y){n}{obj}
The \multiput command copies the object obj in a regular
pattern across a picture. obj is first placed at position
(x,y), then at (x+\delta x,y+\delta y), and so on,
n times.
\oval\oval(width,height)[portion]
The \oval command produces a rectangle with rounded corners.
The optional argument portion allows you to select part of the
oval via the following:
tbrlThe “corners” of the oval are made with quarter circles with a maximum radius of 20pt, so large “ovals” will look more like boxes with rounded corners.
\putThe \put command places the item specified by the mandatory
argument at the given coordinates.
\shortstack \shortstack[position]{...\\...\\...}
The \shortstack command produces a stack of objects. The valid
positions are:
rlcObjects are separated with \\.
\vector \vector(x-slope,y-slope){length}
The \vector command draws a line with an arrow of the specified
length and slope. The x and y values must lie between
−4 and +4, inclusive.
quotation \begin{quotation}
text
\end{quotation}
The margins of the quotation environment are indented on both
the left and the right. The text is justified at both margins.
Leaving a blank line between text produces a new paragraph.
Unlike the quote environment, each paragraph is indented
normally.
quote \begin{quote}
text
\end{quote}
The margins of the quote environment are indented on both the
left and the right. The text is justified at both margins. Leaving a
blank line between text produces a new paragraph.
Unlike the quotation environment, paragraphs are not indented.
tabbing \begin{tabbing}
row1col1 \= row1col2 \= row1col3 \= row1col4 \\
row2col1 \> \> row2col3 \\
...
\end{tabbing}
The tabbing environment provides a way to align text in
columns. It works by setting tab stops and tabbing to them much as
was done on an ordinary typewriter. It is best suited for cases where
the width of each column is constant and known in advance.
This environment can be broken across pages, unlike the tabular
environment.
The following commands can be used inside a tabbing enviroment:
\\ tabbing\= (tabbing)\> (tabbing)\<\+\-\' (tabbing)\>,
\<, \', \\, or \kill command, to the right
of the previous column, flush against the current column's tab stop.
\` (tabbing)\` command moves all the
text that follows it, up to the \\ or \end{tabbing}
command that ends the line, to the right margin of the tabbing
environment. There must be no \> or \' command between
the \` and the command that ends the line.
\a (tabbing)tabbing environment, the commands \=, \' and
\` do not produce accents as usual (see Accents). Instead,
the commands \a=, \a' and \a` are used.
\kill\\
except that it throws away the current line instead of producing
output for it. The effect of any \=, \+ or \-
commands in that line remain in effect.
\poptabs\pushtabs.
\pushtabstabbing environment.
\tabbingsep\'.
This example typesets a Pascal function in a traditional format:
\begin{tabbing}
function \= fact(n : integer) : integer;\\
\> begin \= \+ \\
\> if \= n $>$ 1 then \+ \\
fact := n * fact(n-1) \- \\
else \+ \\
fact := 1; \-\- \\
end;\\
\end{tabbing}
table \begin{table}[placement]
body of the table
\caption{table title}
\end{table}
Tables are objects that are not part of the normal text, and are usually “floated” to a convenient place, like the top of a page. Tables will not be split between two pages.
The optional argument [placement] determines where LaTeX will try
to place your table. There are four places where LaTeX can possibly put
a float:
h: Here - at the position in the text where the table
environment appears.
t: Top - at the top of a text page.
b: Bottom - at the bottom of a text page.
p: Page of floats - on a separate float page, which is a page
containing no text, only floats.
The standard report and article classes use the default
placement [tbp].
The body of the table is made up of whatever text, LaTeX commands, etc.,
you wish. The \caption command allows you to title your table.
tabular \begin{tabular}[pos]{cols}
column 1 entry & column 2 entry ... & column n entry \\
...
\end{tabular}
or
\begin{tabular*}{width}[pos]{cols}
column 1 entry & column 2 entry ... & column n entry \\
...
\end{tabular*}
These environments produce a box consisting of a sequence of rows of items, aligned vertically in columns.
\\ must be used to specify the end of each row of the table,
except for the last, where it is optional—unless an \hline
command (to put a rule below the table) follows.
The mandatory and optional arguments consist of:
widthtabular* environment. There must be
rubber space between columns that can stretch to fill out the specified
width.
post - align on top row
b - align on bottom row
colsl - A column of left-aligned items.
r - A column of right-aligned items.
c - A column of centred items.
| - A vertical line the full height and depth of the environment.
@{text} - This inserts text in every row. An @-expression
suppresses the intercolumn space normally inserted between columns; any
desired space between the inserted text and the adjacent items must be
included in text. An \extracolsep{wd} command in an
@-expression causes an extra space of width wd to appear to the
left of all subsequent columns, until countermanded by another
\extracolsep command. Unlike ordinary intercolumn space, this
extra space is not suppressed by an @-expression. An
\extracolsep command can be used only in an @-expression in the
cols argument.
p{wd} - Produces a column with each item typeset in a parbox of
width wd, as if it were the argument of a \parbox[t]{wd}
command. However, a \\ may not appear in the item, except in the
following situations:
minipage, array, or tabular.
\parbox.
\centering, \raggedright, or \raggedleft
declaration. The latter declarations must appear inside braces or an
environment when used in a p-column element.
*{num}{cols} - Equivalent to num copies of
cols, where num is any positive integer and cols is
any list of column-specifiers, which may contain another
*-expression.
Parameters that control formatting:
\arrayrulewidth|, \hline, and
\vline in the tabular and array environments; the
default is ‘.4pt’.
\arraystretchtabular and array
environments; default is ‘1’,for no scaling.
\doublerulesep||
in the tabular and array environments; default is ‘2pt’.
\tabcolsepThese commands can be used inside a tabular environment:
\multicolumn \multicolumn{cols}{pos}{text}
The \multicolumn command makes an entry that spans several
columns. The first mandatory argument, cols, specifies the
number of columns to span. The second mandatory argument, pos,
specifies the formatting of the entry; c for centered, l
for flushleft, r for flushright. The third mandatory argument,
text, specifies what text to put in the entry.
Here's an example showing two columns separated by an en-dash;
\multicolumn is used for the heading:
\begin{tabular}{r@{--}l}
\multicolumn{2}{c}{\bf Unicode}\cr
0x80&0x7FF \cr
0x800&0xFFFF \cr
0x10000&0x1FFFF \cr
\end{tabular}