From 8a02f48547df4f11b0402aa0a4fe339e3b85c608 Mon Sep 17 00:00:00 2001 From: Jambunathan K Date: Sat, 31 Mar 2012 02:03:10 +0530 Subject: [PATCH] org-odt.el: Consider short captions not as org text but as plain text * lisp/org-lparse.el (org-lparse-insert-org-table): Consider short caption as plain text and not as org text. * lisp/org-odt.el (org-export-odt-format-formula) (org-export-odt-format-image): ditto. Fixes earlier checkin. See http://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg01212.html Handling of short captions is only a convenience feature. From within LibreOffice one can always create an "unprotected" editable index and later manually delete unwanted index entries (for example, delete uncaptioned entries which are given automatic names) or modify existing entries (for example, fix long captions to their short versions). --- lisp/org-lparse.el | 7 +++---- lisp/org-odt.el | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lisp/org-lparse.el b/lisp/org-lparse.el index 008b05dc3..35ae10707 100644 --- a/lisp/org-lparse.el +++ b/lisp/org-lparse.el @@ -1221,12 +1221,11 @@ for formatting. This is required for the DocBook exporter." ;; column and the special lines (setq lines (org-table-clean-before-export lines))) (let* ((caption (org-find-text-property-in-string 'org-caption (car lines))) + (short-caption (or (org-find-text-property-in-string + 'org-caption-shortn (car lines)) caption)) (caption (and caption (org-xml-encode-org-text caption))) - (short-caption (org-find-text-property-in-string - 'org-caption-shortn (car lines))) - (short-caption (or short-caption caption)) (short-caption (and short-caption - (org-xml-encode-org-text short-caption))) + (org-xml-encode-plain-text short-caption))) (label (org-find-text-property-in-string 'org-label (car lines))) (org-lparse-table-colalign-info (org-lparse-table-get-colalign-info lines)) (attributes (org-find-text-property-in-string 'org-attributes diff --git a/lisp/org-odt.el b/lisp/org-odt.el index d3e016131..bf0a8cba9 100644 --- a/lisp/org-odt.el +++ b/lisp/org-odt.el @@ -1558,7 +1558,7 @@ See `org-odt-add-label-definition' and caption)) (caption (and caption (org-xml-format-desc caption))) (short-caption (and short-caption - (org-xml-format-desc short-caption))) + (org-xml-encode-plain-text short-caption))) (label (org-find-text-property-in-string 'org-label src)) (latex-frag (org-find-text-property-in-string 'org-latex-src src)) (embed-as (or (and latex-frag @@ -1812,7 +1812,7 @@ ATTR is a string of other attributes of the a element." caption)) (caption (and caption (org-xml-format-desc caption))) (short-caption (and short-caption - (org-xml-format-desc short-caption))) + (org-xml-encode-plain-text short-caption))) (attr (org-find-text-property-in-string 'org-attributes src)) (label (org-find-text-property-in-string 'org-label src)) (latex-frag (org-find-text-property-in-string