ox-html: Add label and number to equations in HTML export
commitba6c0f1ea9d3430f23ed7e316b0f4a6c4a66c6fd
authorthibault <thibault.marin@gmx.com>
Sun, 7 Jan 2018 09:04:39 +0000 (7 03:04 -0600)
committerNicolas Goaziou <mail@nicolasgoaziou.fr>
Wed, 17 Jan 2018 21:24:31 +0000 (17 22:24 +0100)
tree074f4c3d812a9ec7263764da6e2580706dc80399
parent92176c90be4633e136b592d9fe9587ed6900c573
ox-html: Add label and number to equations in HTML export

* lisp/ox-html.el (org-html--wrap-latex-environment): New function.
(org-html--math-environment-p): New function.
(org-html-latex-environment): Use `org-html--wrap-latex-environment' to
wrap equation in HTML container (non-MathJax modes).  Make latex
environment unnumbered when compiling equations to images.  Insert latex
label in environment in MathJax mode.
(org-html-link): Calculate equation number limiting counter to equation
environments.  Use eqref for link when using MathJax
(org-html--make-unlabelled-latex-environment): New function.
lisp/ox-html.el