diff options
author | Maxim Tarasov <mu@magi.net.ru> | 2021-05-28 14:38:41 +0300 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2021-05-28 09:07:33 -0700 |
commit | 76276257bc7b82761c6cd32158c7cf00d347a236 (patch) | |
tree | 549e6dbc907f8c8f866750b6ced3a5018713e409 /doc | |
parent | f60882fce0334ac1009d75c85e42ce59bc12e493 (diff) |
Trim the ToC for the option list in the manual
Currently, every variable is shown in the table of contents of the
reference manual. Variable list is over 400 items long. This makes the
ToC difficult to work with.
Removing is done by adding an overwriting template for the parent of
variables section (that is sect1 tag with id="variables"). In the
DocBook source matching template calls another template named subtoc
with two parameters: context (self element) and nodes (child
sections). Normally a list of descendant nodes is passed here, but we
don't want that and instead call subtoc with no parameters.
This approach results in semantically correct code being generated in
all modes.
Note, that the ID (variables) will have to be kept in sync with XML
generating code, but that is already hardcoded elsewhere.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/TODO | 4 | ||||
-rw-r--r-- | doc/mutt.xsl | 3 |
2 files changed, 3 insertions, 4 deletions
@@ -30,10 +30,6 @@ Style/Technical perl already to build docs, think about/look for simple perl templating engine. -* Find a way (XSLT?) to trim the TOC for the option reference; it's - ugly but we probably want to keep the TOC depth as-is for other - sections. - Content ------- diff --git a/doc/mutt.xsl b/doc/mutt.xsl index a075a5b3..a3558e69 100644 --- a/doc/mutt.xsl +++ b/doc/mutt.xsl @@ -11,4 +11,7 @@ </xsl:element> </xsl:template> <xsl:param name="admon.style"/> + <xsl:template match="sect1[@id = 'variables']" mode="toc"> + <xsl:call-template name="subtoc"/> + </xsl:template> </xsl:stylesheet> |