bug-ncurses
[Top][All Lists]
Advanced

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

[PATCH 2/7] man/toe.1m: Permit tables to use the full line length.


From: G. Branden Robinson
Subject: [PATCH 2/7] man/toe.1m: Permit tables to use the full line length.
Date: Sat, 20 Jan 2024 08:52:20 -0600

These tables, used to present an example of command output, strain the
limits of an 80-column terminal, so tbl(1)'s default line length was too
conservative.

tbl(1):
     If w or x modifiers are not specified for all columns of a text
     block’s span, the default length of the text block (more precisely,
     the line length used to process the text block’s diversion) is
     computed as L×C/(N+1), where L is the current line length, C the
     number of columns spanned by the text block, and N the number of
     columns in the table.

These tables were using neither 'w' or 'x' modifiers, and had one
column.  Assuming an 80-column terminal, we evaluate the above
expression as (80*1)/(1+1) = 40.  On the still popular 78n terminal
width default used by man-db man(1)[1] (and mandoc(1)[2]), tbl would set
the text block with a width of 39 ens.

Thanks to Thomas Dickey for the report.

[1] https://gitlab.com/man-db/man-db/-/merge_requests/11
[2] https://man.openbsd.org/mandoc.1
---
 man/toe.1m | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/man/toe.1m b/man/toe.1m
index 4f8032113..480fb5511 100644
--- a/man/toe.1m
+++ b/man/toe.1m
@@ -168,7 +168,7 @@ .SH EXAMPLES
 .PP
 .\" toe -a | grep -E '^(xterm|vt)'
 .TS
-Lf(\*(CW)2 Lf(\*(CW).
+Lf(\*(CW)2 Lf(\*(CW)x.
 xterm\-color   generic color xterm
 xterm\-xfree86 xterm terminal emulator (XFree86)
 xterm\-vt220   xterm emulating vt220
@@ -196,13 +196,13 @@ .SH EXAMPLES
 .PP
 .\" toe -as | grep -E '(^-+>|:.(xterm|vt))'
 .TS
-lf(\*(CW).
+lf(\*(CW)x.
 \-\-> /etc/terminfo
 \-\-\-\-> /lib/terminfo
 \-\-\-\-\-\-> /usr/share/terminfo
 .TE
 .TS
-lf(\*(CW)1 lf(\*(CW)2 lf(\*(CW).
+lf(\*(CW)1 lf(\*(CW)2 lf(\*(CW)x.
 \-\-*\-\-\-:   vt100   dec vt100 (w/advanced video)
 \-\-*\-\-\-:   vt102   dec vt102
 \-\-*\-\-\-:   vt220   dec vt220
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature


reply via email to

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