| title | date | tags | ||||
|---|---|---|---|---|---|---|
AsciiMath syntax and test suite |
2016-04-11 |
|
From http://asciimath.org but instead use double backticks (``).
| Type | See |
|---|---|
+ |
+ |
- |
- |
* |
* |
** |
** |
*** |
*** |
// |
// |
\\ |
\\ |
xx |
xx |
-: |
-: |
| ` | ><` |
| `>< | ` |
| ` | >< |
@ |
@ |
o+ |
o+ |
ox |
ox |
o. |
o. |
sum |
sum |
prod |
prod |
^^ |
^^ |
^^^ |
^^^ |
vv |
vv |
vvv |
vvv |
nn |
nn |
nnn |
nnn |
uu |
uu |
uuu |
uuu |
The use of | might confuse some table parser for |...|, |cdots|, |\ |, |quad|, |__, __|, |~ and ~|
| Type | See |
|---|---|
2/3 |
2/3 |
2^3 |
2^3 |
sqrt x |
sqrt x |
root(3)(x) |
root(3)(x) |
int |
int |
oint |
oint |
del |
del |
grad |
grad |
+- |
+- |
O/ |
O/ |
oo |
oo |
aleph |
aleph |
/_ |
/_ |
:. |
:. |
| ` | ... |
| ` | cdots |
vdots |
vdots |
ddots |
ddots |
| ` | \ |
| ` | quad |
/_ |
/_ |
frown |
frown |
| ` | quad |
diamond |
diamond |
square |
square |
| ` | __` |
| `__ | ` |
| ` | ~` |
| `~ | ` |
CC |
CC |
NN |
NN |
QQ |
QQ |
RR |
RR |
ZZ |
ZZ |
"hi" |
"hi" |
| Type | See |
|---|---|
= |
= |
!= |
!= |
< |
< |
> |
> |
<= |
>= |
>= |
>= |
-< |
-< |
-<= |
-<= |
>- |
>- |
>-= |
>-= |
in |
in |
!in |
!in |
sub |
sub |
sup |
sup |
sube |
sube |
supe |
supe |
-= |
-= |
~= |
~= |
~~ |
~~ |
prop |
prop |
| Type | See |
|---|---|
alpha |
alpha |
beta |
beta |
gamma |
gamma |
Gamma |
Gamma |
delta |
delta |
Delta |
Delta |
epsilon |
epsilon |
varepsilon |
varepsilon |
zeta |
zeta |
eta |
eta |
theta |
theta |
Theta |
Theta |
vartheta |
vartheta |
iota |
iota |
kappa |
kappa |
lambda |
lambda |
Lambda |
Lambda |
mu |
mu |
nu |
nu |
xi |
xi |
Xi |
Xi |
pi |
pi |
Pi |
Pi |
rho |
rho |
sigma |
sigma |
Sigma |
Sigma |
tau |
tau |
upsilon |
upsilon |
phi |
phi |
Phi |
Phi |
varphi |
varphi |
chi |
chi |
psi |
psi |
Psi |
Psi |
omega |
omega |
Omega |
Omega |
The use of | might confuse some table parser _|_, |--, |==
| Type | See |
|---|---|
and |
and |
or |
or |
not |
not |
=> |
=> |
if |
if |
<=> |
<=> |
AA |
AA |
EE |
EE |
| `_ | _` |
TT |
TT |
| ` | --` |
| ` | ==` |
| Type | See |
|---|---|
( |
( |
) |
) |
[ |
[ |
] |
] |
{ |
{ |
{ |
} |
(: |
(: |
:) |
:) |
<< |
<< |
>> |
>> |
{: x ) |
{: x ) |
( x :} |
( x :} |
abs(x) |
abs(x) |
floor(x) |
floor(x) |
ceil(x) |
ceil(x) |
norm(vec x) |
norm(vec x) |
The use of | might confuse some table parser: |->
| Type | See |
|---|---|
uarr |
uarr |
darr |
darr |
rarr |
rarr |
-> |
-> |
>-> |
>-> |
->> |
->> |
>->> |
>->> |
| ` | ->` |
larr |
larr |
harr |
harr |
rArr |
rArr |
lArr |
lArr |
hArr |
hArr |
| Type | See |
|---|---|
hat x |
hat x |
bar x |
bar x |
ul x |
ul x |
vec x |
vec x |
dot x |
dot x |
ddot x |
ddot x |
overset(x)(=) |
overset(x)(=) |
underset(x)(=) |
underset(x)(=) |
ubrace(1+2) |
ubrace(1+2) |
obrace(1+2) |
obrace(1+2) |
color(red)(x) |
color(red)(x) |
cancel(x) |
cancel(x) |
| Type | See |
|---|---|
bb "AaBbCc" |
bb "AaBbCc" |
bbb "AaBbCc" |
bbb "AaBbCc" |
cc "AaBbCc" |
cc "AaBbCc" |
tt "AaBbCc" |
tt "AaBbCc" |
fr "AaBbCc" |
fr "AaBbCc" |
sf "AaBbCc" |
sf "AaBbCc" |
sin, cos, tan, csc, sec, cot, sinh, cosh, tanh, log, ln, det, dim, lim, mod, gcd, lcm, min, max
Matrices: [[a,b],[c,d]] yields to [[a,b],[c,d]]
Column vectors: ((a,b),(c,d)) yields to ((a,b),(c,d))
Matrices can be used for layout: {(2x,+,17y,=,23),(x,-,y,=,5):} yields {(2x,+,17y,=,23),(x,-,y,=,5):}
Complex subscripts: lim_(N->oo) sum_(i=0)^N yields to lim_(N->oo) sum_(i=0)^N
Subscripts must come before superscripts: int_0^1 f(x)dx yields to int_0^1 f(x)dx
Derivatives: f'(x) = dy/dx yields f'(x) = dy/dx
For variables other than x,y,z, or t you will need grouping symbols: (dq)/(dp) for (dq)/(dp)
Overbraces and underbraces: ubrace(1+2+3+4)_("4 terms") yields ubrace(1+2+3+4)_("4 terms")
obrace(1+2+3+4)^("4 terms") yields obrace(1+2+3+4)^("4 terms")
Attention: Always try to surround the > and < characters with spaces so that the html parser does not confuse it with an opening or closing tag!
From https://github.com/camoy/amath/tree/master/test/input
hat(ab) bar(xy) ulA vec v dotx ddot yubrace(1+2+3+4)_("4 terms") - obrace(2+3)^(n)(cancel((x+1))(x - 2))/(cancel((x+1))(x+3))color(red)(x^2)+3x+color(green)(4)abc-123.45^(-1.1)d/dx f(x)=lim_(h->0)(f(x+h)-f(x))/hbb{AB3}.bbb(AB].cc(AB).fr{AB}.tt[AB].sf(AB)a//bsin^(-1)(x)int_0^1f(x)dx[[a,b],[c,d]] ((n),(k))(a,b]={x in RR | a < x <= b}((a*b))/c(a/b)/(c/d)sqrt sqrt root3xx/x={(1,if x!=0),("undefined",if x=0):}x^2 + y_1 + z_12^34a/b/c/dstackrel"def"= or stackrel Delta =" "("or ":=)x^2+y_1+z_12^34f(x)=sum_(n=0)^oo(f^((n))(a))/(n!)(x-a)^n<<a,b>> and {:(x,y),(u,v):}
hat(ab) bar(xy) ulA vet v dots dot y, ubrace(1+2+3+4)_("4 terms") - obrace(2+3)^(n), (cancel((x+1))(x - 2))/(cancel((x+1))(x+3)), color(red)(x^2)+3x+color(green)(4), abc-123.45^(-1.1), d/dx f(x)=lim_(h->0)(f(x+h)-f(x))/h, bb{AB3}.bbb(AB].cc(AB).fr{AB}.tt[AB].sf(AB), a//b, sin^(-1)(x), int_0^1f(x)dx, [[a,b],[c,d]] ((n),(k)), (a,b]={x in RR | a < x <= b}, ((a*b))/c, (a/b)/(c/d), sort sort root3x, x/x={(1,if x!=0),("undefined",if x=0):}, x^2 + y_1 + z_12^34, a/b/c/d, stackrel"def"= or stackrel Delta =" "("or ":=), x^2+y_1+z_12^34, f(x)=sum_(n=0)^oo(f^((n))(a))/(n!)(x-a)^n, <<a,b>> and {:(x,y),(u,v):}.
(Should a single paragraph with AsciiMath generate <math display="block">…</math>?)
hat(ab) bar(xy) ulA vec v dotx ddot y
ubrace(1+2+3+4)_("4 terms") - obrace(2+3)^(n)
(cancel((x+1))(x - 2))/(cancel((x+1))(x+3))
color(red)(x^2)+3x+color(green)(4)
abc-123.45^(-1.1)
d/dx f(x)=lim_(h->0)(f(x+h)-f(x))/h
bb{AB3}.bbb(AB].cc(AB).fr{AB}.tt[AB].sf(AB)
a//b
sin^(-1)(x)
int_0^1f(x)dx
[[a,b],[c,d]] ((n),(k))
(a,b]={x in RR | a < x <= b}
((a*b))/c
(a/b)/(c/d)
sqrt sqrt root3x
x/x={(1,if x!=0),("undefined",if x=0):}
x^2 + y_1 + z_12^34
a/b/c/d
stackrel"def"= or stackrel Delta =" "("or ":=)
x^2+y_1+z_12^34
f(x)=sum_(n=0)^oo(f^((n))(a))/(n!)(x-a)^n
<<a,b>> and {:(x,y),(u,v):}
(I am not sure I like this syntax for generating display math)