On Wed, 11 Jan 2023 at 00:15, Thibaut Cuvelier <dourou...@gmail.com> wrote:
> On Tue, 10 Jan 2023 at 04:11, Scott Kostyshak <skost...@lyx.org> wrote: > >> I'll paste the errors at the bottom of this message. Thibaut, is this >> related to recent work? >> > > It's highly likely, I'm having a look! > That problem should be fixed at fb70f89983 . However, multicolumn still has deficiencies between LaTeX and XHTML. Within the same document, the table 2.30 ("Several table cell alignments.", tab:Several-table-cell), here is the XHTML output for the header: <tr> <td style='text-align: center; vertical-align: top; border-bottom: 1.000000px solid; border-right: 1px solid' colspan='2'><div class='plain_layout' id='magicparlabel-7013'>units</div> </td> <td style='text-align: center; vertical-align: top; border-bottom: 1.000000px solid' colspan='2'><div class='plain_layout' id='magicparlabel-7025'>relations</div> </td> <td style='text-align: left; vertical-align: top; border-right: 1px solid' ><div class='plain_layout' id='magicparlabel-7034'>24 bottles</div> </td> </tr> The interesting part is the missing colspan for the last column ( magicparlabel-7034). It looks like isMultiCol does very few checks compared to the LaTeX code to decide when to output \multicol. For LaTeX, here is the code to decide whether a cell spans several columns: ismulticol = (isMultiColumn(cell) || (c == 0 && colleft != leftLine(cell)) || ((colright || nextcolleft) && !rightLine(cell) && !nextcellleft) || (!colright && !nextcolleft && (rightLine(cell) || nextcellleft)) || (coldouble != celldouble)) && !decimal; // we center in multicol when no decimal point if (decimal) { docstring const align_d = column_info[c].decimal_point; DocIterator const dit = separatorPos(cellInset(cell), align_d); bool const nosep = !dit; ismulticol |= nosep; celldouble &= nosep; } The XHTML only does isMultiColumn(cell). However, I don't understand this code. Some parts are due to support for bidirectional text, but that's it. Shouldn't Tabular::isMultiColumn be updated to do more work, just like Tabular::TeXCellPreamble? (Also, the generation of paragraph IDs is broken, as several rows have the same ID for the same column. That seems to be due to different paragraphs having the same internal ID, Paragraph::Private::id_. This problem is more general that just XHTML, though.)
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel