HaTeX-3.22.4.1: The Haskell LaTeX library.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.LaTeX.Packages.AMSMath

Description

amsmath is a de-facto standard package for maths in LaTeX. It is used in most scientific documents and also available by default in MathJax.

Note that many of the maths commands this module exports are actually defined in LaTeX itself, and do not really require the amsmath package. See the Text.LaTeX.Base.Math module for this minimal command-set.

Synopsis

AMSMath package

amsmath :: PackageName Source #

AMSMath package. Example:

usepackage [] amsmath

Math Environments

math :: LaTeXC l => l -> l Source #

Inline mathematical expressions.

mathDisplay :: LaTeXC l => l -> l Source #

Displayed mathematical expressions, i.e. in a seperate line / block.

equation :: LaTeXC l => l -> l Source #

A numbered mathematical equation (or otherwise math expression).

equation_ :: LaTeXC l => l -> l Source #

The unnumbered variant of equation.

align :: LaTeXC l => [l] -> l Source #

An array of aligned equations. Use & to specify the points that should horizontally match. Each equation is numbered, unless prevented by nonumber.

align_ :: LaTeXC l => [l] -> l Source #

The unnumbered variant of align.

cases :: LaTeXC l => l -> l Source #

The cases environment allows the writing of piecewise functions

Referencing

eqref :: LaTeXC l => l -> l Source #

A reference to a numbered equation. Use with a label defined in the scope of the equation refered to.

nonumber :: LaTeXC l => l Source #

Prevent an equation from being numbered, where the environment would by default do that.

Symbols and utilities

Brackets / delimiters

autoParens :: LaTeXC l => l -> l Source #

Surround a LaTeX math expression by parentheses whose height automatically matches the expression's. Translates to \left(...\right).

autoSquareBrackets :: LaTeXC l => l -> l Source #

Like autoParens, but with square brackets. Equivalent to autoBrackets"[""]".

autoBraces :: LaTeXC l => l -> l Source #

Like autoParens, but with curly brackets.

autoAngleBrackets :: LaTeXC l => l -> l Source #

Like autoParens, but with angle brackets \(\langle\) ... \(\rangle\). Equivalent to autoBrackets langle rangle.

autoBrackets :: LaTeXC l => LaTeX -> LaTeX -> l -> l Source #

Use custom LaTeX expressions as auto-scaled delimiters to surround math. Suitable delimiters include \(|\ldots|\) (absolute value), \(\|\ldots\|\) (norm, dblPipe), \(\lfloor\ldots\rfloor\) (round-off Gauss brackets, lfloor / rfloor) etc..

langle :: LaTeXC l => l Source #

Left angle bracket, \(\langle\).

rangle :: LaTeXC l => l Source #

Right angle bracket, \(\rangle\).

lfloor :: LaTeXC l => l Source #

Left floor, \(\lfloor\).

rfloor :: LaTeXC l => l Source #

Right floor, \(\rfloor\).

lceil :: LaTeXC l => l Source #

Left ceiling, \(\lceil\).

rceil :: LaTeXC l => l Source #

Right ceiling, \(\rceil\).

dblPipe :: LaTeXC l => l Source #

Double vertical line, used as delimiter for norms \(\| \ldots \|\).

Superscript and subscript

(^:) :: LaTeXC l => l -> l -> l Source #

Superscript.

(!:) :: LaTeXC l => l -> l -> l Source #

Subscript.

(!^) :: LaTeXC l => l -> (l, l) -> l Source #

Sub- and superscript, both stacked.

Function symbols

Some symbols are preceded with t to be distinguished from predefined Haskell entities (like sin and cos).

tsin :: LaTeXC l => l Source #

Sine function symbol.

arcsin :: LaTeXC l => l Source #

Arcsine function symbol.

tcos :: LaTeXC l => l Source #

Cosine function symbol.

arccos :: LaTeXC l => l Source #

Arccosine function symbol.

ttan :: LaTeXC l => l Source #

Tangent function symbol.

arctan :: LaTeXC l => l Source #

Arctangent function symbol.

cot :: LaTeXC l => l Source #

Cotangent function symbol.

arccot :: LaTeXC l => l Source #

Arccotangent function symbol.

tsinh :: LaTeXC l => l Source #

Hyperbolic sine function symbol.

tcosh :: LaTeXC l => l Source #

Hyperbolic cosine function symbol.

ttanh :: LaTeXC l => l Source #

Hyperbolic tangent function symbol.

coth :: LaTeXC l => l Source #

Hyperbolic cotangent function symbol.

sec :: LaTeXC l => l Source #

Secant function symbol.

csc :: LaTeXC l => l Source #

Cosecant function symbol.

texp :: LaTeXC l => l Source #

Exponential function symbol.

tlog :: LaTeXC l => l Source #

Logarithm function symbol.

ln :: LaTeXC l => l Source #

Natural logarithm symbol.

tsqrt :: LaTeXC l => Maybe l -> l -> l Source #

Root notation. Use tsqrt (Just n) x for the nth root of x. When Nothing is supplied, the function will output a square root.

Custom function symbols

operatorname :: LaTeXC l => l -> l Source #

Defines a new function symbol. Note that function symbols defined in this way will not be automatically translated by babel.

Summation / integration / differentiation / relations

tsum :: LaTeXC l => l Source #

Sigma sumation symbol \(\sum\). Use sumFromTo instead if you want to specify the limits of the sum.

sumFromTo Source #

Arguments

:: LaTeXC l 
=> l

Expression below the sigma.

-> l

Expression above the sigma.

-> l 

Sigma sumation symbol with limits, like \[\sum_0^n\].

prod :: LaTeXC l => l Source #

Pi product symbol \(\prod\). Use prodFromTo if you want to specify the limits of the product.

prodFromTo Source #

Arguments

:: LaTeXC l 
=> l

Expression below the pi.

-> l

Expression above the pi.

-> l 

Pi product symbol with limits, like \[\prod_0^n\].

coprod :: LaTeXC l => l Source #

Coproduct symbol \(\coprod\). Use coprodFromTo if you want to specify the limits of the coproduct.

coprodFromTo Source #

Arguments

:: LaTeXC l 
=> l

Expression below.

-> l

Expression above.

-> l 

Coproduct symbol with limits, like \[\coprod_0^n\].

integral :: LaTeXC l => l Source #

Integral symbol. Use integralFromTo if you want to specify the limits of the integral.

integralFromTo Source #

Arguments

:: LaTeXC l 
=> l

Lower limit of integration.

-> l

Upper limit of integration.

-> l 

Integral symbol with limits of integration. \(\int\limits_{-1}^1\)

partial :: LaTeXC l => l Source #

Partial-differentiation symbol \(\partial\)

totald :: LaTeXC l => l Source #

Total-differentiation (or integration-variable) symbol d (non-italic!) To be used as frac (totald) (totald<>"x")\(\frac{\mathrm{d}}{\mathrm{d}x}\).

partialOf :: LaTeXC l => l -> l Source #

Partial-differentiation of variable, e.g. frac (partialOf h) (partialOf t)\(\frac{\partial h}{\partial t}\).

totaldOf :: LaTeXC l => l -> l Source #

Total-differentiation of variable, or integration over variable. To be used as

integralFromTo 0 infty $ totaldOf "x" <> "f(x)"

\[\int\limits_0^\infty\mathrm{d}x f(x),\] or frac (totaldOf"f") (totaldOf"x")\(\frac{\mathrm{d}f}{\mathrm{d}x}\).

bigcup :: LaTeXC l => l Source #

Big union symbol \(\bigcup\). Use bigcupFromTo if you want to specify the limits of the union.

bigcupFromTo Source #

Arguments

:: LaTeXC l 
=> l

