Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I use PHP-Markdown plugin in WordPress. In order to show the formula beautifully, I add some code to use MathJax.

Like this:

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX", "output/HTML-CSS"],
    tex2jax: {
    inlineMath: [ ['$','$'], ["\\(","\\)"] ],
    displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
    processEscapes: true
    },
    "HTML-CSS": { availableFonts: ["TeX"] }
});
</script>

But something wrong happens. Once my formula contains at least two underlines, the MathJax doesn't work. Such as $$P_1, P_2$$, and the words between the two underlines will be transformed to italic.

The formula will be transformed by PHP-Markdown first, and it can't be transformed by MathJax again.

Could you help me?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I'm not sure this is a real answer, but have you tried PHP-markdown-extra (by the very same Michel Fortin)?

At least for me (using Mark Jaquith's markdown-on-save plugin) your example is not a problem.

But Markdown-extra is not perfect either and I've seen some other quirks with respect to emphasis, e.g. Let $(y_n)_{n\in \omega}$ enumerate ${ x_i: i \in \bigcup_{n\in \omega} A_n} $ will trip it up.

share|improve this answer
    
Thank you very much. I use markdown-on-save and it works well. :) –  gauss618 May 10 '13 at 4:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.