# Using asciimathml

Hello,

I am trying to use asciimathml within a document but I cannot make it work consistently.

This is what I am doing:

- I enabled Mathjax and selected the 'AM_HTMLorMML' option. - I
create a document with the following content: `sum_(i=1)^n
i^3=((n(n+1))/2)^2` -The result is that sometimes , not always, it
is properly rendered as a formula, but as soon as I edit it, it
reverts to plain text.

Any idea of what might be the issue?

Thanks,

Juan

# Keyboard shortcuts

### Generic

? | Show this help |
---|---|

ESC | Blurs the current field |

### Comment Form

r | Focus the comment reply box |
---|---|

^ + ↩ | Submit the comment |

You can use `Command ⌘`

instead of `Control ^`

on Mac

Support Staff 1 Posted by

Bretton 02 Feb, 2016 03:53 PMIt may be because of the way that Marked handles locating the current

edit point, which inserts a tiny bit of markup in the element that

contains the first change in the document. This markup would be inserted

prior to MathJax rendering, and thus MathJax may break because of it. If

you edit above or below the equation, does it fix the issue?

-Brett

2 Posted by

Juanon 02 Feb, 2016 04:19 PMYes, it has definitely something to do with it.

This is what I tried:

- if I modify the formula and click out of it and edit some text before saving, I get the formula as plain text - if I modify the formula, save the document, edit some text and saves again, I get a nice formula

Juan

Support Staff 3 Posted by

Bretton 02 Feb, 2016 04:40 PMIf you edit both at the same time and the equation comes before edited text, the markup will go into the equation. Are you making text changes before or after the math?

This is an issue that I thought I had solved, but I'll take another look at it.

Thanks,

Brett

4 Posted by

Juanon 02 Feb, 2016 04:48 PMEditing formula and text at the same time (without saving in between)

- if I edit text after the equation, I get plain text - if I edit before the equation, I get the formula right

Support Staff 5 Posted by

Bretton 02 Feb, 2016 05:05 PMRight, because editing after the equation means the equation is the first change in the document. Thus, it gets the markup.

Thanks,

Brett