Closed proski closed 1 year ago
Hi! This is related to the print style of mdbook's theme and is not controlled by our backend. You can raise an issue about this there so that this can be fixed. You can also try to change the print themes into some dark themes, such as coal
, by setting flags in your book.toml, just like https://github.com/HollowMan6/mdbook-pdf/blob/main/test_doc/book.toml#L23-L24:
[output.pdf]
print-background = false
theme = "coal"
I was able to get good results by doing following steps:
mdbook init --theme
in the Rust book repositorybook.toml
by running git checkout book.toml
output.pdf
section to book.toml
theme/css/print.css
and comment out -webkit-print-color-adjust: exact;
mdbook build
An alternative approach is to adjust background-color
in the same file. #666666
is too dark when the foreground is black. #cccccc
looked better, but I'd rather not see any custom backgrounds.
Changing print-background
and theme
under [output.pdf]
didn't produce good results in any combination.
Yeah! Thanks for providing the detailed steps to fix this. Glad you find the issue to discuss with the upstream!
The issue is fixed in mdbook 0.4.33.
The PDF files produces by mdbook-pdf use gray background for
code
quotes in titles. It's a visual annoyance. The HTML is using white background in the light theme for everything, including titles and code in them, so I would expect the same in PDF. Worse yet, some PDF viewers make that text completely invisible, e.g. ReadEra on Android in the Twilight theme (which is my preferred way of reading Rust books).I'm using be current mdbook (0.4.32) and mdbook-pdf (0.1.17). I'm running them on MacOS 13.4.1 with Chrome 115.