1 <?xml version="1.0" encoding="utf-8"?>
3 This file is part of groff, the GNU roff type-setting system.
5 Copyright (C) 2004-2014 Free Software Foundation, Inc.
6 Written by Peter Schaffter (peter@schaffter.ca).
8 Permission is granted to copy, distribute and/or modify this document
9 under the terms of the GNU Free Documentation License, Version 1.3 or
10 any later version published by the Free Software Foundation; with the
11 Invariant Sections being this comment section, with no Front-Cover
12 Texts, and with no Back-Cover Texts.
14 A copy of the Free Documentation License is included as a file called
15 FDL in the main directory of the groff source package.
18 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
19 <html xmlns="http://www.w3.org/1999/xhtml">
22 <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
23 <title>Mom -- Appendices</title>
24 <link rel="stylesheet" type="text/css" href="stylesheet.css" />
27 <body style="background-color: #f5faff;">
29 <!-- ==================================================================== -->
31 <div id="top" class="page">
33 <!-- Navigation links -->
34 <table style="width: 100%;">
36 <td><a href="toc.html">Back to Table of Contents</a></td>
40 <h1 id="appendices" class="docs">Appendices</h1>
42 <div style="width: 68%; margin: auto;">
43 <ul class="no-enumerator">
44 <li><a href="#fonts">Adding fonts to groff</a>
45 <ul style="margin-left: -.5em; list-style-type: disc">
46 <li><a href="#extending">Extending groff families / adding new families and fonts</a>
47 <ul style="margin-left: -.5em; list-style-type: circle">
48 <li><a href="#traditional">The traditional approach</a></li>
49 <li><a href="#simpler">The simpler way with mom</a></li>
51 <li><a href="#steps">Step-by-step instructions</a></li>
52 <li><a href="#install-font">Automate the whole process – the install-font script</a></li>
54 <li><a href="#codenotes">Some reflections on mom</a></li>
55 <li><a href="#contact">Contact the author</a></li>
59 <div class="rule-medium"><hr/></div>
61 <h2 id="fonts" class="docs">Adding fonts to groff</h2>
63 <div id="small-note" class="box-tip">
65 <kbd><prefix></kbd>, in this section, refers
66 to the directory in which groff is installed, typically
68 <span class="pre-in-pp">
71 (for distro-specific, pre-compiled groff packages) or
73 <span class="pre-in-pp">
74 /usr/local/share/groff/
76 (if you’ve built groff from source).
77 <p class="tip-bottom">
78 <kbd><version></kbd> refers to the groff version number, which
79 can be found, if necessary, by typing
81 <span class="pre-in-pp">
89 Groff comes with a small library of
90 <a href="definitions.html#family">families</a>
92 <a href="typesetting.html#family">FAMILY</a>
93 macro for a list). The families have four
94 <a href="definitions.html#font">fonts</a>
95 associated with them. These fonts are a combination of
96 <a href="definitions.html#weight">weight</a>
98 <a href="definitions.html#shape">shape</a>:
100 <span class="pre-in-pp">
101 R (Roman, usually Medium weight),
102 I (Italic, usually Medium weight),
103 B (Bold, usually Roman shape) and
106 If you work with mom a lot, sooner or later you’ll find that these
107 families and their associated fonts aren’t sufficient. You’ll
108 want to supplement them, either with more fonts for the families
109 already provided—<i>Damn! I need Helvetica Bold Condensed
110 Italic</i>—or with entire new families.
113 <h3 id="extending" class="docs">Extending groff families / adding new families and fonts</h3>
115 <h4 id="traditional" class="docs">The traditional approach</h4>
118 The traditional approach to extending groff families has been
119 to create new families for non-default weights and shapes (e.g.
120 <b>Light</b>, which is a
121 <a href="definitions.html#weight">weight</a>,
122 or <b>Condensed</b>, which is a
123 <a href="definitions.html#shape">shape</a>),
124 then to associate them with groff’s predefined <b>R,
125 I, B</b> and <b>BI</b> font styles. An example of this
126 can be seen in the groff PostScript font library itself, which is
129 <span class="pre-in-pp">
130 <prefix>/<version>/font/devps/
132 There’s one “family” for Helvetica (<b>HR</b>,
133 <b>HI</b>, <b>HB</b>, <b>HBI</b>) and another for Helvetica Narrow
134 (<b>HNR</b>, <b>HNI</b>, <b>HNB</b>, <b>HNBI</b>).
138 The difficulty with this approach is that typographers tend to
139 think of families as referring to the entire set of font weights
140 and shapes associated with a family name. For example, when
141 a typesetter says “the Helvetica family”, s/he is
142 including the weights Helvetica Thin, Helvetica Light, Helvetica
143 Regular, Helvetica Bold, Helvetica Heavy, etc, and all their
144 associated shapes (Roman, Italic, Condensed, Narrow, Extended,
149 Thus, intuitively, when a typesetter gives mom a
150 <kbd>.FAMILY H</kbd> directive, s/he reasonably expects that
151 any subsequent <kbd>.FT</kbd> directive will access the desired font
152 from the Helvetica family—without the need to state explicitly
153 both family and font to <kbd>.FT</kbd>, as it is explained one can
155 <a href="typesetting.html#family">FAMILY</a>
157 <a href="typesetting.html#font">FT</a>
158 sections of these documents.
162 If one had, say, Helvetica Light Roman and Helvetica Light Italic
163 as well as Helvetica Light Condensed Roman and Helvetica Light
164 Condensed Italic, the established groff approach would require two
165 “partial” families, <b>HL</b> (for Helvetica Light)
166 and <b>HLCD</b> (for Helvetica Light Condensed), with <b>R</b> and
167 <b>I</b> fonts for both:
169 <span class="pre-in-pp">
175 Accessing these family/font combos routinely
176 throughout a document would then require changing the family
177 (with <kbd>.FAMILY</kbd>) and selecting the desired font
178 (with <kbd>.FT R</kbd> or <kbd>.FT I</kbd>), or
179 passing <kbd>.FT</kbd> the lengthy family+fontname (.e.g.
180 <kbd>.FT HLCDI</kbd>).
183 <h4 id="simpler" class="docs">The simpler way with mom</h4>
186 Fortunately, groff provides a mechanism whereby it’s possible
187 to extend the basic <b>R</b>, <b>I</b>, <b>B</b> and <b>BI</b> fonts
188 (“styles” in groff-speak) so that one can, in fact,
189 create extensive type families, and access all the fonts in them
190 with <kbd>.ft</kbd> (groff) or <kbd>.FT</kbd> (mom).
194 Mom uses this mechanism to offer, in addition to groff’s
195 default font styles, the following:
198 <div class="examples-container" style="padding-bottom: 1em;">
199 <div id="style-extensions" style="width: 50%; float: left;">
200 <span class="pre" style="font-size: 85%">
202 ULI = Ultra Light Italic
203 ULCD = Ultra Light Condensed
204 ULCDI = Ultra Light Condensed Italic
205 ULEX = Ultra Light Extended
206 ULEXI = Ultra Light Extended Italic
209 XLI = Extra Light Italic
210 XLCD = Extra Light Condensed
211 XLCDI = Extra Light Condensed Italic
212 XLEX = Extra Light Extended
213 XLEXI = Extra Light Extended Italic
217 THCD = Thin Condensed
218 THCDI = Thin Condensed Italic
220 THEXI = Thin Extended Italic
224 LCD = Light Condensed
225 LCDI = Light Condensed Italic
227 LEXI = Light Extended Italic
231 BKCD = Book Condensed
232 BKCDI = Book Condensed Italic
234 BKEXI = Book Extended Italic
236 CD = Medium Condensed
237 CDI = Medium Condensed Italic
239 EXI = Medium Extended Italic
242 DBI = DemiBold Italic
243 DBCD = DemiBold Condensed
244 DBCDI = DemiBold Condensed Italic
245 DBEX = DemiBold Extended
246 DBEXI = DemiBold Extended Italic
249 SBI = SemiBold Italic
250 SBCD = SemiBold Condensed
251 SBCDI = SemiBold Condensed Italic
252 SBEX = SemiBold Extended
253 SBEXI = SemiBold Extended Italic
256 <span class="pre" style="font-size: 85%">
258 BCDI = Bold Condensed Italic
260 BEXI = Bold Extended Italic
264 XBI = Extra Bold Italic
265 XBCD = Extra Bold Condensed
266 XBCDI = Extra Bold Condensed Italic
267 XBEX = Extra Bold Extended
268 XBEXI = Extra Bold Extended Italic
271 UBI = Ultra Bold Italic
272 UBCD = Ultra Bold Condensed
273 UBCDI = Ultra Bold Condensed Italic
274 UBEX = Ultra Bold Extended
275 UBEXI = Ultra Bold Extended Italic
279 HVCD = Heavy Condensed
280 HVCDI = Heavy Condensed Italic
281 HVEX = Heavy Extended
282 HVEXI = Heavy Extended Italic
286 BLCD = Black Condensed
287 BLCDI = Black Condensed Italic
288 BLEX = Black Extended
289 BLEXI = Black Extended Italic
293 XBLI = Extra Black Italic
296 XBLEX = Extra Black Italic
297 XBLEXI = Extra Black Italic
300 UBLI = Ultra Black Italic
301 UBLCD = Ultra Black Condensed
302 UBLCDI = Ultra Black Condensed Italic
303 UBLEX = Ultra Black Exteneded
304 UBLEXI = Ultra Black Extended Italic
306 SC = Small Caps Roman
307 SCI = Small Caps Italic
308 SCDB = Small Caps Demibold
309 SCDBI = Small Caps Demibold Italic
310 SCSB = Small Caps Semibold
311 SCSBI = Small Caps Semibold Italic
315 <p style="clear: both;">
316 Thus, with mom, if you’ve installed some extra
317 Helvetica fonts and named them according to the convention
318 <kbd><F><S></kbd> (where <kbd><F></kbd> means
319 family and <kbd><S></kbd> means font style), once having
322 <span class="pre-in-pp" style="margin-bottom: -1em;">
325 you can access any of the extra Helvetica fonts simply by passing
326 the correct argument to
327 <a href="typesetting.html#font">FT</a>
328 from the list, above. For example, if you were working in Medium
329 Roman (<kbd>.FT R</kbd>) and you needed Medium Condensed Italic
330 for a while (assuming it’s installed), you’d just type
332 <span class="pre-in-pp" style="margin-bottom: -1em;">
335 to access the Medium Condensed Italic font from the Helvetica
340 Mom’s list of font styles doesn’t pretend to be
341 exhaustive. The extension names are arbitrary and can be used in a
342 flexible manner. For example, if you create a family that has a
343 Demibold font (<b>DB</b>) but no Bold font (<b>B</b>), you might
344 find it more convenient to give the Demibold font the extension
345 “<b>B</b>”.
348 <p id="register-style">
349 You may, at needs, want to add to mom’s list of font styles.
350 You can do this by editing the file, om.tmac (typical location:
351 <kbd><prefix>/<version>/tmac/om.tmac</kbd>). Near the
352 top, you’ll see lines of the form
354 <span class="pre-in-pp">
355 .sty \n[.fp] XL \" Extra Light
356 .sty \n[.fp] L \" Light Roman
357 .sty \n[.fp] LI \" Light Italic
358 .sty \n[.fp] LCD \" Light Condensed Roman
360 Simply add your new font style by imitating what you see, above,
361 and plugging in your new font style (having, of course,
362 added the font to groff, correctly named).
364 <a href="#steps">Step-by-step instructions</a>).
368 For example, if you already have some fonts from the Univers family
369 installed and have called the family <b>Univers</b>, you might decide at
370 some point to add the Bold Outline font (<b>UniversBO</b>). In which
371 case, you’d add
373 <span class="pre-in-pp">
374 .sty \n[.fp] BO \" Bold Outline
376 to the <kbd>.sty \n[.fp] <font style></kbd> list
380 <div class="box-tip">
382 <span class="note">Note:</span>
383 Mom’s font extensions are not “user-space”
384 controllable via a macro. If you’ve been using groff for
385 a long time, and have already rolled your own solution to adding
386 families and fonts to groff, you may find that mom’s font
387 extensions conflict with your own scheme. Should that be the case,
388 comment out the <kbd>.sty \n[.fp] <font style></kbd>
389 lines found near the top of the <kbd>om.tmac</kbd> file.
393 <div class="box-important">
395 <span class="important">Important:</span>
396 Be careful that any styles you add do not conflict with
397 <i>family</i> names that already exist. “<b>C</b>”,
398 for example, conflicts with the Courier family (<b>CR</b>,
399 <b>CI</b>, <b>CB</b>, <b>CI</b>). Were you to create a font
400 style “<b>C</b>”, thinking that <kbd>.FT C</kbd>
401 would give you access to font style once you’d given a
402 <kbd>.FAMILY</kbd> directive, you’d get a nasty surprise:
403 your type would come out in Courier Roman!
407 <div class="rule-medium"><hr/></div>
409 <h2 id="steps" class="docs">Step-by-step instructions</h2>
412 <ul class="no-enumerator" style="margin-left: -1.5em;">
413 <li><a href="#need">What you need before you start</a></li>
414 <li><a href="#preparation">Initial preparation</a></li>
415 <li><a href="#step-1">1. Acquire the font</a></li>
416 <li><a href="#step-2">2. Prepare to convert the font to the correct format</a>
417 <ul style="margin-left: -.5em">
418 <li><a href="#ttf">TTF fonts</a></li>
419 <li><a href="#type1">Type 1 fonts</a></li>
421 <li><a href="#step-3">3. Convert the font and put it in the right place</a></li>
422 <li><a href="#step-4">4. Update the download file</a>
423 <ul style="margin-left: -.5em">
424 <li><a href="#internal">Get the internal font name</a></li>
425 <li><a href="#add">Add the font to the download file</a></li>
426 <li><a href="#gropdf-download">Updating the gropdf download file</a></li>
428 <li><a href="#groff-font-names">Naming groff fonts</a>
429 <li><a href="#install-font">Automate the whole process – the install-font script</a>
436 There are a number of ways to approach making fonts available
437 to groff. These instructions aren’t meant to cover all
438 possibilities, merely one.
442 GNU/Linux distributions being what they are, directory locations
443 may differ and the presence of some executables can’t be
444 guaranteed. I run a Debian-based system. The instructions reflect
445 that. Users of other distros may have to interpret them according
446 to the way their distro operates.
449 <h3 id="need" class="docs appendices">What you need before you start</h3>
451 <ul style="margin-top: 1em; margin-left: -.5em;">
452 <li>groff, version 1.18 or higher<br/>
453 (Debian package: groff)
456 (Debian package: ghostscript or ghostscript-x)
459 (Debian package: fontforge)
463 <h3 id="preparation" class="docs appendices">Initial preparation (you only need do this once)</h3>
465 <ol id="site-font" style="margin-left: -1em;">
467 Locate the groff directory,
468 <kbd>site-font</kbd>. The exact location is
469 difficult to predict, owing to differences between distros and
470 whether you’re using a pre-packaged groff or have built
471 it from source. Some typical locations are:
473 <span class="pre-in-pp" style="margin-bottom: -2em;">
475 /usr/local/share/groff/
478 If you can’t find the site-font directory, locate
479 groff’s <kbd>site-tmac</kbd> directory, and, as root,
480 create site-font in the same directory. Eg, if you find
481 site-tmac in <kbd>/usr/share/groff/</kbd>, create site-font in
482 <kbd>/usr/share/groff/</kbd>
484 <span class="pre-in-pp" style="margin-bottom: -2em;">
489 Create two files, generate-t42.pe and generate-pfa.pe,
490 as you see them below. Place them in a convenient and
491 easily-remembered location, like your home directory.
493 <span class="examples" style="font-size: 95%; display: block; margin-top: .5em;">generate-t42.pe</span>
495 <div class="examples-container" style="margin-top: 0; margin-bottom: -1em; padding-bottom: 1em;">
500 Generate($fontname + ".pfa");
501 Generate($fontname + ".t42");
505 <span class="examples" style="font-size: 95%; display: block; margin-top: .5em;">generate-pfa.pe</span>
506 <div class="examples-container" style="margin-top: 0; padding-bottom: 1em;">
511 Generate($fontname + ".pfa");
517 <h3 id="step-1" class="docs appendices">Step 1: Acquire the font</h3>
520 The two most commonly available types of fonts are PostScript Type1
521 (extension .pfb) and TrueType (extension .ttf). Either can be made
522 available to groff. There are many websites holding collections of
526 <h3 id="step-2" class="docs appendices">Step 2: Prepare to convert the font to the correct format</h3>
529 Change into the directory holding the new font.
533 For convenience in the next step, make a symbolic link to
536 <span class="pre-in-pp">
537 ln -s <prefix>/<version>/font/devps/generate/textmap .
540 <a href="#small-note">here</a>
541 for an explanation of <prefix>
546 In addition, unless you're installing fonts from your home
547 directory, make links to the files 'generate-t42.pe' and
550 <span class="pre-in-pp">
551 ln -s $HOME/generate-t42.pe .
552 ln -s $HOME/generate-pfa.pe .
555 <h3 id="step-3" class="docs appendices">Step 3: Convert the font and put it in the right place</h3>
558 TrueType fonts (.ttf) need to be converted to .t42. Type 1 fonts
559 (.pfb) need to be converted to .pfa.
562 <h4 id="ttf" class="docs" style="font-size: 90%; text-transform: uppercase;"> • TTF Fonts</h4>
564 <p class="top" style="margin-top: .5em;">
567 <span class="pre-in-pp">
568 fontforge -script generate-t42.pe <file>.ttf
570 This will create three new files with the extensions .t42, .pfa, and
573 <span class="pre-in-pp">
574 afmtodit <afm file> textmap <groff font>
576 This will create a groff font with the name you give. (See
577 <a href="#groff-font-names">here</a>
578 for advice on naming groff fonts.)
582 Move the .t42 and groff font files to
583 <kbd><prefix>/site-font/devps/</kbd>.
587 If you're running a recent version of groff that includes
588 the native pdf device (gropdf), move the .pfa file to
589 <kbd><prefix>/<version>/font/devpdf/</kbd>. If not, you
590 may safely remove it. You may also safely remove the .afm file.
593 <h4 id="type1" class="docs" style="font-size: 90%; text-transform: uppercase;"> • Type1 Fonts</h4>
595 <p class="top" style="margin-top: .5em;">
598 <span class="pre-in-pp">
599 fontforge -script generate-pfa.pe <file>.ttf
601 This will create two new files with the extensions .pfa, and .afm.
604 <span class="pre-in-pp">
605 afmtodit <afm file> textmap <groff font>
607 Move the .pfa and groff font files to
608 <kbd><prefix>/<site-font>/devps/</kbd>.
610 <a href="#groff-font-names">here</a>
611 for advice on naming groff fonts.)
615 If you're running a recent version of groff that includes the
616 native pdf device (gropdf), link the .pfa and groff font files,
617 now in <kbd><prefix>/<site-font>/devps/</kbd>,
618 to the devpdf directory</kbd>. Start by changing into the
619 <kbd><prefix>/<version>/font/devpdf/</kbd> directory,
622 <span class="pre-in-pp">
623 ln -s <prefix>/<version>/font/devps/<file>.pfa .
624 ln -s <prefix>/<version>/font/devps/<groff font> .
626 You may safely remove the .afm file.
629 <h3 id="step-4" class="docs appendices">Step 4: Update the download file</h3>
631 <h4 id="internal" class="docs" style="font-size: 90%; text-transform: uppercase;"> • Get the internal font name</h4>
633 <p class="top" style="margin-top: .5em;">
634 Inspect your new groff font file. Near the top, you will see a line
637 <span class="pre-in-pp">
638 internalname <name>
640 Usually, the internal name is helpfully descriptive, eg,
642 <span class="pre-in-pp">
643 internalname Optima-Bold
645 Make a note of the internal name.
648 <h4 id="add" class="docs" style="font-size: 90%; text-transform: uppercase;"> • Add the font to the download file</h4>
650 <p class="top" style="margin-top: .5em;">
651 Open the file <kbd><prefix>/<version>/font/devps/download</kbd>.
652 In it you will see lines of the form
654 <span class="pre-in-pp">
655 Symbol-Slanted symbolsl.pfa
656 ZapfDingbats-Reverse zapfdr.pfa
657 FreeEuro freeeuro.pfa
659 where the spaces are the tab character from the keyboard, not
660 literal spaces. Thus,
662 <span class="pre-in-pp">
663 Symbol-Slanted symbolsl.pfa
667 <span class="pre-in-pp">
668 Symbol-Slanted<tab>symbolsl.pfa
673 The download file maps the internal names used by groff to the
674 actual fonts. To add your new font to the download file, append a
675 line containing the internal name, followed by a tab (make sure your
676 text editor is inserting the tab character, not spaces), followed by
677 the .t42 or .pfa font to which the internal name refers.
681 For example, if the internal name is Optima-Bold and the font is a
682 .pfa file called Optima-Bold.pfa, your updated download file will
685 <span class="pre-in-pp">
686 Optima-Bold<tab>Optima-Bold.pfa
690 <h4 id="gropdf-download" class="docs" style="font-size: 90%; text-transform: uppercase;"> • Updating the gropdf download file</h4>
692 <p class="top" style="margin-top: .5em;">
693 If you're running a recent version of groff that includes the
694 native pdf device (gropdf), you must update its download file as
695 well, which is found in <kbd><prefix>/<version>/font/devpdf/</kbd>.
696 The instructions are identical to those above, but with one important
697 difference: all lines must begin with a tab character. Thus, using
698 our Optima example, your devpdf download line for the same font is
700 <span class="pre-in-pp">
701 <tab>Optima-Bold<tab>Optima-Bold.pfa
705 <h3 id="groff-font-names" class="docs appendices">Naming groff fonts</h3>
708 For convenience when using mom, and to keep your font collection
709 organized, choose meaningful groff font names following the scheme
710 <Family><FONT>, where Family is something
711 like Optima or Univers or Clarendon, and FONT is either
713 <span style="display: block; margin-left: 2em;">
714 <kbd>R </kbd>(roman/regular)
716 <kbd>I </kbd>(italic)
718 <kbd>B </kbd>(bold)
720 <kbd>BI </kbd>(bold italic)
722 or one of the 1–5 character fontstyles listed
723 <a href="#style-extensions">here</a>.
724 Thus, for the fonts Optima Light Italic and Optima Extra Black, your font names would be
726 <span class="pre-in-pp">
730 This scheme allows you to enter <kbd>.FAMILY Optima</kbd> to make
731 Optima the current family, and <kbd>.FT LI</kbd> or <kbd>.FT XBL</kbd>
732 when you need the fonts Light Italic or Extra Black.
736 Groff font names are, in fact, arbitrary; you can call your fonts
737 anything you like, provided the
738 <a href="#internal">internal name</a>
740 <a href="#add">download file</a>
741 matches the internal name found in the groff font file. When
742 calling a font that does not follow the recommended naming convention,
743 you must pass the full font name to <kbd>.FT</kbd> whenever you wish
748 For example, the font, Goudy Stout, isn't really part of the
749 Goudy family, and while "stout" describes it, Stout is not a
750 recognized font style. Therefore, its groff name could simply be
751 GoudyStout, and whenever you needed it, you could call it with
752 <kbd>.FT GoudyStout</kbd>.
755 <h3 id="install-font" class="docs appendices">Automate the whole process – the install-font script</h3>
758 A bash script to make the entire process of installing fonts a
759 painless no-brainer has been posted online at
760 <a href="http://www.schaffter.ca/mom/install-font">http://www.schaffter.ca/mom/install-font</a>.
761 Be sure to make the script executable
762 (<kbd>chmod 755 install-font</kbd>)
763 after you download it, then type <kbd>./install-font -H</kbd> for
767 <div class="rule-medium" style="margin-top: 2em;"><hr/></div>
769 <!-- ===================================================================== -->
771 <h2 id="codenotes" class="docs">Some reflections on mom</h2>
774 If, as Eric Raymond asserts, open source begins with a programmer
775 scratching a personal itch, then mom can truly be called open
780 Mom had her origins in a library of groff routines I wrote over
781 the years to handle various aspects of typesetting and document
782 processing that weren’t adequately covered by ms, me, mm, and
783 friends. Typically, I’d use the library to cobble together
784 macro sets for new challenges as they came my way.
788 As a writer living in a perpetual state of penury, all the computers
789 I’ve ever owned have been hand-me-downs—several
790 generations out-of-date and resource challenged. Disk space has
791 always been an issue, as has processor speed and available RAM. One
792 of the reasons I run GNU/Linux rather than the offering from Redmond
793 is that it has helped enormously to get the most out of my poor
798 In Linux-land (all Unix variants, in fact), the choice of
799 typesetting systems basically comes down to groff or TeX. Both are
800 wonderful—monumental achievements if you ask me—and both
801 have their own particular strengths. However, for people in my
802 financial position (and there are millions of us around the globe,
803 in both developed and developing countries), TeX and groff have one
804 big difference: size. TeX is huge. Even its most ardent supporters
805 agree it suffers from bloat, on top of being complex and unwieldy to
806 manage. Groff is tiny by comparison, occupying minimal disk space
807 and having only a small memory footprint while at the same time
808 being flexible and powerful, typographically speaking. Back in the
809 Jurassic Period, I ran it successfully on a 386 with 8 megs of RAM
810 and a 250 meg hard disk.
814 However, groff has always had a liability: it’s incredibly geeky.
815 Owing to its very long history, it—and its power users
816 —seem to have remained stuck in a time warp. The canonical macro packages
817 still look as they did back in those decades when memory was exorbitantly
818 expensive and every byte mattered.
822 For some time now, groff users and macro writers have had the option
823 to use “long” names for macros (i.e. longer than two
824 letters, the original limit), yet have mostly chosen not to. With
825 long names, it’s possible to create macro sets that are
826 humanly readable and easy to interpret, encouraging development and
827 evolution. What’s more, the macros themselves need not be
828 terse, intimidating, and easily forgotten 1- or 2-letter commands
829 inserted in the body of a document. They can be sensible and
830 helpful to everyone, groff newbies and old hands alike.
834 Mom’s macro file, om.tmac, uses long names, aliases, and a
835 host of other groff goodies that have become part of the whole
836 groff picture under the unflagging guidance of groff’s
837 current maintainer, Werner Lemberg. The function of nearly
838 every macro, number register and string can be infered simply
839 from its name. The file is heavily commented. A consistent, if
840 idiosyncratic, indenting style is used as well, significantly
841 improving readability. Anyone wanting to futz around with
842 mom’s macros should be able to do so with a minimum of head
846 <div class="box-tip">
848 <span class="note">Note:</span>
849 The main macro file, <strong>om.tmac</strong>, is stripped of
850 comments when groff is built from sources. <strong>om.tmac</strong>,
851 in the sources themselves, still contains the comments, as do the
852 tarballs posted on mom’s homepage.
856 <div class="rule-medium"><hr/></div>
858 <!-- ===================================================================== -->
860 <h2 id="contact" class="docs">Contact the author</h2>
863 If you have any questions or comments about mom, suggestions to
864 make, criticisms to offer, or bugs to report, use the groff mailing
865 list (subscription information available
866 <a href="http://www.gnu.org/software/groff/groff.html">here</a>)
867 or contact me, Peter Schaffter, directly at the following
870 <span class="pre-in-pp">
871 peter@schaffter.ca
873 Please include the word “mom” or “groff” in
874 the Subject line of any message sent to my personal address or you
875 risk the wrath of my implacable spam filters.
879 If you want to visit mom’s website, you’ll find a link
882 <span class="pre-in-pp">
883 http://www.schaffter.ca
885 The site contains links to some of my fiction, all of which was
886 typeset with mom and groff.
889 <div class="rule-long"><hr/></div>
891 <!-- Navigation links -->
892 <table style="width: 100%; margin-top: 12px;">
894 <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
895 <td style="width: 100%; text-align: right;"><a href="#top">Top</a></td>
901 <div class="bottom-spacer"><br/></div>
905 <!-- vim: fileencoding=utf-8: nomodified: -->