1 .TH GROFFER @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
3 groffer \- display groff files and man\~pages on X and tty
6 .\" The .SH was moved to this place in order to appease `apropos'.
8 .\" --------------------------------------------------------------------
10 .\" --------------------------------------------------------------------
13 groffer.1 - man page for groffer (section 1).
15 Source file position: <groff_source_top>/contrib/groffer/groffer.man
16 Installed position: $prefix/share/man/man1/groffer.1
18 Last update : 21 May 2005
20 Source file position: <groff-source>/contrib/groffer/groffer.man
23 This file was written by Bernd Warken.
26 Copyright (C) 2001,2002,2004,2005 Free Software Foundation, Inc.
29 This file is part of groff, a free software project.
31 You can redistribute it and/or modify it under the terms of the GNU
32 General Public License as published by the Free Software Foundation;
33 either version 2, or (at your option) any later version.
36 You should have received a copy of the GNU General Public License
37 along with groff, see the files COPYING and LICENSE in the top
38 directory of the groff source package.
42 You can also write to the Free Software Foundation, 59 Temple Place -
43 Suite 330, Boston, MA 02111-1307, USA.
46 .\" --------------------------------------------------------------------
48 .\" --------------------------------------------------------------------
63 .ds Ellipsis ".\|.\|.\""
65 .\" --------------------------------------------------------------------
66 .\" setup for the macro definitions below
68 .\" naming: namespace:cathegory_macro.variable_name (experimental)
70 .\" --------------------------------------------------------------------
71 .\" configuration of prompt for `.Shell_cmd'* macros
72 .ds groffer:Shell_cmd.prompt_text sh#\" prompt for shell commands
73 .ds groffer:Shell_cmd+.prompt_text >\" prompt on continuation lines
74 .ds groffer:Shell_cmd_base.prompt_font I\" font for prompts
76 .\" automatically determine setup from the configuration above
77 .als @f groffer:Shell_cmd_base.prompt_font\"
78 .als @t groffer:Shell_cmd.prompt_text\"
79 .als @t+ groffer:Shell_cmd+.prompt_text\"
80 .ds groffer:Shell_cmd.prompt \f[\*[@f]]\*[@t]\f[]\" needed
81 .ds groffer:Shell_cmd+.prompt \f[\*[@f]]\*[@t+]\f[]\" needed
82 .nr @w \w'\*[groffer:Shell_cmd.prompt]'\"
83 .nr @w+ \w'\*[groffer:Shell_cmd+.prompt]'\"
85 .\" Full prompt width is maximum of texts plus 1m
86 .nr groffer:Shell_cmd_base.prompt_width (\n[@w]>?\n[@w+]+1m)\" needed
95 .\" --------------------------------------------------------------------
96 .\" static register for inter-macro communication in `.Synopsis'*
97 .nr groffer:Synopsis.level 0
99 .\" --------------------------------------------------------------------
100 .\" static registers for inter-macro communication in `.TP'*
101 .nr groffer:TP.level 0
102 .rr groffer:TP_header.flag
103 .rr groffer:TP_body.flag
104 .rr groffer:TP.indent
107 .\" --------------------------------------------------------------------
108 .\" Macro definitions
110 .\" Ignore all arguments like a comment, even after a .eo call.
113 .c --------------------------------------------------------------------
116 .c Print in constant-width bold font.
123 .c --------------------------------------------------------------------
126 .c Print in constant-width italic font.
133 .c --------------------------------------------------------------------
136 .c Print in constant-width roman font.
143 .c --------------------------------------------------------------------
144 .c .Error (<text>...)
146 .c Print error message to terminal and abort.
152 .c --------------------------------------------------------------------
153 .c .Env_var (<env_var_name> [<punct>])
155 .c Display an environment variable, with optional punctuation.
160 . Text \f[CB]\\$1\f[]\\$2
163 .c --------------------------------------------------------------------
164 .c .File_name (<path_name>)
166 .c Display a file or directory name in CB font.
171 .c --------------------------------------------------------------------
172 .c .Header_CB (<path_name>)
174 .c Display a line in CB font, for example after .TP
178 . Text \f[CB]\\$1\f[]\\$2
181 .c --------------------------------------------------------------------
182 .c .Opt_- ([<punct>])
184 .c Print `-' (minus sign); optional punctuation.
187 . ie (\\n[.$] == 0) \
190 . Opt_alt - "" "\\$1"
192 .c --------------------------------------------------------------------
193 .c .Opt_[-] ([<punct>])
195 .c Print `Opt_[-]' (minus sign in brackets); optional punctuation.
198 . ie (\\n[.$] == 0) \
201 . Opt_[alt] - "" "\\$1"
203 .c --------------------------------------------------------------------
204 .c .Opt_-- ([<punct>])
206 .c Print `--' (double minus); optional punctuation.
209 . ie (\\n[.$] == 0) \
212 . Opt_alt -- "" "\\$1"
214 .c --------------------------------------------------------------------
215 .c .Opt_[--] ([<punct>])
217 .c Print `Opt_[--]' (double minus in brackets); optional punctuation.
220 . ie (\\n[.$] == 0) \
223 . Opt_[alt] -- "" "\\$1"
225 .c --------------------------------------------------------------------
226 .c .Opt_alt ([<minus> <opt>]... [<arg> [<punct>]])
228 .c Alternate options separated by a vertical bar.
231 .c minus: either `-' or `--' (font CB).
232 .c opt: a name for an option, empty allowed (font CB).
233 .c arg: optionally, the argument to the option (font I).
234 .c punct: optional punctuation (in the starting font).
236 .c The minus/opt argument pairs, each
237 .c separated by a vertical bar `|', optionally add 'arg', separated
238 .c a space character ` '.
241 .c .Opt_alt - T -- device -- device-troff device .
243 .c -T|--device|--device-troff device.
246 . Opt_alt_base "" | "" \\$@
248 .c --------------------------------------------------------------------
249 .c .Opt_[alt] ([<minus> <opt>]... [<arg> [<punct>]])
251 .c Alternate options in brackets for section SYNOPSIS.
254 .c minus: either `-' or `--' (font CB).
255 .c opt: a name for an option, empty allowed (font CB).
256 .c arg: optionally, the argument to the option (font I).
257 .c punct: optional punctuation (in the starting font).
258 .c Global strings written to:
259 .c `@oa_prefix': left enclosing character (`[')
260 .c `@oa_sep': separator (`|')
261 .c `@oa_postfix': right enclosing character (`]')
263 .c The minus/opt argument pairs, each separated by a vertical
264 .c bar `|', optionally add 'arg', separated by a space character ` '.
267 .c .Opt_[alt] - T -- device -- device-troff device .
269 .c [-T|--device|--device-troff device].
272 . Opt_alt_base [ | ] \\$@
274 .c --------------------------------------------------------------------
275 .c .Opt_alt_base (<pre> <sep> <post> [<minus> <opt>]... [arg [punct]])
277 .c Alternating options; base macro for many others; do not use directly.
280 .c <pre>: prefix, result is preceded by this.
281 .c <sep>: separator between minus/opt pairs.
282 .c <post>: postfix, is appended to the result.
283 .c <minus>: either `-' or `--' (font CB).
284 .c <opt>: a name for an option, empty allowed (font CB).
285 .c <arg>: optionally, the argument to the option (font I).
286 .c <punct>: optional punctuation (in the starting font).
288 .c String `<pre>' followed by the <minus>/<opt> argument pairs, each
289 .c separated by string `<sep>', optionally add '<arg>', separated by
290 .c a single space ` ', followed by the string `<post>'. Terminated
291 .c by the optional punctuation <punct>.
296 . Error .\\0: not enough arguments.
297 . ds @pre \)\\$1\)\" prefix
298 . ds @sep \)\\$2\)\" separator
299 . ds @post \)\\$3\)\" postfix
302 . ds @res \f[CR]\\*[@pre]\"
303 . while (\\n[.$] >= 2) \{\
304 . c do the pairs, break on no `-'
310 . if (\\n[@count] > 0) \
311 . as @res \f[CR]\\*[@sep]\:\"
313 . c combine minus with option name
314 . as @res \f[CB]\\-\"
320 . if (\\n[.$] >= 3) \
321 . Error .\\0: wrong arguments: \\$@
322 . c all pairs are done
323 . ie (\\n[.$] == 0) \
324 . as @res \f[CR]\\*[@post]\"
326 . c optional option argument
328 . as @res \f[CR] \,\f[I]\\$1\"
331 . as @res \\f[CR]\\*[@post]\"
332 . if (\\n[.$] >= 1) \{\
334 . as @res \f[\\n[@font]]\\$1\"
348 .c --------------------------------------------------------------------
349 .c .Opt_def ([<minus> <opt>]... [<arg> [<punct>]])
351 .c Definitions of options in section OPTIONS.
354 .c minus: either `-' or `--' (font CB).
355 .c opt: a name for an option, empty allowed (font CB).
356 .c arg: optionally, the argument to the option (font I).
357 .c punct: optional punctuation (in the starting font).
359 .c The header for an indented paragraph, consisting of
360 .c minus/opt argument pairs, each, separated by a space
361 .c character ` ', optionally add 'arg', separated a space
365 .c .Opt_def - T -- device -- device-troff device .
367 .c -T --device --device-troff device.
368 .c as the header of for indented paragraph.
372 . Opt_alt_base "" "\~|\~" "" \\$@
374 .c --------------------------------------------------------------------
375 .c .Opt_element ([<minus> <opt>]... [<arg> [<punct>]])
377 .c Definitions of options in section OPTIONS.
380 .c minus: either `-' or `--' (font CB).
381 .c opt: a name for an option, empty allowed (font CB).
382 .c arg: optionally, the argument to the option (font I).
383 .c punct: optional punctuation (in the starting font).
385 .c The minus/opt argument pairs, each, separated by a space
386 .c character ` ', optionally add 'arg', separated a space
390 .c .Opt_element - T -- device -- device-troff device .
392 .c -T --device --device-troff device.
395 . Opt_alt_base "" "\~" "" \\$@
397 .c --------------------------------------------------------------------
398 .als Opt_list Opt_element
400 .c --------------------------------------------------------------------
401 .c .Opt_long ([<name> [<punct>]])
403 .c Print `--name' somewhere in the text; optional punctuation.
406 . Opt_alt -- "\\$1" "" "\\$2"
408 .c --------------------------------------------------------------------
409 .c .Opt_long_arg ([<name> <arg> [<punct>]])
411 .c Print `--name=arg' somewhere in the text; optional punctuation.
414 . Opt_alt -- "\\$1=\\$2" "" "\\$3"
416 .c --------------------------------------------------------------------
417 .c .Opt_[long] ([<name> [<punct>]])
419 .c Print `--name' somewhere in the text; optional punctuation.
422 . Opt_[alt] -- "\\$1" "" "\\$2"
424 .c --------------------------------------------------------------------
425 .c .Opt_short ([<name> [<punct>]])
427 .c Print `-name' somewhere in the Text; optional punctuation.
430 . Opt_alt - "\\$1" "" "\\$2"
432 .c --------------------------------------------------------------------
433 .c .Opt_[short] ([name [punct]])
435 .c Print `[-name]' somewhere in the Text; optional punctuation.
438 . Opt_[alt] - "\\$1" "" "\\$2"
440 .c --------------------------------------------------------------------
441 .c .Shell_cmd (<CR> [<CI>] ...)
443 .c A shell command line; display args alternating in fonts CR and CI.
446 .c .Shell_cmd "groffer --dpi 100 file"
447 .c result: `sh# groffer --dpi 100 file'
448 .c with 'sh#' in font I, the rest in CR
450 .c .Shell_cmd groffer\~--dpi\~100\~file
451 .c result: the same as above
453 .c .Shell_cmd "groffer --dpi=" value " file"
454 .c result: sh# groffer --dpi=value file
455 .c with `groffer --dpi=' and `file' in CR; `value' in CI
457 .c .Shell_cmd groffer\~--dpi= value \~file
458 .c result: the same as the previous example
461 . groffer:Shell_cmd_base "\*[groffer:Shell_cmd.prompt]" \\$@
463 .c --------------------------------------------------------------------
464 .c .Shell_cmd+ (<CR> [<CI>] ...)
466 .c A continuation line for .Shell_cmd.
469 . groffer:Shell_cmd_base "\*[groffer:Shell_cmd+.prompt]" \\$@
471 .c --------------------------------------------------------------------
472 .c .Shell_cmd_base (<prompt> [<CR> [<CI>] ...])
474 .c A shell command line; display args alternating in fonts CR and CI.
475 .c Internal, do not use directly.
477 .c Globals: read-only register @.Shell_cmd_width
479 .de groffer:Shell_cmd_base
480 . if (\\n[.$] <= 0) \
482 . nr @+font \\n[.f]\"
485 . c gap between prompt and command
486 . nr @+gap \\n[groffer:Shell_cmd_base.prompt_width]-\\w'\\*[@prompt]'\"
487 . ds @res \\*[@prompt]\h'\\n[@+gap]u'\"
490 . while (\\n[.$] > 0) \{\
491 . as @res \\f[\\*[@cf]]\\$1\"
513 .c --------------------------------------------------------------------
516 .c Begin a synopsis section, to be ended by a ./Synopsis macro.
519 . if (\\n[groffer:Synopsis.level] > 0) \
520 . Error .\\$0: previous .Synopsis was not closed by ./Synopsis.
523 . nr @old_indent \\n(.i
525 . in +\w'\fB\\*[@1]\0'u
526 . ti \\n[@old_indent]u
530 . nr groffer:Synopsis.level +1\" marker for ./Synopsis
532 .c --------------------------------------------------------------------
535 .c Close a synopsis section opened by the previous .Synopsis macro.
538 . if (\\n[groffer:Synopsis.level] <= 0) \
539 . Error .\\$0: no previous call of .Synopsis
544 . nr groffer:Synopsis.level -1
546 .c --------------------------------------------------------------------
549 .c Treat the arguments as text, no matter how they look.
552 . if (\\n[.$] == 0) \
558 .c --------------------------------------------------------------------
559 .c .Topic ([<indent>])
561 .c A bulleted paragraph
572 .c --------------------------------------------------------------------
575 .c Continuation line for .TP header.
582 .c --------------------------------------------------------------------
583 .c .TP_header ([<indent>])
585 .c Start a multi-line header for a .TP-like paragraph
588 . if (\\n[groffer:TP.level] < 0) \
589 . Error .\\$0: wrong level.
590 . nr groffer:TP.level +1
592 . ie (\\n[.$] == 0) \
593 . rr groffer:TP.indent
595 . nr groffer:TP.indent \\$1
596 . nr groffer:TP_header.flag 1
598 .c --------------------------------------------------------------------
599 .c .TP_body ([<indent>])
601 .c End a previous .TP-header and beging the body of the paragraph.
604 . if !rgroffer:TP_header.flag \
605 . Error .\\$0: no previous call of .TP_header
606 . if (\\n[groffer:TP.level] <= 0) \
607 . Error .\\$0: wrong level.
609 . ie (\\n[.$] == 0) \{\
610 . ie rgroffer:TP.indent \{\
611 . RS \\n[groffer:TP.indent]u
618 . rr groffer:TP.indent
619 . rr groffer:TP_header.flag
620 . nr groffer:TP_body.flag 1
622 .c --------------------------------------------------------------------
625 .c End of former .TP_body paragraph.
628 . if !rgroffer:TP_body.flag \
629 . Error .\\$0: no previous .TP_body.
630 . if (\\n[groffer:TP.level] <= 0) \
631 . Error TP_end: wrong level.
632 . nr groffer:TP.level -1
633 . rr grogger:TP.indent
634 . rr groffer:TP_header.flag
635 . rr groffer:TP_body.flag
640 .\" End of macro definitions
643 .\" --------------------------------------------------------------------
645 .\" --------------------------------------------------------------------
651 .RI [ "filespec" "\*[Ellipsis]]"
655 .Opt_alt -- apropos -- apropos-data -- apropos-devel -- apropos-progs name
663 .Opt_alt - v -- version
667 .\" --------------------------------------------------------------------
669 .\" --------------------------------------------------------------------
673 program is the easiest way to use
674 .BR \%groff (@MAN1EXT@).
675 It can display arbitrary documents written in the
676 .BR \%groff (@MAN7EXT@)
678 .BR \%roff (@MAN7EXT@)
679 languages that are compatible to the original
685 program also includes many of the features for finding and displaying
686 the \%UNIX manual pages
690 such that it can be used as a replacement for a
694 Moreover, compressed files that can be handled by
698 are decompressed on-the-fly.
702 The normal usage is quite simple by supplying a file name or name of a
703 man\~page without further options.
705 But the option handling has many possibilities for creating special
708 This can be done in configuration files, with the shell environment
711 or on the command line.
715 The output can be generated and viewed in several different ways
722 .BR \%gxditview (@MAN1EXT@),
725 display program, a web browser by generating
727 in www-mode, or several text modes in text terminals.
731 Most of the options that must be named when running
733 directly are determined automatically for
735 due to the internal usage of the
736 .BR \%grog (@MAN1EXT@)
739 But all parts can also be controlled manually by arguments.
743 Several file names can be specified on the command line arguments.
745 They are transformed into a single document in the normal way of
749 .\" --------------------------------------------------------------------
750 .SH "OPTION OVERVIEW"
751 .\" --------------------------------------------------------------------
757 .Opt_[alt] -- apropos name
758 .Opt_[alt] -- apropos\-data name
759 .Opt_[alt] -- apropos\-devel name
760 .Opt_[alt] -- apropos\-progs name
761 .Opt_[alt] - h -- help
762 .Opt_[alt] - v -- version
767 .I \%groffer mode options
771 .Opt_[alt] -- default
772 .Opt_[alt] -- default\-modes mode1,mode2,\*[Ellipsis]
774 .Opt_[alt] -- dvi\-viewer prog
777 .Opt_[alt] -- html\-viewer prog
779 .Opt_[alt] -- mode display_mode
782 .Opt_[alt] -- pdf\-viewer prog
784 .Opt_[alt] -- ps\-viewer prog
787 .Opt_[alt] -- tty\-viewer prog
789 .Opt_[alt] -- www\-viewer prog
791 .Opt_[alt] -- x\-viewer -- X\-viewer prog
796 .I development options
805 .I options related to \%groff
808 .Opt_[alt] - P -- postproc\-arg opt_or_arg
809 .Opt_[alt] - Q -- source
810 .Opt_[alt] - T -- device device
811 .Opt_[alt] - Z -- intermediate\-output -- ditroff
815 short options are accepted.
820 .I X Window toolkit options
823 .Opt_[alt] -- bd pixels
824 .Opt_[alt] -- bg -- background color
825 .Opt_[alt] -- bw pixels
826 .Opt_[alt] -- display X-display
827 .Opt_[alt] -- fg -- foreground color
828 .Opt_[alt] -- ft -- font font_name
829 .Opt_[alt] -- geometry size_pos
830 .Opt_[alt] -- resolution value
832 .Opt_[alt] -- title string
833 .Opt_[alt] -- xrm X_resource
843 .Opt_[alt] -- ditroff
844 .Opt_[alt] -- extension suffix
845 .Opt_[alt] -- locale language
846 .Opt_[alt] -- local-file
847 .Opt_[alt] -- manpath dir1:dir2:\*[Ellipsis]
848 .Opt_[alt] -- pager program
849 .Opt_[alt] -- sections sec1:sec2:\*[Ellipsis]
850 .Opt_[alt] -- systems sys1,sys2,\*[Ellipsis]
851 .Opt_[alt] -- troff-device device
854 Further long options of GNU
856 are accepted as well.
866 parameters means standard input.
871 stands for standard input (can occur several times).
876 the path name of an existing file.
880 .BI man: name ( section )
897 search for a man\~page
905 man\~page in the lowest man\~section that has
915 search for a man\~page
925 is not an existing file search for the man\~page
927 in the lowest man\~section.
932 .\" --------------------------------------------------------------------
934 .\" --------------------------------------------------------------------
938 program can usually be run with very few options.
940 But for special purposes, it supports many options.
942 These can be classified in 5 option classes.
948 are compatible with the short options of
949 .BR \%groff (@MAN1EXT@).
953 are compatible with the long options of
957 .\" --------------------------------------------------------------------
958 .SS "groffer breaking Options"
959 .\" --------------------------------------------------------------------
961 As soon as one of these options is found on the command line it is
962 executed, printed to standard output, and the running
964 is terminated thereafter.
966 All other arguments are ignored.
969 .Opt_def -- apropos name
972 command for searching within man\~page
975 That slightly differs from the strange behavior of the
979 which has no argument of its own, but takes the file arguments
982 Practically both concepts are compatible.
985 .Opt_def -- apropos\-data name
988 descriptions for data documents, in the
990 sections 4, 5, and 7.
993 .Opt_def -- apropos\-devel name
996 descriptions for development documents, in the
998 sections 2, 3, and 9.
1001 .Opt_def -- apropos\-progs name
1004 descriptions for documents on programs, in the
1006 sections 1, 6, and 8.
1009 .Opt_def - h -- help
1010 Print a helping information with a short explanation of option sto
1014 .Opt_def - v -- version
1015 Print version information to standard output.
1018 .\" --------------------------------------------------------------------
1019 .SS "groffer Mode Options"
1020 .\" --------------------------------------------------------------------
1022 The display mode and the viewer programs are determined by these
1025 If none of these mode and viewer options is specified
1027 tries to find a suitable display mode automatically.
1032 .Opt_long_arg mode auto .
1036 Reset all configuration from previously processed command line options
1037 to the default values.
1039 This is useful to wipe out all former options of the configuration, in
1040 .Env_var $GROFFER_OPT ,
1041 and restart option processing using only the rest of the command line.
1044 .Opt_def -- default\-modes mode1,mode2,\*[Ellipsis]
1045 Set the sequence of modes for
1047 to the comma separated list given in the argument.
1051 for details on modes. Display in the default manner; actually, this
1052 means to try the modes
1063 .Opt_long_arg mode \%dvi .
1066 .Opt_def -- dvi\-viewer prog
1067 Set the viewer program for dvi mode.
1069 This can be a file name or a program to be searched in
1079 In each case, arguments can be provided additionally.
1084 .Opt_long_arg mode groff .
1089 .Opt_long_arg mode html .
1092 .Opt_def -- html\-viewer
1093 Set the web browser program for viewing in
1097 Each program that accepts html input and allows the
1098 .BI \%file://localhost/ dir / file
1099 syntax on the command line is suitable as viewer program; it can be
1100 the path name of an executable file or a program in
1103 In each case, arguments can be provided additionally.
1106 .Opt_def -- mode value
1108 Set the display mode.
1110 The following mode values are recognized:
1116 Select the automatic determination of the display mode.
1118 The sequence of modes that are tried can be set with the
1119 .Opt_long default\-modes
1122 Useful for restoring the default mode when a different mode was
1128 Display formatted input in a
1132 By default, the formatted input is displayed with the
1140 After the file determination, switch
1142 to process the input like
1143 .BR \%groff (@MAN1EXT@)
1153 Translate the input into html format and display the result in a web
1156 By default, the existence of a sequence of standard web browsers is
1157 tested, starting with
1161 The text html viewer is
1167 Display formatted input in a
1169 (Portable Document Format) viewer
1172 By default, the input is formatted by groff using the Postscript
1173 device, then it is transformed into the PDF file format using
1175 and finally displayed either with the
1181 PDF has a big advantage because the text is displayed graphically and
1182 is searchable as well.
1184 But as the transformation takes a considerable amount of time, this
1185 mode is not suitable as a default device for the auto mode.
1190 Display formatted input in a Postscript viewer program.
1192 By default, the formatted input is displayed with the
1193 .BR \%ghostview (@MAN1EXT@)
1201 text mode and write the result to standard output without a pager or
1206 by default, can be chosen with option
1214 text mode and write the result to standard output using a text pager
1215 program, even when in X\~\%Window.
1221 .Opt_long_arg mode html .
1226 Display formatted input in a native roff viewer.
1228 By default, the formatted input is displayed with the
1229 .BR \%gxditview (@MAN1EXT@)
1230 program, being distributed together with groff, or with
1232 which is distributed as a standard X tool.
1238 .Opt_long_arg mode X .
1242 The following modes do not use the
1246 They are only interesting for advanced applications.
1251 Generate device output with plain
1253 without using the special viewing features of
1255 If no device was specified by option
1266 Display the source code of the input without formatting; equivalent to
1275 .Opt_long_arg mode pdf .
1278 .Opt_def -- pdf-viewer prog
1279 Set the viewer program for
1283 This can be a file name or a program to be searched in
1286 In each case, arguments can be provided additionally.
1291 .Opt_long_arg mode ps .
1294 .Opt_def -- ps-viewer prog
1295 Set the viewer program for
1299 This can be a file name or a program to be searched in
1302 Common Postscript viewers inlude
1304 .BR \%ghostview (1),
1308 In each case, arguments can be provided additionally.
1313 .Opt_long_arg mode text .
1318 .Opt_long_arg mode tty .
1321 .Opt_def -- tty\-viewer
1322 Choose tty display mode, that means displaying in a text pager even
1323 when in X; eqivalent to
1324 .Opt_long_arg mode tty .
1329 .Opt_long_arg mode html .
1332 .Opt_def -- www\-viewer prog
1334 .Opt_long html\-viewer .
1337 .Opt_def - X -- X -- x
1339 .Opt_long_arg mode X .
1342 .Opt_def -- X\-viewer -- x\-viewer prog
1343 Set the viewer program for
1347 Suitable viewer programs are
1348 .BR \%gxditview (@MAN1EXT@)
1352 But the argument can be any executable file or a program in
1355 In each case, arguments can be provided additionally.
1360 Signals the end of option processing; all remaining arguments are
1369 accepts all arguments that are valid for the
1370 .BR \%groff (@MAN1EXT@)
1373 All non-groffer options are sent unmodified via
1378 Postprocessors, macro packages, compatibility with classical
1380 and much more can be manually specified.
1383 .\" --------------------------------------------------------------------
1384 .SH "Options for Development"
1385 .\" --------------------------------------------------------------------
1388 Print debugging information for development only.
1390 Actually, a function call stack is printed if an error occurs.
1393 .Opt_def -- shell "shell_program"
1394 Specify the shell under which the groffer script should be run.
1396 The script first tests whether this option is set (either by
1397 configuration, within
1399 or as a command line option); if so, the script is rerun under the
1400 shell program specified with the option argument.
1403 .Opt_def - Q -- source
1404 Output the roff source code of the input files without further
1407 This is the equivalent
1408 .Opt_long_arg mode source .
1412 Other useful debugging options are the
1419 .Opt_long_arg mode groff .
1422 .\" --------------------------------------------------------------------
1423 .SH "Options related to groff"
1424 .\" --------------------------------------------------------------------
1426 All short options of
1428 are compatible with the short options of
1429 .BR \%groff (@MAN1EXT@).
1433 options have either an additional special meaning within
1435 or make sense for normal usage.
1439 Because of the special outputting behavior of the
1446 was designed to be switched into
1450 viewing features are disabled there.
1454 options do not switch the mode, but allow to customize the formatting
1459 This generates an ascii approximation of output in text modes.
1461 That could be important when the text pager has problems with control
1472 This is useful in case it cannot be recognized automatically.
1475 .Opt_def - P opt_or_arg
1478 as an option or option argument to the actual
1483 .Opt_def - T -- device devname
1485 This option determines
1489 The most important devices are the text output devices for referring
1490 to the different character sets, such as
1496 Each of these arguments switches
1498 into a text mode using this device, to
1500 if the actual mode is not a text mode.
1504 arguments are mapped to the corresponding
1506 .Opt_long_arg mode \fIdevname\fR
1514 arguments are mapped to mode
1518 argument switches to
1526 mode and show only the
1528 calling pipe without formatting the input.
1530 This an advanced option from
1531 .BR \%groff (@MAN1EXT@) ,
1532 only useful for debugging.
1536 was made equivalent to
1537 .Opt_long_arg mode x ;
1538 this slightly enhances the facility of
1543 .Opt_def - Z -- intermediate-output -- ditroff
1546 mode and format the input with
1548 intermediate output without postprocessing; see
1549 .BR \%groff_out (@MAN1EXT@).
1550 This is equivalent to option
1554 which can be used as well.
1560 options are supported by
1562 but they are just transparently transferred to
1564 without any intervention.
1566 The options that are not explicitly handled by
1568 are transparently passed to
1571 Therefore these transparent options are not documented here, but in
1572 .BR \%groff (@MAN1EXT@).
1573 Due to the automatism in
1577 options should be needed, except for advanced usage.
1580 .\" --------------------------------------------------------------------
1581 .SS "X Window toolkit Options"
1582 .\" --------------------------------------------------------------------
1584 The following long options were adapted from the corresponding X
1588 will pass them to the actual viewer program if it is an X Window
1591 Otherwise these options are ignored.
1595 Unfortunately these options use the old style of a single minus for
1600 that was changed to the standard with using a double minus for long
1601 options, for example,
1615 and the documentation on the X toolkit options for more details on
1616 these options and their arguments.
1619 .Opt_def -- background color
1620 Set the background color of the viewer window.
1623 .Opt_def -- bd pixels
1624 Specifies the color of the border surrounding the viewer window.
1627 .Opt_def -- bg color
1628 This is equivalent to
1629 .Opt_long background .
1632 .Opt_def -- bw pixels
1633 Specifies the width in pixels of the border surrounding the viewer
1637 .Opt_def -- display X-display
1638 Set the X display on which the viewer program shall be started, see the
1640 documentation for the syntax of the argument.
1643 .Opt_def -- foreground color
1644 Set the foreground color of the viewer window.
1647 .Opt_def -- fg color
1648 This is equivalent to
1649 .Opt_short foreground .
1652 .Opt_def -- font font_name
1653 Set the font used by the viewer window.
1655 The argument is an X font name.
1658 .Opt_def -- ft font_name
1659 This is equivalent to
1663 .Opt_def -- geometry size_pos
1664 Set the geometry of the display window, that means its size and its
1669 for the syntax of the argument.
1672 .Opt_def -- resolution value
1673 Set X resolution in dpi (dots per inch) in some viewer programs.
1675 The only supported dpi values are
1680 Actually, the default resolution for
1687 Reverse foreground and background color of the viewer window.
1690 .Opt_def -- title "'some text'"
1691 Set the title for the viewer window.
1694 .Opt_def -- xrm "'resource'"
1698 .\" --------------------------------------------------------------------
1699 .SS "Options for man"
1700 .\" --------------------------------------------------------------------
1704 were synchronized with the long options of
1709 are recognized, but not all of these options are important to
1711 so most of them are just ignored.
1715 The following two options were added to
1717 for choosing whether the file name arguments are interpreted as names
1718 for local files or as a search pattern for man pages.
1720 The default is looking up for local files.
1724 Check the non-option command line arguments
1728 first on being man\~pages, then whether they represent an existing
1733 is first tested whether it is an existing file.
1736 .Opt_def -- no-man -- local-file
1737 Do not check for man\~pages.
1739 .Opt_long local-file
1740 is the corresponding
1746 In the following, the
1748 options that have a special meaning for
1754 The full set of long and short options of the
1756 program can be passed via the environment variable
1766 In searching man\~pages, retrieve all suitable documents instead of
1770 .Opt_def - 7 -- ascii
1771 In text modes, display ASCII translation of special characters.
1780 .Opt_def -- extension suffix
1781 Restrict man\~page search to file names that have
1783 appended to their section element.
1785 For example, in the file name
1786 .I \%/usr/share/man/man3/terminfo.3ncurses.gz
1787 the man\~page extension is
1791 .Opt_def -- locale language
1793 Set the language for man pages.
1795 This has the same effect, but overwrites
1799 .Opt_def -- location
1800 Print the location of the retrieved files to standard error.
1803 .Opt_def -- no-location
1804 Do not display the location of retrieved files; this resets a former
1806 .Opt_long location .
1812 .Opt_def -- manpath "'dir1:dir2:\*[Ellipsis]'"
1813 Use the specified search path for retrieving man\~pages instead of the
1816 If the argument is set to the empty string "" the search for man\~page
1821 Set the pager program in tty mode; default is
1823 This is equivalent to
1824 .Opt_long tty-viewer .
1827 .Opt_def -- sections "'sec1:sec2:\*[Ellipsis]'"
1828 Restrict searching for man\~pages to the given
1830 a colon-separated list.
1833 .Opt_def -- systems "'sys1,sys2,\*[Ellipsis]'"
1834 Search for man pages for the given operating systems; the argument
1836 is a comma-separated list.
1840 Instead of displaying the content, get the one-liner description from
1841 the retrieved man\~page files \[em] or say that it is not a man\~page.
1846 .Opt_long location .
1850 Additionally, the following short option of
1852 is supported as well.
1855 .\" --------------------------------------------------------------------
1856 .SS "Filespec Arguments"
1857 .\" --------------------------------------------------------------------
1861 parameter is an argument meaning an input source, such as a file name
1862 or template for searching man\~pages.
1864 These input sources are collected and composed into a single output
1871 The strange POSIX behavior that maps all arguments behind the first
1872 non-option argument into
1874 arguments is ignored.
1876 The GNU behavior to recognize options even when mixed with
1878 arguments is used througout.
1880 But, as usual, the double minus argument
1882 still takes all following arguments as
1890 parameters can have one of the following forms.
1896 parameters means that
1898 waits for standard input.
1902 stands for standard input, too, but can occur several times.
1906 is tested whether it is the path name of an existing file.
1908 Otherwise it is assumed as a searching pattern for a man\~page.
1912 On each system, the man pages are sorted according to their content
1913 into several sections.
1916 .I classical man sections
1917 have a single-character name, either are a digit from
1921 or one of the characters
1926 In the following, a stand-alone character
1932 The internal precedence of
1934 for searching man pages with the same name within several sections
1935 goes according to the classical single-character sequence.
1937 On some systems, this single character can be extended by a following
1942 man\~page facility is based on the classical single character sections.
1946 .BI \%man: name ( section )
1948 .IB \%name ( section )
1949 search the man\~page
1955 can be any string, but it must exist in the
1961 Next some patterns based on the
1962 .I classical man sections
1968 search for a man\~page
1975 .I classical man section
1978 Otherwise search for a man\~page named
1988 searches for a man\~page in the lowest man\~section that has a
1996 originates from a strange argument parsing of the
2003 .I classical man section
2004 interpret it as a search for a man\~page called
2010 as a file argument and
2018 We are left with the argument
2020 which is not an existing file.
2022 So this searches for the man\~page called
2024 in the lowest man\~section that has a document for this name.
2028 Several file name arguments can be supplied.
2032 into a single document.
2034 Note that the set of option arguments must fit to all of these file
2037 So they should have at least the same style of the
2042 .\" --------------------------------------------------------------------
2044 .\" --------------------------------------------------------------------
2048 program collects all input into a single file, formats it with the
2050 program for a certain device, and then chooses a suitable viewer
2053 The device and viewer process in
2058 The mode and viewer of a running
2060 program is selected automatically, but the user can also choose it
2064 The modes are selected by option the arguments of
2065 .Opt_long_arg mode \fIanymode .
2066 Additionally, each of this argument can be specified as an option of
2068 .Opt_long \fIanymode .
2069 Most of these modes have a viewer program, which can be chosen by an
2070 option that is constructed like
2071 .Opt_long \fIanymode\fR-viewer .
2075 Several different modes are offered, graphical X modes, text modes,
2078 modes for debugging and development.
2086 mode is possible, then
2092 This mode testing sequence for
2094 mode can be changed by specifying a comma separated list of modes
2096 .Opt_long default\-modes.
2100 The searching for man\~pages and the decompression of the input are
2101 active in every mode.
2104 .\" --------------------------------------------------------------------
2105 .SS "Graphical Display Modes"
2106 .\" --------------------------------------------------------------------
2108 The graphical display modes work only in the
2109 .I X\~Window environment
2110 (or similar implementations within other windowing environments).
2112 The environment variable
2116 are used for specifying the X display to be used.
2118 If neither is given,
2120 assumes that no X and changes to one text mode.
2122 You can change this automatic behavior by the option
2123 .Opt_long default\-modes .
2127 Known viewers for the graphical display modes and their standard X
2128 Window viewer progams are
2131 X Window roff viewers such as
2132 .BR \%gxditview (@MAN1EXT@)
2142 in a Postscript viewer
2149 in a dvi viewer program
2176 mode has a major advantage \[em] it is the only graphical diplay mode
2177 that allows to search for text within the viewer; this can be a really
2180 Unfortunately, it takes some time to transform the input into the PDF
2181 format, so it was not chosen as the major mode.
2185 These graphical viewers can be customized by options of the X Window
2190 options use a leading double minus instead of the single minus used by
2196 .\" --------------------------------------------------------------------
2198 .\" --------------------------------------------------------------------
2200 There are to modes for text output, mode
2202 for plain output without a pager and mode
2204 for a text output on a text terminal using some pager program.
2210 is not set or empty, groffer assumes that it should use
2216 In the actual implementation, the groff output device
2218 is chosen for text modes.
2220 This can be changed by specifying option
2227 The pager to be used can be specified by one of the options
2230 .Opt_long tty-viewer ,
2231 or by the environment variable
2233 If all of this is not used the
2235 program with the option
2237 for correctly displaying control sequences is used as the default
2241 .\" --------------------------------------------------------------------
2242 .SS "Special Modes for Debugging and Development"
2243 .\" --------------------------------------------------------------------
2247 file determination and decompression.
2249 This is combined into a single input file that is fed directly into
2251 with different strategy without the
2255 These modes are regarded as advanced, they are useful for debugging
2256 and development purposes.
2262 mode with just displays the generated input.
2266 mode passes the input to
2268 using only some suitable options provided to
2271 This enables the user to save the generated output into a file or pipe
2272 it into another program.
2280 disables post-processing, thus producing the
2282 .I groff intermediate
2286 In this mode, the input is formatted, but not postprocessed; see
2287 .BR \%groff_out (@MAN5EXT@)
2294 short options are supported by
2298 .\" --------------------------------------------------------------------
2299 .SH "MAN\~PAGE\~SEARCHING"
2300 .\" --------------------------------------------------------------------
2302 The default behavior of groffer is to first test whether a file
2303 parameter represents a local file; if it is not an existing file name,
2304 it is assumed to represent a name of a man\~page.
2306 This behavior can be modified by the following options.
2311 forces to interpret all file parameters as filespecs for searching
2317 .Opt_long local\-file
2318 disable the man searching; so only local files are displayed.
2322 If neither a local file nor a man\~page was retrieved for some file
2323 parameter a warning is issued on standard error, but processing is
2328 The groffer program provides a search facility for man\~pages.
2330 All long options, all environment variables, and most of the
2331 functionality of the GNU
2333 program were implemented.
2335 This inludes the extended file names of man\~pages, for example,
2338 in man\~section 7 may be stored under
2339 .File_name /usr/share/man/man7/groff.7.gz ,
2341 .File_name /usr/share/man/
2342 is part of the man\~path, the subdirectory
2344 and the file extension
2346 refer to the man\~section 7;
2348 shows the compression of the file.
2354 (preformatted man\~pages) are intentionally excluded from the search
2355 because groffer is a roff program that wants to format by its own.
2357 With the excellent performance of the actual computers, the
2358 preformatted man\~pages aren't necessary any longer.
2362 The algorithm for retrieving man\~pages uses five search methods.
2364 They are successively tried until a method works.
2368 The search path can be manually specified by using the option
2370 An empty argument disables the man\~page searching.
2372 This overwrites the other methods.
2376 If this is not available the environment variable
2382 If this is empty, the program tries to read it from the environment
2388 If this does not work a reasonable default path from
2390 is searched for man\~pages.
2394 If this does not work, the
2396 program for determining a path of man directories is tried.
2400 After this, the path elements for the language (locale) and operating
2401 system specific man\~pages are added to the man\~path; their sequence
2402 is determined automatically.
2405 .File_name /usr/share/man/linux/fr
2407 .File_name /usr/share/man/fr/linux
2408 for french linux man\~pages are found.
2410 The language and operating system names are determined from both
2411 environment variables and command line options.
2415 The locale (language) is determined like in GNU man, that is from
2416 highest to lowest precedence:
2421 .Env_var $GROFFER_OPT
2430 .Env_var $LC_MESSAGES
2437 The language locale is usually specified in the POSIX 1003.1 based
2441 \f[I]<language>\f[][\f[CB]_\f[]\f[I]<territory>\f[][\f[CB].\f[]\
2442 \f[I]<character-set>\f[][\f[CB],\f[]\f[I]<version>\f[]]]],
2445 but the two-letter code in
2449 is sufficient for most purposes.
2453 If no man\~pages for a complicated locale are found the country part
2454 consisting of the first two characters (without the `\f[CB]_\f[]',
2455 `\f[CB].\f[]', and `\f[CB],\f[]' parts) of the locale is searched as
2460 If still not found the corresponding man\~page in the default language
2463 As usual, this default can be specified by one of \f[CR]C\f[] or
2466 The man\~pages in the default language are usually in English.
2470 Several operating systems can be given by appending their names,
2471 separated by a comma.
2473 This is then specified by the environment variable
2475 or by the command line option
2477 The precedence is similar to the locale case above from highest to
2484 .Env_var $GROFFER_OPT
2494 When searching for man\~pages this man\~path with the additional
2495 language and system specific directories is used.
2499 The search can further be restricted by limiting it to certain
2502 A single section can be specified within each filespec argument,
2503 several sections as a colon-separated list in command line option
2505 or environment variable
2508 When no section was specified a set of standard sections is searched
2509 until a suitable man\~page was found.
2513 Finally, the search can be restricted to a so-called
2515 This is a postfix that acts like a subsection.
2517 It can be specified by
2519 or environment variable
2520 .Env_var $EXTENSION .
2524 For further details on man\~page searching, see
2528 .\" --------------------------------------------------------------------
2530 .\" --------------------------------------------------------------------
2532 The program has a decompression facility.
2534 If standard input or a file that was retrieved from the command line
2535 parameters is compressed with a format that is supported by either
2539 it is decompressed on-the-fly.
2541 This includes the GNU
2548 The program displays the concatenation of all decompressed input in
2549 the sequence that was specified on the command line.
2552 .\" --------------------------------------------------------------------
2554 .\" --------------------------------------------------------------------
2556 The groffer programs supports many system variables, most of them by
2557 courtesy of other programs.
2559 All environment variables of
2560 .BR \%groff (@MAN1EXT@)
2563 and some standard system variables are honored.
2566 .\" --------------------------------------------------------------------
2567 .SS "Native groffer Variables"
2568 .\" --------------------------------------------------------------------
2571 .Env_var $GROFFER_OPT
2572 Store options for a run of groffer.
2574 The options specified in this variable are overridden by the options
2575 given on the command line.
2577 The content of this variable is run through the shell builtin `eval';
2578 so arguments containing white-space or special shell characters should
2582 .\" --------------------------------------------------------------------
2583 .SS "System Variables"
2584 .\" --------------------------------------------------------------------
2586 The groffer program is a shell script that is run through
2587 .File_name /bin/sh ,
2588 which can be internally linked to programs like
2590 The corresponding system environment is automatically effective.
2592 The following variables have a special meaning for groffer.
2597 If this variable is set this indicates that the X Window system is
2600 Testing this variable decides on whether graphical or text output is
2603 This variable should not be changed by the user carelessly, but it can
2604 be used to start the graphical groffer on a remote X terminal.
2606 For example, depending on your system, groffer can be started on the
2607 second monitor by the command
2608 .Shell_cmd DISPLAY=:0.1\~groffer\~ what.ever &
2614 .Env_var $LC_MESSAGES
2617 If one of these variables is set (in the above sequence), its content
2618 is interpreted as the locale, the language to be used, especially when
2619 retrieving man\~pages.
2621 A locale name is typically of the form
2633 is an ISO 639 language code,
2635 is an ISO 3166 country code, and
2637 is a character set or encoding identifier like ISO-8859-1 or UTF-8;
2639 .BR \%setlocale (3).
2641 The locale values\~\c
2645 stand for the default, i.e. the man\~page directories without a
2648 This is the same behavior as when all 3\~variables are unset.
2653 This variable can be used to set the pager for the tty output.
2655 For example, to disable the use of a pager completely set this
2659 .Shell_cmd PAGER=cat\~groffer\~ anything
2664 All programs within the groffer shell script are called without a
2667 Thus this environment variable determines the set of programs used
2668 within the run of groffer.
2672 .Env_var $POSIXLY_CORRECT
2673 If set to a non-empty value this chooses the POSIX mode.
2675 This is done internally by some shells.
2678 ignores the bad POSIX behavior for option processing, that means that
2679 option processing will be finished as soon as a non-option argument is
2682 Instead the GNU behavior of freely mixing options and
2684 arguments is used in any case.
2686 Usually, you do not want to set this environment variable externally.
2689 .\" --------------------------------------------------------------------
2690 .SS "Groff Variables"
2691 .\" --------------------------------------------------------------------
2693 The groffer program internally calls groff, so all environment
2694 variables documented in
2695 .BR \%groff (@MAN1EXT@)
2696 are internally used within groffer as well.
2698 The following variables have a direct meaning for the groffer program.
2701 .Env_var $GROFF_TMPDIR
2702 If the value of this variable is an existing, writable directory,
2704 uses it for storing its temporary files, just as groff does.
2707 .\" --------------------------------------------------------------------
2709 .\" --------------------------------------------------------------------
2711 Parts of the functionality of the man\~program were implemented in
2712 groffer; support for all environment variables documented in
2714 was added to groffer, but the meaning was slightly modified due to the
2715 different approach in groffer; but the user interface is the same.
2717 The man environment variables can be overwritten by options provided
2720 which in turn is overwritten by the command line.
2725 Restrict the search for man\~pages to files having this extension.
2727 This is overridden by option
2728 .Opt_long extension ;
2729 see there for details.
2734 This variable contains options as a preset for
2736 As not all of these are relevant for groffer only the essential parts
2737 of its value are extracted.
2739 The options specified in this variable overwrite the values of the
2740 other environment variables taht are specific to man.
2742 All options specified in this variable are overridden by the options
2743 given on the command line.
2748 If set, this variable contains the directories in which the man\~page
2751 This is overridden by option
2757 If this is a colon separated list of section names, the search for
2758 man\~pages is restricted to those manual sections in that order.
2760 This is overridden by option
2761 .Opt_long sections .
2766 If this is set to a comma separated list of names these are interpreted
2767 as man\~page trees for different operating systems.
2769 This variable can be overwritten by option
2771 see there for details.
2775 The environment variable
2776 .Env_var $MANROFFSEQ
2777 is ignored by groffer because the necessary preprocessors are
2778 determined automatically.
2781 .\" --------------------------------------------------------------------
2782 .SH "CONFIGURATION FILES"
2783 .\" --------------------------------------------------------------------
2787 program can be preconfigured by two configuration files.
2789 This configuration can be overridden at each program start by command
2790 line options or by the environment variable
2791 .Env_var $GROFFER_OPT .
2795 .File_name /etc/groff/groffer.conf
2796 System-wide configuration file for groffer.
2800 .File_name $HOME/.groff/groffer.conf
2801 User-specific configuration file for groffer, where
2803 denotes the user's home directory.
2805 This script is called after the system-wide configuration file to
2806 enable overriding by the user.
2810 Their lines either start with a minus character or are shell commands.
2812 Arbitrary spaces are allowed at the beginning, they are just ignored.
2814 The lines with the beginning minus are appended to the existing value
2817 This easily allows to set general
2819 options that are used with any call of
2824 After the transformation of the minus lines, the emerging
2825 configuration shell scripts are called using the `\c
2835 In the configuration files, there is only one option that really needs
2836 a line starting with a minus character because it cannot be restored
2837 by any shell tricks.
2841 The reason is that its argument must be retrieved at a very early
2847 It makes sense to use these configuration files for the following
2851 Preset command line options by writing them into lines starting with a
2855 Preset environment variables recognized by
2859 Write a function for calling a viewer program for a special
2861 and feed this name into its corresponding
2862 .Opt_long \f[I]mode\f[]\-viewer
2865 Note that the name of such a function must coincide with some existing
2866 program in the system path
2868 in order to be recognized by groffer.
2872 As an example, consider the following configuration file in
2873 .File_name ~/.groff/groffer.conf ,
2880 # groffer configuration file
2882 # groffer options that are used in each call of groffer
2885 --foreground=DarkBlue
2886 --x-viewer='gxditview -geometry 850x800'
2888 # some shell commands
2889 if test "$DISPLAY" = ""; then
2890 export DISPLAY='localhost:0.0'
2892 date >>~/mygroffer.log
2899 This configuration sets four
2901 options (the lines starting with `-') and runs two shell commands (the
2902 rest of the script).
2904 This has the following effects:
2910 as the shell to run the
2918 in all viewers that support this.
2924 in all viewers that support this.
2929 .BR \%gxditview (@MAN1EXT@)
2930 as the X-mode viewer using the geometry option for setting the width
2939 If the environment variable
2944 That allows to start
2946 in the standard X\~display, even when the program is called from a text
2951 Just for fun, the date of each
2953 start is written to the file
2954 .File_name mygroffer.log
2955 in the home directory.
2958 .\" --------------------------------------------------------------------
2960 .\" --------------------------------------------------------------------
2966 Usually, it is just called with a file name or man\~page.
2968 The following examples, however, show that groffer has much more fancy
2973 .Shell_cmd "groffer\~/usr/local/share/doc/groff/meintro.ms.gz"
2974 Decompress, format and display the compressed file
2975 .File_name meintro.ms.gz
2977 .File_name /usr/local/share/doc/groff ,
2980 as graphical viewer when in X Window, or the
2982 pager program when not in X.
2986 .Shell_cmd "groffer\~groff"
2989 exists use it as input.
2991 Otherwise interpret the argument as a search for the man\~page named
2993 in the smallest possible man\~section, being section 1 in this case.
2997 .Shell_cmd "groffer\~man:groff"
2998 search for the man\~page of
3006 .Shell_cmd "groffer\~groff.7"
3008 .Shell_cmd "groffer\~7\~groff"
3009 search the man\~page of
3013 This section search works only for a digit or a single character from
3018 .Shell_cmd "groffer\~fb.modes"
3020 .File_name ./fb.modes
3021 does not exist interpret this as a search for the man\~page of
3025 is not a single character in classical section style the argument is
3026 not split to a search for
3031 .Shell_cmd "groffer\~groff\~\[cq]troff(1)\[cq]\~man:roff"
3033 The arguments that are not existing files are looked-up as the
3034 following man\~pages:
3036 (automatic search, should be found in man\~section\~1),
3041 (in the section with the lowest number, being\~7 in this case).
3045 .I \[cq]troff(1)\[cq]
3047 are necessary because the paranthesis are special shell characters;
3048 escaping them with a backslash character
3052 would be possible, too.
3054 The formatted files are concatenated and displayed in one piece.
3058 .Shell_cmd "LANG=de\~groffer\~--man\~--www\~--www-viever=mozilla\~ls"
3060 Retrieve the German man\~page (language
3064 program, decompress it, format it to
3071 and view the result in the web browser
3075 guarantees that the man\~page is retrieved, even when a local file
3077 exists in the actual directory.
3081 .Shell_cmd "groffer\~--source\~'man:roff(7)'"
3083 Get the man\~page called
3085 in man\~section 7, decompress it, and print its unformatted content,
3090 .Shell_cmd "cat\~file.gz\~|\~groffer\~-Z\~-mfoo"
3092 Decompress the standard input, send this to
3094 intermediate mode without post-processing (groff option
3096 using macro package by
3103 .Shell_cmd "echo\~'\[rs]f[CB]WOW!'\~|"
3105 .Shell_cmd+ "groffer --x --bg red --fg yellow --geometry 200x100 -"
3107 Display the word \f[CB]WOW!\f[] in a small window in constant-width
3108 bold font, using color yellow on red background.
3111 .\" --------------------------------------------------------------------
3113 .\" --------------------------------------------------------------------
3117 shell script is compatible with both GNU and POSIX.
3119 POSIX compatibility refers to
3120 .B IEEE P1003.2/D11.2
3121 of September 1991, a very early version of the POSIX standard that is
3122 still freely available in the internet at
3123 .URL http://\:www.funet.fi/pub/doc/posix/p1003.2/d11.2/all \
3124 "POSIX P1003.2 draft 11.2" .
3126 Unfortunately, this version of the standard removed `local' for shell
3127 function variables, but later POSIX versions restored this again.
3129 As `local' is needed for serious programming this temporary POSIX
3130 deprecation was ignored.
3134 Most GNU shells are compatible with this interpretation of POSIX, but
3135 provide much more facilities.
3137 Nevertheless this script uses only a restricted set of shell language
3138 elements and shell builtins.
3142 script should work on most actual free and commercial operating
3149 program provides its own parser for command line options; it can
3150 handle option arguments and file names containing white space and a
3151 large set of special characters.
3157 shell script was tested with the following common implementations of
3166 compatible shells and shell utilities for most operating
3167 systems are available at the
3168 .URL http://\:www.gnu.org/software/ "GNU software archive" .
3172 The shell can be chosen by the option
3174 This option can also be given to the environment variable
3175 .Env_var $GROFF_OPT .
3176 If you want to write it to one of the
3178 configuration files you must use the single option style, a line
3186 program provides its own parser for command line arguments that is
3193 except for shortcuts of long options.
3195 The following standard types of options are supported.
3199 A single minus always refers to single character option or a
3200 combination thereof, for example, the
3202 short option combination
3205 .Opt_short Q\~\-m\~foo .
3209 Long options are options with names longer than one character; they
3210 are always prededed by a double minus.
3212 An option argument can either go to the next command line argument or
3213 be appended with an equal sign to the argument; for example,
3214 .Opt_alt -- long=arg
3216 .Opt_alt -- long\~arg .
3222 ends option parsing; all further command line arguments are
3223 interpreted as file name arguments.
3227 By default, all command line arguments that are neither options nor
3228 option arguments are interpreted as filespec parameters and stored
3229 until option parsing has finished.
3231 For example, the command line
3232 .Shell_cmd "groffer file1 -a -o arg file2"
3233 is, by default, equivalent to
3234 .Shell_cmd "groffer -a -o arg -- file1 file2"
3238 This behavior can be changed by setting the environment variable
3239 .Env_var $POSIXLY_CORRECT
3240 to a non-empty value.
3242 Then the strange POSIX non-option behavior is adopted, i. e. option
3243 processing is stopped as soon as the first non-option argument is
3244 found and each following argument is taken as a file name.
3246 For example, in posixly correct mode, the command line
3247 .Shell_cmd "groffer file1 -a -o arg file 2"
3249 .Shell_cmd "groffer -- file1 -a -o arg file 2"
3250 As this leads to unwanted behavior in most cases, most people do not
3252 .Env_var $POSIXLY_CORRECT .
3255 .\" --------------------------------------------------------------------
3257 .\" --------------------------------------------------------------------
3260 .BR \%groff (@MAN1EXT@)
3262 .BR \%troff (@MAN1EXT@)
3263 Details on the options and environment variables available in
3265 all of them can be used with groffer.
3269 .BR \%groff (@MAN7EXT@)
3270 Documentation of the
3276 .BR \%grog (@MAN1EXT@)
3281 command line options from the input using this program.
3285 .BR groff_out (@MAN5EXT@)
3286 Documentation on the
3287 .I \%groff intermediate output
3296 The standard program to diplay man\~pages.
3298 The information there is only useful if it is the man\~page for
3300 Then it documents the options and environment variables that are
3306 .BR \%gxditview (@MAN1EXT@)
3316 .BR \%kghostview (1)
3332 .BR \%kghostview (1)
3375 Standard pager program for the
3384 The decompression programs supported by groffer.
3387 .\" --------------------------------------------------------------------
3389 .\" --------------------------------------------------------------------
3393 .\" --------------------------------------------------------------------
3395 .\" --------------------------------------------------------------------
3399 \" --------------------------------------------------------------------
3401 .\" --------------------------------------------------------------------
3403 .\" Local Variables: