Ok I try to restate my question.
As far as I know, an-old.tmac is used when converting a man page to HTML with a command like this
groff -Thtml -man a_man_page.9 > a_man_page.html
But now I want to use a modified version of an-old.tmac without replacing it in the /usr/share/groff/ directory. Is it possible to do that? I always get a blank output when passing the modified macro with the -m option.

Thanks!
Hans

Am 12.04.22 um 20:28 schrieb Ingo Schwarze:
Hi Hans,

Hans Unzner wrote on Tue, Apr 12, 2022 at 07:51:54PM +0200:

I tried this
groff -Thtml  -m an-old-fixed -man docs/man/man9/hostmot2.9 > hostmot2.html
but it produces no output.
The above command instructs groff to load *both* an-old-fixed.tmac
and an.tmac, so it loads the macro set twice.  I would not be surprised
if loading the groff_man(7) macro set twice would cause some kind of
trouble.  Then again, this command works for me with groff-current:

    $ groff -Tascii -P-c -man -man /usr/share/man/man1/cvs.1 | less

So loading the macros twice is not completely broken in general.
Consequently, i suspect that something is not quite right in your
file an-old-fixed.tmac or that that file does not exist in the expected
directory at all.  But it's hard to say because you really do not provide
any information that would allow diagnosing your problem.

All that said, to convert manual pages to HTML, you really want to
use mandoc(1) rather than groff(1).

Yours,
   Ingo


Reply via email to