Am 09.01.2016 um 17:06 schrieb Gavin Smith <[email protected]>: > > On 9 January 2016 at 12:39, Sebastian Wiesner <[email protected]> wrote: >> Hello, >> >> I would like to generate a "local" table of contents inside a node. >> This table of contents should sit at the beginning of the node and >> list all sections and subsections within this node. As an example, >> consider the following node: >> >> @node Foos and Bars >> @appendix Foos and Bars >> >> @c TOC HERE >> >> @unnumberedsec foo >> @anchor foo >> >> @unnumberedsec bar >> @anchor bar >> >> When generating the manual, I'd like to have a table of contents >> listing "foo" and "bar" at "TOC HERE". >> > The following appears to work: > > @node Foos and Bars > @appendix Foos and Bars > > @menu > * foo:: > * bar:: > @end menu > > @anchor{foo} > @unnumberedsec foo > > @anchor{bar} > @unnumberedsec bar > > If you get errors about invalid menus you may need to give extra > arguments to @node, but don't worry about it unless it happens. > >> Is that possible with Texinfo? If not, what alternatives would >> you suggest? I'm aware that I could just split the node into sub-nodes >> for "foo" and "bar" but I'd rather like to avoid that because the node >> serves as reference listing that I'd really love to keep on a single >> page (particularly because keeping it in a single page in HTML, when >> using the in-page search). > > The other option is using cross-references instead of a menu, e.g. > @ref{foo}, @ref{bar}.
Thank you very much, I didn't think of this. I'm now using an @itemize with @ref's, which works quite well. Thank you!
