bison-patches
[Top][All Lists]
Advanced

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

Re: RFC: doc: use only @example, not @smallexample


From: Akim Demaille
Subject: Re: RFC: doc: use only @example, not @smallexample
Date: Fri, 16 Mar 2012 14:38:49 +0100

Le 15 mars 2012 à 18:59, Paul Eggert a écrit :

> Another possibility, and perhaps the best one,
> is to redo the examples so their lines are not so
> long that they cause problems with smallbook format.
> Then we could just use @example everywhere.
> Those long lines make the examples hard to read
> anyway....

Here is one easy bit:

From 50aaa3ecfda7f6da0c902df58cd222955305a90e Mon Sep 17 00:00:00 2001
From: Akim Demaille <address@hidden>
Date: Fri, 16 Mar 2012 14:29:43 +0100
Subject: [PATCH 2/3] doc: save width.

* doc/bison.texinfo (Language and Grammar): Use the same
layout for an example in all the versions, i.e., keep
as general case what used to be used only for Info.
---
 doc/bison.texinfo |   11 -----------
 1 file changed, 11 deletions(-)

diff --git a/doc/bison.texinfo b/doc/bison.texinfo
index b2012c6..d71f1cc 100644
--- a/doc/bison.texinfo
+++ b/doc/bison.texinfo
@@ -541,7 +541,6 @@ lexicography, not grammar.)
 
 Here is a simple C function subdivided into tokens:
 
address@hidden
 @example
 int             /* @r{keyword `int'} */
 square (int x)  /* @r{identifier, open-paren, keyword `int',}
@@ -551,16 +550,6 @@ square (int x)  /* @r{identifier, open-paren, keyword 
`int',}
                    @r{identifier, semicolon} */
 @}               /* @r{close-brace} */
 @end example
address@hidden ifinfo
address@hidden
address@hidden
-int             /* @r{keyword `int'} */
-square (int x)  /* @r{identifier, open-paren, keyword `int', identifier, 
close-paren} */
address@hidden               /* @r{open-brace} */
-  return x * x; /* @r{keyword `return', identifier, asterisk, identifier, 
semicolon} */
address@hidden               /* @r{close-brace} */
address@hidden example
address@hidden ifnotinfo
 
 The syntactic groupings of C include the expression, the statement, the
 declaration, and the function definition.  These are represented in the
-- 
1.7.9.2





reply via email to

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