sonoisa / XyJax

Xy-pic extension for MathJax
http://sonoisa.github.com/xyjax/xyjax.html
Apache License 2.0
60 stars 16 forks source link

Auto Numbering Conflict #4

Closed emptymalei closed 11 years ago

emptymalei commented 11 years ago

A setting like this

<script type='text/x-mathjax-config'>
MathJax.Hub.Config({
showProcessingMessages: false,
     messageStyle: "simple",
     jax: ["input/TeX", "output/HTML-CSS"],
     extensions: ["tex2jax.js","MathMenu.js","MathZoom.js","fp.js"],
     TeX: {
       extensions: ["xypic.js","AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
     },
     "HTML-CSS": { availableFonts: ["TeX"] },
     tex2jax: {
  inlineMath: [ ["\✟","\✟"], ["$","$"], ["\\(","\\)"] ],
  displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
       processEscapes: true
     },
      TeX: { 
     equationNumbers: {  autoNumber: "AMS"  },
     extensions: ["AMSmath.js"]
  },
   TeX: {extensions: ["xypic.js"]}
    // load xypic.js
});</script>

will screw the auto numbering of equations.

Numbering recovers when I comment out the xypic.js extension.

So why is that happening?

Thank you.

sonoisa commented 11 years ago

Dear emptymalei,

The TeX keys appear three times in the above configuration. In the case, the only last TeX item (i.e. TeX: {extensions:["xypic.js"]}) will be enabled by JavaScript specification.

Thus, If you would like to enable all TeX items, could you merge that items like the following configuration.

<script type='text/x-mathjax-config'>
MathJax.Hub.Config({
  showProcessingMessages: false,
  messageStyle: "simple",
  jax: ["input/TeX", "output/HTML-CSS"],
  extensions: ["tex2jax.js","MathMenu.js","MathZoom.js","fp.js"],
  TeX: {
    equationNumbers: {  autoNumber: "AMS"  },
    extensions: ["xypic.js","AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
  },
  "HTML-CSS": { availableFonts: ["TeX"] },
  tex2jax: {
    inlineMath: [ ["\✟","\✟"], ["$","$"], ["\\(","\\)"] ],
    displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
    processEscapes: true
  }
});
</script>

Regards, isao

emptymalei commented 11 years ago

Right. I didn't know that. Thank you for the help.@sonoisa