Tcl Source Code

View Ticket
Login
Ticket UUID: 426679ef7d4da6bbfa209450ca2870e6ecc4f155
Title: Having man.macros after .TH breaks rendering on OpenBSD and possibly others.
Type: Bug Version: all
Submitter: stwo Created on: 2013-11-04 14:53:46
Subsystem: 53. Configuration and Build Tools Assigned To: jan.nijtmans
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2013-11-05 12:58:51
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2013-11-05 12:58:51
Description:
On OpenBSD and possibly other systems, the .TH macro causes local macros to be loaded, overwriting some macros defined in man.macros, resulting in incorrectly rendered man pages.
One fix is to move '.so man.macros' to after the .TH in all affected .n files.
Another fix is to flip them around in unix/installManPage, similar to what is being done on OpenBSD.
This also affects Tk and probably doctools, others.

See http://marc.info/?l=openbsd-ports&m=138326304909098&w=2 for more information.
Excerpt:
"This is also explicitly encouraged by groff_man(7):
   FILES
     an-ext.tmac
       Note that the definitions for these macros are read after the
       call of TH, so they will replace macros of the same names
       given at the beginning of your file.  If you must use your
       own definitions for these macros, they must be given after
       calling TH.

Yes, that will cause a bit of churn on their side because all manuals need a patch, but this doesn't affect only OpenBSD, all operating systems using a modern groff that has an-ext.tmac enabled by default will suffer from the same clash."
User Comments: jan.nijtmans added on 2013-11-05 12:58:51: (text/x-fossil-wiki)
Of course, I meant:

Fixed in core-8-5-branch [5145f9b673] and trunk [92ff51d4b5]

jan.nijtmans added on 2013-11-05 12:55:57: (text/x-fossil-wiki)
Fixed in core-8-5-branch [426679ef7d] and trunk [92ff51d4b5]

stwo added on 2013-11-05 04:28:55:
Debian (partially?) fixes this by renaming Tcl's OP macro to OOP in all man pages.
It may be worthwhile to consider changing some macros to names that don't have conflicts with macros in common *roff macro packages.
Still, that wouldn't obviate the need to move man.macros to after TH.