From 61a27c4816a0dae1072f851cc67ea48cec2d362c Mon Sep 17 00:00:00 2001 From: thibault Date: Tue, 12 Apr 2022 00:45:18 -0400 Subject: [PATCH] lisp/ox-html.el: Fix automatic numbering of non-math environment * ox-html.el (org-html-latex-environment): Prevent addition of * to non-math environments. Added * is used for math environments to replace latex equation numbering by org labels for html linking. --- lisp/ox-html.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 81ef002a0..0968e2199 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2945,7 +2945,9 @@ CONTENTS is nil. INFO is a plist holding contextual information." ((assq processing-type org-preview-latex-process-alist) (let ((formula-link (org-html-format-latex - (org-html--unlabel-latex-environment latex-frag) + (if (eq nil (org-html--math-environment-p latex-environment)) + latex-frag + (org-html--unlabel-latex-environment latex-frag)) processing-type info))) (when (and formula-link (string-match "file:\\([^]]*\\)" formula-link)) (let ((source (org-export-file-uri (match-string 1 formula-link)))) -- 2.33.0