Tex Syntax Print
Tex Syntax Print
All ‘collapsing paragraphs’ were opened up, so the document is completely visible.
The web page was stripped of extraneous materials (headers, footers, ads)
and then converted to a pdf file.
Page breaks were added to start most sections on a new page; page numbers were added.
Other than this, the print version is identical to its online version.
This print version (of course) lacks the dynamic benefits of the actual web page.
For full functionality, visit the online web page.
I (Dr. Carol JVF Burns) prepared this page to thoroughly familiarize myself with the TEX commands that are available in MathJax,
and to provide a resource that may be useful to other MathJax users.
Davide Cervone, the lead developer of MathJax, has most generously provided extensive edits,
and this page is greatly improved due to his efforts; I owe him countless thanks.
All mistakes on this page are my own (and I welcome suggestions and corrections).
Please contact me via the contact form on my homepage.
The TEX commands available in MathJax are listed alphabetically on this page, each with a brief description.
Everything is on this single page, instead of (say) having each letter as its own page.
My decision is that the advantages of this approach outweigh the disadvantage:
ADVANTAGES DISADVANTAGE
• You can easily scroll through and use ‘find’ features on everything at once,
making it more likely to find what you're looking for, even if you don't know its name.
• You can use this page as a ‘MathJax torture test’. This is a big page.
If it loads in an acceptable time, and displays things acceptably, then you're all set. There is lots of MathJax to process.
• It's easier to compare different viewing environments with everything on the same page. Load time may not be insignificant.
• You can do stretching exercises while the page loads,
and improve your flexibility while you're learning about MathJax.
If it is important to distinguish between display mode and inline mode, then these differences will be clearly indicated.
• The following information is provided for each table element (as appropriate):
◦ command name (e.g., \alpha )
◦ extension information:
MathJax includes nearly all the Plain TEX math macros, and many of the LT
A X macros and environments;
E
however, not everything is implemented in the core TEX input processor.
Some less frequently used commands are defined in extensions, like AMSsymbols or AMSmath .
symbols
A |B |C |D |E |F |G |H |I|J|K |L |M |N |O |P |Q |R |S |T |U |V |W |X |Y |Z
environments
Know the shape of a character that you want, but not its name? Draw it here!
Example:
$$
% Note: (x+1)^2 is NOT x^2 + 1
(x+1)^2 % original expression
= (x+1)(x+1) % definition of exponent
yields (x + 1)2 = (x + 1)(x + 1) = x2 + 2x + 1
= x^2 + 2x + 1 % FOIL, combine like terms
$$
becomes
\begin{equation} % some comment a = b + c \end{equation}
Examples:
\begin{matrix}
a & b\cr a b
c & d
yields
c d
\end{matrix}
Examples:
^i yields i
Examples:
_2 yields 2
yields
\underbrace{x+\cdots+x} x+⋯+x
_{n\text{ times}} n times
ARGUMENTS:
In this documentation, arguments are indicated by #1, #2, etc.
An argument is either a single ‘token’ (like ‘a’ or ‘\alpha’), or is a group enclosed in braces.
For example, the \boldsymbol command takes an argument, notated by:
\boldsymbol #1
Thus:
\boldsymbol aa yields aa the first token, ‘a’, becomes bold
\boldsymbol \alpha\alpha yields αα the first token, ‘\alpha’, becomes bold
braces have been used to make the
\boldsymbol{a\alpha}a\alpha yields aαaα argument the group ‘a\alpha’,
so both become bold
BRACED GROUPS:
A ‘braced group’ is a group, enclosed by braces, inside which some behavior is in force.
The \bf (boldface) command operates inside a braced group, notated by:
{\bf ... }
Here, \bf is a switch, which ‘turns on’ boldface inside the braced group;
boldface ends when the braced group ends.
Sometimes, you may not see the opening ‘{’ that signals the start of a braced group.
In this situation, when does a command (like \bf ) end?
It ends at whichever occurs first:
• it is replaced by a competing command (e.g., \bf is replaced by \rm )
• the end of math mode (math delimiters form an implicit local group)
Examples: (explicit braced groups are indicated in red, for your convenience)
turn on boldface;
\bf ab yields ab
stays on to end of math mode
an explicit braced group is entered;
{\bf ab}cd yields abcd
the ‘cd’ falls outside this group
\bf{ab}cd yields abcd turn on boldface;
stays on to end of math mode;
the braces here are extraneous
Examples:
\rm IR yields IR
\rm I\! R yields IR
see also: \negthinspace
1 3
\, \, thin space (normally 6
= 18
of a quad)
2 4
\: \: medium space (normally 9
= 18 of a quad)
\> \> alternate medium space
5
\; \; thick space (normally 18
of a quad)
Examples:
normal spacing between letters: abababab
using \, between letters: abababab
using \: between letters: abababab
using \> between letters: abababab
using \; between letters: abababab
Examples:
\rm This is a sentence. yields Thisisasentence.
\rm This\ is\ a\ sentence. yields This is a sentence.
\rm This~is~a~sentence. yields This is a sentence.
\text{This is a sentence.} yields This is a sentence.
in MathJax, this is the same as: \nobreakspace, \space, ~ (tilde character)
see also: \text
~ (tilde character) In TEX this is a non-breaking space—i.e., a blank space where TEX is not allowed to class ORD
break between lines.
MathJax (unlike TEX ) doesn't do any automatic breaking of lines, so MathJax will not
break at any space.
The tilde is useful to force a space where MathJax would otherwise collapse or ignore
spaces, as illustrated in the examples below.
Click here to see examples of what happens with very long math in MathJax.
Examples:
\rm Dr. Carol J.V. Fisher yields Dr. CarolJ. V. Fisher
\rm Dr.~Carol~J.V.~Fisher yields Dr. Carol J. V. Fisher
\text{Dr. Carol J.V. Fisher} yields Dr. Carol J.V. Fisher
a b c d yields abcd
a~b~~~~~~c~d yields a b cd
in MathJax, this is the same as: \nobreakspace, \space, \ (backslash space)
\# # literal number sign; literal pound sign; # class ORD
needed since # is used to indicate arguments in definitions
Example:
a
\begin{gather}a\\a+b\\a+b+c\end{gather} yields a+b
a+b+c
For a literal backslash, see \backslash.
Examples:
a_2 yields a2
a\_2 yields a_2
Examples:
{1,2,3} yields 1, 2, 3
\{1,2,3\} yields {1, 2, 3}
yields { b , c}
a
\left\{\frac ab,c\right\}
Examples:
|x| yields |x|
a
|\frac ab| yields | b |
yields ∣∣ b ∣∣
a
\left|\frac ab\right|
Examples:
\|x\| yields ∥x∥
a
\|\frac ab\| yields ∥ b ∥
Examples:
a
(\frac ab,c) yields ( b , c)
yields ( b , c)
a
\left(\frac ab,c\right)
Example:
a/b yields a/b
Example:
a+b yields a + b
Example:
a-b yields a − b
-b yields −b in most cases, proper spacing is achieved
to denote an opposite
\text{first: } -a\star b yields first: − a ⋆ b an unusual situation;
spacing is not optimal
\text{first: } {-}a\star b yields first: −a ⋆ b in such cases, you can put the minus sign
(or, the group -a ) inside braces
to suppress extra space
Examples:
a
[\frac ab,c] yields [ b , c]
yields [ b , c]
a
\left[\frac ab,c\right]
Example:
f(x) = x^2,\
f'(x) = 2x,\ yields f(x) = x2 , f ′ (x) = 2x, f ′′ (x) = 2
f''(x) = 2
There are separate local groups for subformula1 and subformula2 ; if these local groups are not explicit,
then unexpected results may occur, as illustrated in the choose discussion.
Examples:
a+1
a+1 \above 1pt b yields b
a
a \above 1pt b+2 yields b+2
a+1
{a+1 \above 1.5pt b+2}+c yields +c
b+2
There are separate local groups for subformula1 and subformula2 ; if these local groups are not explicit,
then unexpected results may occur, as illustrated in the choose discussion.
Examples:
a+1
a+1 \abovewithdelims [ ] 1pt b yields [ b
]
a
{a \abovewithdelims . | 1.5pt b+2}_{a=3} yields ∣
b+2 a=3
a+1
{a+1 \abovewithdelims \{ \} 1pt b+2}+c yields { b+2 } + c
Examples:
\acute e yields é
\acute E yields É
\acute eu yields éu
\acute{eu} yields eu
´
\aleph ℵ Hebrew letter aleph; ℵ class ORD
commonly used for the cardinality of the real numbers
\alpha α lowercase Greek letter alpha α class ORD
\amalg ⨿ this symbol is often used for co-products ⨿ class BIN
\And & ampersand & class ORD
Example:
a b+1
\array{ a & b+1 \cr c+1 & d } yields
c+1 d
There are separate local groups for subformula1 and subformula2 ; if these local groups are not explicit,
then unexpected results may occur, as illustrated in the choose discussion.
Examples:
a
a \atop b yields b
a+1
a+1 \atop b+2 yields b+2
a+1
{a+1 \atop b+2}+c yields b+2 +c
There are separate local groups for subformula1 and subformula2 ; if these local groups are not explicit,
then unexpected results may occur, as illustrated in the choose discussion.
Examples:
a
a \atopwithdelims [ ] b yields [ b ]
a+1
a+1 \atopwithdelims . | b+2 yields b+2
∣
a+1
{a+1 \atopwithdelims \{ \} b+2}+c yields { b+2} + c
\bar #1
Usually, #1 is a single letter; otherwise, bar is centered over argument.
Examples:
\bar x yields x̄
\bar X yields X̄
\bar xy yields x̄y
¯
\bar{xy} yields xy
\Bbb #1
Whether lower-case letters are displayed in blackboard-bold, or not, depends on the fonts being used.
The MathJax web-based fonts don't have lowercase blackboard-bold, but the STIX fonts do;
so users with the STIX fonts installed will be able to display lowercase blackboard-bold letters.
Examples:
\Bbb R yields R
\Bbb ZR yields ZR
\Bbb{AaBbKk}Cc yields AaBbKkCc
\Bbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ} yields ABCDEFGHIJKLMNOPQRSTUVWXYZ
{\bf ... }
Examples:
\bf AaBb\alpha\beta123 yields AaBbαβ123
{\bf A B} A B yields ABAB
\bf AB \rm CD yields ABCD
\bf{AB}CD yields ABCD
[ [ [ [ [
The spacing for these differ (but may not always be apparent, as it depends on the class of what is next to
it).
For example, $x\big| y$ ( x∣∣y ) has less space than $x\bigm| y$ ( x ∣ y ).
Therefore, these commands affect typeset results in a fundamental way;
it is best to use the form appropriate for the position of the desired delimiter.
\bigcap ⋂ changes size; ⋂ class OP
can change limit placement using \limits and \nolimits;
see the Big Operators Table for examples
\bigcirc ◯ ◯ class BIN
\boldsymbol #1
Examples:
\boldsymbol aa yields aa
\boldsymbol \alpha\alpha yields αα
\boldsymbol{a\alpha}a\alpha yields aαaα
x+3
\boldsymbol{a+2+\alpha+\frac{x+3}{\beta+4}} yields a + 2 + α + β+4
x+3
\mathbf{a+2+\alpha+\frac{x+3}{\beta+4}} yields a + 2 + α + β+4
\boxed{ab} yields ab
\boxed{ab\strut} yields ab
\breve #1
Usually, #1 is a single letter; otherwise, accent is centered over argument.
Examples:
\breve e yields ĕ
\breve E yields Ĕ
Examples:
αβ
\buildrel \alpha\beta \over \longrightarrow yields ⟶
def
\buildrel \rm def \over {:=} yields :=
1
3
\frac{\bcancel{\frac13}}{\bcancel{\frac13}} = 1 yields 1
=1
3
Example:
|x| =
\cases{
x & \text{if } x\ge 0\cr yields |x| = { x if x ≥ 0
-x & \text{if } x\lt 0 −x if x < 0
}
Examples:
a\cdot b yields a ⋅ b
a\cdotp b yields a⋅ b
a\centerdot b yields a ⋅ b
see also: \cdotp, \cdots, \centerdot
\cdotp ⋅ ⋅ class PUNCT
centered dot, punctuation symbol
Examples:
\rm s \cdot h yields s ⋅ h
\rm s \cdotp h yields s⋅ h
see also: \cdot, \centerdot
\cdots ⋯ ⋯ class INNER
centered dots; dot dot dot
Example:
Examples:
a\cdot b yields a ⋅ b
a\cdotp b yields a⋅ b
a\centerdot b yields a ⋅ b
see also: \cdot, \cdotp
\cfrac AMSmath use for continued fractions
\cfrac #1 #2
Examples:
2
\frac{2}{1+\frac{2}{1+\frac{2}{1}}} yields 1+ 2
2
1+
1
2
2
\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1}}} yields 1+
2
1+
1
see also: \above, \abovewithdelims, \atop, \atopwithdelims,
\dfrac, \frac, \genfrac, \over, \overwithdelims
\check ˇ ˇ
check accent
\check #1
Usually, #1 is a single letter; otherwise, accent is centered over argument.
Examples:
\check o yields ǒ
\check O yields Ǒ
\check oe yields ǒe
\check{oe} ˇ
yields oe
n+1
$$n+1 \choose k+2$$ yields ( )
k+2
n
$1+{n \choose 2}+k$ yields 1 + ( 2 ) + k
Examples:
Example:
Suppose this CSS style information is provided outside of math mode:
<style type="text/css">
.smHighlightRed {
font-size:small;
background-color:yellow;
color:red;
}
</style>
Then,
ab\class{smHighlightRed}{cdef}gh yields abcdef gh
Examples:
f:A\to B yields f : A → B
f\colon A\to B yields f: A → B
Examples:
1+√5
\color{red}{ \frac{1+\sqrt{5}}{2} } yields 2
\color{#0000FF}AB yields AB
Examples:
\cos x yields cos x
\cos(2x-1) yields cos(2x − 1)
Examples:
\cosh x yields cosh x
\cosh(2x-1) yields cosh(2x − 1)
Examples:
\cot x yields cot x
\cot(2x-1) yields cot(2x − 1)
see also: \tan
\coth coth class OP
hyperbolic cotangent;
does not change size;
default limit placement is the same in both inline and display modes;
can change limit placement using \limits;
see the Big Operators Table for more examples
Examples:
\coth x yields coth x
\coth(2x-1) yields coth(2x − 1)
\cr carriage return;
line separator in alignment modes and environments
Examples:
\csc x yields csc x
\csc(2x-1) yields csc(2x − 1)
see also: \sec
\cssId [HTML] non-standard; class ORD; extension is loaded automatically when used;
used to set a MathML element's ID attribute, so it can be accessed dynamically
(e.g., to add an event handler, add CSS styling, or set display status)
\cssId #1 #2
where:
<script type="text/javascript">
function turnRed() {
document.getElementById('testID').style.color = "red";
}
</script>
A more meaningful example (with well-commented source code) is provided by Design Science, Inc.,
and shows how you can display the steps in a proof one line at a time.
\Cup AMSsymbols ⋓ ⋓ class BIN
n−1
\dbinom{n-1}k-1 yields ( )−1
k
n−1
\dbinom{n-1}{k-1} yields ( )
k−1
\dot #1
\ddot #1
\dddot #1
\ddddot #1
Usually, #1 is a single letter; otherwise, accent is centered over argument.
Examples:
\dot x yields ẋ
\ddot x yields ẍ
...
\dddot x yields x
....
\ddddot x yields x
\ddot x(t) yields ẍ(t)
....
\ddddot{y(x)} yields y(x)
A named operator is available in any mathematics that appears after it is defined on the page.
Examples:
myOp(x) yields myOp(x) poor style; the function name should appear in
a roman font
\myOp_a^b(x) yields myOpba (x) standard subscript and superscript position for
(inline inline mode
mode)
\myOp_a^b(x) yields myOpba (x) standard subscript and superscript position for
(display display mode
mode)
\DeclareMathOperator* yields myOPba (x) operator names are case-sensitive, so \myOp is
{\myOP}{myOP} (inline different from \myOP ;
\myOP_a^b(x)
mode) if displaystyle limits are desired in both inline
and display modes, then use
DeclareMathOperator* instead of
DeclareMathOperator
\def for defining your own commands (control sequences, macros, definitions);
must appear (within math delimiters) before it is used;
alternatively, you can define macros using the MathJax configuration options in the <head>
\def\myCommandName{ <replacement text> }
Example:
\def\myHearts{\color{purple}{\heartsuit}\kern-2.5pt\color{green}{\heartsuit}}
\myHearts\myHearts
yields: ♡♡♡♡
Example:
\def\myHearts#1#2{\color{#1}{\heartsuit}\kern-2.5pt\color{#2}{\heartsuit}}
\myHearts{red}{blue}
yields: ♡♡
Example:
\displaylines{
a=a
a = a\\
\text{if } a=b \text{ then } b=a\\ yields if a = b then b = a
\text{if } a=b \text{ and } b=c \text{ then } a=c
}
if a = b and b = c then a = c
Example:
In inline mode:
\frac ab + {\displaystyle \frac cd + \frac ef} + \frac gh
yields
a c e g
b
+ + + h
d f
Example:
In inline mode:
\frac ab + \displaystyle{\frac cd + \frac ef} + \frac gh
yields
a c e g
b
+ + +
d f h
In LT
A X , \dots chooses either \cdots or \ldots depending on the context;
E
MathJax, however, always gives lower dots.
Examples:
x_1, \dots, x_n yields x1 , … , xn
x_1 + \dots + x_n yields x1 + ⋯ + xn
x_1 + \dotsb + x_n yields x1 + ⋯ + xn
x_1 + \cdots + x_n yields x1 + ⋯ + xn
\dotsi ⋯ \dotsi class INNER dots with integrals ∫A1 ∫A2 ⋯ ∫An
\dotsm ⋯ \dotsm class INNER dots with multiplication x1 x2 ⋯ xn
Example:
|\enspace|\enspace| yields | | |
Example:
\eqalign{
3x - 4y &= 5\cr
x + 7 &= -2y
}
yields:
3x − 4y = 5
x + 7 = −2y
Example:
A <math> component may be empty:
\eqalign{
(a+b)^2 &= (a+b)(a+b) \\
&= a^2 + ab + ba + b^2 \\
&= a^2 + 2ab + b^2
}
yields:
(a + b)2 = (a + b)(a + b)
= a2 + ab + ba + b2
= a2 + 2ab + b2
Example:
The result of \eqalign is a vertically-centered block;
you can use more than one in the same display:
\left\{
\eqalign{
a &= 1\\
b &= 2\\
c &= 3
}\right\}
\qquad
\eqalign{
ax + by &= c \\
x + 2y &= 3
}
yields:
⎧
⎪a = 1⎫⎪
⎨ b = 2⎬
ax + by = c
⎩
⎪ ⎭
⎪ x + 2y = 3
c=3
Example:
\eqalignno{
3x - 4y &= 5 &(\dagger) \cr
x + 7 &= -2y &(\ddagger)\cr
z &= 2
}
yields:
3x − 4y = 5 (†)
x + 7 = −2y (‡)
z=2
in the browser's location URL box, and then refresh the page.
If the alert box is too big to see the close button, just press ‘enter’ to close the alert box.
\eta η η class ORD
lowercase Greek letter eta
\eth AMSsymbols ð ð class ORD
Examples:
\boxed{Hi there!} yields Hithere!
\fbox{Hi there!} yields Hi there!
see also: \boxed
\Finv AMSsymbols Ⅎ Ⅎ class ORD
a
\frac a b yields (display mode)
b
a−1
\frac{a-1}b-1 yields b
−1
a−1
\frac{a-1}{b-1} yields b−1
Examples:
sup
\gcd_{\rm sub}^{\rm sup} yields (inline mode) gcdsub
sup
\gcd_{\rm sub}^{\rm sup} yields (display mode) gcd
sub
Example:
\genfrac(]{0pt}{2}{a+b}{c+d} yields a+b
(c+d]
\grave ` ˋ
grave accent
\grave #1
Usually, #1 is a single letter; otherwise, accent is centered over argument.
Examples:
\grave e yields è
\grave E yields È
\grave eu yields èu
\grave{eu} yields eu
`
\gt > > class REL
greater than
Examples:
\hat\imath yields ^ı
\hat\jmath yields ^ȷ
\hat ab ^b
yields a
\hat{ab} ^
yields ab
\begin{matrix}
x_{11} & x_{12} \\ x11 x12
x_{21} & x_{22} \\
x_{31} & x_{32} \\
yields x21 x22
\hline x31 x32
\end{matrix}
Putting \hdashline or \hline at the beginning of any subsequent row puts a line over that row:
\begin{matrix}
x_{11} & x_{12} \\ x11 x12
x_{21} & x_{22} \\
\hline
yields x21 x22
x_{31} & x_{32} x31 x32
\end{matrix}
You can combine effects, and put in struts (as desired) for additional vertical spacing:
\begin{matrix}
\hline
x11 x12
x_{11} & x_{12} \\
x_{21} & x_{22} \strut \\ yields x21 x22
\hdashline
x_{31} & x_{32} \strut
x31 x32
\end{matrix}
yields
Sometimes you want to pretend that something is there, for spacing reasons,
but you don't want it to appear—you want it to be invisible—you want it to be a phantom.
yields
Example:
H
\href{http://www.onemathematicalcat.org}{M^{A^{T^H}}} yields M AT
yields
w i d e r
in MathJax, these all behave the same: \hspace, \kern, \mkern, \mskip, \mspace
\hslash AMSsymbols ℏ ℏ class ORD
perhaps an alternative form of Planck's constant
\hspace horizontal glue; horizontal space; horizontal skipping
\hspace <dimen>
Example:
s\hspace7ex k\hspace6ex i\hspace5ex n\hspace4ex n\hspace3ex i\hspace2ex e\hspace1ex r
s k i n n i e r
in MathJax, these all behave the same: \hskip, \kern, \mkern, \mskip, \mspace
\Huge both class ORD
\huge turns on huge mode and an even bigger Huge mode
{\Huge ... }
{\huge ... }
Examples:
Example:
A\iff B yields A ⟺ B
\iiiint AMSmath ∬∬ four occurrences of ∫
\iiint ∭ ∭
\iint ∬ ∬
\int ∫ ∫
all class OP;
see the Big Operators Table for examples
b
\int_a^b yields ∫
a
\intop_a^b yields ∫
a
a dotless ‘i’;
better to use when accented
Examples:
\hat i yields ^i
\hat\imath yields ^ı
Example:
P\impliedby Q yields P ⟸ Q
\implies AMSsymbols ⟹ ⟹ with a thick space on both sides
non-stretchy
Example:
P\implies Q yields P ⟹ Q
\in ∈ ∈ class REL
is in; is an element of; indicates membership in a set;
Examples:
\inf_{\rm limit} yields (inline mode) inflimit
Examples:
\hat j yields ^j
\hat\jmath yields ^ȷ
K
\kappa κ κ class ORD
lowercase Greek letter kappa
Example:
\left\langle
yields ⟨ ⟩
a b
\matrix{a & b\cr c & d}
\right\rangle c d
Example:
\rm\LaTeX yields LT
A X
E
Examples:
a
\lbrace \frac ab, c \rbrace yields { b , c}
yields { b , c}
a
\left\lbrace \frac ab, c \right\rbrace
Examples:
a
\lbrack \frac ab, c \rbrack yields [ b , c]
yields [ b , c]
a
\left\lbrack \frac ab, c \right\rbrack
Example:
\left\lceil
yields ⌈ ⌉
a b
\matrix{a & b\cr c & d}
\right\rceil c d
Examples:
\rm s \ldotp h yields s. h
\rm s.h yields s. h
see also: \cdotp
\ldots … lower dots; ellipsis; ellipses; dot dot dot … class INNER
Example:
x_1,\ldots,x_n yields x1 , … , xn
Examples:
\left( \frac12 \right) yields ( 12 )
yields ↑
⏐ ⇑
\left\updownarrow \phantom{\frac12} \right\Updownarrow ↓ ‖
⇓
\leftrightsquigarrow AMSsymbols ↭ left right squiqqle arrow; non-stretchy ↭ class REL
\leftroot used to fine-tune the placement of the index inside \sqrt or \root (see examples)
\sqrt[... \leftroot #1 ...]{...}
\root ... \leftroot #1 ... \of {...}
where the argument is a small integer:
a positive integer moves the index to the left;
a negative integer moves the index to the right
Examples:
\sqrt[3]{x} yields √
3
x
\sqrt[3\leftroot1]{x} yields √
3
x
Example:
\leqalignno{
3x - 4y &= 5 &(\dagger) \cr
x + 7 &= -2y &(\ddagger)\cr
z &= 2
}
yields:
(†) 3x − 4y = 5
(‡) x + 7 = −2y
z=2
Example:
\left\lgroup ⎧
⎪ a b⎫⎪
\matrix{a & b\cr c & d} yields ⎩
⎪ ⎭
⎪
\right\rgroup c d
Examples:
\liminf_{n\rightarrow\infty} x_n = \ell (inline mode) yields lim infn→∞ xn = ℓ
Examples:
b
\int_a^b f(x)\,dx (inline mode) yields ∫a f(x) dx
b
\int\limits_a^b f(x)\,dx (inline mode) yields ∫ f(x) dx
a
b
\int_a^b f(x)\,dx (display mode) yields ∫ f(x) dx
a
1
\mathop{x}\limits_0^1 yields x
0
Examples:
\limsup_{n\rightarrow\infty} x_n (inline mode) yields lim supn→∞ xn
\llap #1
creates a box of width zero;
the argument is then placed just to the left of this zero-width box
(and hence will overlap whatever lies to the left);
proper use of \llap and \rlap in math expressions is somewhat delicate
Examples:
a\mathrel{{=}\llap{/}}b yields a =/ b {=} forces the equal to not have REL spacing (since it
is not adjacent to ORD's) and \mathrel{} forces the
compound symbol (equal with overlapping slash) to
be treated as a single REL
a\mathrel{{=}\llap{/\,}} yields a =
/ b the thinspace ‘\,’ improves the spacing
b
Example:
\left\lmoustache ⎧
⎪ ⎫
⎪
\phantom{\matrix{a & b\cr c & d}} yields ⎭
⎪ ⎩
⎪
\right\rmoustache
Example:
l\lower 2pt {owe} r yields lower
see also: \raise
\lozenge AMSsymbols ◊ ◊ class ORD
\lvert AMSmath | both non-stretchy when used alone; ∣ class OPEN
\lVert AMSmath ∥ stretchy when used with \left or \right ∥ class OPEN
Example:
a
∣b∣
\left\lvert\frac{\frac ab}{\frac cd}\right\rvert yields ∣∣ c ∣∣
d
\mathbb #1
Whether lower-case letters are displayed in blackboard-bold, or not, depends on the fonts being used.
The MathJax web-based fonts don't have lowercase blackboard-bold, but the STIX fonts do;
so users with the STIX fonts installed will be able to display lowercase blackboard-bold letters.
Examples:
\mathbb R yields R
\mathbb ZR yields ZR
\mathbb{AaBbKk}Cc yields AaBbKkCc
\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ} yields ABCDEFGHIJKLMNOPQRSTUVWXYZ
\mathbf #1
Examples:
\mathbf{AaBb\alpha\beta123} yields AaBbαβ123
\mathbf ZR yields ZR
\mathbf{uvw}xyz yields uvwxyz
\mathbin #1
Examples:
a\text{op} b yields aopb
a\mathbin{\text{op}} b yields a op b
a\Diamond b yields a◊b
a\mathbin{\Diamond}b yields a ◊ b
\mathcal calligraphic font for uppercase letters and digits class ORD
\mathcal #1
Examples:
\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ} yields ABCDEF GHIJ KLMN OPQRST UVWXYZ
\mathcal{0123456789} yields 0123456789
\mathcal{abcdefghijklmnopqrstuvwxyz} yields abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz yields abcdefghijklmnopqrstuvwxyz
\mathcal{AB}AB yields ABAB
Examples:
Then:
T
\puzzle{\puzzle\over\puzzle^{\puzzle^\puzzle}} yields (in display mode) D SS
TS
S
\puzzle{\puzzle\over\puzzle^{\puzzle^\puzzle}} yields (in inline mode) T S SS
SS
\mathclose forces the argument to be treated in the ‘closing’ class; for example, like ‘) ’ and ‘] ’; class CLOSE
creates an element of class CLOSE
\mathclose #1
Examples:
a + \lt b\gt + c yields a+ < b > +c
a + \mathopen\lt b\mathclose\gt + c yields a + <b> + c
\mathfrak #1
Examples:
\mathfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ} yields ABCDEFGHIJKLMNOPQRSTUVWXYZ
\mathfrak{0123456789} yields 0123456789
\mathfrak{abcdefghijklmnopqrstuvwxyz} yields abcdefghijklmnopqrstuvwxyz
\mathfrak{AB}AB yields ABAB
\mathinner #1
Examples:
ab\text{inside}cd yields abinsidecd
ab\mathinner{\text{inside}}cd yields ab inside cd
\mathit #1
Examples:
\rm abc \mathit{def} ghi yields abcdefghi
\mathop #1
Examples:
atbtc yields atbtc
a\mathop{t}b\mathop{t}c yields atbtc
b
\mathop{\star}_a^b yields (in display mode) ⋆a
\mathopen #1
Examples:
a + \lt b\gt + c yields a+ < b > +c
a + \mathopen\lt b\mathclose\gt + c yields a + <b> + c
\mathord #1
Examples:
a+b+c yields a + b + c
a\mathord{+}b\mathord{+}c yields a+b+c
1,234,567 yields 1, 234, 567
1\mathord{,}234{,}567 yields 1,234,567
\mathpunct forces the argument to be treated in the ‘punctuation’ class; for example, like ‘, ’; class PUNCT
punctuation tends to have some extra space after the symbol;
returns an element of class PUNCT
\mathpunct #1
Examples:
1.234 yields 1.234
1\mathpunct{.}234 yields 1. 234
\mathrel forces the argument to be treated in the ‘relation’ class; for example, like ‘= ’ and ‘> ’; class REL
relations have a bit more space on both sides than binary operators;
returns an element of class REL
\mathrel #1
Examples:
a \# b yields a#b
a \mathrel{\#} b yields a # b
\mathring #1
Examples:
\mathring A yields Å
\mathring{AB}C ˚
yields ABC
\mathrm roman typestyle for uppercase and lowercase letters class ORD
\mathrm #1
Examples:
\mathrm{AaBb\alpha\beta123} yields AaBbαβ123
\mathrm ZR yields ZR
\mathrm{uvw}xyz yields uvwxyz
\mathscr #1
Whether lower-case letters are displayed in script, or not, depends on the fonts being used.
The MathJax web-based fonts don't have lowercase script, but the STIX fonts do;
so users with the STIX fonts installed will be able to display lowercase script letters.
Examples:
\mathscr{ABCDEFGHIJKLMNOPQRSTUVWXYZ} yields A BC DE FG H I JK L M N OPQRS T U V W X Y Z
0123456789
\mathsf #1
Examples:
\mathsf{ABCDEFGHIJKLMNOPQRSTUVWXYZ} yields ABCDEFGHIJKLMNOPQRSTUVWXYZ
\mathsf{0123456789} yields 0123456789
\mathsf{abcdefghijklmnopqrstuvwxyz} yields abcdefghijklmnopqrstuvwxyz
\Delta\Gamma\Lambda\mathsf{\Delta\Gamma\Lambda} yields ΔΓΛΔΓΛ
abcdefghijklmnopqrstuvwxyz yields abcdefghijklmnopqrstuvwxyz
\mathsf{AB}AB yields ABAB
Examples:
\sqrt3 + \sqrt\alpha yields √3 + √α
\mathtt typewriter typestyle for uppercase and lowercase letters and digits; class ORD
also affects uppercase Greek
\mathtt #1
Examples:
\mathtt{ABCDEFGHIJKLMNOPQRSTUVWXYZ} yields ABCDEFGHIJKLMNOPQRSTUVWXYZ
\mathtt{0123456789} yields 0123456789
\mathtt{abcdefghijklmnopqrstuvwxyz} yields abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz yields abcdefghijklmnopqrstuvwxyz
\Delta\Gamma\Lambda\mathtt{\Delta\Gamma\Lambda} yields ΔΓΛΔΓΛ
\mathtt{AB}AB yields ABAB
Example:
a b
\matrix{ a & b \cr c & d } yields
c d
Examples:
\max_{\rm sub} yields (inline mode) maxsub
max
\max_{\rm sub} yields (display mode) sub
Examples:
a + b \mbox{ (are you paying attention?) } = c yields a + b (are you paying attention?) = c
a + b \text{ (are you paying attention?) } = c yields a + b (are you paying attention?) = c
in MathJax, these are essentially the same: \text, \hbox
see also: \rm
\measuredangle AMSsymbols ∡ ∡ class ORD
Examples:
\{x | x\gt 1\} yields {x|x > 1}
\{x \mid x\gt 1\} yields {x ∣ x > 1}
Examples:
\min_{\rm sub} yields (inline mode) minsub
\mit #1
Examples:
\mit{\Gamma\Delta\Theta\Omega} yields Γ ΔΘΩ
\mathit{\Gamma\Delta\Theta\Omega} yields ΓΔΘΩ
\Gamma\Delta\Theta\Omega yields ΓΔΘΩ
Examples:
ab yields ab
a\mkern18mu b yields a b
a\mkern18pt b yields a b
in MathJax, these all behave the same: \hskip, \hspace, \kern, \mskip, \mspace
\mod mod modulus operator; modulo;
the leading space depends on the style: displaystyle has 18 mu, others 12 mu;
2 thinspaces of following space;
for things like equations modulo a number
\mod #1
Example:
3\equiv 5 \mod 2 yields 3 ≡ 5 mod 2
see also: \pmod, \bmod
\models ⊨ ⊨ class REL
Examples:
ab yields ab
a\mskip18mu b yields a b
a\mskip18pt b yields a b
in MathJax, these all behave the same: \hskip, \hspace, \kern, \mkern, \mspace
\mspace
\mspace <dimen>
gives horizontal space
Examples:
ab yields ab
a\mspace18mu b yields a b
a\mspace18pt b yields a b
in MathJax, these all behave the same: \hskip, \hspace, \kern, \mkern, \mskip
\mu μ lowercase Greek letter mu μ class ORD
Examples:
ab yields ab
a\negthinspace b yields ab
a\negmedspace b yields ab
a\negthickspace b yields ab
see also: \thinspace
\neq ≠ see also: equals, \ne ≠ class REL
\newcommand for defining your own commands (control sequences, macros, definitions);
\newcommand must appear (within math delimiters) before it is used;
if desired, you can use the TeX.Macros property of the configuration to define macros in the head
\newcommand\myCommandName
[ <optional # of arguments, from 1 to 9> ]
{ <replacement text> }
\myHearts\myHearts
yields: ♡♡♡♡
\myHearts{red}{blue}
yields: ♡♡
\newenvironment{myEnvironmentName}
[ <optional # of arguments, from 1 to 9> ]
{ <replacement text for each occurrence of \begin{myEnvironmentName}> }
{ <replacement text for each occurrence of \end{myEnvironmentName}> }
yields: ♡♡ forever
\begin{myHeartEnv}{red}{blue}
\end{myHeartEnv}
yields: ♡♡ forever
Examples:
n
\sum_{k=1}^n a_k yields (in display mode) ∑ ak
k=1
\ngtr yields ≯
\notag AMSmath used in AMS math environments that do automatic equation numbering, to suppress class ORD
the equation number; since MathJax doesn't implement auto-numbering (as of version
1.1a), it is basically a no-op, although it will cancel an explicit \tag ;
when auto-numbering is added, then this will work as expected;
\notag is included now for compatibility with existing TeX code (to prevent throwing
an error, even though it has no effect)
\notin ∉ see also: \in ∉ class REL
{\oldstyle ... }
Examples:
\oldstyle 0123456789 yields 0123456789
\oldstyle ABCDEFGHIJKLMNOPQRSTUVWXYZ yields ABCDEF GHIJ KLMN OPQRST UVWXYZ
\oldstyle abcdefghijklmnopqrstuvwxyz yields abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz yields abcdefghijklmnopqrstuvwxyz
{\oldstyle AB}AB yields ABAB
\oldstyle AB \rm AB yields ABAB
\oldstyle{AB}CD yields ABCD
For example,
\operatorname{myOp}
\DeclareMathOperator{\myOp}{myOp}
Examples:
Examples:
a
a \over b yields b
a+1
a+1 \over b+2 yields b+2
a+1
{a+1 \over b+2}+c yields b+2
+c
\overleftarrow #1
\overrightarrow #1
\overleftrightarrow #1
Examples:
←−−−−−−−−−−
\overleftarrow{\text{the argument}} yields the argument
\overline #1
Examples:
\overparen puts a (stretchy) over-parenthesis (over-arc, frown) over the argument (new in MathJax 2.6)
\overparen #1
Example:
\overparen a \quad
\overparen ab \quad
\overparen{ab} \quad
\overparen{abc} \quad
\overparen{abcdef} \quad
\overparen{\underparen{abcd}}
Examples:
top
\overset{\rm top}{\rm bottom} yields bottom
a
\overset ab yields b
a\,\overset{?}{=}\,b yields ?
a = b
Examples:
a
a \overwithdelims [ ] b yields [ b ]
a+1
a+1 \overwithdelims . | b+2 yields b+2
∣
a+1
{a+1 \overwithdelims \{ \} b+2}+c yields { b+2 } + c
Sometimes you want to pretend that something is there, for spacing reasons,
but you don't want it to appear—you want it to be invisible—you want it to be a phantom.
The box created by \phantom has width, height and depth equal to its argument.
In other words, \phantom creates horizontal and vertical space equal to that of its argument,
even though the argument isn't visible.
\phantom #1
Examples:
yields √ b √
\sqrt{\frac ab} a
\sqrt{\phantom{\frac ab}}
\frac{2x+3y-\phantom{5}z} 2x + 3y − z
{\phantom{2}x+\phantom{3}y+5z}
yields
x + y + 5z
j
\Gamma^{\phantom{i}j}_{i\phantom{j}k} yields Γi k
1 −1
\matrix{1&-1\cr 2&\phantom{-}3} yields
2 3
see also: \hphantom, \vphantom
\phi ϕ lowercase Greek letter phi &##x03D5; class ORD
\Phi Φ uppercase Greek letter phi Φ class ORD
see also: \varphi, \varPhi
\pi π lowercase Greek letter pi π class ORD
\Pi Π uppercase Greek letter Pi Π class ORD
see also: \varpi, \varPi
\pitchfork AMSsymbols ⋔ ⋔ class REL
\pm ± plus or minus &x00B1; class BIN
see also: \mp
\pmatrix matrix enclosed in parentheses class OPEN
Example:
\pmb #1
Examples:
a \pmb a \boldsymbol a yields aaaa
\pmb{a+b-c}\ \ a+b-c yields a + b − c a + b − c
Examples:
\Pr_{\rm sub} yields (inline mode) Prsub
Examples:
n
\prod_{j=1}^n yields (in inline mode) ∏j=1
n
\prod_{j=1}^n yields (in display mode) ∏
j=1
Q
\quad \quad is a 1em space
\qquad \qquad is a 2em space
Examples:
|\quad|\quad| yields | | |
|\qquad\hphantom{|}| yields | |
Example:
h\raise 2pt {ighe} r yields higher
see also: \lower
\rangle ⟩ right angle bracket; ⟩ class CLOSE
non-stretchy when used alone;
stretchy when used with \left or \right (see below)
Example:
\left\langle
yields ⟨ ⟩
a b
\matrix{a & b\cr c & d}
\right\rangle c d
Example:
\left\lbrace
yields { }
a b
\matrix{a & b\cr c & d}
\right\rbrace c d
Examples:
a
\lbrack \frac ab, c \rbrack yields [ b , c]
yields [ b , c]
a
\left\lbrack \frac ab, c \right\rbrack
Example:
\left\lceil
yields ⌈ ⌉
a b
\matrix{a & b\cr c & d}
\right\rceil c d
Since many people use MathJax in blogs and wikis that may not have all the extensions loaded, this
makes it possible to load a lesser-used extension on a particular page, without having to include it in
every page.
Example:
⎧a b⎫ ⎪
yields ⎪
\left\lgroup
\matrix{a & b\cr c & d} ⎩ ⎭
⎪
\right\rgroup c d
\updownarrow ↑ ⇑
\Updownarrow
\left\updownarrow \phantom{\frac12} \right\Updownarrow ⏐
↓ ‖
⇓
\rlap #1
creates a box of width zero;
the argument is then placed just to the right of this zero-width box
(and hence will overlap whatever lies to the right)
Example:
a\mathrel{\rlap{\;/}{=}}b yields a =
/b
In this example, {=} forces the equal to not have REL spacing (since it is not adjacent to ORD's);
\mathrel{} forces the compound symbol (equal with overlapping slash) to be treated as a single REL;
{\rm ... }
Examples:
\rm AaBb\alpha\beta123 yields AaBbαβ123
{\rm A B} A B yields ABAB
\Delta\Gamma\Lambda{\rm\Delta\Gamma\Lambda} yields ΔΓΛΔΓΛ
\rm AB \bf CD yields ABCD
\rm{AB}CD yields ABCD
Example:
⎧ ⎫
⎪
yields ⎪
\left\lmoustache
\phantom{\matrix{a & b\cr c & d}} ⎭ ⎩
⎪
\right\rmoustache
Examples:
xx
x\Rule{3px}{1ex}{2ex}x yields
x\Rule{3px}{2ex}{1ex}x yields x x
Example:
a
∣b∣
\left\lvert\frac{\frac ab}{\frac cd}\right\rvert yields ∣∣ c ∣∣
d
{ \scr ... }
Examples:
\scr ABCDEFGHIJKLMNOPQRSTUVWXYZ yields A BC DE FG H I JK L M N OPQRS T U V W X Y Z
\scr
0123456789abcdefghijklmnopqrstuvwxyz
yields 0123456789abcdefghijklmnopqrstuvwxyz
0123456789abcdefghijklmnopqrstuvwxyz yields 0123456789abcdefghijklmnopqrstuvwxyz
{\scr AB}AB yields A BAB
\scr AB \rm AB yields A BAB
\scr{AB}CD yields A BC D
{ \scriptscriptstyle ... }
Example:
In inline mode:
\frac ab+\displaystyle\frac ab+\textstyle\frac ab+\scriptstyle\frac ab+\scriptscriptstyle\frac ab
yields:
a a a
b
+ + b
+ ab + ab
b
Example:
In inline mode:
\frac ab + {\scriptscriptstyle \frac cd + \frac ef} + \frac gh
yields
a g
b
+ dc + fe + h
Example:
In inline mode:
\frac ab + \scriptscriptstyle{\frac cd + \frac ef} + \frac gh
yields
a
b
+ dc + fe + hg
{ \scriptsize ... }
Example:
\rm \scriptsize script \normalsize normal \large large yields scriptnormal large
{ \scriptstyle ... }
Example:
In inline mode:
\frac ab+\displaystyle\frac ab+\textstyle\frac ab+\scriptstyle\frac ab+\scriptscriptstyle\frac ab
yields:
a a a
b
+ + b
+ ab + ab
b
Example:
In inline mode:
\frac ab + {\scriptstyle \frac cd + \frac ef} + \frac gh
yields
a g
b
+ dc + fe + h
Example:
In inline mode:
\frac ab + \scriptstyle{\frac cd + \frac ef} + \frac gh
yields
a
b
+ dc + fe + hg
Examples:
\sec x yields sec x
\sec(2x-1) yields sec(2x − 1)
see also: \csc
\setminus ∖ set minus ∖ class BIN
Examples:
A\setminus B yields A ∖ B
A\backslash B yields A∖B
see also: \backslash
\sf turns on sans serif mode for uppercase and lowercase letters and digits, and for uppercase Greek class ORD
{ \sf ... }
Examples:
\sf ABCDEFGHIJKLMNOPQRSTUVWXYZ yields ABCDEFGHIJKLMNOPQRSTUVWXYZ
\sf 0123456789 yields 0123456789
\sf abcdefghijklmnopqrstuvwxyz yields abcdefghijklmnopqrstuvwxyz
ABCDE 01234 abcde yields ABCDE01234abcde
{\sf AB\Delta\Gamma\Lambda}\ AB\Delta\Gamma\Lambda yields ABΔΓΛ ABΔΓΛ
\sf AB \rm AB yields ABAB
\sf{AB}CD yields ABCD
\shoveleft AMSmath forces flush left or flush right typesetting in a \multline or \multline* environment (see examples)
\shoveright AMSmath
Example:
\begin{multline}
(a+b+c+d)^2 \\
+ (e+f)^2 + (g+h)^2 + (i+j)^2 + (k+l)^2 \\
+ (m+n)^2 + (o+p)^2 + (q+r)^2 + (s+t)^2 + (u+v)^2 \\
+ (w+x+y+z)^2
\end{multline}
yields
(a + b + c + d)2
+ (e + f)2 + (g + h)2 + (i + j)2 + (k + l)2
+ (m + n)2 + (o + p)2 + (q + r)2 + (s + t)2 + (u + v)2
+ (w + x + y + z)2
Example:
\begin{multline}
(a+b+c+d)^2 \\
\shoveleft{+ (e+f)^2 + (g+h)^2 + (i+j)^2 + (k+l)^2} \\
\shoveright{+ (m+n)^2 + (o+p)^2 + (q+r)^2 + (s+t)^2 + (u+v)^2} \\
+ (w+x+y+z)^2
\end{multline}
yields
\sideset AMSmath used for putting symbols at the four ‘corners’ of a large operator (like ∑ or ∏ )
• #1 = lower left
• #2 = upper left
• #3 = lower right
• #4 = upper right
Examples:
∑
2 4
\sideset{_1^2}{_3^4}\sum yields 1 3
Examples:
\sin x yields sin x
\sin(2x-1) yields sin(2x − 1)
Examples:
\sinh x yields sinh x
\sinh(2x-1) yields sinh(2x − 1)
Examples:
\hat A yields A^
\skew7\hat A yields A^
\tilde M yields M~
\skew{8}\tilde M yields M~
\hat{\hat A} ^^
yields A
\skew4\hat{\hat A} ^^
yields A
{\small ... }
Example:
see also: \tiny, \Tiny, \normalsize, \large, \Large, \LARGE, \huge, \Huge
\smallfrown AMSsymbols ⌢ small frown ⌢ class REL
• to vertically \smash the box containing this and make it instead behave vertically like that :
\smash{this}\vphantom{that}
Examples:
yields √ b √7
\sqrt{\frac ab} a
\sqrt{\smash{7}\vphantom{\frac ab}}
yields √ c √ f
\sqrt{\frac{\frac ab}{\frac cd}} b e
\sqrt{\smash{\frac ef}\vphantom{\frac{\frac ab}{\frac cd}}} d
• to horizontally compress the box containing this and make it instead behave horizontally like that :
\rlap{this}\hphantom{that}
or
\hphantom{that}\llap{this}
Examples:
• to both vertically smash and horizontally compress the box containing this
and make it instead behave both vertically and horizontally like that :
\rlap{\smash{this}}\phantom{that}
Examples:
yields √ √Hi!
\sqrt{ a b
\rlap{\smash{\rm Hi!}}
\phantom{\matrix{a & b\cr c & d}} c d
}
Compare:
b
a\Rule{5px}{4ex}{2ex}^b_c d yields a d
c
b
a\Space{5px}{4ex}{2ex}^b_c d yields a d
c
\sqrt #1
\sqrt[n]{op} is equivalent to \root n \of {op}
Examples:
\sqrt x yields √x
\sqrt xy yields √xy
\sqrt{xy} yields √xy
\sqrt[3]{x+1} yields √x
3
+1
Examples:
\stackrel{\rm def}{=} yields def
=
Examples:
\sqrt{(\ )}
\sqrt{\mathstrut\rm mathstrut} yields √( )√mathstrut√strut
\sqrt{\strut\rm strut}
\Tiny
\sqrt{(\ )}
\sqrt{\mathstrut\rm mathstrut}
yields √( )√mathstrut√strut
\sqrt{\strut\rm strut}
\Large
\sqrt{(\ )}
\sqrt{\mathstrut\rm mathstrut}
yields √( )√mathstrut√strut
\sqrt{\strut\rm strut}
Examples:
x+1
\frac{\style{color:red}{x+1}}{y+2} yields y+2
x+1
\style{background-color:yellow}{\frac{x+1}{y+2}} yields y+2
Example:
<script type="text/javascript">
function makeVisible() {
document.getElementById('answer').style.visibility = "visible";
}
</script>
$$
(x+1)^2 = \cssId{answer}\style{visibility:hidden}{(x+1)(x+1)}
$$
(x + 1)2 =
Examples:
^{\substack{\text{a very} \\
\text{contrived} \\
\text{example} a very
}} contrived a
{\frac ab}_{\substack{
yields (display mode) example
b isn't
\text{isn't} \\ it?
\text{it?}
}}
Examples:
\sup_{\rm limit} yields (inline mode) suplimit
sup
\sup_{\rm limit} yields (display mode) limit
Example:
\eqalign{
3x - 4y &= 5\cr 3x − 4y = 5
x + 7 &= -2y yields (3.1c)
} x + 7 = −2y
\tag{3.1c}
Examples:
\tan x yields tan x
\tan(2x-1) yields tan(2x − 1)
see also: \cot
\tanh tanh hyperbolic tangent; class OP
does not change size;
default limit placement is the same in both inline and display modes;
can change limit placement using \limits;
see the Big Operators Table for more examples
Examples:
\tanh x yields tanh x
\tanh(2x-1) yields tanh(2x − 1)
Examples:
\TeX yields TEX
\rm\TeX yields TEX
\text #1
\textbf #1
\textit #1
\textrm #1
\textsf #1
\texttt #1
Examples:
|x| = x \text{ for all \(x \ge 0\)} yields |x| = x for all x ≥ 0
\text{\alpha in text mode }\alpha yields \alpha in text mode α
\textbf{\alpha in textbf mode }\alpha yields \alpha in textbf mode α
\textit{\alpha in textit mode }\alpha yields \alpha in textit mode α
\textrm{\alpha in textrm mode }\alpha yields \alpha in textrm mode α
\textsf{\alpha in textsf mode }\alpha yields \alpha in textsf mode α
\texttt{\alpha in texttt mode }\alpha yields \alpha in texttt mode α
see also: \bf, \mathbf ; \it, \mathit ; \rm, \mathrm ; \sf, \mathsf ; \tt, \mathtt
\textstyle used to over-ride automatic style rules and force text (inline) style; class ORD
stays in force until the end of math mode or the braced group, or until another
style is selected
{ \textstyle ... }
Example:
In display mode:
\frac ab + {\textstyle \frac cd + \frac ef} + \frac gh
yields
a g
+ dc + e
f
+
b h
Example:
In inline mode:
\frac ab+{\displaystyle\frac ab}+\frac ab+\scriptstyle\frac ab+\scriptscriptstyle\frac ab
yields:
a a a
b
+ + b
+ ab + ab
b
Example:
thinspaces between letters: a b c d
\tilde #1
Usually, #1 is a single letter; otherwise, accent is centered over argument.
Examples:
\tilde e yields e~
\tilde E yields E~
\tilde eu ~
yields eu
\tilde{eu} yields eu~
{\tiny ... }
Examples:
\tiny AaBb\alpha\beta123 yields AaBbαβ123
\Tiny non-standard turns on Tiny; a bit bigger than \tiny class ORD
{\Tiny ... }
Examples:
\Tiny AaBb\alpha\beta123 yields AaBbαβ123
{\Tiny A B} A B yields AB AB
\Tiny AB \tiny CD yields ABAB
{\tt ... }
Examples:
\tt AaBb\alpha\beta123 yields AaBbαβ123
{\tt A B} A B yields ABAB
\tt AB \rm CD yields ABAB
\tt{AB}CD yields ABCD
\underbrace{x + \cdots + x}_{n\rm\ times}^{\text{(note here)} yields x +⋯+x
n times
\underleftarrow #1
\underrightarrow #1
\underleftrightarrow #1
Examples:
\underleftarrow{\text{the argument}} the argument
yields ← −−−−−−−−−−
\underrightarrow{AB} AB
yields −
−→
\underrightarrow{AB\strut} yields AB
−−→
\underleftrightarrow{\hspace1in} yields ←−−−−−−−−−→
\underline #1
Examples:
\underline{AB} AB
yields −−−
a
\underline a yields −
a long argument
\underline{\text{a long argument}} yields −−−−−−−−−−−−−−
\underparen puts a (stretchy) under-parenthesis (under-arc, smile) under the argument (new in MathJax 2.6)
\underparen #1
Example:
\underparen a \quad
\underparen ab \quad
\underparen{ab} \quad
\underparen{abc} \quad
\underparen{abcdef} \quad
\underparen{\overparen{abcd}}
yields
Examples:
\underset ab yields b
a
\unicode[optHeight,optDepth][optFont]#1
Examples:
\unicode{x263a} yields ☺
Examples:
\sqrt[3]{x} yields √
3
x
\sqrt[3\uproot2]{x} yields √
3
x
\varOmega AMSsymbols Ω uppercase Greek letter omega; variant Ω class ORD
Examples:
⎛ ⎞
⎝ ⎠
\left(\Rule{1ex}{2em}{0pt}\right) yields
\left(\vcenter{\Rule{1ex}{2em}{0pt}}\right) yields ( )
⎛ ⎞
yields ⎜
⎜ c ⎟
a+b
\left(\frac{a+b}{\dfrac{c}{d}}\right) ⎟
⎝ ⎠
d
a+b
\left(\vcenter{\frac{a+b}{\dfrac{c}{d}}}\right) yields ( c )
d
\vec{AB}
→
yields AB
To use \verb :
• First look through the material that is to be typeset ‘as is’ (verbatim).
• Choose a non-letter character that does not appear in this material.
• This chosen non-letter character will mark the beginning and end of the verbatim material,
as illustrated in the examples below.
yields:
$x^2\sqrt y$ yields x2 √y
yields:
Sometimes you want to pretend that something is there, for spacing reasons,
but you don't want it to appear—you want it to be invisible—you want it to be a phantom.
The box created by \vphantom has the height and depth of its argument,
but its width is zero (so it doesn't contribute to any horizontal spacing issues).
In other words, \vphantom creates vertical space equal to that produced by its argument,
but doesn't create any horizontal space.
\vphantom #1
Examples:
a
?
\binom{\frac ab}c \binom{\vphantom{\frac ab}?}c yields ( b )( )
c c
\widehat #1
Examples:
\widehat a yields â
\widehat A yields Â
\widehat AB yields ÂB
ˆ
\widehat{AB} yields AB
\widetilde #1
Examples:
\widetilde a yields ã
\widetilde A yields Ã
\widetilde AB yields ÃB
˜
\widetilde{AB} yields AB
X
\Xi Ξ uppercase Greek letter xi Ξ class ORD
\xleftarrow AMSmath stretchy arrows with mathematical overset and optional mathematical underset class REL
\xrightarrow AMSmath
\xleftarrow[optionalArgument] #1
\xrightarrow[optionalArgument] #1
where the optional arguments (inside brackets, if desired) appear below the arrows (see examples).
Examples:
a
\xrightarrow a yields →
a
\xrightarrow ab yields → b
ab
\xrightarrow{ab} yields −
→
see equation (1)
\xleftarrow{\text{see equation (1)}} yields ←−−−−−−−−−
see (1)
\xrightarrow[f]{\text{see (1)}} yields −−−−→
f
Y
\yen AMSsymbols ¥ ¥ class ORD
Z
\zeta ζ lowercase Greek letter zeta ζ class ORD
• processEnvironments: true (the default) causes environments to be processed both inside and outside of math delimiters
• processEnvironments: false causes environments to be processed only when they appear inside math delimiters
align AMSmath For vertical alignment of two or more lines at one or more places:
• ampersand(s) ‘&’ are used to indicate desired alignments (see examples below)
\begin{align} • a double backslash ‘\\’ or carriage return ‘\cr’ separates lines
... \end{align} • individual lines may be tagged using the \tag{} command:
◦ default input for \tag{} is text
◦ you may get mathematical content inside \tag{} by using math delimiters;
e.g., \tag{$\alpha$}
EXAMPLES:
\begin{align}
(a+b)^2 &= (a+b)(a+b) \tag{3.1c} \\
&= a^2 + ab + ba + b^2 \tag{$\dagger$} \\
&= a^2 + 2ab + b^2 \tag{$\ast$}
\end{align}
yields
• STEP 1:
The odd-numbered ampersands (1st, 3rd, 5th, etc.) are placed where alignment is desired.
Position these ampersands first:
a &= bbbbbb &= cc &= d \\
aaa &= bbbb &= cccccc &= ddd
• STEP 2:
Now, focus attention on the content between the previously-positioned ampersands.
What part of this content belongs on the left? On the right?
In each group, use an ampersand to separate the content into two pieces (a piece may be empty).
Think of this ampersand as a solid ‘wall’ that is pushing content to the left or right.
yields
a = bbbbbb = cc =d
aaa = bbbb = cccccc = ddd
yields
a= bbbbbb = cc = d
aaa = bbbb = cccccc = ddd
yields
alignat AMSmath For vertical alignment of two or more lines at one or more places;
produces a more horizontally-compressed display than align:
\begin{alignat} • the alignat environment is started with \begin{alignat}{<num>} ,
{<num>} where num is a positive integer (1, 2, 3, … ) that indicates the number of places
... \end{alignat} where alignment is desired
• ampersand(s) ‘&’ are used to indicate desired alignments (see examples below)
• a double backslash ‘\\’ or carriage return ‘\cr’ separates lines
• individual lines may be tagged using the \tag{} command:
◦ default input for \tag{} is text
◦ you may get mathematical content inside \tag{} by using math delimiters;
e.g., \tag{$\alpha$}
• STEP 1:
The odd-numbered ampersands (1st, 3rd, 5th, etc.) are placed where alignment is desired.
Position these ampersands first:
a &= bbbbbb &= cc &= d \\
aaa &= bbbb &= cccccc &= ddd
• STEP 2:
Now, focus attention on the content between the previously-positioned ampersands.
What part of this content belongs on the left? On the right?
In each group, use an ampersand to separate the content into two pieces (a piece may be empty).
Think of this ampersand as a solid ‘wall’ that is pushing content to the left or right.
yields
a = bbbbbb = cc =d (3.1)
aaa = bbbb = cccccc = ddd (3.2)
yields
a =bbbbbb = cc = d
aaa = bbbb =cccccc = ddd
yields
a = bbbbbb = c c=d
aaa = bb bb = cccccc = ddd
see also: \eqalignat, \eqalignatno, \leqalignatno
yields
aaa b
c ddd
yields
aaa b
c ddd
yields
aaa b
c ddd
yields
aaa b
c ddd
Putting a pipe character ‘|’ at the beginning or end of the justification info encloses the entire structure,
which is different from standard TEX :
\begin{array}{|lr}
aaa & b\cr
c & ddd
\end{array}
yields
Example:
\begin{Bmatrix}
{ }
aaa & b\cr aaa b
c & ddd
yields
c ddd
\end{Bmatrix}
Example:
\begin{bmatrix}
[ ]
aaa & b\cr aaa b
c & ddd
yields
c ddd
\end{bmatrix}
|x| =
\begin{cases}
|x| = {
x if x ≥ 0
x & \text{ if } x\ge 0 \\ yields
-x & \text{ if } x \lt 0 −x if x < 0
\end{cases}
Examples:
\begin{eqnarray}
y &=& (x-1)^2 \\
&=& (x-1)(x-1) \\
&=& x^2 - 2x + 1
\end{eqnarray}
yields
y = (x − 1)2
= (x − 1)(x − 1)
= x2 − 2x + 1
\begin{eqnarray}
(x-1)^2 &=& (x-1)(x-1) &=& x^2-2x + 1 \\
(x-1)^3 &=& (x-1)(x-1)(x-1) &=& (x-1)^2(x-1)
\end{eqnarray}
yields
(x − 1)2 = (x − 1)(x − 1) = x2 − 2x + 1
(x − 1)3 = (x − 1)(x − 1)(x − 1) = (x − 1)2 (x − 1)
\begin{equation}
... \end{equation}
equation* [May 2011] ignored
gather AMSmath to display any number of centered formulas (without any alignment);
a double backslash ‘\\’ or carriage return ‘\cr’ separates rows;
individual lines may be tagged using the \tag{} command:
Example:
\begin{gather}
a = a \tag{$*$}\\
\text{if } a=b \text{ then } b=a \tag{$\dagger$}\\
\text{if } a=b \text{ and } b=c \text{ then } a=c\tag{3.1}
\end{gather}
yields:
a=a (∗)
if a = b then b = a (†)
if a = b and b = c then a = c (3.1)
matrix Used to create a matrix (an array) without any enclosing delimiters;
columns are centered.
\begin{matrix} • suppose that n columns are desired in the array;
... then, n − 1 ampersands are used to separate the columns
\end{matrix} • a double backslash ‘\\’ or carriage return ‘\cr’ separates rows
Example:
\begin{matrix}
aaa & b\cr aaa b
c & ddd
yields
c ddd
\end{matrix}
The justification of intermediate lines can be adjusted with \shoveleft and \shoveright.
Examples:
\begin{multline}
\rm first\ line \\
\rm second\ line \\
\rm third\ line \\
\rm fourth\ line
\end{multline}
yields:
first line
second line
third line
fourth line
\begin{multline}
\rm first\ line \\
\shoveleft\rm second\ line \\
\shoveright\rm third\ line \\
\rm fourth\ line
\end{multline}
yields:
Example:
\begin{pmatrix}
( )
aaa & b\cr aaa b
c & ddd
yields
c ddd
\end{pmatrix}
Examples:
the matrix
$\begin{smallmatrix}
aaa & b\cr
yields the matrix aaa b is...
c & ddd c ddd
\end{smallmatrix}$
is...
\left[
\begin{smallmatrix}
aaa & b\cr
yields (in display mode) [ aaa b ]
c & ddd c ddd
\end{smallmatrix}
\right]
\left[
\begin{smallmatrix}
aaa & b\cr
yields (in inline mode) [ aaa b ]
c & ddd c ddd
\end{smallmatrix}
\right]
Examples:
\begin{split}
\text{first line}\\
&\text{first aligned place} &\text{second aligned place} \\
&\text{and more first aligned}\qquad &\text{and more second aligned} \\
\text{no ampersands on this line} \\
& &\text{aligned at second place} \\
\text{no amps here either}
\end{split}
yields:
first line
first aligned place second aligned place
and more first aligned and more second aligned
no ampersands on this line
aligned at second place
no amps here either
Example:
\prod_{\begin{subarray}{rl}
i\lt 5 & j\gt 1 \\
k\ge2,\,k\ne 5 \quad & \ell\le 5,\,\ell\ne 2
\end{subarray}}
x_{ijk\ell}
yields
∏ xijkℓ
i<5 j>1
k≥2, k≠5 ℓ≤5, ℓ≠2
Example:
\begin{Vmatrix}
aaa & b\cr ∥ aaa b ∥
c & ddd
yields ∥ ∥
∥ c ddd ∥
\end{Vmatrix}
Example:
\begin{vmatrix}
aaa & b\cr ∣ aaa b ∣
c & ddd
yields ∣ ∣
∣ c ddd ∣
\end{vmatrix}
• ARGUMENTS:
Arguments are denoted by #1, #2, #3, etc.
Multi-token arguments should be enclosed in (curly) braces: ‘ { } ’
• GROUPING CONSTRUCTS:
There are two basic grouping constructs that use braces;
I refer to them as ‘arguments’ versus ‘braced groups’.
If you're not aware which construct is in force, then you can get unexpected results.
These examples illustrate the difference.
• DIMENSIONS:
⟨dimen⟩ denotes:
⟨optional sign⟩⟨number⟩⟨unit⟩
Examples: -5pt or -5 pt or 3.5pt
Click here for a table of dimension units
• CLASS INFORMATION:
Math operators are divided into several distinct classes, which control the spacing between elements in the typeset expression.
For example, REL uses a little more space than BIN.
◦ ORD: an ‘ordinary’ item, like a variable name or Greek letter
◦ OP: a ‘big operator’, usually having moveable limits (though not always)
and different sizes for display and in-line modes (though not always)
Click here for a table of Big Operators classifying mode behavior
◦ BIN: a ‘binary operator’ like + and −
◦ REL: a ‘binary relation’ like < and ≤
◦ OPEN: an ‘opening delimiter’ like (
◦ CLOSE: a ‘closing delimiter’ like )
◦ PUNCT: a ‘punctuation’ like :
◦ INNER: a special class used for fractions and some other things
• DELIMITERS:
Delimiters are symbols used to enclose expressions (e.g., parentheses, brackets, and braces)
or used as operators (e.g., vertical lines for absolute value).
In MathJax, delimiters can be of class OPEN, CLOSE, REL, or ORD.
Click here for a table of MathJax Delimiters
• BROWSER-SPECIFIC SUGGESTIONS:
◦ Set explicit widths for table-cells that contain math content;
in native MathML environments, some unusual line-breaking in math can occur otherwise.
DIMENSION UNITS:
pc pica 1 pc = 12 pt 1 pc spaces:
| | | in a small font
a relative measure;
depends on current font; | | | in a medium font
not affected by superscript level | | | in a large font
| | | in scriptstyle (medium font)
| | | in scriptscriptstyle (medium font)
1
mu a relative measure; 1 mu = em 18 mu (1 em ) spaces:
18
depends on current font; | | | in a small font
changes with superscript level
| | | in a medium font
| | | in a large font
| | | in scriptstyle (medium font)
| | | in scriptscriptstyle (medium font)
cm centimeter 10 mm = 1 cm 1 cm ( 10 mm ) spaces:
mm millimeter | | | in a small font
( )
( ( ( ( ( ) ) ) ) )
class OPEN class CLOSE
⟮ ⎧ ⎧ ⎧ ⎧
⎩ ⎩ ⎪ ⎪ ⟯ ⎫ ⎫ ⎫ ⎫
⎭ ⎭ ⎪ ⎪
\lgroup \rgroup
⎩ ⎪
⎩
⎪ ⎭ ⎪
⎭
⎪
class OPEN class CLOSE
[ ]
[ [ [ [ [ ] ] ] ] ]
class OPEN class CLOSE
\{ \}
{ { { { { } } } } }
class OPEN class CLOSE
\uparrow ↑ \Uparrow ⇑
↑ ↑ ⏐ ⇑ ⇑ ‖
↑ ↑
⏐ ⏐ ⏐
⏐ ⏐
⏐ ⇑ ⇑
‖ ‖ ‖
‖ ‖
‖
⏐ ⏐ ⏐ ‖ ‖ ‖
class REL class REL
\downarrow ⏐ \Downarrow ‖
⏐ ⏐ ⏐ ‖ ‖ ‖
↓ ⏐
↓ ⏐ ⏐
⏐ ⏐
⏐ ⇓ ‖
⇓ ‖ ‖
‖ ‖
‖
↓ ↓ ↓ ⇓ ⇓ ⇓
class REL class REL
\updownarrow \Updownarrow
↑ ↑
↑ ⏐ ⏐ ⇑ ⇑
⇑ ‖ ‖
↕ ↑
⏐
↓ ⏐ ⏐ ⇕ ⇑
‖
⇓ ‖ ‖
↓ ⏐
↓ ⏐
↓ ⇓ ‖
⇓ ‖
⇓
class REL class REL
\langle \rangle
⟨ ⟨ ⟨ ⟨ ⟨ ⟩ ⟩ ⟩ ⟩ ⟩
class OPEN class CLOSE
< >
< ⟨ ⟨ ⟨ ⟨ > ⟩ ⟩ ⟩ ⟩
class REL class REL
| or \vert ∣ \| or \Vert
| ∣ ∣∣ ∣∣∣ ∣ ∥ ∥ ∥ ∥ ∥
∣ ∥ ∥
∥ ∥
∥
class ORD class ORD
\arrowvert \Arrowvert
∣ ∥ ∥
⏐ ∣ ∣∣ ∣∣ ∣ ∥ ∥ ∥
∥ ∥
∥ ∥
∣ ∣ ∥
class ORD class PUNCT
⎪ ⎪
⎪
⎪ ⎪
⎪
⎪ ⎪
⎪
⎪ ⎪
⎪
⎪
\bracevert
⎪ ⎪ ⎪ ⎪
⎪ ⎪ ⎪
⎪ ⎪
⎪
⎪
⎪ ⎪ ⎪
⎪
class ORD
\lceil \rceil
⌈ ⌈ ⌈ ⌈ ⌈ ⌉ ⌉ ⌉ ⌉ ⌉
class OPEN class CLOSE
\lfloor \rfloor
⌊ ⌊ ⌊ ⌊ ⌊ ⌋ ⌋ ⌋ ⌋ ⌋
class OPEN class CLOSE
/ \backslash
/ / / / / ∖ \ \ \ \
class ORD class ORD
⎭ ⎭ ⎪ ⎧
⎧ ⎪ ⎩ ⎩ ⎪ ⎫
⎫ ⎪
⎰ ⎧ ⎧ ⎱ ⎫ ⎫
\lmoustache \rmoustache
⎭ ⎪
⎭
⎪ ⎩ ⎪
⎩
⎪
class OPEN class CLOSE
display with
default inline mode inline with default display mode \nolimits
operator name
behavior \limits behavior (unless otherwise
indicated)
\bigcap, \bigcup
sup sup
⋂ ⋂
sup sup
both change size; ⋂sub ⋂
sub
sub
can change limit placement using \limits and sub
\nolimits
\bigsqcup
sup sup
⨆ ⨆
sup sup
changes size; ⨆sub ⨆
sub
sub
can change limit placement using \limits and sub
\nolimits
\biguplus
sup sup
⨄ ⨄
sup sup
changes size; ⨄sub ⨄
sub
sub
can change limit placement using \limits and sub
\nolimits
\bigvee, \bigwedge
sup sup
⋁ ⋁
sup sup
both change size; ⋁sub ⋁
sub
sub
can change limit placement using \limits and sub
\nolimits
\coprod
sup sup
∐ ∐
sup sup
changes size; ∐sub ∐
sub
sub
can change limit placement using \limits and sub
\nolimits
\det
sup sup
sup sup
does not change size; detsub det det detsub
sub sub
can change limit placement using \limits and
\nolimits
\gcd
sup sup
sup sup
does not change size; gcdsub gcd gcd gcdsub
sub sub
can change limit placement using \limits and
\nolimits
\intop
sup
sup sup
∫ ∫
sup
changes size; ∫sub ∫
can change limit placement using \limits and sub
sub
sub
\nolimits
\inf, \sup
sup sup
sup sup
do not change size; infsub inf inf infsub
sub sub
can change limit placement using \limits and
\nolimits
\injlim, \varinjlim
sup sup
sup sup
do not change size; inj limsub inj lim inj lim inj limsub
sub sub
can change limit placement using \limits and
\nolimits
\max, \min
\Pr
sup sup
sup sup
does not change size; Prsub Pr Pr Prsub
sub sub
can change limit placement using \limits and
\nolimits
\prod
sup sup
∏ ∏
sup sup
changes size; ∏sub ∏
sub
sub
can change limit placement using \limits and sub
\nolimits
\projlim, \varprojlim
sup sup
sup sup
does not change size; proj limsub proj lim proj lim proj limsub
can change limit placement using \limits and sub sub
\nolimits
\sum
sup sup
∑ ∑
sup sup
changes size; ∑sub ∑
sub
sub
can change limit placement using \limits and sub
\nolimits