From: Alex F. <afo...@us...> - 2022-02-11 21:25:04
|
Here is what I have tried, all in combination with :width: 100%: With no :widths:, all columns in HTML output are 13%, so the last column is too narrow. In LaTeX output, the table doesn't fit the page width (:width: 100% seems to be ignored). With :widths auto, the column widths in HTML are not specified, and hence the columns are all different widths, depending on the contents. In LaTeX output, the table doesn't fit the page width (:width: 100% seems to be ignored). With :widths: 1 1 1 1 1 1 1 1 or :widths: grid, all columns in HTML output are 13%, so the last column is too narrow. In LaTeX output, the table fits the full page width and all columns are the same width. Also note that I am using docutils via sphinx, I'm not sure if sphinx messes with anything in between. --- ** [bugs:#444] Table column width rounding can result in uneven column widths** **Status:** open **Created:** Thu Feb 10, 2022 06:13 AM UTC by Alex Forencich **Last Updated:** Thu Feb 10, 2022 06:18 AM UTC **Owner:** nobody In the HTML generated for a table with 8 equal-width columns, the column widths in the generated colgroups are all rounded up from 12.5% to 13%, resulting in the last column being much too narrow (0.5 * 7 = 3.5, 3.5/12.5 = 0.28, so the accumulated error is almost 30%). The fix would be to revise the rounding in `depart_colspec` in `_html_base.py` to produce at least one decimal place, instead of rounding to the nearest integer. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |