mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-29 22:07:49 +00:00
ox-texinfo: Fix @ref{...} handling
* lisp/ox-texinfo.el (org-texinfo-link): Fix @ref{...} handling. Use third argument as description. Without description, use one-argument @ref.
This commit is contained in:
parent
439fcfbbf2
commit
6f12dfbcb0
|
@ -974,16 +974,12 @@ INFO is a plist holding contextual information. See
|
|||
(if desc (format "@uref{file://%s,%s}" destination desc)
|
||||
(format "@uref{file://%s}" destination)))
|
||||
(`headline
|
||||
(format "@ref{%s,%s}"
|
||||
(org-texinfo--get-node destination info)
|
||||
(cond
|
||||
(desc)
|
||||
((org-export-numbered-headline-p destination info)
|
||||
(mapconcat
|
||||
#'number-to-string
|
||||
(org-export-get-headline-number destination info) "."))
|
||||
(t (org-export-data
|
||||
(org-element-property :title destination) info)))))
|
||||
(let ((node-name (org-texinfo--get-node destination info)))
|
||||
(if desc
|
||||
(format "@ref{%s, , %s}"
|
||||
node-name
|
||||
(org-texinfo--sanitize-node desc))
|
||||
(format "@ref{%s}" node-name))))
|
||||
(_
|
||||
(format "@ref{%s,,%s}"
|
||||
(org-texinfo--get-node destination info)
|
||||
|
|
Loading…
Reference in a new issue