gbranden pushed a commit to branch master
in repository groff.
commit 8233852fcd72f2d47bdc5d4972e9fa310b377263
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Jul 14 12:17:13 2024 -0500
doc/pic.ms: Don't mess with `vs` in nroff mode.
* doc/pic.ms: Reduce type size and vertical spacing in displays only on
typesetters. To that end:
(SS): Define new macro for starting a "small display".
(SE): ...and a macro for ending one.
Migrate use of `DS`/`DE` macros with `ps` and `vs` requests to the new
macros.
Fixes problem exposed by experimental change to GNU troff arithmetic.
troff:.../doc/pic.ms:211: warning: vertical spacing must not be negative
troff:.../doc/pic.ms:1778: warning: vertical spacing must not be negative
troff:.../doc/pic.ms:2183: warning: vertical spacing must not be negative
troff:.../doc/pic.ms:2403: warning: vertical spacing must not be negative
troff:.../doc/pic.ms:2467: warning: vertical spacing must not be negative
---
ChangeLog | 9 +++++++++
doc/pic.ms | 54 +++++++++++++++++++++++++++---------------------------
2 files changed, 36 insertions(+), 27 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 94d4bcde6..3db697a19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-07-14 G. Branden Robinson <[email protected]>
+
+ * doc/pic.ms: Reduce vertical spacing in displays only on
+ typesetters. To that end:
+ (SS): Define new macro for starting a "small display".
+ (SE): ...and a macro for ending one.
+ Migrate use of `DS`/`DE` macros with `ps` and `vs` requests to
+ the new macros.
+
2024-07-14 G. Branden Robinson <[email protected]>
* tmac/groff_mdoc.7.man: Manipulate type size and vertical
diff --git a/doc/pic.ms b/doc/pic.ms
index edc70e5a5..f968ead00 100644
--- a/doc/pic.ms
+++ b/doc/pic.ms
@@ -49,6 +49,24 @@ Figure \\n[H1]-\\$1
. KE
..
.
+.\" Start small display.
+.de SS
+. DS
+. if t \{\
+. ps -1
+. vs -1
+. \}
+..
+.
+.\" End small display.
+.de SE
+. if t \{\
+. ps
+. vs
+. \}
+. DE
+..
+.
.\" Definitions end here
.
.
@@ -206,9 +224,7 @@ ellipse "PostScript"
.PP
This was produced from the following \fBpic\fP program:
.KS
-.DS
-.ps -1
-.vs -1
+.SS
.CW
\&.PS
ellipse "document";
@@ -1772,10 +1788,8 @@ appearing in the replacement text.
.PP
As an example of macro use, consider this:
.KS
-.DS
+.SS
.CW
-.ps -1
-.vs -1
\&.PS
# Plot a single jumper in a box, $1 is the on-off state.
define jumper { [
@@ -1814,10 +1828,8 @@ jumperblock(1,1,0,0,1,0);
move;
jumperblock(1,0,1,0,1,1);
\&.PE
-.ps
-.vs
.R
-.DE
+.SE
.KE
.LP
It yields the following:
@@ -2178,9 +2190,7 @@ center it.
The GNU incarnation of the \fBms\fP macro package, for example, includes
the following definitions:
.KS
-.DS
-.ps -1
-.vs -1
+.SS
.CW
\&.de PS
\&.br
@@ -2196,9 +2206,7 @@ the following definitions:
\&.sp \e\en[DD]u+.5m
\&..
.R
-.DE
-.ps
-.vs
+.SE
.KE
.LP
Equivalent definitions of these and of \fB.PF\fP and \fB.PY\fP are
@@ -2398,9 +2406,7 @@ Here are a few larger examples, with complete source code.
One of our earlier examples is generated in an instructive way using a
for loop:
.KS
-.DS
-.ps -1
-.vs -1
+.SS
.CW
\&.PS
# Draw a demonstration up left arrow with grid box overlay
@@ -2428,9 +2434,7 @@ gridarrow(2);
undef gridarrow
\&.PE
.R
-.DE
-.ps
-.vs
+.SE
.KE
.KS
.PS
@@ -2462,9 +2466,7 @@ undef gridarrow
Here's an example concocted to demonstrate layout of a large,
multiple-part pattern:
.KS
-.DS
-.ps -1
-.vs -1
+.SS
.CW
\&.PS
define filter {box ht 0.25 rad 0.125}
@@ -2529,9 +2531,7 @@ arrow from Top.D.end to Anchor.ne
}
\&.PE
.R
-.DE
-.ps
-.vs
+.SE
.KE
.KS
.PS
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit