aboutsummaryrefslogtreecommitdiff
path: root/example.t
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-06-20 16:38:02 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-06-20 16:38:02 +0200
commit34dbc6d3ba665918ff7f7c0c2f85e05013fbb7b5 (patch)
treea1c7f5771918f11505882dc5c49bf0321dfc0949 /example.t
parentff06446ecc0ad7aecb4cd061e46918138cd1479b (diff)
downloadmk-34dbc6d3ba665918ff7f7c0c2f85e05013fbb7b5.tar.gz
example.t: Expand FAQ
Diffstat (limited to 'example.t')
-rw-r--r--example.t57
1 files changed, 50 insertions, 7 deletions
diff --git a/example.t b/example.t
index 09607b6..650808d 100644
--- a/example.t
+++ b/example.t
@@ -35,7 +35,7 @@
.t
.x Mg ,
a simple macro package for troff
-.d "John Ankarstr\[u00F6]m"
+.d John\ Ankarstr\(:om
.d
.
.
@@ -362,18 +362,17 @@ for advanced documents.
Frequently anticipated questions
.
.s
-How do I set the default font family, point size, indentation
-of a document?
+How do I customize the default appearance of a document?
.p
-All environment settings\c
+All environment settings,
+like point size, font family and indentation\c
.(
For a complete list of settings that are associated with the environment,
-see 5.26\ Environments in the full GNU troff manual
+see 5.26\~Environments in the full GNU troff manual
.nh
.c "info '(groff.\:info)Environments'" ). (
.hy
-.)
-such as these
+.) ,
are configured with the standard troff requests.
If you set the point size at the beginning of the document,
before any
@@ -397,6 +396,36 @@ you would start the document like this:
\&.vs 12p
.
.s
+How do I customize the default appearance of a given environment?
+.p
+To configure the layout and font settings of a specific environment,
+you can switch to that environment and use the relevant troff requests:
+.l
+\&.q
+\&.ps +1p
+.p
+If you are merely configuring the environment
+without printing anything in it,
+you can also use the
+.c _e
+macro:
+.l
+\&._e q
+\&.ps +1p
+.
+.s
+How do I customize the default appearance of the margin text?
+.l
+\&._E _m \\" margin environment
+\&.ps +1p
+.
+.s
+How do I customize the default appearance of footnotes?
+.l
+\&._E _f \\" footnote environment
+\&.ps +1p
+.
+.s
How do I prevent a section from being broken up by a page break?
.p
Some macro packages have a concept of
@@ -452,8 +481,22 @@ copy environment (same as
.p
The
.c _e
+macro
can be used to activate any environment that supports
.i mg 's
extensions (see
.i Environments
above).
+The following code configures an environment called
+.c n
+and defines a corresponding macro:
+.l
+\&._e n
+\&. _ec 0 \\" copy default environment
+\&. ps -1p
+\&._e
+\&.
+\&.de n
+\&. br \\" finish current environment
+\&. _e n \\" activate new environment
+\&..