Hi Paul & Branden, On Sun, Mar 17, 2024 at 03:07:49PM -0700, Paul Eggert wrote:
On 2024-03-17 12:06, G. Branden Robinson wrote:
Can I ask how the existing system of measurement units in *roff is unsatisfactory for your application?
Previously, tzfile.5 used only directives like ".IP *", ".IP * 2", ".RS", and ".RE" to control indenting. But after Alex suggested here:
https://mm.icann.org/pipermail/tz/2023-October/033116.html
that we switch to ".IP * 3", I noticed that the resulting PDF output had too much white space around the "*", even though the nroff output looked sorta OK. (The problem had already been present with "2", but it got worse with "3".) The problem got even a bit worse if I used "\(bu" instead of "*". So the patch I installed computed widths with \w instead. See:
https://mm.icann.org/pipermail/tz/2023-October/058168.html
I bring all this up because as a man(7) macro language advocate and (unpaid) instructor, I strive to keep the language's expression as simple as possible.
Yes, if users don't care about PDF or varying-width HTML output there's no point to using \w here.
I didn't want to suggest changing that, as it's personal taste. I personally don't find the indentation of IP \[bu] 3 that we use in the Linux man-pages, but then we don't wrap that in RS 2, so it's not an apples-to-apples comparison. In case you want to have a quick look at how it looks, here's an example from the Linux man-pages: <https://www.alejandro-colomar.es/share/dist/man-pages/git/HEAD/man-pages-HEA...> I personally think it's fine what you're doing, and don't find your output ugly. Yeah, the souorce code is... meh. But it looks reasonable to me. It's sad that some programs crash on that input.
The TZDB man pages already used \w for other things (lining up code and tables). Although a man page formatter that can't handle \w may be out of luck with \w in .IP directives, they were out of luck already.
Actually not. Surprising as it may be, Debian's man2html(1) could handle (probably by ignoring them; I didn't really check) previous uses of \w, but started crashing with \w in IP. Did you receive a copy of the Debian bug report? Have a lovely day! Alex -- <https://www.alejandro-colomar.es/> Looking for a remote C programming job at the moment.