diff options
Diffstat (limited to 'README.t')
-rw-r--r-- | README.t | 70 |
1 files changed, 36 insertions, 34 deletions
@@ -1,5 +1,5 @@ -.so g.tmac -.so gx.tmac +.so u.tmac +.so ux.tmac .so toc/toc.tmac .mediasize letter .fp 0 M DejaVuSansMono ttf @@ -69,7 +69,7 @@ . .\" start document .t -.x Mg , +.x µ , a simple macro package for troff .d John Ankarström @@ -87,7 +87,9 @@ John Ankarström . .he Introduction .p -.i Mg +.i µ +or +.i mu is a simple macro package for troff with the following features: .n 1 It is designed to be easy to understand and to customize @@ -100,13 +102,13 @@ It is designed to be practically easy to use. Macros consist of a single lowercase letter. .p While -.i mg +.i µ 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 mg +.i µ are encouraged to .n 1 a ) modify the source code @@ -116,19 +118,19 @@ use built-in troff requests for some things that other packages might provide custom macros for. .p All in all, -.i mg +.i µ 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 mg +.i µ are explained. The document itself also serves as a demonstration of -.i mg . +.i µ . With a couple of exceptions, it uses -.i mg 's +.i µ '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. @@ -137,7 +139,7 @@ in order to see how the macro package is used in practice. .he Environments .te .nr &env \n% .p -.i Mg +.i µ 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 @@ -149,7 +151,7 @@ keeps track of the document's font size in the register. For the font size of headings, it has yet another register. -.i Mg +.i µ has no such registers. If the user wishes to modify the default font size, he or she can simply switch to the relevant environment @@ -174,7 +176,7 @@ the default environment (0) is copied, meaning that all environment-relevant settings defined before the first macro call are applied to all -.i mg +.i µ environments. It is thus remarkably simple and intuitive to set, for example, the default font of a document: @@ -186,7 +188,7 @@ Document title First paragraph. .p In addition to the normal environment-relevant settings, -.i mg +.i µ manually associates a few special registers with the current environment: .n 1 .c sp , @@ -211,17 +213,17 @@ and do not support these registers. . .he External macros .p -.i Mg +.i µ defines a number of macros. Some of them are used internally by -.i mg +.i µ 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 mg . +.i µ . .se Inline macros .p There is a group of macros that provide @@ -245,9 +247,9 @@ italic font bold italic font .p For example, the following request outputs -.i mg .\(rq: \(lq +.i µ .\(rq: \(lq .l -\&.i mg . +\&.i µ . . .p Note that @@ -372,7 +374,7 @@ and .c ) are called at such a position that the collected footnotes cannot fit on the current page, -.i mg +.i µ will print the footnotes on the next page instead. .p The @@ -403,7 +405,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 mg +.i µ environments. For example: .l @@ -415,9 +417,9 @@ For example: . .he Internal macros .p -.i Mg 's +.i µ 's internal macros are generally not meant to be used outside of -.i g.tmac . +.i u.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]. @@ -433,7 +435,7 @@ and macros control the page header and footer. .p At document initialization, -.i mg +.i µ automatically creates traps for .c @th and @@ -448,7 +450,7 @@ and .c @t , which control the text and spacing of the header and footer. .p -.i Mg +.i µ will avoid creating a trap for .c @tf if any trap has already been set before document initialization. @@ -486,7 +488,7 @@ are equivalent to troff's and .c evc , but perform some extra work to keep track of -.i mg 's +.i µ 's special environment variables (see .i Environments , @@ -512,11 +514,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 mg +.i µ macros have been called, it will be correctly set for the entire document. This works because -.i mg 's +.i µ 's environments initially copy all their settings from 0, the default environment. .p @@ -526,7 +528,7 @@ at 9 points and a vertical spacing of 12 points, you would start the document like this (before you call any -.i mg +.i µ macros): .l \&.fam N @@ -605,7 +607,7 @@ To change the contents of the footer: Some macro packages have a concept of .q keeps , sections that are kept together across page breaks. -.i Mg +.i µ does not (at least yet) define any such macros by default. The simplest solution is to use troff's .c ne @@ -616,7 +618,7 @@ request: .p If you want to keep text of various styles together, you can use -.i mg 's +.i µ 's own .c w macro: @@ -641,7 +643,7 @@ Environments are a feature built into troff, accessed via the .c ev request, but because -.i mg +.i µ extends environments with additional functionality, it provides special macros to be used instead of .c ev : @@ -661,7 +663,7 @@ The .c @e macro can be used to activate any environment that supports -.i mg 's +.i µ 's extensions (see .i Environments , p. \n[&env]). @@ -683,7 +685,7 @@ and defines a corresponding macro: .se How do I include a table of contents in my document? .p Included with the -.i mg +.i µ distribution is a package called .i toc , which includes the following files: |