-
Notifications
You must be signed in to change notification settings - Fork 34
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
Non-portable font C #123
Comments
Debian bug #1043256 has even more context. |
This has been many-times discussed online, e.g.: jgm/pandoc#9020 The issue at heart is that the "C" font for roff (mandoc, groff, etc.) is non-standard across output devices. Prior to this change, lowdown was emitting the "C" font for constant-width fonts (those `in backticks`). These were being discarded by mandoc and groff when on the terminal, where "C" is unnecessary because everything is "C". Mandoc warned about it, but groff just silently let it go by until a recent version displayed a warning message. This introduces some changes. First, "C" is retained by default for -tms, although output as "CR" instead of "C". The rationale is that -ms is mostly used for formatting PDF/PS, which have the "C" font. Second, "C" is no longer used for -tman: instead, a bold font is used. However, the user can override this behaviour. (This will be documented in subsequent checkins.) The --nroff-code-font (not yet finalised) accepts a 4-tuple describing the constant width fonts, specifically "regular,bold,italic,bold-italic". This lets the user override the font that will be coded into the output. Three aliases exist: "none", "bold", and "code". "None" does not render a constant-width font at all, and simply uses the regular font. "Bold" uses a bold font (obviously if it's a **`situation like this`**, the bold is kept as-is). Finally, "code" uses the constant-width variants. References #123
Hi faidon. This is a tricky one... can you keep an eye on these commits and see if they work for you? pandoc uses an This, I think, sets some useful defaults while letting the user override the output, playing reasonably well with groff and mandoc. |
Thomas Dickey recently merged changes from me to his ncurses man pages that look like this.
This defines a roff string named "CW". Translated to English, this means...
This should cover all the bases.
The only aspect of this solution that I (and, I would guess, mandoc maintainer @ischwarze) don't like is the resort to conditional requests and string definitions, because as a general rule, employment of formatter requests in man pages makes them less portable. But there's really no way around this if one wants portability for this specific problem--the referenced pandoc issue explains why--without giving up the use of monospaced fonts altogether when typesetting man(7) pages, which people are generally not willing to do. groff man(7)'s macros |
|
If pandoc's going to make a stand on using |
Like pandoc, use the "C" family of fonts by default, with "CR" for the roman font. This followed pandoc's usage. References #123
If the new support looks good to you, please close out this issue. Thanks! |
LGTM! @g-branden-robinson may have more thoughts as the expert, but I'll stay optimistic and close the issue. |
This snippet:
With newer versions of groff, as they exist now in Debian unstable, emits these warnings:
Note that mandoc is also unhappy:
Debian bug #1041809 against rst2man, exhibiting similar behavior, provides some additional context.
The text was updated successfully, but these errors were encountered: