From 7ae13b8817df5a4c9dc4f4d3c5793973ec8c2d1a Mon Sep 17 00:00:00 2001 From: "G. Branden Robinson" Date: Thu, 20 Oct 2022 06:36:25 -0500 Subject: PROBLEMS: Update advice re: a clever man(7) trick. --- PROBLEMS | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'PROBLEMS') diff --git a/PROBLEMS b/PROBLEMS index 697c3c486..dc398e3db 100644 --- a/PROBLEMS +++ b/PROBLEMS @@ -248,25 +248,31 @@ in the \n[rst] and \n[rsb] registers; these are groff extensions. ---------------------------------------------------------------------- * While formatting a manual page, groff complains about not being able - to break lines. The problem seems to be caused by a line like: - .TP \w'label'+2 + to break lines. A line like the following seems to cause this. + .TP \w'label'+2 -The -man documentation says that the default scaling indicator for TP -macro is `n'. The groff -man macros implement this correctly, so that -the argument is evaluated as if it were +The groff_man(7) man page says that the default scaling unit for the +`TP` macro is 'n' (ens), and that is how the groff man macros are +implemented. Consequently, the macro argument above is evaluated +equivalently to this expression. \w'label'n+2n -The Unix -man macros don't implement this correctly (probably because -it's hard to do in Unix troff); they just append `n' to the entire -argument, so that it is evaluated as if it were +AT&T troff's man macros don't implement this correctly (probably because +it's hard to do in that troff); instead, they append 'n' to the entire +argument, so that it is evaluated as if it were written as follows. \w'label'u+2n -The solution is to fix the manual page: +The solution is to fix the manual page. .TP \w'label'u+2 +It might be better still to avoid such computations in macro arguments, +however; programs that are not *roff formatters that attempt to +interpret man pages can lack the ability to interpret numeric +expressions. See section "Portability" of groff_man_style(7). + ---------------------------------------------------------------------- * I'm having problems formatting man pages produced by the perl -- cgit v1.2.1