groff-commit
[Top][All Lists]
Advanced

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

[groff] 21/34: [sboxes]: Reflow text.


From: G. Branden Robinson
Subject: [groff] 21/34: [sboxes]: Reflow text.
Date: Sat, 16 Oct 2021 23:07:26 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 47fb691e654b7d548217120d3ccb3d49f9228996
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Oct 17 08:13:29 2021 +1100

    [sboxes]: Reflow text.
    
    Wrap lines at 72 columns and break them at sentence endings.
---
 contrib/sboxes/msboxes.ms.in | 103 ++++++++++++++++++++++++-------------------
 1 file changed, 57 insertions(+), 46 deletions(-)

diff --git a/contrib/sboxes/msboxes.ms.in b/contrib/sboxes/msboxes.ms.in
index 4b360ee..b86b09d 100644
--- a/contrib/sboxes/msboxes.ms.in
+++ b/contrib/sboxes/msboxes.ms.in
@@ -50,50 +50,57 @@ cmd left top right bottom weight
 .LP
 Where:-
 .IP cmd 7n
-Can be any of "page|fill|box" in combination. So "pagefill" would draw a
-rectangle which covers whole current page size (in which case the rest of the
-parameters can be omitted because the box dimensions are taken from the
-current media size). "boxfill", on the other hand, requires the given
-dimensions to place the box. Including "fill" in the command will make the
-rectangle filled with the current background colour "\eM[colour]" and including
-"box" will give the rectangle a border in the current stroke colour
-"\em[colour]".
+Can be any of "page|fill|box" in combination.
+So "pagefill" would draw a rectangle which covers whole current page
+size (in which case the rest of the parameters can be omitted because
+the box dimensions are taken from the current media size).
+"boxfill", on the other hand, requires the given dimensions to place the
+box.
+Including "fill" in the command will make the rectangle filled with the
+current background colour "\eM[colour]" and including "box" will give
+the rectangle a border in the current stroke colour "\em[colour]".
 .sp \n[PD]u
-The "cmd" may also be "off", on its own, which will terminate drawing the
-current box. If you have specified a page colour
-with
+The "cmd" may also be "off", on its own, which will terminate drawing
+the current box.
+If you have specified a page colour with
 .B ".pdfbackground pagefill"
-it is always the first box in the stack, and if
-you specify it again it will replace the first entry. Be aware that the
-pagefill box renders the page opaque so tools which "watermark" pdf pages are
-unlikely to be successful. To return the background to transparent do a
+it is always the first box in the stack, and if you specify it again it
+will replace the first entry.
+Be aware that the pagefill box renders the page opaque so tools which
+"watermark" pdf pages are unlikely to be successful.
+To return the background to transparent do a
 .B ".pdfbackground off"
 with no other boxes open.
 .sp \n[PD]u
-Finally the command may be "footnote" followed by a new value for "bottom"
-which will be used for all current boxes, just for the current page. This is
-to allow room for footnotes which grow during the page.\m[red]\**\m[]\" 
FOOTNOTE
+Finally the command may be "footnote" followed by a new value for
+"bottom" which will be used for all current boxes, just for the current
+page.
+This is to allow room for footnotes which grow during \
+the page.\m[red]\**\m[]\" FOOTNOTE
 .FS
-If the value is negative it is used as an offset from the bottom of the page.
+If the value is negative it is used as an offset from the bottom of the
+page.
 .FE
 .LP
 .IP left
 .IP top
 .IP right
 .IP bottom 7n
-Are the coordinates of the box. The "top" and "bottom" coordinates are
-the minimum and maximum for the box, since the actual start of the
-box is the vertical position of groff when you issue the command and the 
bottom of
-the box is the point where you turn the box "off". The top and bottom
-coordinates are only used if the box drawing extends onto the next page, so,
-ordinarily they would be set to the header and footer margins.
+Are the coordinates of the box.
+The "top" and "bottom" coordinates are the minimum and maximum for the
+box, since the actual start of the box is the vertical position of groff
+when you issue the command and the bottom of the box is the point where
+you turn the box "off".
+The top and bottom coordinates are only used if the box drawing extends
+onto the next page, so, ordinarily they would be set to the header and
+footer margins.
 .IP weight 7n
-If "box" is included in the command then this parameter provides the line width
-for the box border.
+If "box" is included in the command then this parameter provides the
+line width for the box border.
 .BoxStop
 .QE
-More convenience can be gained by including -msboxes on the groff command line
-which includes the macros "BoxStart" and "BoxStop".
+More convenience can be gained by including -msboxes on the groff
+command line which includes the macros "BoxStart" and "BoxStop".
 .QS
 .BoxStart SHADED cornsilk OUTLINED brown INDENT 2n WEIGHT 1p
 .BoxStart SHADED cornsilk3 INDENT 2p
@@ -108,21 +115,24 @@ which includes the macros "BoxStart" and "BoxStop".
 .I size
 .BoxStop
 .LP
-Where SHADED gives the fill colour and OUTLINED the border colour. Omit either
-to get a borderless filled box, or just a border with no fill. WEIGHT is used
-if the box is OUTLINED.
+Where SHADED gives the fill colour and OUTLINED the border colour.
+Omit either to get a borderless filled box, or just a border with no
+fill.
+WEIGHT is used if the box is OUTLINED.
 .LP
-INDENT is a value which leaves a gap between the border and the contents inside
-the box.
+INDENT is a value which leaves a gap between the border and the contents
+inside the box.
 .BoxStop
 .QE
-Boxes can 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. If using the BoxStart macro the left position is the current indent
-minus the INDENT in the command, and the right position is the left position
-(calculated above) plus the current line length and twice the indent.
-The macro definition of .BoxStart above has been given a box without borders
-and a 2p indent.
+Boxes can 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.
+If using the BoxStart macro the left position is the current indent
+minus the INDENT in the command, and the right position is the left
+position (calculated above) plus the current line length and twice the
+indent.
+The macro definition of .BoxStart above has been given a box without
+borders and a 2p indent.
 .QS
 .BoxStart SHADED cornsilk OUTLINED brown INDENT 2n WEIGHT 1p
 .BoxStart SHADED cornsilk3 INDENT 2p
@@ -133,11 +143,12 @@ There are no parameters, it closes the last box at the 
current vertical
 position, after adding the Indent spacing.
 .BoxStop
 .QE
-This macro package has one further feature, it attempts to hook into the ms
-package to receive notifications when footnotes are growing, so that it can
-close boxes before the footnotes are printed. If there are footnotes on a page
-it will close current boxes 2p above the footnote separator, this probably
-will not match the indent amount requested.
+This macro package has one further feature, it attempts to hook into the
+ms package to receive notifications when footnotes are growing, so that
+it can close boxes before the footnotes are printed.
+If there are footnotes on a page it will close current boxes 2p above
+the footnote separator, this probably will not match the indent amount
+requested.
 .LP
 The above was produced by the following code.
 .ds FAM C



reply via email to

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