summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark A. Hershberger <mah@nichework.com>2018-10-19 09:19:38 -0400
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-10-19 21:49:54 +0200
commiteb806aa50331ac221a0544c3ebc375ac5af63413 (patch)
tree9b35118d7cb1b8a9e8638dc5b7ff276e60f1fce2
parent1f913ecc36c280c7c0adfe08e403380f8c140fec (diff)
downloadorg-mode-eb806aa50331ac221a0544c3ebc375ac5af63413.tar.gz
ox-odt: Add support for text:start-value
* lisp/ox-odt.el (org-odt-item): Support starting lists at a set number via "text:start-value". Without this, ODF files just restart numbering when they should continue with the specified number.
-rw-r--r--etc/ORG-NEWS1
-rw-r--r--lisp/ox-odt.el4
2 files changed, 4 insertions, 1 deletions
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 75f404f..2a6e9fc 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -48,6 +48,7 @@ system than the main Org document. For example:
#+end_example
*** New values in clock tables' step: =month= and =year=
+*** ODT export handles numbers cookies in lists
*** New cell movement functions in tables
~S-<UP>~, ~S-<DOWN>~, ~S-<RIGHT>~, and ~S-<LEFT>~ now move cells in
the corresponding direction by swapping with the adjacent cell.
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 70ef9de..66be39f 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -1966,10 +1966,12 @@ contextual information."
CONTENTS holds the contents of the item. INFO is a plist holding
contextual information."
(let* ((plain-list (org-export-get-parent item))
+ (count (org-element-property :counter item))
(type (org-element-property :type plain-list)))
(unless (memq type '(ordered unordered descriptive-1 descriptive-2))
(error "Unknown list type: %S" type))
- (format "\n<text:list-item>\n%s\n%s"
+ (format "\n<text:list-item%s>\n%s\n%s"
+ (if count (format " text:start-value=\"%s\"" count) "")
contents
(if (org-element-map item 'table #'identity info 'first-match)
"</text:list-header>"