org-e-texinfo.el: Fix link export to account for alternate TOC names

* contrib/lisp/org-e-texinfo.el (org-e-texinfo-link): Texinfo uses the
menu/TOC names for finding cross-references.  Use the menu-title as
the link destination.  Also ensures link descriptions are used as
link titles.
This commit is contained in:
Jonathan Leech-Pepin 2012-12-14 09:43:27 -05:00
parent 83b567925a
commit 676180a5fb
1 changed files with 10 additions and 4 deletions

View File

@ -1199,9 +1199,12 @@ INFO is a plist holding contextual information. See
(format "@uref{file://%s}" destination)))
;; LINK points to an headline. Use the headline as the NODE target
(headline
(format "@ref{%s}"
(format "@ref{%s,%s}"
(org-export-data
(org-element-property :title destination) info)))
(or
(org-element-property :texinfo-menu-title destination)
(org-element-property :title destination)) info)
(or desc "")))
(otherwise
(let ((path (org-export-solidify-link-text path)))
(if (not desc) (format "@ref{%s}" path)
@ -1221,9 +1224,12 @@ INFO is a plist holding contextual information. See
(format "@uref{file://%s}" destination)))
;; LINK points to an headline. Use the headline as the NODE target
(headline
(format "@ref{%s}"
(format "@ref{%s,%s}"
(org-export-data
(org-element-property :title destination) info)))
(or
(org-element-property :texinfo-menu-title destination)
(org-element-property :title destination)) info)
(or desc "")))
(otherwise
(let ((path (org-export-solidify-link-text path)))
(if (not desc) (format "@ref{%s}" path)