On Thu, May 08, 2025 at 09:15:08PM +0100, Gavin Smith wrote:
> On Wed, May 07, 2025 at 03:48:26AM +0000, Werner LEMBERG wrote:
> > 
> > Folks,
> > 
> > 
> > for technical reasons we use `texi2any` version 6.8 in LilyPond, not
> > wanting to upgrade to version 7.2 right now.  There is a difference in
> > behaviour regarding automatically generated `@menu` blocks, and I
> > wonder whether it is possible to achieve the desired result with some
> > extra code or additional configuration in an init file using the older
> > version.
> 
> https://lists.gnu.org/archive/html/bug-texinfo/2023-09/msg00018.html
> 
> I have tested that with texi2any 6.8, the following invocation:
> 
> ../tp/texi2any.pl  --html -c TREE_TRANSFORMATIONS=complete_tree_nodes_menus  
> -c FORMAT_MENU=menu menu.texinfo
> 
> - produces a menu in the output for the "Bar" node with your input file.  It
> may be harmless to add this TREE_TRANSFORMATIONS argument for later versions
> of texi2any but I haven't tested it thoroughly.  Hopefully this is good
> enough for your needs.

It is a good idea.  There is a similar TREE_TRANSFORMATIONS
complete_tree_nodes_missing_menu that already existed in 6.8, which adds
menus only if there is none at all, and is more in line with the
automatic generation of menus implemented in the commit Gavin described.
You can choose what suits your needs better.  Also, to avoid setting
TREE_TRANSFORMATIONS for recent versions, it is possible to set the
variable in init files conditionally on the version of texi2any.

-- 
Pat

Reply via email to