A LaTeX environment is one of the following:

Float environments[edit | edit source]

Text inside a float environment is "floated" according to its placement, an optional parameter. The standard report and article classes use the default placement [tbp]. The float environments are figure and table.

Figure environment[edit | edit source]

  % body of the figure
  \caption{figure title}

Placement is one of the following

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.

Table environment[edit | edit source]

The table environment has the same characteristics as the figure environment.[improvement needed: elaborate]

List environments[edit | edit source]

The list environments are description, enumerate, itemize, and the generic list, which is seldom used in text, but often in macros. Within a list environment item commands are used to identify the items in the list.

description environment[edit | edit source]

The description environment produces a labeled list.

\item [label] First item
\item [label] Second item



enumerate environment[edit | edit source]

The enumerate environment produces a numbered list. At least one item is needed. Enumerate lists can be nested inside other enumerate lists, up to four levels deep.

\item First item
\item Second item



itemize environment[edit | edit source]

The itemize environment creates an unnumbered, or "bulleted" list.

\item First item
\item Second item



list environment[edit | edit source]

\item First item
\item Second item



specifies how items should be labeled. This argument is a piece of text that is inserted in a box to form the label. This argument can and usually does contain other LaTeX commands.
contains commands to change the spacing parameters for the list. An empty argument will select all default spacing which should suffice for most cases.
The format parameters are: (See external reference for a diagram of these)


Math environments[edit | edit source]

The math environments are math, displaymath, array, eqnarray, equation, and theorem

math environment[edit | edit source]

The math environment is used within paragraph mode to place mathematical symbols inline with the paragraph's text. The following are all equivalent:

\( … \)
$ … $

In a wiki, the <math> ... </math> tags create a math environment.

displaymath environment[edit | edit source]

The following are equivalent:

\[ … \]
$$ … $$

Note: The AMS Short Math Guide recommends against using $$ ... $$ to enter displaymath mode, because it is not documented in the TeX manual, and because it interferes with the proper operation of the fleqn option.

split environment[edit | edit source]

The split environment is used to write multiple lines that are aligned using the ampersand (&) character.

LaTeX markup... ...results in: ...is used for:

a& =b+c-d\\
& \quad +e-f\\
& =g+h\\

Failed to parse (unknown function "\begin{split}"): {\displaystyle \begin{split} a& =b+c-d\\ & \quad +e-f\\ & =g+h\\ \end{split}} aligning a series of equations

array environment[edit | edit source]

Main article: array (LaTeX environment)

The array environment is used to make a table of information, with column alignment (left, center, or right) and optional vertical lines separating the columns.

item11 & item12 … & item1n\\
item21 & item22 … & item2n\\


itemn1 & itemn2 … & itemnn\\

Each of col1, col2, etc. is a single letter,

c - for centred
l - for flush left
r - for flush right
The column format letters can be interspersed with vertical bars (|), which result in rendering vertical bars as needed in the formatted matrix.

If a horizontal line is needed in the matrix, \hline can be used.

Within the matrix itself, columns are separated by an &, and each row ends with a double backslash, \\.

eqnarray environment[edit | edit source]

math formula 1
math formula 2



The eqnarray environment is

An equation number is placed on every line unless that line has a \nonumber command. 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 environment[edit | edit source]

The equation environment centers the equation, and places an equation number in the right margin.

... math formula

An asterisk is used for unnumbered equations:

... math formula

An equation can be given a label using the \label command, which can later be referenced using the \eqref command.

... math formula

Later, the equation can be referenced, as an example, by
... using equation \eqref{xyz}, one can derive the following...
\eqref{xyz} generates a parenthesized equation number; it is equivalent to (\ref{xyz}). The preamble command, \numberwithin{equation}{section} can be used to number equations with the two-level name m.n (section number.equation number).

The subequations environment affixes letters a, b, c... to the end of the equation number within the environment.

some intervening text

numbers equation x=y+z as, for example, 2.9, then the group a=b+c, d=e+f+g, and h=i+j will be numbered, respectively, 2.10a, 2.10b, and 2.10c. The "parent" equation number, 2.10, is assigned to the label "grp".

The multiline environment lets you split equations over multiple lines, aligning the beginning of the equation with the left margin, and the end of it with the right margin. Equations are numbered.


The gather environment gathers and centers equations; each equation is numbered; not available in wiki.

\begin{gather} a_1=b_1+c_1\\

The align environment lets you use the ampersand (&) to align multiple equations; each equation is numbered; not available in wiki.

a_{11}& =b_{11}&
a_{12}& =b_{12}\\
a_{21}& =b_{21}&
a_{22}& =b_{22}+c_{22} \end{align}

The flalign environment lets you use the ampersand (&) to align multiple equations. The leftmost and rightmost columns are aligned with the margins.

