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: Anthony J. Bentley
Subject: Re: Unsupported nroff macros on MacOS X
Date: Tue, 04 Apr 2023 00:46:51 -0600

Ken Hornstein writes:
> Let's take the example you gave where the first line for a man
> page that uses tbl should contain:
>
> '\" t
>
> So, my question is ... what does this mean?  I understand that \" is
> a comment, but I'm confused about the leading single quote.

According to mandoc's roff(7) manual:

     The single quote ("'") is accepted as an alternative control
     character, treated by mandoc(1) just like ‘.’

And later:

     Text following an escaped double-quote ‘\"’, whether in a request,
     macro, or text line, is ignored to the end of the line.  A request
     line beginning with a control character and comment escape ‘.\"’ is
     also ignored.

As for why the 't' is there, it's strictly a manpage practice, not
a general roff authoring practice. man(1) peeks at the comment (man-db
does anyway; pretty sure mandoc doesn't need it) to determine which
preprocessors to run. E.g., a manual that needs the eqn preprocessor
would have an 'e' instead.

Normally the person piping a document through troff would be the author,
and would already know that the document contains tables that require
the source to be preprocessed with tbl. But manuals are formatted by
users; the man(1) program doesn't know the document features in advance,
and wants to avoid running preprocessors unless they're necessary.



reply via email to

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