summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2019-03-13 12:16:41 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-03-13 12:16:41 +0100
commit35211c479bcc0df529b55d7308b270ace652c35b (patch)
tree813d568a580a630270561c137792dd824ea05325
parentc3ce8d1c144237e5aa4971440ca725a1fdd94121 (diff)
parent48cafd3d3f246719cf96f042c21e9be64ecdf87c (diff)
downloadorg-mode-35211c479bcc0df529b55d7308b270ace652c35b.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/ox-texinfo.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el
index 13ec237..9ea624a 100644
--- a/lisp/ox-texinfo.el
+++ b/lisp/ox-texinfo.el
@@ -1253,13 +1253,21 @@ contextual information."
(if (string-prefix-p "@" i) i (concat "@" i))))
(table-type (plist-get attr :table-type))
(type (org-element-property :type plain-list))
+ (initial-counter
+ (and (eq type 'ordered)
+ ;; Texinfo only supports initial counters, i.e., it
+ ;; cannot change the numbering mid-list.
+ (let ((first-item (car (org-element-contents plain-list))))
+ (org-element-property :counter first-item))))
(list-type (cond
((eq type 'ordered) "enumerate")
((eq type 'unordered) "itemize")
((member table-type '("ftable" "vtable")) table-type)
(t "table"))))
(format "@%s\n%s@end %s"
- (if (eq type 'descriptive) (concat list-type " " indic) list-type)
+ (cond ((eq type 'descriptive) (concat list-type " " indic))
+ (initial-counter (format "%s %d" list-type initial-counter))
+ (t list-type))
contents
list-type)))