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: 22 August 2005
20 Source file position: <groff-source>/contrib/groffer/groffer.man
23 This file was written by
24 .MTO "" "Bernd Warken" .
27 Copyright (C) 2001,2002,2004,2005 Free Software Foundation, Inc.
34 a free software project.
36 You can redistribute it and/or modify it under the terms of the
38 .B GNU General Public License
42 .BR "Free Software Foundation" ,
44 either version 2, or (at your option) any later version.
47 You should have received a copy of the \f[CR]GNU General Public
48 License\f[] along with
50 see the files \%\f[CB]COPYING\f[] and \%\f[CB]LICENSE\f[] in the top
58 You can also write to the
60 .B Free Software Foundation, 51 Franklin St - Fifth Floor, Boston,
61 .BR "MA 02110-1301, USA" .
65 .\" --------------------------------------------------------------------
67 .\" --------------------------------------------------------------------
82 .ds Ellipsis ".\|.\|.\""
84 .\" --------------------------------------------------------------------
85 .\" setup for the macro definitions below
87 .\" naming: namespace:cathegory_macro.variable_name (experimental)
89 .\" --------------------------------------------------------------------
90 .\" configuration of prompt for `.Shell_cmd'* macros
91 .ds groffer:Shell_cmd.prompt_text sh#\" prompt for shell commands
92 .ds groffer:Shell_cmd+.prompt_text >\" prompt on continuation lines
93 .ds groffer:Shell_cmd_base.prompt_font I\" font for prompts
95 .\" automatically determine setup from the configuration above
96 .als @f groffer:Shell_cmd_base.prompt_font\"
97 .als @t groffer:Shell_cmd.prompt_text\"
98 .als @t+ groffer:Shell_cmd+.prompt_text\"
99 .ds groffer:Shell_cmd.prompt \f[\*[@f]]\*[@t]\f[]\" needed
100 .ds groffer:Shell_cmd+.prompt \f[\*[@f]]\*[@t+]\f[]\" needed
101 .nr @w \w'\*[groffer:Shell_cmd.prompt]'\"
102 .nr @w+ \w'\*[groffer:Shell_cmd+.prompt]'\"
104 .\" Full prompt width is maximum of texts plus 1m
105 .nr groffer:Shell_cmd_base.prompt_width (\n[@w]>?\n[@w+]+1m)\" needed
114 .\" --------------------------------------------------------------------
115 .\" static register for inter-macro communication in `.Synopsis'*
116 .nr groffer:Synopsis.level 0
118 .\" --------------------------------------------------------------------
119 .\" static registers for inter-macro communication in `.TP'*
120 .nr groffer:TP.level 0
121 .rr groffer:TP_header.flag
122 .rr groffer:TP_body.flag
123 .rr groffer:TP.indent
126 .\" --------------------------------------------------------------------
127 .\" Macro definitions
129 .\" Ignore all arguments like a comment, even after a .eo call.
132 .c --------------------------------------------------------------------
135 .c Print in constant-width bold font.
142 .c --------------------------------------------------------------------
145 .c Print in constant-width italic font.
152 .c --------------------------------------------------------------------
155 .c Print in constant-width roman font.
162 .c --------------------------------------------------------------------
163 .c .Error (<text>...)
165 .c Print error message to terminal and abort.
171 .c --------------------------------------------------------------------
172 .c .Env_var (<env_var_name> [<punct>])
174 .c Display an environment variable, with optional punctuation.
179 . Text \f[CB]\\$1\f[]\\$2
182 .c --------------------------------------------------------------------
183 .c .File_name (<path_name>)
185 .c Display a file or directory name in CB font.
190 .c --------------------------------------------------------------------
191 .c .Header_CB (<path_name>)
193 .c Display a line in CB font, for example after .TP
197 . Text \f[CB]\\$1\f[]\\$2
200 .c --------------------------------------------------------------------
201 .c .Opt_- ([<punct>])
203 .c Print `-' (minus sign); optional punctuation.
206 . ie (\\n[.$] == 0) \
209 . Opt_alt - "" "\\$1"
211 .c --------------------------------------------------------------------
212 .c .Opt_[-] ([<punct>])
214 .c Print `Opt_[-]' (minus sign in brackets); optional punctuation.
217 . ie (\\n[.$] == 0) \
220 . Opt_[alt] - "" "\\$1"
222 .c --------------------------------------------------------------------
223 .c .Opt_-- ([<punct>])
225 .c Print `--' (double minus); optional punctuation.
228 . ie (\\n[.$] == 0) \
231 . Opt_alt -- "" "\\$1"
233 .c --------------------------------------------------------------------
234 .c .Opt_[--] ([<punct>])
236 .c Print `Opt_[--]' (double minus in brackets); optional punctuation.
239 . ie (\\n[.$] == 0) \
242 . Opt_[alt] -- "" "\\$1"
244 .c --------------------------------------------------------------------
245 .c .Opt_alt ([<minus> <opt>]... [<arg> [<punct>]])
247 .c Alternate options separated by a vertical bar.
250 .c minus: either `-' or `--' (font CB).
251 .c opt: a name for an option, empty allowed (font CB).
252 .c arg: optionally, the argument to the option (font I).
253 .c punct: optional punctuation (in the starting font).
255 .c The minus/opt argument pairs, each
256 .c separated by a vertical bar `|', optionally add 'arg', separated
257 .c a space character ` '.
260 .c .Opt_alt - T -- device -- device-troff device .
262 .c -T|--device|--device-troff device.
265 . Opt_alt_base "" | "" \\$@
267 .c --------------------------------------------------------------------
268 .c .Opt_[alt] ([<minus> <opt>]... [<arg> [<punct>]])
270 .c Alternate options in brackets for section SYNOPSIS.
273 .c minus: either `-' or `--' (font CB).
274 .c opt: a name for an option, empty allowed (font CB).
275 .c arg: optionally, the argument to the option (font I).
276 .c punct: optional punctuation (in the starting font).
277 .c Global strings written to:
278 .c `@oa_prefix': left enclosing character (`[')
279 .c `@oa_sep': separator (`|')
280 .c `@oa_postfix': right enclosing character (`]')
282 .c The minus/opt argument pairs, each separated by a vertical
283 .c bar `|', optionally add 'arg', separated by a space character ` '.
286 .c .Opt_[alt] - T -- device -- device-troff device .
288 .c [-T|--device|--device-troff device].
291 . Opt_alt_base [ | ] \\$@
293 .c --------------------------------------------------------------------
294 .c .Opt_alt_base (<pre> <sep> <post> [<minus> <opt>]... [arg [punct]])
296 .c Alternating options; base macro for many others; do not use directly.
299 .c <pre>: prefix, result is preceded by this.
300 .c <sep>: separator between minus/opt pairs.
301 .c <post>: postfix, is appended to the result.
302 .c <minus>: either `-' or `--' (font CB).
303 .c <opt>: a name for an option, empty allowed (font CB).
304 .c <arg>: optionally, the argument to the option (font I).
305 .c <punct>: optional punctuation (in the starting font).
307 .c String `<pre>' followed by the <minus>/<opt> argument pairs, each
308 .c separated by string `<sep>', optionally add '<arg>', separated by
309 .c a single space ` ', followed by the string `<post>'. Terminated
310 .c by the optional punctuation <punct>.
315 . Error .\\0: not enough arguments.
316 . ds @pre \)\\$1\)\" prefix
317 . ds @sep \)\\$2\)\" separator
318 . ds @post \)\\$3\)\" postfix
321 . ds @res \f[CR]\\*[@pre]\"
322 . while (\\n[.$] >= 2) \{\
323 . c do the pairs, break on no `-'
329 . if (\\n[@count] > 0) \
330 . as @res \f[CR]\\*[@sep]\:\"
332 . c combine minus with option name
333 . as @res \f[CB]\\-\"
339 . if (\\n[.$] >= 3) \
340 . Error .\\0: wrong arguments: \\$@
341 . c all pairs are done
342 . ie (\\n[.$] == 0) \
343 . as @res \f[CR]\\*[@post]\"
345 . c optional option argument
347 . as @res \f[CR] \,\f[I]\\$1\"
350 . as @res \\f[CR]\\*[@post]\"
351 . if (\\n[.$] >= 1) \{\
353 . as @res \f[\\n[@font]]\\$1\"
367 .c --------------------------------------------------------------------
368 .c .Opt_def ([<minus> <opt>]... [<arg> [<punct>]])
370 .c Definitions of options in section OPTIONS.
373 .c minus: either `-' or `--' (font CB).
374 .c opt: a name for an option, empty allowed (font CB).
375 .c arg: optionally, the argument to the option (font I).
376 .c punct: optional punctuation (in the starting font).
378 .c The header for an indented paragraph, consisting of
379 .c minus/opt argument pairs, each, separated by a space
380 .c character ` ', optionally add 'arg', separated a space
384 .c .Opt_def - T -- device -- device-troff device .
386 .c -T --device --device-troff device.
387 .c as the header of for indented paragraph.
391 . Opt_alt_base "" "\~|\~" "" \\$@
393 .c --------------------------------------------------------------------
394 .c .Opt_element ([<minus> <opt>]... [<arg> [<punct>]])
396 .c Definitions of options in section OPTIONS.
399 .c minus: either `-' or `--' (font CB).
400 .c opt: a name for an option, empty allowed (font CB).
401 .c arg: optionally, the argument to the option (font I).
402 .c punct: optional punctuation (in the starting font).
404 .c The minus/opt argument pairs, each, separated by a space
405 .c character ` ', optionally add 'arg', separated a space
409 .c .Opt_element - T -- device -- device-troff device .
411 .c -T --device --device-troff device.
414 . Opt_alt_base "" "\~" "" \\$@
416 .c --------------------------------------------------------------------
417 .als Opt_list Opt_element
419 .c --------------------------------------------------------------------
420 .c .Opt_long ([<name> [<punct>]])
422 .c Print `--name' somewhere in the text; optional punctuation.
425 . Opt_alt -- "\\$1" "" "\\$2"
427 .c --------------------------------------------------------------------
428 .c .Opt_long_arg ([<name> <arg> [<punct>]])
430 .c Print `--name=arg' somewhere in the text; optional punctuation.
433 . Opt_alt -- "\\$1=\\$2" "" "\\$3"
435 .c --------------------------------------------------------------------
436 .c .Opt_[long] ([<name> [<punct>]])
438 .c Print `--name' somewhere in the text; optional punctuation.
441 . Opt_[alt] -- "\\$1" "" "\\$2"
443 .c --------------------------------------------------------------------
444 .c .Opt_short ([<name> [<punct>]])
446 .c Print `-name' somewhere in the Text; optional punctuation.
449 . Opt_alt - "\\$1" "" "\\$2"
451 .c --------------------------------------------------------------------
452 .c .Opt_[short] ([name [punct]])
454 .c Print `[-name]' somewhere in the Text; optional punctuation.
457 . Opt_[alt] - "\\$1" "" "\\$2"
459 .c --------------------------------------------------------------------
460 .c .Shell_cmd (<CR> [<CI>] ...)
462 .c A shell command line; display args alternating in fonts CR and CI.
465 .c .Shell_cmd "groffer --dpi 100 file"
466 .c result: `sh# groffer --dpi 100 file'
467 .c with 'sh#' in font I, the rest in CR
469 .c .Shell_cmd groffer\~--dpi\~100\~file
470 .c result: the same as above
472 .c .Shell_cmd "groffer --dpi=" value " file"
473 .c result: sh# groffer --dpi=value file
474 .c with `groffer --dpi=' and `file' in CR; `value' in CI
476 .c .Shell_cmd groffer\~--dpi= value \~file
477 .c result: the same as the previous example
480 . groffer:Shell_cmd_base "\*[groffer:Shell_cmd.prompt]" \\$@
482 .c --------------------------------------------------------------------
483 .c .Shell_cmd+ (<CR> [<CI>] ...)
485 .c A continuation line for .Shell_cmd.
488 . groffer:Shell_cmd_base "\*[groffer:Shell_cmd+.prompt]" \\$@
490 .c --------------------------------------------------------------------
491 .c .Shell_cmd_base (<prompt> [<CR> [<CI>] ...])
493 .c A shell command line; display args alternating in fonts CR and CI.
494 .c Internal, do not use directly.
496 .c Globals: read-only register @.Shell_cmd_width
498 .de groffer:Shell_cmd_base
499 . if (\\n[.$] <= 0) \
501 . nr @+font \\n[.f]\"
504 . c gap between prompt and command
505 . nr @+gap \\n[groffer:Shell_cmd_base.prompt_width]-\\w'\\*[@prompt]'\"
506 . ds @res \\*[@prompt]\h'\\n[@+gap]u'\"
509 . while (\\n[.$] > 0) \{\
510 . as @res \\f[\\*[@cf]]\\$1\"
532 .c --------------------------------------------------------------------
535 .c Begin a synopsis section, to be ended by a ./Synopsis macro.
538 . if (\\n[groffer:Synopsis.level] > 0) \
539 . Error .\\$0: previous .Synopsis was not closed by ./Synopsis.
542 . nr @old_indent \\n(.i
544 . in +\w'\fB\\*[@1]\0'u
545 . ti \\n[@old_indent]u
549 . nr groffer:Synopsis.level +1\" marker for ./Synopsis
551 .c --------------------------------------------------------------------
554 .c Close a synopsis section opened by the previous .Synopsis macro.
557 . if (\\n[groffer:Synopsis.level] <= 0) \
558 . Error .\\$0: no previous call of .Synopsis
563 . nr groffer:Synopsis.level -1
565 .c --------------------------------------------------------------------
568 .c Treat the arguments as text, no matter how they look.
571 . if (\\n[.$] == 0) \
577 .c --------------------------------------------------------------------
578 .c .Topic ([<indent>])
580 .c A bulleted paragraph
591 .c --------------------------------------------------------------------
594 .c Continuation line for .TP header.
601 .c --------------------------------------------------------------------
602 .c .TP_header ([<indent>])
604 .c Start a multi-line header for a .TP-like paragraph
607 . if (\\n[groffer:TP.level] < 0) \
608 . Error .\\$0: wrong level.
609 . nr groffer:TP.level +1
611 . ie (\\n[.$] == 0) \
612 . rr groffer:TP.indent
614 . nr groffer:TP.indent \\$1
615 . nr groffer:TP_header.flag 1
617 .c --------------------------------------------------------------------
618 .c .TP_body ([<indent>])
620 .c End a previous .TP-header and beging the body of the paragraph.
623 . if !rgroffer:TP_header.flag \
624 . Error .\\$0: no previous call of .TP_header
625 . if (\\n[groffer:TP.level] <= 0) \
626 . Error .\\$0: wrong level.
628 . ie (\\n[.$] == 0) \{\
629 . ie rgroffer:TP.indent \{\
630 . RS \\n[groffer:TP.indent]u
637 . rr groffer:TP.indent
638 . rr groffer:TP_header.flag
639 . nr groffer:TP_body.flag 1
641 .c --------------------------------------------------------------------
644 .c End of former .TP_body paragraph.
647 . if !rgroffer:TP_body.flag \
648 . Error .\\$0: no previous .TP_body.
649 . if (\\n[groffer:TP.level] <= 0) \
650 . Error TP_end: wrong level.
651 . nr groffer:TP.level -1
652 . rr grogger:TP.indent
653 . rr groffer:TP_header.flag
654 . rr groffer:TP_body.flag
659 .\" End of macro definitions
662 .\" --------------------------------------------------------------------
664 .\" --------------------------------------------------------------------
670 .RI [ "\%filespec" "\*[Ellipsis]]"
678 .Opt_alt - v -- version
682 .\" --------------------------------------------------------------------
684 .\" --------------------------------------------------------------------
688 program is the easiest way to use
689 .BR \%groff (@MAN1EXT@).
690 It can display arbitrary documents written in the
693 .BR \%groff (@MAN7EXT@),
697 .BR \%roff (@MAN7EXT@),
698 that are compatible to the original
704 program also includes many of the features for finding and displaying
705 the \%\f[CR]Unix\f[] manual pages
709 such that it can be used as a replacement for a
713 Moreover, compressed files that can be handled by
717 are decompressed on-the-fly.
721 The normal usage is quite simple by supplying a file name or name of a
723 without further options.
725 But the option handling has many possibilities for creating special
728 This can be done either in configuration files, with the shell
731 or on the command line.
735 The output can be generated and viewed in several different ways
741 native \%\f[CR]X\~Window\f[] viewer
742 .BR \%gxditview (@MAN1EXT@),
748 display program, a web browser by generating
758 Most of the options that must be named when running
760 directly are determined automatically for
762 due to the internal usage of the
763 .BR \%grog (@MAN1EXT@)
766 But all parts can also be controlled manually by arguments.
770 Several file names can be specified on the command line arguments.
772 They are transformed into a single document in the normal way of
777 Option handling is done in \f[CR]GNU\f[] style.
779 Options and file names can be mixed freely.
783 closes the option handling, all following arguments are treated as
786 Long options can be abbreviated.
789 .\" --------------------------------------------------------------------
790 .SH "OPTION OVERVIEW"
791 .\" --------------------------------------------------------------------
797 .Opt_[alt] - h -- help
798 .Opt_[alt] - v -- version
803 .I \%groffer mode options
807 .Opt_[alt] -- default
808 .Opt_[alt] -- default\-modes mode1,mode2,\*[Ellipsis]
810 .Opt_[alt] -- dvi\-viewer prog
811 .Opt_[alt] -- dvi\-viewer\-tty prog
814 .Opt_[alt] -- html\-viewer prog
815 .Opt_[alt] -- html\-viewer\-tty prog
816 .Opt_[alt] -- mode display_mode
818 .Opt_[alt] -- pdf\-viewer prog
819 .Opt_[alt] -- pdf\-viewer\-tty prog
821 .Opt_[alt] -- ps\-viewer prog
822 .Opt_[alt] -- ps\-viewer\-tty prog
825 .Opt_[alt] -- tty\-viewer prog
826 .Opt_[alt] -- tty\-viewer\-tty prog
828 .Opt_[alt] -- www\-viewer prog
829 .Opt_[alt] -- www\-viewer\- prog
831 .Opt_[alt] -- x\-viewer -- X\-viewer prog
832 .Opt_[alt] -- x\-viewer\-tty -- X\-viewer\-tty prog
837 .I development options
841 .Opt_[alt] -- do\-nothing
842 .Opt_[alt] -- shell prog
843 .Opt_[alt] - Q -- source
849 .I options related to \%groff
852 .Opt_[alt] - T -- device device
853 .Opt_[alt] - Z -- intermediate\-output -- ditroff
857 short options are accepted.
862 .I options for man\~pages
863 .Opt_[alt] -- apropos
864 .Opt_[alt] -- apropos\-data
865 .Opt_[alt] -- apropos\-devel
866 .Opt_[alt] -- apropos\-progs
870 .Opt_[alt] -- no-special
874 .I long options taken over from GNU man
879 .Opt_[alt] -- ditroff
880 .Opt_[alt] -- extension suffix
881 .Opt_[alt] -- locale language
882 .Opt_[alt] -- local-file
883 .Opt_[alt] -- manpath dir1:dir2:\*[Ellipsis]
884 .Opt_[alt] -- pager program
885 .Opt_[alt] -- sections sec1:sec2:\*[Ellipsis]
886 .Opt_[alt] -- systems sys1,sys2,\*[Ellipsis]
887 .Opt_[alt] -- troff-device device
889 Further long options of \f[CR]GNU\f[]
891 are accepted as well.
896 .I X Window Toolkit options
899 .Opt_[alt] -- bd pixels
900 .Opt_[alt] -- bg -- background color
901 .Opt_[alt] -- bw pixels
902 .Opt_[alt] -- display X-display
903 .Opt_[alt] -- fg -- foreground color
904 .Opt_[alt] -- ft -- font font_name
905 .Opt_[alt] -- geometry size_pos
906 .Opt_[alt] -- resolution value
908 .Opt_[alt] -- title string
909 .Opt_[alt] -- xrm X-resource
914 .I \%filespec arguments
919 parameters means standard input.
924 stands for standard input (can occur several times).
929 the path name of an existing file.
933 .BI man: name ( section )
936 search the \%man\~page
950 search for a \%man\~page
958 \%man\~page in the lowest \%man\~section that has
968 search for a \%man\~page
978 is not an existing file search for the man\~page
980 in the lowest man\~section.
985 .\" --------------------------------------------------------------------
987 .\" --------------------------------------------------------------------
991 program can usually be run with very few options.
993 But for special purposes, it supports many options.
995 These can be classified in 5 option classes.
1001 are compatible with the short options of
1002 .BR \%groff (@MAN1EXT@).
1006 are compatible with the long options of
1010 .\" --------------------------------------------------------------------
1011 .SS "groffer breaking Options"
1012 .\" --------------------------------------------------------------------
1014 As soon as one of these options is found on the command line it is
1015 executed, printed to standard output, and the running
1017 is terminated thereafter.
1019 All other arguments are ignored.
1022 .Opt_def - h -- help
1023 Print a helping information with a short explanation of option sto
1027 .Opt_def - v -- version
1028 Print version information to standard output.
1031 .\" --------------------------------------------------------------------
1032 .SS "groffer Mode Options"
1033 .\" --------------------------------------------------------------------
1035 The display mode and the viewer programs are determined by these
1038 If none of these mode and viewer options is specified
1040 tries to find a suitable display mode automatically.
1042 The default modes are
1046 in \%\f[CR]X\~Window\f[] and
1056 There are two kinds of options for viewers.
1057 .Opt_long \fImode\fP-viewer
1058 chooses the normal viewer programs that run on their own in
1059 \%\f[CR]X\~Window\f[], while
1060 .Opt_long \fImode\fP-viewer-tty
1061 chooses programs that run on the terminal (on tty).
1063 Most graphical viewers are programs running in \%\f[CR]X\~Window\f[],
1064 so there aren't many opportunities to call the tty viewers.
1066 But they give the chance to view the output source; for example,
1067 .Opt_long ps\-viewer\-tty=less
1068 shows the content of the
1070 output with the pager
1075 The \%\f[CR]X\~Window\f[] viewers are not critical, you can use both
1078 .Opt_long *\-viewer\-tty
1080 .Opt_long *\-viewer\-tty
1081 the viewer program will not become independently, it just stays
1084 But the program will not run if you specify a terminal program with
1086 because this viewer will stay in background without a chance to reach
1090 .Opt_long *\-viewer\-tty
1091 for viewers that run on tty.
1096 .Opt_long_arg mode auto .
1100 Reset all configuration from previously processed command line options
1101 to the default values.
1103 This is useful to wipe out all former options of the configuration, in
1104 .Env_var $GROFFER_OPT ,
1105 and restart option processing using only the rest of the command line.
1108 .Opt_def -- default\-modes mode1,mode2,\*[Ellipsis]
1109 Set the sequence of modes for
1111 to the comma separated list given in the argument.
1115 for details on modes. Display in the default manner; actually, this
1116 means to try the modes
1127 .Opt_long_arg mode \%dvi .
1130 .Opt_def -- dvi\-viewer prog
1131 Choose an \%\f[CR]X\~Window\f[] viewer program for
1134 This can be a file name or a program to be searched in
1137 Known \%\f[CR]X\~Window\f[]
1144 In each case, arguments can be provided additionally.
1147 .Opt_def -- dvi\-viewer\-tty prog
1148 Choose a program running on the terminal for viewing the output of
1151 This can be a file name or a program to be searched in
1153 arguments can be provided additionally.
1158 .Opt_long_arg mode groff .
1163 .Opt_long_arg mode html .
1166 .Opt_def -- html\-viewer
1167 Choose an \%\f[CR]X\~Window\f[] web browser program for viewing in
1170 It can be the path name of an executable file or a program in
1173 In each case, arguments can be provided additionally.
1176 .Opt_def -- html\-viewer\-tty
1177 Choose a terminal program for viewing the output of
1180 It can be the path name of an executable file or a program in
1182 arguments can be provided additionally.
1185 .Opt_def -- mode value
1187 Set the display mode.
1189 The following mode values are recognized:
1195 Select the automatic determination of the display mode.
1197 The sequence of modes that are tried can be set with the
1198 .Opt_long default\-modes
1201 Useful for restoring the
1203 when a different mode was specified before.
1208 Display formatted input in a
1212 By default, the formatted input is displayed with the
1220 After the file determination, switch
1222 to process the input like
1223 .BR \%groff (@MAN1EXT@)
1233 Translate the input into html format and display the result in a web
1236 By default, the existence of a sequence of standard web browsers is
1237 tested, starting with
1241 The text html viewer is
1247 Display formatted input in a
1249 (Portable Document Format) viewer
1252 By default, the input is formatted by
1254 using the Postscript device, then it is transformed into the PDF file
1257 and finally displayed either with the
1263 PDF has a big advantage because the text is displayed graphically and
1264 is searchable as well.
1266 But as the transformation takes a considerable amount of time, this
1267 mode is not suitable as a default device for the
1273 Display formatted input in a Postscript viewer program.
1275 By default, the formatted input is displayed with the
1276 .BR \%ghostview (@MAN1EXT@)
1283 .I \%groff\~text\~mode
1284 and write the result to standard output without a pager or viewer
1289 by default, can be chosen with option
1296 .I \%groff\~text\~mode
1297 and write the result to standard output using a text pager program,
1298 even when in \%\f[CR]X\~Window\f[].
1304 .Opt_long_arg mode html .
1309 Display the formatted input in a native
1313 By default, the formatted input is displayed with the
1314 .BR \%gxditview (@MAN1EXT@)
1315 program being distributed together with
1317 But the standard \%\f[CR]X\~Window\f[] tool
1319 can also be chosen with the option
1320 .Opt_long x\-viewer .
1321 The default resolution is
1330 for the resolution of
1340 .I "groff intermediate output"
1341 for the actual device is generated and the result is displayed.
1345 the default width of the geometry of the display program is chosen to
1352 .Opt_long_arg mode x .
1356 The following modes do not use the
1360 They are only interesting for advanced applications.
1365 Generate device output with plain
1367 without using the special viewing features of
1369 If no device was specified by option
1380 Display the source code of the input without formatting; equivalent to
1389 .Opt_long_arg mode pdf .
1392 .Opt_def -- pdf\-viewer prog
1393 Choose an \%\f[CR]X\~Window\f[] viewer program for
1396 This can be a file name or a program to be searched in
1398 arguments can be provided additionally.
1401 .Opt_def -- pdf\-viewer\-tty prog
1402 Choose a terminal viewer program for
1405 This can be a file name or a program to be searched in
1407 arguments can be provided additionally.
1412 .Opt_long_arg mode ps .
1415 .Opt_def -- ps\-viewer prog
1416 Choose an \%\f[CR]X\~Window\f[] viewer program for
1419 This can be a file name or a program to be searched in
1422 Common Postscript viewers inlude
1424 .BR \%ghostview (1),
1428 In each case, arguments can be provided additionally.
1431 .Opt_def -- ps\-viewer\-tty prog
1432 Choose a terminal viewer program for
1435 This can be a file name or a program to be searched in
1437 arguments can be provided additionally.
1442 .Opt_long_arg mode text .
1447 .Opt_long_arg mode tty .
1450 .Opt_def -- tty\-viewer prog
1451 Choose a text pager for mode
1453 The standard pager is
1455 This option is eqivalent to
1458 .Opt_long_arg pager prog .
1459 The option argument can be a file name or a program to be searched in
1461 arguments can be provided additionally.
1464 .Opt_def -- tty\-viewer\-tty prog
1465 This is equivalent to
1466 .Opt_long tty\-viewer
1467 because the programs for
1469 mode run on a terminal anyway.
1474 .Opt_long_arg mode html .
1477 .Opt_def -- www\-viewer prog
1479 .Opt_long html\-viewer .
1482 .Opt_def -- www\-viewer\-tty prog
1484 .Opt_long html\-viewer\-tty .
1489 .Opt_long_arg mode x .
1492 .Opt_def -- X\-viewer -- x\-viewer prog
1493 Choose an \%\f[CR]X\~Window\f[] viewer program for
1495 Suitable viewer programs are
1496 .BR \%gxditview (@MAN1EXT@)
1497 which is the default and
1499 The argument can be any executable file or a program in
1501 arguments can be provided additionally.
1504 .Opt_def -- X\-viewer\-tty -- x\-viewer\-tty prog
1505 Choose a terminal viewer program for
1507 The argument can be any executable file or a program in
1509 arguments can be provided additionally.
1514 Signals the end of option processing; all remaining arguments are
1523 accepts all short options that are valid for the
1524 .BR \%groff (@MAN1EXT@)
1529 options are sent unmodified via
1534 So postprocessors, macro packages, compatibility with
1537 and much more can be manually specified.
1540 .\" --------------------------------------------------------------------
1541 .SH "Options for Development"
1542 .\" --------------------------------------------------------------------
1545 Enable five debugging informations.
1547 The temporary files are kept and not deleted, the name of the
1548 temporary directory and the shell name for
1549 .File_name groffer2.sh
1550 are printed, the parameters are printed at several steps of
1551 development, and a function stack is output with function
1552 \f[CR]error_user()\f[] as well.
1554 Neither the function call stack that is printed at each opening and
1555 closing of a function call nor the landmark information that is
1556 printed to determine how far the program is running are used.
1558 This seems to be the most useful among all debugging options.
1561 .Opt_def -- debug\-all
1562 Enable all seven debugging informations including the function call
1563 stack and the landmark information.
1566 .Opt_def -- debug\-keep
1567 Enable two debugging information, the printing of the name of the
1568 temporary directory and the keeping of the temporary files.
1571 .Opt_def -- debug\-lm
1572 Enable one debugging information, the landmark information.
1575 .Opt_def -- debug\-params
1576 Enable one debugging information, the parameters at several steps.
1579 .Opt_def -- debug\-shell
1580 Enable one debugging information, the shell name for
1581 .File_name groffer2.sh .
1584 .Opt_def -- debug\-stacks
1585 Enable one debugging information, the function call stack.
1588 .Opt_def -- debug\-tmpdir
1589 Enable one debugging information, the name of the temporary directory.
1592 .Opt_def -- debug\-user
1593 Enable one debugging information, the function stack with
1594 \f[CR]error_user()\f[].
1597 .Opt_def -- do-nothing
1600 but without the output; no viewer is started.
1602 This makes only sense in development.
1605 .Opt_def -- print=text
1606 Just print the argument to standard error.
1608 This is good for parameter check.
1611 .Opt_def -- shell "shell_program"
1612 Specify the shell under which the
1613 .File_name \%groffer2.sh
1614 script should be run.
1616 This option overwrites the automatic shell determination of the
1621 is empty a former shell option and the automatic shell determination
1622 is cancelled and the default shell is restored.
1624 Some shells run considerably faster than the standard shell.
1627 .Opt_def - Q -- source
1628 Output the roff source code of the input files without further
1631 This is the equivalent
1632 .Opt_long_arg mode source .
1636 This is an advanced option for debugging only.
1638 Instead of displaying the formatted input, a lot of
1640 specific information is printed to standard output:
1644 the output file name in the temporary directory,
1647 the display mode of the actual
1652 the display program for viewing the output with its arguments,
1655 the active parameters from the config files, the arguments in
1656 .Env_var $GROFFER_OPT ,
1657 and the arguments of the command line,
1660 the pipeline that would be run by the
1662 program, but without executing it.
1667 Other useful debugging options are the
1672 .Opt_long_arg mode groff .
1675 .\" --------------------------------------------------------------------
1676 .SH "Options related to groff"
1677 .\" --------------------------------------------------------------------
1679 All short options of
1681 are compatible with the short options of
1682 .BR \%groff (@MAN1EXT@).
1686 options have either an additional special meaning within
1688 or make sense for normal usage.
1692 Because of the special outputting behavior of the
1697 was designed to be switched into
1701 viewing features are disabled there.
1705 options do not switch the mode, but allow to customize the formatting
1710 This generates an ascii approximation of output in the
1713 That could be important when the text pager has problems with control
1725 This is useful in case it cannot be recognized automatically.
1728 .Opt_def - P opt_or_arg
1731 as an option or option argument to the actual
1736 .Opt_def - T -- device devname
1738 This option determines
1742 The most important devices are the text output devices for referring
1743 to the different character sets, such as
1749 Each of these arguments switches
1753 using this device, to
1755 if the actual mode is not a
1760 arguments are mapped to the corresponding
1762 .Opt_long_arg mode \fIdevname\fR
1770 arguments are mapped to
1774 argument switches to
1783 .I groff intermediate output
1786 As the quality is relatively bad this option is deprecated; use
1792 device for a better display.
1795 .Opt_def - Z -- intermediate-output -- ditroff
1798 and format the input with the
1799 .I \%groff intermediate output
1800 without postprocessing; see
1801 .BR \%groff_out (@MAN5EXT@).
1802 This is equivalent to option
1806 which can be used as well.
1812 options are supported by
1814 but they are just transparently transferred to
1816 without any intervention.
1818 The options that are not explicitly handled by
1820 are transparently passed to
1823 Therefore these transparent options are not documented here, but in
1824 .BR \%groff (@MAN1EXT@).
1825 Due to the automatism in
1829 options should be needed, except for advanced usage.
1832 .\" --------------------------------------------------------------------
1833 .SS "Options for man\~pages"
1834 .\" --------------------------------------------------------------------
1839 command or facility of
1843 arguments within all
1849 argument is taken for search as it is; section specific parts are not
1852 searches for the two arguments
1856 with a large result; for the
1859 nothing will be found.
1861 The display differs from the
1863 program by the following concepts:
1868 frame to the output of
1873 argument is searched on its own.
1879 wildcard characters are allowed and handled without a further option.
1883 .Opt_def -- apropos\-data
1886 descriptions for data documents, these are the
1888 sections 4, 5, and 7.
1890 Direct section declarations are ignored, wildcards are accepted.
1893 .Opt_def -- apropos\-devel
1896 descriptions for development documents, these are the
1898 sections 2, 3, and 9.
1900 Direct section declarations are ignored, wildcards are accepted.
1903 .Opt_def -- apropos\-progs
1906 descriptions for documents on programs, these are the
1908 sections 1, 6, and 8.
1910 Direct section declarations are ignored, wildcards are accepted.
1918 and display their description \[em] or say that it is not a
1923 output by the following concepts
1926 each retrieved file name is added,
1928 local files are handled as well,
1930 the display is framed by a
1934 wildcard characters are allowed without a further option.
1939 The following two options were added to
1941 for choosing whether the file name arguments are interpreted as names
1942 for local files or as a search pattern for
1945 The default is looking up for local files.
1949 Check the non-option command line arguments
1955 then whether they represent an existing file.
1959 is first tested whether it is an existing file.
1962 .Opt_def -- no-man -- local-file
1966 .Opt_long local-file
1967 is the corresponding
1972 .Opt_def -- no-special
1973 Disable former calls of
1975 .Opt_long apropos* ,
1980 .\" --------------------------------------------------------------------
1981 .SS "Long options taken over from GNU man"
1982 .\" --------------------------------------------------------------------
1986 were synchronized with the long options of \f[CR]GNU\f[]
1989 All long options of \f[CR]GNU\f[]
1991 are recognized, but not all of these options are important to
1993 so most of them are just ignored.
1997 In the following, the
1999 options that have a special meaning for
2005 The full set of long and short options of the \f[CR]GNU\f[]
2007 program can be passed via the environment variable
2011 if your system has \f[CR]GNU\f[]
2019 retrieve all suitable documents instead of only one.
2022 .Opt_def - 7 -- ascii
2025 display ASCII translation of special characters for critical environment.
2027 This is equivalent to
2028 .BR "groff -mtty_char" ;
2030 .BR groff_tmac (@MAN5EXT@).
2039 .Opt_def -- extension suffix
2042 search to file names that have
2044 appended to their section element.
2046 For example, in the file name
2047 .I \%/usr/share/man/man3/terminfo.3ncurses.gz
2054 .Opt_def -- locale language
2056 Set the language for
2059 This has the same effect, but overwrites
2063 .Opt_def -- location
2064 Print the location of the retrieved files to standard error.
2067 .Opt_def -- no-location
2068 Do not display the location of retrieved files; this resets a former
2070 .Opt_long location .
2076 .Opt_def -- manpath "'dir1:dir2:\*[Ellipsis]'"
2077 Use the specified search path for retrieving
2079 instead of the program defaults.
2081 If the argument is set to the empty string "" the search for
2087 Set the pager program in
2091 This is equivalent to
2092 .Opt_long tty\-viewer .
2095 .Opt_def -- sections "'sec1:sec2:\*[Ellipsis]'"
2096 Restrict searching for
2100 a colon-separated list.
2103 .Opt_def -- systems "'sys1,sys2,\*[Ellipsis]'"
2106 for the given operating systems; the argument
2108 is a comma-separated list.
2113 .Opt_long location .
2116 .\" --------------------------------------------------------------------
2117 .SS "X\~\%Window\~\%Toolkit Options"
2118 .\" --------------------------------------------------------------------
2120 The following long options were adapted from the corresponding
2121 \%\f[CR]X\~\Window\~Toolkit\f[] options.
2124 will pass them to the actual viewer program if it is an
2125 \%\f[CR]X\~Window\f[] program.
2127 Otherwise these options are ignored.
2131 Unfortunately these options use the old style of a single minus for
2136 that was changed to the standard with using a double minus for long
2137 options, for example,
2141 for the \%\f[CR]X\~Window\f[] option
2149 and the documentation on the \%\f[CR]X\~Window\~Toolkit\f[] options
2150 for more details on these options and their arguments.
2153 .Opt_def -- background color
2154 Set the background color of the viewer window.
2157 .Opt_def -- bd pixels
2158 Specifies the color of the border surrounding the viewer window.
2161 .Opt_def -- bg color
2162 This is equivalent to
2163 .Opt_long background .
2166 .Opt_def -- bw pixels
2167 Specifies the width in pixels of the border surrounding the viewer
2171 .Opt_def -- display X-display
2172 Set the \%\f[CR]X\~Window\f[] display on which the viewer program
2173 shall be started, see the \%\f[CR]X\~Window\f[] documentation for the
2174 syntax of the argument.
2177 .Opt_def -- foreground color
2178 Set the foreground color of the viewer window.
2181 .Opt_def -- fg color
2182 This is equivalent to
2183 .Opt_short foreground .
2186 .Opt_def -- font font_name
2187 Set the font used by the viewer window.
2189 The argument is an \%\f[CR]X\~Window\f[] font name.
2192 .Opt_def -- ft font_name
2193 This is equivalent to
2197 .Opt_def -- geometry size_pos
2198 Set the geometry of the display window, that means its size and its
2203 for the syntax of the argument.
2206 .Opt_def -- resolution value
2207 Set \%\f[CR]X\~Window\f[] resolution in dpi (dots per inch) in some
2210 The only supported dpi values are
2215 Actually, the default resolution for
2219 The resolution also sets the default device in
2224 Reverse foreground and background color of the viewer window.
2227 .Opt_def -- title "'some text'"
2228 Set the title for the viewer window.
2231 .Opt_def -- xrm "'resource'"
2232 Set \f[CR]\%X\~Window\f[] resource.
2235 .\" --------------------------------------------------------------------
2236 .SS "Filespec Arguments"
2237 .\" --------------------------------------------------------------------
2241 parameter is an argument that is not an option or option argument.
2243 It means an input source.
2248 parameters are a file name or a template for searching
2251 These input sources are collected and composed into a single output
2258 The strange \%\f[CR]POSIX\f[] behavior to regard all arguments behind
2259 the first non-option argument as
2261 arguments is ignored.
2263 The \f[CR]GNU\f[] behavior to recognize options even when mixed with
2265 arguments is used througout.
2267 But, as usual, the double minus argument
2269 ends the option handling and interprets all following arguments as
2271 arguments; so the \%\f[CR]POSIX\f[] behavior can be easily adopted.
2275 For the following, it is necessary to know that on each system the
2277 are sorted according to their content into several sections.
2280 .I classical man sections
2281 have a single-character name, either a digit from
2285 or one of the characters
2290 In the following, a stand-alone character
2293 .IR "classical man section" .
2294 The internal precedence of
2298 with the same name within several sections goes according to the
2299 classical single-character sequence.
2301 On some systems, this single character can be extended by a following
2307 facility is based on the classical single character sections.
2313 parameter can have one of the following forms in decreasing sequence.
2319 parameters means that
2321 waits for standard input.
2325 stands for standard input, too; it can occur several times.
2331 is tested whether it is the path name of an existing file.
2333 Otherwise it is assumed to be a searching pattern for a
2338 .BI \%man: name ( section )
2340 .IB \%name ( section )
2341 search the \%man\~page
2343 in \%man\~section\~\c
2347 can be any string, but it must exist in the
2353 Next some patterns based on the
2354 .I classical man sections
2360 search for a \%man\~page
2367 .I classical man section
2374 is searched in the lowest
2385 that has a document called
2392 originates from a strange argument parsing of the
2399 .I classical man section
2400 interpret it as a search for a
2406 otherwise interpret both
2416 We are left with the argument
2418 which is not an existing file.
2420 So this searches for the
2426 that has a document for this name.
2432 arguments are only accepted for
2436 for normal display, they are interpreted as characters.
2440 Several file name arguments can be supplied.
2444 into a single document.
2446 Note that the set of option arguments must fit to all of these file
2449 So they should have at least the same style of the
2454 .\" --------------------------------------------------------------------
2456 .\" --------------------------------------------------------------------
2460 program collects all input into a single file, formats it with the
2462 program for a certain device, and then chooses a suitable viewer
2465 The device and viewer process in
2470 The mode and viewer of a running
2472 program is selected automatically, but the user can also choose it
2476 The modes are selected by option the arguments of
2477 .Opt_long_arg mode \fIanymode .
2478 Additionally, each of this argument can be specified as an option of
2480 .Opt_long \fIanymode .
2481 Most of these modes have a viewer program, which can be chosen by an
2482 option that is constructed like
2483 .Opt_long \fIanymode\fR\-viewer .
2487 Several different modes are offered, graphical modes for
2488 \f[CR]\%X\~Window\f[],
2492 for debugging and development.
2505 This mode testing sequence for
2507 can be changed by specifying a comma separated list of modes with the
2509 .Opt_long default\-modes.
2515 and the decompression of the input are active in every mode.
2518 .\" --------------------------------------------------------------------
2519 .SS "Graphical Display Modes"
2520 .\" --------------------------------------------------------------------
2522 The graphical display modes work mostly in the \%\f[CR]X\~Window\f[]
2523 environment (or similar implementations within other windowing
2526 The environment variable
2530 are used for specifying the \%\f[CR]X\~Window\f[] display to be used.
2532 If this environment variable is empty
2534 assumes that no \%\f[CR]X\~Window\f[] is running and changes to a
2537 You can change this automatic behavior by the option
2538 .Opt_long default\-modes .
2542 Known viewers for the graphical display modes and their standard
2543 \%\f[CR]X\~Window\f[] viewer progams are
2546 \%\f[CR]X\~Window\f[]
2549 .BR \%gxditview (@MAN1EXT@)
2556 in a Postscript viewer
2562 in a dvi viewer program
2564 .RI ( \%dvi\~mode ),
2570 .RI ( \%pdf\~mode ),
2586 has a major advantage \[em] it is the only graphical diplay mode that
2587 allows to search for text within the viewer; this can be a really
2590 Unfortunately, it takes some time to transform the input into the PDF
2591 format, so it was not chosen as the major mode.
2595 These graphical viewers can be customized by options of the
2596 \%\f[CR]X\~Window\~Toolkit\f[].
2600 options use a leading double minus instead of the single minus used by
2601 the \%\f[CR]X\~Window\~Toolkit\f[].
2604 .\" --------------------------------------------------------------------
2606 .\" --------------------------------------------------------------------
2608 There are two modes for text output,
2610 for plain output without a pager and
2612 for a text output on a text terminal using some pager program.
2618 is not set or empty,
2620 assumes that it should use
2625 In the actual implementation, the
2632 This can be changed by specifying option
2639 The pager to be used can be specified by one of the options
2642 .Opt_long tty\-viewer ,
2643 or by the environment variable
2645 If all of this is not used the
2647 program with the option
2649 for correctly displaying control sequences is used as the default
2653 .\" --------------------------------------------------------------------
2654 .SS "Special Modes for Debugging and Development"
2655 .\" --------------------------------------------------------------------
2659 file determination and decompression.
2661 This is combined into a single input file that is fed directly into
2663 with different strategy without the
2667 These modes are regarded as advanced, they are useful for debugging
2668 and development purposes.
2678 just displays the decompressed input.
2686 using only some suitable options provided to
2689 This enables the user to save the generated output into a file or pipe
2690 it into another program.
2695 .IR \%groff\~\%mode ,
2698 disables post-processing, thus producing the
2700 .I groff intermediate
2704 In this mode, the input is formatted, but not postprocessed; see
2705 .BR \%groff_out (@MAN5EXT@)
2712 short options are supported by
2716 .\" --------------------------------------------------------------------
2717 .SH "MAN\~PAGE\~SEARCHING"
2718 .\" --------------------------------------------------------------------
2720 The default behavior of
2722 is to first test whether a file parameter represents a local file; if
2723 it is not an existing file name, it is assumed to represent a name of
2727 This behavior can be modified by the following options.
2732 forces to interpret all file parameters as
2740 .Opt_long local\-file
2743 searching; so only local files are displayed.
2747 If neither a local file nor a
2749 was retrieved for some file parameter a warning is issued on standard
2750 error, but processing is continued.
2756 program provides a search facility for
2759 All long options, all environment variables, and most of the
2760 functionality of the \f[CR]GNU\f[]
2762 program were implemented.
2764 This inludes the extended file names of
2770 in man\~section 7 may be stored under
2771 .File_name /usr/share/man/man7/groff.7.gz ,
2773 .File_name /usr/share/man/
2774 is part of the man\~path, the subdirectory
2776 and the file extension
2778 refer to the man\~section 7;
2780 shows the compression of the file.
2788 are intentionally excluded from the search because
2792 program that wants to format by its own.
2794 With the excellent performance of the actual computers, the
2797 aren't necessary any longer.
2801 The algorithm for retrieving
2803 uses five search methods.
2805 They are successively tried until a method works.
2809 The search path can be manually specified by using the option
2811 An empty argument disables the
2815 This overwrites the other methods.
2819 If this is not available the environment variable
2825 If this is empty, the program tries to read it from the environment
2831 If this does not work a reasonable default path from
2838 If this does not work, the
2840 program for determining a path of
2842 directories is tried.
2846 After this, the path elements for the language (locale) and operating
2851 their sequence is determined automatically.
2854 .File_name /usr/share/man/linux/fr
2856 .File_name /usr/share/man/fr/linux
2861 The language and operating system names are determined from both
2862 environment variables and command line options.
2866 The locale (language) is determined like in \f[CR]GNU\f[]
2868 that is from highest to lowest precedence:
2873 .Env_var $GROFFER_OPT
2882 .Env_var $LC_MESSAGES
2889 The language locale is usually specified in the
2890 \%\f[CR]POSIX\~1003.1\f[] based format:
2893 \f[I]<language>\f[][\f[CB]_\f[]\f[I]<territory>\f[][\f[CB].\f[]\
2894 \f[I]<character-set>\f[][\f[CB],\f[]\f[I]<version>\f[]]]],
2897 but the two-letter code in
2901 is sufficient for most purposes.
2907 for a complicated locale are found the country part consisting of the
2908 first two characters (without the `\f[CB]_\f[]', `\f[CB].\f[]', and
2909 `\f[CB],\f[]' parts) of the locale is searched as well.
2913 If still not found the corresponding
2915 in the default language is used instead.
2917 As usual, this default can be specified by one of \f[CR]C\f[] or
2922 in the default language are usually in English.
2926 Several operating systems can be given by appending their names,
2927 separated by a comma.
2929 This is then specified by the environment variable
2931 or by the command line option
2933 The precedence is similar to the locale case above from highest to
2940 .Env_var $GROFFER_OPT
2954 with the additional language and system specific directories is used.
2958 The search can further be restricted by limiting it to certain
2961 A single section can be specified within each
2963 argument, several sections as a colon-separated list in command line
2966 or environment variable
2969 When no section was specified a set of standard sections is searched
2976 Finally, the search can be restricted to a so-called
2978 This is a postfix that acts like a subsection.
2980 It can be specified by
2982 or environment variable
2983 .Env_var $EXTENSION .
2987 For further details on
2993 .\" --------------------------------------------------------------------
2995 .\" --------------------------------------------------------------------
2997 The program has a decompression facility.
2999 If standard input or a file that was retrieved from the command line
3000 parameters is compressed with a format that is supported by either
3004 it is decompressed on-the-fly.
3006 This includes the \f[CR]GNU\f[]
3013 The program displays the concatenation of all decompressed input in
3014 the sequence that was specified on the command line.
3017 .\" --------------------------------------------------------------------
3019 .\" --------------------------------------------------------------------
3023 program supports many system variables, most of them by courtesy of
3026 All environment variables of
3027 .BR \%groff (@MAN1EXT@)
3030 and some standard system variables are honored.
3033 .\" --------------------------------------------------------------------
3034 .SS "Native groffer Variables"
3035 .\" --------------------------------------------------------------------
3038 .Env_var $GROFFER_OPT
3039 Store options for a run of
3042 The options specified in this variable are overridden by the options
3043 given on the command line.
3045 The content of this variable is run through the shell builtin `eval';
3046 so arguments containing white-space or special shell characters should
3049 Do not forget to export this variable, otherwise it does not exist
3054 .\" --------------------------------------------------------------------
3055 .SS "System Variables"
3056 .\" --------------------------------------------------------------------
3060 program is a shell script that is run through
3061 .File_name /bin/sh ,
3062 which can be internally linked to programs like
3064 The corresponding system environment is automatically effective.
3066 The following variables have a special meaning for
3072 If this variable is set this indicates that the \%\f[CR]X\~Window\f[]
3075 Testing this variable decides on whether graphical or text output is
3078 This variable should not be changed by the user carelessly, but it can
3079 be used to start the graphical
3081 on a remote \%\f[CR]X\~Window\f[] terminal.
3083 For example, depending on your system,
3085 can be started on the second monitor by the command
3086 .Shell_cmd DISPLAY=:0.1\~groffer\~ what.ever &
3092 .Env_var $LC_MESSAGES
3095 If one of these variables is set (in the above sequence), its content
3096 is interpreted as the locale, the language to be used, especially when
3100 A locale name is typically of the form
3112 is an ISO 639 language code,
3114 is an ISO 3166 country code, and
3116 is a character set or encoding identifier like ISO-8859-1 or UTF-8;
3118 .BR \%setlocale (3).
3120 The locale values \f[CR]C\f[] and \%\f[CR]POSIX\f[]
3121 stand for the default, i.e. the
3123 directories without a language prefix.
3125 This is the same behavior as when all 3\~variables are unset.
3130 This variable can be used to set the pager for the tty output.
3132 For example, to disable the use of a pager completely set this
3136 .Shell_cmd PAGER=cat\~groffer\~ anything
3141 All programs within the
3143 shell script are called without a fixed path.
3145 Thus this environment variable determines the set of programs used
3150 .\" --------------------------------------------------------------------
3151 .SS "Groff Variables"
3152 .\" --------------------------------------------------------------------
3156 program internally calls
3158 so all environment variables documented in
3159 .BR \%groff (@MAN1EXT@)
3160 are internally used within
3164 The following variable has a direct meaning for the
3169 .Env_var $GROFF_TMPDIR
3170 If the value of this variable is an existing, writable directory,
3172 uses it for storing its temporary files, just as
3177 .\" --------------------------------------------------------------------
3179 .\" --------------------------------------------------------------------
3181 Parts of the functionality of the
3183 program were implemented in
3185 support for all environment variables documented in
3189 but the meaning was slightly modified due to the different approach in
3191 but the user interface is the same.
3195 environment variables can be overwritten by options provided with
3197 which in turn is overwritten by the command line.
3202 Restrict the search for
3204 to files having this extension.
3206 This is overridden by option
3207 .Opt_long extension ;
3208 see there for details.
3213 This variable contains options as a preset for
3215 As not all of these are relevant for
3217 only the essential parts of its value are extracted.
3219 The options specified in this variable overwrite the values of the
3220 other environment variables that are specific to
3223 All options specified in this variable are overridden by the options
3224 given on the command line.
3229 If set, this variable contains the directories in which the
3233 This is overridden by option
3239 If this is a colon separated list of section names, the search for
3241 is restricted to those manual sections in that order.
3243 This is overridden by option
3244 .Opt_long sections .
3249 If this is set to a comma separated list of names these are interpreted
3252 trees for different operating systems.
3254 This variable can be overwritten by option
3256 see there for details.
3260 The environment variable
3261 .Env_var $MANROFFSEQ
3264 because the necessary preprocessors are determined automatically.
3267 .\" --------------------------------------------------------------------
3268 .SH "CONFIGURATION FILES"
3269 .\" --------------------------------------------------------------------
3273 program can be preconfigured by two configuration files.
3277 .File_name /etc/groff/groffer.conf
3278 System-wide configuration file for
3283 .File_name $HOME/.groff/groffer.conf
3284 User-specific configuration file for
3288 denotes the user's home directory.
3290 This file is called after the system-wide configuration file to enable
3291 overriding by the user.
3295 The precedence of option delivery is given in the following.
3297 The configuration file in
3299 has the lowest precedence; it is overwritten by the configuration file
3300 in the home directory; both configuration files are overwritten by the
3301 environment variable
3302 .Env_var $GROFFER_OPT ;
3303 everything is overwritten by the command line.
3307 In the configuration files, arbitrary spaces are allowed at the
3308 beginning of each line, they are just ignored.
3310 Apart from that, the lines of the configuration lines either start
3311 with a minus character, all other lines are interpreted as shell
3316 The lines with the beginning minus are interpreted as
3320 This easily allows to set general
3322 options that should be used with any call of
3325 Each line can represent a single short option, a short option cluster,
3326 or a long option with two minus signs, eventually with an argument.
3328 The argument can be appended either after a space character or an
3331 The argument can be surrounded by quotes, but this is not necessary.
3333 The options from these lines are collected and prepended to the
3335 .Env_var $GROFFER_OPT
3336 at the end of each configuration file.
3340 After the transformation of the minus lines, the configuration files
3341 have been transferred into a shell script that is called within
3350 It makes sense to use these configuration files for the following
3354 Preset command line options, such as choosing a
3358 These are written into lines starting with a single or double minus
3359 sign, followed by the option name.
3362 Preset environment variables recognized by
3364 but do not forget to export them.
3367 You can also write a shell function for calling, for example a viewer
3370 Such a function can be fed into a corresponding
3371 .Opt_long \f[I]mode\f[]\-viewer
3377 to specify a shell for the run of
3378 .File_name groffer2.sh .
3379 Some shells run much faster than the standard shell.
3383 As an example, consider the following configuration file in
3384 .File_name ~/.groff/groffer.conf ,
3391 # groffer configuration file
3393 # groffer options that are used in each call of groffer
3395 \-\-foreground=DarkBlue
3397 \-\-x\-viewer='gxditview \-geometry 900x1200'
3399 # some shell commands
3400 if test "$DISPLAY" = ""; then
3401 export DISPLAY='localhost:0.0'
3403 date >>~/mygroffer.log
3410 The lines starting with
3414 This configuration sets four
3416 options (the lines starting with `\-') and runs two shell commands (the
3417 rest of the script).
3419 This has the following effects:
3425 as the shell to run the
3427 script; if it works it should be faster than the usual
3434 in all viewers that support this, such as
3441 in all viewers that support this, such as
3444 By this, the default device in
3452 .BR \%gxditview (@MAN1EXT@)
3455 viewer using the geometry option for setting the width to
3459 This geometry is suitable for a resolution of
3464 If the environment variable
3469 That allows to start
3471 in the standard \%\f[CR]X\~Window\f[] display, even when the program
3472 is called from a text console.
3476 Just for fun, the date of each
3478 start is written to the file
3479 .File_name mygroffer.log
3480 in the home directory.
3483 .\" --------------------------------------------------------------------
3485 .\" --------------------------------------------------------------------
3491 Usually, it is just called with a file name or
3494 The following examples, however, show that
3496 has much more fancy capabilities.
3500 .Shell_cmd "groffer\~/usr/local/share/doc/groff/meintro.ms.gz"
3501 Decompress, format and display the compressed file
3502 .File_name meintro.ms.gz
3504 .File_name /usr/local/share/doc/groff ,
3505 using the standard viewer
3507 as graphical viewer when in \%\f[CR]X\~Window\f[], or the
3509 pager program when not in \%\f[CR]X\~Window\f[].
3513 .Shell_cmd "groffer\~groff"
3515 .File_name \%./groff
3516 exists use it as input.
3518 Otherwise interpret the argument as a search for the
3522 in the smallest possible
3523 .IR \%man\~section ,
3524 being section 1 in this case.
3528 .Shell_cmd "groffer\~man:groff"
3539 .Shell_cmd "groffer\~groff.7"
3541 .Shell_cmd "groffer\~7\~groff"
3549 This section search works only for a digit or a single character from
3554 .Shell_cmd "groffer\~fb.modes"
3556 .File_name ./fb.modes
3557 does not exist interpret this as a search for the
3563 is not a single character in classical section style the argument is
3564 not split to a search for
3569 .Shell_cmd "groffer\~groff\~\[cq]troff(1)\[cq]\~man:roff"
3571 The arguments that are not existing files are looked-up as the
3575 (automatic search, should be found in \fIman\fP\~section\~1),
3580 (in the section with the lowest number, being\~7 in this case).
3584 .I \[cq]troff(1)\[cq]
3586 are necessary because the paranthesis are special shell characters;
3587 escaping them with a backslash character
3591 would be possible, too.
3593 The formatted files are concatenated and displayed in one piece.
3597 .Shell_cmd "LANG=de\~groffer\~--man\~--www\~--www-viever=galeon\~ls"
3605 program, decompress it, format it to
3611 and view the result in the web browser
3617 is retrieved, even when a local file
3619 exists in the actual directory.
3623 .Shell_cmd "groffer\~--source\~'man:roff(7)'"
3629 in \fIman\fP\~section 7, decompress it, and print its unformatted
3630 content, its source code.
3634 .Shell_cmd "cat\~file.gz\~|\~groffer\~-Z\~-mfoo"
3636 Decompress the standard input, send this to
3637 .I \%groff intermediate output mode
3638 without post-processing
3642 using macro package by
3650 .Shell_cmd "echo\~'\[rs]f[CB]WOW!'\~|"
3652 .Shell_cmd+ "groffer --x --bg red --fg yellow --geometry 200x100 -"
3654 Display the word \f[CB]WOW!\f[] in a small window in constant-width
3655 bold font, using color yellow on red background.
3658 .\" --------------------------------------------------------------------
3660 .\" --------------------------------------------------------------------
3664 program consists of two shell scripts.
3668 The starting script is the file
3669 .File_name \%groffer
3670 that is installed in a
3674 It is generated from the source file
3675 .File_name \%groffer.sh .
3677 It is just a short starting script without any functions such that it
3678 can run on very poor shells.
3682 The main part of the
3685 .File_name groffer2.sh
3686 that is installed in the
3690 This script can be run under a different shell by using the
3697 Both scripts are compatible with both
3698 \f[CR]GNU\f[] and \%\f[CR]POSIX\f[].
3700 \%\f[CR]POSIX\f[] compatibility refers to
3701 \%\f[CR]IEEE\~P1003.2/D11.2\f[] of September 1991, a very early
3702 version of the \%\f[CR]POSIX\f[] standard that is still freely
3703 available in the internet at
3704 .URL http://\:www.funet.fi/\:pub/\:doc/\:posix/\:p1003.2/\:d11.2/\:all \
3705 "\%POSIX\~P1003.2\~draft\~11.2" .
3709 Only a restricted set of shell language elements and shell builtins is
3710 used to achieve even compatibility with some Bourne shells that are
3711 not fully \%\f[CR]POSIX\f[] compatible.
3715 shell scripts were tested on many shells, including the following
3725 So it should work on most actual free and commercial operating
3730 The shell for the run of
3731 .File_name groffer2.sh
3732 can be chosen by the option
3734 on the command line or the environment variable
3735 .Env_var $GROFF_OPT .
3736 If you want to add it to one of the
3738 configuration files you must write a line starting with
3745 program provides its own parser for command line arguments that is
3746 compatible to both \%\f[CR]POSIX\f[]
3750 It can handle option arguments and file names containing white space
3751 and a large set of special characters.
3753 The following standard types of options are supported.
3757 The option consisiting of a single minus
3759 refers to standard input.
3763 A single minus followed by characters refers to a single character
3764 option or a combination thereof; for example, the
3766 short option combination
3769 .Opt_short Q\~\-m\~foo .
3773 Long options are options with names longer than one character; they
3774 are always preceded by a double minus.
3776 An option argument can either go to the next command line argument or
3777 be appended with an equal sign to the argument; for example,
3778 .Opt_alt -- long=arg
3780 .Opt_alt -- long\~arg .
3786 ends option parsing; all further command line arguments are
3789 parameters, i.e. file names or constructs for searching
3794 All command line arguments that are neither options nor option
3795 arguments are interpreted as
3797 parameters and stored until option parsing has finished.
3799 For example, the command line
3800 .Shell_cmd "groffer file1 -a -o arg file2"
3802 .Shell_cmd "groffer -a -o arg -- file1 file2"
3806 The free mixing of options and
3808 parameters follows the GNU principle.
3810 That does not fulfill the strange option behavior of \%\f[CR]POSIX\f[]
3811 that ends option processing as soon as the first non-option argument
3814 The end of option processing can be forced by the option
3819 .\" --------------------------------------------------------------------
3821 .\" --------------------------------------------------------------------
3824 .MTO bug-groff@gnu.org "bug-groff mailing list" .
3826 Include a complete, self-contained example that will allow the bug to
3827 be reproduced, and say which version of
3833 You can also use the
3834 .MTO groff@gnu.org "groff mailing list" ,
3835 but you must first subscribe to this list.
3837 You can do that by visiting the
3838 .URL http://\:lists.gnu.org/\:mailman/\:listinfo/\:groff \
3839 "groff mailing list web page" .
3844 .BR \%groff (@MAN1EXT@)
3845 for information on availability.
3848 .\" --------------------------------------------------------------------
3850 .\" --------------------------------------------------------------------
3853 .BR \%groff (@MAN1EXT@),
3854 .BR \%@g@troff (@MAN1EXT@)
3856 Details on the options and environment variables available in
3858 all of them can be used with
3864 .BR \%groff (@MAN7EXT@)
3865 Documentation of the
3871 .BR \%grog (@MAN1EXT@)
3876 command line options from the input using this program.
3880 .BR groff_out (@MAN5EXT@)
3881 Documentation on the
3882 .I \%groff intermediate output
3890 .BR groff_tmac (@MAN5EXT@)
3891 Documentation on the
3898 The standard program to display
3901 The information there is only useful if it is the
3905 Then it documents the options and environment variables that are
3920 Bourne shells that were tested with
3926 .BR \%gxditview (@MAN1EXT@),
3936 .BR \%kghostview (1),
3939 .BR \%ghostview (1),
3949 .BR \%kghostview (1),
3973 .BR \%konqueror (1),
3987 Standard pager program for the
3995 The decompression programs supported by
4000 .\" --------------------------------------------------------------------
4002 .\" --------------------------------------------------------------------
4006 .\" --------------------------------------------------------------------
4008 .\" --------------------------------------------------------------------
4012 .\" --------------------------------------------------------------------
4014 .\" --------------------------------------------------------------------
4016 .\" Local Variables: