-
Notifications
You must be signed in to change notification settings - Fork 499
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
Spanning table columns can extend beyond the edge of the page #1368
Comments
The problem here is when there isn't at least one row that has cells without colspans. That seems to throw off the calculation for the individual column widths. |
Keep in mind that the column widths are ratios. So they don't have to add up to 100. Though, clearly the computed widths do need to add up to the available space. |
Here's the most minimal case:
|
It turns out, prawn-table is computing the width of the columns even when we pass it the precomputed column widths. (I have no idea why). And since there's clearly a bug in the column width calculation in certain scenarios when colspan is used, the table ends up with incorrect column widths that overrun the width of the page. I'll update the converter to force prawn-table to use the column widths that we give it. While that doesn't fix the computation in prawn-table, it does sidestep it. What that means is that this could still happen if you set the |
…n column width calculation when using colspans
…n column width calculation when using colspans
It turns out that prawn-table does make this mistake when the
For all the cases I can come up with so far, this patch fixes the problem. |
Related issue
May be a duplicate of #900.
Asciidoctor file
Theme
Using the default theme.
Command
Result
The text was updated successfully, but these errors were encountered: