#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# Interactions between MathJax and Markdown processor

edited February 2015 in General

This is a distillation of the example from Andrew.

1) Double asterisks in Text formulas get processed by the Markdown processor, thereby causing errors.

$\int_0^\infty a*b*c dx$ $\int_0^\infty a*b*c dx$

Workaround: put spaces around the offending pair of asterisks.

$\int_0^\infty a * b * c \ dx$ $\int_0^\infty a * b * c \ dx$

$a*b*c$ $a*b*c$

$a * b * c$ $a * b * c$

$a*b*c$ normal text $a*b*c$ $a*b*c$ normal text $a*b*c$

$a * b * c$ normal text $a * b * c$ $a * b * c$ normal text $a * b * c$

2) Double occurrences of underbars in Tex formulas may get picked up by the Markdown processor. E.g. in $a _b_ c$ the b gets italicized by Markdown. But not in $a_b_c$ -- Markdown does not act on underbars that are not surrounded by spaces.

$$a_b_c$$ $$a_b_c$$

$$a_{b_c}$$ $$a_{b_c}$$

$a_b_c$ $a_b_c$

$a_{b_c}$ $a_{b_c}$

$a _b_ c$ $a _b_ c$

Note that $a_b_c$ does not get processed by markdown. But this formula seems to have logical issues, and doesn't get shown as a double superscript by either MathJax or MathML. Is this even well-defined Tex? Simply disambiguating it as $a_{b_c}$ fixes it up for MathJax.

$5 ^ 7$

• Options
1.

Putting a_b_c in to TeX produces an error: "Double subscript". So, in the words of Neddie Seagoon, it ought not to be allowed.

Comment Source:Putting a_b_c in to TeX produces an error: "Double subscript". So, in the words of Neddie Seagoon, it ought not to be allowed.
• Options
2.

Let me try some more that I've heard of.

$\{a,b,c\}$ produces $\{a,b,c\}$, solution: double the backslash: $\\{a,b,c\\}$ to produce $\\{a,b,c\\}$

Comment Source:Let me try some more that I've heard of. $\{a,b,c\}$ produces $\{a,b,c\}$, solution: double the backslash: $\\{a,b,c\\}$ to produce $\\{a,b,c\\}$
• Options
3.

$a_b c_d$ makes $a_b c_d$, OK

$a^*b^*$ makes $a^*b^*$, whoops, but $a^* b^*$ makes $a^* b^*$, OK

Comment Source:$a_b c_d$ makes $a_b c_d$, OK $a^*b^*$ makes $a^*b^*$, whoops, but $a^* b^*$ makes $a^* b^*$, OK
• Options
4.