[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: improve math alphabet freeze code (#693) (96803713)
GitHub
noreply at github.com
Sat Oct 16 21:32:27 CEST 2021
Repository : https://github.com/latex3/latex2e
On branch : develop
Link : https://github.com/latex3/latex2e/commit/96803713b5dc0467cbd2e5aac993b56ff00d1775
>---------------------------------------------------------------
commit 96803713b5dc0467cbd2e5aac993b56ff00d1775
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Sat Oct 16 21:32:27 2021 +0200
improve math alphabet freeze code (#693)
>---------------------------------------------------------------
96803713b5dc0467cbd2e5aac993b56ff00d1775
base/ltfssdcl.dtx | 44 ++++++++++++++++++++--
base/testfiles/github-0479-often.luatex.tlg | 2 +
base/testfiles/github-0479-often.tlg | 2 +
base/testfiles/github-0479-often.xetex.tlg | 2 +
.../tlb-latexrelease-rollback-003-often.luatex.tlg | 4 ++
.../tlb-latexrelease-rollback-003-often.tlg | 4 ++
.../tlb-latexrelease-rollback-003-often.xetex.tlg | 4 ++
base/testfiles/tlb-nfss-alphabets-01.tlg | 3 +-
base/testfiles/tlb-nfss-alphabets-02.tlg | 3 +-
base/testfiles/tlb-rollback-004-often.luatex.tlg | 2 +
base/testfiles/tlb-rollback-004-often.tlg | 2 +
base/testfiles/tlb-rollback-004-often.xetex.tlg | 2 +
base/testfiles/tlb-rollback-005.luatex.tlg | 2 +
base/testfiles/tlb-rollback-005.tlg | 2 +
base/testfiles/tlb-rollback-005.xetex.tlg | 2 +
15 files changed, 74 insertions(+), 6 deletions(-)
diff --git a/base/ltfssdcl.dtx b/base/ltfssdcl.dtx
index f9898562..4f2cabd6 100644
--- a/base/ltfssdcl.dtx
+++ b/base/ltfssdcl.dtx
@@ -36,7 +36,7 @@
%
%
\ProvidesFile{ltfssdcl.dtx}
- [2021/09/28 v3.0x LaTeX Kernel (NFSS Declarative Interface)]
+ [2021/10/15 v3.0y LaTeX Kernel (NFSS Declarative Interface)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -527,7 +527,13 @@
% \cs{mv@\meta{version}@frozen} already exists.
% \begin{macrocode}
\ifcsname mv@\math at version @frozen\endcsname \else
- \freeze at math@version\math at version
+% \end{macrocode}
+% We have to pass the current value of \cs{math at version} not the
+% macro itself, because some of the processing is delayed to a
+% point where the value may have changed again---not doing this
+% caused a puzzling error in one setup.
+% \begin{macrocode}
+ \expandafter\freeze at math@version\expandafter{\math at version}%
\fi
\fi
\begingroup
@@ -572,7 +578,7 @@
% \end{macrocode}
%
%
-
+%
% \begin{macro}{\freeze at math@version}
% \changes{v3.0x}{2021/09/26}{Macro added for (gh/676)}
% This command stores the current state of the math version and sets
@@ -585,7 +591,10 @@
% Save the current \cs{mv@\meta{version}} code and the number of
% allocated mathgroups inside.
% \begin{macrocode}
- \@font at info{Freeze~ math~ alphabet~ allocation~ in~ version~ #1}
+ \@font at info{Freeze~ math~ alphabet~ allocation~ in~ version~
+ #1.\MessageBreak
+ Allocated~math~groups:~\int_use:c{ c at mv@ #1 }~
+ (local:~ \int_use:N\c at localmathalphabets) }
\cs_gset_eq:cc { mv@#1 at frozen }{ mv@#1 }
\tl_gset:cx { g__nfss_frozen_mv_ #1 _tl }{ \int_use:c { c at mv@#1 } }
% \end{macrocode}
@@ -846,9 +855,36 @@
%
% \begin{macro}{\DeclareMathVersion}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2021/11/15}%
+%<latexrelease> {\DeclareMathVersion}{local alphabets}%
\def\DeclareMathVersion#1{%
+% \end{macrocode}
+% When declaring a new math version we need to instantiate an L3
+% variable that is used when we freeze the version, because too many
+% alphabets got allocated. If we don't do this, L3 programming layer
+% complains if it is run in checking mode.
+% \changes{v3.0y}{2021/10/15}{Initialize variable for freezing
+% math version (gh/676)}
+% \begin{macrocode}
+ \@namedef{g__nfss_frozen_mv_#1_tl}{}%
+% \end{macrocode}
+%
+% \begin{macrocode}
\expandafter\new at mathversion\csname mv@#1\endcsname}
\@onlypreamble\DeclareMathVersion
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\DeclareMathVersion}{local alphabets}%
+%<latexrelease>\def\DeclareMathVersion#1{%
+%<latexrelease> \expandafter\new at mathversion\csname mv@#1\endcsname}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
diff --git a/base/testfiles/github-0479-often.luatex.tlg b/base/testfiles/github-0479-often.luatex.tlg
index b19ea451..7d561984 100644
--- a/base/testfiles/github-0479-often.luatex.tlg
+++ b/base/testfiles/github-0479-often.luatex.tlg
@@ -281,6 +281,8 @@ Skipping: [....-..-..] \document at select@group on input line ....
Applying: [....-..-..] \document at select@group on input line ....
Already applied: [....-..-..] \document at select@group on input line ....
Already applied: [....-..-..] \document at select@group on input line ....
+Skipping: [....-..-..] local alphabets on input line ....
+Applying: [....-..-..] local alphabets on input line ....
Applying: [....-..-..] Make math accents robust on input line ....
Already applied: [....-..-..] Make math accents robust on input line ....
Applying: [....-..-..] makemath accents robust on input line ....
diff --git a/base/testfiles/github-0479-often.tlg b/base/testfiles/github-0479-often.tlg
index 2d8fe8a6..696384e7 100644
--- a/base/testfiles/github-0479-often.tlg
+++ b/base/testfiles/github-0479-often.tlg
@@ -271,6 +271,8 @@ Skipping: [....-..-..] \document at select@group on input line ....
Applying: [....-..-..] \document at select@group on input line ....
Already applied: [....-..-..] \document at select@group on input line ....
Already applied: [....-..-..] \document at select@group on input line ....
+Skipping: [....-..-..] local alphabets on input line ....
+Applying: [....-..-..] local alphabets on input line ....
Applying: [....-..-..] Make math accents robust on input line ....
Already applied: [....-..-..] Make math accents robust on input line ....
Applying: [....-..-..] makemath accents robust on input line ....
diff --git a/base/testfiles/github-0479-often.xetex.tlg b/base/testfiles/github-0479-often.xetex.tlg
index 7980339f..d55c3286 100644
--- a/base/testfiles/github-0479-often.xetex.tlg
+++ b/base/testfiles/github-0479-often.xetex.tlg
@@ -271,6 +271,8 @@ Skipping: [....-..-..] \document at select@group on input line ....
Applying: [....-..-..] \document at select@group on input line ....
Already applied: [....-..-..] \document at select@group on input line ....
Already applied: [....-..-..] \document at select@group on input line ....
+Skipping: [....-..-..] local alphabets on input line ....
+Applying: [....-..-..] local alphabets on input line ....
Applying: [....-..-..] Make math accents robust on input line ....
Already applied: [....-..-..] Make math accents robust on input line ....
Applying: [....-..-..] makemath accents robust on input line ....
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
index 02c37c53..12eb31e1 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
@@ -249,6 +249,8 @@ Skipping: [....-..-..] \document at select@group on input line ....
Skipping: [....-..-..] \document at select@group on input line ....
Skipping: [....-..-..] \document at select@group on input line ....
Applying: [....-..-..] \document at select@group on input line ....
+Skipping: [....-..-..] local alphabets on input line ....
+Applying: [....-..-..] local alphabets on input line ....
Skipping: [....-..-..] Make math accents robust on input line ....
Applying: [....-..-..] Make math accents robust on input line ....
Skipping: [....-..-..] makemath accents robust on input line ....
@@ -840,6 +842,8 @@ Skipping: [....-..-..] \document at select@group on input line ....
Skipping: [....-..-..] \document at select@group on input line ....
Applying: [....-..-..] \document at select@group on input line ....
Already applied: [....-..-..] \document at select@group on input line ....
+Skipping: [....-..-..] local alphabets on input line ....
+Applying: [....-..-..] local alphabets on input line ....
Applying: [....-..-..] Make math accents robust on input line ....
Already applied: [....-..-..] Make math accents robust on input line ....
Applying: [....-..-..] makemath accents robust on input line ....
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
index 2a77a244..d993f95d 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
@@ -243,6 +243,8 @@ Skipping: [....-..-..] \document at select@group on input line ....
Skipping: [....-..-..] \document at select@group on input line ....
Skipping: [....-..-..] \document at select@group on input line ....
Applying: [....-..-..] \document at select@group on input line ....
+Skipping: [....-..-..] local alphabets on input line ....
+Applying: [....-..-..] local alphabets on input line ....
Skipping: [....-..-..] Make math accents robust on input line ....
Applying: [....-..-..] Make math accents robust on input line ....
Skipping: [....-..-..] makemath accents robust on input line ....
@@ -824,6 +826,8 @@ Skipping: [....-..-..] \document at select@group on input line ....
Skipping: [....-..-..] \document at select@group on input line ....
Applying: [....-..-..] \document at select@group on input line ....
Already applied: [....-..-..] \document at select@group on input line ....
+Skipping: [....-..-..] local alphabets on input line ....
+Applying: [....-..-..] local alphabets on input line ....
Applying: [....-..-..] Make math accents robust on input line ....
Already applied: [....-..-..] Make math accents robust on input line ....
Applying: [....-..-..] makemath accents robust on input line ....
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
index d6b414ba..5749d356 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
@@ -243,6 +243,8 @@ Skipping: [....-..-..] \document at select@group on input line ....
Skipping: [....-..-..] \document at select@group on input line ....
Skipping: [....-..-..] \document at select@group on input line ....
Applying: [....-..-..] \document at select@group on input line ....
+Skipping: [....-..-..] local alphabets on input line ....
+Applying: [....-..-..] local alphabets on input line ....
Skipping: [....-..-..] Make math accents robust on input line ....
Applying: [....-..-..] Make math accents robust on input line ....
Skipping: [....-..-..] makemath accents robust on input line ....
@@ -833,6 +835,8 @@ Skipping: [....-..-..] \document at select@group on input line ....
Skipping: [....-..-..] \document at select@group on input line ....
Applying: [....-..-..] \document at select@group on input line ....
Already applied: [....-..-..] \document at select@group on input line ....
+Skipping: [....-..-..] local alphabets on input line ....
+Applying: [....-..-..] local alphabets on input line ....
Applying: [....-..-..] Make math accents robust on input line ....
Already applied: [....-..-..] Make math accents robust on input line ....
Applying: [....-..-..] makemath accents robust on input line ....
diff --git a/base/testfiles/tlb-nfss-alphabets-01.tlg b/base/testfiles/tlb-nfss-alphabets-01.tlg
index 19817b05..50027fa1 100644
--- a/base/testfiles/tlb-nfss-alphabets-01.tlg
+++ b/base/testfiles/tlb-nfss-alphabets-01.tlg
@@ -22,7 +22,8 @@ LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line ....
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line ....
-LaTeX Font Info: Freeze math alphabet allocation in version normal on input line ....
+LaTeX Font Info: Freeze math alphabet allocation in version normal.
+(Font) Allocated math groups: 14 (local: 2) on input line ....
### math mode entered at line 24
\mathord
.\fam7 x
diff --git a/base/testfiles/tlb-nfss-alphabets-02.tlg b/base/testfiles/tlb-nfss-alphabets-02.tlg
index 697ade1a..732d3ab3 100644
--- a/base/testfiles/tlb-nfss-alphabets-02.tlg
+++ b/base/testfiles/tlb-nfss-alphabets-02.tlg
@@ -36,7 +36,8 @@ LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line ....
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line ....
-LaTeX Font Info: Freeze math alphabet allocation in version normal on input line ....
+LaTeX Font Info: Freeze math alphabet allocation in version normal.
+(Font) Allocated math groups: 14 (local: 5) on input line ....
### math mode entered at line 28
\mathord
.\fam14 Z
diff --git a/base/testfiles/tlb-rollback-004-often.luatex.tlg b/base/testfiles/tlb-rollback-004-often.luatex.tlg
index b09dfaf4..2136fa74 100644
--- a/base/testfiles/tlb-rollback-004-often.luatex.tlg
+++ b/base/testfiles/tlb-rollback-004-often.luatex.tlg
@@ -282,6 +282,8 @@ Skipping: [....-..-..] \document at select@group on input line ....
Skipping: [....-..-..] \document at select@group on input line ....
Applying: [....-..-..] \document at select@group on input line ....
Already applied: [....-..-..] \document at select@group on input line ....
+Skipping: [....-..-..] local alphabets on input line ....
+Applying: [....-..-..] local alphabets on input line ....
Applying: [....-..-..] Make math accents robust on input line ....
Already applied: [....-..-..] Make math accents robust on input line ....
Applying: [....-..-..] makemath accents robust on input line ....
diff --git a/base/testfiles/tlb-rollback-004-often.tlg b/base/testfiles/tlb-rollback-004-often.tlg
index bda83988..3c8dbb15 100644
--- a/base/testfiles/tlb-rollback-004-often.tlg
+++ b/base/testfiles/tlb-rollback-004-often.tlg
@@ -271,6 +271,8 @@ Skipping: [....-..-..] \document at select@group on input line ....
Skipping: [....-..-..] \document at select@group on input line ....
Applying: [....-..-..] \document at select@group on input line ....
Already applied: [....-..-..] \document at select@group on input line ....
+Skipping: [....-..-..] local alphabets on input line ....
+Applying: [....-..-..] local alphabets on input line ....
Applying: [....-..-..] Make math accents robust on input line ....
Already applied: [....-..-..] Make math accents robust on input line ....
Applying: [....-..-..] makemath accents robust on input line ....
diff --git a/base/testfiles/tlb-rollback-004-often.xetex.tlg b/base/testfiles/tlb-rollback-004-often.xetex.tlg
index 2145c35d..21b6178f 100644
--- a/base/testfiles/tlb-rollback-004-often.xetex.tlg
+++ b/base/testfiles/tlb-rollback-004-often.xetex.tlg
@@ -271,6 +271,8 @@ Skipping: [....-..-..] \document at select@group on input line ....
Skipping: [....-..-..] \document at select@group on input line ....
Applying: [....-..-..] \document at select@group on input line ....
Already applied: [....-..-..] \document at select@group on input line ....
+Skipping: [....-..-..] local alphabets on input line ....
+Applying: [....-..-..] local alphabets on input line ....
Applying: [....-..-..] Make math accents robust on input line ....
Already applied: [....-..-..] Make math accents robust on input line ....
Applying: [....-..-..] makemath accents robust on input line ....
diff --git a/base/testfiles/tlb-rollback-005.luatex.tlg b/base/testfiles/tlb-rollback-005.luatex.tlg
index fde09f8f..bdcc80a9 100644
--- a/base/testfiles/tlb-rollback-005.luatex.tlg
+++ b/base/testfiles/tlb-rollback-005.luatex.tlg
@@ -285,6 +285,8 @@ Skipping: [....-..-..] \document at select@group on input line ....
Applying: [....-..-..] \document at select@group on input line ....
Already applied: [....-..-..] \document at select@group on input line ....
Already applied: [....-..-..] \document at select@group on input line ....
+Skipping: [....-..-..] local alphabets on input line ....
+Applying: [....-..-..] local alphabets on input line ....
Applying: [....-..-..] Make math accents robust on input line ....
Already applied: [....-..-..] Make math accents robust on input line ....
Applying: [....-..-..] makemath accents robust on input line ....
diff --git a/base/testfiles/tlb-rollback-005.tlg b/base/testfiles/tlb-rollback-005.tlg
index 389b304d..448d0e1b 100644
--- a/base/testfiles/tlb-rollback-005.tlg
+++ b/base/testfiles/tlb-rollback-005.tlg
@@ -275,6 +275,8 @@ Skipping: [....-..-..] \document at select@group on input line ....
Applying: [....-..-..] \document at select@group on input line ....
Already applied: [....-..-..] \document at select@group on input line ....
Already applied: [....-..-..] \document at select@group on input line ....
+Skipping: [....-..-..] local alphabets on input line ....
+Applying: [....-..-..] local alphabets on input line ....
Applying: [....-..-..] Make math accents robust on input line ....
Already applied: [....-..-..] Make math accents robust on input line ....
Applying: [....-..-..] makemath accents robust on input line ....
diff --git a/base/testfiles/tlb-rollback-005.xetex.tlg b/base/testfiles/tlb-rollback-005.xetex.tlg
index 0c57a1ec..bb3f4135 100644
--- a/base/testfiles/tlb-rollback-005.xetex.tlg
+++ b/base/testfiles/tlb-rollback-005.xetex.tlg
@@ -275,6 +275,8 @@ Skipping: [....-..-..] \document at select@group on input line ....
Applying: [....-..-..] \document at select@group on input line ....
Already applied: [....-..-..] \document at select@group on input line ....
Already applied: [....-..-..] \document at select@group on input line ....
+Skipping: [....-..-..] local alphabets on input line ....
+Applying: [....-..-..] local alphabets on input line ....
Applying: [....-..-..] Make math accents robust on input line ....
Already applied: [....-..-..] Make math accents robust on input line ....
Applying: [....-..-..] makemath accents robust on input line ....
More information about the latex3-commits
mailing list.