aboutsummaryrefslogtreecommitdiffstats
path: root/chapter08/groff.xml
blob: 3a4dc2c56af7ee13790cbfae3bd10b40e565e520 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../general.ent">
  %general-entities;
]>

<sect1 id="ch-system-groff" role="wrap">
  <?dbhtml filename="groff.html"?>

  <sect1info condition="script">
    <productname>groff</productname>
    <productnumber>&groff-version;</productnumber>
    <address>&groff-url;</address>
  </sect1info>

  <title>Groff-&groff-version;</title>

  <indexterm zone="ch-system-groff">
    <primary sortas="a-Groff">Groff</primary>
  </indexterm>

  <sect2 role="package">
    <title/>

    <para>The Groff package contains programs for processing and formatting
    text and images.</para>

    <segmentedlist>
      <segtitle>&buildtime;</segtitle>
      <segtitle>&diskspace;</segtitle>

      <seglistitem>
        <seg>&groff-fin-sbu;</seg>
        <seg>&groff-fin-du;</seg>
      </seglistitem>
    </segmentedlist>

  </sect2>

  <sect2 role="installation">
    <title>Installation of Groff</title>

    <para>Groff expects the environment variable <envar>PAGE</envar> to
    contain the default paper size. For users in the United States,
    <parameter>PAGE=letter</parameter> is appropriate. Elsewhere,
    <parameter>PAGE=A4</parameter> may be more suitable. While the default
    paper size is configured during compilation, it can be overridden later
    by echoing either <quote>A4</quote> or <quote>letter</quote> to the
    <filename>/etc/papersize</filename> file.</para>

    <para>Prepare Groff for compilation:</para>

<screen><userinput remap="configure">PAGE=<replaceable>&lt;paper_size&gt;</replaceable> ./configure --prefix=/usr</userinput></screen>

    <para>Build the package:</para>

<screen><userinput remap="make">make</userinput></screen>

    <para>To test the results, issue:</para>

<screen><userinput remap="test">make check</userinput></screen>

    <para>Install the package:</para>

