* lisp/ox.el (org-export-numbered-headline-p): If the `:NUMBERED' property is
defined for a headline, turn numbering on when the property value is "y"
(otherwise turn numbering off).  Do the same if the `:INHERITED_NUMBERED'
property is defined for a headline, except make this property inherited by
child nodes.  If both properties are nil or not defined, resort to the
default numbering

 lisp/ox.el | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index 06513d2..137db9e 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -3721,8 +3721,14 @@ INFO is a plist holding contextual information."
   "Return a non-nil value if HEADLINE element should be numbered.
 INFO is a plist used as a communication channel."
   (let ((sec-num (plist-get info :section-numbers))
-       (level (org-export-get-relative-level headline info)))
-    (if (wholenump sec-num) (<= level sec-num) sec-num)))
+       (level (org-export-get-relative-level headline info))
+    (numbered (org-export-get-node-property :NUMBERED headline))
+    (inherited-numbered (org-export-get-node-property
:INHERITED_NUMBERED headline t))) ; y, n, or nil
+    (if numbered ; if the numbered property is defined
+        (equal numbered "y") ; anything other than "y" means un-numbered
+        (if inherited-numbered
+            (equal inherited-numbered "y")
+            (if (wholenump sec-num) (<= level sec-num) sec-num))))) ;
default behavior

 (defun org-export-number-to-roman (n)
   "Convert integer N into a roman numeral."

Reply via email to