From f24dbe15c1493aa355e9f055b8979842b51600be Mon Sep 17 00:00:00 2001 From: Jambunathan K Date: Mon, 23 Jan 2012 13:30:40 +0530 Subject: [PATCH] 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 ========================== --- lisp/org-odt.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lisp/org-odt.el b/lisp/org-odt.el index 62666e2be..e8e9a18ad 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 -- 2.11.4.GIT