Hi Hans, At 2022-04-27T12:49:18+0200, Hans Unzner wrote: > 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
Yes. More generally, groff uses an-old.tmac[1] to format a man page for _any_ output device, not just HTML, when the page uses the man(7) macros. > 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. Yes. Simply override the macro file search path with the GROFF_TMAC_PATH environment variable or -M option to [gnt]roff. $ zcat /usr/share/man/man1/neqn.1.gz | groff -man -Tascii NEQN(1) General Commands Manual NEQN(1) NAME neqn - format equations for ASCII output SYNOPSIS neqn [eqn-options] DESCRIPTION neqn invokes the eqn(1) command with the ascii output device. Note that eqn does not support low-resolution, typewriter-like devices (although it may work adequately for very simple input). SEE ALSO eqn(1) groff 1.22.4 27 January 2021 NEQN(1) $ sed '1i\ .tm GBR was here ' /usr/share/groff/1.22.4/tmac/an-old.tmac > $HOME/an-old.tmac $ zcat /usr/share/man/man1/neqn.1.gz | groff -M . -man -Tascii GBR was here NEQN(1) General Commands Manual NEQN(1) NAME neqn - format equations for ASCII output SYNOPSIS neqn [eqn-options] DESCRIPTION neqn invokes the eqn(1) command with the ascii output device. Note that eqn does not support low-resolution, typewriter-like devices (although it may work adequately for very simple input). SEE ALSO eqn(1) groff 1.22.4 27 January 2021 NEQN(1) Does this help? Regards, Branden [1] to be renamed simply "an.tmac" in groff 1.23.0
signature.asc
Description: PGP signature