Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In wordpress, I appended the Mathjax CDN to my header file. The inline equations do not render while the display-mode equations seem fine. An example:

enter image description here

I have experience with Mathjax on another CMS (Drupal) and never had such a problem, or even on Math.SE . The reason I do not post it on the wordpress forum is because I did not install any plugin, so this has nothing to do with wordpress I guess.

Does anyone know why this is happening? For completeness, I appended the following script before the </head>

<script type="text/javascript"
   src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
share|improve this question
2  
I suspect this is 'off topic': it's really about WordPress rather than TeX. –  Joseph Wright Sep 6 '11 at 5:59
    
@Joseph you may migrate it if you wish. I thought this was not related to wordpress, but mathjax, which belonged to "Tex Latex and friends". I may be wrong. –  yayu Sep 6 '11 at 6:07
    
I will wait to see what others feel about this –  Joseph Wright Sep 6 '11 at 6:07
1  
I'm not sure where to recommend for this on SE; most likely the MathJaX mailing list. MathJaX questions are on the border of what I would consider "on-topic". This is about installing and/or configuring which I think is over that border. I wouldn't expect someone who knows about TeX to even know where to start with this sort of thing, so although there might be someone here who could help, it's unlikely that this is the best place to ask to get the best chance of getting help. –  Loop Space Sep 6 '11 at 6:37
1  
Given your answer to Yannick's answer, I suspect that you should read the page on configuration options: mathjax.org/docs/1.1/options/tex2jax.html –  Loop Space Sep 6 '11 at 8:20
show 2 more comments

2 Answers

up vote 7 down vote accepted

You can enable the $ … $-style inline mode by inserting the following code into the <head> section of your HTML before MathJax is being loaded. This way, you can invent new delimiters, too.

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>

<script type="text/javascript"
    src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

Remember that after enabling this, you have to escape 'normal' dollar signs with \$.

A more detailed description can be found in the MathJax documentation. It also describes why the single dollar delimiters are disabled by default:

Note that the single dollar signs are not enabled by default because they are used too frequently in normal text, so if you want to use them for math delimiters, you must specify them explicitly.

share|improve this answer
add comment

Does it work if you use \( and \) ? At least for me, mathjax is pretty picky when it comes to formulas with just dollars around them.

share|improve this answer
    
Yes it does. My problem is that I have a habit of using $ ... $ in my latex files, which I am trying to put up on my website. –  yayu Sep 6 '11 at 7:59
add comment

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.