LaTeXML icon indicating copy to clipboard operation
LaTeXML copied to clipboard

[inaccurate test] expansion/aftergroup

Open dginev opened this issue 3 years ago • 1 comments
trafficstars

I stumbled on a discrepancy between the XML and the PDF for t/expansion/aftergroup.tex, so I think we should revisit carefully each line of that test and sync up the latexml behavior.

The first difference I spotted was that the PDF has:

@ifundefined: No quirks [Assigned!]

while the XML is currently missing the content of \afterassignment:

    <para xml:id="S1.p6">
      <p>@ifundefined:
No quirks</p>
    </para>

There is also a discrepancy with csname, which expects content after.

This may be at least partially a version-specific regression, as I am seeing the checked in PDF differ from my locally generated one (texlive 2021). But even the checked in PDF has the mentioned behavior for @ifundefined.

dginev avatar May 05 '22 00:05 dginev

One of the missing pieces here is that \everyvbox and \everyhbox interplay with \afterassignment. To quote the TeXbook, exercise 24.7:

it will also come just before any tokens inserted by \everyhbox or \everyvbox.

texlive discrepancies aside, even a simple \bye will flush afterassignment, as it does a \supereject, which indeed creates a new vbox. I think in latexml territory we should likely flush out afterassignment on each call to \LTX@newpage, respectively.

There's more to the test discrepancies, but this is one of the bits.

dginev avatar May 05 '22 16:05 dginev