[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Bug: ox-odt.el should support text:start-value [9.1.14 (9.1.14-7-g01
From: |
Mark A. Hershberger |
Subject: |
[O] Bug: ox-odt.el should support text:start-value [9.1.14 (9.1.14-7-g01c419-elpaplus @ …/org-plus-contrib-20181015/)] |
Date: |
Wed, 17 Oct 2018 21:21:21 -0400 |
I saw that exporting plain lists with specified starting numbers
(address@hidden') wasn't working—the lists just start over.
I was a bit frustrated with this, so I went looking at the code and the
ODF schema. I found that ODF supports the text:start-value attribute[1]
that could be used where needed.
I came up with the following hack:
diff -ub ox-odt.el\~ ox-odt.el
--- ox-odt.el~ 2018-10-17 16:47:32.859161792 -0400
+++ ox-odt.el 2018-10-17 21:04:46.391759435 -0400
@@ -1966,10 +1966,13 @@
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 (concat "\n<text:list-item"
+ (when count (concat " text:start-value=\"" count "\""))
+ ">\n%s\n%s")
contents
(if (org-element-map item 'table #'identity info 'first-match)
"</text:list-header>"
Diff finished. Wed Oct 17 21:17:59 2018
Emacs : GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11,
cairo version 1.14.8)
of 2018-10-17
Package: Org mode version 9.1.14 (9.1.14-7-g01c419-elpaplus @
…/org-plus-contrib-20181015/)
Footnotes:
[1]
http://docs.oasis-open.org/office/v1.2/cs01/OpenDocument-v1.2-cs01-part1.html#a_19_868_3__text_list-item_
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [O] Bug: ox-odt.el should support text:start-value [9.1.14 (9.1.14-7-g01c419-elpaplus @ …/org-plus-contrib-20181015/)],
Mark A. Hershberger <=