mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-24 21:32:52 +00:00
org-odt.el: Improve TOC entries
This commit is contained in:
parent
6e3e0176e3
commit
fddc312c29
|
@ -1110,18 +1110,33 @@ See `org-e-odt--build-date-styles' for implementation details."
|
||||||
(defun* org-e-odt-format-toc-headline
|
(defun* org-e-odt-format-toc-headline
|
||||||
(todo todo-type priority text tags
|
(todo todo-type priority text tags
|
||||||
&key level section-number headline-label &allow-other-keys)
|
&key level section-number headline-label &allow-other-keys)
|
||||||
(setq text (concat
|
(setq text
|
||||||
(and org-export-with-section-numbers
|
|
||||||
(concat section-number ". "))
|
|
||||||
text
|
|
||||||
(and tags
|
|
||||||
(concat
|
(concat
|
||||||
"<text:tab/>"
|
;; Section number.
|
||||||
(format "<text:span text:style-name=\"%s\">%s</text:span>"
|
(when section-number (concat section-number ". "))
|
||||||
"OrgTag" tags)))))
|
;; Todo.
|
||||||
(when todo
|
(when todo
|
||||||
(setq text (format "<text:span text:style-name=\"%s\">%s</text:span>"
|
(let ((style (if (member todo org-done-keywords)
|
||||||
"OrgTodo" text)))
|
"OrgDone" "OrgTodo")))
|
||||||
|
(format "<text:span text:style-name=\"%s\">%s</text:span> "
|
||||||
|
style todo)))
|
||||||
|
(when priority
|
||||||
|
(let* ((style (format "OrgPriority-%s" priority))
|
||||||
|
(priority (format "[#%c]" priority)))
|
||||||
|
(format "<text:span text:style-name=\"%s\">%s</text:span> "
|
||||||
|
style priority)))
|
||||||
|
;; Title.
|
||||||
|
text
|
||||||
|
;; Tags.
|
||||||
|
(when tags
|
||||||
|
(concat
|
||||||
|
(format " <text:span text:style-name=\"%s\">[%s]</text:span>"
|
||||||
|
"OrgTags"
|
||||||
|
(mapconcat
|
||||||
|
(lambda (tag)
|
||||||
|
(format
|
||||||
|
"<text:span text:style-name=\"%s\">%s</text:span>"
|
||||||
|
"OrgTag" tag)) tags " : "))))))
|
||||||
(format "<text:a xlink:type=\"simple\" xlink:href=\"#%s\">%s</text:a>"
|
(format "<text:a xlink:type=\"simple\" xlink:href=\"#%s\">%s</text:a>"
|
||||||
headline-label text))
|
headline-label text))
|
||||||
|
|
||||||
|
@ -1720,8 +1735,8 @@ CONTENTS is nil. INFO is a plist holding contextual information."
|
||||||
(format "<text:span text:style-name=\"%s\">%s</text:span> "
|
(format "<text:span text:style-name=\"%s\">%s</text:span> "
|
||||||
style todo)))
|
style todo)))
|
||||||
(when priority
|
(when priority
|
||||||
(let* ((priority (format "[#%c]" priority))
|
(let* ((style (format "OrgPriority-%s" priority))
|
||||||
(style (format "OrgPriority-%s" priority)))
|
(priority (format "[#%c]" priority)))
|
||||||
(format "<text:span text:style-name=\"%s\">%s</text:span> "
|
(format "<text:span text:style-name=\"%s\">%s</text:span> "
|
||||||
style priority)))
|
style priority)))
|
||||||
;; Title.
|
;; Title.
|
||||||
|
|
Loading…
Reference in a new issue