head	1.2;
access;
symbols
	perseant-exfatfs-base-20250801:1.2
	perseant-exfatfs-base-20240630:1.2
	cjep_sun2x:1.2.0.14
	cjep_sun2x-base:1.2
	cjep_staticlib_x-base1:1.2
	cjep_staticlib_x:1.2.0.12
	cjep_staticlib_x-base:1.2
	phil-wifi-20200421:1.2
	phil-wifi-20200411:1.2
	phil-wifi-20200406:1.2
	pgoyette-compat-merge-20190127:1.2
	pgoyette-compat-20190127:1.2
	pgoyette-compat-20190118:1.2
	pgoyette-compat-1226:1.2
	pgoyette-compat-1126:1.2
	pgoyette-compat-1020:1.2
	pgoyette-compat-0930:1.2
	pgoyette-compat-0906:1.2
	netbsd-7-2-RELEASE:1.1.1.3
	pgoyette-compat-0728:1.2
	pgoyette-compat-0625:1.2
	pgoyette-compat-0521:1.2
	pgoyette-compat-0502:1.2
	pgoyette-compat-0422:1.2
	pgoyette-compat-0415:1.2
	pgoyette-compat-0407:1.2
	pgoyette-compat-0330:1.2
	pgoyette-compat-0322:1.2
	pgoyette-compat-0315:1.2
	netbsd-7-1-2-RELEASE:1.1.1.3
	pgoyette-compat:1.2.0.10
	pgoyette-compat-base:1.2
	netbsd-7-1-1-RELEASE:1.1.1.3
	perseant-stdc-iso10646:1.2.0.8
	perseant-stdc-iso10646-base:1.2
	prg-localcount2-base3:1.2
	prg-localcount2-base2:1.2
	prg-localcount2-base1:1.2
	prg-localcount2:1.2.0.6
	prg-localcount2-base:1.2
	pgoyette-localcount-20170426:1.2
	bouyer-socketcan-base1:1.2
	pgoyette-localcount-20170320:1.2
	netbsd-7-1:1.1.1.3.0.68
	netbsd-7-1-RELEASE:1.1.1.3
	netbsd-7-1-RC2:1.1.1.3
	netbsd-7-nhusb-base-20170116:1.1.1.3
	bouyer-socketcan:1.2.0.4
	bouyer-socketcan-base:1.2
	pgoyette-localcount-20170107:1.2
	netbsd-7-1-RC1:1.1.1.3
	pgoyette-localcount-20161104:1.2
	netbsd-7-0-2-RELEASE:1.1.1.3
	localcount-20160914:1.2
	netbsd-7-nhusb:1.1.1.3.0.66
	netbsd-7-nhusb-base:1.1.1.3
	pgoyette-localcount-20160806:1.2
	pgoyette-localcount-20160726:1.2
	pgoyette-localcount:1.2.0.2
	pgoyette-localcount-base:1.2
	netbsd-7-0-1-RELEASE:1.1.1.3
	netbsd-7-0:1.1.1.3.0.64
	netbsd-7-0-RELEASE:1.1.1.3
	netbsd-7-0-RC3:1.1.1.3
	netbsd-7-0-RC2:1.1.1.3
	netbsd-7-0-RC1:1.1.1.3
	netbsd-5-2-3-RELEASE:1.1.1.3
	netbsd-5-1-5-RELEASE:1.1.1.3
	netbsd-6-0-6-RELEASE:1.1.1.3
	netbsd-6-1-5-RELEASE:1.1.1.3
	netbsd-7:1.1.1.3.0.62
	netbsd-7-base:1.1.1.3
	yamt-pagecache-base9:1.1.1.3
	yamt-pagecache-tag8:1.1.1.3
	netbsd-6-1-4-RELEASE:1.1.1.3
	netbsd-6-0-5-RELEASE:1.1.1.3
	tls-earlyentropy:1.1.1.3.0.60
	tls-earlyentropy-base:1.1.1.3
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.3
	riastradh-drm2-base3:1.1.1.3
	netbsd-6-1-3-RELEASE:1.1.1.3
	netbsd-6-0-4-RELEASE:1.1.1.3
	netbsd-5-2-2-RELEASE:1.1.1.3
	netbsd-5-1-4-RELEASE:1.1.1.3
	netbsd-6-1-2-RELEASE:1.1.1.3
	netbsd-6-0-3-RELEASE:1.1.1.3
	netbsd-5-2-1-RELEASE:1.1.1.3
	netbsd-5-1-3-RELEASE:1.1.1.3
	netbsd-6-1-1-RELEASE:1.1.1.3
	riastradh-drm2-base2:1.1.1.3
	riastradh-drm2-base1:1.1.1.3
	riastradh-drm2:1.1.1.3.0.54
	riastradh-drm2-base:1.1.1.3
	netbsd-6-1:1.1.1.3.0.58
	netbsd-6-0-2-RELEASE:1.1.1.3
	netbsd-6-1-RELEASE:1.1.1.3
	netbsd-6-1-RC4:1.1.1.3
	netbsd-6-1-RC3:1.1.1.3
	agc-symver:1.1.1.3.0.56
	agc-symver-base:1.1.1.3
	netbsd-6-1-RC2:1.1.1.3
	netbsd-6-1-RC1:1.1.1.3
	yamt-pagecache-base8:1.1.1.3
	netbsd-5-2:1.1.1.3.0.52
	netbsd-6-0-1-RELEASE:1.1.1.3
	yamt-pagecache-base7:1.1.1.3
	netbsd-5-2-RELEASE:1.1.1.3
	netbsd-5-2-RC1:1.1.1.3
	matt-nb6-plus-nbase:1.1.1.3
	yamt-pagecache-base6:1.1.1.3
	netbsd-6-0:1.1.1.3.0.50
	netbsd-6-0-RELEASE:1.1.1.3
	netbsd-6-0-RC2:1.1.1.3
	tls-maxphys:1.1.1.3.0.48
	tls-maxphys-base:1.1.1.3
	matt-nb6-plus:1.1.1.3.0.46
	matt-nb6-plus-base:1.1.1.3
	netbsd-6-0-RC1:1.1.1.3
	yamt-pagecache-base5:1.1.1.3
	yamt-pagecache-base4:1.1.1.3
	netbsd-6:1.1.1.3.0.44
	netbsd-6-base:1.1.1.3
	netbsd-5-1-2-RELEASE:1.1.1.3
	netbsd-5-1-1-RELEASE:1.1.1.3
	yamt-pagecache-base3:1.1.1.3
	yamt-pagecache-base2:1.1.1.3
	yamt-pagecache:1.1.1.3.0.42
	yamt-pagecache-base:1.1.1.3
	cherry-xenmp:1.1.1.3.0.40
	cherry-xenmp-base:1.1.1.3
	bouyer-quota2-nbase:1.1.1.3
	bouyer-quota2:1.1.1.3.0.38
	bouyer-quota2-base:1.1.1.3
	matt-mips64-premerge-20101231:1.1.1.3
	matt-nb5-mips64-premerge-20101231:1.1.1.3
	matt-nb5-pq3:1.1.1.3.0.36
	matt-nb5-pq3-base:1.1.1.3
	netbsd-5-1:1.1.1.3.0.34
	netbsd-5-1-RELEASE:1.1.1.3
	netbsd-5-1-RC4:1.1.1.3
	matt-nb5-mips64-k15:1.1.1.3
	netbsd-5-1-RC3:1.1.1.3
	netbsd-5-1-RC2:1.1.1.3
	netbsd-5-1-RC1:1.1.1.3
	netbsd-5-0-2-RELEASE:1.1.1.3
	matt-nb5-mips64-premerge-20091211:1.1.1.3
	matt-premerge-20091211:1.1.1.3
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.1.1.3
	matt-nb4-mips64-k7-u2a-k9b:1.1.1.3
	matt-nb5-mips64-u1-k1-k5:1.1.1.3
	matt-nb5-mips64:1.1.1.3.0.32
	netbsd-5-0-1-RELEASE:1.1.1.3
	jym-xensuspend-nbase:1.1.1.3
	netbsd-5-0:1.1.1.3.0.30
	netbsd-5-0-RELEASE:1.1.1.3
	netbsd-5-0-RC4:1.1.1.3
	netbsd-5-0-RC3:1.1.1.3
	netbsd-5-0-RC2:1.1.1.3
	jym-xensuspend:1.1.1.3.0.28
	jym-xensuspend-base:1.1.1.3
	netbsd-5-0-RC1:1.1.1.3
	netbsd-5:1.1.1.3.0.26
	netbsd-5-base:1.1.1.3
	matt-mips64-base2:1.1.1.3
	matt-mips64:1.1.1.3.0.24
	mjf-devfs2:1.1.1.3.0.22
	mjf-devfs2-base:1.1.1.3
	netbsd-4-0-1-RELEASE:1.1.1.3
	wrstuden-revivesa-base-3:1.1.1.3
	wrstuden-revivesa-base-2:1.1.1.3
	wrstuden-fixsa-newbase:1.1.1.3
	wrstuden-revivesa-base-1:1.1.1.3
	yamt-pf42-base4:1.1.1.3
	yamt-pf42-base3:1.1.1.3
	hpcarm-cleanup-nbase:1.1.1.3
	yamt-pf42-baseX:1.1.1.3
	yamt-pf42-base2:1.1.1.3
	wrstuden-revivesa:1.1.1.3.0.20
	wrstuden-revivesa-base:1.1.1.3
	yamt-pf42:1.1.1.3.0.18
	yamt-pf42-base:1.1.1.3
	keiichi-mipv6:1.1.1.3.0.16
	keiichi-mipv6-base:1.1.1.3
	matt-armv6-nbase:1.1.1.3
	matt-armv6-prevmlocking:1.1.1.3
	wrstuden-fixsa-base-1:1.1.1.3
	netbsd-4-0:1.1.1.3.0.14
	netbsd-4-0-RELEASE:1.1.1.3
	cube-autoconf:1.1.1.3.0.12
	cube-autoconf-base:1.1.1.3
	netbsd-4-0-RC5:1.1.1.3
	netbsd-4-0-RC4:1.1.1.3
	netbsd-4-0-RC3:1.1.1.3
	netbsd-4-0-RC2:1.1.1.3
	netbsd-4-0-RC1:1.1.1.3
	matt-armv6:1.1.1.3.0.10
	matt-armv6-base:1.1.1.3
	matt-mips64-base:1.1.1.3
	hpcarm-cleanup:1.1.1.3.0.8
	hpcarm-cleanup-base:1.1.1.3
	netbsd-3-1-1-RELEASE:1.1.1.2
	netbsd-3-0-3-RELEASE:1.1.1.2
	wrstuden-fixsa:1.1.1.3.0.6
	wrstuden-fixsa-base:1.1.1.3
	abandoned-netbsd-4-base:1.1.1.3
	abandoned-netbsd-4:1.1.1.3.0.2
	netbsd-3-1:1.1.1.2.0.6
	netbsd-3-1-RELEASE:1.1.1.2
	netbsd-3-0-2-RELEASE:1.1.1.2
	netbsd-3-1-RC4:1.1.1.2
	netbsd-3-1-RC3:1.1.1.2
	netbsd-3-1-RC2:1.1.1.2
	netbsd-3-1-RC1:1.1.1.2
	netbsd-4:1.1.1.3.0.4
	netbsd-4-base:1.1.1.3
	netbsd-3-0-1-RELEASE:1.1.1.2
	groff-1-19-2:1.1.1.3
	netbsd-3-0:1.1.1.2.0.4
	netbsd-3-0-RELEASE:1.1.1.2
	netbsd-3-0-RC6:1.1.1.2
	netbsd-3-0-RC5:1.1.1.2
	netbsd-3-0-RC4:1.1.1.2
	netbsd-3-0-RC3:1.1.1.2
	netbsd-3-0-RC2:1.1.1.2
	netbsd-3-0-RC1:1.1.1.2
	netbsd-2-0-3-RELEASE:1.1.1.1
	netbsd-2-1:1.1.1.1.0.6
	netbsd-2-1-RELEASE:1.1.1.1
	netbsd-2-1-RC6:1.1.1.1
	netbsd-2-1-RC5:1.1.1.1
	netbsd-2-1-RC4:1.1.1.1
	netbsd-2-1-RC3:1.1.1.1
	netbsd-2-1-RC2:1.1.1.1
	netbsd-2-1-RC1:1.1.1.1
	netbsd-2-0-2-RELEASE:1.1.1.1
	netbsd-3:1.1.1.2.0.2
	netbsd-3-base:1.1.1.2
	netbsd-2-0-1-RELEASE:1.1.1.1
	netbsd-2:1.1.1.1.0.4
	netbsd-2-base:1.1.1.1
	netbsd-2-0-RELEASE:1.1.1.1
	netbsd-2-0-RC5:1.1.1.1
	netbsd-2-0-RC4:1.1.1.1
	netbsd-2-0-RC3:1.1.1.1
	netbsd-2-0-RC2:1.1.1.1
	netbsd-2-0-RC1:1.1.1.1
	groff-1-19-1:1.1.1.2
	netbsd-2-0:1.1.1.1.0.2
	netbsd-2-0-base:1.1.1.1
	groff-1-19:1.1.1.1
	FSF:1.1.1;
locks; strict;
comment	@.\" @;


1.2
date	2016.01.13.19.25.00;	author christos;	state dead;
branches;
next	1.1;
commitid	Y4vhQ1Aj99QZ0OQy;

1.1
date	2003.06.30.17.51.44;	author wiz;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2003.06.30.17.51.44;	author wiz;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2004.07.30.14.44.28;	author wiz;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	2006.02.06.18.11.11;	author wiz;	state Exp;
branches;
next	;


desc
@@


1.2
log
@groff has moved to external
@
text
@.TH GROFFER @@MAN1EXT@@ "@@MDATE@@" "Groff Version @@VERSION@@"
.SH NAME
groffer \- display groff files and man\~pages on X and tty
.
.SH "SYNOPSIS"
.\" The .SH was moved to this place in order to appease `apropos'.
.
.\" --------------------------------------------------------------------
.\" Legalize
.\" --------------------------------------------------------------------
.
.ig
groffer.1 - man page for groffer (section 1).

Source file position:  <groff_source_top>/contrib/groffer/groffer.man
Installed position:    $prefix/share/man/man1/groffer.1

Version     : groffer 0.9.2
Last update : 13 Oct 2002

This file is part of groff, the GNU roff type-setting system.

Copyright (C) 2001, 2002 Free Software Foundation, Inc.
Written by Bernd Warken <bwarken@@mayn.de>

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation; with the
Invariant Sections being this .ig-section and AUTHORS, with no
Front-Cover Texts, and with no Back-Cover Texts.

