A LaTeX environment is one of the following:

Float environmentsEdit

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 environmentEdit

  % 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 environmentEdit

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

List environmentsEdit

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 environmentEdit

The description environment produces a labeled list.

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



enumerate environmentEdit

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 environmentEdit

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

\item First item
\item Second item



list environmentEdit

\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 environmentsEdit

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

math environmentEdit

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 environmentEdit

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 environmentEdit

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

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

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

$ \begin{split} a& =b+c-d\\ & \quad +e-f\\ & =g+h\\ \end{split} $ aligning a series of equations

array environmentEdit

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 environmentEdit

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 environmentEdit

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 environmentEdit

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 environmentsEdit

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 environmentEdit

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

LaTeX markup... ...results in: 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}
$ 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 environmentsEdit

The align environment can be used to align equations.

LaTeX markup... ...results in: used for:
f(x) & = (a+b)^2 \\
& = a^2+2ab+b^2
$ \begin{array}{rclr} f(x) & = & (a+b)^2 & \ (2.4) \\ & = & a^2+2ab+b^2 & \ (2.5) \end{array} $ 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: used for:
a& =b &\quad\quad c& =d\\
aaa& =bbb& ccc& =ddd
$ \begin{array}{rlrlr} r&l\quad\quad\quad&r&l&(4.9)\\ a& =b &\quad\quad c& =d&(4.10)\\ aaa& =bbb& ccc& =ddd&(4.11) \end{array} $ 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 environmentsEdit

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 environmentEdit

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 environmentEdit

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

flushright environmentEdit

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

minipage environmentEdit

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 environmentEdit

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 environmentEdit

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 environmentEdit

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

verse environmentEdit

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 environmentEdit

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

... picture commands


picture commands are

[improvement needed: elaborate]

Table environmentsEdit

tabbing environmentEdit

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 environmentEdit

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 environmentsEdit

Thebibliography environmentEdit

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




Titlepage environmentEdit

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 referencesEdit