Hi, Could you try the attached patches and see if they solve your issues?
Thanks, Rasmus -- C is for Cookie
>From 8951c689a7812d6557ba65888e549013814e5f8a Mon Sep 17 00:00:00 2001 From: Rasmus <ras...@gmx.us> Date: Wed, 15 Apr 2015 21:50:53 +0200 Subject: [PATCH 2/2] ox: Change label naming scheme * ox.el (org-export-get-reference): Change labeling scheme. 160820bc94 and later changed the label naming scheme to follow types. This commit maps to types to more standard names, e.g. 'headline' to 'sec'. --- lisp/ox.el | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/ox.el b/lisp/ox.el index d6dcc82..f7d0ef5 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -4149,9 +4149,18 @@ alphanumeric characters only." h)))) (or (gethash datum cache) (puthash datum - (format "org%s%d" + (format "%s:%d" (if type - (replace-regexp-in-string "-" "" (symbol-name type)) + (case type + (headline "sec") + (paragraph + (if (org-element-property :caption datum) + "fig" "paragraph")) + (latex-environment "eq") + (table "tbl") + (otherwise + (replace-regexp-in-string "-" "" + (symbol-name type)))) "secondarystring") (incf (gethash type cache 0))) cache)))) -- 2.3.5
>From a01e6759a6a016fd4c684eaaa56544d8507c897f Mon Sep 17 00:00:00 2001 From: Rasmus <ras...@gmx.us> Date: Wed, 15 Apr 2015 21:46:57 +0200 Subject: [PATCH 1/2] ox-latex: Wider user-label support * ox-latex.el (org-latex--label): Add user-labels for targets and radio-target. (org-latex--wrap-label, org-latex-link, org-latex-target) (org-latex-radio-target): Use org-latex--label. --- lisp/ox-latex.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 61d16b1..b22b0a7 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1056,9 +1056,10 @@ return a unique label. Eventually, if FULL is non-nil, wrap label within \"\\label{}\"." (let* ((user-label (org-element-property - (if (memq (org-element-type element) '(headline inlinetask)) - :CUSTOM_ID - :name) + (case (org-element-type element) + ((headline inlinetask) :CUSTOM_ID) + ((target radio-target) :value) + (otherwise :name)) element)) (label (and (or user-label force) @@ -1176,7 +1177,7 @@ should not be used for floats. See (if (not (and (org-string-nw-p output) (org-element-property :name element))) output (concat (format "\\phantomsection\n\\label{%s}\n" - (org-export-get-reference element info)) + (org-latex--label element info)) output))) (defun org-latex--text-markup (text markup info) @@ -2088,7 +2089,7 @@ INFO is a plist holding contextual information. See (let ((destination (org-export-resolve-radio-link link info))) (if (not destination) desc (format "\\hyperref[%s]{%s}" - (org-export-get-reference destination info) + (org-latex--label destination info) desc)))) ;; Links pointing to a headline: Find destination and build ;; appropriate referencing command. @@ -2416,7 +2417,7 @@ holding contextual information." "Transcode a RADIO-TARGET object from Org to LaTeX. TEXT is the text of the target. INFO is a plist holding contextual information." - (format "\\label{%s}%s" (org-export-get-reference radio-target info) text)) + (format "\\label{%s}%s" (org-latex--label radio-target info) text)) ;;;; Section @@ -3029,7 +3030,7 @@ a communication channel." "Transcode a TARGET object from Org to LaTeX. CONTENTS is nil. INFO is a plist holding contextual information." - (format "\\label{%s}" (org-export-get-reference target info))) + (format "\\label{%s}" (org-latex--label target info))) ;;;; Timestamp -- 2.3.5