[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 06/25: [docs]: (Strings) Fix content and style nits.
From: |
G. Branden Robinson |
Subject: |
[groff] 06/25: [docs]: (Strings) Fix content and style nits. |
Date: |
Mon, 28 Mar 2022 12:08:19 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit d54e15c7ad337994ba4d697ddf6e056e737fbd10
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon Mar 28 23:59:27 2022 +1100
[docs]: (Strings) Fix content and style nits.
* Give more motivation to the syntactical idiom of placing "\\" at the
end of a macro body line or after a string interpolation of a macro
while inside a macro definition.
* Fix missing word in cross reference.
* Tighten wording.
---
doc/groff.texi | 21 ++++++++++++---------
man/groff.7.man | 19 ++++++++++++++++---
2 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/doc/groff.texi b/doc/groff.texi
index 543af80f..fd70507e 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -11775,10 +11775,10 @@ It is not possible to embed a newline in a string
that will be
interpreted as such when the string is interpolated. To achieve that
effect, use the @code{\*} escape to interpolate a macro instead.
-Strings, macros, and diversions share a name space; @ref{Identifiers}.
-Internally, the same mechanism is used to store them. It is thus
-possible to call a macro with string interpolation syntax and vice
-versa.
+Macros, strings, and diversions share a name space; see
+@ref{Identifiers}. Internally, the same mechanism is used to store
+them. You can thus call a macro with string interpolation syntax and
+vice versa.
@Example
.de subject
@@ -11816,11 +11816,14 @@ Truly.
@noindent
By ending each text line of the macros with an escaped
@samp{\@key{RET}}, we get the desired effect (@pxref{Line
-Continuation}). What would have happened if we had used only one
-backslash at a time instead?
-
-Interpolating a string does not hide existing macro arguments. Thus in
-a macro, a more efficient way of doing
+Continuation}).@footnote{The backslash is doubled. @xref{Copy Mode}.}
+What would have happened if we had used only one backslash at a time
+instead?
+
+Interpolating a string does not hide existing macro arguments. We can
+also place the escaped newline outside the string interpolation instead
+of within the string definition. Thus, in a macro, a more efficient way
+of doing
@Example
.xx \\$@@
diff --git a/man/groff.7.man b/man/groff.7.man
index cd078033..983b986b 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -4564,13 +4564,26 @@ double quotes in any other location are included in the
string
.
.
.P
-Strings,
-macros,
-and diversions share a name space.
+Macros,
+strings,
+and diversions share a name space;
+see section \[lq]Identifiers\[rq] above.
.
Internally,
the same mechanism is used to store them.
.
+You can thus call a macro with string interpolation syntax and vice
+versa.
+.
+Interpolating a string does not hide existing macro arguments.
+.
+The sequence
+.B \[rs]\[rs]
+can be placed at the end of a line in a macro definition or,
+within a macro definition,
+immediately after the interpolation of a macro as a string to suppress
+the effect of a newline.
+.
.
.P
Several requests exist to perform rudimentary string operations.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 06/25: [docs]: (Strings) Fix content and style nits.,
G. Branden Robinson <=