Skip to content
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

Merged
merged 5 commits into from Jul 24, 2021
Merged

Texlive 2021 #1578

merged 5 commits into from Jul 24, 2021

Conversation

brucemiller
Copy link
Owner

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?

@brucemiller brucemiller requested a review from dginev July 23, 2021 23:38
Copy link
Collaborator

@dginev dginev left a 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.

@@ -390,6 +389,7 @@ DefConstructorI(T_CS('\end{document}'), undef, sub {
# push(@boxes, Digest(Tokens(@$ops))); }
# NOTE: Don't flush gullet (tempting);
Copy link
Collaborator

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 !
Copy link
Collaborator

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...

# 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);
Copy link
Collaborator

@dginev dginev Jul 23, 2021

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 :>

Copy link
Owner Author

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.

Copy link
Contributor

@xworld21 xworld21 left a 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);
Copy link
Contributor

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).

Copy link
Owner Author

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.

@brucemiller brucemiller merged commit b034118 into master Jul 24, 2021
@brucemiller brucemiller deleted the texlive-2021 branch July 24, 2021 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

\NewDocumentCommand undefined on TeX Live 2021
3 participants