On Wed, Jan 04, 2023 at 01:59:26PM +0100, Patrice Dumas wrote: > On Mon, Jan 02, 2023 at 09:39:33AM -0800, Raymond Toy wrote: > > On Sun, Jan 1, 2023 at 10:12 AM Patrice Dumas <pertu...@free.fr> wrote: > > > > > I do not remember any discussion about that. But it is not clear to me > > > what should be done. There is no obvious way to get the width of > > > rendered text in HTML. > > > > > > > > I am no HTML expert, but couldn't you create a hidden row containing the > > prototype text for each column? > > I don't know how to do that. An additional constraint is that, at least > for the default output, it should look ok with no CSS, so if an header > pops up when there is no CSS this is not good.
Something like it appears to be possible with CSS: <table class="multitable" style="table-layout: fixed"> <tr style="visibility: collapse"> <td>greater than or equal to 333</td> <td>notequal 333</td> <td>relational function</td> </tr> <tr><th>Operation</th><th>Symbol</th><th>Type</th></tr> <tr><td>less than </td><td><code class="code"><</code></td><td>relational infix</td></tr> <tr><td>less than or equal to</td><td><code class="code"><=</code></td><td>relational infix</td></tr> <tr><td>equality (syntactic)</td><td><code class="code">=</code></td><td>relational infix</td></tr> </table> although the prototype row was not strictly observed in the testing I did in Chromium - columns could be wider than needed in the text in the prototype row, so I am not sure what affect if any the "table-layout: fixed" setting is having. "Table and column widths are set by the widths of table and col elements or by the width of the first row of cells. Cells in subsequent rows do not affect column widths." https://developer.mozilla.org/en-US/docs/Web/CSS/table-layout The "visibility: collapse" setting means the row is invisible and does not take up any space, but still affects the table layout and column widths. I doubt this will be much use, anyway, as we want the output to look good without CSS.