Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 :: PackageName
- math :: LaTeXC l => l -> l
- mathDisplay :: LaTeXC l => l -> l
- equation :: LaTeXC l => l -> l
- equation_ :: LaTeXC l => l -> l
- align :: LaTeXC l => [l] -> l
- align_ :: LaTeXC l => [l] -> l
- cases :: LaTeXC l => l -> l
- eqref :: LaTeXC l => l -> l
- nonumber :: LaTeXC l => l
- autoParens :: LaTeXC l => l -> l
- autoSquareBrackets :: LaTeXC l => l -> l
- autoBraces :: LaTeXC l => l -> l
- autoAngleBrackets :: LaTeXC l => l -> l
- autoBrackets :: LaTeXC l => LaTeX -> LaTeX -> l -> l
- langle :: LaTeXC l => l
- rangle :: LaTeXC l => l
- lfloor :: LaTeXC l => l
- rfloor :: LaTeXC l => l
- lceil :: LaTeXC l => l
- rceil :: LaTeXC l => l
- dblPipe :: LaTeXC l => l
- (^:) :: LaTeXC l => l -> l -> l
- (!:) :: LaTeXC l => l -> l -> l
- (!^) :: LaTeXC l => l -> (l, l) -> l
- tsin :: LaTeXC l => l
- arcsin :: LaTeXC l => l
- tcos :: LaTeXC l => l
- arccos :: LaTeXC l => l
- ttan :: LaTeXC l => l
- arctan :: LaTeXC l => l
- cot :: LaTeXC l => l
- arccot :: LaTeXC l => l
- tsinh :: LaTeXC l => l
- tcosh :: LaTeXC l => l
- ttanh :: LaTeXC l => l
- coth :: LaTeXC l => l
- sec :: LaTeXC l => l
- csc :: LaTeXC l => l
- texp :: LaTeXC l => l
- tlog :: LaTeXC l => l
- ln :: LaTeXC l => l
- tsqrt :: LaTeXC l => Maybe l -> l -> l
- operatorname :: LaTeXC l => l -> l
- tsum :: LaTeXC l => l
- sumFromTo :: LaTeXC l => l -> l -> l
- prod :: LaTeXC l => l
- prodFromTo :: LaTeXC l => l -> l -> l
- coprod :: LaTeXC l => l
- coprodFromTo :: LaTeXC l => l -> l -> l
- integral :: LaTeXC l => l
- integralFromTo :: LaTeXC l => l -> l -> l
- partial :: LaTeXC l => l
- totald :: LaTeXC l => l
- partialOf :: LaTeXC l => l -> l
- totaldOf :: LaTeXC l => l -> l
- bigcup :: LaTeXC l => l
- bigcupFromTo :: LaTeXC l => l -> l -> l
- bigcap :: LaTeXC l => l
- bigcapFromTo :: LaTeXC l => l -> l -> l
- (+-) :: LaTeXC l => l -> l -> l
- (-+) :: LaTeXC l => l -> l -> l
- cdot :: LaTeXC l => l -> l -> l
- times :: LaTeXC l => l -> l -> l
- div_ :: LaTeXC l => l -> l -> l
- frac :: LaTeXC l => l -> l -> l
- tfrac :: LaTeXC l => l -> l -> l
- (*:) :: LaTeXC l => l -> l -> l
- star :: LaTeXC l => l -> l -> l
- circ :: LaTeXC l => l -> l -> l
- bullet :: LaTeXC l => l -> l -> l
- (=:) :: LaTeXC l => l -> l -> l
- (/=:) :: LaTeXC l => l -> l -> l
- (<:) :: LaTeXC l => l -> l -> l
- (<=:) :: LaTeXC l => l -> l -> l
- (>:) :: LaTeXC l => l -> l -> l
- (>=:) :: LaTeXC l => l -> l -> l
- ll :: LaTeXC l => l -> l -> l
- gg :: LaTeXC l => l -> l -> l
- equiv :: LaTeXC l => l -> l -> l
- propto :: LaTeXC l => l -> l -> l
- parallel :: LaTeXC l => l -> l -> l
- perp :: LaTeXC l => l -> l -> l
- in_ :: LaTeXC l => l -> l -> l
- ni :: LaTeXC l => l -> l -> l
- notin :: LaTeXC l => l -> l -> l
- subset :: LaTeXC l => l -> l -> l
- supset :: LaTeXC l => l -> l -> l
- cap :: LaTeXC l => l -> l -> l
- cup :: LaTeXC l => l -> l -> l
- setminus :: LaTeXC l => l -> l -> l
- vee :: LaTeXC l => l -> l -> l
- wedge :: LaTeXC l => l -> l -> l
- oplus :: LaTeXC l => l -> l -> l
- ominus :: LaTeXC l => l -> l -> l
- otimes :: LaTeXC l => l -> l -> l
- oslash :: LaTeXC l => l -> l -> l
- odot :: LaTeXC l => l -> l -> l
- hat :: LaTeXC l => l -> l
- tilde :: LaTeXC l => l -> l
- bar :: LaTeXC l => l -> l
- vec :: LaTeXC l => l -> l
- widehat :: LaTeXC l => l -> l
- widetilde :: LaTeXC l => l -> l
- dot :: LaTeXC l => l -> l
- ddot :: LaTeXC l => l -> l
- dddot :: LaTeXC l => l -> l
- overline :: LaTeXC l => l -> l
- alpha :: LaTeXC l => l
- beta :: LaTeXC l => l
- gamma :: LaTeXC l => l
- gammau :: LaTeXC l => l
- delta :: LaTeXC l => l
- deltau :: LaTeXC l => l
- epsilon :: LaTeXC l => l
- varepsilon :: LaTeXC l => l
- zeta :: LaTeXC l => l
- eta :: LaTeXC l => l
- theta :: LaTeXC l => l
- vartheta :: LaTeXC l => l
- thetau :: LaTeXC l => l
- iota :: LaTeXC l => l
- kappa :: LaTeXC l => l
- lambda :: LaTeXC l => l
- lambdau :: LaTeXC l => l
- mu :: LaTeXC l => l
- nu :: LaTeXC l => l
- xi :: LaTeXC l => l
- xiu :: LaTeXC l => l
- pi_ :: LaTeXC l => l
- varpi :: LaTeXC l => l
- piu :: LaTeXC l => l
- rho :: LaTeXC l => l
- varrho :: LaTeXC l => l
- sigma :: LaTeXC l => l
- varsigma :: LaTeXC l => l
- sigmau :: LaTeXC l => l
- tau :: LaTeXC l => l
- upsilon :: LaTeXC l => l
- upsilonu :: LaTeXC l => l
- phi :: LaTeXC l => l
- varphi :: LaTeXC l => l
- phiu :: LaTeXC l => l
- chi :: LaTeXC l => l
- psi :: LaTeXC l => l
- psiu :: LaTeXC l => l
- omega :: LaTeXC l => l
- omegau :: LaTeXC l => l
- pm :: LaTeXC l => l
- mp :: LaTeXC l => l
- to :: LaTeXC l => l
- mapsto :: LaTeXC l => l
- implies :: LaTeXC l => l
- forall :: LaTeXC l => l
- exists :: LaTeXC l => l
- dagger :: LaTeXC l => l
- ddagger :: LaTeXC l => l
- infty :: LaTeXC l => l
- imath :: LaTeXC l => l
- jmath :: LaTeXC l => l
- bot :: LaTeXC l => l
- mathdefault :: LaTeXC l => l -> l
- mathbf :: LaTeXC l => l -> l
- mathrm :: LaTeXC l => l -> l
- text :: LaTeXC l => l -> l
- mathcal :: LaTeXC l => l -> l
- mathsf :: LaTeXC l => l -> l
- mathtt :: LaTeXC l => l -> l
- mathit :: LaTeXC l => l -> l
- pmatrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l
- bmatrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l
- b2matrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l
- vmatrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l
- v2matrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l
- quad :: LaTeXC l => l
- qquad :: LaTeXC l => l
- thinspace :: LaTeXC l => l
- medspace :: LaTeXC l => l
- thickspace :: LaTeXC l => l
- negspace :: LaTeXC l => l
- space :: LaTeXC l => l
AMSMath package
amsmath :: PackageName Source #
AMSMath package. Example:
usepackage [] amsmath
Math Environments
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).
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
The unicode approximations do, of course, not reliably represent how LaTeX renders these symbols.
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
dblPipe :: LaTeXC l => l Source #
Double vertical line, used as delimiter for norms \(\| \ldots \|\).
Superscript and subscript
Function symbols
Some symbols are preceded with t to be distinguished from
predefined Haskell entities (like sin
and cos
).
tsqrt :: LaTeXC l => Maybe l -> l -> l Source #
Root notation. Use tsqrt (Just n) x
for the n
th 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.
:: 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.
:: 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.
:: 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.
:: LaTeXC l | |
=> l | Lower limit of integration. |
-> l | Upper limit of integration. |
-> l |
Integral symbol with limits of integration. \(\int\limits_{-1}^1\)
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.
:: 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.
:: 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
.
tfrac :: LaTeXC l => l -> l -> l Source #
Like frac
but smaller (uses subscript size for the numerator and denominator.
Comparison
Sets
Misc operators
Accents
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.
varepsilon :: LaTeXC l => l Source #
\(\varepsilon\) symbol.
Other symbols
Fonts
mathdefault :: LaTeXC l => l -> l Source #
Default math symbol font.
mathcal :: LaTeXC l => l -> l Source #
Calligraphic math symbols. Only works (reliably) with uppercase letters, like \(\mathcal{LMN}\).
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
thickspace :: LaTeXC l => l Source #
:
space equal to 5/18 of quad (= 5 mu). \(a\;b\)
space :: LaTeXC l => l Source #
(space after backslash) equivalent of space in normal text. \(a\ b\)
Orphan instances
Texy a => Texy [a] Source # | Instance defined in Text.LaTeX.Packages.AMSMath. |
Texy a => Texy (Ratio a) Source # | Instance defined in Text.LaTeX.Packages.AMSMath. |
Texy a => Texy (Matrix a) Source # | Instance defined in Text.LaTeX.Packages.AMSMath. |
(Texy a, Texy b) => Texy (a, b) Source # | Instance defined in Text.LaTeX.Packages.AMSMath. |
(Texy a, Texy b, Texy c) => Texy (a, b, c) Source # | Instance defined in Text.LaTeX.Packages.AMSMath. |
(Texy a, Texy b, Texy c, Texy d) => Texy (a, b, c, d) Source # | Instance defined in Text.LaTeX.Packages.AMSMath. |