Switch branches/tags
Nothing to show
Fetching contributors…
Cannot retrieve contributors at this time
101 lines (100 sloc) 11 KB

This file was generated automatically from MkSnippets.hs. Run cabal test to refresh it.

Tests

Simple expressions

𝑎 + 𝑏 * 𝑐  a+b{\cdot}c
𝐴 * 𝐵 + 𝐶  A{\cdot}B+C
(𝑎 + 𝑏) * 𝑐  \left(a+b\right){\cdot}c
(𝑎 + 𝑏) / (𝑥 - 𝑦)  \frac{a+b}{x-y}
(𝑎 + 𝑏)**(𝑥 - 𝑦)  \left(a+b\right)^{x-y}
(𝑝/𝑞)**γ  \left(\frac{p}{q}\right)^{\gamma{}}
abs(𝑝/𝑞)**ξ  \left|\frac{p}{q}\right|^{\xi{}}
𝑎**𝑏**𝑐  a^{b^{c}}
(𝑎**𝑏)**𝑐  \left(a^{b}\right)^{c}
sin (sin 𝑥)  \sin{\left(\sin{x}\right)}
(𝑖⩵0,3)∑ 𝑖  \sum_{i=0}^{3} i
matrix[[ 0,1] ,[-1,0]]  \begin{pmatrix}0&1\\ -1&0\end{pmatrix}

Number literals

25697325  25697325
4.718  4.718
1e-3  1{\cdot}10^{ -3}
257.35e9  2.5735{\cdot}10^{11}
-5.1e-8   -5.1{\cdot}10^{ -8}
7/13  \frac{7}{13}
-(1/2)   -\frac{1}{2}

Operators

Arithmetic

𝑎 + 𝑏  a+b
𝑎 - 𝑏  a-b
𝑎 * 𝑏  a{\cdot}b
𝑎 × 𝑏  a\times{}b
𝑎 ± 𝑏  a\pm{}b
𝑎 ∓ 𝑏  a\mp{}b
𝑎 ⊕ 𝑏  a\oplus{}b
𝑎 ⊗ 𝑏  a\otimes{}b

Sub/superscripts

𝑎◞𝑏  a_{b}
𝑎◞◝(𝑏,𝑐)  a_{b}^{c}
ψ◞"Foo"  \psi{}_{\mathrm{Foo}}
ψ◞𝐹⁀𝑜⁀𝑜  \psi{}_{Foo}

Function application

𝑓°𝑥  f\left(x\right)
𝑓°(𝑥،𝑦)  f\left(x,y\right)

Logical

𝑝 ∨ 𝑞  p\vee{}q
𝑝 ∧ 𝑞  p\wedge{}q
𝑝==>𝑞  p\Longrightarrow q
𝑝<==𝑞  p\Longleftarrow q
𝑝<=>𝑞  p\Longleftrightarrow q
𝑝==>𝑞==>𝑟  p\Longrightarrow q\Longrightarrow r
cases[(1, "Today"), (2, "Else")]  \begin{cases}1&\text{Today}\\2&\text{Else}\end{cases}

Relations

𝑎 ⩵ 𝑏  a=b
𝑎 ≥ 𝑐  a\geq{}c
𝑎 ⪡ ρ  a<\rho{}
𝑥 ⩵ 𝑦 ⩵ 𝑧  x=y=z
𝑠 ⊂ 𝑡 ⊆ 𝑢  s\subset{}t\subseteq{}u
𝑝 ∈ ℚ ⊂ ℝ  p\in{}\mathbb{Q}\subset{}\mathbb{R}

Calculus

Integration

(-1,1)∫d 𝑥 (𝑥**2)  \int\limits_{ -1}^{1}\mathrm{d}x\ x^{2}
ω◞∫d 𝑥 (exp \$ -(𝑥**2))  \int_{\omega{}}\!\!\!\mathrm{d}x\ \exp{\left( -x^{2}\right)}
(0,1)∫d 𝑥 ((0,1)∫d 𝑦 (𝑥*𝑦))  \int\limits_{0}^{1}\mathrm{d}x\ \int\limits_{0}^{1}\mathrm{d}y\ \left(x{\cdot}y\right)

Algebraic manipulation

𝑎 + 𝑏 + 𝑐 &~~! [𝑏 ⩵ 𝑦]  a+b+c=a+y+c
𝑎 + 𝑏 + 𝑐 &~~! [𝑏+𝑐 ⩵ 𝑐+𝑏, 𝑎+𝑐 ⩵ ξ]  a+b+c=\xi{}+b
𝑎 - 𝑏 &~~! [𝑏 ⩵ 𝑦] &~~! [𝑎 ⩵ 𝑧]  a-b=a-y=z-y
𝑥 + 𝑦 & continueExpr (⩵) (&~: 𝑦 :=: 𝑥*(1+𝑥)) & continueExpr (⩵) (&~: 𝑥 :=: 2◝𝑝)  x+y=x+x{\cdot}\left(1+x\right)=2^{p}+2^{p}{\cdot}\left(1+2^{p}\right)

Juxtaposition

𝑚 + 𝑝⁀𝑞⁀𝑟  m+pqr
𝑚 + 𝑝⁀(2+𝑞)⁀𝑟  m+p\left(2+q\right)r
𝑚 + (𝑝␣𝑞␣𝑟)  m+\left(p\ q\ r\right)
𝑚 + (𝑝␣2+𝑞␣𝑟)  m+\left(p\ 2+q\ r\right)
𝑚 + (𝑝<>𝑞<>𝑟)  m+pqr
𝑚 + (𝑝<>(2+𝑞)<>𝑟)  m+\left(p2+qr\right)
𝑚 * ((1+2)<>(3+4))  m{\cdot}\left(1+23+4\right)

Misc

3*𝑧 - 1  3{\cdot}z-1
𝑎-𝑏+𝑐  a-b+c
3 - 1 &~~! [ ㄒ-ㄗ ⩵ -(ㄗ-ㄒ) ] 3-1= -\left(1-3\right)