Hi, I noticed the below description of an ".OP" macro in groff_man_style.
However the macro as described does not exist that I can find it. I think
this was an erroneous edit and should be removed from the documentation.

The description states that it appears in the Documenter's Workbench macros
which is true (see
https://github.com/n-t-roff/DWB3.3/blob/master/macros/man/an.sr ). However
I believe that it was only in the DWB man macros for compatibility with the
mdoc macros (see
https://github.com/n-t-roff/DWB3.3/blob/master/macros/man/man.5 which
states that this version of the man macros recognizes most macro commands
defined in BSD). More importantly, the DWB macros do not comform to how
they are described in groff_man_style (compare the two excerpts at the
bottom of this e-mail).

In groff you can grep for ".de OP" in .../tmac and you'll only find the
definition in m.tmac (where it means "force odd page" -- not relevant). If
you grep for ".de Op" you find the definition in "doc.tmac". The
file groff_man_style, as best I understand, is only intended to document
the man macros not the mdoc macros (see "See also" section, as well as the
discussion in "Files").

I checked the Illumos version (
https://sourceforge.net/projects/heirloom/files/heirloom-doctools/080407/heirloom-doctools-080407.tar.bz2/download
in heirloom-doctools-080407/troff/troff.d/tmac.d ) and likewise it did not
define .OP except in "mmn" and "mmt" and ".Op" in "doc.in".

Since the description of .OP does not match the DWB implementation, which I
believe was only included for compatibility with mdoc, and is not present
in groff man at all (as far as I can tell), I suggest removing that
paragraph from groff_man_style.

I could be wrong of course but I have run this down to the best of my
ability.

Thank you


Description from groff_man_style:

".OP option-name [option-argument] Indicate an optional command parameter
called option-name, which is set in bold. If the option takes an argument,
specify option-argument using a noun, abbreviation, or hyphenated noun
phrase. If present, option-argument is preceded by a space and set in
italics. Square brackets in roman surround both arguments. Use of this
quasi-semantic macro, an extension originating in Documenter's Workbench
troff, is deprecated. It cannot easily be used to annotate options that
take optional arguments or options whose arguments have internal structure
(such as a mixture of literal and variable components). One could work
around these limitations with font selection escape sequences, but it is
preferable to use font style alternation macros, which afford greater
flexibility."

Description from DWB man.5 (download
https://github.com/n-t-roff/DWB3.3/blob/master/macros/man/man.5 and run it
through man):

".OP opt arg x y  Produce a command line option of the form where opt is
the option flag, arg is the option argument, x is regular-font text
appended to the argument, and y is regular-font text prepended to the
option. If x is ``[]''  the option is enclosed in square brackets (e.g.,
``.OP -f file []'' produces on output)."

Reply via email to