nmh-workers
[Top][All Lists]
Advanced

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

Unsupported nroff macros on MacOS X


From: Ken Hornstein
Subject: Unsupported nroff macros on MacOS X
Date: Sun, 02 Apr 2023 18:59:03 -0400

So I noticed that after an upgrade to MacOS X, I started getting this
warning on certain nmh man pages:

This manpage is not compatible with mandoc(1) and might display incorrectly.

After some digging, it turns out man(1) is a shell script and to make a
long story short is running this command:

        mandoc -Tlint -Wunsupp

Which returns this:

mandoc: whom.man:140:2: UNSUPP: unsupported roff request: fc

And some quick googling suggests that in fact the mandoc macros only
support a subset of roff requests, and .fc aint one of them.

I will admit that my roff-fu is not very good, but I took a look at this.
It seems this is a common idiom for nmh man pages.  Specifically (this
is from packf(1) but it's similar everywhere else):

.SH "PROFILE COMPONENTS"
.fc ^ ~
.nf
.ta 2.4i
.ta \w'ExtraBigProfileName  'u
^Path:~^To determine the user's nmh directory
^Current\-Folder:~^To find the default current folder
^Msg\-Protect:~^To set mode when creating a new `file'
.fi

So as I vaguely understand it, the .fc line sets '^ as a field delimeter
and '~' as the character to pad a field. .nf sets the following lines to
no-fill mode. ".ta 2.4i" sets the tab stop to 2.4 inches.  The following
line sets the tab stop to the width of "ExtraBigProfileName" and 'u is
the default horizontal span for the terminal (now that I look at it,
I'm not sure why there are two .ta lines right after another).  The
following lines use '^' to delimine each field and the "~" to pad out
each field.  So you get something that is supposed to look like:

PROFILE COMPONENTS
       Path:                To determine the user's nmh directory
       Current-Folder:      To find the default current folder
       Msg-Protect:         To set mode when creating a new `file'

But on MacOS X you now get:

PROFILE COMPONENTS
       ^Path:~^To determine the user's nmh directory
       ^Current-Folder:~^To find the default current folder
       ^Msg-Protect:~^To set mode when creating a new `file'

This isn't wonderful and I'd like to fix it, but I'm not sure what
to do.  Ideas include:

- Tell MacOS X users to install groff(1) (the man(1) script will try
  to call groff if it encounters a warning like this from mandoc)
- Switch to some other roff construct; I was under the impression that
  actual tabs would work?  I'm not sure why tabs aren't used here.
- Switch to tbl(1) macros which as far as I can tell are supported by
  mandoc and seem to work everywhere.

Given my druthers I think I'd rather do the last one, since this kind
of seems like a table!  But I'd like to hear what other people think
since I know there are people here with much greater roff-fu than I
(I do not know when tbl(1) was created, but it wouldn't surprise me
if MH predated it).

--Ken



reply via email to

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