558 lines
7.6 KiB
HTML
558 lines
7.6 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of GROG</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>GROG</H1>
|
|
Section: User Commands (1)<BR>Updated: 21 March 2020<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
grog - guess options for a following groff command
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
|
|
[ <B>-C</B> ]
|
|
|
|
[ <B>-T </B><I>device</I> ]
|
|
|
|
[ <B>--run</B> ]
|
|
|
|
[ <B>--warnings</B> ]
|
|
|
|
[ <B>--ligatures</B> ]
|
|
|
|
[<I>groff-option</I>
|
|
|
|
...
|
|
]
|
|
[ <B>--</B> ]
|
|
|
|
[<I>filespec</I>
|
|
|
|
...
|
|
]
|
|
|
|
|
|
<B>-h</B>
|
|
|
|
|
|
<B>--help</B>
|
|
|
|
|
|
|
|
<B>-v</B>
|
|
|
|
|
|
<B>--version</B>
|
|
|
|
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
<B>grog</B>
|
|
|
|
reads the input (file names or standard input) and guesses which of
|
|
the
|
|
<B><A HREF="/cgi-bin/man/man2html?1+groff">groff</A></B>(1)
|
|
|
|
options are needed to perform the input with the
|
|
<B>groff</B>
|
|
|
|
program.
|
|
A suitable device is now always written as
|
|
<B>-T</B><I>device</I>
|
|
|
|
including the groff default as
|
|
<B>-T ps</B>.
|
|
|
|
<P>
|
|
|
|
The corresponding
|
|
<B>groff</B>
|
|
|
|
command is usually displayed in standard output.
|
|
With the option
|
|
<B>--run</B>,
|
|
|
|
the generated line is output into standard error and the generated
|
|
<B>groff</B>
|
|
|
|
command is run on the
|
|
<I>standard output</I>.
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+groffer">groffer</A></B>(1)
|
|
|
|
relies on a perfectly running
|
|
<B><A HREF="/cgi-bin/man/man2html?1+groff">groff</A></B>(1).
|
|
|
|
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
|
|
The option
|
|
<B>-v</B>
|
|
|
|
or
|
|
<B>--version</B>
|
|
|
|
prints information on the version number.
|
|
Also
|
|
<B>-h</B>
|
|
|
|
or
|
|
<B>--help</B>
|
|
|
|
prints usage information.
|
|
Both of these options automatically end the
|
|
<B>grog</B>
|
|
|
|
program.
|
|
Other options are thenignored, and no
|
|
<B>groff</B>
|
|
|
|
command line is generated.
|
|
The following 3 options are the only
|
|
<B>grog</B>
|
|
|
|
options,
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-C</B>
|
|
|
|
<DD>
|
|
this option means enabling the
|
|
<I>groff</I>
|
|
|
|
compatibility mode, which is also transfered to the generated
|
|
<B>groff</B>
|
|
|
|
command line.
|
|
<DT id="2"><B>--ligatures</B>
|
|
|
|
<DD>
|
|
this option forces to include the arguments
|
|
<B>-P-y -PU</B>
|
|
|
|
within the generated
|
|
<B>groff</B>
|
|
|
|
command line.
|
|
<DT id="3"><B>--run</B>
|
|
|
|
<DD>
|
|
with this option, the command line is output at standard error and
|
|
then run on the computer.
|
|
<DT id="4"><B>--warnings</B>
|
|
|
|
<DD>
|
|
with this option, some more warnings are output to standard error.
|
|
</DL>
|
|
<P>
|
|
|
|
All other specified short options (words starting with one minus
|
|
character
|
|
<B>-</B>)
|
|
|
|
are interpreted as
|
|
<B>groff</B>
|
|
|
|
options or option clusters with or without argument.
|
|
No space is allowed between options and their argument.
|
|
Except from the
|
|
<B>-m</B><I>arg</I>
|
|
|
|
options, all options will be passed on, i.e. they are included
|
|
unchanged in the command for the output without effecting the work of
|
|
<B>grog</B>.
|
|
|
|
<P>
|
|
|
|
A
|
|
<I>filespec</I>
|
|
|
|
argument can either be the name of an existing file or a single minus
|
|
<B>-</B>
|
|
|
|
to mean standard input.
|
|
If no
|
|
<I>filespec</I>
|
|
|
|
is specified standard input is read automatically.
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>DETAILS</H2>
|
|
|
|
|
|
<B>grog</B>
|
|
|
|
reads all
|
|
<I>filespec</I>
|
|
|
|
parameters as a whole.
|
|
It tries to guess which of the following
|
|
<B>groff</B>
|
|
|
|
options are required for running the input under
|
|
<B>groff</B>:
|
|
|
|
<B>-e</B>,
|
|
|
|
<B>-g</B>,
|
|
|
|
<B>-G</B>,
|
|
|
|
<B>-j</B>,
|
|
|
|
|
|
|
|
<B>-p</B>,
|
|
|
|
<B>-R</B>,
|
|
|
|
<B>-s</B>,
|
|
|
|
<B>-t</B>
|
|
|
|
(preprocessors); and
|
|
<B>-man</B>,
|
|
|
|
<B>-mdoc</B>,
|
|
|
|
<B>-mdoc-old</B>,
|
|
|
|
<B>-me</B>,
|
|
|
|
<B>-mm</B>,
|
|
|
|
<B>-mom</B>,
|
|
|
|
and
|
|
<B>-ms</B>
|
|
|
|
(macro packages).
|
|
<P>
|
|
|
|
The guessed
|
|
<B>groff</B>
|
|
|
|
command including those options and the found
|
|
<I>filespec</I>
|
|
|
|
parameters is put on the standard output.
|
|
<P>
|
|
|
|
It is possible to specify arbitrary
|
|
<B>groff</B>
|
|
|
|
options on the command line.
|
|
These are passed on the output without change, except for the
|
|
<B>-m</B><I>arg</I>
|
|
|
|
options.
|
|
<P>
|
|
|
|
The
|
|
<B>groff</B>
|
|
|
|
program has trouble when the wrong
|
|
<B>-m</B><I>arg</I>
|
|
|
|
option or several of these options are specified.
|
|
In these cases,
|
|
<B>grog</B>
|
|
|
|
will print an error message and exit with an error code.
|
|
It is better to specify no
|
|
<B>-m</B><I>arg</I>
|
|
|
|
option.
|
|
Because such an option is only accepted and passed when
|
|
<B>grog</B>
|
|
|
|
does not find any of these options or the same option is found.
|
|
<P>
|
|
|
|
If several different
|
|
<B>-m</B><I>arg</I>
|
|
|
|
options are found by
|
|
<B>grog</B>
|
|
|
|
an error message is produced and the program is terminated with an
|
|
error code.
|
|
But the output is written with the wrong options nevertheless.
|
|
<P>
|
|
|
|
Remember that it is not necessary to determine a macro package.
|
|
A
|
|
<I>roff</I>
|
|
|
|
file can also be written in the
|
|
<I>groff</I>
|
|
|
|
language without any macro package.
|
|
<B>grog</B>
|
|
|
|
will produce an output without an
|
|
<B>-m</B><I>arg</I>
|
|
|
|
option.
|
|
<P>
|
|
|
|
As
|
|
<B>groff</B>
|
|
|
|
also works with pure text files without any
|
|
<I>roff</I>
|
|
|
|
requests,
|
|
<B>grog</B>
|
|
|
|
cannot be used to identify a file to be a
|
|
<I>roff</I>
|
|
|
|
file.
|
|
<P>
|
|
|
|
The
|
|
<B><A HREF="/cgi-bin/man/man2html?1+groffer">groffer</A></B>(1)
|
|
|
|
program heavily depends on a working
|
|
<B>grog</B>.
|
|
|
|
|
|
<A NAME="lbAG"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
|
|
Calling
|
|
<DL COMPACT><DT id="5"><DD>
|
|
|
|
grog meintro.me
|
|
|
|
</DL>
|
|
|
|
results in
|
|
<DL COMPACT><DT id="6"><DD>
|
|
|
|
groff -me meintro.me
|
|
|
|
</DL>
|
|
|
|
So
|
|
<B>grog</B>
|
|
|
|
recognized that the file
|
|
<B>meintro.me</B>
|
|
|
|
is written with the
|
|
<B>-me</B>
|
|
|
|
macro package.
|
|
|
|
On the other hand,
|
|
<DL COMPACT><DT id="7"><DD>
|
|
|
|
grog pic.ms
|
|
|
|
</DL>
|
|
|
|
outputs
|
|
<DL COMPACT><DT id="8"><DD>
|
|
|
|
groff -p -t -e -ms pic.ms
|
|
|
|
</DL>
|
|
|
|
Besides determining the macro package
|
|
<B>-ms</B>,
|
|
|
|
<B>grog</B>
|
|
|
|
recognized that the file
|
|
<B>pic.ms</B>
|
|
|
|
additionally needs
|
|
<B>-pte</B>,
|
|
|
|
the combination of
|
|
<B>-p</B>
|
|
|
|
for
|
|
<I>pic</I>,
|
|
|
|
<B>-t</B>
|
|
|
|
for
|
|
<I>tbl</I>,
|
|
|
|
and
|
|
<B>-e</B>
|
|
|
|
for
|
|
<I>eqn</I>.
|
|
|
|
|
|
If both of the former example files are combined by the command
|
|
<DL COMPACT><DT id="9"><DD>
|
|
|
|
grog meintro.me pic.ms
|
|
|
|
</DL>
|
|
|
|
an error message is sent to standard error because
|
|
<B>groff</B>
|
|
|
|
cannot work with two different macro packages:
|
|
<DL COMPACT><DT id="10"><DD>
|
|
|
|
grog: error: there are several macro packages: -me -ms
|
|
|
|
</DL>
|
|
|
|
Additionally the corresponding output with the wrong options is printed
|
|
to standard output:
|
|
<DL COMPACT><DT id="11"><DD>
|
|
|
|
groff -pte -me -ms meintro.me pic.ms
|
|
|
|
</DL>
|
|
|
|
But the program is terminated with an error code.
|
|
The call of
|
|
<DL COMPACT><DT id="12"><DD>
|
|
|
|
grog -ksS -Tdvi grnexmpl.g
|
|
|
|
</DL>
|
|
|
|
contains several
|
|
<B>groff</B>
|
|
|
|
options that are just passed on the output without any interface to
|
|
<B>grog</B>.
|
|
|
|
These are the option cluster
|
|
<B>-ksS</B>
|
|
|
|
consisting of
|
|
<B>-k</B>,
|
|
|
|
<B>-s</B>,
|
|
|
|
and
|
|
<B>-S</B>;
|
|
|
|
and the option
|
|
<B>-T</B>
|
|
|
|
with argument
|
|
<B>dvi</B>.
|
|
|
|
The output is
|
|
<DL COMPACT><DT id="13"><DD>
|
|
|
|
groff -k -s -S -Tdvi grnexmpl.g
|
|
|
|
</DL>
|
|
|
|
so no additional option was added by
|
|
<B>grog</B>.
|
|
|
|
As no option
|
|
<B>-m</B><I>arg</I>
|
|
|
|
was found by
|
|
<B>grog</B>
|
|
|
|
this file does not use a macro package.
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>AUTHORS</H2>
|
|
|
|
|
|
<B>grog</B>
|
|
|
|
was originally written by James Clark.
|
|
The current Perl implementation was written by
|
|
|
|
Bernd Warken
|
|
|
|
with contributions from Ralph Corderoy,
|
|
and is maintained by
|
|
|
|
Werner Lemberg
|
|
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+groff">groff</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+groffer">groffer</A></B>(1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="14"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="15"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="16"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="17"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="18"><A HREF="#lbAF">DETAILS</A><DD>
|
|
<DT id="19"><A HREF="#lbAG">EXAMPLES</A><DD>
|
|
<DT id="20"><A HREF="#lbAH">AUTHORS</A><DD>
|
|
<DT id="21"><A HREF="#lbAI">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:15 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|