On Mon, Nov 16, 2020 at 10:46:45AM +0100, Patrice Dumas wrote: > On Mon, Nov 16, 2020 at 07:09:57AM +0000, Gavin Smith wrote: > > On Mon, Nov 16, 2020 at 12:43:33AM +0100, Patrice Dumas wrote: > > > > > > It is done. The test results are not synced anymore (in particular > > > because > > > the @end displaymath disappeared in texis results), but it doesn't make > > > much > > > sense to sync them, the XS parser should be changed instead. > > > > > > A side effect of that change is that the @-commands in general are now > > > formatted in @displaymath, but I think that we do not really care, > > > in general @-commands should not appear in @displaymath. > > > > I will look it in the next few days but the XS parser and Perl parser > > need to be kept in sync, otherwise the XS parser will become useless. > > Of course. That's why I left the test results as is they should be > synced with the XS parser.
I've attempted to mirror what you've done in the XS code, and updated the tests. I still haven't gotten around to working out how to run the tex4ht and latex2html tests, so could you regenerate those and check the changes look OK? What is the thinking behind saying that @math is a "context brace" command? That means that it can contain several paragraphs (like @footnote). In the XS code I used less slightly less general code (as I did for the other code too), preferring to reference commands by name rather than referring to them via classes of command. As command flags are represented by a bitmask the number of them is limited, but this has a benefit as well in keeping things simple.