docs: eliminate troff warnings in man page generation#10950
Conversation
The man page cat build emitted several classes of troff/groff warnings: - 'cannot select font C/V': Pandoc renders code/verbatim text in the Courier font family, which the nroff/tty device lacks. Add src/man_fontfix.tmac (injected via --include-in-header) to remap those fonts to available ones on devices without Courier. - 'tbl preprocessor failed': the OPTIONS tables need tbl; add -t. - 'character with input code N not defined' / mojibake: non-ASCII README content (e.g. accented author names) was decoded as Latin-1. Run the build in a UTF-8 locale and render with 'groff -Kutf8 ... -Tutf8'. - 'table wider than line length': Pandoc sizes tables at nearly full width while the man body is indented; narrow the indent with -rIN=4n. Register man_fontfix.tmac as a Bazel input for //docs:man_pages. Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
There was a problem hiding this comment.
Code Review
This pull request improves the documentation build system by introducing a font remapping mechanism (man_fontfix.tmac) to silence font selection warnings, running the build in a UTF-8 locale, and using groff with proper encoding and formatting flags for generating cat files. It also removes outdated FAQ sections across multiple tool READMEs and reformats various markdown tables. The review feedback suggests further optimizing the column width allocations in several markdown tables by adjusting the relative number of dashes in the separator rows, which ensures better readability and prevents excessive wrapping of descriptions in the generated man pages.
For the module docs that render as man pages (cgt, est, ram, syn, tap, web), Pandoc derives roff table column widths from the relative number of dashes in the Markdown separator row. The uniform '| ----- | ----- |' separators forced a 50/50 split, leaving the short 'Switch Name' column half-empty while squeezing the long descriptions. Size column 1 to the longest option name, capped so the description keeps the majority of the width. Modules excluded from man-page generation are left unchanged -- their dash ratios have no effect on any rendered output. Also drop the 'Check out GitHub discussion' FAQ footers, whose long inline URLs were not usable as links in man/cat output. Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
|
Thanks for the review. Addressed the column-width feedback, with one scoping correction: Most of the flagged tables (pdn, cts, gpl, mpl, grt, rsz, upf, rcx) are in modules listed in For the modules that do render man-page tables ( The FAQ footer removals are unrelated to column widths and are kept. |
13b56a5 to
fdef3d0
Compare
|
/gemini review |
|
@codex review |
There was a problem hiding this comment.
Code Review
This pull request improves documentation generation by running the build in a UTF-8 locale, introducing a font-remapping snippet (man_fontfix.tmac) to prevent font errors on devices lacking Courier, and updating the Makefile to use groff instead of nroff for generating cat files. Additionally, it removes outdated FAQ sections and formats option tables across several tool READMEs. Feedback on the changes suggests defining groff as a customizable variable (GROFF ?= groff) in the Makefile to improve portability, removing the unused NROFF variable, and using $(GROFF) in the recipes instead of hardcoding the executable.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fdef3d0a09
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Define GROFF ?= groff and use it in the cat recipes so the man renderer can be overridden (e.g. gnroff/macOS); drop the now-unused NROFF variable. - Detect an installed UTF-8 locale instead of hard-coding C.UTF-8, which is absent on some hosts (e.g. stock macOS). Fall back to the user's locale if none is found rather than exporting an invalid LC_ALL. Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
|
Addressed the Makefile review feedback:
Note: the earlier inline comments on Verified |
|
To use Codex here, create an environment for this repo. |
129e8ee
into
The-OpenROAD-Project:master
Summary
The man page (
cat) build emitted several classes of troff/groff warnings. This makes the doc build warning-free and improves the rendered tables.Build tooling (
docs/)cannot select font 'C'/'V'— Pandoc renders code/verbatim text in the Courier font family, which the nroff/tty device lacks. Addeddocs/src/man_fontfix.tmac(injected via--include-in-header) to remap those fonts to ones available on devices without Courier. Registered as a Bazel input for//docs:man_pages.tbl preprocessor failed— the OPTIONS tables needtbl; added-t.character with input code N not defined/ mojibake — non-ASCII README content (e.g. accented author names like "Povišer") was decoded as Latin-1. The build now runs in a UTF-8 locale and renders withgroff -Kutf8 … -Tutf8.table wider than line length— Pandoc sizes tables at nearly full width while the man body is indented; narrowed the body indent with-rIN=4nso they fit.README content
| ----- | ----- |separators forced a 50/50 split, leaving the shortSwitch Namecolumn half-empty in rendered man pages. Column 1 is now sized per-table to its longest switch name (147 tables).Check out GitHub discussionFAQ footers, whose long inline URLs were not usable as links in man/cat output.Verification
Full
make doc catunder a CI-likeClocale now emits 0 warnings of any class.