(\kbdfont, \kbdexamplefont): New macros, parms that
authorRichard M. Stallman <rms@gnu.org>
Fri, 4 Jul 1997 00:07:28 +0000 (00:07 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 4 Jul 1997 00:07:28 +0000 (00:07 +0000)
tell @kbd what to do.
(\setkbdinputdistinct, \setkbdinputexample): New commands set them.
(\kbd): Use those parms.

texinfo.tex

index b785bfc01f3d859eec7bfc753bdf869840490f0a..2b1b1d2701343d21ab23dd0c790e9a32f79a3c64 100644 (file)
@@ -1356,12 +1356,25 @@ where each line of input produces a line of output.}
 
 % @kbd is like @code, except that if the argument is just one @key command,
 % then @kbd has no effect.
-%
+
+% Font to use for @kbd, ordinarily.
+\let\kbdfont\t
+% Font to use for @kbd, when inside @example.
+\let\kbdexamplefont\t
+
+% If you use @setkbdinputdistinct, then @kbd produces slanted tty font.
+\def\setkbdinputdistinct{\let\kbdfont\ttsl
+\let\kbdexamplefont\ttsl}
+
+% If you use @setkbdinputexample, then @kbd produces slanted tty font
+% only inside of @example and friends.
+\def\setkbdinputexample{\gdef\kbdexamplefont\ttsl}
+
 \def\xkey{\key}
 \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
 \ifx\one\xkey\ifx\threex\three \key{#2}%
-\else{\tclose{\ttsl\look}}\fi
-\else{\tclose{\ttsl\look}}\fi}
+\else{\tclose{\kbdfont\look}}\fi
+\else{\tclose{\kbdfont\look}}\fi}
 
 % @url, @email.  Quotes do not seem necessary.
 \let\url=\code % perhaps include a hypertex \special eventually
@@ -3614,11 +3627,12 @@ width0pt\relax} \fi
 %
 \def\nonfillfinish{\afterenvbreak\endgroup}%
 
-% This macro is
 \def\lisp{\begingroup
   \nonfillstart
   \let\Elisp = \nonfillfinish
   \tt
+  % Make @kbd do something special, if requested.
+  \let\kbdfont\kbdexamplefont
   \rawbackslash % have \ input char produce \ char from current font
   \gobble
 }
@@ -4365,7 +4379,7 @@ width0pt\relax} \fi
   \catcode`\\v=\other
   \catcode`\^^L=\other
   \catcode`\\ e=\other
-  \catcode`\\ f=\other
+  \catcode`\=\other
   \catcode`\\10=\other
   \catcode`\\11=\other
   \catcode`\\12=\other