On Tue, Jul 08, 2025 at 12:07:11PM +0000, Werner LEMBERG wrote:
> 
> [texi2any 7.2]
> 
> 
> Consider the following example file `menu.texinfo`.
> 
> ```
> \input texinfo
> 
> @node Top
> @top Top
> 
> @menu
> * Foo:: Foo foo foo.
> 
> 
> XXX @var{yyy} ZZZ
> 
> 
> * Bar:: Bar bar bar.
> @end menu
> 
> 
> @node Foo
> @chapter Foo
> Foo
> 
> 
> @node Bar
> @chapter Bar
> Baz
> 
> @bye
> ```
> 
> If I process this with
> 
> ```
> texi2any --html -c FORMAT_MENU=menu menu.texinfo 
> ```
> 
> the menu comment in output file `index.html` gets formatted like this:
> 
> ```
> <pre class="menu-comment-preformatted">
> 
> 
> XXX <var class="var">yyy</var> ZZZ
> 
> 
> </pre>
> ```
> 
> Why `<pre>`?  I consider this surprising since the item description of
> a menu entry (i.e., the third part of an entry) is not output with
> `<pre>`.
> 
> 
>     Werner
> 

Maybe Patrice will answer but it seems to me that <pre> is useful here
for preserving the line breaks so that the menu in the HTML output looks
similar to the menu in the Info output.  Here there are two blank lines
before and after the "XXX..." line and this is carried forward to the
blank space that appears in the HTML output.

The only inconsistency that I can see with the "item description" is that
the "menu comment" is in bold text due to being inside a <th> element;
however, this may not be a problem as such menu comments are used for
headings in menus.

Reply via email to