Index:
[(1)addftinfo(1)
addr2line(1)
afmtodit(1)
alias(1)
alloc(1)
apply(1)
apropos(1)
ar(1)
as(1)
asa(1)
at(1)
atq(1)
atrm(1)
awk(1)
b64decode(1)
b64encode(1)
basename(1)
batch(1)
bc(1)
bdes(1)
bg(1)
biff(1)
bind(1)
bindkey(1)
brandelf(1)
break(1)
breaksw(1)
bsdtar(1)
bsnmpd(1)
bthost(1)
btsockstat(1)
builtin(1)
builtins(1)
bunzip2(1)
byacc(1)
bzcat(1)
bzegrep(1)
bzfgrep(1)
bzgrep(1)
bzip2(1)
c++(1)
c89(1)
c99(1)
cal(1)
calendar(1)
cap_mkdb(1)
case(1)
cat(1)
catman(1)
cc(1)
cd(1)
cdcontrol(1)
chdir(1)
checknr(1)
chflags(1)
chfn(1)
chgrp(1)
chio(1)
chkey(1)
chmod(1)
chpass(1)
chsh(1)
ci(1)
ckdist(1)
cksum(1)
clear(1)
cmp(1)
co(1)
col(1)
colcrt(1)
colldef(1)
colrm(1)
column(1)
comm(1)
command(1)
compile_et(1)
complete(1)
compress(1)
continue(1)
cp(1)
cpio(1)
cpp(1)
crontab(1)
crunchgen(1)
crunchide(1)
crypt(1)
csh(1)
csplit(1)
ctags(1)
ctm(1)
ctm_dequeue(1)
ctm_rmail(1)
ctm_smail(1)
cu(1)
cursor(1)
cut(1)
cvs(1)
date(1)
dc(1)
dd(1)
default(1)
df(1)
dialog(1)
diff(1)
diff3(1)
dig(1)
dirname(1)
dirs(1)
do(1)
domainname(1)
done(1)
dtmfdecode(1)
du(1)
echo(1)
echotc(1)
ed(1)
edit(1)
ee(1)
egrep(1)
elfdump(1)
elif(1)
else(1)
end(1)
endif(1)
endsw(1)
enigma(1)
env(1)
eqn(1)
esac(1)
eval(1)
ex(1)
exec(1)
exit(1)
expand(1)
export(1)
expr(1)
f77(1)
false(1)
fc(1)
fdformat(1)
fdread(1)
fdwrite(1)
fetch(1)
fg(1)
fgrep(1)
fi(1)
file(1)
file2c(1)
filetest(1)
find(1)
finger(1)
flex++(1)
flex(1)
fmt(1)
fold(1)
fontedit(1)
for(1)
foreach(1)
from(1)
fstat(1)
fsync(1)
ftp(1)
g++(1)
g711conv(1)
gate-ftp(1)
gcc(1)
gcore(1)
gcov(1)
gdb(1)
gencat(1)
gensnmptree(1)
getNAME(1)
getconf(1)
getfacl(1)
getopt(1)
getopts(1)
glob(1)
goto(1)
gperf(1)
gprof(1)
grep(1)
grn(1)
grodvi(1)
groff(1)
grog(1)
grolbp(1)
grolj4(1)
grops(1)
grotty(1)
groups(1)
gtar(1)
gunzip(1)
gzcat(1)
gzexe(1)
gzip(1)
hash(1)
hashstat(1)
hd(1)
head(1)
hesinfo(1)
hexdump(1)
history(1)
host(1)
hostname(1)
hpftodit(1)
hup(1)
id(1)
ident(1)
idprio(1)
if(1)
indent(1)
indxbib(1)
info(1)
install-info(1)
install(1)
intro(1)
introduction(1)
ipcrm(1)
ipcs(1)
ipftest(1)
ipnat(1)
ipresend(1)
ipsend(1)
iptest(1)
jobid(1)
jobs(1)
join(1)
jot(1)
kbdcontrol(1)
kbdmap(1)
kcon(1)
kdestroy(1)
kdump(1)
kenv(1)
keylogin(1)
keylogout(1)
kgdb(1)
kill(1)
killall(1)
kinit(1)
klist(1)
kpasswd(1)
krb5-config(1)
ktrace(1)
lam(1)
last(1)
lastcomm(1)
ld-elf.so.1(1)
ld(1)
ld(1)
ldd(1)
leave(1)
less(1)
lesskey(1)
lex++(1)
lex(1)
limit(1)
limits(1)
link(1)
lint(1)
lkbib(1)
ln(1)
loadfont(1)
locale(1)
locate(1)
lock(1)
lockf(1)
log(1)
logger(1)
login(1)
logins(1)
logname(1)
logout(1)
look(1)
lookbib(1)
lorder(1)
lp(1)
lpq(1)
lpr(1)
lprm(1)
lptest(1)
ls-F(1)
ls(1)
lsvfs(1)
m4(1)
mail(1)
mailq(1)
mailx(1)
make(1)
makeinfo(1)
makewhatis(1)
man(1)
manpath(1)
md5(1)
merge(1)
mesg(1)
minigzip(1)
mkdep(1)
mkdir(1)
mkfifo(1)
mklocale(1)
mkstr(1)
mktemp(1)
mmroff(1)
more(1)
mptable(1)
msgs(1)
mt(1)
mv(1)
nawk(1)
nc(1)
ncal(1)
ncplist(1)
ncplogin(1)
ncplogout(1)
neqn(1)
netstat(1)
newaliases(1)
newgrp(1)
nex(1)
nfsstat(1)
nice(1)
nl(1)
nm(1)
nohup(1)
notify(1)
nroff(1)
nslookup(1)
nvi(1)
nview(1)
objcopy(1)
objdump(1)
objformat(1)
od(1)
omshell(1)
onintr(1)
opieinfo(1)
opiekey(1)
opiepasswd(1)
otp-md4(1)
otp-md5(1)
otp-sha(1)
pagesize(1)
passwd(1)
paste(1)
patch(1)
pathchk(1)
pawd(1)
pax(1)
pfbtops(1)
pftp(1)
pgrep(1)
pic(1)
pkg_add(1)
pkg_check(1)
pkg_create(1)
pkg_delete(1)
pkg_info(1)
pkg_sign(1)
pkg_version(1)
pkill(1)
popd(1)
pr(1)
printenv(1)
printf(1)
ps(1)
psroff(1)
pushd(1)
pwd(1)
quota(1)
ranlib(1)
rcp(1)
rcs(1)
rcsclean(1)
rcsdiff(1)
rcsfreeze(1)
rcsintro(1)
rcsmerge(1)
read(1)
readelf(1)
readlink(1)
readonly(1)
realpath(1)
red(1)
ree(1)
refer(1)
rehash(1)
repeat(1)
reset(1)
rev(1)
rfcomm_sppd(1)
rlog(1)
rlogin(1)
rm(1)
rmd160(1)
rmdir(1)
rpcgen(1)
rs(1)
rsh(1)
rtld(1)
rtprio(1)
rup(1)
ruptime(1)
rusers(1)
rwall(1)
rwho(1)
sched(1)
scon(1)
scp(1)
script(1)
sdiff(1)
sed(1)
send-pr(1)
sendbug(1)
set(1)
setenv(1)
setfacl(1)
settc(1)
setty(1)
setvar(1)
sftp(1)
sh(1)
sha1(1)
shar(1)
shift(1)
size(1)
sleep(1)
slogin(1)
smbutil(1)
sockstat(1)
soelim(1)
sort(1)
source(1)
split(1)
sscop(1)
ssh-add(1)
ssh-agent(1)
ssh-keygen(1)
ssh-keyscan(1)
ssh(1)
startslip(1)
stat(1)
stop(1)
strings(1)
strip(1)
stty(1)
su(1)
sum(1)
suspend(1)
switch(1)
systat(1)
tabs(1)
tail(1)
talk(1)
tar(1)
tbl(1)
tcopy(1)
tcpdump(1)
tcpslice(1)
tcsh(1)
tee(1)
telltc(1)
telnet(1)
test(1)
texindex(1)
tfmtodit(1)
tftp(1)
then(1)
time(1)
tip(1)
top(1)
touch(1)
tput(1)
tr(1)
trace(1)
trap(1)
troff(1)
true(1)
truncate(1)
truss(1)
tset(1)
tsort(1)
tty(1)
type(1)
ul(1)
ulimit(1)
umask(1)
unalias(1)
uname(1)
uncomplete(1)
uncompress(1)
unexpand(1)
unhash(1)
unifdef(1)
unifdefall(1)
uniq(1)
units(1)
unlimit(1)
unlink(1)
unset(1)
unsetenv(1)
until(1)
unvis(1)
uptime(1)
usbhidaction(1)
usbhidctl(1)
users(1)
uudecode(1)
uuencode(1)
uuidgen(1)
vacation(1)
vgrind(1)
vi(1)
vidcontrol(1)
vidfont(1)
view(1)
vis(1)
vt220keys(1)
vttest(1)
w(1)
wait(1)
wall(1)
wc(1)
what(1)
whatis(1)
where(1)
whereis(1)
which(1)
while(1)
who(1)
whoami(1)
whois(1)
window(1)
write(1)
xargs(1)
xstr(1)
yacc(1)
yes(1)
ypcat(1)
ypchfn(1)
ypchpass(1)
ypchsh(1)
ypmatch(1)
yppasswd(1)
ypwhich(1)
yyfix(1)
zcat(1)
zcmp(1)
zdiff(1)
zegrep(1)
zfgrep(1)
zforce(1)
zgrep(1)
zmore(1)
znew(1)
groff(1)
NAME
groff - front-end for the groff document formatting system
SYNOPSIS
groff [-abcegilpstzCEGNRSUVXZ] [-d cs] [-f fam] [-F dir] [-I dir] [-L arg] [-m name] [-M dir] [-n num] [-o list] [-P arg] [-r cn] [-T dev] [-w name] [-W name] [file ...] groff -h | --help groff -v | --version [option ...] The command line is parsed according to the usual GNU convention. The whitespace between a command line option and its argument is optional. Options can be grouped behind a single - (minus character). A filename of - (minus character) denotes the standard input.
DESCRIPTION
This document describes the groff program, the main front-end for the groff document formatting system. The groff program and macro suite is the implementation of a roff(7) system within the free software collec- tion GNU <http://www.gnu.org>. The groff system has all features of the classical roff, but adds many extensions. The groff program allows to control the whole groff system by command line options. This is a great simplification in comparison to the classical case (which uses pipes only).
OPTIONS
As groff is a wrapper program for troff both programs share a set of options. But the groff program has some additional, native options and gives a new meaning to some troff options. On the other hand, not all troff options can be fed into groff. Native groff Options The following options either do not exist for troff or are differently interpreted by groff. -e Preprocess with eqn. -g Preprocess with grn. -G Preprocess with grap. -h --help Print a help message. -I dir Add search directory for soelim(1). This option implies the -s option. -l Send the output to a spooler program for printing. The command that should be used for this is specified by the print command in the device description file, see groff_font(5). If this com- mand is not present, the output is piped into the lpr(1) program by default. See options -L and -X. -L arg Pass arg to the spooler program. Several arguments should be -P -option -P -option -P arg Pass -option or -option arg to the postprocessor. The option must be specified with the necessary preceding minus sign(s) `-' or `--' because groff does not prepend any dashes before passing it to the postprocessor. For example, to pass a title to the gxditview postprocessor, the shell command sh# groff -X -P -title -P 'groff it' foo is equivalent to sh# groff -X -Z foo | gxditview -title 'groff it' - -R Preprocess with refer. No mechanism is provided for passing ar- guments to refer because most refer options have equivalent lan- guage elements that can be specified within the document. See refer(1) for more details. -s Preprocess with soelim. -S Safer mode. Pass the -S option to pic and disable the following troff requests: .open, .opena, .pso, .sy, and .pi. For security reasons, safer mode is enabled by default. -t Preprocess with tbl. -T dev Set output device to dev. Contrary to troff, groff calls a postprocessor to convert troff's intermediate output to its fi- nal format. Real devices in groff are dvi TeX DVI format (postprocessor is grodvi). html HTML output (preprocessors are soelim and pre-grohtml, postprocessor is post-grohtml). lbp Canon CAPSL printers (LBP-4 and LBP-8 series laser printers; postprocessor is grolbp). lj4 HP LaserJet4 compatible (or other PCL5 compatible) printers (postprocessor is grolj4). ps PostScript output (postprocessor is grops). For the following TTY output devices (postprocessor is always grotty), -T selects the output encoding: ascii 7bit ASCII. cp1047 Latin-1 character set for EBCDIC hosts. latin1 ISO 8859-1. utf8 Unicode character set in UTF-8 encoding. The following arguments select gxditview as the `postprocessor' (it is rather a viewing program): 100dpi resolution, 12pt document base font. The default device is ps. -U Unsafe mode. Reverts to the (old) unsafe behaviour; see option -S. -v --version Output version information of groff and of all programs that are run by it; that is, the given command line is parsed in the usu- al way, passing -v to all subprograms. -V Output the pipeline that would be run by groff (as a wrapper program), but do not execute it. -X Use gxditview instead of using the usual postprocessor to (pre)view a document. The printing spooler behavior as outlined with options -l and -L is carried over to gxditview(1) by deter- mining an argument for the -printCommand option of gxditview(1). This sets the default Print action and the corresponding menu entry to that value. -X only produces good results with -Tps, -TX75, -TX75-12, -TX100, and -TX100-12. The default resolution for previewing -Tps output is 75dpi; this can be changed by passing the -resolution option to gxditview, for example sh# groff -X -P-resolution -P100 -man foo.1 -z Suppress output generated by troff. Only error messages will be printed. -Z Do not postprocess the output of troff that is normally called automatically by groff. This will print the intermediate output to standard output; see groff_out(5). Transparent Options The following options are transparently handed over to the formatter program troff that is called by groff subsequently. These options are described in more detail in troff(1). -a ascii approximation of output. -b backtrace on error or warning. -c disable color output. -C enable compatibility mode. -d cs -d name=s define string. -E disable troff error messages. -f fam set default font family. -F dir set path for font DESC files. -i process standard input after the specified input files. -o list output only pages in list. -r cn -r name=n set number register. -w name enable warning name. -W name disable warning name.
USING GROFF
The groff system implements the infrastructure of classical roff; see roff(7) for a survey on how a roff system works in general. Due to the front-end programs available within the groff system, using groff is much easier than classical roff. This section gives an overview of the parts that constitute the groff system. It complements roff(7) with groff-specific features. This section can be regarded as a guide to the documentation around the groff system. Front-ends The groff program is a wrapper around the troff(1) program. It allows to specify the preprocessors by command line options and automatically runs the postprocessor that is appropriate for the selected device. Doing so, the sometimes tedious piping mechanism of classical roff(7) can be avoided. The grog(1) program can be used for guessing the correct groff command line to format a file. The groffer(1) program is an allround-viewer for groff files and man pages. Preprocessors The groff preprocessors are reimplementations of the classical pre- processors with moderate extensions. The preprocessors distributed with the groff package are eqn(1) for mathematical formulae, grn(1) for including gremlin(1) pictures, pic(1) for drawing diagrams, refer(1) for bibliographic references, soelim(1) for including macro files from standard locations, and tbl(1) for tables. Besides these, there are some internal preprocessors that are automati- man The traditional man page format; see groff_man(7). It can be specified on the command line as -man or -m man. mandoc The general package for man pages; it automatically recognizes whether the documents uses the man or the mdoc format and branches to the corresponding macro package. It can be speci- fied on the command line as -mandoc or -m mandoc. mdoc The BSD-style man page format; see groff_mdoc(7). It can be specified on the command line as -mdoc or -m mdoc. me The classical me document format; see groff_me(7). It can be specified on the command line as -me or -m me. mm The classical mm document format; see groff_mm(7). It can be specified on the command line as -mm or -m mm. ms The classical ms document format; see groff_ms(7). It can be specified on the command line as -ms or -m ms. www HTML-like macros for inclusion in arbitrary groff documents; see groff_www(7). Details on the naming of macro files and their placement can be found in groff_tmac(5). Programming Language General concepts common to all roff programming languages are described in roff(7). The groff extensions to the classical troff language are documented in groff_diff(7). The groff language as a whole is described in the (still incomplete) groff info file; a short (but complete) reference can be found in groff(7). Formatters The central roff formatter within the groff system is troff(1). It provides the features of both the classical troff and nroff, as well as the groff extensions. The command line option -C switches troff into compatibility mode which tries to emulate classical roff as much as possible. There is a shell script nroff(1) that emulates the behavior of classi- cal nroff. It tries to automatically select the proper output encod- ing, according to the current locale. The formatter program generates intermediate output; see groff_out(7). Devices In roff, the output targets are called devices. A device can be a piece of hardware, e.g. a printer, or a software file format. A device is specified by the option -T. The groff devices are as follows. ascii Text output using the ascii(7) character set. cp1047 Text output using the EBCDIC code page IBM cp1047 (e.g. OS/390 koi8-r Text output using the Russian KOI8-R character set. lbp Output for Canon CAPSL printers (LBP-4 and LBP-8 series laser printers). lj4 HP LaserJet4-compatible (or other PCL5-compatible) printers. ps PostScript output; suitable for printers and previewers like gv(1). utf8 Text output using the Unicode (ISO 10646) character set with UTF-8 encoding; see unicode(7). X75 75dpi X Window System output suitable for the previewers xditview(1x) and gxditview(1). A variant for a 12pt document base font is X75-12. X100 100dpi X Window System output suitable for the previewers xditview(1x) and gxditview(1). A variant for a 12pt document base font is X100-12. The postprocessor to be used for a device is specified by the postpro command in the device description file; see groff_font(5). This can be overridden with the -X option. The default device is ps. Postprocessors groff provides 3 hardware postprocessors: grolbp(1) for some Canon printers, grolj4(1) for printers compatible to the HP LaserJet 4 and PCL5, grotty(1) for text output using various encodings, e.g. on text-oriented terminals or line-printers. Today, most printing or drawing hardware is handled by the operating system, by device drivers, or by software interfaces, usually accepting PostScript. Consequently, there isn't an urgent need for more hardware device postprocessors. The groff software devices for conversion into other document file for- mats are grodvi(1) for the DVI format, grohtml(1) for HTML format, grops(1) for PostScript. Add information to troff font description files for use with groff. afmtodit(1) Create font description files for PostScript device. groffer(1) General viewer program for groff files and man pages. gxditview(1) The groff X viewer, the GNU version of xditview. hpftodit(1) Create font description files for lj4 device. indxbib(1) Make inverted index for bibliographic databases. lkbib(1) Search bibliographic databases. lookbib(1) Interactively search bibliographic databases. pfbtops(1) Translate a PostScript font in .pfb format to ASCII. tfmtodit(1) Create font description files for TeX DVI device. xditview(1x) roff viewer distributed with X window.
ENVIRONMENT
Normally, the path separator in the following environment variables is the colon; this may vary depending on the operating system. For exam- ple, DOS and Windows use a semicolon instead. GROFF_BIN_PATH This search path, followed by $PATH, will be used for commands that are executed by groff. If it is not set then the directory where the groff binaries were installed is prepended to PATH. GROFF_COMMAND_PREFIX When there is a need to run different roff implementations at the same time groff provides the facility to prepend a prefix to most of its programs that could provoke name clashings at run time (default is to have none). Historically, this prefix was the character g, but it can be anything. For example, gtroff stood for groff's troff, gtbl for the groff version of tbl. By setting GROFF_COMMAND_PREFIX to different values, the different roff installations can be addressed. More exactly, if it is set to prefix xxx then groff as a wrapper program will internally call xxxtroff instead of troff. This also applies to the pre- processors eqn, grn, pic, refer, tbl, soelim, and to the utili- ties indxbib and lookbib. This feature does not apply to any programs different from the ones above (most notably groff it- self) since they are unique to the groff package. dition to the default directories. See troff(1) and groff_tmac(5) for more details. GROFF_TMPDIR The directory in which temporary files will be created. If this is not set but the environment variable TMPDIR instead, tempo- rary files will be created in the directory $TMPDIR. Otherwise temporary files will be created in /tmp. The refer(1), groffer(1), grohtml(1), and grops(1) commands use temporary files. GROFF_TYPESETTER Preset the default device. If this is not set the ps device is used as default. This device name is overwritten by the option -T.
FILES
There are some directories in which groff installs all of its data files. Due to different installation habits on different operating systems, their locations are not absolutely fixed, but their function is clearly defined and coincides on all systems. groff Macro Directory This contains all information related to macro packages. Note that more than a single directory is searched for those files as documented in groff_tmac(5). For the groff installation corresponding to this document, it is located at /usr/share/tmac. The following files con- tained in the groff macro directory have a special meaning: troffrc Initialization file for troff. This is interpreted by troff be- fore reading the macro sets and any input. troffrc-end Final startup file for troff, it is parsed after all macro sets have been read. name.tmac tmac.name Macro file for macro package name. groff Font Directory This contains all information related to output devices. Note that more than a single directory is searched for those files; see troff(1). For the groff installation corresponding to this document, it is locat- ed at /usr/share/groff_font. The following files contained in the groff font directory have a special meaning: devname/DESC Device description file for device name, see groff_font(5). devname/F Font file for font F of device name.
EXAMPLES
The following example illustrates the power of the groff program as a wrapper around troff. An even easier way to call this is to use grog(1) to guess the pre- processor and macro options and execute the generated command (by using backquotes to specify shell command substitution) sh# `grog -Tlatin1 foo.me` The simplest way is to view the contents in an automated way by calling sh# groffer foo.me
BUGS
On EBCDIC hosts (e.g. OS/390 Unix), output devices ascii and latin1 aren't available. Similarly, output for EBCDIC code page cp1047 is not available on ASCII based operating systems. Report bugs to bug-groff@gnu.org. Include a complete, self-contained example that will allow the bug to be reproduced, and say which version of groff you are using.
AVAILABILITY
Information on how to get groff and related information is available at the GNU website <http://www.gnu.org/software/groff>. The most recent released version of groff is available for anonymous ftp at the groff development site <ftp://ftp.ffii.org/pub/groff/devel/ groff-current.tar.gz>. Three groff mailing lists are available: bug-groff@gnu.org for reporting bugs, groff@gnu.org for general discussion of groff, groff-commit@ffii.org a read-only list showing logs of commitments to the CVS reposi- tory. Details on CVS access and much more can be found in the file README at the top directory of the groff source package. There is a free implementation of the grap preprocessor, written by Ted Faber <faber@lunabase.org>. The actual version can be found at the grap website <http://www.lunabase.org/~faber/Vault/software/grap/>. This is the only grap version supported by groff.
AUTHORS
Copyright (C) 1989, 2002, 2003 Free Software Foundation, Inc. This document is distributed under the terms of the FDL (GNU Free Docu- mentation 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 GNU copyleft site <http://www.gnu.org/copyleft/fdl.html>. This document is based on the original groff man page written by James Clark <jjc@jclark.com>. It was rewritten, enhanced, and put under the FDL license by Bernd Warken <bwarken@mayn.de>. It is maintained by
SEE ALSO
The groff info file contains all information on the groff system within a single document. Beneath the detailed documentation of all aspects, it provides examples and background information. See info(1) on how to read it. Due to its complex structure, the groff system has many man pages. They can be read with man(1) or groffer(1). Introduction, history and further readings: roff(7). Viewer for groff files: groffer(1), gxditview(1), xditview(1x). Wrapper programs for formatters: groff(1), grog(1). Roff preprocessors: eqn(1), grn(1), pic(1), refer(1), soelim(1), tbl(1), grap(1). Roff language with the groff extensions: groff(7), groff_char(7), groff_diff(7), groff_font(5). Roff formatter programs: nroff(1), troff(1), ditroff(7). The intermediate output language: groff_out(7). Postprocessors for the output devices: grodvi(1), grohtml(1), grolbp(1), grolj4(1), grops(1), grotty(1). Groff macro packages and macro-specific utilities: groff_tmac(5), groff_man(7), groff_mdoc(7), groff_me(7), groff_mm(7), groff_mmse(7), groff_mom(7), groff_ms(7), groff_www(7), groff_trace(7), mmroff(7). The following utilities are available: addftinfo(1), afmtodit(1), eqn2graph(1), groffer(1), gxditview(1), hpftodit(1), indxbib(1), lookbib(1), pfbtops(1), pic2graph(1), tfmtodit(1). Groff Version 1.19 1 May 2003 GROFF(1)
SPONSORED LINKS
Man(1) output converted with man2html , sed , awk