New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Texlive 2021 #1578
Texlive 2021 #1578
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Happily impressed that's all it took for the 2021 texlive to pass the tests. In my fear I expected a larger diff.
lib/LaTeXML/Package/LaTeX.pool.ltxml
Outdated
@@ -390,6 +389,7 @@ DefConstructorI(T_CS('\end{document}'), undef, sub { | |||
# push(@boxes, Digest(Tokens(@$ops))); } | |||
# NOTE: Don't flush gullet (tempting); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove the comment above that says Don't flush gullet (tempting);
? Seems outdated now :>
# Expl3 "Experimental LaTeX 3" is no longer Experimental! | ||
# It is beginning to be built into latex.ltx | ||
# We WILL need a new strategy to keep up; probably based in some form | ||
# of pre-read/pre-processed latex.ltx ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe once they stabilize it fully we can make ourselves a new Latex3.pool
file and forget about it for a little bit...
lib/LaTeXML/Package/xparse.sty.ltxml
Outdated
# Newer versions of xparse *may* want to defer to one of these versioned files | ||
# They are also acceptable for interpretation, but must avoid the de-versioning hack/fallback. | ||
AssignValue("INTERPRETABLE_DEFINITIONS_xparse-2018-04-12.sty" => 1); | ||
AssignValue("INTERPRETABLE_DEFINITIONS_xparse-2020-10-01.sty" => 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The underscores followed by dashes...
Any chance I can sell you one something like the following later on?
PushValue("BLESSED_RAW_FILES", "xparse-2020-10-01.sty");
Can wait until a future PR, but I wanted to mark it early to avoid being called inconsistent in my pedantry :>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No stripes with checks. Nobody can accuse you of not being consistently pedantic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirm that it fixes #1566 on my TeX Live 2021 snapshot too, all good!
# Newer versions of xparse *may* want to defer to one of these versioned files | ||
# They are also acceptable for interpretation, but must avoid the de-versioning hack/fallback. | ||
AssignMapping('INTERPRETABLE_SOURCES', 'xparse-2018-04-12.sty' => 1); | ||
AssignMapping('INTERPRETABLE_SOURCES', 'xparse-2020-10-01.sty' => 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be ridiculously pedantic, if you call \usepackage{xparse-2018-04-12}
directly, you end up reading xparse.sty
anyway. It's ok because of how xparse.sty
is written, and clearly you are never supposed to call the versioned xparse directly. But I wonder if it is the right mechanism in general (I don't know how versioned packages are supposed to work in texlive).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, but explicitly pre-loading xparse-2018-04-12
only works because of the way xparse
is written. What I like about @dginev's approach is that it doesn't rely on xparse internals, or even whether xparse-2018-04-12
is a "versioned" file (as opposed to simply a file with a funny name). And thus the technique will be more easily adapted to other such situations.
Ultimately, this whole issue is trying to work around what has to be called a hack (but a very useful hack) to prefer curated latexml-specific bindings over raw style files and not be mislead by the randomly "versioned" files typically found on arXiv. The hack tends to assume that files with names like "foo-.sty" are versioned, that is a snapshot or slightly tweaked version of "foo.sty". But sometimes a file is just a file.
This PR fixes some regressions (or lags, rather) for TeXLive 2021 (at least, the included tests).
It is an alternative to #1569 that I couldn't flesh out, without trying it out. (Sorry for stealing the glory) After experimentation, I pretty much ended up following @dginev's idea of recording the files that we are willing to interpret (so they don't hit the binding fallback). [Not yet a full API for this yet, but could evolve into something where we'd simply have a list of interpretable files, rather than trivial bindings]
Hopefully this will resolve #1566 and #1565 ? @xworld21, @flyn-org could you check?