Expression below.

-> l

Expression above.

-> l 

Big union symbol with limits, like \[\bigcup_0^n\].

bigcap :: LaTeXC l => l Source #

Big intersection symbol \(\bigcap\). Use bigcapFromTo if you want to specify the limits of the intersection.

bigcapFromTo Source #

Arguments

:: LaTeXC l 
=> l

Expression below.

-> l

Expression above.

-> l 

Big intersection symbol with limits, like \[\bigcap_0^n\].

Operator symbols

Arithmetic

(+-) :: LaTeXC l => l -> l -> l infixl 6 Source #

Plus-or-minus operator \(\pm\). Also available as symbol pm.

(-+) :: LaTeXC l => l -> l -> l infixl 6 Source #

Minus-or-plus operator \(\mp\). Also available as symbol mp.

cdot :: LaTeXC l => l -> l -> l Source #

Centered-dot operator \(\cdot\).

times :: LaTeXC l => l -> l -> l Source #

"x-cross" multiplication operator \(\times\).

div_ :: LaTeXC l => l -> l -> l Source #

Division operator \(\div\).

frac :: LaTeXC l => l -> l -> l Source #

Fraction operator, like frac 1 2\(\frac12\).

tfrac :: LaTeXC l => l -> l -> l Source #

Like frac but smaller (uses subscript size for the numerator and denominator.

(*:) :: LaTeXC l => l -> l -> l infixl 7 Source #

Asterisk operator \(\ast\).

infixl 7 *:

star :: LaTeXC l => l -> l -> l Source #

Star operator \(\star\).

circ :: LaTeXC l => l -> l -> l Source #

Ring operator \(\circ\).

bullet :: LaTeXC l => l -> l -> l Source #

Bullet operator \(\bullet\).

Comparison

(=:) :: LaTeXC l => l -> l -> l infixr 4 Source #

Simple equals sign \(=\).

infixr 4 =:

(/=:) :: LaTeXC l => l -> l -> l infixr 4 Source #

Not equal \(\neq\).

infixr 4 /=:

(<:) :: LaTeXC l => l -> l -> l Source #

Lesser \(<\).

(<=:) :: LaTeXC l => l -> l -> l Source #

Lesser or equal \(\leq\).

(>:) :: LaTeXC l => l -> l -> l Source #

Greater \(>\).

(>=:) :: LaTeXC l => l -> l -> l Source #

Greater or equal \(\geq\).

ll :: LaTeXC l => l -> l -> l Source #

Much less \(\ll\).

gg :: LaTeXC l => l -> l -> l Source #

Much greater \(\gg\).

equiv :: LaTeXC l => l -> l -> l Source #

Identical / defined-as / equivalent \(\equiv\).

propto :: LaTeXC l => l -> l -> l Source #

Proportional-to \(\propto\).

parallel :: LaTeXC l => l -> l -> l Source #

Parallel \(\parallel\).

perp :: LaTeXC l => l -> l -> l Source #

Perpendicular \(\perp\). This is the infix version of bot.

approx :: LaTeXC l => l -> l -> l Source #

Approximate equality \(\approx\)

sim :: LaTeXC l => l -> l -> l Source #

Generic equivalence relation \(\sim\).

simeq :: LaTeXC l => l -> l -> l Source #

Equivalence relation \(\simeq\). Sometimes used for approximate equality or isomorphism.

cong :: LaTeXC l => l -> l -> l Source #

Congruence \(\cong\).

Sets

in_ :: LaTeXC l => l -> l -> l Source #

Element-of \(\in\).

ni :: LaTeXC l => l -> l -> l Source #

Mirrored element-of \(\ni\).

notin :: LaTeXC l => l -> l -> l Source #

Not element of \(\notin\).

subset :: LaTeXC l => l -> l -> l Source #

Subset-of \(\subset\).

supset :: LaTeXC l => l -> l -> l Source #

Superset-of \(\supset\).

subseteq :: LaTeXC l => l -> l -> l Source #

Subset-of-or-equal \(\subseteq\).

supseteq :: LaTeXC l => l -> l -> l Source #

Superset-of-or-equal \(\supseteq\).

cap :: LaTeXC l => l -> l -> l Source #

Set intersection \(\cap\).

cup :: LaTeXC l => l -> l -> l Source #

Set union \(\cup\).

setminus :: LaTeXC l => l -> l -> l Source #

Set minus \(\setminus\).

Misc operators

vee :: LaTeXC l => l -> l -> l Source #

Angle pointing downwards \(\vee\).

wedge :: LaTeXC l => l -> l -> l Source #

Angle pointing upwards \(\wedge\).

oplus :: LaTeXC l => l -> l -> l Source #

Circled plus operator \(\oplus\).

ominus :: LaTeXC l => l -> l -> l Source #

Circled minus operator \(\ominus\).

otimes :: LaTeXC l => l -> l -> l Source #

Circled multiplication cross \(\otimes\).

oslash :: LaTeXC l => l -> l -> l Source #

Circled slash \(\oslash\).

odot :: LaTeXC l => l -> l -> l Source #

Circled dot operator \(\odot\).

Accents

hat :: LaTeXC l => l -> l Source #

Add a hat accent above a symbol, like \(\hat{x}\).

tilde :: LaTeXC l => l -> l Source #

Add a tilde accent above a symbol, like \(\tilde{y}\).

bar :: LaTeXC l => l -> l Source #

Add a bar accent above a symbol, like \(\bar{z}\).

vec :: LaTeXC l => l -> l Source #

Add a vector arrow accent above a symbol, like \(\vec{v}\).

widehat :: LaTeXC l => l -> l Source #

Add a wide hat accent above a symbol, like \(\widehat{w}\).

widetilde :: LaTeXC l => l -> l Source #

Add a wide tilde accent above a symbol, like \(\widetilde{u}\).

dot :: LaTeXC l => l -> l Source #

Add a dot accent above a symbol, as used to denote a derivative, like \(\dot{x}\).

ddot :: LaTeXC l => l -> l Source #

Add a dot accent above a symbol, as used to denote a second derivative, like \(\ddot{y}\)

dddot :: LaTeXC l => l -> l Source #

Add a triple dot accent above a symbol, as used to denote a third derivative, like \(\dddot{z}\)

overline :: LaTeXC l => l -> l Source #

Add a wide line accent above a symbol, like \(\overline{abc}\).

Greek alphabet

Functions of greek alphabet symbols.

Uppercase versions are suffixed with u. Variants are prefixed with var. The function pi_ is ended by an underscore symbol to distinguish it from the pi Prelude function.

alpha :: LaTeXC l => l Source #

\(\alpha\) symbol.

beta :: LaTeXC l => l Source #

\(\beta\) symbol.

gamma :: LaTeXC l => l Source #

\(\gamma\) symbol.

gammau :: LaTeXC l => l Source #

\(\Gamma\) symbol.

delta :: LaTeXC l => l Source #

\(\delta\) symbol.

deltau :: LaTeXC l => l Source #

\(\Delta\) symbol.

epsilon :: LaTeXC l => l Source #

\(\epsilon\) symbol.

varepsilon :: LaTeXC l => l Source #

\(\varepsilon\) symbol.

zeta :: LaTeXC l => l Source #

\(\zeta\) symbol.

eta :: LaTeXC l => l Source #

\(\eta\) symbol.

theta :: LaTeXC l => l Source #

\(\theta\) symbol.

vartheta :: LaTeXC l => l Source #

\(\vartheta\) symbol.

thetau :: LaTeXC l => l Source #

\(\Theta\) symbol.

iota :: LaTeXC l => l Source #

\(\iota\) symbol.

kappa :: LaTeXC l => l Source #

\(\kappa\) symbol.

lambda :: LaTeXC l => l Source #

\(\lambda\) symbol.

lambdau :: LaTeXC l => l Source #

\(\Lambda\) symbol.

mu :: LaTeXC l => l Source #

\(\mu\) symbol.

nu :: LaTeXC l => l Source #

\(\nu\) symbol.

xi :: LaTeXC l => l Source #

\(\xi\) symbol.

xiu :: LaTeXC l => l Source #

\(\Xi\) symbol.

pi_ :: LaTeXC l => l Source #

\(\pi\) symbol.

varpi :: LaTeXC l => l Source #

\(\varpi\) symbol.

piu :: LaTeXC l => l Source #

\(\Pi\) symbol.

rho :: LaTeXC l => l Source #

\(\rho\) symbol.

varrho :: LaTeXC l => l Source #

\(\varrho\) symbol.

sigma :: LaTeXC l => l Source #

\(\sigma\) symbol.

varsigma :: LaTeXC l => l Source #

\(\varsigma\) symbol.

sigmau :: LaTeXC l => l Source #

\(\Sigma\) symbol.

tau :: LaTeXC l => l Source #

\(\tau\) symbol.

upsilon :: LaTeXC l => l Source #

\(\upsilon\) symbol.

upsilonu :: LaTeXC l => l Source #

\(\Upsilon\) symbol.

phi :: LaTeXC l => l Source #

\(\phi\) symbol.

varphi :: LaTeXC l => l Source #

\(\varphi\) symbol.

phiu :: LaTeXC l => l Source #

\(\Phi\) symbol.

chi :: LaTeXC l => l Source #

\(\chi\) symbol.

psi :: LaTeXC l => l Source #

\(\psi\) symbol.

psiu :: LaTeXC l => l Source #

\(\Psi\) symbol.

omega :: LaTeXC l => l Source #

\(\omega\) symbol.

omegau :: LaTeXC l => l Source #

\(\Omega\) symbol.

Other symbols

pm :: LaTeXC l => l Source #

Plus-or-minus symbol \(\pm\). Also available as infix +-.

mp :: LaTeXC l => l Source #

Minus-or-plus symbol \(\mp\).

to :: LaTeXC l => l Source #

A right-arrow, \(\to\).

mapsto :: LaTeXC l => l Source #

A right-arrow for function definitions, \(\mapsto\).

implies :: LaTeXC l => l Source #

An implication arrow, \(\implies\).

forall :: LaTeXC l => l Source #

For all symbol, \(\forall\).

exists :: LaTeXC l => l Source #

Exists symbol, \(\exists\).

dagger :: LaTeXC l => l Source #

Dagger symbol, \(\dagger\).

ddagger :: LaTeXC l => l Source #

Double dagger symbol, \(\ddagger\).

infty :: LaTeXC l => l Source #

Infinity symbol, \(\infty\).

imath :: LaTeXC l => l Source #

Dotless letter i, \(\imath\).

jmath :: LaTeXC l => l Source #

Dotless letter j, \(\jmath\).

bot :: LaTeXC l => l Source #

Bottom symbol, \(\bot\). For the infix version see perp.

Fonts

mathdefault :: LaTeXC l => l -> l Source #

Default math symbol font.

mathbf :: LaTeXC l => l -> l Source #

Bold face, like \(\mathbf{Abc}\).

mathrm :: LaTeXC l => l -> l Source #

Roman, i.e. not-italic math, \(\mathrm{deF}\)

text :: LaTeXC l => l -> l Source #

Escape from math mode, into a normal-text box. Unlike mathrm, this won't squash spaces, i.e. you can write actual sentences. You can embed math again within such a box.

mathcal :: LaTeXC l => l -> l Source #

Calligraphic math symbols. Only works (reliably) with uppercase letters, like \(\mathcal{LMN}\).

mathsf :: LaTeXC l => l -> l Source #

Sans-serif math, \(\mathsf{xyz}\).

mathtt :: LaTeXC l => l -> l Source #

Typewriter font, \(\mathtt{ijk}\).

mathit :: LaTeXC l => l -> l Source #

Italic math. Uses the same glyphs as mathdefault, but with spacings intended for multi-character symbols rather than juxtaposition of single-character symbols.

Matrices

pmatrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l Source #

LaTeX rendering of a matrix using pmatrix and a custom function to render cells. Optional argument sets the alignment of the cells. Default (providing Nothing) is centered.

\[ \begin{pmatrix} 0 & 1 \\ 2 & 3 \end{pmatrix} \]

bmatrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l Source #

LaTeX rendering of a matrix using bmatrix and a custom function to render cells. Optional argument sets the alignment of the cells. Default (providing Nothing) is centered.

\[ \begin{bmatrix} 0 & 1 \\ 2 & 3 \end{bmatrix} \]

b2matrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l Source #

LaTeX rendering of a matrix using Bmatrix and a custom function to render cells. Optional argument sets the alignment of the cells. Default (providing Nothing) is centered.

\[ \begin{Bmatrix} 0 & 1 \\ 2 & 3 \end{Bmatrix} \]

vmatrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l Source #

LaTeX rendering of a matrix using vmatrix and a custom function to render cells. Optional argument sets the alignment of the cells. Default (providing Nothing) is centered.

\[ \begin{vmatrix} 0 & 1 \\ 2 & 3 \end{vmatrix} \]

v2matrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l Source #

LaTeX rendering of a matrix using Vmatrix and a custom function to render cells. Optional argument sets the alignment of the cells. Default (providing Nothing) is centered.

\[ \begin{Vmatrix} 0 & 1 \\ 2 & 3 \end{Vmatrix} \]

Math spacing

quad :: LaTeXC l => l Source #

Space equal to the current font size (= 18 mu). \(a\quad b\)

qquad :: LaTeXC l => l Source #

Twice of quad (= 36 mu). \(a\qquad b\)

thinspace :: LaTeXC l => l Source #

, space equal to 3/18 of quad (= 3 mu). \(a\,b\)

medspace :: LaTeXC l => l Source #

: space equal to 4/18 of quad (= 4 mu). \(a\:b\)

thickspace :: LaTeXC l => l Source #

: space equal to 5/18 of quad (= 5 mu). \(a\;b\)

negspace :: LaTeXC l => l Source #

! space equal to -3/18 of quad (= -3 mu). \(a\!b\)

space :: LaTeXC l => l Source #

(space after backslash) equivalent of space in normal text. \(a\ b\)

Orphan instances

Texy a => Texy (Ratio a) Source #

Instance defined in Text.LaTeX.Packages.AMSMath.

Instance details

Methods

texy :: LaTeXC l => Ratio a -> l Source #

Texy a => Texy (Matrix a) Source #

Instance defined in Text.LaTeX.Packages.AMSMath.

Instance details

Methods

texy :: LaTeXC l => Matrix a -> l Source #

Texy a => Texy [a] Source #

Instance defined in Text.LaTeX.Packages.AMSMath.

Instance details

Methods

texy :: LaTeXC l => [a] -> l Source #

(Texy a, Texy b) => Texy (a, b) Source #

Instance defined in Text.LaTeX.Packages.AMSMath.

Instance details

Methods

texy :: LaTeXC l => (a, b) -> l Source #

(Texy a, Texy b, Texy c) => Texy (a, b, c) Source #

Instance defined in Text.LaTeX.Packages.AMSMath.

Instance details

Methods

texy :: LaTeXC l => (a, b, c) -> l Source #

(Texy a, Texy b, Texy c, Texy d) => Texy (a, b, c, d) Source #

Instance defined in Text.LaTeX.Packages.AMSMath.

Instance details

Methods

texy :: LaTeXC l => (a, b, c, d) -> l Source #