[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Always show source code of examples
From: |
Alfred M. Szmidt |
Subject: |
Re: Always show source code of examples |
Date: |
Sun, 05 Dec 2021 12:19:36 -0500 |
On Sun, Dec 05, 2021 at 04:38:35AM -0500, Alfred M. Szmidt wrote:
> A patch is worth more than a thousand words.
>
> 2021-12-05 Alfred M. Szmidt <ams@gnu.org>
>
> * doc/texinfo.texi (@code{@@format}): Add example input.
>
> diff --git a/doc/texinfo.texi b/doc/texinfo.texi
> index 2c833da3d8..3298b93d25 100644
> --- a/doc/texinfo.texi
> +++ b/doc/texinfo.texi
> @@ -6708,14 +6708,32 @@ indents the text, but does not fill it.
>
> The @code{@@format} command is similar to @code{@@display}, except it
> leaves the text unindented. Like @code{@@display}, it does not select
> -the fixed-width font.
> +the fixed-width font. Thus,
>
This part looks good to me.
> +@example
> +@group
> +@@format
> +This is an example of text written between a @@code{@@@@format} command
> +and an @@code{@@@@end format} command. As you can see
> +from this example,
> +the @@code{@@@@format} command does not fill the text.
> +@@end format
> +@end group
> +@end example
> +
> +@noindent
> +produces
I think that within an @example it is not actually the same as the code
So I would suggest not using an @example here.
Good point. Update attached. I'm slightly unsure on the @group,
since I haven't rendered a hardcopy.
diff --git a/doc/texinfo.texi b/doc/texinfo.texi
index 2c833da3d8..e3363a0f7a 100644
--- a/doc/texinfo.texi
+++ b/doc/texinfo.texi
@@ -6708,13 +6708,29 @@ indents the text, but does not fill it.
The @code{@@format} command is similar to @code{@@display}, except it
leaves the text unindented. Like @code{@@display}, it does not select
-the fixed-width font.
+the fixed-width font. Thus,
+
+@example
+@group
+@@format
+This is an example of text written between a @@code{@@@@format} command
+and an @@code{@@@@end format} command. As you can see
+from this example,
+the @@code{@@@@format} command does not fill the text.
+@@end format
+@end group
+@end example
+
+@noindent
+produces
@format
+@group
This is an example of text written between a @code{@@format} command
and an @code{@@end format} command. As you can see
from this example,
the @code{@@format} command does not fill the text.
+@end group
@end format