I am using Sphinx 1.1.3 to document a reaction rate with an underscore.
\ce{A + $h$\nu ->[k_A] B}
It works perfectly when I make html documentation, using MathJax and a template file containing the following:
{% extends "!layout.html" %}
{% block extrahead %}
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
extensions: ["mhchem.js"]
}
});
</script>
{% endblock %}
and including the _templates folder in the templates_path of the conf.py file.
You can see my mchem_example here.
But when I try to build a latexpdf using MiKTeX, with the preamble \usepackage[version=3]{mhchem} as stated in the mhchem documentation in the latex_elements dictionary of the conf.py, I don't get the reaction rate or the arrow. The other examples in the mhchem documentation all work, such as using +H20 or \alpha. I have made it work for both MathJax and MiKTeX by enclosing the \nu in curly braces.
\ce{A + $h${\nu} ->[k_A] B}
So now my question is why? Why does the \nu have to be in curly braces?