diff mbox series

[ovs-dev,v2,3/5] docs: Tweak width of name column in field property tables

Message ID ZM00cwx+ytJHB373@riva.ucam.org
State Changes Requested
Headers show
Series docs: Fix manpage-check warnings with groff 1.23.0 | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed

Commit Message

Colin Watson Aug. 4, 2023, 5:25 p.m. UTC
groff 1.23.0 has difficulty with hyphenating a number of the entries in
the name column of these tables when rendering in 80-column terminals.
Setting a minimum width for this column gives it an easier time.

Reported-by: Lucas Nussbaum <lucas@debian.org>
Reported-at: https://bugs.debian.org/1042358
Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
---
 build-aux/extract-ofp-fields | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Ilya Maximets Aug. 10, 2023, 11 p.m. UTC | #1
On 8/4/23 19:25, Colin Watson wrote:
> groff 1.23.0 has difficulty with hyphenating a number of the entries in
> the name column of these tables when rendering in 80-column terminals.
> Setting a minimum width for this column gives it an easier time.
> 
> Reported-by: Lucas Nussbaum <lucas@debian.org>
> Reported-at: https://bugs.debian.org/1042358
> Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
> ---
>  build-aux/extract-ofp-fields | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/build-aux/extract-ofp-fields b/build-aux/extract-ofp-fields
> index 808c6527d..449885981 100755
> --- a/build-aux/extract-ofp-fields
> +++ b/build-aux/extract-ofp-fields
> @@ -322,7 +322,11 @@ def group_xml_to_nroff(group_node, fields):
>          '.SS "Summary:"\n',
>          ".TS\n",
>          "tab(;);\n",
> -        "l l l l l l l.\n",
> +        # Hardcoding a width of 15 ens is a bit of a hack, but it's wide
> +        # enough to avoid causing troff difficulty with hyphenating long
> +        # identifiers, while still looking reasonable when formatted in wide
> +        # terminals.
> +        "lw15 l l l l l l.\n",

15 is not actually enough, there are a few that still get hyphenated.

>          "Name;Bytes;Mask;RW?;Prereqs;NXM/OXM?\n",
>          "\_;\_;\_;\_;\_;\_\n",
>      ]
diff mbox series

Patch

diff --git a/build-aux/extract-ofp-fields b/build-aux/extract-ofp-fields
index 808c6527d..449885981 100755
--- a/build-aux/extract-ofp-fields
+++ b/build-aux/extract-ofp-fields
@@ -322,7 +322,11 @@  def group_xml_to_nroff(group_node, fields):
         '.SS "Summary:"\n',
         ".TS\n",
         "tab(;);\n",
-        "l l l l l l l.\n",
+        # Hardcoding a width of 15 ens is a bit of a hack, but it's wide
+        # enough to avoid causing troff difficulty with hyphenating long
+        # identifiers, while still looking reasonable when formatted in wide
+        # terminals.
+        "lw15 l l l l l l.\n",
         "Name;Bytes;Mask;RW?;Prereqs;NXM/OXM?\n",
         "\_;\_;\_;\_;\_;\_\n",
     ]