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
1 changed files with 4 additions and 2 deletions

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))))))