4 Last update: 14 July 2002
6 Copyright (C) 1989, 2002 Free Software Foundation, Inc.
7 Rewritten in 2002 by Bernd Warken <bwarken@mayn.de>
9 Permission is granted to copy, distribute and/or modify this document
10 under the terms of the GNU Free Documentation License, Version 1.1 or
11 any later version published by the Free Software Foundation; with the
12 Invariant Sections being this .ig-section and AUTHOR, with no
13 Front-Cover Texts, and with no Back-Cover Texts.
15 A copy of the Free Documentation License is included as a file called
16 FDL in the main directory of the groff source package.
19 .\" --------------------------------------------------------------------
21 .\" --------------------------------------------------------------------
25 .\" set adjust to both
28 .\" fonts of fixed length
40 .\" --------------------------------------------------------------------
41 .\" String definitions
46 .ds Ellipsis .\|.\|.\"
49 .\" --------------------------------------------------------------------
50 .\" Begin of macro definitions
52 .\" this is like a comment request when escape mechanism is off
56 .c --------------------------------------------------------------------
62 .c --------------------------------------------------------------------
63 .c Like TP, but if specified indent is more than half
64 .c the current line-length - indent, use the default indent.
66 . ie \n[.$]=0:((0\$1)*2u>(\n.lu-\n(.iu)) .TP
69 .c --------------------------------------------------------------------
73 .c --------------------------------------------------------------------
76 . nr @old_indent \n[.i]
78 . in +\w'\f[B]\*[@arg1]\0'u
84 .c --------------------------------------------------------------------
89 .c --------------------------------------------------------------------
90 .c ShortOpt[] (name [arg])
92 .c short option in synopsis
100 . Text \f[R][\f[]\f[CB]\*[@-]\*[@opt]\f[]\f[R]]\f[]
102 . Text \f[R][\f[]\f[CB]\*[@-]\*[@opt]\~\f[]\f[I]\/\$*\f[]\f[R]]\f[]
105 .c --------------------------------------------------------------------
106 .c Option in synopsis (short option)
113 . Text \f[R][\f[]\f[CB]\*[@-]\*[@opt]\f[]\f[R]]\f[]
115 . Text \f[R][\f[]\f[CB]\*[@-]\*[@opt]\~\f[]\f[I]\/\$*\f[]\f[R]]\f[]
118 .c --------------------------------------------------------------------
119 .c ShortOpt ([char [punct]])
121 .c `-c' somwhere in the text
122 .c second arg is punctuation
127 . Text \f[CB]\*[@-]\*[@opt]\f[]\/\$*
130 .c --------------------------------------------------------------------
131 .c LongOpt ([name [punct]])
133 .c `--name' somwhere in the text
134 .c second arg is punctuation
139 . Text \f[CB]\*[@--]\f[]\f[B]\*[@opt]\f[]\/\$*
142 .c --------------------------------------------------------------------
143 .c OptDef (shortopt [longopt [argument]])
145 .c option documentation
146 .c args : `shortopt', `longopt' can be ""
155 . ds @short "\f[CB]\*[@-]\*[@arg1]\f[]\"
157 . if !'\*[@short]'' \
158 . as @short \f[CW]\0\f[]
161 . ds @long "\f[CB]\*[@--]\f[]\f[B]\*[@arg2]\f[]\"
170 . IP "\f[R]\*[@short]\*[@long]\*[@arg]\f[]"
177 .c --------------------------------------------------------------------
178 .c Continuation of an OptDef header.
184 .c --------------------------------------------------------------------
185 .c Environment variable
190 .c --------------------------------------------------------------------
191 .c a shell command line
194 . c replace argument separator by unbreakable space
197 . while (\n[.$]>0) \{\
198 . ds @args \*[@args]\~\$1
204 . Text \f[I]sh#\h'1m'\f[P]\f[CR]\*[@args]\f[P]\&\"
214 .c --------------------------------------------------------------------
221 .c --------------------------------------------------------------------
222 .c End of macro definitions
226 .\" --------------------------------------------------------------------
228 .\" --------------------------------------------------------------------
230 .TH GROFF 1 "23 September 2003" "Groff Version 1.18.1"
232 groff \- front-end for the groff document formatting system
235 .\" --------------------------------------------------------------------
237 .\" --------------------------------------------------------------------
241 .ShortOpt[] abcegilpstzCEGNRSUVXZ
275 The command line is parsed according to the usual GNU convention.
277 The whitespace between a command line option and its argument is
280 Options can be grouped behind a single
286 (minus character) denotes the standard input.
289 .\" --------------------------------------------------------------------
291 .\" --------------------------------------------------------------------
293 This document describes the
295 program, the main front-end for the
297 document formatting system.
301 program and macro suite is the implementation of a
303 system within the free software collection
304 .URL http://\:www.gnu.org "GNU" .
308 system has all features of the classical
310 but adds many extensions.
315 program allows to control the whole
317 system by comand line options.
319 This is a great simplification in comparison to the classical case (which
323 .\" --------------------------------------------------------------------
325 .\" --------------------------------------------------------------------
329 is a wrapper program for
331 both programs share a set of options.
335 program has some additional, native options and gives a new meaning to
340 On the other hand, not all
342 options can be fed into
346 .\" --------------------------------------------------------------------
347 .SS Native groff Options
348 .\" --------------------------------------------------------------------
350 The following options either do not exist for
352 or are differently interpreted by
372 Print a help message.
376 Add search directory for
378 This option implies the
384 Send the output to a spooler program for printing.
386 The command that should be used for this is specified by the
388 command in the device description file, see
389 .BR \%groff_font (5).
390 If this command is not present, the output is piped into the
403 to the spooler program.
404 Several arguments should be passed with a separate
411 .ShortOpt\" just a minus sign
414 before passing it to the spooler program.
418 Don't allow newlines within
422 This is the same as the
433 .OptDef P "" "-option"
434 .OptDef+ P "" "-option \f[CB]-P\f[] arg"
439 to the postprocessor.
441 The option must be specified with the necessary preceding minus
446 because groff does not prepend any dashes before passing it to the
449 For example, to pass a title to the gxditview postprocessor, the shell
452 .ShellCommand groff -X -P -title -P 'groff it' \f[I]foo\f[]
456 .ShellCommand groff -X -Z \f[I]foo\f[] | gxditview -title 'groff it' -
463 No mechanism is provided for passing arguments to
467 options have equivalent language elements that can be specified within
487 and disable the following
496 For security reasons, safer mode is enabled by default.
507 The possible values in
527 are available for documents which use 12\|pt as the base document size.
529 The default device is
536 Reverts to the (old) unsafe behaviour; see option
541 Output version information of
543 and of all programs that are run by it; that is, the given command line
544 is parsed in the usual way, passing
550 Output the pipeline that would be run by
552 (as a wrapper program), but do not execute it.
558 instead of using the usual postprocessor to (pre)view a document.
560 The printing spooler behavior as outlined with options
566 by determining an argument for the
571 This sets the default
573 action and the corresponding menu entry to that value.
576 only produces good results with
584 The default resolution for previewing
586 output is 75\|dpi; this can be changed by passing the
593 .ShellCommand groff -X -P-resolution -P100 -man foo.1
597 Suppress output generated by
599 Only error messages will be printed.
603 Do not postprocess the output of
606 called automatically by
608 This will print the intermediate output to standard output; see
612 .\" --------------------------------------------------------------------
613 .SS Tranparent Options
614 .\" --------------------------------------------------------------------
616 The following options are transparently handed over to the formatter
619 that is called by groff subsequently.
621 These options are described in more detail in
625 ascii approximation of output.
628 backtrace on error or warning.
631 disable color output.
634 enable compatibility mode.
646 set default font family.
649 set path for font DESC files.
652 process standard input after the specified input files.
655 include macro file \f[I]name\f[]\f[B].tmac\f[] (or
656 \f[B]tmac.\f[]\f[I]name\f[]); see also
657 .BR \%groff_tmac (5).
660 path for macro files.
663 number the first page
683 .\" --------------------------------------------------------------------
685 .\" --------------------------------------------------------------------
689 implements the infrastructure of classical roff; see
691 for a survey on how a roff system works in general.
693 Due to the front-end programs available within the groff system, using
696 .IR "classical roff" .
698 This section gives an overview of the parts that consitute the groff
703 with groff-specific features.
705 This section can be regarded as a guide to the documentation around
709 .\" --------------------------------------------------------------------
711 .\" --------------------------------------------------------------------
715 program is a wrapper around the
719 It allows to specify the preprocessors by command line options and
720 automatically runs the postprocessor that is appropriate for the
723 Doing so, the sometimes tedious piping mechanism of classical
730 program can be used for guessing the correct groff command line to
736 program is an allround-viewer for groff files and man pages.
739 .\" --------------------------------------------------------------------
741 .\" --------------------------------------------------------------------
743 The groff preprocessors are reimplementations of the classical
744 preprocessors with moderate extensions.
746 The preprocessors distributed with the
752 for mathematical formul\(ae,
760 for drawing diagrams,
763 for bibliographic references,
766 for including macro files from standard locations,
775 Besides these, there are some internal preprocessors that are
776 automatically run with some devices.
778 These aren't visible to the user.
781 .\" --------------------------------------------------------------------
783 .\" --------------------------------------------------------------------
785 Macro packages can be included by option
788 The groff system implements and extends all classical macro packages
789 in a compatible way and adds some packages of its own.
791 Actually, the following macro packages come with
796 The traditional man page format; see
798 It can be specified on the command line as
806 The general package for man pages; it automatically recognizes
807 whether the documents uses the
811 format and branches to the corresponding macro package.
813 It can be specified on the command line as
821 The BSD-style man page format; see
822 .BR \%groff_mdoc (7).
823 It can be specified on the command line as
835 It can be specified on the command line as
847 It can be specified on the command line as
859 It can be specified on the command line as
867 HTML-like macros for inclusion in arbitrary groff documents; see
871 Details on the naming of macro files and their placement can be found
873 .BR \%groff_tmac (5).
876 .\" --------------------------------------------------------------------
877 .SS "Programming Language"
878 .\" --------------------------------------------------------------------
880 General concepts common to all roff programming languages are
885 The groff extensions to the classical troff language are documented in
886 .BR \%groff_diff (7).
889 The groff language as a whole is described in the (still incomplete)
890 .IR "groff info file" ;
891 a short (but complete) reference can be found in
895 .\" --------------------------------------------------------------------
897 .\" --------------------------------------------------------------------
899 The central roff formatter within the groff system is
901 It provides the features of both the classical troff and nroff, as
902 well as the groff extensions.
904 The command line option
909 .I "compatibility mode"
910 which tries to emulate classical roff as much as possible.
913 There is a shell script
915 that emulates the behavior of classical nroff.
917 It tries to automatically select the proper output encoding, according to
921 The formatter program generates
922 .IR "intermediate output" ;
927 .\" --------------------------------------------------------------------
929 .\" --------------------------------------------------------------------
931 In roff, the output targets are called
933 A device can be a piece of hardware, e.g. a printer, or a software
936 A device is specified by the option
938 The groff devices are as follows.
942 Text output using the
948 Text output using the EBCDIC code page IBM cp1047 (e.g. OS/390 Unix).
952 Text output using the Japanese-EUC character set.
964 For typewriter-like devices. Unlike
966 this device is 8 bit clean. This device is intended to be used
967 for codesets other than ASCII and ISO-8859-1.
970 Text output using the ISO Latin-1 (ISO 8859-1) character set; see
975 Output for Canon CAPSL printers (LBP-4 and LBP-8 series laser printers).
979 HP LaserJet4-compatible (or other PCL5-compatible) printers.
983 PostScript output; suitable for printers and previewers like
988 Text output using the Unicode (ISO 10646) character set with UTF-8
994 75dpi X Window System output suitable for the previewers
998 A variant for a 12\|pt document base font is
1003 100dpi X Window System output suitable for the previewers
1006 .BR \%gxditview (1).
1007 A variant for a 12\|pt document base font is
1011 The postprocessor to be used for a device is specified by the
1013 command in the device description file; see
1014 .BR \%groff_font (5).
1016 This can be overridden with the
1021 The default device is
1025 .\" --------------------------------------------------------------------
1027 .\" --------------------------------------------------------------------
1029 groff provides 3\~hardware postprocessors:
1033 for some Canon printers,
1036 for printers compatible to the HP LaserJet\~4 and PCL5,
1039 for text output using various encodings, e.g. on text-oriented
1040 terminals or line-printers.
1043 Today, most printing or drawing hardware is handled by the operating
1044 system, by device drivers, or by software interfaces, usally accepting
1047 Consequently, there isn't an urgent need for more hardware device
1051 The groff software devices for conversion into other document file
1065 Combined with the many existing free conversion tools this should
1066 be sufficient to convert a troff document into virtually any existing
1070 .\" --------------------------------------------------------------------
1072 .\" --------------------------------------------------------------------
1074 The following utility programs around groff are available.
1078 Add information to troff font description files for use with groff.
1082 Create font description files for PostScript device.
1086 General viewer program for groff files and man pages.
1090 The groff X viewer, the GNU version of xditview.
1094 Create font description files for lj4 device.
1098 Make inverted index for bibliographic databases.
1102 Search bibliographic databases.
1106 Interactively search bibliographic databases.
1110 Translate a PostScript font in .pfb format to ASCII.
1114 Create font description files for TeX DVI device.
1118 roff viewer distributed with X window.
1121 .\" --------------------------------------------------------------------
1123 .\" --------------------------------------------------------------------
1125 Normally, the path separator in the following environment variables is the
1126 colon; this may vary depending on the operating system.
1128 For example, DOS and Windows use a semicolon instead.
1131 .EnvVar GROFF_BIN_PATH
1132 This search path, followed by
1134 will be used for commands that are executed by
1137 If it is not set then the directory where the groff binaries were
1138 installed is prepended to
1142 .EnvVar GROFF_COMMAND_PREFIX
1143 When there is a need to run different roff implementations at the same
1146 provides the facility to prepend a prefix to most of its programs that
1147 could provoke name clashings at run time (default is to have none).
1149 Historically, this prefix was the character
1151 but it can be anything.
1165 .EnvVar GROFF_COMMAND_PREFIX
1166 to different values, the different roff installations can be
1169 More exactly, if it is set to prefix
1173 as a wrapper program will internally call
1177 This also applies to the preprocessors
1184 and to the utilities
1189 This feature does not apply to any programs different from the ones
1192 itself) since they are unique to the groff package.
1196 .EnvVar GROFF_FONT_PATH
1197 A list of directories in which to search for the
1199 directory in addition to the default ones.
1204 .BR \%groff_font (5)
1209 .EnvVar GROFF_TMAC_PATH
1210 A list of directories in which to search for macro files in addition to
1211 the default directories.
1216 .BR \%groff_tmac (5)
1221 .EnvVar GROFF_TMPDIR
1222 The directory in which temporary files will be created.
1224 If this is not set but the environment variable
1226 instead, temporary files will be created in the directory
1229 Otherwise temporary files will be created in
1237 commands use temporary files.
1241 .EnvVar GROFF_TYPESETTER
1242 Preset the default device.
1244 If this is not set the
1246 device is used as default.
1248 This device name is overwritten by the option
1252 .\" --------------------------------------------------------------------
1254 .\" --------------------------------------------------------------------
1256 There are some directories in which
1258 installs all of its data files.
1260 Due to different installation habits on different operating systems,
1261 their locations are not absolutely fixed, but their function is
1262 clearly defined and coincides on all systems.
1265 .\" --------------------------------------------------------------------
1266 .SS "groff Macro Directory"
1267 .\" --------------------------------------------------------------------
1269 This contains all information related to macro packages.
1271 Note that more than a single directory is searched for those files
1273 .BR \%groff_tmac (5).
1275 For the groff installation corresponding to this document, it is
1277 .IR /usr/share/groff/1.18.1/tmac .
1279 The following files contained in the
1280 .I groff macro directory
1281 have a special meaning:
1286 Initialization file for troff.
1288 This is interpreted by
1290 before reading the macro sets and any input.
1295 Final startup file for troff, it is parsed after all macro sets have
1303 Macro file for macro package
1307 .\" --------------------------------------------------------------------
1308 .SS "groff Font Directory"
1309 .\" --------------------------------------------------------------------
1311 This contains all information related to output devices.
1313 Note that more than a single directory is searched for those files; see
1316 For the groff installation corresponding to this document, it is
1318 .IR /usr/share/groff/1.18.1/font .
1320 The following files contained in the
1321 .I groff font directory
1322 have a special meaning:
1327 Device description file for device
1330 .BR \%groff_font (5).
1341 .\" --------------------------------------------------------------------
1343 .\" --------------------------------------------------------------------
1345 The following example illustrates the power of the
1347 program as a wrapper around
1351 To process a roff file using the preprocessors
1357 macro set, classical troff had to be called by
1360 .ShellCommand pic foo.me | tbl | troff -me -Tlatin1 | grotty
1365 this pipe can be shortened to the equivalent command
1367 .ShellCommand groff -p -t -me -T latin1 foo.me
1370 An even easier way to call this is to use
1372 to guess the preprocessor and macro options and execute the generated
1373 command (by specifying shell left quotes)
1375 .ShellCommand `grog -Tlatin1 foo.me`
1378 The simplest way is to view the contents in an automated way by
1382 .ShellCommand groffer foo.me
1385 .\" --------------------------------------------------------------------
1387 .\" --------------------------------------------------------------------
1390 On EBCDIC hosts (e.g. OS/390 Unix), output devices
1396 Similarly, output for EBCDIC code page
1398 is not available on ASCII based operating systems.
1401 Report bugs to bug-groff@gnu.org.
1403 Include a complete, self-contained example that will allow the bug to
1404 be reproduced, and say which version of groff you are using.
1407 .\" --------------------------------------------------------------------
1409 .\" --------------------------------------------------------------------
1411 Information on how to get groff and related information is available
1413 .URL http://\:www.gnu.org/\:software/\:groff "GNU website" .
1414 The most recent released version of groff is available for anonymous
1416 .URL ftp://ftp.ffii.org/\:pub/\:groff/\:devel/\:groff-current.tar.gz \
1417 "groff development site" .
1420 Three groff mailing lists are available:
1422 .MTO bug-groff@gnu.org
1427 for general discussion of groff,
1430 .MTO groff-commit@ffii.org
1431 a read-only list showing logs of commitments to the CVS repository.
1434 Details on CVS access and much more can be found in the file
1436 at the top directory of the groff source package.
1439 There is a free implementation of the
1441 preprocessor, written by
1442 .MTO faber@lunabase.org " Ted Faber" .
1444 The actual version can be found at the
1446 .URL http://\:www.lunabase.org/\:~faber/\:Vault/\:software/\:grap/ \
1448 This is the only grap version supported by groff.
1451 .\" --------------------------------------------------------------------
1453 .\" --------------------------------------------------------------------
1455 Copyright \(co 1989, 2002 Free Software Foundation, Inc.
1458 This document is distributed under the terms of the FDL (GNU Free
1459 Documentation License) version 1.1 or later.
1461 You should have received a copy of the FDL on your system, it is also
1462 available on-line at the
1463 .URL http://\:www.gnu.org/\:copyleft/\:fdl.html "GNU copyleft site" .
1466 This document is based on the original groff man page written by
1467 .MTO jjc@jclark.com "James Clark" .
1469 It was rewritten, enhanced, and put under the FDL license by
1470 .MTO bwarken@mayn.de "Bernd Warken" .
1473 .MTO wl@gnu.org "Werner Lemberg" .
1477 is a GNU free software project.
1481 are protected by GNU copyleft licenses.
1483 The software files are distributed under the terms of the GNU General
1484 Public License (GPL), while the documentation files mostly use the GNU
1485 Free Documentation License (FDL).
1488 .\" --------------------------------------------------------------------
1490 .\" --------------------------------------------------------------------
1493 .IR "groff info file"
1494 contains all information on the groff system within a single document.
1496 Beneath the detailed documentation of all aspects, it provides
1497 examples and background information.
1504 Due to its complex structure, the groff system has many man pages.
1506 They can be read with
1512 Introduction, history and further readings:
1516 Viewer for groff files:
1518 .BR \%gxditview (1),
1519 .BR \%xditview (1x).
1522 Wrapper programs for formatters:
1537 Roff language with the groff extensions:
1539 .BR \%groff_char (7),
1540 .BR \%groff_diff (7),
1541 .BR \%groff_font (5).
1544 Roff formatter programs:
1550 The intermediate output language:
1551 .BR \%groff_out (7).
1554 Postprocessors for the output devices:
1563 Groff macro packages and macro-specific utilities:
1564 .BR \%groff_tmac (5),
1565 .BR \%groff_man (7),
1566 .BR \%groff_mdoc (7),
1569 .BR \%groff_mmse (7),
1570 .BR \%groff_mom (7),
1572 .BR \%groff_www (7),
1576 The following utilities are available:
1577 .BR \%addftinfo (1),
1579 .BR \%eqn2graph (1),
1581 .BR \%gxditview (1),
1586 .BR \%pic2graph (1),
1590 .\" --------------------------------------------------------------------
1592 .\" --------------------------------------------------------------------
1594 .\" Local Variables: