Open bk322 opened 5 years ago
I'm almost there with
[latexmath#eq1]
++++
(a + b)^2 = a^2 + 2ab + b^2
++++
See link:#eq1[Eq. 1].
But this way I have to number equations manually.
Reference is supported by asciidoctor, check if asciidoctor-latex support numbered equations.
@ProgramFan thanks, indeed installing it from github:
gem 'asciidoctor-latex', github: 'asciidoctor/asciidoctor-latex'
gem 'thread_safe'
makes numbered math available via
[env.equation#little-fermat]
--
a^{p-1} \equiv 1\ \text{mod}\ p
--
See Eq. (<<little-fermat>>).
Compilation being
asciidoctor-latex -b html5 test.adoc
Sadly it's in MathJax, where as I hoped to get it via mathematical
, but it is probably possible to add the numbering bits to mathematical
extension of asciidoctor.
Python's sphinx allows to number equations by adding label to the directive, and to reference a particular equation by the label value:
http://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#math
Is it possible to number and reference equations in asciidoctor?