Re: automatic generation of @menu entries

Patrice Dumas <[email protected]>
Newsgroups gmane.comp.tex.texinfo.general
Message-ID <[email protected]>
On Sat, Sep 11, 2021 at 11:20:00PM -0400, Mike Frysinger wrote:
> i couldn't easily find an answer in the archives or manual, so feel free to
> point me to docs or discussions that i missed.  surely this can't be a new
> idea that i managed to come up with myself.  or there's a good reason that
> i can't see as to why this is a bad idea.
> 
> having to manually maintain @menu entries in each @node is pretty tedious,
> especially when @contents & @node are pretty well automated.  i grok that
> there will probably be cases where people want to manually curate a menu,
> but why can't we have an automatic default available ?

It is already the case, in the sense that @menu are not needed anymore.
In Info output, menus are automatically generated if they do not exist.
In HTML the new default does not require menus.  In addition, there is a
"tree transformation" that can be used to add menus,
'complete_tree_nodes_menus' (and also one to add a master menu
'regenerate_master_menu').  I think that they do what the emacs commands
do, on the tree used internally in texi2any.  Tree transformations are
set by setting the TREE_TRANSFORMATIONS customization option, so
something like:

 -c 'TREE_TRANSFORMATIONS=complete_tree_nodes_menus,regenerate_master_menu'

-- 
Pat
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.