Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / groff / doc / groff-2
1 This is groff, produced by makeinfo version 4.2 from ./groff.texinfo.
2
3 This manual documents GNU `troff' version 1.18.
4
5    Copyright (C) 1994-2000, 2001, 2002 Free Software Foundation, Inc.
6
7      Permission is granted to copy, distribute and/or modify this
8      document under the terms of the GNU Free Documentation License,
9      Version 1.1 or any later version published by the Free Software
10      Foundation; with no Invariant Sections, with the Front-Cover texts
11      being `A GNU Manual," and with the Back-Cover Texts as in (a)
12      below.  A copy of the license is included in the section entitled
13      `GNU Free Documentation License."
14
15      (a) The FSF's Back-Cover Text is: `You have freedom to copy and
16      modify this GNU Manual, like GNU software.  Copies published by
17      the Free Software Foundation raise funds for GNU development."
18    
19 INFO-DIR-SECTION Miscellaneous
20 START-INFO-DIR-ENTRY
21 * Groff: (groff).               The GNU troff document formatting system.
22 END-INFO-DIR-ENTRY
23
24 \1f
25 File: groff,  Node: Man usage,  Next: Man font macros,  Prev: Man options,  Up: man
26
27 Usage
28 -----
29
30    This section describes the available macros for manual pages.  For
31 further customization, put additional macros and requests into the file
32 `man.local' which is loaded immediately after the `man' package.
33
34  - Macro: .TH title section [extra1 [extra2 [extra3]]]
35      Set the title of the man page to TITLE and the section to SECTION,
36      which must have a value between 1 and 8.  The value of SECTION may
37      also have a string appended, e.g. `.pm', to indicate a specific
38      subsection of the man pages.
39
40      Both TITLE and SECTION are positioned at the left and right in the
41      header line (with SECTION in parentheses immediately appended to
42      TITLE.  EXTRA1 is positioned in the middle of the footer line.
43      EXTRA2 is positioned at the left in the footer line (or at the
44      left on even pages and at the right on odd pages if double-sided
45      printing is active).  EXTRA3 is centered in the header line.
46
47      For HTML output, headers and footers are completely suppressed.
48
49      Additionally, this macro starts a new page; the new line number
50      is 1 again (except if the `-rC1' option is given on the command
51      line) - this feature is intended only for formatting multiple man
52      pages; a single man page should contain exactly one `TH' macro at
53      the beginning of the file.
54
55  - Macro: .SH [heading]
56      Set up an unnumbered section heading sticking out to the left.
57      Prints out all the text following `SH' up to the end of the line
58      (or the text in the next line if there is no argument to `SH') in
59      bold face, one size larger than the base document size.
60      Additionally, the left margin for the following text is reset to
61      its default value.
62
63  - Macro: .SS [heading]
64      Set up an unnumbered (sub)section heading.  Prints out all the text
65      following `SS' up to the end of the line (or the text in the next
66      line if there is no argument to `SS') in bold face, at the same
67      size as the base document size.  Additionally, the left margin for
68      the following text is reset to its default value.
69
70  - Macro: .TP [nnn]
71      Set up an indented paragraph with label.  The indentation is set to
72      NNN if that argument is supplied (the default unit is `n' if
73      omitted), otherwise it is set to the default indentation value.
74
75      The first line of text following this macro is interpreted as a
76      string to be printed flush-left, as it is appropriate for a label.
77      It is not interpreted as part of a paragraph, so there is no
78      attempt to fill the first line with text from the following input
79      lines.  Nevertheless, if the label is not as wide as the
80      indentation, then the paragraph starts at the same line (but
81      indented), continuing on the following lines.  If the label is
82      wider than the indentation, then the descriptive part of the
83      paragraph begins on the line following the label, entirely
84      indented.  Note that neither font shape nor font size of the label
85      is set to a default value; on the other hand, the rest of the text
86      has default font settings.
87
88  - Macro: .LP
89  - Macro: .PP
90  - Macro: .P
91      These macros are mutual aliases.  Any of them causes a line break
92      at the current position, followed by a vertical space downwards by
93      the amount specified by the `PD' macro.  The font size and shape
94      are reset to the default value (10pt roman if no `-rS' option is
95      given on the command line).  Finally, the current left margin is
96      restored.
97
98  - Macro: .IP [designator [nnn]]
99      Set up an indented paragraph, using DESIGNATOR as a tag to mark
100      its beginning.  The indentation is set to NNN if that argument is
101      supplied (default unit is `n'), otherwise the default indentation
102      value is used.  Font size and face of the paragraph (but not the
103      designator) are reset to their default values.  To start an
104      indented paragraph with a particular indentation but without a
105      designator, use `""' (two double quotes) as the first argument of
106      `IP'.
107
108      For example, to start a paragraph with bullets as the designator
109      and 4 en indentation, write
110
111
112           .IP \(bu 4
113
114
115  - Macro: .HP [nnn]
116      Set up a paragraph with hanging left indentation.  The indentation
117      is set to NNN if that argument is supplied (default unit is `n'),
118      otherwise the default indentation value is used.  Font size and
119      face are reset to their default values.
120
121  - Macro: .RS [nnn]
122      Move the left margin to the right by the value NNN if specified
123      (default unit is `n'); otherwise the default indentation value is
124      used.  Calls to the `RS' macro can be nested.
125
126  - Macro: .RE [nnn]
127      Move the left margin back to level NNN; if no argument is given,
128      it moves one level back.  The first level (i.e., no call to `RS'
129      yet) has number 1, and each call to `RS' increases the level by 1.
130
131    To summarize, the following macros cause a line break with the
132 insertion of vertical space (which amount can be changed with the `PD'
133 macro): `SH', `SS', `TP', `LP' (`PP', `P'), `IP', and `HP'.
134
135    The macros `RS' and `RE' also cause a break but do not insert
136 vertical space.
137
138    Finally, the macros `SH', `SS', `LP' (`PP', `P'), and `RS' reset the
139 indentation to its default value.
140
141 \1f
142 File: groff,  Node: Man font macros,  Next: Miscellaneous man macros,  Prev: Man usage,  Up: man
143
144 Macros to set fonts
145 -------------------
146
147    The standard font is roman; the default text size is 10 point.  If
148 command line option `-rS=N' is given, use Npt as the default text size.
149
150  - Macro: .SM [text]
151      Set the text on the same line or the text on the next line in a
152      font that is one point size smaller than the default font.
153
154  - Macro: .SB [text]
155      Set the text on the same line or the text on the next line in bold
156      face font, one point size smaller than the default font.
157
158  - Macro: .BI text
159      Set its arguments alternately in bold face and italic.  Thus,
160
161
162           .BI this "word and" that
163
164      would set "this" and "that" in bold face, and "word and" in
165      italics.
166
167  - Macro: .IB text
168      Set its arguments alternately in italic and bold face.
169
170  - Macro: .RI text
171      Set its arguments alternately in roman and italic.
172
173  - Macro: .IR text
174      Set its arguments alternately in italic and roman.
175
176  - Macro: .BR text
177      Set its arguments alternately in bold face and roman.
178
179  - Macro: .RB text
180      Set its arguments alternately in roman and bold face.
181
182  - Macro: .B [text]
183      Set TEXT in bold face.  If no text is present on the line where
184      the macro is called, then the text of the next line appears in bold
185      face.
186
187  - Macro: .I [text]
188      Set TEXT in italic.  If no text is present on the line where the
189      macro is called, then the text of the next line appears in italic.
190
191 \1f
192 File: groff,  Node: Miscellaneous man macros,  Next: Predefined man strings,  Prev: Man font macros,  Up: man
193
194 Miscellaneous macros
195 --------------------
196
197    The default indentation is 7.2 en for all output devices except for
198 `grohtml' which ignores indentation.
199
200  - Macro: .DT
201      Set tabs every 0.5 inches.  Since this macro is always executed
202      during a call to the `TH' macro, it makes sense to call it only if
203      the tab positions have been changed.
204
205  - Macro: .PD [nnn]
206      Adjust the empty space before a new paragraph (or section).  The
207      optional argument gives the amount of space (default unit is `v');
208      without parameter, the value is reset to its default value (1 line
209      for TTY devices, 0.4v otherwise).
210
211    This affects the macros `SH', `SS', `TP', `LP' (as well as `PP' and
212 `P'), `IP', and `HP'.
213
214 \1f
215 File: groff,  Node: Predefined man strings,  Next: Preprocessors in man pages,  Prev: Miscellaneous man macros,  Up: man
216
217 Predefined strings
218 ------------------
219
220    The following strings are defined:
221
222  - String: \*[S]
223      Switch back to the default font size.
224
225  - String: \*[R]
226      The `registered' sign.
227
228  - String: \*[Tm]
229      The `trademark' sign.
230
231  - String: \*[lq]
232  - String: \*[rq]
233      Left and right quote.  This is equal to `\(lq' and `\(rq',
234      respectively.
235
236 \1f
237 File: groff,  Node: Preprocessors in man pages,  Prev: Predefined man strings,  Up: man
238
239 Preprocessors in `man' pages
240 ----------------------------
241
242    If a preprocessor like `gtbl' or `geqn' is needed, it has become
243 common usage to make the first line of the man page look like this:
244
245
246      '\" WORD
247
248 Note the single space character after the double quote.  WORD consists
249 of letters for the needed preprocessors: `e' for `geqn', `r' for
250 `grefer', `t' for `gtbl'.  Modern implementations of the `man' program
251 read this first line and automatically call the right preprocessor(s).
252
253 \1f
254 File: groff,  Node: mdoc,  Next: ms,  Prev: man,  Up: Macro Packages
255
256 `mdoc'
257 ======
258
259    See the `groff_mdoc(7)' man page (type `man groff_mdoc' at the
260 command line).
261
262 \1f
263 File: groff,  Node: ms,  Next: me,  Prev: mdoc,  Up: Macro Packages
264
265 `ms'
266 ====
267
268    The `-ms' macros are suitable for reports, letters, books, user
269 manuals, and so forth.  The package provides macros for cover pages,
270 section headings, paragraphs, lists, footnotes, pagination, and a table
271 of contents.
272
273 * Menu:
274
275 * ms Intro::
276 * General ms Structure::
277 * ms Document Control Registers::
278 * ms Cover Page Macros::
279 * ms Body Text::
280 * ms Page Layout::
281 * Differences from AT&T ms::
282
283 \1f
284 File: groff,  Node: ms Intro,  Next: General ms Structure,  Prev: ms,  Up: ms
285
286 Introduction to `ms'
287 --------------------
288
289    The original `-ms' macros were included with AT&T `troff' as well as
290 the `man' macros.  While the `man' package is intended for brief
291 documents that can be read on-line as well as printed, the `ms' macros
292 are suitable for longer documents that are meant to be printed rather
293 than read on-line.
294
295    The `ms' macro package included with `groff' is a complete,
296 bottom-up re-implementation.  Several macros (specific to AT&T or
297 Berkeley) are not included, while several new commands are.  *Note
298 Differences from AT&T ms::, for more information.
299
300 \1f
301 File: groff,  Node: General ms Structure,  Next: ms Document Control Registers,  Prev: ms Intro,  Up: ms
302
303 General structure of an `ms' document
304 -------------------------------------
305
306    The `ms' macro package expects a certain amount of structure, but
307 not as much as packages such as `man' or `mdoc'.
308
309    The simplest documents can begin with a paragraph macro (such as
310 `LP' or `PP'), and consist of text separated by paragraph macros or
311 even blank lines.  Longer documents have a structure as follows:
312
313 *Document type*
314      If you invoke the `RP' (report) macro on the first line of the
315      document, `groff' prints the cover page information on its own
316      page; otherwise it prints the information on the first page with
317      your document text immediately following.  Other document formats
318      found in AT&T `troff' are specific to AT&T or Berkeley, and are
319      not supported in `groff'.
320
321 *Format and layout*
322      By setting number registers, you can change your document's type
323      (font and size), margins, spacing, headers and footers, and
324      footnotes.  *Note ms Document Control Registers::, for more
325      details.
326
327 *Cover page*
328      A cover page consists of a title, the author's name and
329      institution, an abstract, and the date.  (1) (*note General ms
330      Structure-Footnote-1::) *Note ms Cover Page Macros::, for more
331      details.
332
333 *Body*
334      Following the cover page is your document.  You can use the `ms'
335      macros to write reports, letters, books, and so forth.  The
336      package is designed for structured documents, consisting of
337      paragraphs interspersed with headings and augmented by lists,
338      footnotes, tables, and other common constructs.  *Note ms Body
339      Text::, for more details.
340
341 *Table of contents*
342      Longer documents usually include a table of contents, which you
343      can invoke by placing the `TC' macro at the end of your document.
344      The `ms' macros have minimal indexing facilities, consisting of the
345      `IX' macro, which prints an entry on standard error.  Printing the
346      table of contents at the end is necessary since `groff' is a
347      single-pass text formatter, thus it cannot determine the page
348      number of each section until that section has actually been set
349      and printed.  Since `ms' output is intended for hardcopy, you can
350      manually relocate the pages containing the table of contents
351      between the cover page and the body text after printing.
352
353 \1f
354 File: groff,  Node: General ms Structure-Footnotes,  Up: General ms Structure
355
356    (1) Actually, only the title is required.
357
358 \1f
359 File: groff,  Node: ms Document Control Registers,  Next: ms Cover Page Macros,  Prev: General ms Structure,  Up: ms
360
361 Document control registers
362 --------------------------
363
364    The following is a list of document control number registers.  For
365 the sake of consistency, set registers related to margins at the
366 beginning of your document, or just after the `RP' macro.  You can set
367 other registers later in your document, but you should keep them
368 together at the beginning to make them easy to find and edit as
369 necessary.
370
371 Margin Settings
372 ...............
373
374  - Register: \n[PO]
375      Defines the page offset (i.e. the left margin).  There is no
376      explicit right margin setting; the combination of the `PO' and
377      `LL' registers implicitly define the right margin width.
378
379      Effective: next page.
380
381      Default value: 1i.
382
383  - Register: \n[LL]
384      Defines the line length (i.e. the width of the body text).
385
386      Effective: next paragraph.
387
388      Default: 6i.
389
390  - Register: \n[LT]
391      Defines the title length (i.e. the header and footer width).  This
392      is usually the same as `LL', but not necessarily.
393
394      Effective: next paragraph.
395
396      Default: 6i.
397
398  - Register: \n[HM]
399      Defines the header margin height at the top of the page.
400
401      Effective: next page.
402
403      Default: 1i.
404
405  - Register: \n[FM]
406      Defines the footer margin height at the bottom of the page.
407
408      Effective: next page.
409
410      Default: 1i.
411
412 Text Settings
413 .............
414
415  - Register: \n[PS]
416      Defines the point size of the body text.
417
418      Effective: next paragraph.
419
420      Default: 10p.
421
422  - Register: \n[VS]
423      Defines the space between lines (line height plus leading).
424
425      Effective: next paragraph.
426
427      Default: 12p.
428
429 Paragraph Settings
430 ..................
431
432  - Register: \n[PI]
433      Defines the initial indent of a `.PP' paragraph.
434
435      Effective: next paragraph.
436
437      Default: 5n.
438
439  - Register: \n[PD]
440      Defines the space between paragraphs.
441
442      Effective: next paragraph.
443
444      Default: 0.3v.
445
446  - Register: \n[QI]
447      Defines the indent on both sides of a quoted (`.QP') paragraph.
448
449      Effective: next paragraph.
450
451      Default: 5n.
452
453 Footnote Settings
454 .................
455
456  - Register: \n[FL]
457      Defines the length of a footnote.
458
459      Effective: next footnote.
460
461      Default: `\n[LL]' * 5 / 6.
462
463  - Register: \n[FI]
464      Defines the footnote indent.
465
466      Effective: next footnote.
467
468      Default: 2n.
469
470  - Register: \n[FF]
471      The footnote format:
472     `0'
473           Prints the footnote number as a superscript; indents the
474           footnote (default).
475
476     `1'
477           Prints the number followed by a period (like 1.)  and indents
478           the footnote.
479
480     `2'
481           Like 1, without an indent.
482
483     `3'
484           Like 1, but prints the footnote number as a hanging paragraph.
485
486      Effective: next footnote.
487
488      Default: 0.
489
490 Miscellaneous Number Registers
491 ..............................
492
493  - Register: \n[MINGW]
494      Defines the minimum width between columns in a multi-column
495      document.
496
497      Effective: next page.
498
499      Default: 2n.
500
501 \1f
502 File: groff,  Node: ms Cover Page Macros,  Next: ms Body Text,  Prev: ms Document Control Registers,  Up: ms
503
504 Cover page macros
505 -----------------
506
507    Use the following macros to create a cover page for your document in
508 the order shown.
509
510  - Macro: .RP [`no']
511      Specifies the report format for your document.  The report format
512      creates a separate cover page.  The default action (no `.RP'
513      macro) is to print a subset of the cover page on page 1 of your
514      document.
515
516      If you use the word `no' as an optional argument, `groff' prints a
517      title page but does not repeat any of the title page information
518      (title, author, abstract, etc.)  on page 1 of the document.
519
520  - Macro: .DA [...]
521      (optional) Print the current date, or the arguments to the macro
522      if any, on the title page (if specified) and in the footers.  This
523      is the default for `nroff'.
524
525  - Macro: .ND [...]
526      (optional) Print the current date, or the arguments to the macro
527      if any, on the title page (if specified) but not in the footers.
528      This is the default for `troff'.
529
530  - Macro: .TL
531      Specifies the document title.  `groff' collects text following the
532      `.TL' macro into the title, until reaching the author name or
533      abstract.
534
535  - Macro: .AU
536      Specifies the author's name, which appears on the line (or lines)
537      immediately following.  You can specify multiple authors as
538      follows:
539
540
541           .AU
542           John Doe
543           .AI
544           University of West Bumblefuzz
545           .AU
546           Martha Buck
547           .AI
548           Monolithic Corporation
549           
550           ...
551
552
553  - Macro: .AI
554      Specifies the author's institution.  You can specify multiple
555      institutions in the same way that you specify multiple authors.
556
557  - Macro: .AB [`no']
558      Begins the abstract.  The default is to print the word ABSTRACT,
559      centered and in italics, above the text of the abstract.  The word
560      `no' as an optional argument suppresses this heading.
561
562  - Macro: .AE
563      End the abstract.
564
565    The following is example mark-up for a title page.
566
567
568      .RP
569      .TL
570      The Inevitability of Code Bloat
571      in Commercial and Free Software
572      .AU
573      J. Random Luser
574      .AI
575      University of West Bumblefuzz
576      .AB
577      This report examines the long-term growth
578      of the code bases in two large, popular software
579      packages; the free Emacs and the commercial
580      Microsoft Word.
581      While differences appear in the type or order
582      of features added, due to the different
583      methodologies used, the results are the same
584      in the end.
585      .PP
586      The free software approach is shown to be
587      superior in that while free software can
588      become as bloated as commercial offerings,
589      free software tends to have fewer serious
590      bugs and the added features are in line with
591      user demand.
592      .AE
593      
594      ... the rest of the paper follows ...
595
596 \1f
597 File: groff,  Node: ms Body Text,  Next: ms Page Layout,  Prev: ms Cover Page Macros,  Up: ms
598
599 Body text
600 ---------
601
602    This section describes macros used to mark up the body of your
603 document.  Examples include paragraphs, sections, and other groups.
604
605 * Menu:
606
607 * Paragraphs in ms::
608 * Headings in ms::
609 * Highlighting in ms::
610 * Lists in ms::
611 * Indents in ms::
612 * Tabstops in ms::
613 * ms Displays and Keeps::
614 * ms Insertions::
615 * Example multi-page table::
616 * ms Footnotes::
617
618 \1f
619 File: groff,  Node: Paragraphs in ms,  Next: Headings in ms,  Prev: ms Body Text,  Up: ms Body Text
620
621 Paragraphs
622 ..........
623
624    The following paragraph types are available.
625
626  - Macro: .PP
627      Sets a paragraph with an initial indent.
628
629  - Macro: .LP
630      Sets a paragraph with no initial indent.
631
632  - Macro: .QP
633      Sets a paragraph that is indented at both left and right margins.
634      The effect is identical to the HTML `<BLOCKQUOTE>' element.  The
635      next paragraph or heading returns margins to normal.
636
637  - Macro: .XP
638      Sets a paragraph whose lines are indented, except for the first
639      line.  This is a Berkeley extension.
640
641    The following markup uses all four paragraph macros.
642
643
644      .NH 2
645      Cases used in the study
646      .LP
647      The following software and versions were
648      considered for this report.
649      .PP
650      For commercial software, we chose
651      .B "Microsoft Word for Windows" ,
652      starting with version 1.0 through the
653      current version (Word 2000).
654      .PP
655      For free software, we chose
656      .B Emacs ,
657      from its first appearance as a standalone
658      editor through the current version (v20).
659      See [Bloggs 2002] for details.
660      .QP
661      Franklin's Law applied to software:
662      software expands to outgrow both
663      RAM and disk space over time.
664      .LP
665      Bibliography:
666      .XP
667      Bloggs, Joseph R.,
668      .I "Everyone's a Critic" ,
669      Underground Press, March 2002.
670      A definitive work that answers all questions
671      and criticisms about the quality and usability of
672      free software.
673
674 \1f
675 File: groff,  Node: Headings in ms,  Next: Highlighting in ms,  Prev: Paragraphs in ms,  Up: ms Body Text
676
677 Headings
678 ........
679
680    Use headings to create a hierarchical structure for your document.
681 The `ms' macros print headings in *bold*, using the same font family
682 and point size as the body text.
683
684    The following describes the heading macros:
685
686  - Macro: .NH curr-level
687  - Macro: .NH S level0 ...
688      Numbered heading.  The argument is either a numeric argument to
689      indicate the level of the heading, or the letter `S' followed by
690      numeric arguments to set the heading level explicitly.
691
692      If you specify heading levels out of sequence, such as invoking
693      `.NH 3' after `.NH 1', `groff' prints a warning on standard error.
694
695  - Macro: .SH
696      Unnumbered subheading.
697
698 \1f
699 File: groff,  Node: Highlighting in ms,  Next: Lists in ms,  Prev: Headings in ms,  Up: ms Body Text
700
701 Highlighting
702 ............
703
704    The `ms' macros provide a variety of methods to highlight or
705 emphasize text:
706
707  - Macro: .B [txt [post [pre]]]
708      Sets its first argument in *bold type*.  If you specify a second
709      argument, `groff' prints it in the previous font after the bold
710      text, with no intervening space (this allows you to set
711      punctuation after the highlighted text without highlighting the
712      punctuation).  Similarly, it prints the third argument (if any) in
713      the previous font *before* the first argument.  For example,
714
715
716           .B foo ) (
717
718      prints (*foo*).
719
720      If you give this macro no arguments, `groff' prints all text
721      following in bold until the next highlighting, paragraph, or
722      heading macro.
723
724  - Macro: .R [txt [post [pre]]]
725      Sets its first argument in roman (or regular) type.  It operates
726      similarly to the `B' macro otherwise.
727
728  - Macro: .I [txt [post [pre]]]
729      Sets its first argument in _italic type_.  It operates similarly
730      to the `B' macro otherwise.
731
732  - Macro: .CW [txt [post [pre]]]
733      Sets its first argument in a `constant width face'.  It operates
734      similarly to the `B' macro otherwise.
735
736  - Macro: .BI [txt [post [pre]]]
737      Sets its first argument in bold italic type.  It operates
738      similarly to the `B' macro otherwise.
739
740  - Macro: .BX [txt]
741      Prints its argument and draws a box around it.  If you want to box
742      a string that contains spaces, use a digit-width space (`\0').
743
744  - Macro: .UL [txt [post]]
745      Prints its first argument with an underline.  If you specify a
746      second argument, `groff' prints it in the previous font after the
747      underlined text, with no intervening space.
748
749  - Macro: .LG
750      Prints all text following in larger type (two points larger than
751      the current point size) until the next font size, highlighting,
752      paragraph, or heading macro.  You can specify this macro multiple
753      times to enlarge the point size as needed.
754
755  - Macro: .SM
756      Prints all text following in smaller type (two points smaller than
757      the current point size) until the next type size, highlighting,
758      paragraph, or heading macro.  You can specify this macro multiple
759      times to reduce the point size as needed.
760
761  - Macro: .NL
762      Prints all text following in the normal point size (that is, the
763      value of the `PS' register).
764
765 \1f
766 File: groff,  Node: Lists in ms,  Next: Indents in ms,  Prev: Highlighting in ms,  Up: ms Body Text
767
768 Lists
769 .....
770
771    The `.IP' macro handles duties for all lists.
772
773  - Macro: .IP [marker [width]]
774      The MARKER is usually a bullet glyph (`\[bu]') for unordered
775      lists, a number (or auto-incrementing number register) for
776      numbered lists, or a word or phrase for indented (glossary-style)
777      lists.
778
779      The WIDTH specifies the indent for the body of each list item; its
780      default unit is `n'.  Once specified, the indent remains the same
781      for all list items in the document until specified again.
782
783    The following is an example of a bulleted list.
784
785
786      A bulleted list:
787      .IP \[bu] 2
788      lawyers
789      .IP \[bu]
790      guns
791      .IP \[bu]
792      money
793
794    Produces:
795
796
797      A bulleted list:
798      
799      o lawyers
800      
801      o guns
802      
803      o money
804
805
806    The following is an example of a numbered list.
807
808
809      .nr step 1 1
810      A numbered list:
811      .IP \n[step] 3
812      lawyers
813      .IP \n+[step]
814      guns
815      .IP \n+[step]
816      money
817
818    Produces:
819
820
821      A numbered list:
822      
823      1. lawyers
824      
825      2. guns
826      
827      3. money
828
829    Note the use of the auto-incrementing number register in this
830 example.
831
832
833    The following is an example of a glossary-style list.
834
835
836      A glossary-style list:
837      .IP lawyers 0.4i
838      Two or more attorneys.
839      .IP guns
840      Firearms, preferably
841      large-caliber.
842      .IP money
843      Gotta pay for those
844      lawyers and guns!
845
846    Produces:
847
848
849      A glossary-style list:
850      
851      lawyers
852            Two or more attorneys.
853      
854      guns  Firearms, preferably large-caliber.
855      
856      money
857            Gotta pay for those lawyers and guns!
858
859    In the last example, the `IP' macro places the definition on the
860 same line as the term if it has enough space; otherwise, it breaks to
861 the next line and starts the definition below the term.  This may or
862 may not be the effect you want, especially if some of the definitions
863 break and some do not.  The following examples show two possible ways
864 to force a break.
865
866    The first workaround uses the `br' request to force a break after
867 printing the term or label.
868
869
870      A glossary-style list:
871      .IP lawyers 0.4i
872      Two or more attorneys.
873      .IP guns
874      .br
875      Firearms, preferably large-caliber.
876      .IP money
877      Gotta pay for those lawyers and guns!
878
879
880    The second workaround uses the `\p' escape to force the break.  Note
881 the space following the escape; this is important.  If you omit the
882 space, `groff' prints the first word on the same line as the term or
883 label (if it fits) *then* breaks the line.
884
885
886      A glossary-style list:
887      .IP lawyers 0.4i
888      Two or more attorneys.
889      .IP guns
890      \p Firearms, preferably large-caliber.
891      .IP money
892      Gotta pay for those lawyers and guns!
893
894
895    To set nested lists, use the `RS' and `RE' macros.  *Note Indents in
896 ms::, for more information.
897
898    For example:
899
900
901      .IP \[bu] 2
902      Lawyers:
903      .RS
904      .IP \[bu]
905      Dewey,
906      .IP \[bu]
907      Cheatham,
908      .IP \[bu]
909      and Howe.
910      .RE
911      .IP \[bu]
912      Guns
913
914    Produces:
915
916
917      o Lawyers:
918      
919        o  Dewey,
920      
921        o  Cheatham,
922      
923        o  and Howe.
924      
925      o Guns
926
927 \1f
928 File: groff,  Node: Indents in ms,  Next: Tabstops in ms,  Prev: Lists in ms,  Up: ms Body Text
929
930 Indents
931 .......
932
933    In many situations, you may need to indent a section of text while
934 still wrapping and filling.  *Note Lists in ms::, for an example of
935 nested lists.
936
937  - Macro: .RS
938  - Macro: .RE
939      These macros begin and end an indented section.  The `PI' register
940      controls the amount of indent, allowing the indented text to line
941      up under hanging and indented paragraphs.
942
943    *Note ms Displays and Keeps::, for macros to indent and turn off
944 filling.
945
946 \1f
947 File: groff,  Node: Tabstops in ms,  Next: ms Displays and Keeps,  Prev: Indents in ms,  Up: ms Body Text
948
949 Tab Stops
950 .........
951
952    Use the `ta' request to define tab stops as needed.  *Note Tabs and
953 Fields::.
954
955  - Macro: .TA
956      Use this macro to reset the tab stops to the default for `ms'
957      (every 5n).  You can redefine the `TA' macro to create a different
958      set of default tab stops.
959
960 \1f
961 File: groff,  Node: ms Displays and Keeps,  Next: ms Insertions,  Prev: Tabstops in ms,  Up: ms Body Text
962
963 Displays and keeps
964 ..................
965
966    Use displays to show text-based examples or figures (such as code
967 listings).
968
969    Displays turn off filling, so lines of code are displayed as-is
970 without inserting `br' requests in between each line.  Displays can be
971 "kept" on a single page, or allowed to break across pages.
972
973  - Macro: .DS L
974  - Macro: .LD
975  - Macro: .DE
976      Left-justified display.  The `.DS L' call generates a page break,
977      if necessary, to keep the entire display on one page.  The `LD'
978      macro allows the display to break across pages.  The `DE' macro
979      ends the display.
980
981  - Macro: .DS I
982  - Macro: .ID
983  - Macro: .DE
984      Indents the display as defined by the `DI' register.  The `.DS I'
985      call generates a page break, if necessary, to keep the entire
986      display on one page.  The `ID' macro allows the display to break
987      across pages.  The `DE' macro ends the display.
988
989  - Macro: .DS B
990  - Macro: .BD
991  - Macro: .DE
992      Sets a block-centered display: the entire display is
993      left-justified, but indented so that the longest line in the
994      display is centered on the page.  The `.DS B' call generates a
995      page break, if necessary, to keep the entire display on one page.
996      The `BD' macro allows the display to break across pages.  The `DE'
997      macro ends the display.
998
999  - Macro: .DS C
1000  - Macro: .CD
1001  - Macro: .DE
1002      Sets a centered display: each line in the display is centered.
1003      The `.DS C' call generates a page break, if necessary, to keep the
1004      entire display on one page.  The `CD' macro allows the display to
1005      break across pages.  The `DE' macro ends the display.
1006
1007  - Macro: .DS R
1008  - Macro: .RD
1009  - Macro: .DE
1010      Right-justifies each line in the display.  The `.DS R' call
1011      generates a page break, if necessary, to keep the entire display
1012      on one page.  The `RD' macro allows the display to break across
1013      pages.  The `DE' macro ends the display.
1014
1015
1016    On occasion, you may want to "keep" other text together on a page.
1017 For example, you may want to keep two paragraphs together, or a
1018 paragraph that refers to a table (or list, or other item) immediately
1019 following.  The `ms' macros provide the `KS' and `KE' macros for this
1020 purpose.
1021
1022  - Macro: .KS
1023  - Macro: .KE
1024      The `KS' macro begins a block of text to be kept on a single page,
1025      and the `KE' macro ends the block.
1026
1027  - Macro: .KF
1028  - Macro: .KE
1029      Specifies a "floating keep"; if the keep cannot fit on the current
1030      page, `groff' holds the contents of the keep and allows text
1031      following the keep (in the source file) to fill in the remainder of
1032      the current page.  When the page breaks, whether by an explicit
1033      `bp' request or by reaching the end of the page, `groff' prints
1034      the floating keep at the top of the new page.  This is useful for
1035      printing large graphics or tables that do not need to appear
1036      exactly where specified.
1037
1038    You can also use the `ne' request to force a page break if there is
1039 not enough vertical space remaining on the page.
1040
1041
1042    Use the following macros to draw a box around a section of text
1043 (such as a display).
1044
1045  - Macro: .B1
1046  - Macro: .B2
1047      Marks the beginning and ending of text that is to have a box drawn
1048      around it.  The `B1' macro begins the box; the `B2' macro ends it.
1049      Text in the box is automatically placed in a diversion (keep).
1050
1051 \1f
1052 File: groff,  Node: ms Insertions,  Next: Example multi-page table,  Prev: ms Displays and Keeps,  Up: ms Body Text
1053
1054 Tables, figures, equations, and references
1055 ..........................................
1056
1057    The `ms' macros support the standard `groff' preprocessors: `tbl',
1058 `pic', `eqn', and `refer'.  You mark text meant for preprocessors by
1059 enclosing it in pairs of tags as follows.
1060
1061  - Macro: .TS [`H']
1062  - Macro: .TE
1063      Denotes a table, to be processed by the `tbl' preprocessor.  The
1064      optional argument `H' to `TS' instructs `groff' to create a
1065      running header with the information up to the `TH' macro.  `groff'
1066      prints the header at the beginning of the table; if the table runs
1067      onto another page, `groff' prints the header on the next page as
1068      well.
1069
1070  - Macro: .PS
1071  - Macro: .PE
1072      Denotes a graphic, to be processed by the `pic' preprocessor.  You
1073      can create a `pic' file by hand, using the AT&T `pic' manual
1074      available on the Web as a reference, or by using a graphics
1075      program such as `xfig'.
1076
1077  - Macro: .EQ [align]
1078  - Macro: .EN
1079      Denotes an equation, to be processed by the `eqn' preprocessor.
1080      The optional ALIGN argument can be `C', `L', or `I' to center (the
1081      default), left-justify, or indent the equation.
1082
1083  - Macro: .[
1084  - Macro: .]
1085      Denotes a reference, to be processed by the `refer' preprocessor.
1086      The GNU `refer(1)' man page provides a comprehensive reference to
1087      the preprocessor and the format of the bibliographic database.
1088
1089 * Menu:
1090
1091 * Example multi-page table::
1092
1093 \1f
1094 File: groff,  Node: Example multi-page table,  Next: ms Footnotes,  Prev: ms Insertions,  Up: ms Body Text
1095
1096 An example multi-page table
1097 ...........................
1098
1099    The following is an example of how to set up a table that may print
1100 across two or more pages.
1101
1102
1103      .TS H
1104      allbox expand;
1105      cb | cb .
1106      Text      ...of heading...
1107      _
1108      .TH
1109      .T&
1110      l | l .
1111      ... the rest of the table follows...
1112      .CW
1113      .TE
1114
1115 \1f
1116 File: groff,  Node: ms Footnotes,  Prev: Example multi-page table,  Up: ms Body Text
1117
1118 Footnotes
1119 .........
1120
1121    The `ms' macro package has a flexible footnote system.  You can
1122 specify either numbered footnotes or symbolic footnotes (that is, using
1123 a marker such as a dagger symbol).
1124
1125  - String: \*[*]
1126      Specifies the location of a numbered footnote marker in the text.
1127
1128  - Macro: .FS
1129  - Macro: .FE
1130      Specifies the text of the footnote.  The default action is to
1131      create a numbered footnote; you can create a symbolic footnote by
1132      specifying a "mark" glyph (such as `\[dg]' for the dagger glyph)
1133      in the body text and as an argument to the `FS' macro, followed by
1134      the text of the footnote and the `FE' macro.
1135
1136    You can control how `groff' prints footnote numbers by changing the
1137 value of the `FF' register.  *Note ms Document Control Registers::.
1138
1139 \1f
1140 File: groff,  Node: ms Page Layout,  Next: Differences from AT&T ms,  Prev: ms Body Text,  Up: ms
1141
1142 Page layout
1143 -----------
1144
1145    The default output from the `ms' macros provides a minimalist page
1146 layout: it prints a single column, with the page number centered at the
1147 top of each page.  It prints no footers.
1148
1149    You can change the layout by setting the proper number registers and
1150 strings.
1151
1152 * Menu:
1153
1154 * ms Headers and Footers::
1155 * ms Margins::
1156 * ms Multiple Columns::
1157 * ms TOC::
1158 * ms Strings and Special Characters::
1159
1160 \1f
1161 File: groff,  Node: ms Headers and Footers,  Next: ms Margins,  Prev: ms Page Layout,  Up: ms Page Layout
1162
1163 Headers and footers
1164 ...................
1165
1166    For documents that do not distinguish between odd and even pages,
1167 set the following strings:
1168
1169  - String: \*[LH]
1170  - String: \*[CH]
1171  - String: \*[RH]
1172      Sets the left, center, and right headers.
1173
1174  - String: \*[LF]
1175  - String: \*[CF]
1176  - String: \*[RF]
1177      Sets the left, center, and right footers.
1178
1179
1180    For documents that need different information printed in the even
1181 and odd pages, use the following macros:
1182
1183  - Macro: .OH 'left'center'right'
1184  - Macro: .EH 'left'center'right'
1185  - Macro: .OF 'left'center'right'
1186  - Macro: .EF 'left'center'right'
1187      The `OH' and `EH' macros define headers for the odd and even pages;
1188      the `OF' and `EF' macros define footers for the odd and even pages.
1189      This is more flexible than defining the individual strings.
1190
1191      You can replace the quote (`'') marks with any character not
1192      appearing in the header or footer text.
1193
1194 \1f
1195 File: groff,  Node: ms Margins,  Next: ms Multiple Columns,  Prev: ms Headers and Footers,  Up: ms Page Layout
1196
1197 Margins
1198 .......
1199
1200    You control margins using a set of number registers.  *Note ms
1201 Document Control Registers::, for details.
1202
1203 \1f
1204 File: groff,  Node: ms Multiple Columns,  Next: ms TOC,  Prev: ms Margins,  Up: ms Page Layout
1205
1206 Multiple columns
1207 ................
1208
1209    The `ms' macros can set text in as many columns as will reasonably
1210 fit on the page.  The following macros are available; all of them force
1211 a page break if a multi-column mode is already set.  However, if the
1212 current mode is single-column, starting a multi-column mode does *not*
1213 force a page break.
1214
1215  - Macro: .1C
1216      Single-column mode.
1217
1218  - Macro: .2C
1219      Two-column mode.
1220
1221  - Macro: .MC [width [gutter]]
1222      Multi-column mode.  If you specify no arguments, it is equivalent
1223      to the `2C' macro.  Otherwise, WIDTH is the width of each column
1224      and GUTTER is the space between columns.  The `MINGW' number
1225      register controls the default gutter width.
1226
1227 \1f
1228 File: groff,  Node: ms TOC,  Next: ms Strings and Special Characters,  Prev: ms Multiple Columns,  Up: ms Page Layout
1229
1230 Creating a table of contents
1231 ............................
1232
1233    The facilities in the `ms' macro package for creating a table of
1234 contents are semi-automated at best.  Assuming that you want the table
1235 of contents to consist of the document's headings, you need to repeat
1236 those headings wrapped in `XS' and `XE' macros.
1237
1238  - Macro: .XS [page]
1239  - Macro: .XA [page]
1240  - Macro: .XE
1241      These macros define a table of contents or an individual entry in
1242      the table of contents, depending on their use.  The macros are
1243      very simple; they cannot indent a heading based on its level.  The
1244      easiest way to work around this is to add tabs to the table of
1245      contents string.  The following is an example:
1246
1247
1248           .NH 1
1249           Introduction
1250           .XS
1251           Introduction
1252           .XE
1253           .LP
1254           ...
1255           .CW
1256           .NH 2
1257           Methodology
1258           .XS
1259                 Methodology
1260           .XE
1261           .LP
1262           ...
1263
1264      You can manually create a table of contents by beginning with the
1265      `XS' macro for the first entry, specifying the page number for
1266      that entry as the argument to `XS'.  Add subsequent entries using
1267      the `XA' macro, specifying the page number for that entry as the
1268      argument to `XA'.  The following is an example:
1269
1270
1271           .XS 1
1272           Introduction
1273           .XA 2
1274           A Brief History of the Universe
1275           .XA 729
1276           Details of Galactic Formation
1277           ...
1278           .XE
1279
1280
1281  - Macro: .TC [`no']
1282      Prints the table of contents on a new page, setting the page
1283      number to *i* (Roman numeral one).  You should usually place this
1284      macro at the end of the file, since `groff' is a single-pass
1285      formatter and can only print what has been collected up to the
1286      point that the `TC' macro appears.
1287
1288      The optional argument `no' suppresses printing the title specified
1289      by the string register `TOC'.
1290
1291  - Macro: .PX [`no']
1292      Prints the table of contents on a new page, using the current page
1293      numbering sequence.  Use this macro to print a manually-generated
1294      table of contents at the beginning of your document.
1295
1296      The optional argument `no' suppresses printing the title specified
1297      by the string register `TOC'.
1298
1299    The `Groff and Friends HOWTO' includes a `sed' script that
1300 automatically inserts `XS' and `XE' macro entries after each heading in
1301 a document.
1302
1303    Altering the `NH' macro to automatically build the table of contents
1304 is perhaps initially more difficult, but would save a great deal of
1305 time in the long run if you use `ms' regularly.
1306
1307 \1f
1308 File: groff,  Node: ms Strings and Special Characters,  Prev: ms TOC,  Up: ms Page Layout
1309
1310 Strings and Special Characters
1311 ..............................
1312
1313    The `ms' macros provide the following predefined strings.  You can
1314 change the string definitions to help in creating documents in
1315 languages other than English.
1316
1317  - String: \*[REFERENCES]
1318      Contains the string printed at the beginning of the references
1319      (bibliography) page.  The default is `References'.
1320
1321  - String: \*[ABSTRACT]
1322      Contains the string printed at the beginning of the abstract.  The
1323      default is `ABSTRACT'.
1324
1325  - String: \*[TOC]
1326      Contains the string printed at the beginning of the table of
1327      contents.
1328
1329  - String: \*[MONTH1]
1330  - String: \*[MONTH2]
1331  - String: \*[MONTH3]
1332  - String: \*[MONTH4]
1333  - String: \*[MONTH5]
1334  - String: \*[MONTH6]
1335  - String: \*[MONTH7]
1336  - String: \*[MONTH8]
1337  - String: \*[MONTH9]
1338  - String: \*[MONTH10]
1339  - String: \*[MONTH11]
1340  - String: \*[MONTH12]
1341      Prints the full name of the month in dates.  The default is
1342      `January', `February', etc.
1343
1344    The following special characters are available(1) (*note ms Strings
1345 and Special Characters-Footnote-1::):
1346
1347  - String: \*[-]
1348      Prints an em dash.
1349
1350  - String: \*[*Q]
1351  - String: \*[*U]
1352      Prints typographer's quotes in troff, plain quotes in nroff.  `*Q'
1353      is the left quote and `*U' is the right quote.
1354
1355    Improved accent marks are available in the `ms' macros.
1356
1357  - Macro: .AM
1358      Specify this macro at the beginning of your document to enable
1359      extended accent marks and special characters.  This is a Berkeley
1360      extension.
1361
1362      To use the accent marks, place them *after* the character being
1363      accented.
1364
1365    The following accent marks are available after invoking the `AM'
1366 macro:
1367
1368  - String: \*[']
1369      Acute accent.
1370
1371  - String: \*[`]
1372      Grave accent.
1373
1374  - String: \*[^]
1375      Circumflex.
1376
1377  - String: \*[,]
1378      Cedilla.
1379
1380  - String: \*[~]
1381      Tilde.
1382
1383  - String: \*[:]
1384      Umlaut.
1385
1386  - String: \*[v]
1387      Hacek.
1388
1389  - String: \*[_]
1390      Macron (overbar).
1391
1392  - String: \*[.]
1393      Underdot.
1394
1395  - String: \*[o]
1396      Ring above.
1397
1398    The following are standalone characters available after invoking the
1399 `AM' macro:
1400
1401  - String: \*[?]
1402      Upside-down question mark.
1403
1404  - String: \*[!]
1405      Upside-down exclamation point.
1406
1407  - String: \*[8]
1408      German ss ligature.
1409
1410  - String: \*[3]
1411      Yogh.
1412
1413  - String: \*[Th]
1414      Uppercase thorn.
1415
1416  - String: \*[th]
1417      Lowercase thorn.
1418
1419  - String: \*[D-]
1420      Uppercase eth.
1421
1422  - String: \*[d-]
1423      Lowercase eth.
1424
1425  - String: \*[q]
1426      Hooked o.
1427
1428  - String: \*[ae]
1429      Lowercase ae ligature.
1430
1431  - String: \*[Ae]
1432      Uppercase AE ligature.
1433
1434 \1f
1435 File: groff,  Node: ms Strings and Special Characters-Footnotes,  Up: ms Strings and Special Characters
1436
1437    (1) For an explanation what special characters are see *Note Special
1438 Characters::.
1439
1440 \1f
1441 File: groff,  Node: Differences from AT&T ms,  Prev: ms Page Layout,  Up: ms
1442
1443 Differences from AT&T `ms'
1444 --------------------------
1445
1446    This section lists the (minor) differences between the `groff -ms'
1447 macros and AT&T `troff -ms' macros.
1448
1449 * Menu:
1450
1451 * Missing ms Macros::
1452 * Additional ms Macros::
1453
1454 \1f
1455 File: groff,  Node: Missing ms Macros,  Next: Additional ms Macros,  Prev: Differences from AT&T ms,  Up: Differences from AT&T ms
1456
1457 `troff' macros not appearing in `groff'
1458 .......................................
1459
1460    Macros missing from `groff -ms' are cover page macros specific to
1461 Bell Labs.  The macros known to be missing are:
1462
1463 `.TM'
1464      Technical memorandum; a cover sheet style
1465
1466 `.IM'
1467      Internal memorandum; a cover sheet style
1468
1469 `.MR'
1470      Memo for record; a cover sheet style
1471
1472 `.MF'
1473      Memo for file; a cover sheet style
1474
1475 `.EG'
1476      Engineer's notes; a cover sheet style
1477
1478 `.TR'
1479      Computing Science Tech Report; a cover sheet style
1480
1481 `.OK'
1482      Other keywords
1483
1484 `.CS'
1485      Cover sheet information
1486
1487 `.MH'
1488      A cover sheet macro
1489
1490 \1f
1491 File: groff,  Node: Additional ms Macros,  Prev: Missing ms Macros,  Up: Differences from AT&T ms
1492
1493 `groff' macros not appearing in AT&T `troff'
1494 ............................................
1495
1496    The `groff -ms' macros have a few minor extensions compared to the
1497 AT&T `troff -ms' macros.
1498
1499  - Macro: .AM
1500      Improved accent marks.  *Note ms Strings and Special Characters::,
1501      for details.
1502
1503  - Macro: .DS I
1504      Indented display.  The default behavior of AT&T `troff -ms' was to
1505      indent; the `groff' default prints displays flush left with the
1506      body text.
1507
1508  - Macro: .CW
1509      Print text in `constant width' (Courier) font.
1510
1511  - Macro: .IX
1512      Indexing term (printed on standard error).  You can write a script
1513      to capture and process an index generated in this manner.
1514
1515
1516    The following additional number registers appear in `groff -ms':
1517
1518  - Register: \n[MINGW]
1519      Specifies a minimum space between columns (for multi-column
1520      output); this takes the place of the `GW' register that was
1521      documented but apparently not implemented in AT&T `troff'.
1522
1523
1524    Several new string registers are available as well.  You can change
1525 these to handle (for example) the local language.  *Note ms Strings and
1526 Special Characters::, for details.
1527
1528 \1f
1529 File: groff,  Node: me,  Next: mm,  Prev: ms,  Up: Macro Packages
1530
1531 `me'
1532 ====
1533
1534    See the `meintro.me' and `meref.me' documents in groff's `doc'
1535 directory.
1536
1537 \1f
1538 File: groff,  Node: mm,  Prev: me,  Up: Macro Packages
1539
1540 `mm'
1541 ====
1542
1543    See the `groff_mm(7)' man page (type `man groff_mm' at the command
1544 line).
1545
1546 \1f
1547 File: groff,  Node: gtroff Reference,  Next: Preprocessors,  Prev: Macro Packages,  Up: Top
1548
1549 `gtroff' Reference
1550 ******************
1551
1552    This chapter covers *all* of the facilities of `gtroff'.  Users of
1553 macro packages may skip it if not interested in details.
1554
1555 * Menu:
1556
1557 * Text::
1558 * Input Conventions::
1559 * Measurements::
1560 * Expressions::
1561 * Identifiers::
1562 * Embedded Commands::
1563 * Registers::
1564 * Manipulating Filling and Adjusting::
1565 * Manipulating Hyphenation::
1566 * Manipulating Spacing::
1567 * Tabs and Fields::
1568 * Character Translations::
1569 * Troff and Nroff Mode::
1570 * Line Layout::
1571 * Line Control::
1572 * Page Layout::
1573 * Page Control::
1574 * Fonts::
1575 * Sizes::
1576 * Strings::
1577 * Conditionals and Loops::
1578 * Writing Macros::
1579 * Page Motions::
1580 * Drawing Requests::
1581 * Traps::
1582 * Diversions::
1583 * Environments::
1584 * Suppressing output::
1585 * Colors::
1586 * I/O::
1587 * Postprocessor Access::
1588 * Miscellaneous::
1589 * Gtroff Internals::
1590 * Debugging::
1591 * Implementation Differences::
1592
1593 \1f
1594 File: groff,  Node: Text,  Next: Input Conventions,  Prev: gtroff Reference,  Up: gtroff Reference
1595
1596 Text
1597 ====
1598
1599    `gtroff' input files contain text with control commands interspersed
1600 throughout.  But, even without control codes, `gtroff' still does
1601 several things with the input text:
1602
1603    * filling and adjusting
1604
1605    * adding additional space after sentences
1606
1607    * hyphenating
1608
1609    * inserting implicit line breaks
1610
1611 * Menu:
1612
1613 * Filling and Adjusting::
1614 * Hyphenation::
1615 * Sentences::
1616 * Tab Stops::
1617 * Implicit Line Breaks::
1618
1619 \1f
1620 File: groff,  Node: Filling and Adjusting,  Next: Hyphenation,  Prev: Text,  Up: Text
1621
1622 Filling and Adjusting
1623 ---------------------
1624
1625    When `gtroff' reads text, it collects words from the input and fits
1626 as many of them together on one output line as it can.  This is known as
1627 "filling".
1628
1629    Once `gtroff' has a "filled" line, it tries to "adjust" it.  This
1630 means it widens the spacing between words until the text reaches the
1631 right margin (in the default adjustment mode).  Extra spaces between
1632 words are preserved, but spaces at the end of lines are ignored.
1633 Spaces at the front of a line cause a "break" (breaks are explained in
1634 *Note Implicit Line Breaks::).
1635
1636    *Note Manipulating Filling and Adjusting::.
1637
1638 \1f
1639 File: groff,  Node: Hyphenation,  Next: Sentences,  Prev: Filling and Adjusting,  Up: Text
1640
1641 Hyphenation
1642 -----------
1643
1644    Since the odds are not great for finding a set of words, for every
1645 output line, which fit nicely on a line without inserting excessive
1646 amounts of space between words, `gtroff' hyphenates words so that it
1647 can justify lines without inserting too much space between words.  It
1648 uses an internal hyphenation algorithm (a simplified version of the
1649 algorithm used within TeX) to indicate which words can be hyphenated
1650 and how to do so.  When a word is hyphenated, the first part of the
1651 word is added to the current filled line being output (with an attached
1652 hyphen), and the other portion is added to the next line to be filled.
1653
1654    *Note Manipulating Hyphenation::.
1655
1656 \1f
1657 File: groff,  Node: Sentences,  Next: Tab Stops,  Prev: Hyphenation,  Up: Text
1658
1659 Sentences
1660 ---------
1661
1662    Although it is often debated, some typesetting rules say there
1663 should be different amounts of space after various punctuation marks.
1664 For example, the `Chicago typsetting manual' says that a period at the
1665 end of a sentence should have twice as much space following it as would
1666 a comma or a period as part of an abbreviation.
1667
1668    `gtroff' does this by flagging certain characters (normally `!',
1669 `?', and `.') as "end-of-sentence" characters.  When `gtroff'
1670 encounters one of these characters at the end of a line, it appends a
1671 normal space followed by a "sentence space" in the formatted output.
1672 (This justifies one of the conventions mentioned in *Note Input
1673 Conventions::.)
1674
1675    In addition, the following characters and symbols are treated
1676 transparently while handling end-of-sentence characters: `"', `'', `)',
1677 `]', `*', `\[dg]', and `\[rq]'.
1678
1679    See the `cflags' request in *Note Using Symbols::, for more details.
1680
1681    To prevent the insertion of extra space after an end-of-sentence
1682 character (at the end of a line), append `\&'.
1683