groff-commit
[Top][All Lists]
Advanced

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

[groff] 16/72: PROBLEMS: Update advice re: a clever man(7) trick.


From: G. Branden Robinson
Subject: [groff] 16/72: PROBLEMS: Update advice re: a clever man(7) trick.
Date: Sun, 23 Oct 2022 22:25:35 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 7ae13b8817df5a4c9dc4f4d3c5793973ec8c2d1a
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Oct 20 06:36:25 2022 -0500

    PROBLEMS: Update advice re: a clever man(7) trick.
---
 PROBLEMS | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

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



reply via email to

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