A copy of the Free Documentation License is included as a file called
FDL in the main directory of the groff source package.
..
.
.\" --------------------------------------------------------------------
.\" Setup
.\" --------------------------------------------------------------------
.
.mso www.tmac
.
.if n \{\
.  mso tty-char.tmac
.  ftr CR R
.  ftr CI I
.  ftr CB B
.\}
.
.if '\*[.T]'dvi' \{\
.  ftr CB CW
.\}
.
.ds @@- "\-\""
.ds @@-- "\-\^\-\""
.
.ds @@b- "\f[CB]-\f[]\""
.ds @@b-- "\f[CB]--\f[]\""
.
.ds @@i- "\f[CI]-\f[]\""
.ds @@i-- "\f[CI]--\f[]\""
.
.ds Ellipsis ".\|.\|.\""
.
.\" --------------------------------------------------------------------
.\" setup for the macro definitions below
.\"
.\" naming:  namespace:cathegory_macro.variable_name  (experimental)
.
.\" --------------------------------------------------------------------
.\" configuration of prompt for `.Shell_cmd'* macros
.ds groffer:Shell_cmd.prompt_text sh#\"    prompt for shell commands
.ds groffer:Shell_cmd+.prompt_text >\"     prompt on continuation lines
.ds groffer:Shell_cmd_base.prompt_font I\" font for prompts
.
.\" automatically determine setup from the configuration above
.als @@f groffer:Shell_cmd_base.prompt_font\"
.als @@t groffer:Shell_cmd.prompt_text\"
.als @@t+ groffer:Shell_cmd+.prompt_text\"
.ds groffer:Shell_cmd.prompt \f[\*[@@f]]\*[@@t]\f[]\"            needed
.ds groffer:Shell_cmd+.prompt \f[\*[@@f]]\*[@@t+]\f[]\"          needed
.nr @@w \w'\*[groffer:Shell_cmd.prompt]'\"
.nr @@w+ \w'\*[groffer:Shell_cmd+.prompt]'\"
.ft \*[@@f]
.\" Full prompt width is maximum of texts plus 1m
.nr groffer:Shell_cmd_base.prompt_width (\n[@@w]>?\n[@@w+]+1m)\" needed
.ft
.rm @@f
.rm @@f+
.rm @@t
.rm @@t+
.rr @@w
.rr @@w+
.
.\" --------------------------------------------------------------------
.\" static register for inter-macro communication in `.Synopsis'*
.nr groffer:Synopsis.level 0
.
.\" --------------------------------------------------------------------
.\" static registers for inter-macro communication in `.TP'*
.nr groffer:TP.level 0
.rr groffer:TP_header.flag
.rr groffer:TP_body.flag
.rr groffer:TP.indent
.
.
.\" --------------------------------------------------------------------
.\" Macro definitions
.
.\" Ignore all arguments like a comment, even after a .eo call.
.de c
..
.c --------------------------------------------------------------------
.c .CB  (<text>...)
.c
.c Print in constant-width bold font.
.c
.de CB
.  ft CB
.  Text \\$*
.  ft
..
.c --------------------------------------------------------------------
.c .CI  (<text>...)
.c
.c Print in constant-width italic font.
.c
.de CI
.  ft CI
.  Text \\$*
.  ft
..
.c --------------------------------------------------------------------
.c .CR  (<text>...)
.c
.c Print in constant-width roman font.
.c
.de CR
.  ft CR
.  Text \\$*
.  ft
..
.c --------------------------------------------------------------------
.c .Error  (<text>...)
.c
.c Print error message to terminal and abort.
.c
.de Error
.  tm \\$*
.  ab
..
.c --------------------------------------------------------------------
.c .Env_var  (<env_var_name> [<punct>])
.c
.c Display an environment variable, with optional punctuation.
.c
.de Env_var
.  nh
.  SM
.  Text \f[CB]\\$1\f[]\\$2
.  hy
..
.c --------------------------------------------------------------------
.c .File_name  (<path_name>)
.c
.c Display a file or directory name in CB font.
.c
.de File_name
.  Header_CB \\$@@
..
.c --------------------------------------------------------------------
.c .Header_CB  (<path_name>)
.c
.c Display a line in CB font, for example after .TP
.c
.de Header_CB
.  nh
.  Text \f[CB]\\$1\f[]\\$2
.  hy
..
.c --------------------------------------------------------------------
.c .Opt_-  ([<punct>])
.c
.c Print `-' (minus sign); optional punctuation. 
.c
.de Opt_-
.  ie (\\n[.$] == 0) \
.    Opt_alt - ""
.  el \
.    Opt_alt - "" "\\$1"
..
.c --------------------------------------------------------------------
.c .Opt_[-]  ([<punct>])
.c
.c Print `Opt_[-]' (minus sign in brackets); optional punctuation. 
.c
.de Opt_[-]
.  ie (\\n[.$] == 0) \
.    Opt_[alt] - ""
.  el \
.    Opt_[alt] - "" "\\$1"
..
.c --------------------------------------------------------------------
.c .Opt_--  ([<punct>])
.c
.c Print `--' (double minus); optional punctuation. 
.c
.de Opt_--
.  ie (\\n[.$] == 0) \
.    Opt_alt -- ""
.  el \
.    Opt_alt -- "" "\\$1"
..
.c --------------------------------------------------------------------
.c .Opt_[--]  ([<punct>])
.c
.c Print `Opt_[--]' (double minus in brackets); optional punctuation. 
.c
.de Opt_[--]
.  ie (\\n[.$] == 0) \
.    Opt_[alt] -- ""
.  el \
.    Opt_[alt] -- "" "\\$1"
..
.c --------------------------------------------------------------------
.c .Opt_alt  ([<minus> <opt>]... [<arg> [<punct>]])
.c
.c Alternate options separated by a vertical bar.
.c
.c Arguments:
.c   minus: either `-' or `--' (font CB).
.c   opt: a name for an option, empty allowed (font CB).
.c   arg: optionally, the argument to the option (font I).
.c   punct: optional punctuation (in the starting font).
.c Result:
.c   The minus/opt argument pairs, each
.c   separated by a vertical bar `|', optionally add 'arg', separated
.c   a space character ` '.
.c
.c Example:
.c  .Opt_alt - T -- device -- device-troff device .
.c  results in
.c  -T|--device|--device-troff device.
.c
.de Opt_alt
.  Opt_alt_base "" | "" \\$@@
..
.c --------------------------------------------------------------------
.c .Opt_[alt]  ([<minus> <opt>]... [<arg> [<punct>]])
.c
.c Alternate options in brackets for section SYNOPSIS.
.c
.c Arguments:
.c   minus: either `-' or `--' (font CB).
.c   opt: a name for an option, empty allowed (font CB).
.c   arg: optionally, the argument to the option (font I).
.c   punct: optional punctuation (in the starting font).
.c Global strings written to:
.c   `@@oa_prefix': left enclosing character (`[')
.c   `@@oa_sep': separator (`|')
.c   `@@oa_postfix': right enclosing character (`]')
.c Result:
.c   The minus/opt argument pairs, each separated by a vertical
.c   bar `|', optionally add 'arg', separated by a space character ` '.
.c
.c Example:
.c  .Opt_[alt] - T -- device -- device-troff device .
.c  results in
.c  [-T|--device|--device-troff device].
.c
.de Opt_[alt]
.  Opt_alt_base [ | ] \\$@@
..
.c --------------------------------------------------------------------
.c .Opt_alt_base  (<pre> <sep> <post> [<minus> <opt>]... [arg [punct]])
.c
.c Alternating options; base macro for many others; do not use directly.
.c
.c Arguments:
.c   <pre>: prefix, resulted is preceded by this.
.c   <sep>: separator between minux/opt pairs.
.c   <post>: postfix, is appended to the result.
.c   <minus>: either `-' or `--' (font CB).
.c   <opt>: a name for an option, empty allowed (font CB).
.c   <arg>: optionally, the argument to the option (font I).
.c   <punct>: optional punctuation (in the starting font).
.c Result:
.c   String `<pre>' followed by the <minus>/<opt> argument pairs, each
.c   separated by string `<sep>', optionally add '<arg>', separated by
.c   a single space ` ', followed by the string `<post>'.
.c
.de Opt_alt_base
.  nr @@font \\n[.f]\"
.  if (\\n[.$] < 3) \
.    Error .\\0: not enough arguments.
.  ds @@pre \)\\$1\)\"                   prefix
.  ds @@sep \)\\$2\)\"                   separator
.  ds @@post \)\\$3\)\"                  postfix
.  shift 3
.  nr @@count 0
.  ds @@res \f[CR]\\*[@@pre]\"
.  while (\\n[.$] >= 2) \{\
.    c                                  do the pairs, break on no `-'
.    if !'\\$1'-' \{\
.      if !'\\$1'--' \
.        break
.    \}
.    c                                  separator
.    if (\\n[@@count] > 0) \
.      as @@res \f[CR]\\*[@@sep]\"
.    nr @@count +1
.    as @@res \f[CB]\\$1\\$2\:\"           combine minus with option name
.    shift 2
.  \}
.  if (\\n[.$] >= 3) \
.    Error .\\0: wrong arguments: \\$@@
.  c                                     all pairs are done
.  ie (\\n[.$] == 0) \
.    as @@res \f[CR]\\*[@@post]\"
.  el \{\
.    c                                   optional option argument
.    if !'\\$1'' \
.      as @@res \f[CR] \,\f[I]\\$1\"
.    shift
.    as @@res \\f[CR]\\*[@@post]\"         postfix
.    if (\\n[.$] >= 1) \{\
.      c                                 add punctuation
.      as @@res \f[\\n[@@font]]\\$1\"
.    \}
.  \}
.  nh
.  Text \\*[@@res]
.  hy
.  ft \\n[@@font]
.  rr @@count
.  rr @@font
.  rm @@pre
.  rm @@post
.  rm @@sep
.  rm @@res
..
.c --------------------------------------------------------------------
.c .Opt_def  ([<minus> <opt>]... [<arg> [<punct>]])
.c
.c Definitions of options in section OPTIONS.
.c
.c Arguments:
.c   minus: either `-' or `--' (font CB).
.c   opt: a name for an option, empty allowed (font CB).
.c   arg: optionally, the argument to the option (font I).
.c   punct: optional punctuation (in the starting font).
.c Result:
.c   The header for an indented paragraph, consisting of
.c   minus/opt argument pairs, each, separated by a space
.c   character ` ', optionally add 'arg', separated a space
.c   character ` '.
.c
.c Example:
.c  .Opt_def - T -- device -- device-troff device .
.c  results in
.c  -T --device --device-troff device.
.c  as the header of for indented paragraph.
.c
.de Opt_def
.  TP
.    Opt_alt_base "" "\~|\~" "" \\$@@
..
.c --------------------------------------------------------------------
.c .Opt_element  ([<minus> <opt>]... [<arg> [<punct>]])
.c
.c Definitions of options in section OPTIONS.
.c
.c Arguments:
.c   minus: either `-' or `--' (font CB).
.c   opt: a name for an option, empty allowed (font CB).
.c   arg: optionally, the argument to the option (font I).
.c   punct: optional punctuation (in the starting font).
.c Result:
.c   The minus/opt argument pairs, each, separated by a space
.c   character ` ', optionally add 'arg', separated a space
.c   character ` '.
.c
.c Example:
.c  .Opt_element - T -- device -- device-troff device .
.c  results in
.c  -T --device --device-troff device.
.c
.de Opt_element
.  Opt_alt_base "" "\~" "" \\$@@
..
.c --------------------------------------------------------------------
.als Opt_list Opt_element
.
.c --------------------------------------------------------------------
.c .Opt_long  ([<name> [<punct>]])
.c
.c Print `--name' somewhere in the text; optional punctuation.
.c
.de Opt_long
.  Opt_alt -- "\\$1" "" "\\$2"
..
.c --------------------------------------------------------------------
.c .Opt_[long]  ([<name> [<punct>]])
.c
.c Print `--name' somewhere in the text; optional punctuation.
.c
.de Opt_[long]
.  Opt_[alt] -- "\\$1" "" "\\$2"
..
.c --------------------------------------------------------------------
.c .Opt_short  ([<name> [<punct>]])
.c
.c Print `-name' somewhere in the Text; optional punctuation.
.c
.de Opt_short
.  Opt_alt - "\\$1" "" "\\$2"
..
.c --------------------------------------------------------------------
.c .Opt_[short]  ([name [punct]])
.c
.c Print `[-name]' somewhere in the Text; optional punctuation.
.c
.de Opt_[short]
.  Opt_[alt] - "\\$1" "" "\\$2"
..
.c --------------------------------------------------------------------
.c .Shell_cmd  (<CR> [<CI>] ...)
.c
.c A shell command line; display args alternating in fonts CR and CI.
.c
.c Examples:
.c   .Shell_cmd "groffer --dpi 100 file"
.c     result: `sh#  groffer --dpi 100 file'
.c             with 'sh#' in font I, the rest in CR
.c
.c   .Shell_cmd groffer\~--dpi\~100\~file
.c     result: the same as above
.c
.c   .Shell_cmd "groffer --dpi=" value " file"
.c     result: sh#  groffer --dpi=value file
.c             with `groffer --dpi=' and `file' in CR; `value' in CI
.c
.c   .Shell_cmd groffer\~--dpi= value \~file
.c     result: the same as the previous example
.c
.de Shell_cmd
.  groffer:Shell_cmd_base "\*[groffer:Shell_cmd.prompt]" \\$@@
..
.c --------------------------------------------------------------------
.c .Shell_cmd+  (<CR> [<CI>] ...)
.c
.c A continuation line for .Shell_cmd.
.c
.de Shell_cmd+
.  groffer:Shell_cmd_base "\*[groffer:Shell_cmd+.prompt]" \\$@@
..
.c --------------------------------------------------------------------
.c .Shell_cmd_base  (<prompt> [<CR> [<CI>] ...])
.c
.c A shell command line; display args alternating in fonts CR and CI.
.c Internal, do not use directly.
.c
.c Globals: read-only register @@.Shell_cmd_width
.c
.de groffer:Shell_cmd_base
.  if (\\n[.$] <= 0) \
.    return
.  nr @@+font \\n[.f]\"
.  ds @@prompt \\$1\"
.  ft CR
.  c gap between prompt and command
.  nr @@+gap \\n[groffer:Shell_cmd_base.prompt_width]-\\w'\\*[@@prompt]'\"
.  ds @@res \\*[@@prompt]\h'\\n[@@+gap]u'\"
.  shift
.  ds @@cf CR\"
.  while (\\n[.$] > 0) \{\
.    as @@res \\f[\\*[@@cf]]\\$1\"
.    shift
.    ie '\\*[@@cf]'CR' \
.      ds @@cf I\"
.    el \
.      ds @@cf CR\"
.  \}
.  br
.  ad l
.  nh
.  nf
.  Text \\*[@@res]\"
.  fi
.  hy
.  ad
.  br
.  ft \\n[@@+font]
.  rr @@+font
.  rr @@+gap
.  rm @@cf
.  rm @@res
..
.c --------------------------------------------------------------------
.c .Synopsis  ()
.c
.c Begin a synopsis section, to be ended by a ./Synopsis macro.
.c
.de Synopsis
.  if (\\n[groffer:Synopsis.level] > 0) \
.    Error .\\$0: previous .Synopsis was not closed by ./Synopsis.
.  nh
.  ds @@1 \\$1\"
.  nr @@old_indent \\n(.i
.  ad l
.  in +\w'\fB\\*[@@1]\0'u
.  ti \\n[@@old_indent]u
.  B \\*[@@1]\0\c
.  rr @@old_indent
.  rm @@1
.  nr groffer:Synopsis.level +1\"        marker for ./Synopsis
..
.c  --------------------------------------------------------------------
.c ./Synopsis  ()
.c
.c Close a synopsis section opened by the previous .Synopsis macro.
.c
.de /Synopsis
.  if (\\n[groffer:Synopsis.level] <= 0) \
.    Error .\\$0: no previous call of .Synopsis
.  br
.  ad
.  in
.  hy
.  nr groffer:Synopsis.level -1
..
.c  --------------------------------------------------------------------
.c .Text  (<text>...)
.c
.c Treat the arguments as text, no matter how they look.
.c
.de Text
.  if (\\n[.$] == 0) \
.    return
.  nop \)\\$*\)
..
.c --------------------------------------------------------------------
.c .Topic  ([<indent>])
.c
.c A bulleted paragraph
.c
.de Topic
.  ie (\\n[.$] = 0) \
.    ds @@indent 2m\"
.  el \
.    ds @@indent \\$1\"
.  TP \\*[@@indent]
.  Text \[bu]
.  rm @@indent
..
.c --------------------------------------------------------------------
.c .TP+  ()
.c
.c Continuation line for .TP header.
.c
.de TP+
.  br
.  ns
.  TP \\$1
..
.c --------------------------------------------------------------------
.c .TP_header  ([<indent>])
.c
.c Start a multi-line header for a .TP-like paragraph
.c
.de TP_header
.  if (\\n[groffer:TP.level] < 0) \
.    Error .\\$0: wrong level.
.  nr groffer:TP.level +1
.  P
.  ie (\\n[.$] == 0) \
.    rr groffer:TP.indent
.  el \
.    nr groffer:TP.indent \\$1
.  nr groffer:TP_header.flag 1
..
.c --------------------------------------------------------------------
.c .TP_body  ([<indent>])
.c
.c End a previous .TP-header and beging the body of the paragraph.
.c
.de TP_body
.  if !rgroffer:TP_header.flag \
.    Error .\\$0: no previous call of .TP_header
.  if (\\n[groffer:TP.level] <= 0) \
.    Error .\\$0: wrong level.
.  br
.  ie (\\n[.$] == 0) \{\
.    ie rgroffer:TP.indent \{\
.      RS \\n[groffer:TP.indent]u
.    \}
.    el \
.      RS
.  \}
.  el \
.    RS \\$1u
.  rr groffer:TP.indent
.  rr groffer:TP_header.flag
.  nr groffer:TP_body.flag 1
..
.c --------------------------------------------------------------------
.c TP_end  ()
.c
.c End of former .TP_body paragraph.
.c
.de TP_end
.  if !rgroffer:TP_body.flag \
.    Error .\\$0: no previous .TP_body.
.  if (\\n[groffer:TP.level] <= 0) \
.    Error TP_end: wrong level.
.  nr groffer:TP.level -1
.  rr grogger:TP.indent
.  rr groffer:TP_header.flag
.  rr groffer:TP_body.flag
.  br
.  RE
..
.
.\" End of macro definitions
.
.
.\" --------------------------------------------------------------------
.\" SH "SYNOPSIS"
.\" --------------------------------------------------------------------
.
.ad l
.Synopsis groffer
.RI [ groffer_options ]
.RI [ groff_options ]
.Opt_[--]
.RI [ "filespec" "\*[Ellipsis]]"
./Synopsis
.
.Synopsis groffer
.Opt_alt - h -- help
./Synopsis
.
.Synopsis groffer
.Opt_alt - v -- version
./Synopsis
.
.
.\" --------------------------------------------------------------------
.SH DESCRIPTION
.\" --------------------------------------------------------------------
.
The
.I groffer
program is the easiest way to use
.BR groff (@@MAN1EXT@@).
It can display arbitrary documents written in the
.BR groff (@@MAN7EXT@@)
language or other
.BR roff (@@MAN7EXT@@)
languages that are compatible to the original troff language.
.
The
.I groffer
program also includes many of the features for finding and displaying
the UNIX manual pages
.RI ( man\~pages ),
such that it can be used as a replacement for a
.BR man (1)
program.
.
Moreover, compressed files that can be handled by
.BR gzip (1)
or
.BR bzip2 (1)
are decompressed on-the-fly.
.
.
.P
The normal usage is quite simple by supplying a file name or name of a
man\~page without further options.
.
But the option handling has many possibilities for creating special
behaviors.
.
These can be stored in a configuration file.
.
.
.P
The output can be generated and viewed in several different ways
available for
.IR groff .
.
This includes the groff native X viewer
.BR gxditview (@@MAN1EXT@@),
each Postcript or dvi display program, a web browser by generating
html in www-mode, or several text modes in text terminals.
.
.
.P
Most options that must be named when running
.I groff
are determined automatically because
.I groffer
internally calls the
.BR grog (@@MAN1EXT@@)
program.
.
But all parts can be controlled manually by supplying options.
.
.
.\" --------------------------------------------------------------------
.SH "OPTION OVERVIEW"
.\" --------------------------------------------------------------------
.
.TP
.I groffer_options
The following options determine and configure the display mode.
.
They were synchronized with the options of both
.BR groff (@@MAN1EXT@@)
and GNU
.BR man (1).
.
If none of these options is used groffer tries to find a suitable
display mode automatically.
.
.
.RS
.
.P
.Opt_[alt] - Q -- source
.Opt_[alt] - T -- device device
.Opt_[alt] -- auto-modes mode1,mode2,\*[Ellipsis]
.Opt_[alt] -- debug
.Opt_[alt] -- default
.Opt_[alt] -- dvi
.Opt_[alt] -- dvi-viewer prog
.Opt_[alt] -- groff
.Opt_[alt] -- location
.Opt_[alt] -- mode display_mode
.Opt_[alt] -- pager program
.Opt_[alt] -- pdf
.Opt_[alt] -- pdf-viewer prog
.Opt_[alt] -- ps
.Opt_[alt] -- ps-viewer prog
.Opt_[alt] -- shell
.Opt_[alt] -- tty
.Opt_[alt] -- www
.Opt_[alt] -- www-viewer prog
.Opt_[alt] -- x
.Opt_[alt] -- x-viewer prog
.
.
.P
The following long options were adapted from the corresponding X
Toolkit options.
.
Their single leading minus in X Toolkit was changed to a double minus
for long options; see
.BR X (1).
.
.
.P
.Opt_[alt] -- bd
.Opt_[alt] -- bg -- background
.Opt_[alt] -- bw
.Opt_[alt] -- display
.Opt_[alt] -- fg -- foreground
.Opt_[alt] -- ft -- font
.Opt_[alt] -- geometry size_pos
.Opt_[alt] -- resolution value
.Opt_[alt] -- rv
.Opt_[alt] -- title string
.Opt_[alt] -- xrm X_resource
.
.
.P
The following long options regulate whether and how
.I man\~pages
(UNIX manual pages) are searched.
.
They were constructed for
.IR groffer ,
but they are compatible with the long options of the
.I GNU man
program.
.
.
.P
.Opt_[alt] -- all
.Opt_[alt] -- ascii
.Opt_[alt] -- apropos
.Opt_[alt] -- ditroff
.Opt_[alt] -- extension suffix
.Opt_[alt] -- locale language
.Opt_[alt] -- local-file
.Opt_[alt] -- man
.Opt_[alt] -- manpath dir1:dir2:\*[Ellipsis]
.Opt_[alt] -- no-location
.Opt_[alt] -- no-man
.Opt_[alt] -- sections sec1:sec2:\*[Ellipsis]
.Opt_[alt] -- systems sys1,sys2,\*[Ellipsis]
.Opt_[alt] -- troff-device device
.Opt_[alt] -- whatis
.
.
.P
The GNU
.I man
long options that are not mentioned are recognized, but they are just
ignored because of alternative implementations.
.
The full set of long and short options of the GNU man program can be
passed via the environment variable
.Env_var $MANOPT ;
see
.BR man (1)
if your system has GNU man installed.
.
.RE
.
.
.TP
.I groff_options
Any combination of (short) options from the
.BR groff (@@MAN1EXT@@)
program is accepted; the options that are not explicitly handled by
groffer are transparently passed to groff.
.
Due to the automatism in groffer, none of these groff options should
be necessary, except for advanced usage.
.
.
.RS
.
.P
Because of the special outputting behavior of the groff options
.Opt_short V,
.Opt_short X,
and
.Opt_short Z,
groffer was designed to be switched into
.I groff
mode by each of these options; in this mode, the groffer viewing
features are disabled.
.
.P
The other groff options do not switch the mode, but allow to customize
the formatting process.
.
Useful groff formatting options include
.Opt_short m
(to add macro files that cannot be recognized by grog), and
.Opt_short T
(to specify an alternative device for the modes
.I tty
and
.IR x ).
.
.RE
.
.
.TP
.I filespec
is one or more file names or templates for searching
man\~pages, see
.BR man (1).
Each
.I filespec
can have one of the following forms.
.
.
.RS
.
.P
No
.I filespec
parameters means standard input.
.
.
.TP 10m
.Opt_short
stands for standard input (can occur several times).
.
.
.TP
.I filename
the path name of an existing file.
.
.
.TP
.I name
if 
.I name
is not an existing file search for the man\~page called in the lowest
man\~section that has a document for this name.
.
.
.TP
.BI man: name
search for a man\~page in the lowest man\~section that has a document
called
.IR name .
.
.
.TP
.BI man: name . section
.TP+
.BI man: name ( section )
.TP+
.IB name ( section )
.TP+
.IB name . section
each of these search the man\~page
.I name
in man\~section\~\c
.IR section .
.
.
.TP
.I "std_section name"
two arguments like in the
.BR man (1)
program to find man\~page
.I name
in man\~section
.IR std_section .
.
In
.IR groffer ,
the argument
.I std_section
is a standard section name for man\~pages; these are a digit `1',
\&\*[Ellipsis], `9', or the single letters `o' or `n'.
.
This should be used only with care.
.
.RE
.
.
.\" --------------------------------------------------------------------
.SH "GROFFER OPTIONS"
.\" --------------------------------------------------------------------
.
All short options of
.I groffer
are compatible with the short options of
.BR groff (@@MAN1EXT@@).
.
Some of the
.I groff
options were given a special meaning within
.IR groffer .
.
All other
.I groff
options are supported by
.IR groffer ,
but they are just transparently transferred to
.I groff
without any intervention.
.
Therefore these transparent options are not documented here, but in
.BR groff (@@MAN1EXT@@).
.
.
.P
All long options of
.I groffer
are compatible with the long options of
.BR man (1).
.
Most of the
.I man
long options were implemented as native options into
.IR groffer .
.
These options are documented in the following; the other
.I man
options are recognized, but ignored.
.
.
.Opt_def - h
Print usage message to standard error and exit.
.
.
.Opt_def - Q
Output the roff source code of the input files unprocessed.
.
This is the equivalent
.Opt_long mode\~source .
.
.
.Opt_def - T devname
Switch to
.Opt_long mode
.IR devname .
.
The input is formatted and postprocessed using plain
.I groff
with
.I devname
as the output device.
.
The allowed device names are listed in
.BR groff (@@MAN1EXT@@).
.
Note that this forces all device names that begin with the letter
.I X
to be displayed with
.BR gxditview (@@MAN1EXT@@);
all other device names generate output for the specified device; this
is printed onto standard output without a pager.
.
.
.Opt_def - v
Print version information onto standard error.
.
.
.Opt_def - V
Switch into
.I groff
mode and format the input with groff option
.Opt_short V ;
this produces the groff calling pipe without formatting the input.
.
This an advanced option from
.BR groff (@@MAN1EXT@@) ,
only useful for debugging.
.
.
.Opt_def - X
Switch into
.I groff
mode and format the input with groff option
.Opt_short X ;
actually, this formats the input and displays it with
.BR gxditview (@@MAN1EXT@@) .
.
This differs from groffer's mode
.I x
because groffer's viewer options are not used, but the viewer is
configured like in groff with the groff option
.Opt_short P .
This option is inhereted from
.BR groff (@@MAN1EXT@@) .
.
.
.Opt_def - Z
Switch into
.I groff
mode and format the input with groff option
.Opt_short Z ;
this produces the groff intermediate output without postprocessing; see
.BR groff_out (@@MAN1EXT@@) .
This an advanced option from
.BR groff (@@MAN1EXT@@) ,
useful for debugging.
.
.
.Opt_def -- all
In searching man pages, retrieve all suitable ones instead of only one.
.
.
.Opt_def -- apropos
Instead of displaying, start the `apropos' command for searching
within man page descriptions; only kept for compatibility with `man'.
.
.
.Opt_def -- auto-modes mode1,mode2,\*[Ellipsis]
Set the sequence of modes for default mode to the comma separated list
given in the argument.
.
.
.Opt_def -- background color
This is equivalent to
.Opt_long bg .
.
.
.Opt_def -- bd pixels
Specifies the color of the border surrounding the viewer
window.
.
This is an adaption of the X Toolkit option
.Opt_short bd .
.
The argument is an X color name, see
.BR (1)
for details.
.
.
.Opt_def -- bg color
Set the background color of the viewer window.
.
This is an adaption of the X Toolkit option
.Opt_short bg .
.
The argument is an X color name, see
.BR (1)
for details.
.
.
.Opt_def -- bw pixels
Specifies the width in pixels of the border surrounding the viewer
window (not available for all viewers).
.
This is an adaption of the X Toolkit option
.Opt_short bw .
.
.
.Opt_def -- debug
Print debugging information.
.
Actually, a function call stack is printed if an error occurs.
.
.
.Opt_def -- default
Reset all configuration from previously processed command line options
to the default values.
.
This is useful to wipe out all effects of former options and restart
option processing using only the rest of the command line.
.
.
.Opt_def -- device
Eqivalent to
.Opt_short T .
.
.
.Opt_def -- display X-display
Set the X display on which the viewer program shall be started, see
.BR X (1)
for the syntax of the argument.
.
.
.Opt_def -- ditroff
Eqivalent to
.Opt_short Z .
This is kept for compatibiliy with GNU
.BR man (1).
.
.
.Opt_def -- dvi
Choose dvi mode; the formatted input is displayed with the  
by default, the formatted input is displayed with the
.BR xdvi (1)
program.
.
.
.Opt_def -- dvi-viewer prog
Set the viewer program for dvi mode.
.
This can be a file name or a program to be searched in
.Env_var $PATH .
.
Known dvi viewers inlude
.BR xdvi (1)
and
.BR dvilx (1)
.
In each case, arguments can be provided additionally.
.
.
.Opt_def -- extension suffix
Restrict man\~page search to file names that have
.I suffix
appended to their section element.
.
For example, in the file name
.I /usr/share/man/man3/terminfo.3ncurses.gz
the man\~page extension is
.IR ncurses .
.
Originates from GNU
.IR man .
.
.
.Opt_def -- foreground color
This is equivalent to
.Opt_long fg .
.
.
.Opt_def -- fg color
Set the foreground color of the viewer window.
.
This is an adaption of the X Toolkit option
.Opt_long bg .
.
The argument is an X color name, see
.BR (1)
for details.
.
.
.Opt_def -- font font_name
This is equivalent to
.Opt_long ft .
.
.
.Opt_def -- ft font_name
Set the font used by the viewer window.
.
This is an adaption of the X Toolkit option
.Opt_short ft .
.
The argument is an X font name, see
.BR (1)
for details.
.
.
.Opt_def -- geometry size_pos
Set the geometry of the display window, that means its size and its
starting position.
.
See
.BR X (1)
for details on the syntax of the argument.
.
If the actual display mode is not X then this option is ignored.
.
.
.Opt_def -- groff
Set
.I groff
mode.
.
Switch groffer to process the input like
.BR groff (@@MAN1EXT@@).
.
This disables the groffer viewing features, all groffer viewing
options are ignored.
.
.
.Opt_def -- help
Eqivalent to
.Opt_short h .
.
.
.Opt_def -- location
Print the location of the retrieved files to standard error.
.
.
.Opt_def -- locale language
.
Set the language for man pages.
.
This option originates from GNU
.BR man (1).
.
.
.Opt_def -- man
Check the non-option command line arguments (filespecs) first on being
man\~pages, then whether they represent an existing file.
.
By default, a filespec is first tested if it is an existing file.
.
.
.Opt_def -- manpath "'dir1:dir2:\*[Ellipsis]'"
Use the specified search path for retrieving man\~pages instead of the
program defaults.
.
If the argument is set to the empty string "" the search for man\~page
is disabled.
.
.
.Opt_def -- mode value
.
Set the display mode.
.
The following mode values are recognized:
.
.
.RS
.
.
.TP
.Header_CB auto
Display in the default manner; this actually means to try the modes
.IR ps ,
.IR x ,
and
.I tty
in this sequence.
.
Useful for restoring default mode when a different mode was specified
with
.Env_var $GROFFER_OPT .
.
.
.TP
.Header_CB dvi
Display formatted input in a dvi viewer program; equivalent to
.Opt_long dvi .
.
.
.TP
.Header_CB pdf
Display formatted input in a PDF (Portable Document Format) viewer
program; equivalent to
.Opt_long pdf .
.
.
.TP
.Header_CB ps
Display formatted input in a Postscript viewer program; equivalent to
.Opt_long ps .
.
.
.TP
.Header_CB tty
Display formatted input in a text terminal; equivalent to
.Opt_long tty .
.
.
.TP
.Header_CB www
Display formatted input in a internet browser program; equivalent to
.Opt_long www .
.
.
.TP
.Header_CB x
Display formatted input in a native roff viewer such as
.BR gxditview (@@MAN1EXT@@);
equivalent to
.Opt_long x .
.
.
.P
The following modes do not use the
.I groffer
viewing features.
.
They are only interesting for advanced applications.
.
.
.TP
.Header_CB groff
Generate device output with plain
.I groff
without using the special viewing features of
.IR groffer .
If no device was specified by option
.Opt_short T
the
.I groff
default
.B ps
is assumed.
.
.
.TP
.Header_CB source
Display source code; same as
.Opt_short Q .
.
.
.RE
.
.
.Opt_def -- no-location
Do not display the location of retireved files; this resets a former
call to
.Opt_long location .
.
.
.Opt_def -- no-man
Do not check for man\~pages.
.
.
.Opt_def -- pager
Set the pager program in tty mode; default is
.IR less .
.
.
.Opt_def -- pdf
Choose pdf mode (Portable Document Format).
.
By default, the input is formatted by groff using the Postscript
device, then it is transformed into the PDF file format using
.BR gs (1)
(this is quite slow), and finally displayed either with the
.BR xpdf (1)
or the
.BR acroread (1)
program; this can be configured with option
.Opt_long viewer-pdf .
.
PDF has a big advantage because the text is displayed graphically and
is searchable nevertheless; but as thtransformation into pdf takes a
considerable amount of time, the pdf mode is not suitable as a default
device for the auto mode.
.
The only device that is compatible to this mode is
.IR ps ,
which is also the default when no device is specified.
.
.
.Opt_def -- pdf-viewer prog
Set the viewer program for
.I pdf
mode.
.
This can be a file name or a program to be searched in
.Env_var $PATH .
.
In each case, arguments can be provided additionally.
.
.
.Opt_def -- ps
Choose ps mode (Postscript).
.
By default, the formatted input is displayed with the
.BR ghostview (@@MAN1EXT@@)
program; this can be configured with option
.Opt_long viewer-ps .
.
The only device that is compatible to this mode is
.IR ps ,
which is also the default when no device is specified.
.
.
.Opt_def -- ps-viewer prog
Set the viewer program for
.I ps
mode.
.
This can be a file name or a program to be searched in
.Env_var $PATH .
.
Common Postscript viewers inlude
.BR gv (1),
.BR ghostview (1),
and
.BR gs (1),
.
In each case, arguments can be provided additionally.
.
.
.Opt_def -- resolution value
Set X resolution in dpi (dots per inch) in some viewer programs.
.
The only supported dpi values are
.B 75
and
.BR 100 .
This is an adaption of the X Toolkit option
.Opt_short resolution .
.
.
.Opt_def -- rv
Reverse foreground and background color of the viewer window.
.
This is an adaption of the X Toolkit option
.Opt_short rv .
This feature is not available in all viewer programs.
.
.
.Opt_def -- sections
Restrict searching for man pages to the given
.IR sections ,
a colon-separated list.
.
.
.Opt_def -- shell "shell_program"
Specify the shell under which the groffer script should be run.
.
The script first tests whether this option is set (either within
.Env_var $GROFF_OPT
or as a command line option); if so, the script is rerun under the
shell program specified with the option argument.
.
.
.Opt_def -- source
Equivalent to
.Opt_short Q .
.
.
.Opt_def -- systems
Search for man pages for the given operating systems; the argument
.I systems
is a comma-separated list.
.
.
.Opt_def -- title "'some text'"
Set the title for the viewer window.
.
This feature is not available in all viewer programs.
.
.
.Opt_def -- to-postproc opt_or_arg
Eqivalent to
.Opt_short P .
.
.
.Opt_def -- troff-device
Eqivalent to
.Opt_short T .
This option is only kept for compatibility with GNU
.BR man (1).
.
.
.Opt_def -- tty
Choose tty display mode, that means displaying in a text pager even
when in X; eqivalent to
.Opt_long mode\~tty .
.
.
.Opt_def -- version
Eqivalent to
.Opt_short v .
.
.
.Opt_def -- whatis
Instead of displaying the content, get the one-liner description from
the retrieved man page files \[em] or say that it is not a man page.
.
.
.Opt_def -- where
Eqivalent to
.Opt_long location .
.
.
.Opt_def -- www
Choose www mode (html), display in a web browser program, which can be
specified with option
.Opt_long www-viewer .
By default, the existence of a sequence of standard web browsers is
tested, starting with
.BR mozilla (1)
and
.BR netscape (1)
.
.
.Opt_def -- www-viewer prog
Set the web browser program for viewing in
.I www
mode.
.
Each program that accepts html input and allows the
.BI file://localhost/ dir / file
syntax on the command line is suitable; it can be the path name of an
executable file or a program in
.Env_var $PATH .
.
In each case, arguments can be provided additionally.
.
.
.Opt_def -- x
Choose
.I x
mode (view in X roff viewer).
.
By default, the formatted input is displayed with the
.BR gxditview (@@MAN1EXT@@)
program, being distributed together with groff, or with
.BR xditview (1),
which is distributed as a standard X tool.
.
This can be configured with option
.Opt_long x-viewer .
.
The only devices (option
.Opt_short T )
that are compatible with this mode are
.IR X75 ,
.IR X100 ,
.IR X75-12 ,
.IR X100-12 ,
and
.I ps
(the default device).
.
.
.Opt_def -- x-viewer prog
Set the viewer program for
.I x
mode.
.
Suitable viewer programs are
.BR gxditview (@@MAN1EXT@@)
and
.BR xditview (1).
.
But the argument can be any executable file or a program in
.Env_var $PATH .
.
In each case, arguments can be provided additionally.
.
.
.TP
.Opt_--
Signals the end of option processing; all remaining arguments are
interpreted as
.I filespec
parameters.
.
.
.P
Besides these, groffer accepts all arguments that are valid for the
.BR groff (@@MAN1EXT@@)
program.
.
All non-groffer options are sent unmodified via grog to groff.
.
Postprocessors, macro packages, compatibility with classical troff,
and much more can be manually specified.
.
.
.\" --------------------------------------------------------------------
.SH "OUTPUT MODES"
.\" --------------------------------------------------------------------
.
By default, the groffer program formats the input and then
automatically chooses a suitable display mode, but the user can also
choose between the following modes:
.
.Topic
graphically display the formatted input with an X window program,
including
.
.RS
.Topic
with X window roff viewers such as
.BR gxditview (@@MAN1EXT@@)
.RI ( x
mode),
.
.Topic
in a dvi viewer program
.RI ( dvi
mode),
.
.Topic
in a Postscript viewer
.RI ( ps
mode),
.
.Topic
in a PDF viewer
.RI ( pdf
mode),
.
.Topic
in a web browser
.RI ( www
mode),
.RE
.
.Topic
display formatted input in a pager on the text terminal
.RI ( tty
mode),
.
.Topic
run groffer like groff, but with decompression and man\~page searching
.RI ( groff
mode); this includes things like generating the groff intermediate
output.
.
.Topic
stream the unformatted source code of the input onto standard output
.RI ( source
mode),
.
.
.P
By
.IR default ,
.I groffer
first tries whether
.B x
mode is possible, then
.B ps
mode, and finally
.B tty
mode.
.
This mode testing sequence for
.B default
mode can be changed by specifying a comma separated list of modes
with the option
.Opt_long default\-modes.
.
.
.P
The searching for man\~pages and the decompression of the input are
active in every mode.
.
.
.\" --------------------------------------------------------------------
.SS "Graphical Display Modes"
.\" --------------------------------------------------------------------
.
The graphical display modes work only in the X window environment (or
similar implementations within other windowing environments).
.
The environment variable
.Env_var $DISPLAY
or the option
.Opt_long display
are used for specifying the X display to be used; if neither is
specified, groffer assumes that no X is running.
.
.
.P
A certain graphical display mode can be selected by one of the options
.Opt_long dvi ,
.Opt_long pdf ,
.Opt_long ps ,
.Opt_short X ,
and
.Opt_long www .
.
By default, some graphical modes are tried first.  If none succeeds
groffer switches to
.B tty
mode.
.
.
.P
The graphical modes can be customized by options that were named
according to the resource options in the
.BR X (1)
Toolkit but using a leading double minus instead of the single minus
used by X.
.
These include
.Opt_long background ,
.Opt_long foreground ,
.Opt_long geometry ,
.Opt_long resolution ,
.Opt_long title ,
.Opt_long xrm ,
etc.
.
.
.P
The
.I pdf
mode has a major advantage \[em] it is the only graphical diplay mode
that allows to search for text within the viewer; this can be a really
important feature.
.
Unfortunately, it takes a long time to transform the input into the
PDF format, so it was not chosen as the major mode.
.
You can change this by the options
.Opt_long pdf
and
.Opt_long auto\-modes .
.
.
.\" --------------------------------------------------------------------
.SS "Text mode"
.\" --------------------------------------------------------------------
.
If the variable
.Env_var $DISPLAY
is not set or empty, groffer assumes that it should produce output on
a text terminal.
.
This mode can also be forced by option
.Opt_long tty .
.
.
.P
In the actual implementation, the groff output device
.I latin1
is chosen and the processed output is piped into a pager program.
.
This can be changed by specifying option
.Opt_long tty-device .
.
.
.P
The pager to be used can be specified by option
.Opt_long pager
or by the environment variable
.Env_var $PAGER .
If this is not set or empty the
.BR less (1)
program is used as the default pager.
.
.
.\" --------------------------------------------------------------------
.SS "Non-displaying Modes"
.\" --------------------------------------------------------------------
.
There are some special modes that do not display the formatted output
in a viewer program.
.
These modes are regarded as advanced, they are useful for debugging
purposes.
.
.
.TP
.I source mode
Instead of displaying the formatted output, it is also possible to
have the roff source code streamed onto the standard output.
.
This mode must be requested by one of the options
.Opt_short Q
or
.Opt_long source .
.
.
.TP
.I groff mode
This mode disables the groffer viewing facilities.
.
The input is handled as usual with decompression and man\~page
searching, but then it is passed to groff using only the options
provided by groff.
.
This enables the user to save the generated output into a file or pipe
it into another program.
.
In this mode, the input is formatted, but not postprocessed; see
.BR groff_out (@@MAN5EXT@@)
for details.
.
This mode is activated automatically by the three groff options
.Opt_short V
(print roff pipe, no formatting),
.Opt_short X
(display with gxditview in groff's native way, using
.Opt_short P
for customization), and
.Opt_short Z
(disable post-processing, thus producing the groff intermediate output).
.
.
.\" --------------------------------------------------------------------
.SH "MAN\~PAGE\~SEARCHING"
.\" --------------------------------------------------------------------
.
The default behavior of groffer is to first test whether a file
parameter represents a local file; if it is not an existing file name,
it is assumed to represent a name of a man\~page.
.
This behavior can be modified by the following options.
.
.
.TP
.Opt_long man
forces to interpret all file parameters as filespecs for searching
man\~pages.
.
.TP
.Opt_long no\-man
.TP+
.Opt_long local\-file
disable the man searching; so only local files are displayed.
.
.
.P
If neither a local file nor a man\~page was retrieved for some file
parameter a warning is issued on standard error, but processing is
continued.
.
.
.P
The groffer program provides a search facility for man\~pages.
.
All long options, all environment variables, and most of the
functionality of the GNU
.BR man (1)
program were implemented.
.
This inludes the extended file names of man\~pages, for example,
the man\~page of
.I groff
in man\~section 7 may be stored under
.File_name /usr/share/man/man7/groff.7.gz ,
where
.File_name /usr/share/man/
is part of the man\~path, the subdirectory
.I man7
and the file extension
.I .7
refer to the man\~section 7;
.I .gz
shows the compression of the file.
.
.
.P
The
.I cat\~pages
(preformatted man\~pages) are intentionally excluded from the search
because groffer is a roff program that wants to format by its own.
.
With the excellent performance of the actual computers, the
preformatted man\~pages aren't necessary any longer.
.
.
.P
The algorithm for retrieving man\~pages uses five search methods.
.
They are successively tried until a method works.
.
.
.Topic
The search path can be manually specified by using the option
.Opt_long manpath .
An empty argument disables the man\~page searching.
.
This overwrites the other methods.
.
.
.Topic
If this is not available the environment variable
.Env_var $MANPATH
is searched.
.
.
.Topic
If this is empty, the program tries to read it from the environment
variable
.Env_var $MANOPT .
.
.Topic
If this does not work, the
.BR manpath (1)
program for determining a path of man directories is tried.
.
.
.Topic
If this does not work a reasonable default path is searched for
man\~pages.
.
.
.P
After this, the path elements for the language (locale) and operating
system specific man\~pages are added to the man\~path; their sequence
is determined automatically.
.
For example, both
.I /usr/share/man/linux/fr
and
.I /usr/share/man/fr/linux
for french linux man\~pages are found.
.
The language and operating system names are determined from both
environment variables and command line options.
.
.
.P
The locale (language) is determined like in GNU man, that is from
highest to lowest precedence:
.Topic
.Opt_long locale
.
.Topic
.Env_var $GROFFER_OPT
.
.Topic
.Env_var $MANOPT
.
.Topic
.Env_var $LCALL
.
.Topic
.Env_var $LC_MESSAGES
.
.Topic
.Env_var $LANG .
.
.
.P
The language locale is usually specified in the POSIX 1003.1 based
format:
.P
\f[I]<language>\f[][\f[CB]_\f[]\f[I]<territory>\f[][\f[CB].\f[]\
\f[I]<character-set>\f[][\f[CB],\f[]\f[I]<version>\f[]]]],
.P
but the two-letter code in
.I <language>
is sufficient for most purposes.
.
.
.P
If no man\~pages for a complicated locale are found the country part
consisting of the first two characters (without the `\f[CB]_\f[]',
`\f[CB].\f[]', and `\f[CB],\f[]', parts) of the locale is searched as
well.
.
.
.P
If still not found the corresponding man\~page in the default language
is used instead.
.
As usual, this default can be specified by one of \f[CR]C\f[] or
\f[CR]POSIX\f[].
.
The man\~pages in the default language are usually in English.
.
.
.P
Several operating systems can be given by appending their names,
separated by a comma.
.
This is then specified by the environment variable
.Env_var $SYSTEM
or by the command line option
.Opt_long systems .
The precedence is similar to the locale case above from highest to
lowest precedence:
.
Topic
.Opt_long systems
.
.Topic
.Env_var $GROFFER_OPT
.
.Topic
.Env_var $MANOPT
.
.Topic
.Env_var $SYSTEM .
.
.
.P
When searching for man\~pages this man\~path with the additional
language and system specific directories is used.
.
.
.P
The search can further be restricted by limiting it to certain
sections.
.
A single section can be specified within each filespec argument,
several sections as a colon-separated list in command line option
.Opt_long sections
or environment variable
.Env_var $MANSECT .
.
When no section was specified a set of standard sections is searched
until a suitable man\~page was found.
.
.
.P
Finally, the search can be restricted to a so-called
.IR extension .
This is a postfix that acts like a subsection.
.
It can be specified by
.Opt_long extension
or environment variable
.Env_var $EXTENSION .
.
.
.P
For further details on man\~page searching, see
.BR man (1).
.
.
.\" --------------------------------------------------------------------
.SH DECOMPRESSION
.\" --------------------------------------------------------------------
.
The program has a decompression facility.
.
If standard input or a file that was retrieved from the command line
parameters is compressed with a format that is supported by either
.BR gzip (1)
or
.BR bzip2 (1)
it is decompressed on-the-fly.
.
This includes the GNU
.BR .gz ,
.BR .bz2 ,
and the traditional
.B .Z
compression.
.
The program displays the concatenation of all decompressed input in
the sequence that was specified on the command line.
.
.
.\" --------------------------------------------------------------------
.SH "ENVIRONMENT"
.\" --------------------------------------------------------------------
.
The groffer programs supports many system variables, most of them by
courtesy of other programs.
.
All environment variables of
.BR groff (@@MAN1EXT@@)
and GNU
.BR man (1)
and some standard system variables are honored.
.
.
.\" --------------------------------------------------------------------
.SS "Native groffer Variables"
.\" --------------------------------------------------------------------
.
.TP
.Env_var $GROFFER_OPT
Store options for a run of groffer.
.
The options specified in this variable are overridden by the options
given on the command line.
.
The content of this variable is run through the shell builitin `eval';
so arguments containing white-space or special shell characters should
be quoted.
.
.
.\" --------------------------------------------------------------------
.SS "System Variables"
.\" --------------------------------------------------------------------
.
The groffer program is a shell script that is run through
.BR /bin/sh ,
which can be internally linked to programs like
.BR bash (1).
The corresponding system environment is automatically effective.
.
The following variables have a special meaning for groffer.
.
.
.TP
.Env_var $DISPLAY
If this variable is set this indicates that the X window system is
running.
.
Testing this variable decides on whether graphical or text output is
generated.
.
This variable should not be changed by the user carelessly, but it can
be used to start the graphical groffer on a remote X terminal.
.
For example, depending on your system, groffer can be started on the
second monitor by the command
.Shell_cmd DISPLAY=:0.1\~groffer\~ what.ever &
.
.
.TP
.Env_var $LC_ALL
.TP+
.Env_var $LC_MESSAGES
.TP+
.Env_var $LANG
If one of these variables is set (in the above sequence), its content
is interpreted as the locale, the language to be used, especially when
retrieving man\~pages.
.
A locale name is typically of the form
.IR language [\c
.B _\c
.IR territory [\c
.B .\c
.IR codeset [\c
.B @@\c
.IR modifier ]]],
where
.I language
is an ISO 639 language code,
.I territory
is an ISO 3166 country code, and
.I codeset
is a character set or encoding identifier like ISO-8859-1 or UTF-8;
see
.BR setlocale (3).
.
The locale values\~\c
.B C
and
.B POSIX
stand for the default, i.e. the man\~page directories without a
language prefix.
.
This is the same behavior as when all 3\~variables are unset.
.
.
.TP
.Env_var $PAGER
This variable can be used to set the pager for the tty output.
.
For example, to disable the use of a pager completely set this
variable to the
.BR cat (1)
program
.Shell_cmd PAGER=cat\~groffer\~ anything
.
.
.TP
.Env_var $PATH
All programs within the groffer shell script are called without a
fixed path.
.
Thus this environment variable determines the set of programs used
within the run of groffer.
.
.
.TP
.Env_var $POSIXLY_CORRECT
If set to a non-empty value this chooses the POSIX mode for option
processing, that means that option processing will be finished as soon
as a non-option argument is found.
.
Usually, you do not want to set this environment variable.
.
.
.\" --------------------------------------------------------------------
.SS "Groff Variables"
.\" --------------------------------------------------------------------
.
The groffer program internally calls groff, so all environment
variables documented in
.BR groff (@@MAN1EXT@@)
are internally used within groffer as well.
.
The following variables have a direct meaning for the groffer program.
.
.TP
.Env_var $GROFF_TMPDIR
If the value of this variable is an existing, writable directory,
groffer uses it for storing its temporary files, just as groff does.
.
.
.\" --------------------------------------------------------------------
.SS "Man Variables"
.\" --------------------------------------------------------------------
.
Parts of the functionality of the man\~program were implemented in
groffer; support for all environment variables documented in
.BR man (1)
was added to groffer, but the meaning was slightly modified due to the
different approach in groffer; but the user interface is the same.
.
The man environment variables can be overwritten by options provided
with
.Env_var $MANOPT ,
which in turn is overwritten by the command line.
.
.
.TP
.Env_var $EXTENSION
Restrict the search for man\~pages to files having this extension.
.
This is overridden by option
.Opt_long extension ;
see there for details.
.
.
.TP
.Env_var $MANOPT
This variable contains options as a preset for
.BR man (1).
As not all of these are relevant for groffer only the essential parts
of its value are extracted.
.
The options specified in this variable overwrite the values of the
other environment variables taht are specific to man.
.
All options specified in this variable are overridden by the options
given on the command line.
.
.
.TP
.Env_var $MANPATH
If set, this variable contains the directories in which the man\~page
trees are stored.
.
This is overridden by option
.Opt_long manpath .
.
.
.TP
.Env_var $MANSECT
If this is a colon separated list of section names, the search for
man\~pages is restricted to those manual sections in that order.
.
This is overridden by option
.Opt_long sections .
.
.
.TP
.Env_var $SYSTEM
If this is set to a comma separated list of names these are interpreted
as man\~page trees for different operating systems.
.
This variable can be overwritten by option
.Opt_long systems ;
see there for details.
.
.
.P
The environment variable
.Env_var $MANROFFSEQ
is ignored by groffer because the necessary preprocessors are
determined automatically.
.
.
.\" --------------------------------------------------------------------
.SH "CONFIGURATION FILES"
.\" --------------------------------------------------------------------
.
The groffer program can be preconfigured by two configuration files.
.
Both of them are shell scripts that are called at the beginning of
groffer using the `\c
.CB .\~\c
.IR filename '
syntax.
.
.
.TP
.File_name /etc/groff/groffer.conf
System-wide configuration file for groffer.
.
.
.TP
.File_name $HOME/.groff/groffer.conf
User-specific configuration file for groffer, where
.Env_var $HOME
denotes the user's home directory.
.
This script is called after the system-wide configuration file to
enable overriding by the user.
.
.
.P
It makes sense to use these configuration files for the following
tasks:
.
.Topic
Preset environment variables recognized by groffer; preferably a
variable should only be set when it is unset in order not to override
a user-provided value.
.
.Topic
Preset command line options by prepending them to
.Env_var $GROFFER_OPT ;
prepending should be preferred to appending and setting in order not
to delete the environment variable provided by the 
.
.Topic
Write a function for calling a viewer program for a special
.I mode
and feed this name into its corresponding
.Opt_long \f[I]mode\f[]\-viewer
option.
.
Note that the name of such a function must coincide with some existing
program in the system path
.Env_var $PATH
in order to be recognized by groffer.
.
.
.P
As an example, consider the following configuration file.
.
.P
.ft CR
.nh
.nf
#! /bin/sh
# ~/.groff/groffer.conf
if test "$DISPLAY" = ""; then
  DISPLAY='localhost:0.0';
fi;
GROFF_OPT="--resolution=100 $GROFF_OPT";
gxditview()
{
  /usr/local/bin/gxditview --fg DarkBlue "$@@";
}
GROFF_OPT="--x-viewer gxditview $GROFF_OPT";
.fi
.hy
.ft
.
.
.P
This has the following effects:
.Topic
allows to start groffer in a graphical mode (here on first running X
display by
.IR localhost:0.0 )
even from a text terminal (empty
.Env_var $DISPLAY );
.Topic
all graphical modes use a resolution of
.I 100 dpi
where applicable;
.Topic
the
.BR gxditview (@@MAN1EXT@@)
program is told to use
.I DarkBlue
as the text color by defining a shell function with the program's name
.Topic
force
.I gxditview
to be used in X mode by option
.Opt_long x\­viewer .
.
.
.P
These configurations can be overridden by command line options and by
environment variable
.Env_var $GROFFER_OPT .
.
.
.\" --------------------------------------------------------------------
.SH "EXAMPLES"
.\" --------------------------------------------------------------------
.
The usage of groffer is very easy.
.
Usually, it is just called with a file name or man\~page.
.
The following examples, however, show that groffer has much more fancy
capabilities.
.
.
.TP
.Shell_cmd "groffer\~/usr/local/share/doc/groff/meintro.ms.gz"
Decompress, format and display the compressed file
.I meintro.ms.gz
in the directory
.IR /usr/local/share/doc/groff ,
using a default graphical viewer when in X window, or the
.BR less (1)
pager program when not in X.
.
.
.TP
.Shell_cmd "groffer\~groff.7\~groff\~\[cq]troff(1)\[cq]\~man:roff"
.
The arguments that are not existing files are looked-up as the
following man\~pages:
.I groff
(in man\~section\~7),
.I groff
(automatic search, should be found in man\~section\~1),
.I troff
(in section\~1),
and
.I roff
(in the section with the lowest number, being\~7 in this case).
.
The quotes around
.I \[cq]troff(1)\[cq]
are necessary because the paranthesis are special shell characters;
escaping them with a backslash character
.I \[rs](
and
.I \[rs])
would be possible, too.
.
The formatted files are concatenated and displayed in one piece.
.
.
.TP
.Shell_cmd "LANG=de\~groffer\~--man\~--www\~--www-viever=netscape\~ls"
.
Retrieve the German man\~page (language
.IR de )
for the
.B ls
program (the English version is used if there is no German version),
decompress it, format it into the html format (www mode) and view the
result in the default web browser
.I netscape .
The option
.Opt_long man
guarantees that the man\~page is retrieved, even when a local file
.I ls
exists in the actual directory.
.
.
.TP
.Shell_cmd "groffer\~-Q\~'man:roff(7)'"
.
Get the man\~page called
.I roff
in man\~section 7 and print its unformatted content (source code
because of option
.Opt_short Q )
on standard output.
.
.
.TP
.Shell_cmd "cat\~file.gz\~|\~groffer\~-Z\~-mfoo"
.
Decompress the standard input, switch to
.I groff
using macro package
.I foo
(groff option
.Opt_short m ) in non-postprocessing mode (groff option
.Opt_short Z );
this produces the groff intermediate output, see
.BR groff_out (@@MAN7EXT@@).
.
.
.TP
.Shell_cmd "echo\~'\[rs]f[CB]WOW!'\~|"
.TP+
.Shell_cmd+ "groffer --x --bg red --fg yellow --geometry 200x100 -"
.
Display the word \f[CB]WOW!\f[] in a small window in constant-width
bold font, using color yellow on red background.
.
.
.\" --------------------------------------------------------------------
.SH "COMPATIBILITY"
.\" --------------------------------------------------------------------
.
The
.B groffer
shell script is compatible to both POSIX and GNU.
.
POSIX compatibility refers to
.B IEEE P1003.2/D11.2
of September 1991, a very early version of this standard.
.
The script uses only a quite restricted set of shell language elements
and shell builtins, common to all POSIX versions; the only external
program used is `sed', again only the most basic POSIX features of
`sed' are used.
.
The groffer script should work on most actual free and commercial
operating systems.
.
.
.P
The groffer program provides its own parser for command line options;
it can handle option arguments and file names containing white space
and a large set of special characters.
.
.
.P
The groffer shell script was tested with the following common
implementations of the POSIX shell:
.BR ash (1),
.BR bash (1),
.BR ksh (1),
POSIX
.BR sh (1),
and others.
.
Free POSIX compatible shells and shell utilities for most operating
systems are available at the
.URL http://\:www.gnu.org/software/ "GNU software archive" .
.
.
.P
The best performance was obtained with the
.I ash
shell; so groffer tries to run under
.I ash
whenever possible.
.
If not available the shell under which the script was started in the
first place is used instead.
.
This can be modified by the option
.Opt_long shell .
.
.
.P
The groffer program provides its own parser for command line arguments
that is compatible to both POSIX
.BR getopts (1)
and GNU
.BR getopt (1).
.
The following usual types of options are supported.
.
.
.Topic
A single minus always refers to single character options, for example,
.Opt_short Qmfoo
is equivalent to
.Opt_short Q\~\-m\~foo.
.
.
.Topic
Long options that means option with names longer than one character
are always prededed by a double minus; an option argument can either
go to the next command line argument or be appended with an equal sign
to the argument; for example,
.Opt_alt -- long=arg
is equivalent to
.Opt_alt -- long\~arg .
.
.
.Topic
An argument of
.Opt_--
ends option parsing; all further command line arguments are
interpreted as filespec arguments.
.
.
.Topic
By default, all command line arguments that are neither options nor
option arguments are interpreted as filespec parameters and stored
until option parsing has finished.
.
For example, the command line
.Shell_cmd "groffer file1 -a -o arg file2"
is, by default, equivalent to
.Shell_cmd "groffer -a -o arg -- file1 file2"
.
.
.P
This behavior can be changed by setting the environment variable
.Env_var $POSIXLY_CORRECT
to a non-empty value; in this case, option processing is stopped as
soon as the first non-option argument is found.
.
For example, in posixly correct mode, the command line
.Shell_cmd "groffer file1 -a -o arg file 2"
is equivalent to
.Shell_cmd "groffer -- file1 -a -o arg file 2"
As this leads to unwanted behavior in most cases, most people do not
want to set
.Env_var $POSIXLY_CORRECT .
.
.
.\" --------------------------------------------------------------------
.SH "SEE ALSO"
.\" --------------------------------------------------------------------
.
.TP
.BR groff (@@MAN1EXT@@)
.TP+
.BR troff (@@MAN1EXT@@)
Details on the options and environment variables available in groff;
all of them can be used with groffer.
.
.
.TP
.BR grog (@@MAN1EXT@@)
Internally, groffer tries to guess the groff command line options from
the input using this program.
.
.
.TP
.BR groff_out (@@MAN5EXT@@)
Documentation on the groff intermediate output (ditroff output).
.
.
.TP
.BR xdvi (1)
.TP+
.BR dvilx (1)
Viewers for groffer's
.I dvi
mode.
.
.
.TP
.BR gv (1)
.TP+
.BR ghostview (1)
Viewers for groffer's
.I ps
mode.
.
.
.TP+
.BR gs (1)
Transformer from
.I ps
to
.IR pdf ;
and a
.I ps
viewer.
.
.
.TP
.BR xpdf (1)
Viewers for
.I pdf
files.
.
.
.TP
.BR gxditview (@@MAN1EXT@@)
.TP+
.BR xditview (1x)
Viewers for groffer's
.I x
mode.
.
.
.TP
.BR gzip (1)
.TP+
.BR bzip2 (1)
The decompression programs supported by groffer.
.
.
.TP
.BR man (1)
The standard program to diplay man\~pages.
.
The information there is only useful if it is the man\~page for
.IR "GNU\~man" .
Then it documents the options and environment variables that are
supported by groffer.
.
.
.\" --------------------------------------------------------------------
.SH "AUTHOR"
.\" --------------------------------------------------------------------
.
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
.
.P
This document is distributed under the terms of the FDL (GNU Free
Documentation License) version 1.1 or later.
.
You should have received a copy of the FDL on your system, it is also
available on-line at the
.URL http://\:www.gnu.org/\:copyleft/\:fdl.html "GNU copyleft site" .
.
.P
This document is part of
.IR groff ,
the GNU roff distribution.
.
It was written by
.MTO bwarken@@mayn.de "Bernd Warken" .
.
.
\" --------------------------------------------------------------------
.\" Emacs settings
.\" --------------------------------------------------------------------
.
.\" Local Variables:
.\" mode: nroff
.\" End:
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Import groff-1.19. Changes since 1.16.1: too many to list here (> 1000 lines
in the abridged version). Please read the included NEWS file for details.
@
text
@@


1.1.1.2
log
@Import groff-1.19.1. Changes since 1.19:

Groff
-----

o The argument of the command line option `-I' is now also passed to troff
  and grops, specifying a directory to search for files on the command line,
  files named in `so' and `psbb' requests, and files named in \X'ps: file'
  and \X'ps: import' escapes.

o If option `-V' is used more than once, the commands will be both printed
  on standard error and run.

Troff
-----

o Two new read-only, string-valued registers `.m' and `.M' return the
  name of the current drawing and background color, respectively.

o New read-only register `.U' which is set to 1 if in safer mode and set
  to 0 if in unsafe mode.

o An input encoding file for latin-5 (a.k.a. ISO 8859-9) has been added.
  Example use:

    groff -Tdvi -mlatin5 my_file > my_file.dvi

  Note that some output devices don't support all glyphs of this encoding.

o If the `return' request is called with an argument, it exits twice,
  namely the current macro and the macro one level higher.  This is
  used to define a wrapper macro for `return' in trace.tmac.

o For completeness, two new requests have been added: `dei1' and `ami1'.
  They are equivalent to `dei' and `ami', respectively, but the macros
  are executed with compatibility mode off (similar to `de1' and `am1').

o New command line option `-I' to specify a directory for files (both
  those on the command line and those named in `psbb' requests).  This is
  also handled by the groff wrapper program.

o Since version 1.19 you can say `.vs 0'.  Older versions emit a warning
  and convert this to `.vs \n[.V]'.

  This hasn't been documented properly.  Note that `.vs 0' isn't saved in a
  diversion since it doesn't result in vertical motion.

Pic
___

o Dashed and dotted ellipses have been implemented.

Tbl
---

o New key character `x' to make tbl call a user-defined macro on a table
  cell.  Patch by Heinz-Jürgen Oertel <hj.oertel@@surfeu.de>.

Grohtml
-------

o New option `-j' to emit output splitted into multiple files.

Grops
-----

o New command line option `-I' to specify a directory to search for files
  on the command line and files named in \X'ps: import' and \X'ps: file'
  escapes.  This is also handled by the groff wrapper program.

o The default value for the `broken' keyword in the DESC file is now 0.

Grolj4
------

o A new man page `lj4_font(5)' documents how fonts are accessed with
  grolj4.

o The built-in fonts for LJ4 and newer PCL 5 devices have been completely
  revised, mainly to access as much glyphs as possible.  The provided
  metric files should be compatible with recent PCL 5 printers also.
  Additionally, font description files have been added for the Arial and
  Times New Roman family, the MS symbol, and Wingdings fonts.

Hpftodit
--------

o Completely revised to handle HP TrueType metric files also.  See the
  hpftodit manual page for more details.

Macro Packages
--------------

o www.tmac: New macro `JOBNAME' to split output into multiple files.

o In mdoc, multiple calls to `.Lb' are now supported in the LIBRARY
  section.
@
text
@d18 2
a19 2
Version     : groffer 0.9.7
Last update : 03 May 2004
d21 1
a21 1
Source file position: <groff-source>/contrib/groffer/groffer.man
d23 2
a24 2
Copyright (C) 2001,2002,2004 Free Software Foundation, Inc.
Written by Bernd Warken
d26 5
a30 1
This file is part of groff version @@VERSION@@.
d32 2
a33 14
groff is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

groff is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
License for more details.

You should have received a copy of the GNU General Public License
along with groff; see the files COPYING and LICENSE in the top
directory of the groff source.  If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
d280 1
a280 1
.c   <sep>: separator between minus/opt pairs.
d311 1
a311 1
.    as @@res \f[CB]\\$1\\$2\:\"         combine minus with option name
d316 1
a316 1
.  c                                    all pairs are done
d320 1
a320 1
.    c                                  optional option argument
d324 1
a324 2
.    c                                  postfix
.    as @@res \\f[CR]\\*[@@post]\"
d326 1
a326 1
.      c                                add punctuation
a401 8
.c .Opt_long_arg  ([<name> <arg> [<punct>]])
.c
.c Print `--name=arg' somewhere in the text; optional punctuation.
.c
.de Opt_long_arg
.  Opt_alt -- "\\$1=\\$2" "" "\\$3"
..
.c --------------------------------------------------------------------
d632 2
a633 1
.RI [ option...\& ]
a638 4
.Opt_alt -- apropos -- apropos-data -- apropos-devel -- apropos-progs name
./Synopsis
.
.Synopsis groffer
d684 1
a684 4
This can be done in configuration files, with the shell environment
variable
.BR $GROFFER_OPT ,
or on the command line.
d699 1
a699 1
Most of the options that must be named when running
d701 3
a703 3
directly are determined automatically for
.IR groffer ,
due to the internal usage of the
d707 1
a707 8
But all parts can also be controlled manually by arguments.
.
.
.P
Several file names can be specified on the command line arguments.
.
They are transformed into a single document in the normal way of
.IR groff .
d715 10
a724 10
.I breaking options
.RS
.P
.Opt_[alt] -- apropos name
.Opt_[alt] -- apropos-data name
.Opt_[alt] -- apropos-devel name
.Opt_[alt] -- apropos-progs name
.Opt_[alt] - h -- help
.Opt_[alt] - v -- version
.RE
a726 2
.TP
.I groffer mode options
d728 1
d730 4
a733 1
.Opt_[alt] -- auto
a734 1
.Opt_[alt] -- default-modes mode1,mode2,\*[Ellipsis]
d738 1
a738 3
.Opt_[alt] -- html
.Opt_[alt] -- html-viewer prog
.Opt_[alt] -- man
d740 1
a740 1
.Opt_[alt] -- no-man
d745 1
a745 1
.Opt_[alt] -- text
a746 1
.Opt_[alt] -- tty-viewer prog
d749 2
a750 3
.Opt_[alt] -- x -- X
.Opt_[alt] -- x-viewer -- X-viewer prog
.RE
a752 3
.TP
.I development options
.RS
d754 2
a755 3
.Opt_[alt] -- debug
.Opt_[alt] -- shell
.RE
d757 3
a759 14
.
.TP
.I options related to groff
.RS
.P
.Opt_[alt] - P -- postproc-arg opt_or_arg
.Opt_[alt] - Q -- source
.Opt_[alt] - T -- device device
.Opt_[alt] - Z -- intermediate-output -- ditroff
.P
All further
.I groff
short options are accepted.
.RE
a761 3
.TP
.I X Window toolkit options
.RS
d763 6
a768 6
.Opt_[alt] -- bd pixels
.Opt_[alt] -- bg -- background color
.Opt_[alt] -- bw pixels
.Opt_[alt] -- display X-display
.Opt_[alt] -- fg -- foreground color
.Opt_[alt] -- ft -- font font_name
a773 1
.RE
d776 12
a787 3
.TP
.I options from man
.RS
d791 1
d796 1
d798 2
a799 1
.Opt_[alt] -- pager program
d804 2
d807 1
a807 1
Further long options of GNU
d809 50
a858 1
are accepted as well.
d863 9
a871 1
.I filespec argument
d873 1
d881 1
a881 1
.Opt_short ""
a890 4
.BI man: name ( section )
.TP+
.IB name ( section )
search the man\~page
d892 1
a892 13
in man\~section\~\c
.IR section .
.
.
.TP
.BI man: name . s
.TP+
.IB name . s
if
.I s
is a character in
.BR [1-9on] ,
search for a man\~page
d894 2
a895 2
in man\~section
.IR s .
d900 2
a901 1
man\~page in the lowest man\~section that has
d906 8
a913 6
.I "s name"
if
.I s
is a character in
.BR [1-9on] ,
search for a man\~page
d915 2
a916 2
in man\~section
.IR s .
d920 4
d925 11
a935 5
if 
.I name
is not an existing file search for the man\~page
.I name
in the lowest man\~section.
d941 1
a941 1
.SH "OPTION DETAILS"
d944 1
a944 1
The
d946 7
a952 1
program can usually be run with very few options.
d954 7
a960 1
But for special purposes, it supports many options.
d962 2
a963 1
These can be classified in 5 option classes.
a966 5
All short options of
.I groffer
are compatible with the short options of
.BR groff (@@MAN1EXT@@).
.
d972 53
d1026 32
a1057 3
.\" --------------------------------------------------------------------
.SS "groffer breaking Options"
.\" --------------------------------------------------------------------
a1058 4
As soon as one of these options is found on the command line it is
executed, printed to standard output, and the running
.I groffer
is terminated thereafter.
d1060 2
a1061 1
All other arguments are ignored.
d1064 3
a1066 5
.Opt_def -- apropos name
Start the
.BR apropos (1)
command for searching within man page
descriptions.
a1067 6
That slightly differs from the strange behavior of the
.Opt_long apropos
program of
.BR man (1),
which has no argument of its own, but takes the file arguments
instead.
d1069 3
a1071 1
Practically both concepts are compatible.
d1074 3
a1076 6
.Opt_def -- apropos-data name
Show only the
.BR apropos (1)
descriptions for data documents, in the
.BR man (7)
sections 4, 5, and 7.
d1079 3
a1081 6
.Opt_def -- apropos-devel name
Show only the
.BR apropos (1)
descriptions for development documents, in the
.BR man (7)
sections 2, 3, and 9.
d1083 2
d1086 3
a1088 6
.Opt_def -- apropos-progs name
Show only the
.BR apropos (1)
descriptions for documents on programs, in the
.BR man (7)
sections 1, 6, and 8.
d1091 2
a1092 3
.Opt_def - h -- help
Print a helping information with a short explanation of option sto
standard output.
d1094 2
d1097 3
a1099 2
.Opt_def - v -- version
Print version information to standard output.
d1102 3
a1104 3
.\" --------------------------------------------------------------------
.SS "groffer Mode Options"
.\" --------------------------------------------------------------------
d1106 2
a1107 2
The display mode and the viewer programs are determined by these
options.
a1108 3
If none of these mode and viewer options is specified
.I groffer
tries to find a suitable display mode automatically.
d1110 2
d1113 1
a1113 3
.Opt_def -- auto
Equivalent to
.Opt_long_arg mode auto .
d1120 7
a1126 3
This is useful to wipe out all former options of the configuration, in
.Env_var $GROFFER_OPT ,
and restart option processing using only the rest of the command line.
d1129 4
a1132 4
.Opt_def -- default-modes mode1,mode2,\*[Ellipsis]
Set the sequence of modes for
.I auto mode
to the comma separated list given in the argument.
a1133 9
See
.Opt_long mode
for details on modes.  Display in the default manner; actually, this
means to try the modes
.IR x ,
.IR ps ,
and
.I tty
in this sequence.
d1135 5
d1143 4
a1146 2
Equivalent to
.Opt_long_arg mode dvi .
d1163 4
a1166 3
.Opt_def -- groff
Equivalent to
.Opt_long_arg mode groff .
d1168 4
d1173 2
a1174 3
.Opt_def -- html
Equivalent to
.Opt_long_arg mode html .
d1177 3
a1179 3
.Opt_def -- html-viewer
Equivalent to
.Opt_long www-viewer .
d1182 2
a1183 1
.Opt_def -- mode value
d1185 2
a1186 1
Set the display mode.
d1188 3
a1190 1
The following mode values are recognized:
a1191 1
.RS
d1193 46
a1238 3
.TP
.Header_CB auto
Select the automatic determination of the display mode.
a1239 3
The sequence of modes that are tried can be set with the
.Opt_long default-modes
option.
d1241 1
a1241 2
Useful for restoring the default mode when a different mode was
specified before.
d1243 1
d1245 2
a1246 5
.TP
.Header_CB dvi
Display formatted input in a
.I dvi
viewer program.
a1247 4
By default, the formatted input is displayed with the
.BR xdvi (1)
program.
.Opt_long dvi .
d1249 3
d1253 1
a1253 7
.TP
.Header_CB groff
After the file determination, switch
.I groffer
to process the input like
.BR groff (@@MAN1EXT@@)
would do .
a1254 3
This disables the
.I groffer
viewing features.
d1256 3
d1260 2
a1261 4
.TP
.Header_CB html
Translate the input into html format and display the result in a web
browser program.
a1262 7
By default, the existence of a sequence of standard web browsers is
tested, starting with
.BR konqueror (1)
and
.BR mozilla (1).
The text html viewer is
.BR lynx (1).
d1264 1
d1266 1
a1266 6
.TP
.Header_CB pdf
Display formatted input in a
.I PDF
(Portable Document Format) viewer
program.
d1268 1
a1268 8
By default, the input is formatted by groff using the Postscript
device, then it is transformed into the PDF file format using
.BR gs (1),
and finally displayed either with the
.BR xpdf (1)
or the
.BR acroread (1)
program.
a1269 2
PDF has a big advantage because the text is displayed graphically and
is searchable as well.
d1271 1
a1271 2
But as the transformation takes a considerable amount of time, this
mode is not suitable as a default device for the auto mode.
d1275 12
a1286 2
.Header_CB ps
Display formatted input in a Postscript viewer program.
d1288 4
a1291 3
By default, the formatted input is displayed with the
.BR ghostview (@@MAN1EXT@@)
program.
d1295 5
a1299 5
.Header_CB text
Format in a
.I groff
text mode and write the result to standard output without a pager or
viewer program.
d1301 4
a1304 4
The text device,
.I latin1
by default, can be chosen with option
.Opt_short T .
d1309 2
a1310 4
Format in a
.I groff
text mode and write the result to standard output using a text pager
program, even when in X Window.
d1315 1
a1315 1
Equivalent to
a1319 11
.Header_CB X
Display formatted input in a native roff viewer.
.
By default, the formatted input is displayed with the
.BR gxditview (@@MAN1EXT@@)
program, being distributed together with groff, or with
.BR xditview (1),
which is distributed as a standard X tool.
.
.
.TP
d1321 4
a1324 2
Equivalent to
.Opt_long_arg mode X .
d1352 1
a1352 1
Display the source code of the input without formatting; equivalent to
d1359 15
d1375 20
a1394 2
Equivalent to
.Opt_long_arg mode pdf .
d1409 10
a1418 2
Equivalent to
.Opt_long_arg mode ps .
d1438 35
a1472 1
.Opt_def -- text
d1474 7
a1480 1
.Opt_long_arg mode text .
d1483 16
a1498 3
.Opt_def -- tty
Equivalent to
.Opt_long_arg mode tty .
d1501 1
a1501 1
.Opt_def -- tty-viewer
d1504 16
a1519 1
.Opt_long_arg mode tty .
d1523 8
a1530 2
Equivalent to
.Opt_long_arg mode www .
d1540 2
a1541 2
syntax on the command line is suitable as viewer program; it can be
the path name of an executable file or a program in
d1547 24
a1570 3
.Opt_def - X -- X -- x
Equivalent to
.Opt_long_arg mode X .
d1573 1
a1573 1
.Opt_def -- X-viewer -- x-viewer prog
d1598 3
a1600 639
Besides these,
.I groffer
accepts all arguments that are valid for the
.BR groff (@@MAN1EXT@@)
program.
.
All non-groffer options are sent unmodified via
.I grog
to
.IR groff .
.
Postprocessors, macro packages, compatibility with classical
.IR troff ,
and much more can be manually specified.
.
.
.\" --------------------------------------------------------------------
.SH "Options for Development"
.\" --------------------------------------------------------------------
.
.Opt_def -- debug
Print debugging information for development only.
.
Actually, a function call stack is printed if an error occurs.
.
.
.Opt_def -- shell "shell_program"
Specify the shell under which the groffer script should be run.
.
The script first tests whether this option is set (either by
configuration, within
.Env_var $GROFF_OPT
or as a command line option); if so, the script is rerun under the
shell program specified with the option argument.
.
.
.Opt_def - Q -- source
Output the roff source code of the input files without further
processing.
.
This is the equivalent
.Opt_long_arg mode source .
.
.
.P
Other useful debugging options are the
.I groff
options
.Opt_short V
and
.Opt_short Z
and option
.Opt_long_arg mode groff .
.
.
.\" --------------------------------------------------------------------
.SH "Options related to groff"
.\" --------------------------------------------------------------------
.
All short options of
.I groffer
are compatible with the short options of
.BR groff (@@MAN1EXT@@).
.
The following of
.I groff
options have either an additional special meaning within
.I groffer
or make sense for normal usage.
.
.
.P
Because of the special outputting behavior of the
.I groff
options
.Opt_short V
and
.Opt_short Z
.I groffer
was designed to be switched into
.I groff
mode by these; the
.I groffer
viewing features are disabled there.
.
The other
.I groff
options do not switch the mode, but allow to customize the formatting
process.
.
.
.Opt_def - a
This generates an ascii approximation of output in text modes.
.
That could be important when the text pager has problems with control
sequences.
.
.
.Opt_def - m file
Add
.I file
as a
.I groff
macro file.
.
This is useful in case it cannot be recognized automatically.
.
.
.Opt_def - P opt_or_arg
Send the argument
.I opt_or_arg
as an option or option argument to the actual
.I groff
postprocessor.
.
.
.Opt_def - T -- device devname
.
This option determines
.IR groff 's
output device.
.
The most important devices are the text output devices for referring
to the different character sets, such as
.BR ascii ,
.BR utf8 ,
.BR latin1 ,
and others.
.
Each of these arguments switches
.I groffer
into a text mode using this device, to
.I mode tty
if the actual mode is not a text mode.
.
The following
.I devname
arguments are mapped to the corresponding
.I groffer
.Opt_long_arg mode \fIdevname\fR
option:
.BR dvi ,
.BR html ,
and
.BR ps .
All
.B X*
arguments are mapped to mode
.BR X .
Each other
.I devname
argument switches to
.I mode groff
using this device.
.
.
.Opt_def - V
Switch into
.I groff
mode and show only the
.I groff
calling pipe without formatting the input.
.
This an advanced option from
.BR groff (@@MAN1EXT@@) ,
only useful for debugging.
.
.
.Opt_def - X
was made equivalent to
.Opt_long_arg mode x ;
this slightly enhances the facility of
.IR groff 's
option.
.
.
.Opt_def - Z -- intermediate-output -- ditroff
Switch into
.I groff
mode and format the input with
.I groff
intermediate output without postprocessing; see
.BR groff_out (@@MAN1EXT@@).
This is equivalent to option
.Opt_long ditroff
of
.IR man ,
which can be used as well.
.
.
.P
All other
.I groff
options are supported by
.IR groffer ,
but they are just transparently transferred to
.I groff
without any intervention.
.
The options that are not explicitly handled by
.I groffer
are transparently passed to
.IR groff .
.
Therefore these transparent options are not documented here, but in
.BR groff (@@MAN1EXT@@).
Due to the automatism in
.IR groffer ,
none of these
.I groff
options should be needed, except for advanced usage.
.
.
.\" --------------------------------------------------------------------
.SS "X Window toolkit Options"
.\" --------------------------------------------------------------------
.
The following long options were adapted from the corresponding X
Toolkit options.
.
.I groffer
will pass them to the actual viewer program if it is an X Window
program.
.
Otherwise these options are ignored.
.
.
.P
Unfortunately these options use the old style of a single minus for
long options.
.
For
.I groffer
that was changed to the standard with using a double minus for long
options, for example,
.I groffer
uses the option
.Opt_long font
for the
.I X
option
.Opt_short font .
.
.
.P
See
.BR X (1),
.BR X (7),
and the documentation on the X toolkit options for more details on
these options and their arguments.
.
.
.Opt_def -- background color
Set the background color of the viewer window.
.
.
.Opt_def -- bd pixels
Specifies the color of the border surrounding the viewer window.
.
.
.Opt_def -- bg color
This is equivalent to
.Opt_long background .
.
.
.Opt_def -- bw pixels
Specifies the width in pixels of the border surrounding the viewer
window.
.
.
.Opt_def -- display X-display
Set the X display on which the viewer program shall be started, see the
.I X Window
documentation for the syntax of the argument.
.
.
.Opt_def -- foreground color
Set the foreground color of the viewer window.
.
.
.Opt_def -- fg color
This is equivalent to
.Opt_short foreground .
.
.
.Opt_def -- font font_name
Set the font used by the viewer window.
.
The argument is an X font name.
.
.
.Opt_def -- ft font_name
This is equivalent to
.Opt_long ft .
.
.
.Opt_def -- geometry size_pos
Set the geometry of the display window, that means its size and its
starting position.
.
See
.BR X (7)
for the syntax of the argument.
.
.
.Opt_def -- resolution value
Set X resolution in dpi (dots per inch) in some viewer programs.
.
The only supported dpi values are
.B 75
and
.BR 100 .
.
Actually, the default resolution for
.I groffer
is set to
.BR 75 .
.
.
.Opt_def -- rv
Reverse foreground and background color of the viewer window.
.
.
.Opt_def -- title "'some text'"
Set the title for the viewer window.
.
.
.Opt_def -- xrm "'resource'"
Set X resource.
.
.
.\" --------------------------------------------------------------------
.SS "Options from man"
.\" --------------------------------------------------------------------
.
The long options of
.I groffer
were synchronized with the long options of
.IR GNU man .
.
All long options of
.I GNU man
are recognized, but not all of these options are important to
.IR groffer ,
so most of them are just ignored.
.
.
.P
The following two options were added by
.I groffer
for choosing whether the file name arguments are interpreted as names
for local files or as a search pattern for man pages.
.
The default is looking up for local files.
.
.
.Opt_def -- man
Check the non-option command line arguments (filespecs) first on being
man\~pages, then whether they represent an existing file.
.
By default, a filespec is first tested whether it is an existing file.
.
.
.Opt_def -- no-man -- local-file
Do not check for man\~pages.
.
.Opt_long local-file
is the corresponding
.I man
option.
.
.
.P
In the following, the
.I man
options that have a special meaning for
.I groffer
are documented.
.
.
.P
The full set of long and short options of the
.I GNU man
program can be passed via the environment variable
.Env_var $MANOPT ;
see
.BR man (1)
if your system has
.I GNU man
installed.
.
.
.Opt_def -- all
In searching man\~pages, retrieve all suitable documents instead of
only one.
.
.
.Opt_def - 7 -- ascii
In text modes, display ASCII translation of special characters.
.
.
.Opt_def -- ditroff
Eqivalent to
.I groffer
.Opt_short Z .
.
.
.Opt_def -- extension suffix
Restrict man\~page search to file names that have
.I suffix
appended to their section element.
.
For example, in the file name
.I /usr/share/man/man3/terminfo.3ncurses.gz
the man\~page extension is
.IR ncurses .
.
.
.Opt_def -- locale language
.
Set the language for man pages.
.
This has the same effect, but overwrites
.Env_var $LANG
.
.
.Opt_def -- location
Print the location of the retrieved files to standard error.
.
.
.Opt_def -- no-location
Do not display the location of retrieved files; this resets a former
call to
.Opt_long location .
.
This was added by
.IR groffer .
.
.
.Opt_def -- manpath "'dir1:dir2:\*[Ellipsis]'"
Use the specified search path for retrieving man\~pages instead of the
program defaults.
.
If the argument is set to the empty string "" the search for man\~page
is disabled.
.
.
.Opt_def -- pager
Set the pager program in tty mode; default is
.IR less .
This is equivalent to
.Opt_long tty-viewer .
.
.
.Opt_def -- sections "'sec1:sec2:\*[Ellipsis]'"
Restrict searching for man\~pages to the given
.IR sections ,
a colon-separated list.
.
.
.Opt_def -- systems "'sys1,sys2,\*[Ellipsis]'"
Search for man pages for the given operating systems; the argument
.I systems
is a comma-separated list.
.
.
.Opt_def -- whatis
Instead of displaying the content, get the one-liner description from
the retrieved man\~page files \[em] or say that it is not a man\~page.
.
.
.Opt_def -- where
Eqivalent to
.Opt_long location .
.
.
.P
Additionally, the following short option of
.I man
is supported as well.
.
.
.\" --------------------------------------------------------------------
.SS "Filespec Arguments"
.\" --------------------------------------------------------------------
.
A
.I filespec
parameter is an argument meaning an input source, such as a file name
or template for searching man\~pages.
.
These input sources are collected and composed into a single output
file.
.
Each of these
.I filespec
parameters can have one of the following forms.
.
.
.P
No
.I filespec
parameters means that
.I groffer
waits for standard input.
.
The minus option
.Opt_short ""
stands for standard input, too, but can occur several times.
.
Next
.I filespec
is tested whether it is the path name of an existing file.
.
Otherwise it is assumed as a searching pattern for a man\~page.
.
.
.P
On each system, the man pages are sorted according to their content
into several sections.
.
The
.I classical man sections
have a single-character name, either are a digit from
.B 1
to
.B 9
or one of the characters
.B n
or
.BR o .
.
In the following, a stand-alone character
.I s
means this scheme.
.
.
.P
The internal precedence of
.I man
for searching man pages with the same name within several sections
goes according to the classical single-character sequence.
.
On some systems, this single character can be extended by a following
string.
.
But the special
.I groffer
man page facility is based on the classical single character sections.
.
.
.P
.BI man: name ( section )
and
.IB name ( section )
search the man\~page
.I name
in man\~section\~\c
.IR section ,
where
.I section
can be any string, but it must exist in the
.I man
system.
.
.
.P
Next some patterns based on the
.I classical man sections
were constructed.
.
.BI man: name . s
and
.IB name . s
search for a man\~page
.I name
in man\~section
.I s
if
.I s
is a
.I classical man section
mentioned above.
.
Otherwise search for a man\~page named
.IR name.s
in the lowest
.I man
section.
.
.
.P
Now
.BI man: name
searches for a man\~page in the lowest man\~section that has a
document called
.IR name .
.
.
.P
The pattern
.I "s name"
originates from a strange argument parsing of the
.I man
program.
.
If
.I s
is a
.I classical man section
interpret it as a search for a man\~page called
.I name
in man\~section
.IR s ,
otherwise interpret
.I s
as a file argument and
.I name
as another
.I filespec
argument.
.
.
.P
We are left with the argument
.I name
which is not an existing file.
.
So this searches for the man\~page called
.I name
in the lowest man\~section that has a document for this name.
.
.
.P
Several file name arguments can be supplied.
.
They are mixed by
.I groff
into a single document.
d1602 1
a1602 2
Note that the set of option arguments must fit to all of these file
arguments.
d1604 2
a1605 3
So they should have at least the same style of the
.I groff
language.
d1612 19
a1630 6
By default, the
.I groffer
program collects all input into a single file, formats it with the
.I groff
program for a certain device, and then chooses a suitable viewer
program.
d1632 4
a1635 4
The device and viewer process in
.I groffer
is called a
.IR mode .
d1637 4
a1640 4
The mode and viewer of a running
.I groffer
program is selected automatically, but the user can also choose it
with options.
d1642 5
d1648 4
a1651 8
The modes are selected by option the arguments of
.Opt_long_arg mode \fIanymode .
Additionally, each of this argument can be specified as an option of
its own, such as
.Opt_long \fIanymode .
Most of these modes have a viewer program, which can be chosen by an
option that is constructed like
.Opt_long \fIanymode\fR-viewer .
d1653 5
d1659 4
a1662 5
.P
Several different modes are offered, graphical X modes, text modes,
and some direct
.I groff
modes for debugging and development.
d1666 2
a1667 1
By default,
d1678 1
a1678 1
.B auto
d1693 1
a1693 1
The graphical display modes work only in the X Window environment (or
d1698 1
a1698 1
and the option
d1700 2
a1701 8
are used for specifying the X display to be used.
.
If neither is given,
.I groffer
assumes that no X and changes to one text mode.
.
You can change this automatic behavior by the option
.Opt_long default\-modes .
d1705 7
a1711 2
Known viewers for the graphical display modes and their standard X
Window viewer progams are
d1713 4
a1716 14
.Topic
X Window roff viewers such as
.BR gxditview (@@MAN1EXT@@)
or
.BR xditview (1)
.RI (in x
or
.I X
mode),
.
.Topic
in a Postscript viewer
.RI ( ps
mode),
a1717 4
.Topic
in a dvi viewer program
.RI ( dvi
mode),
d1719 15
a1733 12
.Topic
in a PDF viewer
.RI ( pdf
mode),
.
.Topic
in a web browser
.RI ( html
or
.I www
mode),
.RE
d1743 2
a1744 2
Unfortunately, it takes some time to transform the input into the PDF
format, so it was not chosen as the major mode.
d1746 4
a1749 9
.
.P
These graphical viewers can be customized by options of the X Window
Toolkit.
.
But the
.I groffer
options use a leading double minus instead of the single minus used by
the X Window Toolkit.
a1755 8
There are to modes for text output, mode
.I text
for plain output without a pager and mode
.I tty
for a text output on a text terminal using some pager program.
.
.
.P
d1758 5
a1762 3
is not set or empty, groffer assumes that it should use
.I tty
mode.
d1768 1
a1768 1
is chosen for text modes.
d1771 1
a1771 3
.Opt_short T
or
.Opt_long device .
d1775 1
a1775 1
The pager to be used can be specified by one of the options
a1776 2
and
.Opt_long tty-viewer ,
d1779 1
a1779 1
If all of this is not used the
d1781 1
a1781 4
program with the option
.Opt_short r
for correctly displaying control sequences is used as the default
pager.
d1785 1
a1785 1
.SS "Special Modes for Debugging and Development"
d1788 6
a1793 3
These modes use the
.I groffer
file determination and decompression.
d1795 4
a1798 5
This is combined into a single input file that is fed directly into
.I groff
with different strategy without the
.I groffer
viewing facilities.
d1800 4
a1803 2
These modes are regarded as advanced, they are useful for debugging
and development purposes.
d1806 3
a1808 4
.P
The
.I source
mode with just displays the generated input.
d1810 3
a1812 6
The
.I groff
mode passes the input to
.I groff
using only some suitable options provided to
.IR groffer .
a1816 10
.
.P
In
.I groff
mode, the option
.Opt_short Z
disables post-processing, thus producing the
.I groff intermediate
.IR output .
.
d1821 9
a1829 6
.
.P
All
.I groff
short options are supported by
.IR groffer .
a1919 1
.
d1921 3
a1923 3
If this does not work a reasonable default path from
.Env_var $PATH
is searched for man\~pages.
d1927 2
a1928 3
If this does not work, the
.BR manpath (1)
program for determining a path of man directories is tried.
d2105 1
a2105 1
The content of this variable is run through the shell builtin `eval';
d2125 1
a2125 1
If this variable is set this indicates that the X Window system is
d2301 1
a2301 3
The
.I groffer
program can be preconfigured by two configuration files.
d2303 5
a2307 3
This configuration can be overridden at each program start by command
line options or by the environment variable
.Env_var $GROFFER_OPT .
a2325 24
Their lines either start with a minus character or are shell commands.
.
Arbitrary spaces are allowed at the beginning, they are just ignored.
.
The lines with the beginning minus are appended to the existing value
of $GROFFER_OPT.
.
This easily allows to set general
.I groffer
options that are used with any call of
.IR groffer .
.
.
.P
After the transformation of the minus lines the emerging shell scripts
that are called by
.I groffer
using the `\c
.CB .\~\c
.IR filename '
syntax.
.
.
.P
d2330 3
a2332 2
Preset command line options by writing them into lines starting with a
minus sign.
d2335 4
a2338 1
Preset environment variables recognized by groffer.
d2354 1
a2354 2
As an example, consider the following configuration file in
~/.groff/groffer.conf, say.
d2360 2
a2361 8
# groffer configuration file
#
# groffer options that are used in each call of groffer
--resolution=100
--foreground=DarkBlue
--x-viewer 'gxditview -geometry 850x800'
#
# some shell commands
d2363 8
a2370 3
  DISPLAY='localhost:0.0'
fi
date >>~/mygroffer.log
a2376 4
This configuration sets three
.I groffer
options and runs two shell commands.
.
a2377 9
.
.
.Topic
Lines starting with a 
.B #
character
are 
.
.
d2379 9
a2387 7
Use a resolution of
.B 100 dpi
and a text color of
.B DarkBlue
in all viewers that support this.
.
.
d2389 1
a2389 1
Force
d2391 3
a2393 8
as the X-mode viewer using the geometry option for setting the width
to
.B 850 dpi
and the height to
.B 800
.BR dpi .
.
.
d2395 4
a2398 8
The variable
.Env_var $DISPLAY
is set to
.IR localhost:0.0
which allows to start
.I groffer
in the standard X display, even when the program is called from a text
console.
d2401 4
a2404 6
.Topic
Just for fun, the date of each
.I groffer
start is written to the file
.B mygroffer.log
in the home directory.
d2425 1
a2425 3
using
.I gxditview
as graphical viewer when in X Window, or the
d2431 1
a2431 46
.Shell_cmd "groffer\~groff"
If the file
.I ./groff
exists use it as input.
.
Otherwise interpret the argument as a search for the man\~page named
.I groff
in the smallest possible man\~section, being secion 1 in this case.
.
.
.TP
.Shell_cmd "groffer\~man:groff"
search for the man\~page of
.I groff
even when the file
.I ./groff
exists.
.
.
.TP
.Shell_cmd "groffer\~groff.7"
.TP+
.Shell_cmd "groffer\~7\~groff"
search the man\~page of
.I groff
in man\~section
.BR 7 .
This section search works only for a digit or a single character from
a small set.
.
.
.TP
.Shell_cmd "groffer\~fb.modes"
If the file
.I ./fb.modes
does not exist interpret this as a search for the man\~page of
.IR fb.modes .
As the extension
.I modes
is not a single character in classical section style the argument is
not split to a search for
.IR fb .
.
.
.TP
.Shell_cmd "groffer\~groff\~\[cq]troff(1)\[cq]\~man:roff"
d2436 2
d2458 1
a2458 1
.Shell_cmd "LANG=de\~groffer\~--man\~--www\~--www-viever=mozilla\~ls"
d2464 4
a2467 6
program, decompress it, format it to
.I html
format
.RI ( www
mode) and view the result in the web browser
.I galeon .
d2476 1
a2476 1
.Shell_cmd "groffer\~--source\~'man:roff(7)'"
d2480 4
a2483 2
in man\~section 7, decompress it, and print its unformatted content,
its source code.
d2489 1
a2489 1
Decompress the standard input, send this to
d2491 1
a2491 3
intermediate mode without post-processing (groff option
.Opt_short Z ),
using macro package by
d2494 4
a2497 1
.Opt_short m ) .
d2515 1
a2515 1
shell script is compatible with both GNU and POSIX.
d2519 1
a2519 13
of September 1991, a very early version of the POSIX standard that is
still freely available in the internet.
.
Unfortunately, this version of the standard has `local' for shell
function variables removed.
.
As `local' is needed for serious programming this temporary POSIX
deprecation was ignored.
.
.
.P
Most GNU shells are compatible with this interpretation of POSIX, but
provide much more facilities.
d2521 4
a2524 3
Nevertheless this script uses only a restricted set of shell language
elements and shell builtins, such that it can be run on `ash', a GNU
shell that is quite fast, but has a slightly limited shell language.
d2538 1
a2538 1
implementations of the GNU shells:
d2540 2
a2543 1
.BR bash (1),
d2554 1
a2554 3
shell; so
.I groffer
tries to run under
d2558 1
a2558 3
If
.I ash
is not available the shell under which the script was started in the
d2570 1
a2570 2
.BR getopt (1)
except for shortcuts of long options.
d2572 1
a2572 1
The following standard types of options are supported.
d2576 1
a2576 4
A single minus always refers to single character option or a
combination thereof, for example, the
.I groffer
short option combination
d2579 1
a2579 1
.Opt_short Q\~\-m\~foo .
d2583 4
a2586 5
Long options are options with names longer than one character; they
are always prededed by a double minus.
.
An option argument can either go to the next command line argument or
be appended with an equal sign to the argument; for example,
d2596 1
a2596 1
interpreted as file name arguments.
d2613 2
a2614 5
to a non-empty value.
.
Then the strange POSIX non-option behavior is adopted, i. e. option
processing is stopped as soon as the first non-option argument is
found and each following argument is taken as a file name.
d2633 1
a2633 2
Details on the options and environment variables available in
.IR groff ;
d2638 4
a2641 2
.BR man (1)
The standard program to diplay man\~pages.
d2643 3
a2645 4
The information there is only useful if it is the man\~page for
.IR "GNU\~man" .
Then it documents the options and environment variables that are
supported by groffer.
d2649 1
a2649 1
.BR gxditview (@@MAN1EXT@@)
d2651 1
a2651 1
.BR xditview (1x)
d2653 1
a2653 1
.I x
d2685 1
a2685 1
.BR xdvi (1)
d2687 1
a2687 1
.BR dvilx (1)
d2689 1
a2689 1
.I dvi
a2693 7
.BR less (1)
Standard pager program for the
.I tty
.IR mode .
.
.
.TP
d2701 2
a2702 4
.BR groff (@@MAN7EXT@@)
Documentation of the
.I groff
language.
d2704 4
a2707 10
.
.TP
.BR grog (@@MAN1EXT@@)
Internally, groffer tries to guess the groff command line options from
the input using this program.
.
.
.TP
.BR groff_out (@@MAN5EXT@@)
Documentation on the groff intermediate output (ditroff output).
d2714 1
a2714 1
Copyright (C) 2001,2002,2004 Free Software Foundation, Inc.
d2729 2
a2730 1
It was written by Bernd Warken.
@


1.1.1.3
log
@Import groff 1.19.2
@
text
@d18 2
a19 1
Last update: 22 August 2005
d22 20
a41 42
..
.de author
This file was written by
.MTO "" "Bernd Warken" .
..
.de copyleft
Copyright (C) 2001,2002,2004,2005 Free Software Foundation, Inc.
.
.P
This file is part of
.IR \%groffer ,
which is part of
.IR \%groff ,
a free software project.
.
You can redistribute it and/or modify it under the terms of the
.nh
.B GNU General Public License
.hy
as published by the
.nh
.BR "Free Software Foundation" ,
.hy
either version 2, or (at your option) any later version.
.
.P
You should have received a copy of the \f[CR]GNU General Public
License\f[] along with
.IR groff ,
see the files \%\f[CB]COPYING\f[] and \%\f[CB]LICENSE\f[] in the top
directory of the
.I groff
source package.
.
Or read the
.I man\~page
.BR gpl (1).
You can also write to the
.nh
.B Free Software Foundation, 51 Franklin St - Fifth Floor, Boston,
.BR "MA 02110-1301, USA" .
.hy
d61 9
d191 1
a191 1
.c Print `-' (minus sign); optional punctuation.
d202 1
a202 1
.c Print `Opt_[-]' (minus sign in brackets); optional punctuation.
d213 1
a213 1
.c Print `--' (double minus); optional punctuation.
d224 1
a224 1
.c Print `Opt_[--]' (double minus in brackets); optional punctuation.
d287 1
a287 1
.c   <pre>: prefix, result is preceded by this.
d297 1
a297 2
.c   a single space ` ', followed by the string `<post>'.  Terminated
.c   by the optional punctuation <punct>.
d317 1
a317 1
.      as @@res \f[CR]\\*[@@sep]\:\"
d319 1
a319 5
.    c                                  combine minus with option name
.    as @@res \f[CB]\\-\"
.    if '\\$1'--' \
.      as @@res \\-\"
.    as @@res \\$2\"
a555 1
.  nh
a556 1
.  hy
d649 1
a649 1
.RI [ option... ]
d651 5
a655 1
.RI [ "\%filespec" "\*[Ellipsis]]"
d672 1
a672 1
.B \%groffer
d674 1
a674 1
.BR \%groff (@@MAN1EXT@@).
d676 4
a679 10
.I \%groff
language, see
.BR \%groff (@@MAN7EXT@@),
or other
.I \%roff
languages, see
.BR \%roff (@@MAN7EXT@@),
that are compatible to the original
.I \%troff
language.
d682 1
a682 1
.B \%groffer
d684 1
a684 2
the \%\f[CR]Unix\f[] manual pages
.nh
a685 1
.hy
d687 1
a687 1
.BR \%man (1)
d691 1
a691 1
.BR \%gzip (1)
d693 1
a693 1
.BR \%bzip2 (1)
d699 1
a699 2
.I \%man\~page
without further options.
d704 3
a706 3
This can be done either in configuration files, with the shell
environment variable
.BR \%$GROFFER_OPT ,
d713 1
a713 1
.IR \%groff .
d715 4
a718 16
This includes the
.I \%groff
native \%\f[CR]X\~Window\f[] viewer
.BR \%gxditview (@@MAN1EXT@@),
each
.IR \%Postcript ,
.IR \%pdf ,
or
.I \%dvi
display program, a web browser by generating
.I \%html
in
.IR \%www\~mode ,
or several
.I \%text\~modes
in text terminals.
d723 1
a723 1
.B \%groff
d725 1
a725 1
.BR \%groffer ,
d727 1
a727 1
.BR \%grog (@@MAN1EXT@@)
d737 1
a737 14
.BR \%groff .
.
.
.P
Option handling is done in \f[CR]GNU\f[] style.
.
Options and file names can be mixed freely.
.
The option
.RB ` \-\- '
closes the option handling, all following arguments are treated as
file names.
.
Long options can be abbreviated.
d748 4
d758 1
a758 1
.I \%groffer mode options
d763 1
a763 1
.Opt_[alt] -- default\-modes mode1,mode2,\*[Ellipsis]
d765 1
a765 2
.Opt_[alt] -- dvi\-viewer prog
.Opt_[alt] -- dvi\-viewer\-tty prog
d768 2
a769 2
.Opt_[alt] -- html\-viewer prog
.Opt_[alt] -- html\-viewer\-tty prog
d771 1
d773 1
a773 2
.Opt_[alt] -- pdf\-viewer prog
.Opt_[alt] -- pdf\-viewer\-tty prog
d775 1
a775 2
.Opt_[alt] -- ps\-viewer prog
.Opt_[alt] -- ps\-viewer\-tty prog
d778 1
a778 2
.Opt_[alt] -- tty\-viewer prog
.Opt_[alt] -- tty\-viewer\-tty prog
d780 1
a780 2
.Opt_[alt] -- www\-viewer prog
.Opt_[alt] -- www\-viewer\- prog
d782 1
a782 2
.Opt_[alt] -- x\-viewer -- X\-viewer prog
.Opt_[alt] -- x\-viewer\-tty -- X\-viewer\-tty prog
d791 1
a791 4
.Opt_[alt] -- do\-nothing
.Opt_[alt] -- shell prog
.Opt_[alt] - Q -- source
.Opt_[alt] - V
d796 1
a796 1
.I options related to \%groff
d799 2
d802 1
a802 1
.Opt_[alt] - Z -- intermediate\-output -- ditroff
d805 1
a805 1
.B \%groff
d811 15
a825 9
.I options for man\~pages
.Opt_[alt] -- apropos
.Opt_[alt] -- apropos\-data
.Opt_[alt] -- apropos\-devel
.Opt_[alt] -- apropos\-progs
.Opt_[alt] -- whatis
.Opt_[alt] -- man
.Opt_[alt] -- no-man
.Opt_[alt] -- no-special
d829 1
a829 1
.I long options taken over from GNU man
d843 1
d845 2
a846 2
Further long options of \f[CR]GNU\f[]
.B man
d852 1
a852 19
.I X Window Toolkit options
.RS
.P
.Opt_[alt] -- bd pixels
.Opt_[alt] -- bg -- background color
.Opt_[alt] -- bw pixels
.Opt_[alt] -- display X-display
.Opt_[alt] -- fg -- foreground color
.Opt_[alt] -- ft -- font font_name
.Opt_[alt] -- geometry size_pos
.Opt_[alt] -- resolution value
.Opt_[alt] -- rv
.Opt_[alt] -- title string
.Opt_[alt] -- xrm X-resource
.RE
.
.
.TP
.I \%filespec arguments
d856 1
a856 1
.I \%filespec
d874 3
a876 3
search the \%man\~page
.I \%name
in \%man\~section
d887 4
a890 4
.BR \%[1-9on] ,
search for a \%man\~page
.I \%name
in \%man\~section
d896 2
a897 2
\%man\~page in the lowest \%man\~section that has
.IR \%name .
d905 4
a908 4
.BR \%[1-9on] ,
search for a \%man\~page
.I \%name
in \%man\~section
d914 2
a915 2
if
.I \%name
d917 1
a917 1
.I \%name
d928 1
a928 1
.B \%groffer
d938 1
a938 1
.B \%groffer
d940 1
a940 1
.BR \%groff (@@MAN1EXT@@).
d943 1
a943 1
.B \%groffer
d945 1
a945 1
.BR \%man (1).
d954 1
a954 1
.B \%groffer
d960 40
d1017 1
a1017 1
.B \%groffer
a1019 51
The default modes are
.I mode x
with
.B gxditview
in \%\f[CR]X\~Window\f[] and
.I mode tty
with device
.I latin1
under
.B less
on a terminal.
.
.
.P
There are two kinds of options for viewers.
.Opt_long \fImode\fP-viewer
chooses the normal viewer programs that run on their own in
\%\f[CR]X\~Window\f[], while
.Opt_long \fImode\fP-viewer-tty
chooses programs that run on the terminal (on tty).
.
Most graphical viewers are programs running in \%\f[CR]X\~Window\f[],
so there aren't many opportunities to call the tty viewers.
.
But they give the chance to view the output source; for example,
.Opt_long ps\-viewer\-tty=less
shows the content of the
.I Postscript
output with the pager
.BR less .
.
.
.P
The \%\f[CR]X\~Window\f[] viewers are not critical, you can use both
.Opt_long *\-viewer
and
.Opt_long *\-viewer\-tty
for them; with
.Opt_long *\-viewer\-tty
the viewer program will not become independently, it just stays
coupled with
.BR groffer .
But the program will not run if you specify a terminal program with
.Opt_long *\-viewer
because this viewer will stay in background without a chance to reach
it.
.
So you really need
.Opt_long *\-viewer\-tty
for viewers that run on tty.
.
d1035 1
a1035 1
.Opt_def -- default\-modes mode1,mode2,\*[Ellipsis]
d1037 1
a1037 1
.I \%auto\~mode
d1047 1
a1047 1
.I \%tty
d1054 1
a1054 1
.Opt_long_arg mode \%dvi .
d1057 2
a1058 3
.Opt_def -- dvi\-viewer prog
Choose an \%\f[CR]X\~Window\f[] viewer program for
.IR \%dvi\~mode .
d1063 2
a1064 4
Known \%\f[CR]X\~Window\f[]
.I \%dvi
viewers include
.BR \%xdvi (1)
d1066 1
a1066 1
.BR \%dvilx (1)
a1070 9
.Opt_def -- dvi\-viewer\-tty prog
Choose a program running on the terminal for viewing the output of
.IR \%dvi\~mode .
.
This can be a file name or a program to be searched in
.Env_var $PATH ;
arguments can be provided additionally.
.
.
d1081 3
a1083 17
.Opt_def -- html\-viewer
Choose an \%\f[CR]X\~Window\f[] web browser program for viewing in
.I \%html\~mode .
.
It can be the path name of an executable file or a program in
.Env_var $PATH .
.
In each case, arguments can be provided additionally.
.
.
.Opt_def -- html\-viewer\-tty
Choose a terminal program for viewing the output of
.I \%html\~mode .
.
It can be the path name of an executable file or a program in
.Env_var $PATH ;
arguments can be provided additionally.
d1099 1
a1099 1
.Opt_long default\-modes
d1102 2
a1103 3
Useful for restoring the
.I \%default\~mode
when a different mode was specified before.
d1109 1
a1109 1
.I \%dvi
d1113 1
a1113 1
.BR \%xdvi (1)
d1121 1
a1121 1
.B \%groffer
d1123 2
a1124 2
.BR \%groff (@@MAN1EXT@@)
would do.
d1127 1
a1127 1
.I \%groffer
d1138 1
a1138 1
.BR \%konqueror (1)
d1140 1
a1140 1
.BR \%mozilla (1).
d1142 1
a1142 1
.BR \%lynx (1).
d1148 1
a1148 1
.I \%PDF
d1152 3
a1154 5
By default, the input is formatted by
.B \%groff
using the Postscript device, then it is transformed into the PDF file
format using
.BR \%gs (1),
d1156 1
a1156 1
.BR \%xpdf (1)
d1158 1
a1158 1
.BR \%acroread (1)
d1165 1
a1165 2
mode is not suitable as a default device for the
.I \%auto\~mode .
d1173 1
a1173 1
.BR \%ghostview (@@MAN1EXT@@)
d1180 3
a1182 3
.I \%groff\~text\~mode
and write the result to standard output without a pager or viewer
program.
d1185 1
a1185 1
.I \%latin1
d1193 3
a1195 3
.I \%groff\~text\~mode
and write the result to standard output using a text pager program,
even when in \%\f[CR]X\~Window\f[].
d1201 1
a1201 1
.Opt_long_arg mode html .
d1205 2
a1206 4
.Header_CB x
Display the formatted input in a native
.I roff
viewer.
d1209 4
a1212 33
.BR \%gxditview (@@MAN1EXT@@)
program being distributed together with
.BR \%groff .
But the standard \%\f[CR]X\~Window\f[] tool
.BR \%xditview (1)
can also be chosen with the option
.Opt_long x\-viewer .
The default resolution is
.BR 75\~dpi ,
but
.B 100\~dpi
are also possible.
.
The default
.I groff
device
for the resolution of
.B 75\~dpi
is
.BR X75\-12 ,
for
.B 100\~dpi
it is
.BR X100 .
.
The corresponding
.I "groff intermediate output"
for the actual device is generated and the result is displayed.
.
For a resolution of
.BR 100\~dpi ,
the default width of the geometry of the display program is chosen to
.BR 850\~dpi .
d1216 1
a1216 1
.Header_CB X
d1218 1
a1218 1
.Opt_long_arg mode x .
d1223 1
a1223 1
.I \%groffer
d1232 1
a1232 1
.I \%groff
d1234 1
a1234 1
.IR \%groffer .
d1238 1
a1238 1
.I \%groff
d1240 1
a1240 1
.B \%ps
d1258 4
a1261 3
.Opt_def -- pdf\-viewer prog
Choose an \%\f[CR]X\~Window\f[] viewer program for
.IR \%pdf\~mode .
d1264 1
a1264 2
.Env_var $PATH ;
arguments can be provided additionally.
d1266 1
a1266 8
.
.Opt_def -- pdf\-viewer\-tty prog
Choose a terminal viewer program for
.IR \%pdf\~mode .
.
This can be a file name or a program to be searched in
.Env_var $PATH ;
arguments can be provided additionally.
d1274 4
a1277 3
.Opt_def -- ps\-viewer prog
Choose an \%\f[CR]X\~Window\f[] viewer program for
.IR \%ps\~mode .
d1283 2
a1284 2
.BR \%gv (1),
.BR \%ghostview (1),
d1286 1
a1286 1
.BR \%gs (1),
a1290 9
.Opt_def -- ps\-viewer\-tty prog
Choose a terminal viewer program for
.IR \%ps\~mode .
.
This can be a file name or a program to be searched in
.Env_var $PATH ;
arguments can be provided additionally.
.
.
d1301 4
a1304 20
.Opt_def -- tty\-viewer prog
Choose a text pager for mode
.IR tty .
The standard pager is
.BR less (1).
This option is eqivalent to
.I man
option
.Opt_long_arg pager prog .
The option argument can be a file name or a program to be searched in
.Env_var $PATH ;
arguments can be provided additionally.
.
.
.Opt_def -- tty\-viewer\-tty prog
This is equivalent to
.Opt_long tty\-viewer
because the programs for
.I tty
mode run on a terminal anyway.
d1309 2
a1310 1
.Opt_long_arg mode html .
d1312 10
d1323 1
a1323 3
.Opt_def -- www\-viewer prog
Equivalent to
.Opt_long html\-viewer .
d1326 1
a1326 1
.Opt_def -- www\-viewer\-tty prog
d1328 1
a1328 1
.Opt_long html\-viewer\-tty .
d1331 4
a1334 4
.Opt_def -- X -- x
Equivalent to
.Opt_long_arg mode x .
.
a1335 3
.Opt_def -- X\-viewer -- x\-viewer prog
Choose an \%\f[CR]X\~Window\f[] viewer program for
.IR \%x\~mode .
d1337 3
a1339 6
.BR \%gxditview (@@MAN1EXT@@)
which is the default and
.BR \%xditview (1).
The argument can be any executable file or a program in
.Env_var $PATH ;
arguments can be provided additionally.
d1341 2
d1344 1
a1344 6
.Opt_def -- X\-viewer\-tty -- x\-viewer\-tty prog
Choose a terminal viewer program for
.IR \%x\~mode .
The argument can be any executable file or a program in
.Env_var $PATH ;
arguments can be provided additionally.
d1351 1
a1351 1
.I \%filespec
d1357 3
a1359 3
.B \%groffer
accepts all short options that are valid for the
.BR \%groff (@@MAN1EXT@@)
d1362 2
a1363 4
All
.RB \%non- groffer
options are sent unmodified via
.B \%grog
d1365 1
a1365 1
.BR \%groff .
d1367 2
a1368 3
So postprocessors, macro packages, compatibility with
.I classical
.IR \%troff ,
d1377 1
a1377 42
Enable five debugging informations.
.
The temporary files are kept and not deleted, the name of the
temporary directory and the shell name for
.File_name groffer2.sh
are printed, the parameters are printed at several steps of
development, and a function stack is output with function
\f[CR]error_user()\f[] as well.
.
Neither the function call stack that is printed at each opening and
closing of a function call nor the landmark information that is
printed to determine how far the program is running are used.
.
This seems to be the most useful among all debugging options.
.
.
.Opt_def -- debug\-all
Enable all seven debugging informations including the function call
stack and the landmark information.
.
.
.Opt_def -- debug\-keep
Enable two debugging information, the printing of the name of the
temporary directory and the keeping of the temporary files.
.
.
.Opt_def -- debug\-lm
Enable one debugging information, the landmark information.
.
.
.Opt_def -- debug\-params
Enable one debugging information, the parameters at several steps.
.
.
.Opt_def -- debug\-shell
Enable one debugging information, the shell name for
.File_name groffer2.sh .
.
.
.Opt_def -- debug\-stacks
Enable one debugging information, the function call stack.
.
d1379 1
a1379 21
.Opt_def -- debug\-tmpdir
Enable one debugging information, the name of the temporary directory.
.
.
.Opt_def -- debug\-user
Enable one debugging information, the function stack with
\f[CR]error_user()\f[].
.
.
.Opt_def -- do-nothing
This is like
.Opt_long version ,
but without the output; no viewer is started.
.
This makes only sense in development.
.
.
.Opt_def -- print=text
Just print the argument to standard error.
.
This is good for parameter check.
d1383 1
a1383 3
Specify the shell under which the
.File_name \%groffer2.sh
script should be run.
d1385 5
a1389 9
This option overwrites the automatic shell determination of the
program.
.
If the argument
.I shell_program
is empty a former shell option and the automatic shell determination
is cancelled and the default shell is restored.
.
Some shells run considerably faster than the standard shell.
a1399 31
.Opt_def - V
This is an advanced option for debugging only.
.
Instead of displaying the formatted input, a lot of
.I \%groffer
specific information is printed to standard output:
.
.RS
.Topic
the output file name in the temporary directory,
.
.Topic
the display mode of the actual
.B \%groffer
run,
.
.Topic
the display program for viewing the output with its arguments,
.
.Topic
the active parameters from the config files, the arguments in
.Env_var $GROFFER_OPT ,
and the arguments of the command line,
.
.Topic
the pipeline that would be run by the
.B \%groff
program, but without executing it.
.RE
.
.
d1402 4
a1405 2
.B \%groff
option
d1407 1
a1407 1
and
d1416 1
a1416 1
.B \%groffer
d1418 1
a1418 1
.BR \%groff (@@MAN1EXT@@).
d1421 1
a1421 1
.B \%groff
d1423 1
a1423 1
.B \%groffer
d1429 4
a1432 2
.B \%groff
option
d1434 1
a1434 1
.B \%groffer
d1436 3
a1438 3
.I \%groff\~mode ;
the
.I \%groffer
d1442 1
a1442 1
.B \%groff
d1448 1
a1448 2
This generates an ascii approximation of output in the
.IR \%text\~modes .
d1451 1
a1451 2
sequences in
.IR "tty mode" .
d1456 1
a1456 1
.I \%file
d1458 1
a1458 1
.I \%groff
d1466 1
a1466 1
.I \%opt_or_arg
d1468 1
a1468 1
.B \%groff
d1475 1
a1475 1
.BR \%groff 's
d1480 3
a1482 3
.BR \%ascii ,
.BR \%utf8 ,
.BR \%latin1 ,
d1486 4
a1489 7
.B \%groffer
into a
.I \%text\~mode
using this device, to
.I \%mode\~tty
if the actual mode is not a
.IR \%text\~mode .
d1492 1
a1492 1
.I \%devname
d1494 1
a1494 1
.B \%groffer
d1497 2
a1498 2
.BR \%dvi ,
.BR \%html ,
d1500 1
a1500 1
.BR \%ps .
d1502 3
a1504 3
.B \%X*
arguments are mapped to
.IR \%mode\~x .
d1506 1
a1506 1
.I \%devname
d1508 1
a1508 1
.I \%mode\~groff
d1512 12
d1525 5
a1529 13
is equivalent to
.BR "groff \-X" .
It displays the
.I groff intermediate output
with
.BR gxditview .
As the quality is relatively bad this option is deprecated; use
.Opt_long X
instead because the
.I \%x\~mode
uses an
.IR X *
device for a better display.
d1534 5
a1538 5
.I \%groff\~mode
and format the input with the
.I \%groff intermediate output
without postprocessing; see
.BR \%groff_out (@@MAN5EXT@@).
d1542 1
a1542 1
.IR \%man ,
d1548 1
a1548 1
.B \%groff
d1550 1
a1550 1
.BR \%groffer ,
d1552 1
a1552 1
.B \%groff
d1556 1
a1556 1
.B \%groffer
d1558 1
a1558 1
.BR \%groff .
d1561 1
a1561 1
.BR \%groff (@@MAN1EXT@@).
d1563 1
a1563 1
.BR \%groffer ,
d1565 1
a1565 1
.B \%groff
d1570 1
a1570 1
.SS "Options for man\~pages"
d1573 9
a1581 10
.Opt_def -- apropos
Start the
.BR \%apropos (1)
command or facility of
.BR \%man (1)
for searching the
.I \%filespec
arguments within all
.I \%man\~page
descriptions.
d1583 31
a1613 34
Each
.I \%filespec
argument is taken for search as it is; section specific parts are not
handled, such that
.B 7 groff
searches for the two arguments
.B 7
and
.B groff
with a large result; for the
.I \%filespec
.B groff.7
nothing will be found.
.
The display differs from the
.B \%apropos
program by the following concepts:
.RS
.Topic
construct a
.I \%groff
frame to the output of
.BR \%apropos ,
.Topic
each
.I \%filespec
argument is searched on its own.
.Topic
the restriction by
.Opt_long sections
is handled as well,
.Topic
wildcard characters are allowed and handled without a further option.
.RE
d1616 3
a1618 6
.Opt_def -- apropos\-data
Show only the
.B \%apropos
descriptions for data documents, these are the
.BR \%man (7)
sections 4, 5, and 7.
a1619 1
Direct section declarations are ignored, wildcards are accepted.
d1621 3
a1624 6
.Opt_def -- apropos\-devel
Show only the
.B \%apropos
descriptions for development documents, these are the
.BR man (7)
sections 2, 3, and 9.
d1626 4
a1629 1
Direct section declarations are ignored, wildcards are accepted.
d1632 2
a1633 6
.Opt_def -- apropos\-progs
Show only the
.B \%apropos
descriptions for documents on programs, these are the
.BR \%man (7)
sections 1, 6, and 8.
a1634 1
Direct section declarations are ignored, wildcards are accepted.
d1636 3
a1639 23
.Opt_def -- whatis
For each
.I \%filespec
argument search all
.I \%man\~pages
and display their description \[em] or say that it is not a
.IR \%man\~page .
This differs from
.IR man 's
.B whatis
output by the following concepts
.RS
.Topic
each retrieved file name is added,
.Topic
local files are handled as well,
.Topic
the display is framed by a
.I groff
output format,
.Topic
wildcard characters are allowed without a further option.
.RE
d1641 2
d1644 1
a1644 6
.P
The following two options were added to
.B \%groffer
for choosing whether the file name arguments are interpreted as names
for local files or as a search pattern for
.IR \%man\~pages .
a1645 1
The default is looking up for local files.
d1647 3
a1650 12
.Opt_def -- man
Check the non-option command line arguments
.nh
.RI ( filespecs )
.hy
first on being
.IR \%man\~pages ,
then whether they represent an existing file.
.
By default, a
.I \%filespec
is first tested whether it is an existing file.
d1652 3
d1656 3
a1658 3
.Opt_def -- no-man -- local-file
Do not check for
.IR \%man\~pages .
a1659 4
.Opt_long local-file
is the corresponding
.B man
option.
d1661 2
d1664 2
a1665 4
.Opt_def -- no-special
Disable former calls of
.Opt_long all ,
.Opt_long apropos* ,
d1667 18
a1684 1
.Opt_long whatis .
d1688 1
a1688 1
.SS "Long options taken over from GNU man"
d1692 3
a1694 3
.B \%groffer
were synchronized with the long options of \f[CR]GNU\f[]
.BR man .
d1696 2
a1697 2
All long options of \f[CR]GNU\f[]
.B man
d1699 1
a1699 1
.BR \%groffer ,
d1704 25
d1730 1
a1730 1
.B man
d1732 1
a1732 1
.B \%groffer
d1737 2
a1738 2
The full set of long and short options of the \f[CR]GNU\f[]
.B man
d1742 3
a1744 3
.BR \%man (1)
if your system has \f[CR]GNU\f[]
.B man
d1749 2
a1750 3
In searching
.IR \%man\~pages ,
retrieve all suitable documents instead of only one.
d1754 1
a1754 8
In
.IR \%text\~modes ,
display ASCII translation of special characters for critical environment.
.
This is equivalent to
.BR "groff -mtty_char" ;
see
.BR groff_tmac (@@MAN5EXT@@).
d1759 1
a1759 1
.B \%groffer
d1764 2
a1765 4
Restrict
.I \%man\~page
search to file names that have
.I \%suffix
d1769 3
a1771 5
.I \%/usr/share/man/man3/terminfo.3ncurses.gz
the
.I \%man\~page
extension is
.IR \%ncurses .
d1776 1
a1776 2
Set the language for
.IR \%man\~pages .
d1792 1
a1792 1
.BR \%groffer .
d1796 2
a1797 3
Use the specified search path for retrieving
.I \%man\~pages
instead of the program defaults.
d1799 1
a1799 2
If the argument is set to the empty string "" the search for
.I \%man\~page
d1804 2
a1805 4
Set the pager program in
.IR \%tty\~mode ;
default is
.BR \%less .
d1807 1
a1807 1
.Opt_long tty\-viewer .
d1811 1
a1811 3
Restrict searching for
.I \%man\~pages
to the given
d1817 2
a1818 4
Search for
.I \%man\~pages
for the given operating systems; the argument
.I \%systems
d1822 5
a1831 14
.\" --------------------------------------------------------------------
.SS "X\~\%Window\~\%Toolkit Options"
.\" --------------------------------------------------------------------
.
The following long options were adapted from the corresponding
\%\f[CR]X\~\Window\~Toolkit\f[] options.
.
.B \%groffer
will pass them to the actual viewer program if it is an
\%\f[CR]X\~Window\f[] program.
.
Otherwise these options are ignored.
.
.
d1833 3
a1835 102
Unfortunately these options use the old style of a single minus for
long options.
.
For
.B \%groffer
that was changed to the standard with using a double minus for long
options, for example,
.B \%groffer
uses the option
.Opt_long font
for the \%\f[CR]X\~Window\f[] option
.Opt_short font .
.
.
.P
See
.BR \%X (1),
.BR \%X (7),
and the documentation on the \%\f[CR]X\~Window\~Toolkit\f[] options
for more details on these options and their arguments.
.
.
.Opt_def -- background color
Set the background color of the viewer window.
.
.
.Opt_def -- bd pixels
Specifies the color of the border surrounding the viewer window.
.
.
.Opt_def -- bg color
This is equivalent to
.Opt_long background .
.
.
.Opt_def -- bw pixels
Specifies the width in pixels of the border surrounding the viewer
window.
.
.
.Opt_def -- display X-display
Set the \%\f[CR]X\~Window\f[] display on which the viewer program
shall be started, see the \%\f[CR]X\~Window\f[] documentation for the
syntax of the argument.
.
.
.Opt_def -- foreground color
Set the foreground color of the viewer window.
.
.
.Opt_def -- fg color
This is equivalent to
.Opt_short foreground .
.
.
.Opt_def -- font font_name
Set the font used by the viewer window.
.
The argument is an \%\f[CR]X\~Window\f[] font name.
.
.
.Opt_def -- ft font_name
This is equivalent to
.Opt_long ft .
.
.
.Opt_def -- geometry size_pos
Set the geometry of the display window, that means its size and its
starting position.
.
See
.BR \%X (7)
for the syntax of the argument.
.
.
.Opt_def -- resolution value
Set \%\f[CR]X\~Window\f[] resolution in dpi (dots per inch) in some
viewer programs.
.
The only supported dpi values are
.B 75
and
.BR 100 .
.
Actually, the default resolution for
.B \%groffer
is set to
.BR 75\~dpi .
The resolution also sets the default device in
.IR "mode x" .
.
.
.Opt_def -- rv
Reverse foreground and background color of the viewer window.
.
.
.Opt_def -- title "'some text'"
Set the title for the viewer window.
.
.
.Opt_def -- xrm "'resource'"
Set \f[CR]\%X\~Window\f[] resource.
d1843 3
a1845 2
.I \%filespec
parameter is an argument that is not an option or option argument.
d1847 2
a1848 1
It means an input source.
d1850 3
a1852 5
In
.BR \%groffer ,
.I \%filespec
parameters are a file name or a template for searching
.IR \%man\~pages .
a1853 4
These input sources are collected and composed into a single output
file such as
.B \%groff
does.
d1855 6
d1862 3
a1864 5
.P
The strange \%\f[CR]POSIX\f[] behavior to regard all arguments behind
the first non-option argument as
.I \%filespec
arguments is ignored.
d1866 3
a1868 3
The \f[CR]GNU\f[] behavior to recognize options even when mixed with
.I \%filespec
arguments is used througout.
d1870 1
a1870 5
But, as usual, the double minus argument
.Opt_long
ends the option handling and interprets all following arguments as
.I \%filespec
arguments; so the \%\f[CR]POSIX\f[] behavior can be easily adopted.
d1874 2
a1875 3
For the following, it is necessary to know that on each system the
.I \%man\~pages
are sorted according to their content into several sections.
d1879 1
a1879 1
have a single-character name, either a digit from
d1890 4
a1893 2
stands for a
.IR "classical man section" .
d1895 3
a1897 5
.B \%man
for searching
.I \%man\~pages
with the same name within several sections goes according to the
classical single-character sequence.
d1903 2
a1904 3
.B \%groffer
.I \%man\~page
facility is based on the classical single character sections.
d1908 1
a1908 28
Each
.I \%filespec
parameter can have one of the following forms in decreasing sequence.
.
.
.Topic
No
.I \%filespec
parameters means that
.B \%groffer
waits for standard input.
.
The minus option
.Opt_short ""
stands for standard input, too; it can occur several times.
.
.
.Topic
Next a
.I \%filespec
is tested whether it is the path name of an existing file.
.
Otherwise it is assumed to be a searching pattern for a
.IR \%man\~page .
.
.
.Topic
.BI \%man: name ( section )
d1910 5
a1914 5
.IB \%name ( section )
search the \%man\~page
.I \%name
in \%man\~section\~\c
.IR \%section ,
d1916 1
a1916 1
.I \%section
d1918 1
a1918 1
.I \%man
d1922 1
a1922 1
.Topic
d1925 1
a1925 1
are checked.
d1927 1
a1927 1
.BI \%man: name . s
d1929 4
a1932 4
.IB \%name . s
search for a \%man\~page
.I \%name
in \%man\~section
d1940 5
a1944 6
Otherwise a
.I \%man\~page
named
.IR \%name.s
is searched in the lowest
.B man\~section .
d1947 1
a1947 1
.Topic
d1949 4
a1952 7
.BI \%man: name
searches for a
.I \%man\~page
in the lowest
.I \%man\~section
that has a document called
.IR \%name .
d1955 1
a1955 1
.Topic
d1957 1
a1957 1
.I \%s\~name
d1959 1
a1959 1
.B man
d1966 2
a1967 4
interpret it as a search for a
.I \%man\~page
called
.I \%name
d1970 1
a1970 1
otherwise interpret both
d1972 5
a1976 5
and
.I \%name
as two independent
.I \%filespec
arguments.
d1979 1
a1979 1
.Topic
d1981 1
a1981 1
.I \%name
d1984 3
a1986 17
So this searches for the
.I \%man\~page
called
.I \%name
in the lowest
.I \%man\~section
that has a document for this name.
.
.
.P
Wildcards in
.I \%filespec
arguments are only accepted for
.Opt_long apropos*
and
.Opt_long whatis ;
for normal display, they are interpreted as characters.
d1993 1
a1993 1
.B \%groff
d2000 1
a2000 1
.I \%groff
d2009 1
a2009 1
.B \%groffer
d2011 1
a2011 1
.B \%groff
d2016 1
a2016 1
.B \%groffer
d2018 1
a2018 1
.IR \%mode .
d2021 1
a2021 1
.B \%groffer
d2033 1
a2033 1
.Opt_long \fIanymode\fR\-viewer .
d2037 1
a2037 3
Several different modes are offered, graphical modes for
\f[CR]\%X\~Window\f[],
.IR \%text\~modes ,
d2039 2
a2040 2
.I \%groff\~modes
for debugging and development.
d2045 1
a2045 1
.B \%groffer
d2047 6
a2052 5
.I \%x\~mode
is possible, then
.IR \%ps\~mode ,
and finally
.IR \%tty\~mode .
d2055 3
a2057 3
.I \%auto\~mode
can be changed by specifying a comma separated list of modes with the
option
d2062 2
a2063 3
The searching for
.I \%man\~pages
and the decompression of the input are active in every mode.
d2070 2
a2071 3
The graphical display modes work mostly in the \%\f[CR]X\~Window\f[]
environment (or similar implementations within other windowing
environments).
d2077 1
a2077 1
are used for specifying the \%\f[CR]X\~Window\f[] display to be used.
d2079 3
a2081 4
If this environment variable is empty
.B \%groffer
assumes that no \%\f[CR]X\~Window\f[] is running and changes to a
.IR \%text\~mode .
d2088 2
a2089 2
Known viewers for the graphical display modes and their standard
\%\f[CR]X\~Window\f[] viewer progams are
d2092 5
a2096 4
\%\f[CR]X\~Window\f[]
.I roff
viewers such as
.BR \%gxditview (@@MAN1EXT@@)
d2098 2
a2099 3
.BR \%xditview (1)
(in
.IR \%x\~mode ),
d2103 2
a2104 3
.nh
.RI ( \%ps\~mode ),
.hy
d2108 2
a2109 3
.nh
.RI ( \%dvi\~mode ),
.hy
d2113 2
a2114 3
.nh
.RI ( \%pdf\~mode ),
.hy
a2117 1
.nh
d2120 2
a2121 2
.IR \%www\~mode ).
.hy
d2127 3
a2129 3
.I \%pdf\~mode
has a major advantage \[em] it is the only graphical diplay mode that
allows to search for text within the viewer; this can be a really
d2137 2
a2138 2
These graphical viewers can be customized by options of the
\%\f[CR]X\~Window\~Toolkit\f[].
d2141 1
a2141 1
.B \%groffer
d2143 1
a2143 1
the \%\f[CR]X\~Window\~Toolkit\f[].
d2147 1
a2147 1
.SS "Text modes"
d2150 4
a2153 4
There are two modes for text output,
.I \%mode\~text
for plain output without a pager and
.I \%mode\~tty
d2159 4
a2162 5
.Env_var \%$DISPLAY
is not set or empty,
.B \%groffer
assumes that it should use
.IR \%tty\~\%mode .
d2166 3
a2168 6
In the actual implementation, the
.I groff
output device
.I \%latin1
is chosen for
.IR \%text\~modes .
d2180 1
a2180 1
.Opt_long tty\-viewer ,
d2184 1
a2184 1
.BR \%less (1)
d2196 1
a2196 1
.I \%groffer
d2200 1
a2200 1
.B \%groff
d2202 1
a2202 1
.I \%groffer
d2211 2
a2212 6
.I \%source\~mode
with option
.Opt_short Q
and
.Opt_long source
just displays the decompressed input.
a2213 2
.
.P
d2215 3
a2217 3
.I \%groff\~mode
passes the input to
.B \%groff
d2219 1
a2219 1
.BR \%groffer .
d2227 2
a2228 2
.IR \%groff\~\%mode ,
the option
a2230 1
.nh
a2232 1
.hy
d2235 1
a2235 1
.BR \%groff_out (@@MAN5EXT@@)
d2241 1
a2241 1
.B \%groff
d2243 1
a2243 1
.BR \%groffer .
d2250 3
a2252 6
The default behavior of
.B \%groffer
is to first test whether a file parameter represents a local file; if
it is not an existing file name, it is assumed to represent a name of
a
.IR \%man\~page .
d2259 2
a2260 4
forces to interpret all file parameters as
.I \%filespecs
for searching
.IR \%man\~pages .
d2266 1
a2266 3
disable the
.I man
searching; so only local files are displayed.
d2270 3
a2272 4
If neither a local file nor a
.I \%man\~page
was retrieved for some file parameter a warning is issued on standard
error, but processing is continued.
d2276 1
a2276 4
The
.B \%groffer
program provides a search facility for
.IR \%man\~pages .
d2279 2
a2280 2
functionality of the \f[CR]GNU\f[]
.BR \%man (1)
d2283 3
a2285 6
This inludes the extended file names of
.IR \%man\~pages ,
for example, the
.I \%man\~page
of
.B \%groff
d2291 1
a2291 1
.I \%man7
d2295 1
a2295 1
.I \%.gz
d2302 2
a2303 7
(preformatted
.IR \%man\~pages )
are intentionally excluded from the search because
.B \%groffer
is a
.I roff
program that wants to format by its own.
d2306 1
a2306 3
preformatted
.I \%man\~pages
aren't necessary any longer.
d2310 1
a2310 3
The algorithm for retrieving
\I \%man\~pages
uses five search methods.
d2318 1
a2318 3
An empty argument disables the
.I \%man\~page
searching.
d2338 1
a2338 2
is searched for
.IR \%man\~pages .
d2343 2
a2344 4
.BR \%manpath (1)
program for determining a path of
.I man
directories is tried.
d2349 2
a2350 5
system specific
.I \%man\~pages
are added to the
.IR man\~path ;
their sequence is determined automatically.
d2353 1
a2353 1
.File_name /usr/share/man/linux/fr
d2355 2
a2356 4
.File_name /usr/share/man/fr/linux
for french linux
.I \%man\~pages
are found.
d2363 2
a2364 3
The locale (language) is determined like in \f[CR]GNU\f[]
.BR man ,
that is from highest to lowest precedence:
d2385 2
a2386 2
The language locale is usually specified in the
\%\f[CR]POSIX\~1003.1\f[] based format:
a2387 1
.nh
a2389 1
.hy
a2391 1
.nh
a2392 1
.hy
d2397 4
a2400 5
If no
.I \%man\~pages
for a complicated locale are found the country part consisting of the
first two characters (without the `\f[CB]_\f[]', `\f[CB].\f[]', and
`\f[CB],\f[]' parts) of the locale is searched as well.
d2404 2
a2405 3
If still not found the corresponding
.I \%man\~page
in the default language is used instead.
d2408 1
a2408 1
\f[CR]\%POSIX\f[].
d2410 1
a2410 3
The
.I \%man\~pages
in the default language are usually in English.
d2438 2
a2439 5
When searching for
.I \%man\~pages
this
.I man\~path
with the additional language and system specific directories is used.
d2446 2
a2447 4
A single section can be specified within each
.I \%filespec
argument, several sections as a colon-separated list in command line
option
d2453 1
a2453 3
until a suitable
.I \%man\~page
was found.
d2468 2
a2469 4
For further details on
.I \%man\~page
searching, see
.BR \%man (1).
d2480 1
a2480 1
.BR \%gzip (1)
d2482 1
a2482 1
.BR \%bzip2 (1)
d2485 3
a2487 3
This includes the \f[CR]GNU\f[]
.BR \%.gz ,
.BR \%.bz2 ,
d2489 1
a2489 1
.B \%.Z
d2500 2
a2501 4
The
.B \%groffer
program supports many system variables, most of them by courtesy of
other programs.
d2504 3
a2506 3
.BR \%groff (@@MAN1EXT@@)
and \f[CR]GNU\f[]
.BR \%man (1)
d2516 1
a2516 2
Store options for a run of
.BR \%groffer .
a2524 4
Do not forget to export this variable, otherwise it does not exist
during the run of
.BR groffer .
.
d2530 2
a2531 4
The
.B \%groffer
program is a shell script that is run through
.File_name /bin/sh ,
d2533 1
a2533 1
.BR \%bash (1).
d2536 1
a2536 2
The following variables have a special meaning for
.BR \%groffer .
d2541 2
a2542 2
If this variable is set this indicates that the \%\f[CR]X\~Window\f[]
system is running.
d2548 4
a2551 7
be used to start the graphical
.B \%groffer
on a remote \%\f[CR]X\~Window\f[] terminal.
.
For example, depending on your system,
.B \%groffer
can be started on the second monitor by the command
d2563 1
a2563 2
retrieving
\IR \%man\~pages .
a2565 1
.nh
a2572 1
.hy
d2574 1
a2574 1
.I \%language
d2576 1
a2576 1
.I \%territory
d2578 1
a2578 1
.I \%codeset
d2581 1
a2581 1
.BR \%setlocale (3).
d2583 6
a2588 4
The locale values \f[CR]C\f[] and \%\f[CR]POSIX\f[]
stand for the default, i.e. the
.I \%man\~page
directories without a language prefix.
d2599 1
a2599 1
.BR \%cat (1)
d2606 2
a2607 3
All programs within the
.B \%groffer
shell script are called without a fixed path.
d2610 10
a2619 2
within the run of
.BR \%groffer .
d2626 4
a2629 9
The
.B \%groffer
program internally calls
.BR \%groff ,
so all environment variables documented in
.BR \%groff (@@MAN1EXT@@)
are internally used within
.B \%groffer
as well.
d2631 1
a2631 3
The following variable has a direct meaning for the
.B \%groffer
program.
d2636 1
a2636 4
.B \%groffer
uses it for storing its temporary files, just as
.B groff
does.
d2643 5
a2647 11
Parts of the functionality of the
.B man
program were implemented in
.BR \%groffer ;
support for all environment variables documented in
.BR \%man (1)
was added to
.BR \%groffer ,
but the meaning was slightly modified due to the different approach in
.BR \%groffer ;
but the user interface is the same.
d2649 2
a2650 3
The
.B man
environment variables can be overwritten by options provided with
d2657 1
a2657 3
Restrict the search for
.I \%man\~pages
to files having this extension.
d2667 3
a2669 4
.BR \%man (1).
As not all of these are relevant for
.B \%groffer
only the essential parts of its value are extracted.
d2672 1
a2672 2
other environment variables that are specific to
.IR man .
d2680 1
a2680 2
If set, this variable contains the directories in which the
.I \%man\~page
d2690 1
a2690 2
.I \%man\~pages
is restricted to those manual sections in that order.
d2699 1
a2699 3
as
.I \%man\~page
trees for different operating systems.
d2709 2
a2710 3
is ignored by
.B \%groffer
because the necessary preprocessors are determined automatically.
d2718 1
a2718 1
.B \%groffer
d2721 4
d2728 1
a2728 2
System-wide configuration file for
.BR \%groffer .
d2733 1
a2733 3
User-specific configuration file for
.BR \%groffer ,
where
d2737 2
a2738 14
This file is called after the system-wide configuration file to enable
overriding by the user.
.
.
.P
The precedence of option delivery is given in the following.
.
The configuration file in
.File_name /etc
has the lowest precedence; it is overwritten by the configuration file
in the home directory; both configuration files are overwritten by the
environment variable
.Env_var $GROFFER_OPT ;
everything is overwritten by the command line.
d2742 1
a2742 6
In the configuration files, arbitrary spaces are allowed at the
beginning of each line, they are just ignored.
.
Apart from that, the lines of the configuration lines either start
with a minus character, all other lines are interpreted as shell
commands.
d2744 1
d2746 2
a2747 4
.P
The lines with the beginning minus are interpreted as
.B groffer
options.
d2750 3
a2752 16
.B \%groffer
options that should be used with any call of
.BR \%groffer .
.
Each line can represent a single short option, a short option cluster,
or a long option with two minus signs, eventually with an argument.
.
The argument can be appended either after a space character or an
equal sign
.RB ` = '.
The argument can be surrounded by quotes, but this is not necessary.
.
The options from these lines are collected and prepended to the
existing value of
.Env_var $GROFFER_OPT
at the end of each configuration file.
d2756 3
a2758 3
After the transformation of the minus lines, the configuration files
have been transferred into a shell script that is called within
.B \%groffer
d2760 3
a2762 3
.CB \.\~\c
.IR \%filename '
shell syntax.
d2770 2
a2771 6
Preset command line options, such as choosing a
.I \%mode
or a viewer.
.
These are written into lines starting with a single or double minus
sign, followed by the option name.
d2774 1
a2774 3
Preset environment variables recognized by
.BR \%groffer ;
but do not forget to export them.
d2777 3
a2779 4
You can also write a shell function for calling, for example a viewer
program for some
.IR \%mode .
Such a function can be fed into a corresponding
d2783 4
a2786 6
.Topic
Enter
.Opt_long shell
to specify a shell for the run of
.File_name groffer2.sh .
Some shells run much faster than the standard shell.
d2791 1
a2791 2
.File_name ~/.groff/groffer.conf ,
say.
d2800 3
a2802 4
\-\-shell=ksh
\-\-foreground=DarkBlue
\-\-resolution=100
\-\-x\-viewer='gxditview \-geometry 900x1200'
d2806 1
a2806 1
  export DISPLAY='localhost:0.0'
d2815 3
a2817 8
The lines starting with
.B #
are command lines.
.
This configuration sets four
.B \%groffer
options (the lines starting with `\-') and runs two shell commands (the
rest of the script).
d2823 4
a2826 13
Use
.B ksh
as the shell to run the
.B \%groffer
script; if it works it should be faster than the usual
.BR sh .
.
.
.Topic
Use a text color of
.B \%DarkBlue
in all viewers that support this, such as
.BR \%gxditview .
d2831 4
a2834 8
.B 100\~dpi
in all viewers that support this, such as
.BR \%gxditview .
.
By this, the default device in
.I x mode
is set to
.BR X100 .
d2839 4
a2842 5
.BR \%gxditview (@@MAN1EXT@@)
as the
.I \%x-mode
viewer using the geometry option for setting the width to
.B 900\~dpi
d2844 2
a2845 3
.BR 1200\~dpi .
This geometry is suitable for a resolution of
.BR 100\~dpi .
d2849 1
a2849 1
If the environment variable
d2851 6
a2856 7
is empty set it to
.IR localhost:0.0 .
.
That allows to start
.B \%groffer
in the standard \%\f[CR]X\~Window\f[] display, even when the program
is called from a text console.
d2861 1
a2861 1
.B \%groffer
d2863 1
a2863 1
.File_name mygroffer.log
d2871 6
a2876 10
The usage of
.B \%groffer
is very easy.
.
Usually, it is just called with a file name or
.IR \%man\~page .
.
The following examples, however, show that
.B \%groffer
has much more fancy capabilities.
d2882 1
a2882 1
.File_name meintro.ms.gz
d2884 6
a2889 6
.File_name /usr/local/share/doc/groff ,
using the standard viewer
.B \%gxditview
as graphical viewer when in \%\f[CR]X\~Window\f[], or the
.BR \%less (1)
pager program when not in \%\f[CR]X\~Window\f[].
d2895 1
a2895 1
.File_name \%./groff
d2898 3
a2900 7
Otherwise interpret the argument as a search for the
.I \%man\~page
named
.B \%groff
in the smallest possible
.IR \%man\~section ,
being section 1 in this case.
d2905 2
a2906 4
search for the
.I \%man\~page
of
.B \%groff
d2908 1
a2908 1
.File_name ./groff
d2916 3
a2918 6
search the
.I \%man\~page
of
.B \%groff
in
.I \%man\~section
d2927 3
a2929 5
.File_name ./fb.modes
does not exist interpret this as a search for the
.I \%man\~page
of
.BR fb.modes .
d2931 1
a2931 1
.I \%modes
d2934 1
a2934 1
.BR fb .
d2941 4
a2944 5
following
.IR \%man\~pages :
.B \%groff
(automatic search, should be found in \fIman\fP\~section\~1),
.B \%troff
d2947 1
a2947 1
.B \%roff
a2950 1
.nh
a2951 1
.hy
d2963 1
a2963 1
.Shell_cmd "LANG=de\~groffer\~--man\~--www\~--www-viever=galeon\~ls"
d2965 1
a2965 3
Retrieve the German
.I \%man\~page
(language
d2970 1
a2970 1
.I \%html
d2972 3
a2974 5
.nh
.RI ( \%www\~mode )
.hy
and view the result in the web browser
.BR \%galeon .
d2977 2
a2978 4
guarantees that the
.I \%man\~page
is retrieved, even when a local file
.File_name \%ls
d2985 4
a2988 6
Get the
.I \%man\~page
called
.I \%roff
in \fIman\fP\~section 7, decompress it, and print its unformatted
content, its source code.
d2995 2
a2996 4
.I \%groff intermediate output mode
without post-processing
.RB ( groff
option
d2999 2
a3000 3
.I \%foo
.RB ( groff
option
d3018 13
a3030 2
.B \%groffer
program consists of two shell scripts.
d3034 2
a3035 5
The starting script is the file
.File_name \%groffer
that is installed in a
.File_name bin
directory.
d3037 3
a3039 2
It is generated from the source file
.File_name \%groffer.sh .
d3041 2
a3042 2
It is just a short starting script without any functions such that it
can run on very poor shells.
d3046 3
a3048 12
The main part of the
.B \%groffer
program is the file
.File_name groffer2.sh
that is installed in the
.I groff
library directory.
.
This script can be run under a different shell by using the
.B \%groffer
option
.Opt_long shell .
d3052 7
a3058 2
Both scripts are compatible with both
\f[CR]GNU\f[] and \%\f[CR]POSIX\f[].
d3060 3
a3062 6
\%\f[CR]POSIX\f[] compatibility refers to
\%\f[CR]IEEE\~P1003.2/D11.2\f[] of September 1991, a very early
version of the \%\f[CR]POSIX\f[] standard that is still freely
available in the internet at
.URL http://\:www.funet.fi/\:pub/\:doc/\:posix/\:p1003.2/\:d11.2/\:all \
"\%POSIX\~P1003.2\~draft\~11.2" .
d3066 7
a3072 3
Only a restricted set of shell language elements and shell builtins is
used to achieve even compatibility with some Bourne shells that are
not fully \%\f[CR]POSIX\f[] compatible.
d3074 4
a3077 14
The
.B \%groffer
shell scripts were tested on many shells, including the following
Bourne shells:
.BR \%ash (1),
.BR \%bash (1),
.BR \%dash (1),
.BR \%ksh (1),
.BR \%pdksh (1),
.BR \%posh (1),
and
.BR \%zsh (1).
So it should work on most actual free and commercial operating
systems.
d3079 1
a3079 11
.
.P
The shell for the run of
.File_name groffer2.sh
can be chosen by the option
.Opt_long shell
on the command line or the environment variable
.Env_var $GROFF_OPT .
If you want to add it to one of the
.B \%groffer
configuration files you must write a line starting with
d3084 6
a3089 9
The
.B \%groffer
program provides its own parser for command line arguments that is
compatible to both \%\f[CR]POSIX\f[]
.BR \%getopts (1)
and \%\f[CR]GNU\f[]
.BR \%getopt (1).
It can handle option arguments and file names containing white space
and a large set of special characters.
d3095 3
a3097 9
The option consisiting of a single minus
.Opt_short
refers to standard input.
.
.
.Topic
A single minus followed by characters refers to a single character
option or a combination thereof; for example, the
.B \%groffer
d3106 1
a3106 1
are always preceded by a double minus.
d3119 1
a3119 4
interpreted as
.I \%filespec
parameters, i.e. file names or constructs for searching
.IR \%man\~pages ).
d3123 3
a3125 4
All command line arguments that are neither options nor option
arguments are interpreted as
.I \%filespec
parameters and stored until option parsing has finished.
d3129 1
a3129 1
is equivalent to
d3134 7
a3140 3
The free mixing of options and
.I \%filespec
parameters follows the GNU principle.
d3142 7
a3148 7
That does not fulfill the strange option behavior of \%\f[CR]POSIX\f[]
that ends option processing as soon as the first non-option argument
has been reached.
.
The end of option processing can be forced by the option
.RB ` \-\- '
anyway.
d3152 1
a3152 1
.SH "BUGS"
d3155 7
a3161 2
Report bugs to the
.MTO bug-groff@@gnu.org "bug-groff mailing list" .
a3162 4
Include a complete, self-contained example that will allow the bug to
be reproduced, and say which version of
.B \%groffer
you are using.
d3164 3
d3168 4
a3171 4
.P
You can also use the
.MTO groff@@gnu.org "groff mailing list" ,
but you must first subscribe to this list.
a3172 3
You can do that by visiting the
.URL http://\:lists.gnu.org/\:mailman/\:listinfo/\:groff \
"groff mailing list web page" .
d3174 7
a3181 4
.P
See
.BR \%groff (@@MAN1EXT@@)
for information on availability.
d3183 7
a3190 3
.\" --------------------------------------------------------------------
.SH "SEE ALSO"
.\" --------------------------------------------------------------------
d3192 9
a3200 9
.P
.BR \%groff (@@MAN1EXT@@),
.BR \%@@g@@troff (@@MAN1EXT@@)
.RS
Details on the options and environment variables available in
.BR \%groff ;
all of them can be used with
.BR \%groffer .
.RE
d3204 4
a3207 4
.BR \%groff (@@MAN7EXT@@)
Documentation of the
.I \%groff
language.
d3211 6
a3216 6
.BR \%grog (@@MAN1EXT@@)
Internally,
.B \%groffer
tries to guess the
.B \%groff
command line options from the input using this program.
d3220 4
a3223 7
.BR groff_out (@@MAN5EXT@@)
Documentation on the
.I \%groff intermediate output
.nh
.RI ( ditroff
output).
.hy
d3227 4
a3230 4
.BR groff_tmac (@@MAN5EXT@@)
Documentation on the
.I \%groff
macro files.
d3234 4
a3237 3
.BR \%man (1)
The standard program to display
.IR \%man\~pages .
a3238 7
The information there is only useful if it is the
.I \%man\~page
for GNU
.BR man .
Then it documents the options and environment variables that are
supported by
.BR \%groffer .
d3240 4
a3244 13
.P
.BR \%ash (1),
.BR \%bash (1),
.BR \%dash (1),
.BR \%ksh (1),
.BR \%pdksh (1),
.BR \%posh (1),
.BR \%sh (1),
.BR \%zsh (1)
.RS
Bourne shells that were tested with
.BR \%groffer .
.RE
d3246 3
a3249 8
.P
.BR \%gxditview (@@MAN1EXT@@),
.BR \%xditview (1x)
.RS
Viewers for
.BR \%groffer 's
.IR \%x\~mode .
.RE
d3251 3
d3255 1
a3255 12
.P
.BR \%kghostview (1),
.BR \%ggv (1),
.BR \%gv (1),
.BR \%ghostview (1),
.BR \%gs (1)
.RS
Viewers for
.BR \%groffer 's
.IR \%ps\~mode .
.RE
.
d3258 2
a3259 10
.BR \%kghostview (1),
.BR \%ggv (1),
.BR \%xpdf (1),
.BR \%acroread (1),
.BR \%kpdf (1)
.RS
Viewers for
.BR \%groffer 's
.IR \%pdf\~mode .
.RE
d3261 3
d3266 3
a3268 28
.BR \%kdvi (1),
.BR \%xdvi (1),
.BR \%dvilx (1)
.RS
Viewers for
.BR \%groffer 's
.IR \%dvi\~mode .
.RE
.
.
.P
.BR \%konqueror (1),
.BR \%mozilla (1),
.BR \%lynx (1)
.RS
Web-browsers for
.BR \%groffer 's
.I \%html
or
.IR \%www\~mode .
.RE
.
.
.TP
.BR \%less (1)
Standard pager program for the
.I \%tty\~mode .
.
d3270 1
a3270 7
.P
.BR \%gzip (1),
.BR \%bzip2 (1)
.RS
The decompression programs supported by
.BR \%groffer .
.RE
d3273 1
a3273 13
.\" --------------------------------------------------------------------
.SH "AUTHOR"
.\" --------------------------------------------------------------------
.author
.
.
.\" --------------------------------------------------------------------
.SH "COPYING"
.\" --------------------------------------------------------------------
.copyleft
.
.
.\" --------------------------------------------------------------------
@


