texinfo-devel
[Top][All Lists]
Advanced

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

kbd and similar command within code


From: Patrice Dumas
Subject: kbd and similar command within code
Date: Sat, 21 Jul 2012 12:07:16 +0200
User-agent: Mutt/1.5.20 (2009-12-10)

Hello,

I just found out something in the manual that is not implemented in
texi2any.  For Info output in @kbd description:

     In Info output, @kbd is usually the same as @code, producing
`quotes' around its
argument. However, in typewriter-like contexts such as the @example
environment (see
Section 10.3 [example], page 90) and @code command itself, the quotes
are omitted, since
Info format cannot use distinguishing fonts.


Right now texi2any do everything the same whatever the context, which
means that @kbd argument, for example, is always quoted.  I am ready to
change that, but I'd like to do something consistent, not only for @kbd.
Indeed, it is very unclear to me why @kbd is special.  I understand how it
is special in TeX as it is has a different distinguishing font.  However
it seems a bit weird to me to have quotes for @-commands similar with
@code when they are nested within @code, even though they don't even have
a different font than @code.

My text is rather unclear, so let's explain with an example.  With
makeinfo in C:

@code{code @kbd{kbd}} -> `code kbd'
@address@hidden my_file} -> ``ls' my_file'

@command and @code use the same font in TeX.  When nested, in
Info, there are quotes for the @command argument, while the @kbd argument 
has no quotes added although it uses a different font than @code in TeX
and therefore could be considered as 'more different' from the 
surrounding @code text.

My point is that it would be more consistent if @command was treated
like @kbd, ie without quotes.  Since TeX adds quotes for @file in every
case, @file could keep the quotes when nested.

My proposal is therefore to use quotes in nested code-like commands only
if TeX also quotes those arguments when nested in code-like commands.


Note: I also think that the formatting of @-commands in the different 
output formats, in general, should not be described in the texinfo 
manual, in line with the intentional/semantic markup nature of texinfo
-- but that's a different issue.

-- 
Pat



reply via email to

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