diff options
Diffstat (limited to 'example.t')
-rw-r--r-- | example.t | 51 |
1 files changed, 42 insertions, 9 deletions
@@ -1,26 +1,26 @@ .so g.tmac -.s +.p +.ta 3n +3n +3n +3n .t .x Mg , a simple macro package for troff .n John Ankarstr\[u00F6]m .d +.h +Introduction .p .i Mg is a simple macro package for troff with the following features: .p -1. -It is designed to be easy to understand and to customize +1. It is designed to be easy to understand and to customize by editing the source code. .p -2. -It makes use of the extended support for environments +2. It makes use of the extended support for environments offered by many modern troff implementations (but it can be made compatible with the original troff if need be). .p -3. -It is designed to be practically easy to use. +3. It is designed to be practically easy to use. Macros are consistently one letter long and written in lowercase. .p While @@ -33,7 +33,7 @@ Users of .i mg are encouraged to modify the source code according to their own needs. -.h +.s Internal design .p .i Mg @@ -52,4 +52,37 @@ simply sets the font size inside the environment named If the user wishes to modify the default font size, he or she can simply switch to the .i p -environment and set the font size as desired. +environment and set the font size as desired: +.c +.eo +.cc , +.\" set heading font +.h +.fam H +.ps +1p +,cc +.ec +.p +The environments are initialized +as soon as the first +.q block-level +macro is called. +At the initialization of each environment, +the default environment (0) is copied, +meaning that all environment-relevant settings +defined before the first macro call +are applied to all +.i mg +environments. +It is thus remarkably simple and intuitive to set, +for example, the default font of a document: +.c +.cc , +.fam N +.t +Document title +.p +First paragraph. +,cc +.p +\&... |