]> granicus.if.org Git - python/commitdiff
New \grammartoken markup, similar to \token but allowed everywhere.
authorFred Drake <fdrake@acm.org>
Mon, 20 Aug 2001 21:36:38 +0000 (21:36 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 20 Aug 2001 21:36:38 +0000 (21:36 +0000)
Doc/perl/python.perl
Doc/texinputs/python.sty

index f5363c699e9736af9780e21fb404de9181be9c67..2f86de64004ee1434b8eb958cbbdf562d2e2e7ed 100644 (file)
@@ -716,6 +716,10 @@ sub do_cmd_token{
     return "<a href=\"$target\">$token</a>" . $_;
 }
 
+sub do_cmd_grammartoken{
+    return do_cmd_token(@_);
+}
+
 sub do_env_productionlist{
     local($_) = @_;
     my $lang = next_optional_argument();
index 6b892cbac9c5d1f1a02578b3bb80bc58c824549d..f25041bcd0e765c855c4487191ec1906d98fa3f0 100644 (file)
 \newcommand{\citetitle}[2][URL]{\emph{#2}}
 
 
+\newcommand{\grammartoken}[1]{\texttt{#1}}
 \newenvironment{productionlist}[1][\py@badkey]{
   \def\optional##1{{\Large[}##1{\Large]}}
   \def\production##1##2{\code{##1}&::=&\code{##2}\\}
   \def\orgroup##1{{\def\or{\textbar\ }##1}}
   \def\token##1{##1}
+  \let\grammartoken=\token
   \begin{center}
     \begin{tabular}{lcl}
 }{%