gbranden pushed a commit to branch master
in repository groff.

commit b703358d254d77e5a1fa6c0d4caffd7c563d1a86
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Sep 10 22:45:48 2024 -0500

    tbl(1): Document limitation of long standing.
    
    ...but little mention.
---
 ChangeLog                 |  5 +++++
 src/preproc/tbl/tbl.1.man | 11 +++++++++++
 src/roff/troff/env.cpp    |  6 ++++--
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f4471da78..73a84c025 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-09-10  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/env.cpp (indent, temporary_indent): Report
+       amount of computed indentation when warning of negative value.
+
 2024-09-10  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/input.cpp
diff --git a/src/preproc/tbl/tbl.1.man b/src/preproc/tbl/tbl.1.man
index 897f4e213..4a06a69ec 100644
--- a/src/preproc/tbl/tbl.1.man
+++ b/src/preproc/tbl/tbl.1.man
@@ -1573,6 +1573,17 @@ interpret the uninterpreted leader escape sequence
 .SH Limitations
 .\" ====================================================================
 .
+In table entries,
+do not use
+.I roff
+escape sequences that read to the end of the line,
+like
+.B \[rs]\[dq]
+or
+.B \[rs]!\& .
+.
+.
+.P
 Multi-page tables,
 if boxed and/or if you want their column headings repeated after page
 breaks,
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index bd7616603..a087bc601 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -1578,7 +1578,8 @@ void indent()
   hunits temp;
   if (has_arg() && get_hunits(&temp, 'm', curenv->indent)) {
     if (temp < H0) {
-      warning(WARN_RANGE, "indent cannot be negative");
+      warning(WARN_RANGE, "treating %1u indentation as zero",
+             temp.to_units());
       temp = H0;
     }
   }
@@ -1606,7 +1607,8 @@ void temporary_indent()
   if (want_break)
     curenv->do_break();
   if (temp < H0) {
-    warning(WARN_RANGE, "total indent cannot be negative");
+    warning(WARN_RANGE, "treating total indentation %1u as zero",
+           temp.to_units());
     temp = H0;
   }
   if (is_valid) {

_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to