Good call with adding the complex cases. I updated with the documentation examples from CTAN at:
And regenerated the PDF and XML for the new test. I noticed two problems when inspecting by hand:
But at least no errors and meaningful output! And tables, environments, math and nested groups seem to work ok.
I think I'm ready to get back to PR comments.
I pushed a commit that fixes the
Interestingly if I replace the binding with the raw code from
So feel free to examine my last commit, which should entirely fix the macro capitalization issue.
As to the citation-specific parts - it is a limitation we should probably ignore for now, until we want to model it explicitly, as you mentioned via email. Could be good to merge!