Subject: Re: bug#22636: tab characters in documentation

From: Assaf Gordon <[email-masked]>
Date: Tue, 9 Oct 2018 06:03:06 -0600

Hello,

> On Thu, Feb 11, 2016 at 11:22:25PM +0000, Clint Adams wrote:
>> The way @kbd{tab} is getting rendered in the Info and HTML 
>> documentation is confusing some users,

in HTML, the @kbd{tab} is rendered as <kbd>TAB</kbd>.
While the default CSS has no special rendering for <kbd>,
in our official online page it has "font-style: oblique;",
and so it is already rendered nicely:
https://www.gnu.org/software/sed/manual/sed.html#wc-_002dw

in INFO (viewed on a text terminal), indeed @key{TAB} is more noticeable
than @kbd{tab}.

I suggest the following patch (in your name) to add @key{TAB} but
also keep the existing @kbd{}.

If there are no objections I'll push this soon.

regards,
  - assaf

>From 8019107efc8f3780ee13524bb5131a313dc603d6 Mon Sep 17 00:00:00 2001
From: Clint Adams <[email-masked]>
Date: Tue, 9 Oct 2018 05:54:25 -0600
Subject: [PATCH] doc: use @key{TAB} in texinfo

Discussed in https://bugs.gnu.org/22636 .

* doc/sed.texi: Use '@kbd{@key{TAB}}' instead of '@kbd{tab}' to improve
rendering in HTML and info formats.
Copyright-paperwork-exempt: Yes
---
 doc/sed.texi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/sed.texi b/doc/sed.texi
index 03a8d01..4537574 100644
--- a/doc/sed.texi
+++ b/doc/sed.texi
@@ -2763,8 +2763,8 @@ because it is escaped.
 @item [a-zA-Z0-9]
 In the C locale, this matches any ASCII letters or digits.
 
-@item [^ @kbd{tab}]\+
-(Here @kbd{tab} stands for a single tab character.)
+@item [^ @kbd{@key{TAB}}]\+
+(Here @kbd{@key{TAB}} stands for a single tab character.)
 This matches a string of one or more
 characters, none of which is a space or a tab.
 Usually this means a word.
@@ -4235,7 +4235,7 @@ technique.
 
 @group
 # delete leading and trailing spaces
-y/@kbd{tab}/ /
+y/@kbd{@key{TAB}}/ /
 s/^ *//
 s/ *$//
 @end group
@@ -5055,7 +5055,7 @@ of commenting @command{sed} scripts.
 
 @group
 # Convert words to a's
-s/[ @kbd{tab}][ @kbd{tab}]*/ /g
+s/[ @kbd{@key{TAB}}][ @kbd{@key{TAB}}]*/ /g
 s/^/ /
 s/ [^ ][^ ]*/a /g
 s/ //g
-- 
2.11.0