title | date |
---|---|
Syntax for AsciiMath in Markdown |
2016-04-05 |
What syntax should be used for AsciiMath in Markdown?
Using double backticks ``
When ``a != 0``, there are two solutions to
``ax^2 + bx + c = 0`` and they are
``x = (-b +- sqrt(b^2 - 4ac))/(2a)``
or $
and $$
When $a != 0$, there are two solutions to
$ax^2 + bx + c = 0$ and they are
$$x = (-b +- sqrt(b^2 - 4ac))/(2a)$$
The use of $$
have traditionally been used for TeX and this might make it problematic for reusing this when exchanging documents that have already used a TeX like syntax. Also `` will make the document readable even when the Markdown implementation doesn’t support AsciiMath.
I.e. it looks like this in a Markdown not supporting AsciiMath:
When
a != 0
, there are two solutions toax^2 + bx + c = 0
and they are
x = (-b +- sqrt(b^2 - 4ac))/(2a)
while $
/$$
looks like:
When
$a != 0$ , there are two solutions to$ax^2 + bx + c = 0$ and they are
$$x = (-b +- sqrt(b^2 - 4ac))/(2a)$$
or even just $$
When
$$a != 0$$ , there are two solutions to$$ax^2 + bx + c = 0$$ and they are
$$x = (-b +- sqrt(b^2 - 4ac))/(2a)$$
(and TeX inside $
/$$
looks like this:
When
$a \ne 0$ , there are two solutions to$ax^2 + bx + c = 0$ and they are
$$x = {\frac{-b \pm \sqrt{b^2-4ac}}{2a}}$$
https://github.com/cben/mathdown/wiki/math-in-markdown http://cdn.mathjax.org/mathjax/latest/test/sample-asciimath.html