mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-22 07:09:47 +00:00
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:
parent
83b567925a
commit
676180a5fb
@ -1199,9 +1199,12 @@ INFO is a plist holding contextual information. See
|
|||||||
(format "@uref{file://%s}" destination)))
|
(format "@uref{file://%s}" destination)))
|
||||||
;; LINK points to an headline. Use the headline as the NODE target
|
;; LINK points to an headline. Use the headline as the NODE target
|
||||||
(headline
|
(headline
|
||||||
(format "@ref{%s}"
|
(format "@ref{%s,%s}"
|
||||||
(org-export-data
|
(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
|
(otherwise
|
||||||
(let ((path (org-export-solidify-link-text path)))
|
(let ((path (org-export-solidify-link-text path)))
|
||||||
(if (not desc) (format "@ref{%s}" 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)))
|
(format "@uref{file://%s}" destination)))
|
||||||
;; LINK points to an headline. Use the headline as the NODE target
|
;; LINK points to an headline. Use the headline as the NODE target
|
||||||
(headline
|
(headline
|
||||||
(format "@ref{%s}"
|
(format "@ref{%s,%s}"
|
||||||
(org-export-data
|
(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
|
(otherwise
|
||||||
(let ((path (org-export-solidify-link-text path)))
|
(let ((path (org-export-solidify-link-text path)))
|
||||||
(if (not desc) (format "@ref{%s}" path)
|
(if (not desc) (format "@ref{%s}" path)
|
||||||
|
Loading…
Reference in New Issue
Block a user