aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarstrom <john@ankarstrom.se>2021-07-04 20:38:22 +0200
committerJohn Ankarstrom <john@ankarstrom.se>2021-07-04 20:57:50 +0200
commit7a146405067c656eb8349af92d091dbaa453deae (patch)
treeb87e60e162f5abb5872c86793e3e1569859bb562
parent2b261f4504a4f640b6fa8cd18d7d2818d3856a4d (diff)
downloadmk-7a146405067c656eb8349af92d091dbaa453deae.tar.gz
Rename .l(, .l) to .(l, .)l
This fits better with established practice (see the me macros).
-rwxr-xr-xlist/list6
-rw-r--r--list/list.14
-rw-r--r--mk/README.pdfbin63595 -> 63577 bytes
-rw-r--r--mk/README.t120
4 files changed, 65 insertions, 65 deletions
diff --git a/list/list b/list/list
index 11ec7c1..c3933e4 100755
--- a/list/list
+++ b/list/list
@@ -9,12 +9,12 @@
use Getopt::Std;
BEGIN { getopt('Ep:s:') }
-if (/^\.\s*l\(\s*$/ .. /^\.\s*l\)\s*$/) {
+if (/^\.\s*\(l\s*$/ .. /^\.\s*\)l\s*$/) {
not $opt_E and s/^\\!// and next;
- if (/^\.\s*l\(\s*$/) {
+ if (/^\.\s*\(l\s*$/) {
$_ = '';
$_ = "$opt_p\n" if $opt_p;
- } elsif (/^\.\s*l\)\s*$/) {
+ } elsif (/^\.\s*\)l\s*$/) {
$_ = '';
$_ = "$opt_s\n" if $opt_s;
} else {
diff --git a/list/list.1 b/list/list.1
index 02a89d8..019c738 100644
--- a/list/list.1
+++ b/list/list.1
@@ -15,9 +15,9 @@
.Pp
.Nm
escapes text between
-.Ql .l(
+.Ql .(l
and
-.Ql .l)
+.Ql .)l
lines for
.Xr troff 1 .
.Pp
diff --git a/mk/README.pdf b/mk/README.pdf
index f6003e6..f2aaa6f 100644
--- a/mk/README.pdf
+++ b/mk/README.pdf
Binary files differ
diff --git a/mk/README.t b/mk/README.t
index de994f7..8264b01 100644
--- a/mk/README.t
+++ b/mk/README.t
@@ -149,12 +149,12 @@ If the user wishes to modify the default font size,
he or she can simply switch to the relevant environment
and set the font size as desired
using regular troff requests:
-.l(
+.(l
.\" set heading font
.h
.fam H
.ps +1p
-.l)
+.)l
.p
Troff saves the font settings in the environment,
so that the next time the environment is invoked,
@@ -173,13 +173,13 @@ are applied to all
environments.
It is thus remarkably simple and intuitive to set,
for example, the default font of a document:
-.l(
+.(l
.fam N
.t
Document title
.p
First paragraph.
-.l)
+.)l
.p
In addition to the normal environment-relevant settings,
.i mk
@@ -247,9 +247,9 @@ bold italic font
.p
For example, the following request outputs
.i mk .\(rq: \(lq
-.l(
+.(l
.i mk .
-.l)
+.)l
.
.p
Note that
@@ -290,7 +290,7 @@ and
.c d
macros can be used at the beginning of a document
to create a centered header:
-.l(
+.(l
.t
Document title
.d
@@ -298,7 +298,7 @@ First author
.br
Second author
.d i \" current date formatted as YYYY-MM-DD
-.l)
+.)l
.p
In the example above, you can see that the
.c d
@@ -353,14 +353,14 @@ take an optional argument,
which is output either immediately before or immediately after
the inline reference.
For example, the code
-.l(
+.(l
.q
This is a quotation\c
.(
\!.ne 1
This is a footnote.
.)
-.l)
+.)l
.p
generates the following output:
.q
@@ -395,12 +395,12 @@ in terms of
.i mk
environments.
For example:
-.l(
+.(l
.\" want space for...
.w s p \" a subheading of one line + a paragraph of one line
.w s pp \" a subheading of one line + a paragraph of two lines
.w ss p \" a subheading of two lines + a paragraph of one line
-.l)
+.)l
.
.
.he Internal macros
@@ -518,37 +518,37 @@ you would start the document like this
(before you call any
.i mk
macros):
-.l(
+.(l
.fam N
.ps 9p
.vs 12p
-.l)
+.)l
.
.se 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(
+.(l
\!.ne 1
.q
.ps +1p
-.l)
+.)l
.p
If you are merely configuring the environment
without printing anything in it,
you can also use
.c @e :
-.l(
+.(l
.@e q
.ps +1p
-.l)
+.)l
.
.w s ll
.se How do I customize the default appearance of the margin text?
-.l(
+.(l
.(e @m \" margin environment
.ps +1p
-.l)
+.)l
.p
You can also set such settings in your redefinition of
.c @h
@@ -557,14 +557,14 @@ or
.
.w s ll
.se How do I customize the default appearance of footnotes?
-.l(
+.(l
.(e @f \" footnote environment
.ps +1p
-.l)
+.)l
.
.w s ll
.se How do I redefine the page header?
-.l(
+.(l
.de @h
. \" set position of header text
. sp |36p
@@ -574,21 +574,21 @@ or
\!.ne 1
. sp |1i
..
-.l)
+.)l
.
.w s ll
.se How do I redefine the page footer?
.p
To change the position of the footer:
-.l(
+.(l
.\" set position of footer trap
.\" (must be done before any macros have been called)
.wh -1i @tf
.
-.l)
+.)l
.p
To change the contents of the footer:
-.l(
+.(l
.de @f
. \" set position of footer text
. \" (must be below the footer trap)
@@ -596,7 +596,7 @@ To change the contents of the footer:
. \" set footer text
. tl 'left'center'right'
..
-.l)
+.)l
.
.se How do I define my own environments?
.p
@@ -631,7 +631,7 @@ p. \n[&env]).
The following code configures an environment called
.c n
and defines a corresponding macro:
-.l(
+.(l
.@e n
. @c 0 \" copy default environment
. ps -1p
@@ -642,7 +642,7 @@ and defines a corresponding macro:
\!.ne 1
. @e n \" activate new environment
..
-.l)
+.)l
.
.se How do I prevent a section from being broken up by a page break?
.p
@@ -654,10 +654,10 @@ does not (at least yet) define any such macros by default.
The simplest solution is to use troff's
.c ne
request:
-.l(
+.(l
.ne 7 \" break page if seven lines won't fit on this page
.\" ... some text ...
-.l)
+.)l
.p
If you want to keep text of various styles together,
you can use
@@ -665,21 +665,21 @@ you can use
own
.c w
macro:
-.l(
+.(l
.w s qq \" break page if a subheading and two lines of a quotation won't fit
.\" ... some text ...
-.l)
+.)l
.ig
.p
For a more general solution, you can use a diversion:
-.l(
+.(l
.di keep
.\" ... some text ...
.br
.di
.ne \n(dnu
.keep
-.l)
+.)l
..
.
.se How do I use alternative quotation marks?
@@ -687,14 +687,14 @@ For a more general solution, you can use a diversion:
Redefine
.c \(dq .
The following code defines a Swedish quotation style:
-.l(
+.(l
.de "
\\&\\$3”\\$1”\\$2
..
-.l)
+.)l
.p
Another option is to create new macros for alternative quotation styles:
-.l(
+.(l
.\" alternative swedish quotation styles
.de ><
\\&\\$3»\\$1«\\$2
@@ -702,7 +702,7 @@ Another option is to create new macros for alternative quotation styles:
.de >>
\\&\\$3»\\$1»\\$2
..
-.l)
+.)l
.
.se How do I create nested inline quotations?
.p
@@ -718,17 +718,17 @@ for example when converting a document from US to British English,
you can redefine
.c "
to translate backticks and apostrophes accordingly:
-.l(
+.(l
.eo
.de "
. char ` \(lq
. char ' \(rq
\&\$3\(oq\$1\(cq\$2
-. char ` \\(oq
-. char ' \\(cq
+. char ` \(oq
+. char ' \(cq
..
.ec
-.l)
+.)l
.
.se How do I include a table of contents in my document?
.te .nr &toc \n%
@@ -763,7 +763,7 @@ Note that the argument given to
will be interpreted as a troff input line.
.p
The following definitions provide a good starting point:
-.l(
+.(l
.eo
.de he
. h
@@ -778,16 +778,16 @@ The following definitions provide a good starting point:
. br
..
.ec
-.l)
+.)l
.p
Now, instead of
.c h ,
you may use
.c he
to create a heading to be included in the table of contents:
-.l(
+.(l
.he A heading
-.l)
+.)l
.p
Wherever you want the table of contents to be inserted,
you may simply invoke
@@ -796,9 +796,9 @@ you may simply invoke
Just remember to use
.c toc
to run your processing pipeline:
-.l(
+.(l
<example.t toc refer \| troff -Tps >example.ps
-.l)
+.)l
.p
Thanks to the multiple passes performed by
.i toc ,
@@ -822,14 +822,14 @@ Then, at each position you want to reference,
invoke
.c .te
like this:
-.l(
+.(l
.te .nr &refname \n%
-.l)
+.)l
.p
To refer to that position, interpolate the register:
-.l(
+.(l
See page \n[&refname].
-.l)
+.)l
.p
(I prefer prefixing my references with an ampersand.)
.
@@ -840,9 +840,9 @@ The
distribution includes a troff preprocessor called
.i list ,
which filters text delimited by
-.c .l(
+.c .(l
and
-.c .l) ,
+.c .)l ,
escaping standard troff syntax.
.p
To automatically add a
@@ -850,13 +850,13 @@ To automatically add a
request before each listing, set the
.i -p
(prefix) flag accordingly:
-.l(
+.(l
list -p.l
-.l)
+.)l
.p
To transparently pass an input line to troff,
prefix it with
.c \\\\! .
-(To disable this behavior, use the
+(The
.i -E
-flag.)
+flag disables this behavior.)