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.

I don't remember anything, but I found the following ChangeLog entry
that seems to have made the change later than the 6.8 release:

2023-09-09  Patrice Dumas <[email protected]>

        Automatic menu in HTML if missing and FORMAT_MENU is menu

        * tp/Texinfo/Convert/HTML.pm (%available_converter_info)
        (_convert_heading_command): add 'labels' to the
        %available_converter_info.  Automatic menu setup and formatting if
        FORMAT_MENU is menu, a sectioning command is being formatted,
        associated node is with automatic directions and without menu
        and there is no table of contents already formatted.

This was commit a6f55a610293eadc68.

There was a short discussion about it:
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.

 
> As can be seen, there is a single, hand-crafted, top-level `@menu`
> block that has some additional descriptions.  There is no menu block
> within chapter `Bar`.
> 
> The test call is
> 
> ```
> texi2any --html -c FORMAT_MENU=menu menu.texinfo 
> ```
> 
> which works just fine with version 7.2.  However, with version 6.8,
> there is no automatically generated menu in chapter `Baz` (see
> attached images) – I guess this is a bug that has been fixed in newer
> versions.
> 
> Is there any way to get the desired result with version 6.8?  I tried
> to use `-c FORMAT_MENU=sectiontoc` – in LilyPond, we have the complete
> index in a side panel, so this solution would be acceptable to a
> certain degree – however, it completely ignores manually generated
> `@menu` blocks...
> 
> 
>     Werner




Reply via email to