Open diguage opened 6 years ago
If you want to add numbers to formulates, simply set the eqnums
attribute on the document.
= Document Title
:stem: latexmath
:eqnums:
[stem]
++++
\begin{equation}
x = y^2
\end{equation}
++++
or
= Document Title
:stem: latexmath
:eqnums: all
[stem]
++++
x = y^2
++++
If eqnums
is empty or has the value AMS
, the equation must be wrapped in an equation container.
May I custom the style?
I'm not sure. It could be linked to the LaTeX content. See http://docs.mathjax.org/en/latest/tex.html#automatic-equation-numbering. This behavior is controlled by MathJax, not Asciidoctor.
I think Asciidoctor is able to generate a tag containing the sequence number which follows the LaTeX content.
I'm not sure what you mean. Did my suggestion allow you to get the sequence numbers working? They should appear next to the equation as you expect. But the numbers are controlled by MathJax.
I have just tested it, It's OK. Thanks a lot.
I mean:
<tag>This is an equation which is generated by MathJax.</tag> <tag>[the numbers of formulas]<tag>
[the numbers of formulas]
is the (1)
, (2)
, (1.1)
, (1.2)
and so on.
In the equationNumbers: {}
section of The TeX input processor, MathJax can support to configure the format of the equation's number.
How to support to configure the format in Asciidoctor?
MathJax support to referent the equation:
In equation \eqref{eq:sample}, we find the value of an
interesting integral:
\begin{equation}
\int_0^\infty \frac{x^3}{e^x-1}\,dx = \frac{\pi^4}{15}
\label{eq:sample}
\end{equation}
\eqref{eq:sample}
and \label{eq:sample}
are the important elements.
The example is from MathJax TeX and LaTeX Support.
Should the document be added to the Asciidoctor manual?
I think you are referring to this configuration:
http://docs.mathjax.org/en/latest/options/input-processors/TeX.html#configure-tex
Specifically the formatNumber, correct?
I don't know the best way to configure this from the AsciiDoc document. Perhaps the value of the eqnums
attribute can be a JavaScript function? That seems awfully low-level, so perhaps it would be better to support standard format options based on a value.
This could also be related to #2493, which would allow you to override the whole MathJax settings. Perhaps a special docinfo file comes into play here.
Some more information in the docs about the equation numbers actually work would certainly be nice.
I know AsciiDoctor supports the LATEX. I used it a little while age. The feature is far more greate.
I want to generate the numbers of formulas.
I search the user manual, but I did not find the document about it.
The examples are like as following:
The
(1)
,(2)
,(1.1)
and(1.2)
are the numbers of formulas, which are autogenerated.How to generate the numbers of formulas?
May I custom the style?