pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mwm(1) is a mess UGHGH!



SO, I made result.

groff -man /usr/pkg/man/man1/mwm.1 -Tascii 2> /dev/null  |  more

If I only use the name 'mwm.1' it chokes. Do I need to set a variable?

It also chokes when run in perlman2.

On Thu, Jun 15, 2023 at 2:51 PM Robert Elz <kre%munnari.oz.au@localhost> wrote:
>
>     Date:        Thu, 15 Jun 2023 09:59:42 +0000
>     From:        Todd Gruhn <tgruhn2%gmail.com@localhost>
>     Message-ID:  <CA+9Akf8y4QRzKhzn3dYsNoqKLreMQAFXMqxL2SBLwcFsBq4r5Q%mail.gmail.com@localhost>
>
>   | my perlman2 line is this:
>   |
>   |      if ($section)
>   |        {
>   |          $section =~ s/[()]//g; # remove parens
>   |          return "man -s $section $man 2> /dev/null | rman |"
>   |        }
>   |
>   |
>   | Is it better to do it using this ??
>   |
>   |   tbl /usr/pkg/man/man1/mwm.1 | groff -Tascii -mandoc
>
> No.   It would be much more complex.   First the '1's in that are the
> $section from the perl version (but that is trivial to handle).
>
> More importantly, tbl is not appropriate if the man page in question has
> already been processed by tbl (which it seemed as if that one might
> have been).   The same is true for eqn, refer, pic, ...    It is fine (but
> perhaps a bit slow) to use those preprocessors on man pages that don't
> need them (they just become a sluggish "cat" in that case), and it is
> necessary (when using *roff as the formatter) when using man pages that
> do require them, but they can't be used twice - so you cannot use tbl
> if the man page has already been processed by tbl, and while it would
> be possible to create a tool which would try to work that out (and
> similarly for each of the other preprocessors) it isn't a trivial task
> (you cannot just do it with a simple grep).
>
> I also have no idea what the "rman" in the perl pipeline is, or what
> its purpose might be.
>
> Maybe someone else can help with some of this - but for some (fortunately
> not very many these days) man pages, you just have to do some work to
> discover the correct way to format them.
>
> kre
>


Home | Main Index | Thread Index | Old Index