Home | Math Display Experiments | ASCIIMathML, KaTeX and MathJax Demo

ASCIIMathML, KaTeX and MathJax Demo

By Murray Bourne, IntMath.com. Last updated: 19 Apr 2017

ASCIIMathML input

On this page, all input is ASCIIMathML, and the math expressions have been processed with KaTeX where possible, and with MathJax in those cases where KaTeX cannot handle it yet.

NOTE: The math equations and expressions which have a green mark on the left have been rendered by MathJax. Those without a green mark have been rendered using KaTeX.

See some background: KaTeX with ASCIIMathML input and MathJax fallback.

Example math expressions

Some random text then some math r = +- sqrt(a^2 + b^2), then some more text.
The ASCIIMathML input for the above line was r = +- sqrt(a^2 + b^2).

Fractions y/z (ASCIIMathML input was y/z.)

3xx3 matrix: ((1,2,3),(4,8,3),(-5,4,9))

ASCIIMathML input was ((1,2,3),(4,8,3),(-5,4,9)).

Products and powers of variables: ab^2. ASCIIMathML input was ab^2

Integrals: int_(0)^(2 pi) sin x dx = 0 ASCIIMathML input was int_(0)^(2 pi) sin x dx = 0

Square root: sqrt(169) = 13. ASCIIMathML input was sqrt(169) = 13

Summation notation: sum_(i=1)^ni^3 ASCIIMathML input was sum_(i=1)^ni^3

Fourier Series:

f(t) =(a_0)/2  + sum_(n=1)^ooa_ncos((npit)/L) +sum_(n=1)^oo b_n\ sin((npit)/L)

ASCIIMathML input was f(t)=(a_0)/2 + sum_(n=1)^ooa_ncos((npit)/L)+sum_(n=1)^oo b_n\ sin((npit)/L).

=(a_0)/2 +a_1 cos((pit)/L) +a_2 cos((2pit)/L) +a_3 cos((3pit)/L)+... +b_1 sin((pit)/L) +b_2 sin((2pit)/L) +b_3 sin((3pit)/L) +...

ASCIIMathML input was =(a_0)/2 +a_1 cos((pit)/L) +a_2 cos((2pit)/L) +a_3 cos((3pit)/L)+... +b_1 sin((pit)/L) +b_2 sin((2pit)/L) +b_3 sin((3pit)/L) +...

ASCIIMathML syntax examples

Type See Greek letters (lower case) alpha alpha beta beta gamma gamma delta delta epsilon epsilon varepsilon varepsilon zeta zeta eta eta theta theta vartheta vartheta iota iota kappa kappa lambda lambda mu mu nu nu xi xi omicron o pi pi rho rho sigma sigma tau tau upsilon upsilon phi phi varphi varphi chi chi psi psi omega omega
Type See Greek letters (upper case) A A B B Gamma Gamma Delta Delta E E Z Z - - H H Theta Theta - - I I K K Lambda Lambda M M N N Xi Xi O O Pi Pi P R Sigma Sigma T T Y Y Phi Phi - - X X Psi Psi Omega Omega
Type See Operation symbols + + - - * * ** ** // // \\ \ xx xx -: -: @ @ o+ o+ ox ox o. o. sum sum prod prod ^^ ^^ ^^^ ^^^ vv vv vvv vvv nn nn nnn nnn uu uu uuu uuu
Type See Miscellaneous symbols int int oint oint del del grad grad +- +- O/ O/ oo oo aleph aleph /_ /_ :. :. |...| |...| |cdots| |cdots| vdots vdots ddots ddots |\ | || |quad| |quad| diamond diamond square square |__ |__ __| __| |~ |~ ~| ~| CC CC NN NN QQ QQ RR RR ZZ ZZ
Type See Accents hat x hat x bar x bar x ul x ul x vec x vec x dot x dot x ddot x ddot x
Type See Arrows uarr uarr darr darr rarr rarr -> -> |-> |-> larr larr harr harr rArr rArr lArr lArr hArr hArr
Type See Relation symbols = = != != < < > > <= <= >= >= -< -< >- >- in in !in notin sub sub sup sup sube sube supe supe -= -= ~= ~= ~~ ~~ prop prop
Type See Font commands bb A bb A bbb A bbb A cc A cc A cc L cc L tt A tt A fr A fr A sf A sf A
Type See Grouping brackets ( ( ) ) [ [ ] ] { { } } (: (: :) :) {: {: :} {::}
Type See Logical symbols and and or or not not => => if if iff iff AA AA EE EE _|_ _|_ TT TT |-- |-- |== |==

Examples of use

Type this:

x^2+y_1+z_12^34

See this:

x^2+y_1+z_12^34

Type this:

sin^-1(x)

See this:

sin^-1(x)

Type this:

d/dxf(x) = lim_(h->0)(f(x+h)-f(x))/h

See this:

d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h

Type this:

f(x) = sum_(n=0)^oo (f^((n))(a))/(n!)(x-a)^n

See this:

f(x)=sum_(n=0)^oo (f^((n))(a))/(n!)(x-a)^n

Type this:

int_0^1f(x)dx

See this:

int_0^1f(x)dx

Type this:

[[a,b],[c,d]]((n),(k))

See this:

[[a,b],[c,d]]((n),(k))

Type this:

f(x) = {(1,if x=0), (0,if x>=0):}

See this:

f(x) = {(1,if x=0), (0,if x>=0):}

Type this:

a//b

See this:

a//b

Type this:

(a/b)/(c/d)

See this:

(a/b)/(c/d)

Type this:

a/b/c/d

See this:

a/b/c/d

Type this:

((a*b))/c

See this:

((a*b))/c

Type this:

sqrt sqrt root3x

See this:

sqrt sqrt root3x

Type this:

<< a,b >> and {:(x,y),(u,v):}

See this:

<< a,b >> and {:(x,y),(u,v):}

Type this:

(a,b]={x in RR | a < x <= b}

See this:

(a,b]={x in RR | a < x <= b}

Type this:

abc-123.45^-1.1

See this:

abc-123.45^-1.1

Type this:

hat(ab) bar(xy) ulA vec v dotx ddot y

See this:

hat(ab) bar(xy) ulA vec v dotx ddot y

Type this:

bb{AB3}.bbb(AB]. cc(AB).fr{AB}. tt[AB].sf(AB)

See this:

bb{AB3}.bbb(AB]. cc(AB).fr{AB}. tt[AB].sf(AB)

Type this:

stackrel"def"= or \stackrel{\Delta}{=}" "("or ":=)

See this:

stackrel"def"= or \stackrel{\Delta}{=}" "("or ":=)

Type this:

{::}_(\ 92)^238U

See this:

{::}_(\ 92)^238U

You may be interested in...

This comparison of the 2 systems of math rendering: