Knitr and rmarkdown are not mutually exclusive, so your response makes no sense. To clarify, knitr has nothing to do with mathjax... whatever back end you are sending the output of knitr to handles that, so go look at the documentation for that tool (pandoc).
I can auto-number mathjax equations in an R markdown document in RStudio by adding the following statement to the beginning of the Rmd document:
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: {
autoNumber: "all",
formatNumber: function (n) {return '9.'+n}
}
}
});
</script>
The following also works in an Rmd doc, but not with the $$..$$ equations, only equations bracketed with \begin{equation}..\end{equation}.
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: {
autoNumber: "AMS",
formatNumber: function (n) {return '9.'+n}
}
}
});
</script>
I can change the numbering to a static label with \tag{mylabel}
inside the $$..$$, and the auto-numbering will skip that equation.
Unfortunately, to skip with no label add \tag{}
results in the equation still labeled with ().
How do I get rid of the empty brackets if needed?
Does anybody know a simple statement to add to either the mathjax script statement or the $$..$$ equations within a Rmd doc that would add an auto-numbered Section number to the equation number?
most of the info from here: http://mathjax.readthedocs.org/en/latest/tex.html#automatic-equation-numbering