summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJambunathan K <kjambunathan@gmail.com>2012-01-23 13:30:40 +0530
committerJambunathan K <kjambunathan@gmail.com>2012-01-23 13:31:33 +0530
commitf24dbe15c1493aa355e9f055b8979842b51600be (patch)
tree999676caea7071ace3b0c9da0c523af2bc992262
parentf9d24220020964cc4e5c119a1be867107bf376d0 (diff)
downloadorg-mode-f24dbe15c1493aa355e9f055b8979842b51600be.tar.gz
org-odt.el: Make label references consistent with LaTeX export
* lisp/org-odt.el (org-odt-label-styles): Add a new style. (org-odt-category-map-alist): Use it. Andreas Leha writes: The following snippet exports correctly to LaTeX and to html, but produces the text "Figure Figure" in odt. Could the behaviour be synchronized? === example.org ========================== * Test ref plot(1:10, 1:10) Here is a reference to Figure \ref{fig:bar} === example.org ==========================
-rw-r--r--lisp/org-odt.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/org-odt.el b/lisp/org-odt.el
index 62666e2..e8e9a18 100644
--- a/lisp/org-odt.el
+++ b/lisp/org-odt.el
@@ -2017,7 +2017,8 @@ See `org-odt-entity-labels-alist' for known CATEGORY-NAMEs.")
(defvar org-odt-label-styles
'(("text" "(%n)" "text" "(%n)")
- ("category-and-value" "%e %n%c" "category-and-value" "%e %n"))
+ ("category-and-value" "%e %n%c" "category-and-value" "%e %n")
+ ("value" "%e %n%c" "value" "%n"))
"Specify how labels are applied and referenced.
This is an alist where each element is of the
form (LABEL-STYLE-NAME LABEL-ATTACH-FMT LABEL-REF-MODE
@@ -2039,10 +2040,14 @@ specifiers - %e and %n. %e is replaced with the CATEGORY-NAME.
`org-odt-format-label-reference'.")
(defvar org-odt-category-map-alist
- '(("__Table__" "Table" "category-and-value")
- ("__Figure__" "Figure" "category-and-value")
+ '(("__Table__" "Table" "value")
+ ("__Figure__" "Figure" "value")
("__MathFormula__" "Equation" "text")
- ("__DvipngImage__" "Equation" "category-and-value"))
+ ("__DvipngImage__" "Equation" "value")
+ ;; ("__Table__" "Table" "category-and-value")
+ ;; ("__Figure__" "Figure" "category-and-value")
+ ;; ("__DvipngImage__" "Equation" "category-and-value")
+ )
"Map a CATEGORY-HANDLE to CATEGORY-NAME and LABEL-STYLE.
This is an alist where each element is of the form
\\(CATEGORY-HANDLE CATEGORY-NAME LABEL-STYLE\\). CATEGORY_HANDLE