nmh-workers
[Top][All Lists]
Advanced

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

Re: Unsupported nroff macros on MacOS X


From: Oliver Kiddle
Subject: Re: Unsupported nroff macros on MacOS X
Date: Wed, 05 Apr 2023 04:27:14 +0200

Ralph Corderoy wrote:
> Hi Paul,
>
> > What happened to the possibilitiy of simply replacing the .fc macros,
> > and the use of tbl, with tab characters?
>
> Or one of the other alternatives I gave along with that one.

The "PROFILE COMPONENTS" section of inc(1) appears to use an alternative
starting with .TP 20 and then .TP before each item. That particular case
is wrapping after rendering Alternate-Mailboxes: so should perhaps be
using .TP 21. This form works fine at least for terminal output with
fixed width fonts.

> But it still leaves the risk of mandoc not coping with something else
> now or in the future.  macOS, for that's its current marketing
> capitalisation, scripts the possibility of a troff being installed to
> override mandoc formatting.  Seems mandoc's failure to be troff and its
> common preprocessors is an accepted problem by Apple.  Use the solution
> they provide.

While you can criticise mandoc for not being a real troff there are many
things to like about mandoc. Aside from better output to other formats,
it has nice search options (some of which only work well if man pages
have used the mdoc macros for semantic markup unfortunately). I can
understand the decision they made not to write a full troff
implementation and to concentrate on their need for a man formatter.

On FreeBSD, man prints a message prompting you to install groff. I much
prefer that to a package dependency that would leave me no choice.
We could document the limitation in README but I doubt many users read
that anyway - the prompt from man serves the purpose.

The best solution would be if mandoc added support for .fc. Targetting a
mandoc subset may be a pragmatic solution but it is not ideal if
everyone does that rather than mandoc being extended.

Converting all our man pages to some other format is a much bigger task.
While there are tools, you always lose something and would need to go
over the whole document manually. The fashionable format of choice tends
to change. At one time, I converted a load of documentation to DocBook
which seemed a good choice at the time but has suffered from XML going
out of fashion. Markdown is popular now but if you go beyond basic
features there is no single standard for extensions.

Export back to man pages is something I would consider vital and if you
look what typical tooling generates for definition lists, it is much
inferior to what we currently have in the nmh man pages. There's an
easier path if we want inferior man pages that work with mandoc.

Oliver


reply via email to

[Prev in Thread] Current Thread [Next in Thread]