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 : 2 August 2005
20 Source file position: <groff-source>/contrib/groffer/groffer.man
23 This file was written by \m[blue]Bernd Warken\m[].
26 Copyright (C) 2001,2002,2004,2005 Free Software Foundation, Inc.
33 a free software project.
35 You can redistribute it and/or modify it under the terms of the
37 .B GNU General Public License
41 .BR "Free Software Foundation" ,
43 either version 2, or (at your option) any later version.
46 You should have received a copy of the GNU General Public License
49 see the files \%\f[CB]COPYING\f[] and \%\f[CB]LICENSE\f[] in the top
57 You can also write to the
59 .B Free Software Foundation, 51 Franklin St - Fifth Floor, Boston,
60 .BR "MA 02110-1301, USA" .
64 .\" --------------------------------------------------------------------
66 .\" --------------------------------------------------------------------
81 .ds Ellipsis ".\|.\|.\""
83 .\" --------------------------------------------------------------------
84 .\" setup for the macro definitions below
86 .\" naming: namespace:cathegory_macro.variable_name (experimental)
88 .\" --------------------------------------------------------------------
89 .\" configuration of prompt for `.Shell_cmd'* macros
90 .ds groffer:Shell_cmd.prompt_text sh#\" prompt for shell commands
91 .ds groffer:Shell_cmd+.prompt_text >\" prompt on continuation lines
92 .ds groffer:Shell_cmd_base.prompt_font I\" font for prompts
94 .\" automatically determine setup from the configuration above
95 .als @f groffer:Shell_cmd_base.prompt_font\"
96 .als @t groffer:Shell_cmd.prompt_text\"
97 .als @t+ groffer:Shell_cmd+.prompt_text\"
98 .ds groffer:Shell_cmd.prompt \f[\*[@f]]\*[@t]\f[]\" needed
99 .ds groffer:Shell_cmd+.prompt \f[\*[@f]]\*[@t+]\f[]\" needed
100 .nr @w \w'\*[groffer:Shell_cmd.prompt]'\"
101 .nr @w+ \w'\*[groffer:Shell_cmd+.prompt]'\"
103 .\" Full prompt width is maximum of texts plus 1m
104 .nr groffer:Shell_cmd_base.prompt_width (\n[@w]>?\n[@w+]+1m)\" needed
113 .\" --------------------------------------------------------------------
114 .\" static register for inter-macro communication in `.Synopsis'*
115 .nr groffer:Synopsis.level 0
117 .\" --------------------------------------------------------------------
118 .\" static registers for inter-macro communication in `.TP'*
119 .nr groffer:TP.level 0
120 .rr groffer:TP_header.flag
121 .rr groffer:TP_body.flag
122 .rr groffer:TP.indent
125 .\" --------------------------------------------------------------------
126 .\" Macro definitions
128 .\" Ignore all arguments like a comment, even after a .eo call.
131 .c --------------------------------------------------------------------
134 .c Print in constant-width bold font.
141 .c --------------------------------------------------------------------
144 .c Print in constant-width italic font.
151 .c --------------------------------------------------------------------
154 .c Print in constant-width roman font.
161 .c --------------------------------------------------------------------
162 .c .Error (<text>...)
164 .c Print error message to terminal and abort.
170 .c --------------------------------------------------------------------
171 .c .Env_var (<env_var_name> [<punct>])
173 .c Display an environment variable, with optional punctuation.
178 . Text \f[CB]\\$1\f[]\\$2
181 .c --------------------------------------------------------------------
182 .c .File_name (<path_name>)
184 .c Display a file or directory name in CB font.
189 .c --------------------------------------------------------------------
190 .c .Header_CB (<path_name>)
192 .c Display a line in CB font, for example after .TP
196 . Text \f[CB]\\$1\f[]\\$2
199 .c --------------------------------------------------------------------
200 .c .Opt_- ([<punct>])
202 .c Print `-' (minus sign); optional punctuation.
205 . ie (\\n[.$] == 0) \
208 . Opt_alt - "" "\\$1"
210 .c --------------------------------------------------------------------
211 .c .Opt_[-] ([<punct>])
213 .c Print `Opt_[-]' (minus sign in brackets); optional punctuation.
216 . ie (\\n[.$] == 0) \
219 . Opt_[alt] - "" "\\$1"
221 .c --------------------------------------------------------------------
222 .c .Opt_-- ([<punct>])
224 .c Print `--' (double minus); optional punctuation.
227 . ie (\\n[.$] == 0) \
230 . Opt_alt -- "" "\\$1"
232 .c --------------------------------------------------------------------
233 .c .Opt_[--] ([<punct>])
235 .c Print `Opt_[--]' (double minus in brackets); optional punctuation.
238 . ie (\\n[.$] == 0) \
241 . Opt_[alt] -- "" "\\$1"
243 .c --------------------------------------------------------------------
244 .c .Opt_alt ([<minus> <opt>]... [<arg> [<punct>]])
246 .c Alternate options separated by a vertical bar.
249 .c minus: either `-' or `--' (font CB).
250 .c opt: a name for an option, empty allowed (font CB).
251 .c arg: optionally, the argument to the option (font I).
252 .c punct: optional punctuation (in the starting font).
254 .c The minus/opt argument pairs, each
255 .c separated by a vertical bar `|', optionally add 'arg', separated
256 .c a space character ` '.
259 .c .Opt_alt - T -- device -- device-troff device .
261 .c -T|--device|--device-troff device.
264 . Opt_alt_base "" | "" \\$@
266 .c --------------------------------------------------------------------
267 .c .Opt_[alt] ([<minus> <opt>]... [<arg> [<punct>]])
269 .c Alternate options in brackets for section SYNOPSIS.
272 .c minus: either `-' or `--' (font CB).
273 .c opt: a name for an option, empty allowed (font CB).
274 .c arg: optionally, the argument to the option (font I).
275 .c punct: optional punctuation (in the starting font).
276 .c Global strings written to:
277 .c `@oa_prefix': left enclosing character (`[')
278 .c `@oa_sep': separator (`|')
279 .c `@oa_postfix': right enclosing character (`]')
281 .c The minus/opt argument pairs, each separated by a vertical
282 .c bar `|', optionally add 'arg', separated by a space character ` '.
285 .c .Opt_[alt] - T -- device -- device-troff device .
287 .c [-T|--device|--device-troff device].
290 . Opt_alt_base [ | ] \\$@
292 .c --------------------------------------------------------------------
293 .c .Opt_alt_base (<pre> <sep> <post> [<minus> <opt>]... [arg [punct]])
295 .c Alternating options; base macro for many others; do not use directly.
298 .c <pre>: prefix, result is preceded by this.
299 .c <sep>: separator between minus/opt pairs.
300 .c <post>: postfix, is appended to the result.
301 .c <minus>: either `-' or `--' (font CB).
302 .c <opt>: a name for an option, empty allowed (font CB).
303 .c <arg>: optionally, the argument to the option (font I).
304 .c <punct>: optional punctuation (in the starting font).
306 .c String `<pre>' followed by the <minus>/<opt> argument pairs, each
307 .c separated by string `<sep>', optionally add '<arg>', separated by
308 .c a single space ` ', followed by the string `<post>'. Terminated
309 .c by the optional punctuation <punct>.
314 . Error .\\0: not enough arguments.
315 . ds @pre \)\\$1\)\" prefix
316 . ds @sep \)\\$2\)\" separator
317 . ds @post \)\\$3\)\" postfix
320 . ds @res \f[CR]\\*[@pre]\"
321 . while (\\n[.$] >= 2) \{\
322 . c do the pairs, break on no `-'
328 . if (\\n[@count] > 0) \
329 . as @res \f[CR]\\*[@sep]\:\"
331 . c combine minus with option name
332 . as @res \f[CB]\\-\"
338 . if (\\n[.$] >= 3) \
339 . Error .\\0: wrong arguments: \\$@
340 . c all pairs are done
341 . ie (\\n[.$] == 0) \
342 . as @res \f[CR]\\*[@post]\"
344 . c optional option argument
346 . as @res \f[CR] \,\f[I]\\$1\"
349 . as @res \\f[CR]\\*[@post]\"
350 . if (\\n[.$] >= 1) \{\
352 . as @res \f[\\n[@font]]\\$1\"
366 .c --------------------------------------------------------------------
367 .c .Opt_def ([<minus> <opt>]... [<arg> [<punct>]])
369 .c Definitions of options in section OPTIONS.
372 .c minus: either `-' or `--' (font CB).
373 .c opt: a name for an option, empty allowed (font CB).
374 .c arg: optionally, the argument to the option (font I).
375 .c punct: optional punctuation (in the starting font).
377 .c The header for an indented paragraph, consisting of
378 .c minus/opt argument pairs, each, separated by a space
379 .c character ` ', optionally add 'arg', separated a space
383 .c .Opt_def - T -- device -- device-troff device .
385 .c -T --device --device-troff device.
386 .c as the header of for indented paragraph.
390 . Opt_alt_base "" "\~|\~" "" \\$@
392 .c --------------------------------------------------------------------
393 .c .Opt_element ([<minus> <opt>]... [<arg> [<punct>]])
395 .c Definitions of options in section OPTIONS.
398 .c minus: either `-' or `--' (font CB).
399 .c opt: a name for an option, empty allowed (font CB).
400 .c arg: optionally, the argument to the option (font I).
401 .c punct: optional punctuation (in the starting font).
403 .c The minus/opt argument pairs, each, separated by a space
404 .c character ` ', optionally add 'arg', separated a space
408 .c .Opt_element - T -- device -- device-troff device .
410 .c -T --device --device-troff device.
413 . Opt_alt_base "" "\~" "" \\$@
415 .c --------------------------------------------------------------------
416 .als Opt_list Opt_element
418 .c --------------------------------------------------------------------
419 .c .Opt_long ([<name> [<punct>]])
421 .c Print `--name' somewhere in the text; optional punctuation.
424 . Opt_alt -- "\\$1" "" "\\$2"
426 .c --------------------------------------------------------------------
427 .c .Opt_long_arg ([<name> <arg> [<punct>]])
429 .c Print `--name=arg' somewhere in the text; optional punctuation.
432 . Opt_alt -- "\\$1=\\$2" "" "\\$3"
434 .c --------------------------------------------------------------------
435 .c .Opt_[long] ([<name> [<punct>]])
437 .c Print `--name' somewhere in the text; optional punctuation.
440 . Opt_[alt] -- "\\$1" "" "\\$2"
442 .c --------------------------------------------------------------------
443 .c .Opt_short ([<name> [<punct>]])
445 .c Print `-name' somewhere in the Text; optional punctuation.
448 . Opt_alt - "\\$1" "" "\\$2"
450 .c --------------------------------------------------------------------
451 .c .Opt_[short] ([name [punct]])
453 .c Print `[-name]' somewhere in the Text; optional punctuation.
456 . Opt_[alt] - "\\$1" "" "\\$2"
458 .c --------------------------------------------------------------------
459 .c .Shell_cmd (<CR> [<CI>] ...)
461 .c A shell command line; display args alternating in fonts CR and CI.
464 .c .Shell_cmd "groffer --dpi 100 file"
465 .c result: `sh# groffer --dpi 100 file'
466 .c with 'sh#' in font I, the rest in CR
468 .c .Shell_cmd groffer\~--dpi\~100\~file
469 .c result: the same as above
471 .c .Shell_cmd "groffer --dpi=" value " file"
472 .c result: sh# groffer --dpi=value file
473 .c with `groffer --dpi=' and `file' in CR; `value' in CI
475 .c .Shell_cmd groffer\~--dpi= value \~file
476 .c result: the same as the previous example
479 . groffer:Shell_cmd_base "\*[groffer:Shell_cmd.prompt]" \\$@
481 .c --------------------------------------------------------------------
482 .c .Shell_cmd+ (<CR> [<CI>] ...)
484 .c A continuation line for .Shell_cmd.
487 . groffer:Shell_cmd_base "\*[groffer:Shell_cmd+.prompt]" \\$@
489 .c --------------------------------------------------------------------
490 .c .Shell_cmd_base (<prompt> [<CR> [<CI>] ...])
492 .c A shell command line; display args alternating in fonts CR and CI.
493 .c Internal, do not use directly.
495 .c Globals: read-only register @.Shell_cmd_width
497 .de groffer:Shell_cmd_base
498 . if (\\n[.$] <= 0) \
500 . nr @+font \\n[.f]\"
503 . c gap between prompt and command
504 . nr @+gap \\n[groffer:Shell_cmd_base.prompt_width]-\\w'\\*[@prompt]'\"
505 . ds @res \\*[@prompt]\h'\\n[@+gap]u'\"
508 . while (\\n[.$] > 0) \{\
509 . as @res \\f[\\*[@cf]]\\$1\"
531 .c --------------------------------------------------------------------
534 .c Begin a synopsis section, to be ended by a ./Synopsis macro.
537 . if (\\n[groffer:Synopsis.level] > 0) \
538 . Error .\\$0: previous .Synopsis was not closed by ./Synopsis.
541 . nr @old_indent \\n(.i
543 . in +\w'\fB\\*[@1]\0'u
544 . ti \\n[@old_indent]u
548 . nr groffer:Synopsis.level +1\" marker for ./Synopsis
550 .c --------------------------------------------------------------------
553 .c Close a synopsis section opened by the previous .Synopsis macro.
556 . if (\\n[groffer:Synopsis.level] <= 0) \
557 . Error .\\$0: no previous call of .Synopsis
562 . nr groffer:Synopsis.level -1
564 .c --------------------------------------------------------------------
567 .c Treat the arguments as text, no matter how they look.
570 . if (\\n[.$] == 0) \
576 .c --------------------------------------------------------------------
577 .c .Topic ([<indent>])
579 .c A bulleted paragraph
590 .c --------------------------------------------------------------------
593 .c Continuation line for .TP header.
600 .c --------------------------------------------------------------------
601 .c .TP_header ([<indent>])
603 .c Start a multi-line header for a .TP-like paragraph
606 . if (\\n[groffer:TP.level] < 0) \
607 . Error .\\$0: wrong level.
608 . nr groffer:TP.level +1
610 . ie (\\n[.$] == 0) \
611 . rr groffer:TP.indent
613 . nr groffer:TP.indent \\$1
614 . nr groffer:TP_header.flag 1
616 .c --------------------------------------------------------------------
617 .c .TP_body ([<indent>])
619 .c End a previous .TP-header and beging the body of the paragraph.
622 . if !rgroffer:TP_header.flag \
623 . Error .\\$0: no previous call of .TP_header
624 . if (\\n[groffer:TP.level] <= 0) \
625 . Error .\\$0: wrong level.
627 . ie (\\n[.$] == 0) \{\
628 . ie rgroffer:TP.indent \{\
629 . RS \\n[groffer:TP.indent]u
636 . rr groffer:TP.indent
637 . rr groffer:TP_header.flag
638 . nr groffer:TP_body.flag 1
640 .c --------------------------------------------------------------------
643 .c End of former .TP_body paragraph.
646 . if !rgroffer:TP_body.flag \
647 . Error .\\$0: no previous .TP_body.
648 . if (\\n[groffer:TP.level] <= 0) \
649 . Error TP_end: wrong level.
650 . nr groffer:TP.level -1
651 . rr grogger:TP.indent
652 . rr groffer:TP_header.flag
653 . rr groffer:TP_body.flag
658 .\" End of macro definitions
661 .\" --------------------------------------------------------------------
663 .\" --------------------------------------------------------------------
669 .RI [ "filespec" "\*[Ellipsis]]"
673 .Opt_alt -- apropos -- apropos-data -- apropos-devel -- apropos-progs name
681 .Opt_alt - v -- version
685 .\" --------------------------------------------------------------------
687 .\" --------------------------------------------------------------------
691 program is the easiest way to use
692 .BR \%groff (@MAN1EXT@).
693 It can display arbitrary documents written in the
694 .BR \%groff (@MAN7EXT@)
696 .BR \%roff (@MAN7EXT@)
697 languages that are compatible to the original
703 program also includes many of the features for finding and displaying
704 the \%UNIX manual pages
708 such that it can be used as a replacement for a
712 Moreover, compressed files that can be handled by
716 are decompressed on-the-fly.
720 The normal usage is quite simple by supplying a file name or name of a
722 without further options.
724 But the option handling has many possibilities for creating special
727 This can be done either in configuration files, with the shell
730 or on the command line.
732 For example, it makes sense to specify a faster shell in a
737 The output can be generated and viewed in several different ways
744 .BR \%gxditview (@MAN1EXT@),
747 display program, a web browser by generating
757 Most of the options that must be named when running
759 directly are determined automatically for
761 due to the internal usage of the
762 .BR \%grog (@MAN1EXT@)
765 But all parts can also be controlled manually by arguments.
769 Several file names can be specified on the command line arguments.
771 They are transformed into a single document in the normal way of
776 Option handling is done in GNU style.
778 Options and file names can be mixed freely.
782 closes the option handling, all following arguments are treated as
785 Long options can be abbreviated.
788 .\" --------------------------------------------------------------------
789 .SH "OPTION OVERVIEW"
790 .\" --------------------------------------------------------------------
796 .Opt_[alt] -- apropos name
797 .Opt_[alt] -- apropos\-data name
798 .Opt_[alt] -- apropos\-devel name
799 .Opt_[alt] -- apropos\-progs name
800 .Opt_[alt] - h -- help
801 .Opt_[alt] - v -- version
806 .I \%groffer mode options
810 .Opt_[alt] -- default
811 .Opt_[alt] -- default\-modes mode1,mode2,\*[Ellipsis]
813 .Opt_[alt] -- dvi\-viewer prog
816 .Opt_[alt] -- html\-viewer prog
818 .Opt_[alt] -- mode display_mode
821 .Opt_[alt] -- pdf\-viewer prog
823 .Opt_[alt] -- ps\-viewer prog
826 .Opt_[alt] -- tty\-viewer prog
828 .Opt_[alt] -- www\-viewer prog
830 .Opt_[alt] -- x\-viewer -- X\-viewer prog
835 .I development options
839 .Opt_[alt] -- do\-nothing
840 .Opt_[alt] -- shell prog
841 .Opt_[alt] - Q -- source
847 .I options related to \%groff
850 .Opt_[alt] - T -- device device
851 .Opt_[alt] - Z -- intermediate\-output -- ditroff
855 short options are accepted.
860 .I X\~\%Window\~\%Toolkit options
863 .Opt_[alt] -- bd pixels
864 .Opt_[alt] -- bg -- background color
865 .Opt_[alt] -- bw pixels
866 .Opt_[alt] -- display X-display
867 .Opt_[alt] -- fg -- foreground color
868 .Opt_[alt] -- ft -- font font_name
869 .Opt_[alt] -- geometry size_pos
870 .Opt_[alt] -- resolution value
872 .Opt_[alt] -- title string
873 .Opt_[alt] -- xrm X-resource
878 .I options from GNU man
883 .Opt_[alt] -- ditroff
884 .Opt_[alt] -- extension suffix
885 .Opt_[alt] -- locale language
886 .Opt_[alt] -- local-file
887 .Opt_[alt] -- manpath dir1:dir2:\*[Ellipsis]
888 .Opt_[alt] -- pager program
889 .Opt_[alt] -- sections sec1:sec2:\*[Ellipsis]
890 .Opt_[alt] -- systems sys1,sys2,\*[Ellipsis]
891 .Opt_[alt] -- troff-device device
894 Further long options of GNU
896 are accepted as well.
906 parameters means standard input.
911 stands for standard input (can occur several times).
916 the path name of an existing file.
920 .BI man: name ( section )
923 search the \%man\~page
937 search for a \%man\~page
945 \%man\~page in the lowest \%man\~section that has
955 search for a \%man\~page
965 is not an existing file search for the man\~page
967 in the lowest man\~section.
972 .\" --------------------------------------------------------------------
974 .\" --------------------------------------------------------------------
978 program can usually be run with very few options.
980 But for special purposes, it supports many options.
982 These can be classified in 5 option classes.
988 are compatible with the short options of
989 .BR \%groff (@MAN1EXT@).
993 are compatible with the long options of
997 .\" --------------------------------------------------------------------
998 .SS "groffer breaking Options"
999 .\" --------------------------------------------------------------------
1001 As soon as one of these options is found on the command line it is
1002 executed, printed to standard output, and the running
1004 is terminated thereafter.
1006 All other arguments are ignored.
1009 .Opt_def -- apropos name
1012 command for searching within
1016 That slightly differs from the strange behavior of the
1020 which has no argument of its own, but takes the file arguments
1023 Practically both concepts are compatible.
1026 .Opt_def -- apropos\-data name
1029 descriptions for data documents, in the
1031 sections 4, 5, and 7.
1034 .Opt_def -- apropos\-devel name
1037 descriptions for development documents, in the
1039 sections 2, 3, and 9.
1042 .Opt_def -- apropos\-progs name
1045 descriptions for documents on programs, in the
1047 sections 1, 6, and 8.
1050 .Opt_def - h -- help
1051 Print a helping information with a short explanation of option sto
1055 .Opt_def - v -- version
1056 Print version information to standard output.
1059 .\" --------------------------------------------------------------------
1060 .SS "groffer Mode Options"
1061 .\" --------------------------------------------------------------------
1063 The display mode and the viewer programs are determined by these
1066 If none of these mode and viewer options is specified
1068 tries to find a suitable display mode automatically.
1073 .Opt_long_arg mode auto .
1077 Reset all configuration from previously processed command line options
1078 to the default values.
1080 This is useful to wipe out all former options of the configuration, in
1081 .Env_var $GROFFER_OPT ,
1082 and restart option processing using only the rest of the command line.
1085 .Opt_def -- default\-modes mode1,mode2,\*[Ellipsis]
1086 Set the sequence of modes for
1088 to the comma separated list given in the argument.
1092 for details on modes. Display in the default manner; actually, this
1093 means to try the modes
1104 .Opt_long_arg mode \%dvi .
1107 .Opt_def -- dvi\-viewer prog
1108 Set the viewer program for
1111 This can be a file name or a program to be searched in
1121 In each case, arguments can be provided additionally.
1126 .Opt_long_arg mode groff .
1131 .Opt_long_arg mode html .
1134 .Opt_def -- html\-viewer
1135 Set the web browser program for viewing in
1138 Each program that accepts html input and allows the
1139 .BI \%file://localhost/ dir / file
1140 syntax on the command line is suitable as viewer program; it can be
1141 the path name of an executable file or a program in
1144 In each case, arguments can be provided additionally.
1147 .Opt_def -- mode value
1149 Set the display mode.
1151 The following mode values are recognized:
1157 Select the automatic determination of the display mode.
1159 The sequence of modes that are tried can be set with the
1160 .Opt_long default\-modes
1163 Useful for restoring the
1165 when a different mode was specified before.
1170 Display formatted input in a
1174 By default, the formatted input is displayed with the
1182 After the file determination, switch
1184 to process the input like
1185 .BR \%groff (@MAN1EXT@)
1195 Translate the input into html format and display the result in a web
1198 By default, the existence of a sequence of standard web browsers is
1199 tested, starting with
1203 The text html viewer is
1209 Display formatted input in a
1211 (Portable Document Format) viewer
1214 By default, the input is formatted by
1216 using the Postscript device, then it is transformed into the PDF file
1219 and finally displayed either with the
1225 PDF has a big advantage because the text is displayed graphically and
1226 is searchable as well.
1228 But as the transformation takes a considerable amount of time, this
1229 mode is not suitable as a default device for the
1235 Display formatted input in a Postscript viewer program.
1237 By default, the formatted input is displayed with the
1238 .BR \%ghostview (@MAN1EXT@)
1245 .I \%groff\~text\~mode
1246 and write the result to standard output without a pager or viewer
1251 by default, can be chosen with option
1258 .I \%groff\~text\~mode
1259 and write the result to standard output using a text pager program,
1260 even when in X\~\%Window.
1266 .Opt_long_arg mode html .
1271 Display the formatted input in a native
1275 By default, the formatted input is displayed with the
1276 .BR \%gxditview (@MAN1EXT@)
1277 program being distributed together with
1279 But the standard X\~tool
1281 can also be chosen with the option
1282 .Opt_long x\-viewer .
1283 The default resolution is
1292 for the resolution of
1302 .I "groff intermediate output"
1303 for the actual device is generated and the result is displayed.
1307 the default width of the geometry of the display program is chosen to
1314 .Opt_long_arg mode x .
1318 The following modes do not use the
1322 They are only interesting for advanced applications.
1327 Generate device output with plain
1329 without using the special viewing features of
1331 If no device was specified by option
1342 Display the source code of the input without formatting; equivalent to
1351 .Opt_long_arg mode pdf .
1354 .Opt_def -- pdf\-viewer prog
1355 Set the viewer program for
1358 This can be a file name or a program to be searched in
1361 In each case, arguments can be provided additionally.
1366 .Opt_long_arg mode ps .
1369 .Opt_def -- ps\-viewer prog
1370 Set the viewer program for
1373 This can be a file name or a program to be searched in
1376 Common Postscript viewers inlude
1378 .BR \%ghostview (1),
1382 In each case, arguments can be provided additionally.
1387 .Opt_long_arg mode text .
1392 .Opt_long_arg mode tty .
1395 .Opt_def -- tty\-viewer prog
1396 Choose a text pager for mode
1398 The standard pager is
1400 This option is eqivalent to
1403 .Opt_long_arg pager prog .
1408 .Opt_long_arg mode html .
1411 .Opt_def -- www\-viewer prog
1413 .Opt_long html\-viewer .
1418 .Opt_long_arg mode x .
1421 .Opt_def -- X\-viewer -- x\-viewer prog
1422 Set the viewer program for
1425 Suitable viewer programs are
1426 .BR \%gxditview (@MAN1EXT@)
1427 which is the default and
1430 But the argument can be any executable file or a program in
1433 In each case, arguments can be provided additionally.
1438 Signals the end of option processing; all remaining arguments are
1447 accepts all arguments that are valid for the
1448 .BR \%groff (@MAN1EXT@)
1453 options are sent unmodified via
1458 Postprocessors, macro packages, compatibility with
1461 and much more can be manually specified.
1464 .\" --------------------------------------------------------------------
1465 .SH "Options for Development"
1466 .\" --------------------------------------------------------------------
1469 Enable three debugging informations.
1471 A function call stack is printed at each opening and closing of a
1472 function call; a landmark information is printed to determine how far
1473 the program is running, and the early deletion of the temporary
1474 formatting files is prohibited.
1477 .Opt_def -- do-nothing
1480 but without the output; no viewer is started.
1482 This makes only sense in development.
1485 .Opt_def -- shell "shell_program"
1486 Specify the shell under which the
1487 .File_name \%groffer2.sh
1488 script should be run.
1492 is empty a former shell option is cancelled and the default shell is
1495 Some shells run considerably faster than the standard shell.
1497 It makes sense to set this option in a configuration file.
1500 .Opt_def - Q -- source
1501 Output the roff source code of the input files without further
1504 This is the equivalent
1505 .Opt_long_arg mode source .
1509 This is an advanced option for debugging only.
1511 Instead of displaying the formatted input, a lot of
1513 specific information is printed to standard output:
1517 the output file name in the temporary directory,
1520 the display mode of the actual
1525 the display program for viewing the output with its arguments,
1528 the active parameters from the config files, the arguments in
1529 .Env_var $GROFFER_OPT ,
1530 and the arguments of the command line,
1533 the pipeline that would be run by the
1535 program, but without executing it.
1540 Other useful debugging options are the
1545 .Opt_long_arg mode groff .
1548 .\" --------------------------------------------------------------------
1549 .SH "Options related to groff"
1550 .\" --------------------------------------------------------------------
1552 All short options of
1554 are compatible with the short options of
1555 .BR \%groff (@MAN1EXT@).
1559 options have either an additional special meaning within
1561 or make sense for normal usage.
1565 Because of the special outputting behavior of the
1570 was designed to be switched into
1574 viewing features are disabled there.
1578 options do not switch the mode, but allow to customize the formatting
1583 This generates an ascii approximation of output in the
1586 That could be important when the text pager has problems with control
1598 This is useful in case it cannot be recognized automatically.
1601 .Opt_def - P opt_or_arg
1604 as an option or option argument to the actual
1609 .Opt_def - T -- device devname
1611 This option determines
1615 The most important devices are the text output devices for referring
1616 to the different character sets, such as
1622 Each of these arguments switches
1626 using this device, to
1628 if the actual mode is not a
1633 arguments are mapped to the corresponding
1635 .Opt_long_arg mode \fIdevname\fR
1643 arguments are mapped to
1647 argument switches to
1656 .I groff intermediate output
1659 As the quality is relatively bad this option is deprecated; use
1665 device for a better display.
1668 .Opt_def - Z -- intermediate-output -- ditroff
1671 and format the input with the
1672 .I \%groff intermediate output
1673 without postprocessing; see
1674 .BR \%groff_out (@MAN5EXT@).
1675 This is equivalent to option
1679 which can be used as well.
1685 options are supported by
1687 but they are just transparently transferred to
1689 without any intervention.
1691 The options that are not explicitly handled by
1693 are transparently passed to
1696 Therefore these transparent options are not documented here, but in
1697 .BR \%groff (@MAN1EXT@).
1698 Due to the automatism in
1702 options should be needed, except for advanced usage.
1705 .\" --------------------------------------------------------------------
1706 .SS "X\~\%Window\~\%Toolkit Options"
1707 .\" --------------------------------------------------------------------
1709 The following long options were adapted from the corresponding
1710 X\~\%Toolkit options.
1713 will pass them to the actual viewer program if it is an X\~\%Window
1716 Otherwise these options are ignored.
1720 Unfortunately these options use the old style of a single minus for
1725 that was changed to the standard with using a double minus for long
1726 options, for example,
1738 and the documentation on the X\~\%Toolkit\~\%options for more details on
1739 these options and their arguments.
1742 .Opt_def -- background color
1743 Set the background color of the viewer window.
1746 .Opt_def -- bd pixels
1747 Specifies the color of the border surrounding the viewer window.
1750 .Opt_def -- bg color
1751 This is equivalent to
1752 .Opt_long background .
1755 .Opt_def -- bw pixels
1756 Specifies the width in pixels of the border surrounding the viewer
1760 .Opt_def -- display X-display
1761 Set the X\~\%display on which the viewer program shall be started, see the
1763 documentation for the syntax of the argument.
1766 .Opt_def -- foreground color
1767 Set the foreground color of the viewer window.
1770 .Opt_def -- fg color
1771 This is equivalent to
1772 .Opt_short foreground .
1775 .Opt_def -- font font_name
1776 Set the font used by the viewer window.
1778 The argument is an X\~\%font\~\%name.
1781 .Opt_def -- ft font_name
1782 This is equivalent to
1786 .Opt_def -- geometry size_pos
1787 Set the geometry of the display window, that means its size and its
1792 for the syntax of the argument.
1795 .Opt_def -- resolution value
1796 Set X\~\%resolution in dpi (dots per inch) in some viewer programs.
1798 The only supported dpi values are
1803 Actually, the default resolution for
1807 The resolution also sets the default device in
1812 Reverse foreground and background color of the viewer window.
1815 .Opt_def -- title "'some text'"
1816 Set the title for the viewer window.
1819 .Opt_def -- xrm "'resource'"
1823 .\" --------------------------------------------------------------------
1824 .SS "Options for man"
1825 .\" --------------------------------------------------------------------
1829 were synchronized with the long options of GNU
1832 All long options of GNU
1834 are recognized, but not all of these options are important to
1836 so most of them are just ignored.
1840 The following two options were added to
1842 for choosing whether the file name arguments are interpreted as names
1843 for local files or as a search pattern for
1846 The default is looking up for local files.
1850 Check the non-option command line arguments
1856 then whether they represent an existing file.
1860 is first tested whether it is an existing file.
1863 .Opt_def -- no-man -- local-file
1867 .Opt_long local-file
1868 is the corresponding
1874 In the following, the
1876 options that have a special meaning for
1882 The full set of long and short options of the GNU
1884 program can be passed via the environment variable
1888 if your system has GNU
1896 retrieve all suitable documents instead of only one.
1899 .Opt_def - 7 -- ascii
1902 display ASCII translation of special characters for critical environment.
1904 This is equivalent to
1905 .BR "groff -mtty_char" ;
1907 .BR groff_tmac (@MAN5EXT@).
1916 .Opt_def -- extension suffix
1919 search to file names that have
1921 appended to their section element.
1923 For example, in the file name
1924 .I \%/usr/share/man/man3/terminfo.3ncurses.gz
1931 .Opt_def -- locale language
1933 Set the language for
1936 This has the same effect, but overwrites
1940 .Opt_def -- location
1941 Print the location of the retrieved files to standard error.
1944 .Opt_def -- no-location
1945 Do not display the location of retrieved files; this resets a former
1947 .Opt_long location .
1953 .Opt_def -- manpath "'dir1:dir2:\*[Ellipsis]'"
1954 Use the specified search path for retrieving
1956 instead of the program defaults.
1958 If the argument is set to the empty string "" the search for
1964 Set the pager program in
1968 This is equivalent to
1969 .Opt_long tty\-viewer .
1972 .Opt_def -- sections "'sec1:sec2:\*[Ellipsis]'"
1973 Restrict searching for
1977 a colon-separated list.
1980 .Opt_def -- systems "'sys1,sys2,\*[Ellipsis]'"
1983 for the given operating systems; the argument
1985 is a comma-separated list.
1989 Instead of displaying the content, get the one-liner description from
1992 files \[em] or say that it is not a
1998 .Opt_long location .
2001 .\" --------------------------------------------------------------------
2002 .SS "Filespec Arguments"
2003 .\" --------------------------------------------------------------------
2007 parameter is an argument meaning an input source, such as a file name
2008 or template for searching
2011 These input sources are collected and composed into a single output
2018 The strange \%POSIX behavior that maps all arguments behind the first
2019 non-option argument into
2021 arguments is ignored.
2023 The GNU behavior to recognize options even when mixed with
2025 arguments is used througout.
2027 But, as usual, the double minus argument
2029 still takes all following arguments as
2037 parameters can have one of the following forms.
2043 parameters means that
2045 waits for standard input.
2049 stands for standard input, too, but can occur several times.
2053 is tested whether it is the path name of an existing file.
2055 Otherwise it is assumed as a searching pattern for a
2062 are sorted according to their content into several sections.
2065 .I classical man sections
2066 have a single-character name, either are a digit from
2070 or one of the characters
2075 In the following, a stand-alone character
2081 The internal precedence of
2085 with the same name within several sections goes according to the
2086 classical single-character sequence.
2088 On some systems, this single character can be extended by a following
2094 facility is based on the classical single character sections.
2098 .BI \%man: name ( section )
2100 .IB \%name ( section )
2101 search the \%man\~page
2103 in \%man\~section\~\c
2107 can be any string, but it must exist in the
2113 Next some patterns based on the
2114 .I classical man sections
2120 search for a \%man\~page
2127 .I classical man section
2130 Otherwise search for a
2145 that has a document called
2152 originates from a strange argument parsing of the
2159 .I classical man section
2160 interpret it as a search for a
2168 as a file argument and
2176 We are left with the argument
2178 which is not an existing file.
2180 So this searches for the
2186 that has a document for this name.
2190 Several file name arguments can be supplied.
2194 into a single document.
2196 Note that the set of option arguments must fit to all of these file
2199 So they should have at least the same style of the
2204 .\" --------------------------------------------------------------------
2206 .\" --------------------------------------------------------------------
2210 program collects all input into a single file, formats it with the
2212 program for a certain device, and then chooses a suitable viewer
2215 The device and viewer process in
2220 The mode and viewer of a running
2222 program is selected automatically, but the user can also choose it
2226 The modes are selected by option the arguments of
2227 .Opt_long_arg mode \fIanymode .
2228 Additionally, each of this argument can be specified as an option of
2230 .Opt_long \fIanymode .
2231 Most of these modes have a viewer program, which can be chosen by an
2232 option that is constructed like
2233 .Opt_long \fIanymode\fR\-viewer .
2237 Several different modes are offered, graphical modes for
2242 for debugging and development.
2255 This mode testing sequence for
2257 can be changed by specifying a comma separated list of modes with the
2259 .Opt_long default\-modes.
2265 and the decompression of the input are active in every mode.
2268 .\" --------------------------------------------------------------------
2269 .SS "Graphical Display Modes"
2270 .\" --------------------------------------------------------------------
2272 The graphical display modes work only in the
2273 .I X\~\%Window environment
2274 (or similar implementations within other windowing environments).
2276 The environment variable
2280 are used for specifying the X\~\%display to be used.
2282 If neither is given,
2284 assumes that no X and changes to one
2287 You can change this automatic behavior by the option
2288 .Opt_long default\-modes .
2292 Known viewers for the graphical display modes and their standard
2293 X\~\%Window viewer progams are
2299 .BR \%gxditview (@MAN1EXT@)
2306 in a Postscript viewer
2312 in a dvi viewer program
2314 .RI ( \%dvi\~mode ),
2320 .RI ( \%pdf\~mode ),
2336 has a major advantage \[em] it is the only graphical diplay mode that
2337 allows to search for text within the viewer; this can be a really
2340 Unfortunately, it takes some time to transform the input into the PDF
2341 format, so it was not chosen as the major mode.
2345 These graphical viewers can be customized by options of the
2346 X\~\%Window\~\%Toolkit.
2350 options use a leading double minus instead of the single minus used by
2352 .I X\~\%Window\~\%Toolkit .
2355 .\" --------------------------------------------------------------------
2357 .\" --------------------------------------------------------------------
2359 There are two modes for text output,
2361 for plain output without a pager and
2363 for a text output on a text terminal using some pager program.
2369 is not set or empty,
2371 assumes that it should use
2376 In the actual implementation, the
2383 This can be changed by specifying option
2390 The pager to be used can be specified by one of the options
2393 .Opt_long tty\-viewer ,
2394 or by the environment variable
2396 If all of this is not used the
2398 program with the option
2400 for correctly displaying control sequences is used as the default
2404 .\" --------------------------------------------------------------------
2405 .SS "Special Modes for Debugging and Development"
2406 .\" --------------------------------------------------------------------
2410 file determination and decompression.
2412 This is combined into a single input file that is fed directly into
2414 with different strategy without the
2418 These modes are regarded as advanced, they are useful for debugging
2419 and development purposes.
2429 just displays the decompressed input.
2437 using only some suitable options provided to
2440 This enables the user to save the generated output into a file or pipe
2441 it into another program.
2446 .IR \%groff\~\%mode ,
2449 disables post-processing, thus producing the
2451 .I groff intermediate
2455 In this mode, the input is formatted, but not postprocessed; see
2456 .BR \%groff_out (@MAN5EXT@)
2463 short options are supported by
2467 .\" --------------------------------------------------------------------
2468 .SH "MAN\~PAGE\~SEARCHING"
2469 .\" --------------------------------------------------------------------
2471 The default behavior of
2473 is to first test whether a file parameter represents a local file; if
2474 it is not an existing file name, it is assumed to represent a name of
2478 This behavior can be modified by the following options.
2483 forces to interpret all file parameters as filespecs for searching
2489 .Opt_long local\-file
2492 searching; so only local files are displayed.
2496 If neither a local file nor a
2498 was retrieved for some file parameter a warning is issued on standard
2499 error, but processing is continued.
2505 program provides a search facility for
2508 All long options, all environment variables, and most of the
2509 functionality of the GNU
2511 program were implemented.
2513 This inludes the extended file names of
2519 in man\~section 7 may be stored under
2520 .File_name /usr/share/man/man7/groff.7.gz ,
2522 .File_name /usr/share/man/
2523 is part of the man\~path, the subdirectory
2525 and the file extension
2527 refer to the man\~section 7;
2529 shows the compression of the file.
2537 are intentionally excluded from the search because
2541 program that wants to format by its own.
2543 With the excellent performance of the actual computers, the
2546 aren't necessary any longer.
2550 The algorithm for retrieving
2552 uses five search methods.
2554 They are successively tried until a method works.
2558 The search path can be manually specified by using the option
2560 An empty argument disables the
2564 This overwrites the other methods.
2568 If this is not available the environment variable
2574 If this is empty, the program tries to read it from the environment
2580 If this does not work a reasonable default path from
2587 If this does not work, the
2589 program for determining a path of
2591 directories is tried.
2595 After this, the path elements for the language (locale) and operating
2600 their sequence is determined automatically.
2603 .File_name /usr/share/man/linux/fr
2605 .File_name /usr/share/man/fr/linux
2610 The language and operating system names are determined from both
2611 environment variables and command line options.
2615 The locale (language) is determined like in GNU
2617 that is from highest to lowest precedence:
2622 .Env_var $GROFFER_OPT
2631 .Env_var $LC_MESSAGES
2638 The language locale is usually specified in the \%POSIX 1003.1 based
2642 \f[I]<language>\f[][\f[CB]_\f[]\f[I]<territory>\f[][\f[CB].\f[]\
2643 \f[I]<character-set>\f[][\f[CB],\f[]\f[I]<version>\f[]]]],
2646 but the two-letter code in
2650 is sufficient for most purposes.
2656 for a complicated locale are found the country part consisting of the
2657 first two characters (without the `\f[CB]_\f[]', `\f[CB].\f[]', and
2658 `\f[CB],\f[]' parts) of the locale is searched as well.
2662 If still not found the corresponding
2664 in the default language is used instead.
2666 As usual, this default can be specified by one of \f[CR]C\f[] or
2671 in the default language are usually in English.
2675 Several operating systems can be given by appending their names,
2676 separated by a comma.
2678 This is then specified by the environment variable
2680 or by the command line option
2682 The precedence is similar to the locale case above from highest to
2689 .Env_var $GROFFER_OPT
2703 with the additional language and system specific directories is used.
2707 The search can further be restricted by limiting it to certain
2710 A single section can be specified within each filespec argument,
2711 several sections as a colon-separated list in command line option
2713 or environment variable
2716 When no section was specified a set of standard sections is searched
2723 Finally, the search can be restricted to a so-called
2725 This is a postfix that acts like a subsection.
2727 It can be specified by
2729 or environment variable
2730 .Env_var $EXTENSION .
2734 For further details on
2740 .\" --------------------------------------------------------------------
2742 .\" --------------------------------------------------------------------
2744 The program has a decompression facility.
2746 If standard input or a file that was retrieved from the command line
2747 parameters is compressed with a format that is supported by either
2751 it is decompressed on-the-fly.
2753 This includes the GNU
2760 The program displays the concatenation of all decompressed input in
2761 the sequence that was specified on the command line.
2764 .\" --------------------------------------------------------------------
2766 .\" --------------------------------------------------------------------
2770 program supports many system variables, most of them by courtesy of
2773 All environment variables of
2774 .BR \%groff (@MAN1EXT@)
2777 and some standard system variables are honored.
2780 .\" --------------------------------------------------------------------
2781 .SS "Native groffer Variables"
2782 .\" --------------------------------------------------------------------
2785 .Env_var $GROFFER_OPT
2786 Store options for a run of
2789 The options specified in this variable are overridden by the options
2790 given on the command line.
2792 The content of this variable is run through the shell builtin `eval';
2793 so arguments containing white-space or special shell characters should
2797 .\" --------------------------------------------------------------------
2798 .SS "System Variables"
2799 .\" --------------------------------------------------------------------
2803 program is a shell script that is run through
2804 .File_name /bin/sh ,
2805 which can be internally linked to programs like
2807 The corresponding system environment is automatically effective.
2809 The following variables have a special meaning for
2815 If this variable is set this indicates that the X\~\%Window system is
2818 Testing this variable decides on whether graphical or text output is
2821 This variable should not be changed by the user carelessly, but it can
2822 be used to start the graphical
2824 on a remote X\~\%terminal.
2826 For example, depending on your system,
2828 can be started on the second monitor by the command
2829 .Shell_cmd DISPLAY=:0.1\~groffer\~ what.ever &
2835 .Env_var $LC_MESSAGES
2838 If one of these variables is set (in the above sequence), its content
2839 is interpreted as the locale, the language to be used, especially when
2843 A locale name is typically of the form
2855 is an ISO 639 language code,
2857 is an ISO 3166 country code, and
2859 is a character set or encoding identifier like ISO-8859-1 or UTF-8;
2861 .BR \%setlocale (3).
2863 The locale values\~\c
2867 stand for the default, i.e. the
2869 directories without a language prefix.
2871 This is the same behavior as when all 3\~variables are unset.
2876 This variable can be used to set the pager for the tty output.
2878 For example, to disable the use of a pager completely set this
2882 .Shell_cmd PAGER=cat\~groffer\~ anything
2887 All programs within the
2889 shell script are called without a fixed path.
2891 Thus this environment variable determines the set of programs used
2896 .\" --------------------------------------------------------------------
2897 .SS "Groff Variables"
2898 .\" --------------------------------------------------------------------
2902 program internally calls
2904 so all environment variables documented in
2905 .BR \%groff (@MAN1EXT@)
2906 are internally used within
2910 The following variables have a direct meaning for the
2915 .Env_var $GROFF_TMPDIR
2916 If the value of this variable is an existing, writable directory,
2918 uses it for storing its temporary files, just as groff does.
2921 .\" --------------------------------------------------------------------
2923 .\" --------------------------------------------------------------------
2925 Parts of the functionality of the
2927 program were implemented in
2929 support for all environment variables documented in
2933 but the meaning was slightly modified due to the different approach in
2935 but the user interface is the same.
2939 environment variables can be overwritten by options provided with
2941 which in turn is overwritten by the command line.
2946 Restrict the search for
2948 to files having this extension.
2950 This is overridden by option
2951 .Opt_long extension ;
2952 see there for details.
2957 This variable contains options as a preset for
2959 As not all of these are relevant for
2961 only the essential parts of its value are extracted.
2963 The options specified in this variable overwrite the values of the
2964 other environment variables that are specific to
2967 All options specified in this variable are overridden by the options
2968 given on the command line.
2973 If set, this variable contains the directories in which the
2977 This is overridden by option
2983 If this is a colon separated list of section names, the search for
2985 is restricted to those manual sections in that order.
2987 This is overridden by option
2988 .Opt_long sections .
2993 If this is set to a comma separated list of names these are interpreted
2996 trees for different operating systems.
2998 This variable can be overwritten by option
3000 see there for details.
3004 The environment variable
3005 .Env_var $MANROFFSEQ
3008 because the necessary preprocessors are determined automatically.
3011 .\" --------------------------------------------------------------------
3012 .SH "CONFIGURATION FILES"
3013 .\" --------------------------------------------------------------------
3017 program can be preconfigured by two configuration files.
3021 .File_name /etc/groff/groffer.conf
3022 System-wide configuration file for
3027 .File_name $HOME/.groff/groffer.conf
3028 User-specific configuration file for
3032 denotes the user's home directory.
3034 This file is called after the system-wide configuration file to enable
3035 overriding by the user.
3039 The precedence of option delivery is given in the following.
3041 The configuration file in
3043 has the lowest precedence; it is overwritten by the configuration file
3044 in the home directory; both configuration files are overwritten by the
3045 environment variable
3046 .Env_var $GROFFER_OPT ;
3047 everything is overwritten by the command line.
3051 In the configuration files, arbitrary spaces are allowed at the
3052 beginning of each line, they are just ignored.
3054 Apart from that, the lines of the configuration lines either start
3055 with a minus character, all other lines are interpreted as shell
3060 The lines with the beginning minus are interpreted as
3064 This easily allows to set general
3066 options that should be used with any call of
3069 Each line can represent a single short option, a short option cluster,
3070 or a long option with two minus signs, eventually with an argument.
3072 The argument can be appended either after a space character or an
3075 The argument can be surrounded by quotes, but this is not necessary.
3077 The options from these lines are collected and prepended to the
3079 .Env_var $GROFFER_OPT
3080 at the end of each configuration file.
3084 After the transformation of the minus lines, the configuration files
3085 have been transferred into a shell script that is called within
3094 It makes sense to use these configuration files for the following
3098 Preset command line options by writing them into lines starting with a
3102 Preset environment variables recognized by
3104 but do not forget to export them.
3107 Write a function for calling a viewer program for a special
3109 and feed this name into its corresponding
3110 .Opt_long \f[I]mode\f[]\-viewer
3113 Note that the name of such a function must either be given as the full
3114 file name or coincide with some existing program in the system path
3116 in order to be recognized by
3122 to specify a shell for the run of
3123 .File_name groffer2.sh .
3124 Some shells run much faster than the standard shell; the fastest
3125 Bourne shell that I know is
3127 It makes really sense to add a line like
3129 to your configuration file as long as the given shell is installed on
3134 As an example, consider the following configuration file in
3135 .File_name ~/.groff/groffer.conf ,
3142 # groffer configuration file
3144 # groffer options that are used in each call of groffer
3146 \-\-foreground=DarkBlue
3148 \-\-x\-viewer='gxditview \-geometry 900x1200'
3150 # some shell commands
3151 if test "$DISPLAY" = ""; then
3152 export DISPLAY='localhost:0.0'
3154 date >>~/mygroffer.log
3161 The lines starting with
3165 This configuration sets four
3167 options (the lines starting with `\-') and runs two shell commands (the
3168 rest of the script).
3170 This has the following effects:
3176 as the shell to run the
3178 script; if it works it should be faster than the usual
3185 in all viewers that support this, such as
3192 in all viewers that support this, such as
3195 By this, the default device in
3203 .BR \%gxditview (@MAN1EXT@)
3206 viewer using the geometry option for setting the width to
3210 This geometry is suitable for a resolution of
3215 If the environment variable
3220 That allows to start
3222 in the standard X\~\%display, even when the program is called from a
3227 Just for fun, the date of each
3229 start is written to the file
3230 .File_name mygroffer.log
3231 in the home directory.
3234 .\" --------------------------------------------------------------------
3236 .\" --------------------------------------------------------------------
3242 Usually, it is just called with a file name or
3245 The following examples, however, show that
3247 has much more fancy capabilities.
3251 .Shell_cmd "groffer\~/usr/local/share/doc/groff/meintro.ms.gz"
3252 Decompress, format and display the compressed file
3253 .File_name meintro.ms.gz
3255 .File_name /usr/local/share/doc/groff ,
3258 as graphical viewer when in X\~\%Window, or the
3260 pager program when not in X.
3264 .Shell_cmd "groffer\~groff"
3266 .File_name \%./groff
3267 exists use it as input.
3269 Otherwise interpret the argument as a search for the
3273 in the smallest possible
3274 .IR \%man\~section ,
3275 being section 1 in this case.
3279 .Shell_cmd "groffer\~man:groff"
3290 .Shell_cmd "groffer\~groff.7"
3292 .Shell_cmd "groffer\~7\~groff"
3300 This section search works only for a digit or a single character from
3305 .Shell_cmd "groffer\~fb.modes"
3307 .File_name ./fb.modes
3308 does not exist interpret this as a search for the
3314 is not a single character in classical section style the argument is
3315 not split to a search for
3320 .Shell_cmd "groffer\~groff\~\[cq]troff(1)\[cq]\~man:roff"
3322 The arguments that are not existing files are looked-up as the
3326 (automatic search, should be found in \fIman\fP\~section\~1),
3331 (in the section with the lowest number, being\~7 in this case).
3335 .I \[cq]troff(1)\[cq]
3337 are necessary because the paranthesis are special shell characters;
3338 escaping them with a backslash character
3342 would be possible, too.
3344 The formatted files are concatenated and displayed in one piece.
3348 .Shell_cmd "LANG=de\~groffer\~--man\~--www\~--www-viever=mozilla\~ls"
3356 program, decompress it, format it to
3362 and view the result in the web browser
3368 is retrieved, even when a local file
3370 exists in the actual directory.
3374 .Shell_cmd "groffer\~--source\~'man:roff(7)'"
3380 in \fIman\fP\~section 7, decompress it, and print its unformatted
3381 content, its source code.
3385 .Shell_cmd "cat\~file.gz\~|\~groffer\~-Z\~-mfoo"
3387 Decompress the standard input, send this to
3388 .I \%groff intermediate output mode
3389 without post-processing
3393 using macro package by
3401 .Shell_cmd "echo\~'\[rs]f[CB]WOW!'\~|"
3403 .Shell_cmd+ "groffer --x --bg red --fg yellow --geometry 200x100 -"
3405 Display the word \f[CB]WOW!\f[] in a small window in constant-width
3406 bold font, using color yellow on red background.
3409 .\" --------------------------------------------------------------------
3411 .\" --------------------------------------------------------------------
3415 program consists of two shell scripts.
3419 The starting script is the file
3420 .File_name \%groffer
3421 that is installed in a
3425 It is generated from the source file
3426 .File_name \%groffer.sh .
3428 It is just a short starting script without any functions such that it
3429 can run on very poor shells.
3433 The main part of the
3436 .File_name groffer2.sh
3437 that is installed in the
3441 This script can be run under a different shell by using the
3448 Both scripts are compatible with both
3451 \%POSIX compatibility refers to
3452 .B IEEE P1003.2/D11.2
3453 of September 1991, a very early version of the \%POSIX standard that
3454 is still freely available in the internet at
3455 .URL http://\:www.funet.fi/\:pub/\:doc/\:posix/\:p1003.2/\:d11.2/\:all \
3456 "\%POSIX P1003.2 draft 11.2" .
3460 Only a restricted set of shell language elements and shell builtins is
3461 used to achieve even compatibility with some Bourne shells that are
3462 not fully \%POSIX compatible.
3466 shell scripts were tested on many shells, including the following
3476 So it should work on most actual free and commercial operating
3481 The shell for the run of
3482 .File_name groffer2.sh
3483 can be chosen by the option
3485 on the command line or the environment variable
3486 .Env_var $GROFF_OPT .
3487 If you want to add it to one of the
3489 configuration files you must write a line starting with
3496 program provides its own parser for command line arguments that is
3503 It can handle option arguments and file names containing white space
3504 and a large set of special characters.
3506 The following standard types of options are supported.
3510 The option consisiting of a single minus
3512 refers to standard input.
3516 A single minus followed by characters refers to a single character
3517 option or a combination thereof; for example, the
3519 short option combination
3522 .Opt_short Q\~\-m\~foo .
3526 Long options are options with names longer than one character; they
3527 are always preceded by a double minus.
3529 An option argument can either go to the next command line argument or
3530 be appended with an equal sign to the argument; for example,
3531 .Opt_alt -- long=arg
3533 .Opt_alt -- long\~arg .
3539 ends option parsing; all further command line arguments are
3540 interpreted as filespec parameters, i.e. file names or constructs for
3546 All command line arguments that are neither options nor option
3547 arguments are interpreted as filespec parameters and stored until
3548 option parsing has finished.
3550 For example, the command line
3551 .Shell_cmd "groffer file1 -a -o arg file2"
3553 .Shell_cmd "groffer -a -o arg -- file1 file2"
3557 The free mixing of options and filespec parameters follows the GNU
3560 That does not fulfill the strange option behavior of \%POSIX that ends
3561 option processing as soon as the first non-option argument has been
3564 The end of option processing can be forced by the option
3569 .\" --------------------------------------------------------------------
3571 .\" --------------------------------------------------------------------
3574 .MTO bug-groff@gnu.org "bug-groff mailing list" .
3576 Include a complete, self-contained example that will allow the bug to
3577 be reproduced, and say which version of
3583 You can also use the
3584 .MTO groff@gnu.org "groff mailing list" ,
3585 but you must first subscribe to this list.
3587 You can do that by visiting the
3588 .URL http://\:lists.gnu.org/\:mailman/\:listinfo/\:groff \
3589 "groff mailing list web page" .
3594 .BR \%groff (@MAN1EXT@)
3595 for information on availability.
3598 .\" --------------------------------------------------------------------
3600 .\" --------------------------------------------------------------------
3603 .BR \%groff (@MAN1EXT@),
3604 .BR \%@g@troff (@MAN1EXT@)
3606 Details on the options and environment variables available in
3608 all of them can be used with
3614 .BR \%groff (@MAN7EXT@)
3615 Documentation of the
3621 .BR \%grog (@MAN1EXT@)
3626 command line options from the input using this program.
3630 .BR groff_out (@MAN5EXT@)
3631 Documentation on the
3632 .I \%groff intermediate output
3640 .BR groff_tmac (@MAN5EXT@)
3641 Documentation on the
3648 The standard program to display
3651 The information there is only useful if it is the
3655 Then it documents the options and environment variables that are
3670 Bourne shells that were tested with
3676 .BR \%gxditview (@MAN1EXT@),
3686 .BR \%kghostview (1),
3689 .BR \%ghostview (1),
3699 .BR \%kghostview (1),
3723 .BR \%konqueror (1),
3737 Standard pager program for the
3745 The decompression programs supported by
3750 .\" --------------------------------------------------------------------
3752 .\" --------------------------------------------------------------------
3756 .\" --------------------------------------------------------------------
3758 .\" --------------------------------------------------------------------
3762 .\" --------------------------------------------------------------------
3764 .\" --------------------------------------------------------------------
3766 .\" Local Variables: