From 468024723605b65e14159e9439b1a180fc238d22 Mon Sep 17 00:00:00 2001 From: Jambunathan K Date: Wed, 14 Nov 2012 07:32:24 +0530 Subject: [PATCH] Fix Table of Contents, Clock block and various styles --- contrib/lisp/org-e-odt.el | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/contrib/lisp/org-e-odt.el b/contrib/lisp/org-e-odt.el index e4661be9f..f409e87c0 100644 --- a/contrib/lisp/org-e-odt.el +++ b/contrib/lisp/org-e-odt.el @@ -1006,7 +1006,7 @@ style from the list." (defun org-e-odt-begin-toc (index-title depth) (concat (format " - + %s " depth index-title) @@ -1381,19 +1381,23 @@ holding contextual information." "Transcode a CLOCK element from Org to ODT. CONTENTS is nil. INFO is a plist used as a communication channel." - (format "%s" - "OrgTimestampWrapper" - (concat - (format "%s" - "OrgTimestampKeyword" org-clock-string) - (format "%s" - "OrgTimestamp" - (concat - (org-translate-time - (org-element-property :raw-value - (org-element-property :value clock))) - (let ((time (org-element-property :duration clock))) - (and time (format " (%s)" time)))))))) + (concat + ;; Open a paragraph before the first clock line. + (and (not (eq (org-element-type (org-export-get-previous-element clock info)) + 'clock)) + "\n") + (let ((timestamp (org-element-property :value clock)) + (duration (org-element-property :duration clock))) + (concat + (format "%s" + "OrgTimestampKeyword" org-clock-string) + ;; Add a line break after the clock line. + (org-e-odt-timestamp timestamp contents info) "" + (and duration (format " (%s)" duration)) "")) + ;; Close the paragraph after the last clock line. + (and (not (eq (org-element-type (org-export-get-next-element clock info)) + 'clock)) + "\n"))) ;;;; Code -- 2.11.4.GIT