-
Notifications
You must be signed in to change notification settings - Fork 555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pod2man uses CW font, no longer enabled in groff by default #21239
Comments
What output put were you getting with this command in earlier versions of I ask because when I run your command with my existing, installed versions of
|
That's correct, previous versions had the CW font enabled, and would alias it to a font, so no warnings were issued about CW. Although the commentary is that this didn't always work very well. Version 1.23 of groff changed this behaviour. |
My sample command was just to highlight the warnings being issued. The man page still renders as plain text if you drop the grep. I haven't tried viewing it as a PDF/DVI/PS/whatever, but I'd imagine that the text that is supposed to be rendered with the CW font will now continue to use the previous font instead. |
Absolutely not. Code/verbatim sections must be constant width, making them proportional (R=Roman) is not helpful at all. If I understand this correctly the GNU people want you to explicitly select a specific font, instead of the generic constant width one. This is inherently unportable and I have no idea why the GNU people want to be this user-hostile. Why break something that has worked literally 50 years? FFS. |
With my comment about R, I was merely repeating what had been suggested elsewhere. Searching for "CW" in the groff commits, it appears they've been working on eradicating CW for a number of years. For example: https://lists.gnu.org/archive/html/groff-commit/2020-07/msg00014.html |
That sounds like we should probably be using |
Trying to change font families in a terminal (note use of
Wow, you're getting pretty carried away here. I develop groff and I committed this change, so I'm the "GNU person" you are excoriating here. And I made the change because "CW" is not a portable font name. You won't find it anywhere in the Version 7 Unix (1979) man pages: that's when and where the
But before one leaps up to proclaim this precedent as binding on everyone forever more (too late), one should also look at what else was going on in the 1980s. Namely, BSD Unix and Adobe PostScript--which supported neither this approach, nor these tools, nor the restriction of a single monospaced typeface. The Meanwhile, PostScript popularized (apparently to the point of market dominance in digital fonts for Adobe's partner foundries) the practice of arranging text fonts into families of four styles each: roman (upright), italic (or oblique), bold, and bold-italic (or -oblique). The standard families were of serif, sans serif, and monospaced (serif) forms, better known by the names given to them by Adobe's partner foundries: Times, Helvetica, and Courier, respectively. AT&T troff, re-written for device-independence by Kernighan circa 1980 (and documented in Bell Labs CSTR #97) was expensive commercial software throughout its developmental life, and BSD Unix sites largely ignored it, often in favor of AT&T's best-known effort to extract licensing revenue from R, I, B, BI (Times) Not perfectly orthogonal. Easy to forget the exceptions to the rough naming rules. (By the time of DWB 3.3, at least, several other families were available, but I will not discuss them here.) When James Clark developed groff in the period 1989-1991, he settled on the following alternative naming scheme. TR, TI, TB, TBI (Times) (AT&T Further, by adding features to the formatter itself ( The reader may be well past the point of asking, "so what?", and up to a point, I can sympathize. This stuff matters because there is a worse problem. On top of the font names not being portable, there is also no portable way to ask It gets worse. troff formatters keep track of the previously selected font, so you can do quick alternations Now consider whether our man document can predict what state it will be in after selecting font The bottom line is that it is not portable to set portions of man pages in a monospaced font. So, re-evaluating your highly confident assertions:
The original implementation of man had no provision for "code/verbatim sections", nor for selection of a constant-width font. See if you can find mention of either in Version 7 Unix's man(7) document.
Nothing is proportional on a terminal emulator. If you read typeset man pages, I applaud you, but the fact remains that there is no means of obtaining monospaced and proportional fonts in the same man(7) document with universal portability to man implementations.
Your frustration would be better directed at yourself for going off without having a command of the facts first. For what it's worth, I've worked fruitfully with podlator/pod2man maintainer Russ Allbery before. You'll understand if I struggle to hold similar expectations of you. FFS, as it were. [^1] You could create a |
I wouldn't quite say it's a campaign of "eradication", but it is becoming harder to support. The only System V-descended proprietary Unix we (groff developers) were able to directly evaluate for the 1.23.0 release was Solaris. Solaris 11 switched to groff. Solaris 10 was going to be end-of-lifed next year (early 2024) but has received a stay of execution (to 2025). Even with that vote of...confidence... from Oracle, I kind of get the feeling they won't be patching their System V troff for any reason. The "CW" font name seems to be mostly be cruft in 2023, and there are ways people (or distributors!) can patch their systems to support it in groff if they really need to somehow coexist with a historical troff implementation, or render historical troff documents that require the name and can't be updated. For instance,
in groff's troffrc file, for general use, or its man.local or mdoc.local files if one wants to restrict this to man pages, should work just fine. The latter (if in nroff mode--that is, formatting for a terminal), is the solution suggested by groff 1.23.0's stock man.local file, and adopted by Debian in its groff 1.23.0-2 package release. Possibly this is an item I'll need to add to groff's PROBLEMS file, or maybe the underlying issue is that man page authors don't have a good grasp of the font system. man(7) authorship seems to be heavily freighted with cargo-cult practices. I've tried very hard to make the groff_man(7) page a solution to this problem; time will tell if my efforts make a dent. |
Hi Branden, First off, thank you for the detailed background on the history of CW, and the reasoning behind the change in groff. I had gathered only fragments of this from my investigation into the disabling by default of CW.
I was not meaning to cause offence to anyone with my use of "eradication", I was merely trying to point out (perhaps poorly) that this has been an on-going work within groff for a number of years. I would have liked to have been able to point to a bug/issue that discussed it but couldn't find one in my, admittedly brief, searching to justify why pod2man should change. I agree that distributions can re-enable CW, and I'm the one who suggested that in the Debian bug issue for the groff-base package linked to after reading that in the sample config file. ;) I also agree with Colin Watson that Debian should not carry this change long term (nor should other distros), and your background lesson above gives me good reason to more strongly agree with Colin. I see this as a short term fix within Debian while our man pages are updated. Perhaps Debian was the litmus test here since Colin uploaded groff-base 1.23.0-1 within a few weeks of the release of groff 1.23 and I just happened to build a Perl package within hours of groff-base entering Debian unstable.
I was a little surprised to find no mention of disabling CW in the release notes, or even really in the ChangeLog. It was only when I grep'ed the installed files that I found information about the change to CW. However, the packages that use CW should also be changed, hence why I created this bug report. It seems to me that if the desire is to have pod2man continue to use monospaced fonts when available, then the same logic as included in https://gitlab.com/man-db/man-db/-/commit/bbf7701c4f8269090a12791f3c9bde80d45c8765 is the approach to take within the documents that pod2man generates. Kind regards, and thank you for continuing to maintain and improve a core tool for so many of us. PS. I used to have physical manual pages that came with an ICL Unix system, but sadly the manuals were destroyed during a flood causing by a dodgy washing machine. |
Hi Andrew, and thanks! It is not an easy subject to master. Since I jumped into groff development in 2017 I've found myself having to write more documentation than I ever expected, to gather historical information, correct myths and misconceptions, fix errata (verily, even in storied scripture like CSTR #54), and construct a (one hopes) coherent narrative from which one can learn the software suite, its history, and the reasons behind some of its more bizarre features.
I took no offense from anything you've written. I was irked by the "Absolutely not/user-hostile/GNU" comment posted by another contributor, a remark that seems to have come directly from a Dunning-Kruger model armchair.
Russ Allbery discussed the issue with the groff community late last year (November, December). Generation of portable man(7) is a challenging problem with many constraints, and Perl has to be portable to as many places as groff would like to be, maybe more. A point that I don't think is noted above is that this diagnostic message, Where this change, like others in groff 1.23.0, seems to be causing consternation is in automated test harnesses that are extremely, perhaps excessively, sensitive to changes in diagnostic output. When that happens the solution is not to panic but to research the issue, try to understand it, and then decide if it can be ignored. If you design an automated test for extreme sensitivity, expect it to squawk for benign reasons from time to time. A similar issue arose in Debian's continuous integration infrastructure, because a man page had a table entry that was one character cell too wide (overrunning the line length) and I modified the English in the diagnostic message for groff 1.23.0. I reported it, the package maintainer took it even more seriously than I did (which is saying quite a bit, since the issue blocked the progress of Debian's groff 1.23.0 packages into its "testing" suite), and with my explanation and recommended fix was able to swiftly resolve the issue. That, IMO, is a model for how these sorts of issues should be handled.
Thank you! It renews my hope when people read the bits of assistance I try to prepare for them. :D
I'm okay if you adopt more optimism than I do on this front. ;-)
I was impressed that several distributors got it packaged in the interval between its tagging in Git and our maintainer's release announcement. On the downside, a change many distributors (including Arch and several of its derivatives) made to their
It has been really hard for me to gauge its breadth of use. I don't know of a place that will (1) give me
I hope Russ will continue to regard me (and the groff mailing list) as a resource for crafting something adequate, if he decides it's worth the trouble.
I appreciate your feedback. So far, the world hasn't blown up--people are simply upset by diagnostic messages. Imagine what they would say if they also used
Argh. I recently suffered the loss of a handful of books to water damage myself. It's painful. The manual was intended to be typeset; some detail is sacrificed on terminals. (man(1), Unix Time-Sharing System Programmer's Manual, Eighth Edition, February 1985) Regards, |
Hi Andrew, I neglected to reply clearly to this point. The reason there was nothing in the release notes (the NEWS file) about this is because there was no change to formatting operations. What happened is that groff 1.23.0 produces diagnostics in more cases when it cannot honor input requests. Here are a couple of relevant commits (1, 2). We're continuing to improve our diagnostic story post-1.23.0 (3). When I said in my previous comment, "[a] point that I don't think is noted above is that this diagnostic message, I hope I've managed to be less opaque. Regards, |
To clarify my comment of 27 July, here is the exact commit responsible for the warning groff now produces that is the topic of this issue. https://git.savannah.gnu.org/cgit/groff.git/commit/?id=1986da1d4bb11dc0421e004b153729b3d2a2a3ca |
Hi Branden, Thank you, I think your explanations are very clear. I'm not a dev on the perl project, so up to someone else to determine what to do in pod2man. Another option to resolve this in Debian is, perhaps we raise a bug against lintian since I think you're right that lintian is perhaps a bit twitchy. Cheers, |
Hi Andrew,
I appreciate being told that--it is a major concern of mine, since I consider myself something of a technical writer.
That's been proposed in a Debian ticket, and is proceeding as far as I know (or at least the intent is formed and no one's been talked out of it). Regards, |
While that Debian ticket was a very interesting (and entertaining) read, it is related to the I've checked the bugs for both lintian and groff-base and see no relevant bugs. |
Whoops. I've been responding to a few different observations about groff 1.23.0 behavior, and managed to get my wires (and URLs) crossed here.
I think a lintian ticket was kicked around for a while as an idea but no one actually filed one. So I did, as Debian #1051357. |
There was considerable informed discussion in this ticket, but AFAICT the only change in code suggested was a change in the default fixed-width font for I will take this ticket for the purpose of closing it within 7 days unless there is serious objection. |
Hi @jkeenan,
Yes. I've been piloting an alternative in Thomas Dickey's ncurses package, which, like Perl, needs to be portable to some of the world's crustiest Unix systems. So far, this definition of a
Sounds reasonable to me. |
In groff v1.23 which was released this month, the CW font is disabled by default as we discovered in Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040975 . It appears to be this commit https://git.savannah.gnu.org/cgit/groff.git/commit/?id=15f8188656ef0ebed797eb5981b012b590fc77ad which disabled CW and this commit shows how to re-enable it: https://git.savannah.gnu.org/cgit/groff.git/commit/?id=5278dee79a180a453a73d54ec4cc7e164dafcdd5 .
Running pod2man with groff v1.23 I now get these warnings:
While we have resolved this in Debian for now by re-enabling CW, this may hit other operating systems.
It seems that pod2man should use a different font than CW, perhaps R?
The text was updated successfully, but these errors were encountered: