WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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">
    extensions: ["tex2jax.js"],
    jax: ["input/TeX", "output/HTML-CSS"],
    tex2jax: {
    inlineMath: [ ['$','$'], ["\\(","\\)"] ],
    displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
    processEscapes: true
    "HTML-CSS": { availableFonts: ["TeX"] }

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
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


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.