Skip to content

Conversation

@utkuokur
Copy link

@utkuokur utkuokur commented Oct 3, 2025

This PR updates the hard-coded LaTeX format date in
lib/LaTeXML/Engine/latex_base.pool.ltxml:

  • DefMacroI('\fmtversion', undef, '2018/12/01');
  • DefMacroI('\fmtversion', undef, '2021/06/01');

Rationale:

  • The memoir class (and some other modern packages) require at least LaTeX format 2021/06/01.

  • With the previous value (2018/12/01), LaTeXML fails immediately with:

    Class memoir Error: Your LaTeX release is too old.
    The memoir class requires at LaTeX format from at least 2021/06/01 onwards.

  • After applying this patch locally, I was able to successfully process documents using memoir with LaTeXML.

This should unblock users of memoir and other classes that check \fmtversion.

Notes:
While running make test, I observed 3 failing subtests in t/81_babel.t.
However, the same failures occur when testing against the current master branch, so they appear unrelated to this change.

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.

That is fine by me, thanks.

But curious if Bruce has some thoughts about the broader impact of that flag, for example if it affects our "make formats" target.

@xworld21
Copy link
Contributor

xworld21 commented Oct 3, 2025

Format 2020 includes stuff like \NewDocumentCommand which LaTeXML does not implement directly, so it would break LaTeX3 (e.g. xparse would not load correctly). Rather, does make formats update \fmtversion?

@utkuokur utkuokur closed this Oct 3, 2025
@utkuokur
Copy link
Author

utkuokur commented Oct 3, 2025

The pull request failed the test. I will retry with a partial solution instead of a global change.

@dginev
Copy link
Collaborator

dginev commented Oct 4, 2025

@utkuokur your PR was healthy, the failed test was due to CI bitrot (fixed in PR #2653 )

@dginev dginev reopened this Oct 4, 2025
dginev added a commit to arXiv/LaTeXML that referenced this pull request Dec 13, 2025
@brucemiller
Copy link
Owner

If I'm reading correctly, with that simple date switch you were able to successfully convert documents reading memoir.cls natively? I'm pleasantly surprised (amazed, actually). The memoir class is distinctly non-trivial, and all class files tend to slip in under the semantic/structure radar of LaTeXML (ie. to recognize the significance of front matter and sectioning commands).

Running make formats does set \fmtversion to whatever latex.ltx file was read, and will probably provide even better support for whatever memoir wants to do. Getting formats built properly is what we're trying to get standard in future releases, and is the better long-term solution. @xworld21's concern is valid about claiming a version that we dont define even the user-facing commands.

@dginev dginev closed this Dec 31, 2025
dginev added a commit to arXiv/LaTeXML that referenced this pull request Dec 31, 2025
…requirements PR brucemiller#2654"

This reverts commit cbedddd, reversing
changes made to 092efe1.
@brucemiller
Copy link
Owner

brucemiller commented Dec 31, 2025

So, maybe we shouldn't bump fmtversion unless we actually support the version. But I'd be quite interested in hearing how memoir.cls fares; and moving forward whether a small, surgical binding (within the make formats framework) could support it better.
In any case, Thanks for your interest, and the contribution!

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.

4 participants