Permalink
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

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

Number literals

Haskell LaTeX pdf
25697325 25697325 pdflatex-rendered version of 25697325
4.718 4.718 pdflatex-rendered version of 4.718
1e-3 1{\cdot}10^{ -3} pdflatex-rendered version of 1{\cdot}10^{ -3}
257.35e9 2.5735{\cdot}10^{11} pdflatex-rendered version of 2.5735{\cdot}10^{11}
-5.1e-8 -5.1{\cdot}10^{ -8} pdflatex-rendered version of  -5.1{\cdot}10^{ -8}
7/13 \frac{7}{13} pdflatex-rendered version of \frac{7}{13}
-(1/2) -\frac{1}{2} pdflatex-rendered version of  -\frac{1}{2}

Operators

Arithmetic

Haskell LaTeX pdf
𝑎 + 𝑏 a+b pdflatex-rendered version of a+b
𝑎 - 𝑏 a-b pdflatex-rendered version of a-b
𝑎 * 𝑏 a{\cdot}b pdflatex-rendered version of a{\cdot}b
𝑎 × 𝑏 a\times{}b pdflatex-rendered version of a\times{}b
𝑎 ± 𝑏 a\pm{}b pdflatex-rendered version of a\pm{}b
𝑎 ∓ 𝑏 a\mp{}b pdflatex-rendered version of a\mp{}b
𝑎 ⊕ 𝑏 a\oplus{}b pdflatex-rendered version of a\oplus{}b
𝑎 ⊗ 𝑏 a\otimes{}b pdflatex-rendered version of a\otimes{}b

Sub/superscripts

Haskell LaTeX pdf
𝑎◞𝑏 a_{b} pdflatex-rendered version of a_{b}
𝑎◞◝(𝑏,𝑐) a_{b}^{c} pdflatex-rendered version of a_{b}^{c}
ψ◞"Foo" \psi{}_{\mathrm{Foo}} pdflatex-rendered version of \psi{}_{\mathrm{Foo}}
ψ◞𝐹⁀𝑜⁀𝑜 \psi{}_{Foo} pdflatex-rendered version of \psi{}_{Foo}

Function application

Haskell LaTeX pdf
𝑓°𝑥 f\left(x\right) pdflatex-rendered version of f\left(x\right)
𝑓°(𝑥،𝑦) f\left(x,y\right) pdflatex-rendered version of f\left(x,y\right)

Logical

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

Relations

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

Calculus

Integration

Haskell LaTeX pdf
(-1,1)∫d 𝑥 (𝑥**2) \int\limits_{ -1}^{1}\mathrm{d}x\ x^{2} pdflatex-rendered version of \int\limits_{ -1}^{1}\mathrm{d}x\ x^{2}
ω◞∫d 𝑥 (exp $ -(𝑥**2)) \int_{\omega{}}\!\!\!\mathrm{d}x\ \exp{\left( -x^{2}\right)} pdflatex-rendered version of \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) pdflatex-rendered version of \int\limits_{0}^{1}\mathrm{d}x\ \int\limits_{0}^{1}\mathrm{d}y\ \left(x{\cdot}y\right)

Algebraic manipulation

Haskell LaTeX pdf
𝑎 + 𝑏 + 𝑐 &~~! [𝑏 ⩵ 𝑦] a+b+c=a+y+c pdflatex-rendered version of a+b+c=a+y+c
𝑎 + 𝑏 + 𝑐 &~~! [𝑏+𝑐 ⩵ 𝑐+𝑏, 𝑎+𝑐 ⩵ ξ] a+b+c=\xi{}+b pdflatex-rendered version of a+b+c=\xi{}+b
𝑎 - 𝑏 &~~! [𝑏 ⩵ 𝑦] &~~! [𝑎 ⩵ 𝑧] a-b=a-y=z-y pdflatex-rendered version of 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) pdflatex-rendered version of x+y=x+x{\cdot}\left(1+x\right)=2^{p}+2^{p}{\cdot}\left(1+2^{p}\right)

Juxtaposition

Haskell LaTeX pdf
𝑚 + 𝑝⁀𝑞⁀𝑟 m+pqr pdflatex-rendered version of m+pqr
𝑚 + 𝑝⁀(2+𝑞)⁀𝑟 m+p\left(2+q\right)r pdflatex-rendered version of m+p\left(2+q\right)r
𝑚 + (𝑝␣𝑞␣𝑟) m+\left(p\ q\ r\right) pdflatex-rendered version of m+\left(p\ q\ r\right)
𝑚 + (𝑝␣2+𝑞␣𝑟) m+\left(p\ 2+q\ r\right) pdflatex-rendered version of m+\left(p\ 2+q\ r\right)
𝑚 + (𝑝<>𝑞<>𝑟) m+pqr pdflatex-rendered version of m+pqr
𝑚 + (𝑝<>(2+𝑞)<>𝑟) m+\left(p2+qr\right) pdflatex-rendered version of m+\left(p2+qr\right)
𝑚 * ((1+2)<>(3+4)) m{\cdot}\left(1+23+4\right) pdflatex-rendered version of m{\cdot}\left(1+23+4\right)

Misc

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