aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HACKING.pdfbin24518 -> 24407 bytes
-rw-r--r--HACKING.t28
-rw-r--r--Makefile10
-rw-r--r--README8
-rw-r--r--README.pdfbin63686 -> 63464 bytes
-rw-r--r--README.t72
-rw-r--r--k.tmac (renamed from u.tmac)0
-rw-r--r--kx.tmac (renamed from ux.tmac)0
-rw-r--r--toc/README.t4
9 files changed, 61 insertions, 61 deletions
diff --git a/HACKING.pdf b/HACKING.pdf
index a7da708..33ca978 100644
--- a/HACKING.pdf
+++ b/HACKING.pdf
Binary files differ
diff --git a/HACKING.t b/HACKING.t
index 10d2a31..9084dd3 100644
--- a/HACKING.t
+++ b/HACKING.t
@@ -1,4 +1,4 @@
-.so u.tmac
+.so k.tmac
.
.de @h
. sp |36p
@@ -12,7 +12,7 @@
.
.t
Hacking on the
-.x µ
+.x mk
macro package
.d
John Ankarström
@@ -20,9 +20,9 @@ John Ankarström
.
.h
What is
-.x µ ?
+.x mk ?
.p
-.i µ
+.i Mk
or
.i mu
is a simple macro package for troff
@@ -33,23 +33,23 @@ writing advanced documents.
.
.h
How is the source code of
-.x µ
+.x mk
organized?
.p
If you run
.c "grep -n [-]-"
on the
-.i u.tmac
+.i k.tmac
source file, you are presented with an overview of
-.i µ 's
+.i mk 's
macros:
.l
.eo
-!grep -n [-]- u.tmac
+!grep -n [-]- k.tmac
.ec
.p
This is a sufficient summary of the entire
-.i µ
+.i mk
source code, as nothing is performed outside of these macros.
All initialization is performed in the
.c @a
@@ -57,12 +57,12 @@ macro, which is automatically called at the first invocation
of any other macro.
.p
The above summary reflects a categorization in the macros defined by
-.i µ .
+.i mk .
There are internal and external macros.
The former are to be used within
-.i u.tmac
+.i k.tmac
itself, while the latter are to be used in
-.i µ
+.i mk
documents.
Among the external macros, there are inline, environment (or block-level)
and other macros.
@@ -90,7 +90,7 @@ Where is document state stored?
.p
Most state is stored by troff itself within the different environments.
In addition,
-.i µ
+.i mk
associates three extra registers with each environment:
.c sp ,
the amount of space to be added by
@@ -158,5 +158,5 @@ contains the total number of collected footnotes.
.p
Note that none of these registers and strings should be
directly accessed or modified by
-.i µ
+.i mk
documents.
diff --git a/Makefile b/Makefile
index 8d132db..0c59a31 100644
--- a/Makefile
+++ b/Makefile
@@ -8,14 +8,16 @@ PDFROFF ?= troff | dpost | ps2pdf -
all: README.pdf HACKING.pdf
install:
- install -m 644 u.tmac t/toc.tmac $(TMACDIR)
+ install -m 644 k.tmac t/toc.tmac $(TMACDIR)
install -m 644 toc/toc.1 list/list.1 $(MANDIR)/man1
install toc/toc list/list $(BINDIR)
-HACKING.pdf: HACKING.t u.tmac
+HACKING.pdf: HACKING.t k.tmac
perl -pe '$$_=`$$_` if s/^\!//' HACKING.t |\
+ LC_ALL=en_US.UTF-8\
$(PDFROFF) > HACKING.pdf
-README.pdf: README.t u.tmac
- TROFFONTS=/usr/pkg/share/fonts/X11/TTF/ \
+README.pdf: README.t k.tmac
+ TROFFONTS=/usr/pkg/share/fonts/X11/TTF/\
+ LC_ALL=en_US.UTF-8\
<README.t toc/toc list/list -p.l \| $(PDFROFF) > README.pdf
diff --git a/README b/README
index 392d2c8..c124f46 100644
--- a/README
+++ b/README
@@ -2,7 +2,7 @@
This repository can be divided into three parts:
- * mu (top directory)
+ * mk (top directory)
* toc
* list
@@ -11,11 +11,11 @@ TMACDIR, BINDIR and MANDIR before installing.
--- Summary ---
-* Mu is a simple and modern troff macro package. It is divided
+* Mk is a simple and modern troff macro package. It is divided
into two files:
- u.tmac -- base macros
- ux.tmac -- extra macros (optional)
+ k.tmac -- base macros
+ kx.tmac -- extra macros (optional)
* Toc provides a simple method of creating forward references, such
as tables of contents, in troff documents. It consists of a
diff --git a/README.pdf b/README.pdf
index 4b99ea5..e01f88c 100644
--- a/README.pdf
+++ b/README.pdf
Binary files differ
diff --git a/README.t b/README.t
index 3c6c2be..c264db6 100644
--- a/README.t
+++ b/README.t
@@ -1,5 +1,5 @@
-.so u.tmac
-.so ux.tmac
+.so k.tmac
+.so kx.tmac
.so toc/toc.tmac
.mediasize letter
.fp 0 M DejaVuSansMono ttf
@@ -60,7 +60,7 @@
.
.\" start document
.t
-.x µ ,
+.x Mk ,
a simple macro package for troff
.d
John Ankarström
@@ -78,9 +78,7 @@ John Ankarström
.
.he Introduction
.p
-.i µ
-or
-.i mu
+.i Mk
is a simple macro package for troff with the following features:
.n 1
It is designed to be easy to understand and to customize
@@ -93,13 +91,13 @@ It is designed to be practically easy to use.
Macros consist of a single lowercase letter.
.p
While
-.i µ
+.i mk
does provide macros for many common tasks,
including footnotes,
it is at the end of the day an idiosyncratic macro package,
written to serve the author's personal needs.
Users of
-.i µ
+.i mk
are encouraged to
.n 1 a )
modify the source code
@@ -109,19 +107,19 @@ use built-in troff requests for some things
that other packages might provide custom macros for.
.p
All in all,
-.i µ
+.i mk
aspires to abstract as little as possible
from the underlying troff requests and registers.
In its author's humble opinion,
it is the ideal macro package for learning troff.
.p
In this document, the fundamental concepts of
-.i µ
+.i mk
are explained.
The document itself also serves as a demonstration of
-.i µ .
+.i mk .
With a couple of exceptions, it uses
-.i µ 's
+.i mk 's
default settings.
The reader is encouraged to inspect the document's source code
in order to see how the macro package is used in practice.
@@ -133,7 +131,7 @@ See p. \n[&toc] for more information.
.he Environments
.te .nr &env \n%
.p
-.i µ
+.i Mk
makes heavy use of named environments,
supported by implementations such as GNU troff, Heirloom troff and Neatroff.
Environments obliviate the need for many special registers
@@ -145,7 +143,7 @@ keeps track of the document's font size in the
register.
For the font size of headings,
it has yet another register.
-.i µ
+.i mk
has no such registers.
If the user wishes to modify the default font size,
he or she can simply switch to the relevant environment
@@ -171,7 +169,7 @@ the default environment (0) is copied,
meaning that all environment-relevant settings
defined before the first macro call
are applied to all
-.i µ
+.i mk
environments.
It is thus remarkably simple and intuitive to set,
for example, the default font of a document:
@@ -184,7 +182,7 @@ First paragraph.
.l)
.p
In addition to the normal environment-relevant settings,
-.i µ
+.i mk
manually associates a few special registers with the current environment:
.n 1
.c sp ,
@@ -209,17 +207,17 @@ and do not support these registers.
.
.he External macros
.p
-.i µ
+.i Mk
defines a number of macros.
Some of them are used internally by
-.i µ
+.i mk
itself;
these carry an at
.c @ ) (
prefix
and are going to be explored later.
For now, we will focus on the external macros provided by
-.i µ .
+.i mk .
.
.se Inline macros
.p
@@ -248,9 +246,9 @@ italic font
bold italic font
.p
For example, the following request outputs
-.i µ .\(rq: \(lq
+.i mk .\(rq: \(lq
.l(
-.i µ .
+.i mk .
.l)
.
.p
@@ -377,7 +375,7 @@ and
.c )
are called at such a position that the collected footnotes
cannot fit on the current page,
-.i µ
+.i mk
will print the footnotes on the next page instead.
.p
The
@@ -394,7 +392,7 @@ which takes an exact amount of space as its argument,
takes a declarative specification
describing the amount of desired space
in terms of
-.i µ
+.i mk
environments.
For example:
.l(
@@ -407,9 +405,9 @@ For example:
.
.he Internal macros
.p
-.i µ 's
+.i Mk
internal macros are generally not meant to be used outside of
-.i u.tmac .
+.i k.tmac .
Documented in this section are the exceptions to this rule.
For examples of how these macros are used in practice,
see the FAQ section on page \n[&faq].
@@ -425,7 +423,7 @@ and
macros control the page header and footer.
.p
At document initialization,
-.i µ
+.i mk
automatically creates traps for
.c @th
and
@@ -440,7 +438,7 @@ and
.c @t ,
which control the text and spacing of the header and footer.
.p
-.i µ
+.i Mk
will avoid creating a trap for
.c @tf
if any trap has already been set before document initialization.
@@ -478,7 +476,7 @@ are equivalent to troff's
and
.c evc ,
but perform some extra work to keep track of
-.i µ 's
+.i mk 's
special environment variables
(see
.i Environments ,
@@ -504,11 +502,11 @@ in the full GNU troff manual
are configured with the standard troff requests.
If you set the point size at the beginning of the document,
before any
-.i µ
+.i mk
macros have been called,
it will be correctly set for the entire document.
This works because
-.i µ 's
+.i mk 's
environments initially copy all their settings from 0,
the default environment.
.p
@@ -518,7 +516,7 @@ at 9 points
and a vertical spacing of 12 points,
you would start the document like this
(before you call any
-.i µ
+.i mk
macros):
.l(
.fam N
@@ -606,7 +604,7 @@ Environments are a feature built into troff,
accessed via the
.c ev
request, but because
-.i µ
+.i mk
extends environments with additional functionality,
it provides special macros to be used instead of
.c ev :
@@ -626,7 +624,7 @@ The
.c @e
macro
can be used to activate any environment that supports
-.i µ 's
+.i mk 's
extensions (see
.i Environments ,
p. \n[&env]).
@@ -651,7 +649,7 @@ and defines a corresponding macro:
Some macro packages have a concept of
." keeps ,
sections that are kept together across page breaks.
-.i µ
+.i Mk
does not (at least yet) define any such macros by default.
The simplest solution is to use troff's
.c ne
@@ -663,7 +661,7 @@ request:
.p
If you want to keep text of various styles together,
you can use
-.i µ 's
+.i mk 's
own
.c w
macro:
@@ -736,7 +734,7 @@ to translate backticks and apostrophes accordingly:
.te .nr &toc \n%
.p
Included with the
-.i µ
+.i mk
distribution is a package called
.i toc ,
which includes the following files:
@@ -838,7 +836,7 @@ See page \n[&refname].
.se How do I include source code without needing to escape it?
.p
The
-.i µ
+.i mk
distribution includes a troff preprocessor called
.i list ,
which filters text delimited by
diff --git a/u.tmac b/k.tmac
index 2091474..2091474 100644
--- a/u.tmac
+++ b/k.tmac
diff --git a/ux.tmac b/kx.tmac
index 2b75f6d..2b75f6d 100644
--- a/ux.tmac
+++ b/kx.tmac
diff --git a/toc/README.t b/toc/README.t
index f4d9687..919b300 100644
--- a/toc/README.t
+++ b/toc/README.t
@@ -1,5 +1,5 @@
-.so ../u.tmac
-.so ../ux.tmac
+.so ../k.tmac
+.so ../kx.tmac
.so toc.tmac
.
.t