<screen><userinput remap="install">make install</userinput></screen>

  </sect2>

  <sect2 id="contents-groff" role="content">
  <title>Contents of Groff</title>

    <segmentedlist>
      <segtitle>Installed programs</segtitle>
      <segtitle>Installed directories</segtitle>

      <seglistitem>
        <seg>addftinfo, afmtodit, chem, eqn, eqn2graph, gdiffmk, glilypond,
        gperl, gpinyin, grap2graph, grn, grodvi, groff, groffer, grog, grolbp,
        grolj4, gropdf, grops, grotty, hpftodit, indxbib, lkbib, lookbib,
        mmroff, neqn, nroff, pdfmom, pdfroff, pfbtops, pic, pic2graph,
        post-grohtml, preconv, pre-grohtml, refer, roff2dvi, roff2html,
        roff2pdf, roff2ps, roff2text, roff2x, soelim, tbl, tfmtodit, and
        troff</seg>
        <seg>/usr/lib/groff and /usr/share/doc/groff-&groff-version;,
        /usr/share/groff</seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="addftinfo">
        <term><command>addftinfo</command></term>
        <listitem>
          <para>Reads a troff font file and adds some additional font-metric
          information that is used by the <command>groff</command> system</para>
          <indexterm zone="ch-system-groff addftinfo">
            <primary sortas="b-addftinfo">addftinfo</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="afmtodit">
        <term><command>afmtodit</command></term>
        <listitem>
          <para>Creates a font file for use with <command>groff</command> and
          <command>grops</command></para>
          <indexterm zone="ch-system-groff afmtodit">
            <primary sortas="b-afmtodit">afmtodit</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="chem">
        <term><command>chem</command></term>
        <listitem>
          <para>Groff preprocessor for producing chemical structure diagrams</para>
          <indexterm zone="ch-system-groff chem">
            <primary sortas="b-chem">chem</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="eqn">
        <term><command>eqn</command></term>
        <listitem>
          <para>Compiles descriptions of equations embedded within troff
          input files into commands that are understood by
          <command>troff</command></para>
          <indexterm zone="ch-system-groff eqn">
            <primary sortas="b-eqn">eqn</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="eqn2graph">
        <term><command>eqn2graph</command></term>
        <listitem>
          <para>Converts a troff EQN (equation) into a cropped image</para>
          <indexterm zone="ch-system-groff eqn2graph">
            <primary sortas="b-eqn2graph">eqn2graph</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="gdiffmk">
        <term><command>gdiffmk</command></term>
        <listitem>
          <para>Marks differences between groff/nroff/troff files</para>
          <indexterm zone="ch-system-groff gdiffmk">
            <primary sortas="b-gdiffmk">gdiffmk</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="glilypond">
        <term><command>glilypond</command></term>
        <listitem>
          <para>Transforms sheet music written in the lilypond language into
          the groff language</para>
          <indexterm zone="ch-system-groff glilypond">
            <primary sortas="b-glilypond">glilypond</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="gperl">
        <term><command>gperl</command></term>
        <listitem>
          <para>Preprocessor for groff, allowing the insertion of perl code
          into groff files</para>
          <indexterm zone="ch-system-groff gperl">
            <primary sortas="b-gperl">gperl</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="gpinyin">
        <term><command>gpinyin</command></term>
        <listitem>
          <para>Preprocessor for groff, allowing the insertion of Pinyin
          (Mandarin Chinese spelled with the Roman alphabet) into groff files.</para>
          <indexterm zone="ch-system-groff gpinyin">
            <primary sortas="b-gpinyin">gpinyin</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grap2graph">
        <term><command>grap2graph</command></term>
        <listitem>
          <para>Converts a grap program file into a cropped bitmap image
          (grap is an old Unix programming language for creating diagrams)</para>
          <indexterm zone="ch-system-groff grap2graph">
            <primary sortas="b-grap2graph">grap2graph</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grn">
        <term><command>grn</command></term>
        <listitem>
          <para>A <command>groff</command> preprocessor for gremlin files</para>
          <indexterm zone="ch-system-groff grn">
            <primary sortas="b-grn">grn</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grodvi">
        <term><command>grodvi</command></term>
        <listitem>
          <para>A driver for <command>groff</command> that produces TeX dvi
          format output files</para>
          <indexterm zone="ch-system-groff grodvi">
            <primary sortas="b-grodvi">grodvi</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="groff">
        <term><command>groff</command></term>
        <listitem>
          <para>A front end to the groff document formatting system; normally, it
          runs the <command>troff</command> program and a post-processor
          appropriate for the selected device</para>
          <indexterm zone="ch-system-groff groff">
            <primary sortas="b-groff">groff</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="groffer">
        <term><command>groffer</command></term>
        <listitem>
          <para>Displays groff files and man pages on X and tty terminals</para>
          <indexterm zone="ch-system-groff groffer">
            <primary sortas="b-groffer">groffer</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grog">
        <term><command>grog</command></term>
        <listitem>
          <para>Reads files and guesses which of the <command>groff</command>
          options <option>-e</option>, <option>-man</option>, <option>-me</option>,
          <option>-mm</option>, <option>-ms</option>, <option>-p</option>,
          <option>-s</option>, and <option>-t</option> are required for printing
          files, and reports the <command>groff</command> command including those
          options</para>
          <indexterm zone="ch-system-groff grog">
            <primary sortas="b-grog">grog</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grolbp">
        <term><command>grolbp</command></term>
        <listitem>
          <para>Is a <command>groff</command> driver for Canon CAPSL printers
          (LBP-4 and LBP-8 series laser printers)</para>
          <indexterm zone="ch-system-groff grolbp">
            <primary sortas="b-grolbp">grolbp</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grolj4">
        <term><command>grolj4</command></term>
        <listitem>
          <para>Is a driver for <command>groff</command> that produces output
          in PCL5 format suitable for an HP LaserJet 4 printer</para>
          <indexterm zone="ch-system-groff grolj4">
            <primary sortas="b-grolj4">grolj4</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="gropdf">
        <term><command>gropdf</command></term>
        <listitem>
          <para>Translates the output of GNU <command>troff</command> to
          PDF</para>
          <indexterm zone="ch-system-groff gropdf">
            <primary sortas="b-gropdf">gropdf</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grops">
        <term><command>grops</command></term>
        <listitem>
          <para>Translates the output of GNU <command>troff</command> to
          PostScript</para>
          <indexterm zone="ch-system-groff grops">
            <primary sortas="b-grops">grops</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grotty">
        <term><command>grotty</command></term>
        <listitem>
          <para>Translates the output of GNU <command>troff</command> into
          a form suitable for typewriter-like devices</para>
          <indexterm zone="ch-system-groff grotty">
            <primary sortas="b-grotty">grotty</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="hpftodit">
        <term><command>hpftodit</command></term>
        <listitem>
          <para>Creates a font file for use with <command>groff -Tlj4</command>
          from an HP-tagged font metric file</para>
          <indexterm zone="ch-system-groff hpftodit">
            <primary sortas="b-hpftodit">hpftodit</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="indxbib">
        <term><command>indxbib</command></term>
        <listitem>
          <para>Creates an inverted index for the bibliographic databases with a
          specified file for use with <command>refer</command>,
          <command>lookbib</command>, and <command>lkbib</command></para>
          <indexterm zone="ch-system-groff indxbib">
            <primary sortas="b-indxbib">indxbib</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="lkbib">
        <term><command>lkbib</command></term>
        <listitem>
          <para>Searches bibliographic databases for references that contain
          specified keys and reports any references found</para>
          <indexterm zone="ch-system-groff lkbib">
            <primary sortas="b-lkbib">lkbib</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="lookbib">
        <term><command>lookbib</command></term>
        <listitem>
          <para>Prints a prompt on the standard error (unless the standard input
          is not a terminal), reads a line containing a set of keywords from the
          standard input, searches the bibliographic databases in a specified file
          for references containing those keywords, prints any references found
          on the standard output, and repeats this process until the end of
          input</para>
          <indexterm zone="ch-system-groff lookbib">
            <primary sortas="b-lookbib">lookbib</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="mmroff">
        <term><command>mmroff</command></term>
        <listitem>
          <para>A simple preprocessor for <command>groff</command></para>
          <indexterm zone="ch-system-groff mmroff">
            <primary sortas="b-mmroff">mmroff</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="neqn">
        <term><command>neqn</command></term>
        <listitem>
          <para>Formats equations for American Standard Code for Information
          Interchange (ASCII) output</para>
          <indexterm zone="ch-system-groff neqn">
            <primary sortas="b-neqn">neqn</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="nroff">
        <term><command>nroff</command></term>
        <listitem>
          <para>A script that emulates the <command>nroff</command> command
          using <command>groff</command></para>
          <indexterm zone="ch-system-groff nroff">
            <primary sortas="b-nroff">nroff</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pdfmom">
        <term><command>pdfmom</command></term>
        <listitem>
          <para>Is a wrapper around groff that facilitates the production of PDF
          documents from files formatted with the mom macros.</para>
          <indexterm zone="ch-system-groff pdfmom">
            <primary sortas="b-pdfmom">pdfmom</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pdfroff">
        <term><command>pdfroff</command></term>
        <listitem>
          <para>Creates pdf documents using groff</para>
          <indexterm zone="ch-system-groff pdfroff">
            <primary sortas="b-pdfroff">pdfroff</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pfbtops">
        <term><command>pfbtops</command></term>
        <listitem>
          <para>Translates a PostScript font in <filename
          class="extension">.pfb</filename> format to ASCII</para>
          <indexterm zone="ch-system-groff pfbtops">
            <primary sortas="b-pfbtops">pfbtops</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pic">
        <term><command>pic</command></term>
        <listitem>
          <para>Compiles descriptions of pictures embedded within troff or
          TeX input files into commands understood by TeX or
          <command>troff</command></para>
          <indexterm zone="ch-system-groff pic">
            <primary sortas="b-pic">pic</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pic2graph">
        <term><command>pic2graph</command></term>
        <listitem>
          <para>Converts a PIC diagram into a cropped image</para>
          <indexterm zone="ch-system-groff pic2graph">
            <primary sortas="b-pic2graph">pic2graph</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="post-grohtml">
        <term><command>post-grohtml</command></term>
        <listitem>
          <para>Translates the output of GNU <command>troff</command> to
          HTML</para>
          <indexterm zone="ch-system-groff post-grohtml">
            <primary sortas="b-post-grohtml">post-grohtml</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="preconv">
        <term><command>preconv</command></term>
        <listitem>
          <para>Converts encoding of input files to something GNU
          <command>troff</command> understands</para>
          <indexterm zone="ch-system-groff preconv">
            <primary sortas="b-preconv">preconv</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pre-grohtml">
        <term><command>pre-grohtml </command></term>
        <listitem>
          <para>Translates the output of GNU <command>troff</command> to
          HTML</para>
          <indexterm zone="ch-system-groff pre-grohtml">
            <primary sortas="b-pre-grohtml">pre-grohtml</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="refer">
        <term><command>refer</command></term>
        <listitem>
          <para>Copies the contents of a file to the standard output, except
          that lines between <emphasis>.[</emphasis> and <emphasis>.]</emphasis>
          are interpreted as citations, and lines between <emphasis>.R1</emphasis>
          and <emphasis>.R2</emphasis> are interpreted as commands for how
          citations are to be processed</para>
          <indexterm zone="ch-system-groff refer">
            <primary sortas="b-refer">refer</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="roff2dvi">
        <term><command>roff2dvi</command></term>
        <listitem>
          <para>Transforms roff files into DVI format</para>
          <indexterm zone="ch-system-groff roff2dvi">
            <primary sortas="b-roff2dvi">roff2dvi</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="roff2html">
        <term><command>roff2html</command></term>
        <listitem>
          <para>Transforms roff files into HTML format</para>
          <indexterm zone="ch-system-groff roff2html">
            <primary sortas="b-roff2html">roff2html</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="roff2pdf">
        <term><command>roff2pdf</command></term>
        <listitem>
          <para>Transforms roff files into PDFs</para>
          <indexterm zone="ch-system-groff roff2pdf">
            <primary sortas="b-roff2pdf">roff2pdf</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="roff2ps">
        <term><command>roff2ps</command></term>
        <listitem>
          <para>Transforms roff files into ps files</para>
          <indexterm zone="ch-system-groff roff2ps">
            <primary sortas="b-roff2ps">roff2ps</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="roff2text">
        <term><command>roff2text</command></term>
        <listitem>
          <para>Transforms roff files into text files</para>
          <indexterm zone="ch-system-groff roff2text">
            <primary sortas="b-roff2text">roff2text</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="roff2x">
        <term><command>roff2x</command></term>
        <listitem>
          <para>Transforms roff files into other formats</para>
          <indexterm zone="ch-system-groff roff2x">
            <primary sortas="b-roff2x">roff2x</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="soelim">
        <term><command>soelim</command></term>
        <listitem>
          <para>Reads files and replaces lines of the form <emphasis>.so
          file</emphasis> by the contents of the mentioned
          <emphasis>file</emphasis></para>
          <indexterm zone="ch-system-groff soelim">
            <primary sortas="b-soelim">soelim</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="tbl">
        <term><command>tbl</command></term>
        <listitem>
          <para>Compiles descriptions of tables embedded within troff input
          files into commands that are understood by
          <command>troff</command></para>
          <indexterm zone="ch-system-groff tbl">
            <primary sortas="b-tbl">tbl</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="tfmtodit">
        <term><command>tfmtodit</command></term>
        <listitem>
          <para>Creates a font file for use with <command>groff
          -Tdvi</command></para>
          <indexterm zone="ch-system-groff tfmtodit">
            <primary sortas="b-tfmtodit">tfmtodit</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="troff">
        <term><command>troff</command></term>
        <listitem>
          <para>Is highly compatible with Unix <command>troff</command>; it
          should usually be invoked using the <command>groff</command> command,
          which will also run preprocessors and post-processors in the
          appropriate order and with the appropriate options</para>
          <indexterm zone="ch-system-groff troff">
            <primary sortas="b-troff">troff</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>