texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Documentation of whitespace


From: Gavin D. Smith
Subject: branch master updated: Documentation of whitespace
Date: Tue, 31 May 2022 16:42:05 -0400

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 3a6842b427 Documentation of whitespace
3a6842b427 is described below

commit 3a6842b427dd8eaec80937cb46fa9041fd660f55
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Tue May 31 21:41:57 2022 +0100

    Documentation of whitespace
    
    * doc/texinfo.texi (Conventions): Consolidate treatment
    of whitespace characters expanding on ASCII vs. Unicode
    spaces and comment out some excessive detail about
    form feeds.
---
 ChangeLog        |  9 +++++++++
 doc/texinfo.texi | 27 +++++++++++++++++++--------
 2 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index aed7e44654..eeeeaa80c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-05-31  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       Documentation of whitespace
+
+       * doc/texinfo.texi (Conventions): Consolidate treatment
+       of whitespace characters expanding on ASCII vs. Unicode
+       spaces and comment out some excessive detail about
+       form feeds.
+
 2022-05-31  Gavin Smith  <gavinsmith0123@gmail.com>
 
        C locale for some tests
diff --git a/doc/texinfo.texi b/doc/texinfo.texi
index 730b894350..84867a0d8e 100644
--- a/doc/texinfo.texi
+++ b/doc/texinfo.texi
@@ -1354,14 +1354,24 @@ any number of hyphens in the source remain as they are 
in literal
 contexts, such as @code{@@code} and @code{@@example}.
 
 @item
-Do not use tab characters in a Texinfo file!
-(Except perhaps in verbatim modes.)  @TeX{} uses variable-width fonts,
-which means that it is impractical at best to define a tab to work in
-all circumstances.  Consequently, @TeX{} treats tabs like single
-spaces, and that is not what they look like in the source.
-Furthermore, @code{makeinfo} does nothing special with tabs, and thus
-a tab character in your input file will usually have a different
-appearance in the output.
+@emph{Whitespace}.  Texinfo files are plain text files composed of lines
+terminated by the usual newline character (line feed).  Both @TeX{} and
+@command{texi2any} read input one line at a time.  Paragraphs are terminated
+by an empty line or a line containing only spaces. A sequence of several
+spaces in text is usually treated the same as a single space (except in
+verbatim modes).
+
+Other ASCII whitespace (tab, form feed, carriage return) may be treated
+the same as space characters, although the results may differ depending
+on output format.  Hence, there is not much point in using these
+in documents.  Non-ASCII spaces, such as Unicode ``em space'', are
+not recognized as whitespace at all and will be treated as regular,
+non-whitespace characters.
+
+However, in verbatim modes, for example in code samples, tab characters
+may produce the correct formatting in the output.
+
+@ignore @c Excessive detail?
 
 To avoid this problem, Texinfo mode in GNU Emacs inserts
 multiple spaces when you press the @key{TAB} key.  Also, you can run
@@ -1399,6 +1409,7 @@ Completely removed, as they are not allowed.
 
 As you can see, because of these differing requirements of the output
 formats, it's not possible to use form feeds completely portably.
+@end ignore
 
 @end itemize
 



reply via email to

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