[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 30/34: [sboxes]: Rename macros out of user name space.
From: |
G. Branden Robinson |
Subject: |
[groff] 30/34: [sboxes]: Rename macros out of user name space. |
Date: |
Sat, 16 Oct 2021 23:07:29 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 3575d65d58f9ef472034b6e77154c277fc769b5e
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Oct 17 12:21:02 2021 +1100
[sboxes]: Rename macros out of user name space.
* contrib/sboxes/sboxes.tmac: Rename macros to get out of user name
space. Our ms package documentation says that externally visible
names will consist only of uppercase letters and digits.
(BoxStart): Rename to BOXSTART.
(BoxStop): Rename to BOXSTOP.
* contrib/sboxes/msboxes.ms.in: Document and use new names.
---
contrib/sboxes/ChangeLog | 9 +++++++++
contrib/sboxes/msboxes.ms.in | 38 +++++++++++++++++++-------------------
contrib/sboxes/sboxes.tmac | 6 +++---
3 files changed, 31 insertions(+), 22 deletions(-)
diff --git a/contrib/sboxes/ChangeLog b/contrib/sboxes/ChangeLog
index 3ecd282..18f5b44 100644
--- a/contrib/sboxes/ChangeLog
+++ b/contrib/sboxes/ChangeLog
@@ -1,5 +1,14 @@
2021-10-17 G. Branden Robinson <g.branden.robinson@gmail.com>
+ * sboxes.tmac: Rename macros to get out of user name space. Our
+ ms package documentation says that externally visible names will
+ consist only of uppercase letters and digits.
+ (BoxStart): Rename to BOXSTART.
+ (BoxStop): Rename to BOXSTOP.
+ * msboxes.ms.in: Document and use new names.
+
+2021-10-17 G. Branden Robinson <g.branden.robinson@gmail.com>
+
* sboxes.tmac: Add more prerequisite checking. Check `GS`
register for groff ms macros specifically. Check installed
version of groff since the gropdf in earlier versions won't
diff --git a/contrib/sboxes/msboxes.ms.in b/contrib/sboxes/msboxes.ms.in
index 1aa785a..5c89925 100644
--- a/contrib/sboxes/msboxes.ms.in
+++ b/contrib/sboxes/msboxes.ms.in
@@ -48,7 +48,7 @@ The extension can be accessed via a device control escape
sequence
.Lt pdfbackground
supporting the same parameters).
.QS
-.BoxStart SHADED cornsilk OUTLINED brown INDENT 2n WEIGHT 1p
+.BOXSTART SHADED cornsilk OUTLINED brown INDENT 2n WEIGHT 1p
\M[floralwhite]\c
.pdfbackground pagefill
\M[]\c
@@ -137,7 +137,7 @@ If
.Qq box
is included in the command, then this parameter provides the line width
for the box border.
-.BoxStop
+.BOXSTOP
.QE
For a more convenient interface, include
.Lt \-msboxes
@@ -146,13 +146,13 @@ on the
command line; the
.I sboxes
package defines the macros
-.Lt BoxStart
+.Lt BOXSTART
and
-.Lt BoxStop .
+.Lt BOXSTOP .
.QS
-.BoxStart SHADED cornsilk OUTLINED brown INDENT 2n WEIGHT 1p
-.BoxStart SHADED cornsilk3 INDENT 2p
-.Lt .BoxStart
+.BOXSTART SHADED cornsilk OUTLINED brown INDENT 2n WEIGHT 1p
+.BOXSTART SHADED cornsilk3 INDENT 2p
+.Lt .BOXSTART
.Lt SHADED
.I colour
.Lt OUTLINED
@@ -161,7 +161,7 @@ and
.I size
.Lt WEIGHT
.I size
-.BoxStop
+.BOXSTOP
.LP
where the argument after
.Lt SHADED
@@ -189,37 +189,37 @@ and each
a valid
.I groff
numeric expression.
-.BoxStop
+.BOXSTOP
.QE
Boxes can be stacked, so you can start a box within another box; usually
the later boxes would be smaller than the containing box, but this is
not enforced.
When using
-.Lt BoxStart ,
+.Lt BOXSTART ,
the left position is the current indent minus the
.Lt INDENT
in the command,
and the right position is the left position (calculated above) plus the
current line length and twice the indent.
The synopsis of
-.Lt BoxStart
+.Lt BOXSTART
above itself uses a
-.Lt BoxStart
+.Lt BOXSTART
call without borders and with a
.Lt 2p
(two point) indent.
.QS
-.BoxStart SHADED cornsilk OUTLINED brown INDENT 2n WEIGHT 1p
-.BoxStart SHADED cornsilk3 INDENT 2p
-.Lt .BoxStop
-.BoxStop
+.BOXSTART SHADED cornsilk OUTLINED brown INDENT 2n WEIGHT 1p
+.BOXSTART SHADED cornsilk3 INDENT 2p
+.Lt .BOXSTOP
+.BOXSTOP
.LP
This macro takes no parameters.
It closes the most recently started box at the current vertical position
after adding its
.Lt INDENT
spacing.
-.BoxStop
+.BOXSTOP
.QE
.I sboxes
has one further feature: it hooks into the
@@ -240,10 +240,10 @@ This document was produced using the following code.
.nr PS 11
.nr VS 13
.LP
-.BoxStart SHADED white OUTLINED brown INDENT 2n WEIGHT 1p
+.BOXSTART SHADED white OUTLINED brown INDENT 2n WEIGHT 1p
.nf
\# REPLACEME
-.BoxStop
+.BOXSTOP
.\" Local Variables:
.\" mode: nroff
.\" fill-column: 72
diff --git a/contrib/sboxes/sboxes.tmac b/contrib/sboxes/sboxes.tmac
index 3733720..68f775f 100644
--- a/contrib/sboxes/sboxes.tmac
+++ b/contrib/sboxes/sboxes.tmac
@@ -61,7 +61,7 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>.
.nr bx@PD \\n[PD]
..
.
-.de BoxStart
+.de BOXSTART
. fl
. nr bx@stack \\n[bx@stack]+1u
. nr bx@shad 0
@@ -94,7 +94,7 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>.
. shift 2
. \}
. el \{\
-. sboxes*error ignoring unrecognized BoxStart parameter '\\$1'
+. sboxes*error ignoring unrecognized BOXSTART parameter '\\$1'
. shift
. \}
. \}
@@ -120,7 +120,7 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>.
. sp -(\\n[bx@gap]u)
. nr bx@PD 0
..
-.de BoxStop
+.de BOXSTOP
. sp \\*[bx@ind\\n[bx@stack]]u-\\n[.psr]u
. pdfbackground off
. nr bx@stack \\n[bx@stack]-1u
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 30/34: [sboxes]: Rename macros out of user name space.,
G. Branden Robinson <=