summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJambunathan K <kjambunathan@gmail.com>2012-03-31 02:03:10 +0530
committerJambunathan K <kjambunathan@gmail.com>2012-03-31 02:03:10 +0530
commit8a02f48547df4f11b0402aa0a4fe339e3b85c608 (patch)
tree33e84c2ff325b021cf7f183928003e85d5ed1ec6
parent67694297fa0f9b32cf4bfe812ba8a5c5cf4a0859 (diff)
downloadorg-mode-8a02f48547df4f11b0402aa0a4fe339e3b85c608.tar.gz
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).
-rw-r--r--lisp/org-lparse.el7
-rw-r--r--lisp/org-odt.el4
2 files changed, 5 insertions, 6 deletions
diff --git a/lisp/org-lparse.el b/lisp/org-lparse.el
index 008b05d..35ae107 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 d3e0161..bf0a8cb 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