Math syntax

Back to Remark syntax

Mathematics can be written in Remark using either the AsciiMath syntax, or the Latex syntax. Here we provide a brief tutorial to both syntaxes; complete list of commands for the syntaxes can be found from the above links.

Inline mathematics in AsciiMath and Latex are enclosed in '' and $, respectively. Display mathematics in Latex is enclosed in $$.

Note: MathJax 2.5 — which renders the mathematics — contains a bug which makes the equation number to overlap a long equation. Since Remark refers to MathJax via CDN, this problem will be automatically fixed with the next version of MathJax.

Realistic constructs

Quadratic equation

The solution to the quadratic equation is ''x = (-b +- sqrt(b^2 - 4ac)) / (2a)''.

The solution to the quadratic equation is .

The solution to the quadratic equation is $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$.

The solution to the quadratic equation is .

Equation labels

The quadratic equation is given by 
$$a x^2 + b x + c = 0 \label{Quadratic}.$$ 
The solution to Equation $\ref{Quadratic}$ is given by 
$$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.$$

The quadratic equation is given by The solution to Equation is given by

Equation tags

The quadratic equation is given by 
$$a x^2 + b x + c = 0 \label{Quadratic2} \tag{quadratic equation}.$$ 
The solution to the $\ref{Quadratic2}$ is given by 
$$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}. \notag$$

The quadratic equation is given by The solution to the is given by

Reflexivity

''R " is reflexive" <=> forall x: x R x''

$R \textrm{ is reflexive} \iff \forall x: x R x$

Transitivity

''R " is transitive" <=> forall x, y, z: (xRy ^^ yRz) => xRz''

$R \textrm{ is transitive} \iff \forall x, y, z: (xRy \land yRz) \implies xRz$

Continuity

A function $f : \mathbb{R}^n \to \mathbb{R}^m$ is _continuous_ at $p \in \mathbb{R}^n$, if
$$\forall \varepsilon \in \mathbb{R}^{> 0}: \exists \delta \in \mathbb{R}^{> 0}: \forall x \in \mathbb{R}^n : \left\lVert x - p \right\rVert < \delta \implies \left\lVert f(x) - f(p) \right\rVert < \varepsilon.$$

A function is continuous at , if

A function ''f : RR^n -> RR^m'' is _continuous_ at ''p in RR^n'', if

''forall epsilon in RR^{> 0}: exists delta in RR^{> 0}: forall x in RR^n: ||x - p|| < delta => ||f(x) - f(p)|| < epsilon''

A function is continuous at , if

Differentiability

A function $f : \mathbb{R}^n \to \mathbb{R}^m$ is _differentiable_ at $p \in \mathbb{R}^n$, if
$$\frac{\left\lVert f(p + h) - \left[ f(p) + (D_p f)(h) \right] \right\rVert}{\left\lVert h \right\rVert} \xrightarrow{h \to 0} 0.$$

A function is differentiable at , if

Limit

''1 / n stackrel(n -> infty)(->) 0''

$\frac{1}{n} \xrightarrow{n \to \infty} 0$

Basic constructs

Basic constructs

Fraction

''(x+1)/(x-1)''

$\frac{x + 1}{x - 1}$

Superscript

''x^(i+j)''

$x^{i + j}$

Subscript

''x_(ij)''

$x_{ij}$

Square-root

''sqrt(x)''

$\sqrt{x}$

Root

''root(n)(x)''

$\sqrt[n]{x}$

Stacking symbols

''stackrel(n -> infty)(->)''

$\overset{n \to \infty}{\to}$

$\xrightarrow{n \to \infty}$

Text

 ''text(is reflexive)''

 ''"is reflexive"''

 $\textrm{is reflexive}$

Operation symbols

''+ - * // \\ xx -: @ o+ ox sum prod ^^ ^^^ vv vvv nn nnn uu uuu''

$+ - * / \setminus \times \div \circ \oplus \otimes \sum \prod \land \bigwedge \lor \bigvee \cap \bigcap \cup \bigcup$

Relation symbols

''= != < <= > >= -< >- in !in sub sup sube supe -= ~= ~~ prop''

$= \neq < \leq > \geq \prec \succ \in \not\in \subset \supset \subseteq \supseteq \equiv \approxeq \approx \propto$

Logical symbols

''and or not => iff forall exists TT |--''

