bug-texinfo
[Top][All Lists]
Advanced

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

Re: When should we put @key inside @kbd?


From: Gavin Smith
Subject: Re: When should we put @key inside @kbd?
Date: Sat, 10 Mar 2018 13:29:43 +0000

On 6 March 2018 at 20:53, Richard Stallman <address@hidden> wrote:
>   > What about a text like "Type @key{TAB} or @address@hidden"? The
>   > former TAB would be unslanted, the latter slanted. It looks
>   > inconsistent, I would say.
>
> This is a miscommunication.
>
> Eli argued for making @key _always_ produce the nonslianted font,
> and I said I tend to agree.  If we did that, then both uses of @key in
>
>   Type @key{TAB} or @address@hidden
>
> would be non-slanted.

If @key{TAB} is not slanted within @kbd, then it would be less clear
where the input starts and ends. With @kbd{a b}, both "a" and "b" are
slanted and this distinguishes "a b" from the surrounding text, saying
to press "a" and then press "b". It makes sense to me that the whole
input would be slanted too in cases like @kbd{a @key{TAB}}, meaning
press "a" and then press TAB. Otherwise, you might think that you just
have to press "a".

In some cases it might not matter as the key names inside @key would
be distinguished by being in monospace. However, there are cases when
this might matter, as the Texinfo manual says:

> By default, the '@kbd' command produces a different font (slanted
typewriter instead of normal typewriter), so users can distinguish the
characters that they are supposed to type from those that the computer
outputs.

Inside an environment like @example where the rest of the text is
output from a program, it would be important to mark any user input as
different.



reply via email to

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