groff-commit
[Top][All Lists]
Advanced

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

[groff] 03/04: groff(7): Fix string and double-quote error.


From: G. Branden Robinson
Subject: [groff] 03/04: groff(7): Fix string and double-quote error.
Date: Wed, 5 Aug 2020 10:32:54 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit f9a54ef2d36a93add348484f16672ddaf25ad37b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Jul 31 22:24:09 2020 +1000

    groff(7): Fix string and double-quote error.
    
    man/groff.7.man (Control Characters): Incorrect claims were made.
    Double quotes can indeed be used to enclose arguments to string
    interpolations.
    
        .ds foo foo \\$1 baz \\$2 and then \\$3\"
        This is \*[foo bar "qux" "]"].
                This is foo bar baz qux and then ].
    
    The statement about a leading " in a string definition (or appendment
    with .as) was stated too generally.  The leading quote is not necessary
    to include leading tab characters, which can be input as-is, even in
    compatibility mode.
    
        (Imagine that multiple adjacent spaces are tabs below.)
    
        .ds a a
        .ds b   b
        My string is x\*ax.
        .br
        Another string is y\*by.
                My string is xax.
                Another string is y     by.
    
    Also, use groff-style escape to document special character \[dq].
---
 ChangeLog       | 10 ++++++++++
 man/groff.7.man | 19 +++++++++++--------
 2 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e46733a..790eec6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2020-07-31  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * man/groff.7.man (Control Characters): Incorrect claims were
+       made.  Double quotes can indeed be used to enclose arguments to
+       string interpolations.  The statement about a leading " in a
+       string definition (or appendment with .as) was stated too
+       generally.  The leading quote is not necessary to include
+       leading tab characters, which can be input as-is, even in
+       compatibility mode.
+
 2020-07-28  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * man/groff.7.man (Requests/Request short reference/.ft): Fix
diff --git a/man/groff.7.man b/man/groff.7.man
index b16f8ad..630e50b 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -619,16 +619,19 @@ escape sequence.
 .
 .TP
 \&\f[CB]\[dq]\f[]
-The double quote is used to enclose arguments in macros (but not in
-requests and strings).
+The double quote can be used to enclose arguments to macros and strings,
+but not requests.
 .
 In the
-.request .ds
+.request .ds ,
+.request .ds1 ,
+.request .as ,
 and
-.request .as
-requests, a leading double quote in the argument is stripped off,
-making everything else afterwards the string to be defined (enabling
-leading whitespace).
+.request .as1
+requests,
+a leading double quote in the second argument is stripped off,
+enabling the inclusion of leading space characters in the string
+definition or appendment.
 .
 The escaped double quote
 .esc \[dq]
@@ -638,7 +641,7 @@ Otherwise, it is not special.
 .
 .I groff
 provides a printable representation with the
-.esc (dq
+.esc [dq]
 escape sequence.
 .
 .TP



reply via email to

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