From 85588714ac9d9a81c8128e11e0d25b84ca015d25 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sat, 14 Jan 2012 01:02:02 +0100 Subject: [PATCH] org-e-latex: Apply changes to org-export-resolve-fuzzy-link * EXPERIMENTAL/org-e-latex.el (org-e-latex-link): Apply changes to org-export-resolve-fuzzy-link. --- EXPERIMENTAL/org-e-latex.el | 43 +++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/EXPERIMENTAL/org-e-latex.el b/EXPERIMENTAL/org-e-latex.el index cfb9e9f23..4ea2f2e69 100644 --- a/EXPERIMENTAL/org-e-latex.el +++ b/EXPERIMENTAL/org-e-latex.el @@ -1345,27 +1345,28 @@ INFO is a plist holding contextual information. See ;; the destination of the link. ((string= type "fuzzy") (let ((destination (org-export-resolve-fuzzy-link link info))) - (cond - ;; Target match. - ((stringp destination) - (format "\\hyperref[%s]{%s}" - (org-export-solidify-link-text destination) - (or desc - (org-export-secondary-string - (org-element-get-property :raw-link link) 'e-latex info)))) - ;; Headline match. - ((integerp destination) - (format "\\hyperref[headline-%d]{%s}" - destination - (or desc - (org-export-secondary-string - (org-element-get-property :raw-link link) 'e-latex info)))) - ;; No match. - (t (format "\\texttt{%s}" - (or desc - (org-export-secondary-string - (org-element-get-property :raw-link link) - 'e-latex info))))))) + (case (car destination) + (target + (format "\\hyperref[%s]{%s}" + (org-export-solidify-link-text + (org-element-get-property :raw-value destination)) + (or desc + (org-export-secondary-string + (org-element-get-property :raw-link link) + 'e-latex info)))) + (headline + (format "\\hyperref[headline-%d]{%s}" + (org-element-get-property :begin destination) + (or desc + (org-export-secondary-string + (org-element-get-property :raw-link link) + 'e-latex info)))) + (otherwise + (format "\\texttt{%s}" + (or desc + (org-export-secondary-string + (org-element-get-property :raw-link link) + 'e-latex info))))))) ;; Coderef: replace link with the reference name or the ;; equivalent line number. ((string= type "coderef")