When exporting to HTML, the exporter is supposed to check if there are additional constraints over a paragraph using `org-html-standalone-image-predicate'. A misplaced quote causes `org-html-standalone-image-p' to not apply them.

To number captions on images the `org-html-paragraph' binds `org-html-standalone-image-predicate' to `org-html--has-caption-p', but since it gets ignored, `org-export-get-ordinal' considers all standalone images, not just captioned ones. This throws off the numbering.

>From 85e0b2da37f914458d71bd3a5797298ca3a4e0ce Mon Sep 17 00:00:00 2001
From: Pablo Barraza Cornejo <pbarrazacorn...@gmail.com>
Date: Thu, 29 Apr 2021 20:15:08 -0600
Subject: [PATCH] ox-html.el/inline-image export: Fix caption numbering.

* lisp/ox-html.el (org-html-standalone-image-p): Remove quote  which
causes `org-html-standalone-image-p' to not check if `org-html-standalone-image-predicate' is bound.

TINYCHANGE
---
 lisp/ox-html.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 47122314c..df270b22b 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -3039,7 +3039,7 @@ images, set it to:
 		     (`paragraph element)
 		     (`link (org-export-get-parent element)))))
     (and (eq (org-element-type paragraph) 'paragraph)
-	 (or (not (fboundp 'org-html-standalone-image-predicate))
+	 (or (not (fboundp org-html-standalone-image-predicate))
 	     (funcall org-html-standalone-image-predicate paragraph))
 	 (catch 'exit
 	   (let ((link-count 0))
-- 
2.31.1

Reply via email to