tonyfast / nsf-goali

A Testing Environment for Mini-Research Sites
tonyfast.com/nsf-goali
1 stars 3 forks source link

underscore removed from equation #17

Closed mwpriddy closed 10 years ago

mwpriddy commented 10 years ago

It seems when I write a LaTeX equation that uses and underscore and curly brackets for subscripts, the underscore is removed and the equation does not show up correctly.

For example, if I input something like $ \mathbf{F}_{t+\Delta t}^\mathrm{p} $ the underscore will disappear (when I commit) and it ends up being $ \mathbf{F}{t+\Delta t}^\mathrm{p} $ which does not display correctly.

You can use something like http://cdn.mathjax.org/mathjax/latest/test/sample-dynamic-2.html to check the actual LaTeX portion. I assume this is an error in MathJax or MarkDown, but I am not sure what to do about it. Thoughts?

tonyfast commented 10 years ago

I'll scope this out.

mwpriddy commented 10 years ago

It looks like 2 underscores indicate italics to markdown. So, it overwrites mathjax syntax and converts the text to italic text. For more information:

http://docs.mathjax.org/en/latest/tex.html

I would assume there is a change we can make to either markdown or mathjax, but that is outside of my current understanding. Thoughts?

tonyfast commented 10 years ago

Which document is specifically giving you trouble? So I can have a test.

mwpriddy commented 10 years ago

plastic strain estimation...

tonyfast commented 10 years ago

Possible Fix

Please see if the current version of the post has this problem fixed? I don't know the equations well enough to say one way or another.

I added $$ before each of the equations and I think it cleared up your problem? Please see the changes in the post here.

Equation Numbering

I also added Equation number.

In the Front Matter, if Latex is turned on then you can add autonumber as an option.

latex: true
autonumber: true

You can directly link to equations by adding #mjx-eqn-## to the end of the url.

A link to equation 7 by appending #mjx-eqn-7 to the url.

mwpriddy commented 10 years ago

That fixed it right up! Thanks Tony. And the autonumbering is a great addition.

tonyfast commented 10 years ago

Thanks Matt. Glad you are back on track.