[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-texinfo] Local table of contents within a node
From: |
Gavin Smith |
Subject: |
Re: [help-texinfo] Local table of contents within a node |
Date: |
Sat, 9 Jan 2016 16:06:36 +0000 |
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.
> 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}.
> My concrete problem is that the manual of my Emacs extension has a
> list of programming languages the extension supports [1], together with
> customisation options for each language. As you can see, the page
> definitely misses a brief list of languages at the very beginning:
> Currently you have to read through the entire document (or use
> isearch/in-page search) to find out whether your language is supported.
>
> Greetings,
> Sebastian Wiesner
>
> [1]:
> http://www.flycheck.org/manual/latest/Supported-languages.html#Supported-languages