On Tue, Jun 18, 2024 at 12:47:09AM +0000, Bjarni Ingi Gislason wrote:
>   The table was just changed from having the first column too narrow to being 
> too
> wide.
> 
>   What is wrong with using:
> 
> "1) use ".nf" before table, and ".fi" after it"

Well, I was trying to avoid it, because this is fine when you're only
considering the English text, but regrettably the lengths of translated
strings are not usually the same as the original, and in some cases can
be substantially longer.  This is also why I try to avoid hacks such as
calculating the widths of particular strings.

I apparently added the text blocks here in 2011, and I don't appear to
have written down exactly what the problem I was dealing with was.  In
some other similar cases I know that it was a problem with some
translated pages having overly-wide tables (as can be seen in
https://gitlab.com/man-db/man-db/-/commit/6124c25e87).  I suspect that I
might just have been trying to make the handling of translatable text be
the same across all tables in man-db's own manual pages.

(The .na and .ad were your additions in https://bugs.debian.org/726266,
but it seems that you didn't provide an explanation and I didn't ask for
one.)

Fundamentally, this is the old problem that text blocks in tbl are
formatted in a diversion whose width is calculated in advance, and in
the general case there's no very good way for manual page authors to
handle this.

However, despite all the above: in the intervening 13 years, no
translations seem to have arisen that use long enough translations for
these strings to cause the table to overflow 80 columns.  I believe
German comes closest by translating "bullet (middle dot)" to
"Aufzählungszeichen (middle dot)", and it still fits.  It's therefore
probably fine to abandon the idea of text blocks in this particular
case, and then neither .nf/.fi nor .na/.ad is needed to get reasonable
formatting.

I've simplified all this in
https://gitlab.com/man-db/man-db/-/commit/8c0076fa743fa015dbe2ea085eeddf78bde740c0,
and I think the formatting is now as good as I can get it.

Thanks,

-- 
Colin Watson (he/him)                              [cjwat...@debian.org]

Reply via email to