On Wed, 23 Nov 2011 22:12:31 +0100, Glenn Fowler <[email protected]>
wrote:
looks like a groff version/installation difference
could be in nroff itself or the -man macros
works ok on redhadt linux and solaris (not groff based)
fails like your description on suse and ubuntu
at issue is the ast optget --nroff .OP definition
maybe that conflicts with a -man directive in the installations that
fail?
I investigated a bit more in the meantime. it looks like all redefinitions
of macros (SH, OP, etc.) which are generated by `myscript --nroff' are
ignored by `[ntg]roff -man': capturing `myscript --nroff' output in a file
and removing all troff macro definitions in this file leads to the same
"erroneous" output as described previously (actually it's not only the
missing paragraph breaks if one looks more closely). it is then especially
clear that the `.OP' macros don't generate paragraph breaks since the
corresponding OP macro in the groff `man' package (residing in
`an-ext.tmac') is, in usual manpages, used in the SYNOPSIS section for
listing all options in a single line.
I actually don't know, _why_ the redefinition is ignored: my understanding
is that the specified groff macro package is loaded first and, thus, the
redefinition in the file should overwrite the original definition. maybe
the groff maintainers should be contacted for clarification. if need be I
could do this (might need a bit time, though).
On Wed, 23 Nov 2011 21:19:21 +0100 j. van den hoff wrote:
hi,
I'm trying to come to terms with the details of `getopts'. I managed to
get a correctly formatted manpage via
myscript --man
however, using
myscript --nroff 2>&1 |nroff -man
does not generate the same formatting. rather, line breaks (or, rather,
paragraph breaks) between option descriptions are missing, i.e. the
second
option description starts somewhere in the middle of a line immediately
after the end of the previous option description (I'm using groff
version
1.21.).
I looked at the `--nroff' output generated `getopts', but do not
remember
enough troff to modfiy the `.OP' macro quickly.
question: how can I enforce correctly formatted nroff -man output (or
troff, for that matter, in order to generate pdf-versions of the
manpage)?
thanks,
joerg
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users