-
Notifications
You must be signed in to change notification settings - Fork 44
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
Long tables get truncated when not fitting on a page #50
Comments
@sexybiggetje I'm up against this too, but it seems to be a limitation of Weasyprint and not this plugin. That issue is 6 years old 😞 |
I managed to split such table into multiple pages with the attached modification to themes/material.py in Material theme doc. Yes, it's a quite dirty hack, but worked. |
Oops, I made a mistake in the path of the previous patch, please adjust accordingly. |
@akinmr Oh nice workaround! I've tested and confirmed that this works. You don't have to patch anything, just include a custom CSS file (or modify your existing one), and include this in the @media print block like so: mkdocs.yml extra_css:
- 'stylesheets/pdf.css' # for example, this would be the path to your stylesheet pdf.css @media print {
.md-typeset table:not([class]) {
display: block;
border: none;
}
} The increased specificity ( This workaround will only work for material design themes, but you could make it work with any theme by adapting the CSS selector. Probably could be refined further, particularly if the outside border is important, but this is an easy and acceptable workaround for my purposes. Thanks for figuring that out! |
Say you have a chapter called "Chapter about Tables", and you generate a table in it that's longer than the page. The table gets pushed to a new page, causing "Chapter about Tables" to be on it's own page with a lot of whitespace.
The table if longer than a page should continue on a new page, instead it's cut off at the bottom part of the page.
(Rename long-table.txt to .md)
long-table.txt
The text was updated successfully, but these errors were encountered: