help-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Which is the proper command to mark the name of menus and menu items


From: Gavin Smith
Subject: Re: Which is the proper command to mark the name of menus and menu items?
Date: Thu, 2 Nov 2023 17:06:39 +0000

On Wed, Nov 01, 2023 at 02:17:35PM +0000, Oleander wrote:
> Hello everyone,
> 
> which command do you use to represent input which is based on text
> presented by the system, such as the names of menus and menu items?
> 
> I write documentation for my team at work. When I want to point out that
> an issue should be reported to `group_foo` which also corresponds to the
> name to be selected in the menu of the ticketing program we use, which
> command would you use?
> 
> A) Send this request to @kbd{group_foo}.
> 
> B) Send this request to @samp{group_foo}.
> 
> This html guide
> https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd recommends
> to nest the <samp> element inside a <kbd> element.
> 
> Since Texinfo has @kbd and @samp, does the same thing apply or is @samp
> the correct command?
> 
> Thank you!

I would use @samp, not @kbd, because it is not typed in; the user usually
clicks on the menu items using a pointing device such as a mouse.

I cannot think of a valid reason to put @samp inside of @kbd.

The MDN page you linked describes a possible usage in HTML:

  Nesting a <samp> element inside a <kbd> element represents input which
  is based on text presented by the system, such as the names of menus
  and menu items, or the names of buttons displayed on the screen.

and gives the example

  To create a new file, choose the <kbd><kbd><samp>File</samp></kbd>
  ⇒<kbd><samp>New Document</samp></kbd></kbd> menu option.

It describes this as "doing some interesting nesting".

However, I do not recommend that you try to be interesting with the
corresponding Texinfo commands.  It seems to me that this is something
that somebody made up but nobody would never know what it meant unless
they went and studied the HTML specifications.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]