[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 07/07: groff_mdoc(7): Delete misleading sentence.
From: |
G. Branden Robinson |
Subject: |
[groff] 07/07: groff_mdoc(7): Delete misleading sentence. |
Date: |
Wed, 4 Nov 2020 07:32:52 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 25daa830abf4c089ce394fa07c0a30018558ad2d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Nov 4 23:08:49 2020 +1100
groff_mdoc(7): Delete misleading sentence.
Ingo helpfully followed up with regard to my XXX comment. I had
misunderstood the existing page language to suggest that mdoc(7) does
something especially clever in this area. His surmise is that it is
there to help the reader understand that literal double quotes don't
survive macro calls.
It is not quite the truth to tell people that, but it's close. You can
get double-quotes into macro arguments without .tr tricks or the groff
\(dq special character escape, but I sure as hell wouldn't want to try
to explain how. These are the arcane quoting rules I've mentioned in
some of my other documentation commits.
It's been a while since we've played Predict *roff Behavior. Ready?
.\" Let's count double quotes in binary.
.nr n -1 +1
.af n 00
.de M
\\n+n \\$1 \\$2
.br
..
.M a b \"
.M a b"\"
.M a "b \"
.M a "b"\"
.M a " b \"
.M a " b"\"
.M a " "b \"
.M a " "b"\"
.M a" b \"
.M a" b"\"
.M a" "b \"
.M a" "b"\"
.M a"" b \"
.M a"" b"\"
.M a"" "b \"
.M a"" "b"\"
.M "a b \"
.M "a b"\"
.M "a "b \"
.M "a "b"\"
.M "a " b \"
.M "a " b"\"
.M "a " "b \"
.M "a " "b"\"
.M "a" b \"
.M "a" b"\"
.M "a" "b \"
.M "a" "b"\"
.M "a"" b \"
.M "a"" b"\"
.M "a"" "b \"
.M "a"" "b"\"
Do any double quotes appear in the output? If so, name the integers
that have them, and where.
It may be worth noting that groff HEAD (-Tutf8) and Heirloom doctools
nroff, release 191015, produce identical output for the above.
---
tmac/groff_mdoc.7.man | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/tmac/groff_mdoc.7.man b/tmac/groff_mdoc.7.man
index fc1d27a..43bbc75 100644
--- a/tmac/groff_mdoc.7.man
+++ b/tmac/groff_mdoc.7.man
@@ -661,24 +661,25 @@ Example:
.
.Pp
Except stated explicitly, all macros are parsed and callable.
+.
+.
.Pp
Note that a macro takes effect up to the next nested macro.
+.
For example,
.Ql ".Ic foo Aq bar"
doesn't produce
.Sq Ic "foo <bar>"
-but
+but rather
.Sq Ic foo Aq bar .
-Consequently, a warning message is emitted for most commands if the first
-argument is a macro itself since it cancels the effect of the calling
-command completely.
-.
-Another consequence is that quoting macros never insert literal quotes;
-.\" XXX: The above claim does not seem to be true. They will if the
-.\" output device has to fall back on them. And .Qq appears to be
-.\" designed to do PRECISELY this.
+.
+Consequently,
+a warning message is emitted for most commands if the first argument is
+a macro itself since it cancels the effect of the calling command
+completely.
+.
.Sq Ic "foo <bar>"
-has been produced by
+is produced by
.Ql ".Ic \[dq]foo <bar>\[dq]" .
.
.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 07/07: groff_mdoc(7): Delete misleading sentence.,
G. Branden Robinson <=