Embedded Objects xhtml tests failing due to xmllint

Thibaut Cuvelier dourouc05 at gmail.com
Tue Jan 10 23:43:24 UTC 2023


On Wed, 11 Jan 2023 at 00:15, Thibaut Cuvelier <dourouc05 at gmail.com> wrote:

> On Tue, 10 Jan 2023 at 04:11, Scott Kostyshak <skostysh at 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&#x2009;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.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20230111/6fc0a082/attachment.html>


More information about the lyx-devel mailing list