1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-21 06:55:35 +00:00

ox-texinfo: Allow cross-references to headlines excluded from TOC

* lisp/ox-texinfo.el (org-texinfo-headline): Use @anchor instead of
  @node for headlines outside TOC.
This commit is contained in:
Nicolas Goaziou 2017-11-03 11:34:21 +01:00
parent 36578fda46
commit f9c09b194f

View File

@ -885,8 +885,10 @@ holding contextual information."
(format "@end %s" (if numbered? 'enumerate 'itemize))
"\n"))
(concat
(and (not notoc?)
(format "@node %s\n" (org-texinfo--get-node headline info)))
;; Even if HEADLINE is using @subheading and al., leave an
;; anchor so cross-references in the Org document still work.
(format (if notoc? "@anchor{%s}\n" "@node %s\n")
(org-texinfo--get-node headline info))
(format command full-text)
contents))))))