Aaargh. Here's the missing attachment.
.RP no                     \" Title page, "no" repeats on next pags.
.nr PL 8i                  \" Else filling overruns A5 length.
.nr PO 0.5                 \" Halve the default left margin. (in)
.nr HM 0.4                 \" Smaller header margin.
.nr FM 0.4                 \" Smaller footer margin.
.nr PS 12                  \" 12 point font document default.
.nr GROWPS 4               \" 12 + 4 = 16p ".SH 1" heading size.
.nr PSINCR 2p              \" Font size decrement for ".SH 2" etc.
.nr FL 3.8i                \" Footnote line length.
.TL                        \" Document title.
A Groff Bootstrap Primer
.AU Erik Christiansen
.AB                        \" Abstract start.
Just enough to typeset a multipage A5 booklet on A4 paper, demonstrating margin
control, text flowing peculiarities, footnotes, page breaks, and a few heading 
font sizes.
.LP
The file groff_primer.ms provides syntax examples with some amplifying comments.
.LP
We'll  use the Manuscript macro package, invoking -ms.
.AE                        \" Abstract end.
.SH 2                      \" Second level section heading.
Prerequisites:
.LP                        \" Unindented paragraph.
Install a full groff, not just groff_basic:
   $ apt-get update
   $ apt-get install groff

Review: "$ man groff_ms", the Manuscript macros.
.SH 2
Basic Invocation:
.LP
$ groff -Tpdf -dpaper=a5 -P-pa5 -ms groff_primer.ms \\
            > groff_primer.pdf
.LP
Postscript is the default, if -T is omitted. And
 -dpaper=a4l    sets A4 landscape paper, instead.
 -P-pa4 -P-l    communicates that to postprocessors.
 -ms            selects the Manuscript macro package.
.SH 2
Starting a Document:
.LP
The ms macro package needs one of its macros invoked at the beginning of a
document so that it can initialize. A paragraph initiator such as .LP or .PP
suffices, but .RP may better serve a more complex document.
.SH 3
Paragraphs:
.LP
Within a paragraph, text is flowed ("filled") to fit the typesetting line
length. A filling break to a new line can be invisibly triggered.
Reading the manual section:
.ps 9
 https://www.gnu.org/software/groff/manual/groff.html.node/Breaking.html
.ps
.LP
.B  "Leading spaces on an input line cause a break, "
.UL and
.B  "prevent flowing that line." \*[*]      \" Insert numbered footnote marker.
.FS                                         \" Footnote start.
But the trailing '\\' in the Basic Invocation needed escaping (\\\\) or a
following space, to avoid defeating the
.UL "leading spaces effect."
, causing normal flowing to be invisibly restored.

.FE                                         \" Footnote end.
.LP
That was used immediately above, to stop the URL being hyphen-broken, to flow
across two lines. Groff then warned: "can't break line", until the fontsize was
reduced to 9p, to fit the A5 line length.
.LP
"A blank input line not only causes a break, but by default also outputs a
blank output line." The gap is large, though. A ".LP", instead, is neater.
.LP
.B "Bold text"
is flowed, even with interruption for an underlined word or two, as above,
but
.UL "long underlined text is not flowed, as seen here."
.SH 2
More Stuff

Reply via email to