|
The <math></math> tags can be used to give complex formulas in an understandable and readable format.
Functions, symbols, special characters
Accents/Diacritics
|
\acute{a} \grave{a} \hat{a} \tilde{a} \breve{a}
|
|
\check{a} \bar{a} \ddot{a} \dot{a}
|
|
Standard functions
|
\sin a \cos b \tan c
|
|
\sec d \csc e \cot f
|
|
\arcsin h \arccos i \arctan j
|
|
\sinh k \cosh l \tanh m \coth n
|
|
\operatorname{sh}o \operatorname{ch}p \operatorname{th}q
|
|
\operatorname{argsh}r \operatorname{argch}s \operatorname{argth}t
|
|
\lim u \limsup v \liminf w \min x \max y
|
|
\inf z \sup a \exp b \ln c \lg d \log e \log_{10} f \ker g
|
|
\deg h \gcd i \Pr j \det k \hom l \arg m \dim n
|
|
Modular arithmetic
|
s_k \equiv 0 \pmod{m} a \bmod b
|
|
Derivatives
|
\nabla \, \partial x \, dx \, \dot x \, \ddot y\, dy/dx\, \frac{dy}{dx}\, \frac{\partial^2 y}{\partial x_1\,\partial x_2}
|
|
Sets
|
\forall \exists \empty \emptyset \varnothing
|
|
\in \ni \not \in \notin \subset \subseteq \supset \supseteq
|
|
\cap \bigcap \cup \bigcup \biguplus \setminus \smallsetminus
|
|
\sqsubset \sqsubseteq \sqsupset \sqsupseteq \sqcap \sqcup \bigsqcup
|
|
Operators
|
+ \oplus \bigoplus \pm \mp -
|
|
\times \otimes \bigotimes \cdot \circ \bullet \bigodot
|
|
\star * / \div \frac{1}{2}
|
|
Logic
|
\land (or \and) \wedge \bigwedge \bar{q} \to p
|
|
\lor \vee \bigvee \lnot \neg q \And
|
|
Root
|
\sqrt{2} \sqrt[n]{x}
|
|
Relations
|
\sim \approx \simeq \cong \dot= \overset{\underset{\mathrm{def}}{}}{=}
|
|
\le < \ll \gg \ge > \equiv \not\equiv \ne \mbox{or} \neq \propto
|
|
Geometric
|
\Diamond \Box \triangle \angle \perp \mid \nmid \| 45^\circ
|
|
Arrows
|
\leftarrow (or \gets) \rightarrow (or \to) \nleftarrow \not\to \leftrightarrow \nleftrightarrow \longleftarrow \longrightarrow \longleftrightarrow
|
|
\Leftarrow \Rightarrow \nLeftarrow \nRightarrow \Leftrightarrow \nLeftrightarrow \Longleftarrow \Longrightarrow \Longleftrightarrow (or \iff)
|
|
\uparrow \downarrow \updownarrow \Uparrow \Downarrow \Updownarrow \nearrow \searrow \swarrow \nwarrow
|
|
\rightharpoonup \rightharpoondown \leftharpoonup \leftharpoondown \upharpoonleft \upharpoonright \downharpoonleft \downharpoonright \rightleftharpoons \leftrightharpoons
|
|
\mapsto \longmapsto \hookrightarrow \hookleftarrow \multimap \leftrightsquigarrow \rightsquigarrow
|
|
Special
|
\eth \S \P \% \dagger \ddagger \ldots \cdots
|
|
\smile \frown \wr \triangleleft \triangleright \infty \bot \top
|
|
\vdash \vDash \Vdash \models \lVert \rVert \imath \hbar
|
|
\ell \mho \Finv \Re \Im \wp \complement
|
|
\diamondsuit \heartsuit \clubsuit \spadesuit \Game \flat \natural \sharp
|
|
Unsorted (new stuff)
|
\jmath \surd \ast \uplus \diamond \bigtriangleup \bigtriangledown \ominus
|
|
\oslash \odot \bigcirc \amalg \prec \succ \preceq \succeq
|
|
\dashv \asymp \doteq \parallel
|
|
Fractions, matrices, multilines
Subscripts, superscripts, integrals
| Feature | Syntax | How it looks rendered
|
| HTML | PNG
|
| Superscript | a^2 | a2 |
|
| Subscript | a_2 | a2 |
|
| Grouping | a^{2+2} | a2 + 2 |
|
a_{i,j} | ai,j |
|
| Combining sub & super | x_2^3 |
|
| Super super | 10^{10^{ \,\!{8} } |
|
| Super super | 10^{10^{ \overset{8}{} }} |
|
| Super super (wrong in HTML in some browsers) | 10^{10^8} |
|
| Preceding and/or Additional sub & super | \sideset{_1^2}{_3^4}\prod_a^b |
|
{}_1^2\!\Omega_3^4 |
|
| Stacking
| \overset{\alpha}{\omega} |
|
\underset{\alpha}{\omega} |
|
\overset{\alpha}{\underset{\gamma}{\omega}} |
|
\stackrel{\alpha}{\omega} |
|
| Derivative (forced PNG) | x', y'', f', f''\! | |
|
| Derivative (f in italics may overlap primes in HTML) | x', y'', f', f'' | x',y'',f',f'' |
|
| Derivative (wrong in HTML) | x^\prime, y^{\prime\prime} |  |
|
| Derivative (wrong in PNG) | x\prime, y\prime\prime |  |
|
| Derivative dots | \dot{x}, \ddot{x} |
|
| Underlines, overlines, vectors | \hat a \ \bar b \ \vec c |
|
\overrightarrow{a b} \ \overleftarrow{c d} \ \widehat{d e f} |
|
\overline{g h i} \ \underline{j k l} |
|
| Arrows | A \xleftarrow{n+\mu-1} B \xrightarrow[T]{n\pm i-1} C |
|
| Overbraces | \overbrace{ 1+2+\cdots+100 }^{5050} |
|
| Underbraces | \underbrace{ a+b+\cdots+z }_{26} |
|
| Sum | \sum_{k=1}^N k^2 |
|
Sum (force \textstyle) | \textstyle \sum_{k=1}^N k^2 |
|
| Product | \prod_{i=1}^N x_i |
|
Product (force \textstyle) | \textstyle \prod_{i=1}^N x_i |
|
| Coproduct | \coprod_{i=1}^N x_i |
|
Coproduct (force \textstyle) | \textstyle \coprod_{i=1}^N x_i |
|
| Limit | \lim_{n \to \infty}x_n |
|
Limit (force \textstyle) | \textstyle \lim_{n \to \infty}x_n |
|
| Integral | \int\limits_{1}^{3}\frac{e^3/x}{x^2}\, dx |
|
| Integral (alternate limits style) | \int_{1}^{3}\frac{e^3/x}{x^2}\, dx |
|
Integral (force \textstyle) | \textstyle \int\limits_{-N}^{N} e^x\, dx |
|
Integral (force \textstyle, alternate limits style) | \textstyle \int_{-N}^{N} e^x\, dx |
|
| Double integral | \iint\limits_D \, dx\,dy |
|
| Triple integral | \iiint\limits_E \, dx\,dy\,dz |
|
| Quadruple integral | \iiiint\limits_F \, dx\,dy\,dz\,dt |
|
| Line or path integral | \int_C x^3\, dx + 4y^2\, dy |
|
| Closed line or path integral | \oint_C x^3\, dx + 4y^2\, dy |
|
| Intersections | \bigcap_1^n p |
|
| Unions | \bigcup_1^k p |
|
Parenthesizing big expressions, brackets, bars
| Feature |
Syntax |
How it looks rendered |
| Bad |
( \frac{1}{2} ) |
 |
| Good |
\left ( \frac{1}{2} \right ) |
 |
You can use various delimiters with \left and \right:
Alphabets and typefaces
Texvc cannot render arbitrary Unicode characters. Those can be entered by the expressions below.
For others, such as Cyrillic, they can be entered as Unicode or HTML entities in running text, but cannot be used in displayed formulas.
| Greek alphabet
|
\Alpha \Beta \Gamma \Delta \Epsilon \Zeta
|
|
\Eta \Theta \Iota \Kappa \Lambda \Mu
|
|
\Nu \Xi \Pi \Rho \Sigma \Tau
|
|
\Upsilon \Phi \Chi \Psi \Omega
|
|
\alpha \beta \gamma \delta \epsilon \zeta
|
|
\eta \theta \iota \kappa \lambda \mu
|
|
\nu \xi \pi \rho \sigma \tau
|
|
\upsilon \phi \chi \psi \omega
|
|
\varepsilon \digamma \vartheta \varkappa
|
|
\varpi \varrho \varsigma \varphi
|
|
| boldface (vectors)
|
\mathbf{A} \mathbf{B} \mathbf{C} \mathbf{D} \mathbf{E} \mathbf{F} \mathbf{G}
|
|
\mathbf{H} \mathbf{I} \mathbf{J} \mathbf{K} \mathbf{L} \mathbf{M}
|
|
\mathbf{N} \mathbf{O} \mathbf{P} \mathbf{Q} \mathbf{R} \mathbf{S} \mathbf{T}
|
|
\mathbf{U} \mathbf{V} \mathbf{W} \mathbf{X} \mathbf{Y} \mathbf{Z}
|
|
\mathbf{a} \mathbf{b} \mathbf{c} \mathbf{d} \mathbf{e} \mathbf{f} \mathbf{g}
|
|
\mathbf{h} \mathbf{i} \mathbf{j} \mathbf{k} \mathbf{l} \mathbf{m}
|
|
\mathbf{n} \mathbf{o} \mathbf{p} \mathbf{q} \mathbf{r} \mathbf{s} \mathbf{t}
|
|
\mathbf{u} \mathbf{v} \mathbf{w} \mathbf{x} \mathbf{y} \mathbf{z}
|
|
\mathbf{0} \mathbf{1} \mathbf{2} \mathbf{3} \mathbf{4}
|
|
\mathbf{5} \mathbf{6} \mathbf{7} \mathbf{8} \mathbf{9}
|
|
| Boldface (greek)
|
\boldsymbol{\Alpha} \boldsymbol{\Beta} \boldsymbol{\Gamma} \boldsymbol{\Delta} \boldsymbol{\Epsilon} \boldsymbol{\Zeta}
|
|
\boldsymbol{\Eta} \boldsymbol{\Theta} \boldsymbol{\Iota} \boldsymbol{\Kappa} \boldsymbol{\Lambda} \boldsymbol{\Mu}
|
|
\boldsymbol{\Nu} \boldsymbol{\Xi} \boldsymbol{\Pi} \boldsymbol{\Rho} \boldsymbol{\Sigma} \boldsymbol{\Tau}
|
|
\boldsymbol{\Upsilon} \boldsymbol{\Phi} \boldsymbol{\Chi} \boldsymbol{\Psi} \boldsymbol{\Omega}
|
|
\boldsymbol{\alpha} \boldsymbol{\beta} \boldsymbol{\gamma} \boldsymbol{\delta} \boldsymbol{\epsilon} \boldsymbol{\zeta}
|
|
\boldsymbol{\eta} \boldsymbol{\theta} \boldsymbol{\iota} \boldsymbol{\kappa} \boldsymbol{\lambda} \boldsymbol{\mu}
|
|
\boldsymbol{\nu} \boldsymbol{\xi} \boldsymbol{\pi} \boldsymbol{\rho} \boldsymbol{\sigma} \boldsymbol{\tau}
|
|
\boldsymbol{\upsilon} \boldsymbol{\phi} \boldsymbol{\chi} \boldsymbol{\psi} \boldsymbol{\omega}
|
|
\boldsymbol{\varepsilon} \boldsymbol{\digamma} \boldsymbol{\vartheta} \boldsymbol{\varkappa}
|
|
\boldsymbol{\varpi} \boldsymbol{\varrho} \boldsymbol{\varsigma} \boldsymbol{\varphi}
|
|
| Italics
|
\mathit{A} \mathit{B} \mathit{C} \mathit{D} \mathit{E} \mathit{F} \mathit{G}
|
|
\mathit{H} \mathit{I} \mathit{J} \mathit{K} \mathit{L} \mathit{M}
|
|
\mathit{N} \mathit{O} \mathit{P} \mathit{Q} \mathit{R} \mathit{S} \mathit{T}
|
|
\mathit{U} \mathit{V} \mathit{W} \mathit{X} \mathit{Y} \mathit{Z}
|
|
\mathit{a} \mathit{b} \mathit{c} \mathit{d} \mathit{e} \mathit{f} \mathit{g}
|
|
\mathit{h} \mathit{i} \mathit{j} \mathit{k} \mathit{l} \mathit{m}
|
|
\mathit{n} \mathit{o} \mathit{p} \mathit{q} \mathit{r} \mathit{s} \mathit{t}
|
|
\mathit{u} \mathit{v} \mathit{w} \mathit{x} \mathit{y} \mathit{z}
|
|
\mathit{0} \mathit{1} \mathit{2} \mathit{3} \mathit{4}
|
|
\mathit{5} \mathit{6} \mathit{7} \mathit{8} \mathit{9}
|
|
| Roman typeface
|
\mathrm{A} \mathrm{B} \mathrm{C} \mathrm{D} \mathrm{E} \mathrm{F} \mathrm{G}
|
|
\mathrm{H} \mathrm{I} \mathrm{J} \mathrm{K} \mathrm{L} \mathrm{M}
|
|
\mathrm{N} \mathrm{O} \mathrm{P} \mathrm{Q} \mathrm{R} \mathrm{S} \mathrm{T}
|
|
\mathrm{U} \mathrm{V} \mathrm{W} \mathrm{X} \mathrm{Y} \mathrm{Z}
|
|
\mathrm{a} \mathrm{b} \mathrm{c} \mathrm{d} \mathrm{e} \mathrm{f} \mathrm{g}
|
|
\mathrm{h} \mathrm{i} \mathrm{j} \mathrm{k} \mathrm{l} \mathrm{m}
|
|
\mathrm{n} \mathrm{o} \mathrm{p} \mathrm{q} \mathrm{r} \mathrm{s} \mathrm{t}
|
|
\mathrm{u} \mathrm{v} \mathrm{w} \mathrm{x} \mathrm{y} \mathrm{z}
|
|
\mathrm{0} \mathrm{1} \mathrm{2} \mathrm{3} \mathrm{4}
|
|
\mathrm{5} \mathrm{6} \mathrm{7} \mathrm{8} \mathrm{9}
|
|
| Calligraphy/Script
|
\mathcal{A} \mathcal{B} \mathcal{C} \mathcal{D} \mathcal{E} \mathcal{F} \mathcal{G}
|
|
\mathcal{H} \mathcal{I} \mathcal{J} \mathcal{K} \mathcal{L} \mathcal{M}
|
|
\mathcal{N} \mathcal{O} \mathcal{P} \mathcal{Q} \mathcal{R} \mathcal{S} \mathcal{T}
|
|
\mathcal{U} \mathcal{V} \mathcal{W} \mathcal{X} \mathcal{Y} \mathcal{Z}
|
|
| Hebrew
|
\aleph \beth \gimel \daleth
|
|
| Feature |
Syntax |
How it looks rendered |
| non-italicised characters |
\mbox{abc} |
abc |
 |
| mixed italics (bad) |
\mbox{if} n \mbox{is even} |
ifnis even |
 |
| mixed italics (good) |
\mbox{if }n\mbox{ is even} |
if n is even |
 |
| mixed italics (more legible: ~ is a non-breaking space, while "\ " forces a space) |
\mbox{if}~n\ \mbox{is even} |
 |
 |
Color
Equations can use color:
{\color{Blue}x^2}+{\color{YellowOrange}2x}-{\color{OliveGreen}1}
x_{1,2}=\frac{-b\pm\sqrt{\color{Red}b^2-4ac}}{2a}
See here for all named colors supported by LaTeX.
Note that color should not be used as the only way to identify something, because it will become meaningless on black-and-white media or for color-blind people.
Formatting issues
Spacing
Note that TeX handles most spacing automatically, but you may sometimes want manual control.
| Feature |
Syntax |
How it looks rendered |
| double quad space |
a \qquad b |
 |
| quad space |
a \quad b |
 |
| text space |
a\ b |
 |
| text space without PNG conversion |
a \mbox{ } b |
a b |
| large space |
a\;b |
 |
| medium space |
a\>b |
[not supported] |
| small space |
a\,b |
 |
| no space |
ab |
 |
| small negative space |
a\!b |
 |
Forced PNG rendering
To force the formula to render as PNG, add \, (small space) at the end of the formula (where it is not rendered). This will force PNG if the user is in "HTML if simple" mode, but not for "HTML if possible" mode (math rendering settings in Preferences).
You can also use \,\! (small space and negative space, which cancel out) anywhere inside the math tags. This does force PNG even in "HTML if possible" mode, unlike \,.
This could be useful to keep the rendering of formulae in a proof consistent, for example, or to fix formulae that render incorrectly in HTML (at one time, a^{2+2} rendered with an extra underscore), or to demonstrate how something is rendered when it would normally show up as HTML (as in the examples above).
For instance:
| Syntax |
How it looks rendered |
| a^{c+2} |
ac + 2 |
| a^{c+2} \, |
 |
| a^{\,\!c+2} |
|
| a^{b^{c+2}} |
(WRONG with option "HTML if possible or else PNG"!) |
| a^{b^{c+2}} \, |
(WRONG with option "HTML if possible or else PNG"!) |
| a^{b^{c+2}}\approx 5 |
(due to " " correctly displayed, no code "\,\!" needed) |
| a^{b^{\,\!c+2}} |
 |
| \int_{-N}^{N} e^x\, dx |
 |
Last modified July 2, 2008 8:37 am
|
|