help-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-texinfo] Local table of contents within a node


From: Patrice Dumas
Subject: Re: [help-texinfo] Local table of contents within a node
Date: Sun, 10 Jan 2016 13:33:38 +0100
User-agent: Mutt/1.5.20 (2009-12-10)

On Sat, Jan 09, 2016 at 04:06:36PM +0000, Gavin Smith wrote:
> On 9 January 2016 at 12:39, Sebastian Wiesner <address@hidden> 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.

Otherwise, maybe something that should work and not need fiddling with
@node would be using a @detailmenu (not tested).

@menu
@detailmenu
* foo::
* bar::
@end detailmenu
@end menu

The advantage of using an @itemize with @ref is that it will appear in
formats that do not take menu into account, such as TeX and DocBook.  It
is more syntaxic, however, which is not perfect.

-- 
Pat



reply via email to

[Prev in Thread] Current Thread [Next in Thread]