a_{11}& =b_{11}&
a_{12}& =b_{12}\\
a_{21}& =b_{21}&
a_{22}& =b_{22}+c_{22} \end{flalign*}

theorem environment[edit | edit source]

The theorem environment produces "Therem x" in bold face, followed by your theorem text. [improvement needed: elaborate - how is theorem name specified?]

... theorem text

Matrix environments[edit | edit source]

Main article: Matrix environment

The matrix environments are matrix, pmatrix, bmatrix, Bmatrix, vmatrix, Vmatrix, and smallmatrix. Each provides a table for expressions, aligned in rows and columns. The main difference between the various types of matrix is the kind of delimeters that surround them.

Each row of a matrix ends with two backslashes (\\). Each column ends with an ampersand (&).

Cases environment[edit | edit source]

The cases environment is used to left-brace a group of equations or a piecewise-defined function, for example,

LaTeX markup... ...results in: ...is used for:
f(n) = \begin{cases} n/2 &\mbox{if } n \equiv 0 \\
(3n +1)/2 & \mbox{if } n \equiv 1. \end{cases} \pmod{2}
function defined piecewise

align and alignat environments[edit | edit source]

The align environment can be used to align equations.

LaTeX markup... ...results in: ...is used for:
f(x) & = (a+b)^2 \\
& = a^2+2ab+b^2
aligning a series of equations

The alignat environment can be used to align equations, and explicitly specify the number of "equation" columns. An equation column has two parts, separated by the equals-sign. Essentially, this is an array with alternating right-aligned and left-aligned columns. The required parameter of alignat is the maximum number of ampersands in a row plus 1, and then divided by 2. One use of alignat is to explicitly specify the amount of horizontal space between columns by including the required spacing in the first row.

LaTeX markup... ...results in: ...is used for:
a& =b &\quad\quad c& =d\\
aaa& =bbb& ccc& =ddd
aligning a series of equations, specifying the number of right-left pairs

For some reason, in the wikia wiki, the "align" and "alignat" environments cause errors.

[improvement needed: elaborate]

Paragraph environments[edit | edit source]

The paragraph environments are center, flushleft, flushright, minipage, quotation, quote, verbatim, and verse. Within a paragraph environment, each line must be terminated with a double backslash, \\.

Related commands are centering, raggedright, raggedleft, parbox, footnote, footnotetext, and verb

center environment[edit | edit source]

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.

flushleft environment[edit | edit source]

The flushleft environment allows you to create a paragraph consisting of lines that are flushed left, to the left-hand margin.

flushright environment[edit | edit source]

The flushright environment allows you to create a paragraph consisting of lines that are flushed right, to the right-hand margin.

minipage environment[edit | edit source]

The minipage environment is similar to the \parbox command. It is not advisable to nest minipage environments, because it messes up footnote positioning.

... text

quotation environment[edit | edit source]

The margins of the quotation environment are indented on the left and the right. The text is justified at both margins and there is paragraph indentation.

quote environment[edit | edit source]

The margins of the quotation environment are indented on the left and the right. The text is justified at both margins without paragraph indentation

verbatim environment[edit | edit source]

Uses typewriter (\tt) style, similar to the \verb command.

verse environment[edit | edit source]

The verse environment is designed for poetry. The margins are indented on the left and the right. End each lines with \\, and use a blank line to separate the stanzas.

Picture environment[edit | edit source]

\begin{picture}(width,height)(x offset,y offset)

... picture commands


picture commands are

[improvement needed: elaborate]

Table environments[edit | edit source]

tabbing environment[edit | edit source]

In the tabbing environment,

  • Tab stops are set with \=.
  • \> advances to the next tab stop.
  • \+ ends a line, and begins the next line one tab stop to the right.
  • \- ends a line, and begins the next line one tab stop to the left.

[improvement needed: elaborate]

\begin{tabbing} function \= fact(n : integer) : integer;

\> begin \= \+
\> if \= n $>$ 1 then \+
fact := n * fact(n-1) \-
else \+
fact := 1; \-\-


[improvement needed: formatting]

Related commands are


tabular environment[edit | edit source]

The tabular environment uses ampersands (&) to separate columns.

column 1 entry & column 2 entry … & column n entry




column 1 entry & column 2 entry … & column n entry



[improvement needed: elaborate]

Other environments[edit | edit source]

Thebibliography environment[edit | edit source]

The thebibliography environment is used to print a bibliography. Related commands are bibitem, cite, nocite




Titlepage environment[edit | edit source]

The titlepage environment is used to print a title page. It has no printed page number or page heading. The following page is numbered page 1. A related commands is maketitle.


... title page text


External references[edit | edit source]

Community content is available under CC-BY-SA unless otherwise noted.