$\land \lor \lnot \implies \iff \forall \exists \top \bot \vdash \vDash$

Miscellaneous symbols

''int oint del grad +- O/ oo aleph ... cdots \ quad qquad diamond square |~ ~|''

$\int \oint \partial \nabla \pm \emptyset \infty \aleph \dots \cdots \quad \qquad \diamond \square \lceil \rceil \lfloor \rfloor$

Standard functions

''sin cos tan csc sec cot sinh cosh tanh log ln det dim lim mod gcd lcm''

$\sin \cos \tan \csc \sec \cot \sinh \cosh \tanh \log \ln \det \dim \lim \mod \gcd$

Grouping brackets

''(x) [x] {x} (:x:)''

$(x) [x] \{x\} \langle x \rangle$

Arrows

''uarr darr -> larr harr => lArr <=>''

$\uparrow \downarrow \to \leftarrow \leftrightarrow \Uparrow \Downarrow \Rightarrow \Leftarrow \Leftrightarrow$

Accents

Hat

''hat(2 + 3 * 4)''

$\hat{x}$

$\widehat{2 + 3 * 4}$

Dot

''dot(x)''

$\dot{x}$

Two dots

''ddot(x)''

$\ddot{x}$

Overline

''bar(2 + 3 * 4)''

$\overline{2 + 3 * 4}$

Underline

''ul(2 + 3 * 4)''

$\underline{2 + 3 * 4}$

Vector arrow

''vec(2 + 3 * 4)''

$\vec{x}$

$\overrightarrow{2 + 3 * 4}$

Font commands

Normal

''text(abcdefghijklmnopqrstuvwxyz)''

''text(ABCDEFGHIJKLMNOPQRSTUVWXYZ)''

$\mathrm{abcdefghijklmnopqrstuvwxyz}$

$\mathrm{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$

Bold

''bb("abcdefghijklmnopqrstuvwxyz")''

''bb("ABCDEFGHIJKLMNOPQRSTUVWXYZ")''

$\mathbf{abcdefghijklmnopqrstuvwxyz}$

$\mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$

Blackboard-bold

''bbb("abcdefghijklmnopqrstuvwxyz")''

''bbb("ABCDEFGHIJKLMNOPQRSTUVWXYZ")''

$\mathbb{abcdefghijklmnopqrstuvwxyz}$

$\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$

Script

''cc("abcdefghijklmnopqrstuvwxyz")''

''cc("ABCDEFGHIJKLMNOPQRSTUVWXYZ")''

$\mathscr{abcdefghijklmnopqrstuvwxyz}$

$\mathscr{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$

Calligraphic

$\mathcal{abcdefghijklmnopqrstuvwxyz}$

$\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$

Monospace

''tt("abcdefghijklmnopqrstuvwxyz")''

''tt("ABCDEFGHIJKLMNOPQRSTUVWXYZ")''

$\mathtt{abcdefghijklmnopqrstuvwxyz}$

$\mathtt{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$

Fraktur

''fr("abcdefghijklmnopqrstuvwxyz")''

''fr("ABCDEFGHIJKLMNOPQRSTUVWXYZ")''

$\mathfrak{abcdefghijklmnopqrstuvwxyz}$

$\mathfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$

Sans-serif

''sf("abcdefghijklmnopqrstuvwxyz")''

''sf("ABCDEFGHIJKLMNOPQRSTUVWXYZ")''

$\mathsf{abcdefghijklmnopqrstuvwxyz}$

$\mathsf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$

Matrices

''[[a,b],[c,d]] ((1,0),(0,1))''

$\begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}$

Greek letters

''alpha beta gamma delta epsi zeta eta theta iota kappa lambda mu nu xi o pi rho sigma tau upsilon phi chi psi omega''

''A B Gamma Delta E Z H theta I K Lambda N N Xi O Pi P Sigma T Y Phi X Psi Omega''

$\alpha \beta \gamma \delta \epsilon \varepsilon \zeta \eta \theta \iota \kappa \lambda \mu \nu \xi o \pi \rho \sigma \tau \upsilon \phi \chi \psi \omega$

$A B \Gamma \Delta E Z H \theta I K \Lambda N N \Xi O \Pi P \Sigma T Y \Phi X \Psi \Omega$

Files

Markdown math extension

MathJax configuration file for Remark