[latex3-commits] [git/LaTeX3-latex3-latex2e] gnats3357: fix for gnats/3357 (06692ee8)
Frank Mittelbach
frank.mittelbach at latex-project.org
Thu Mar 19 22:00:13 CET 2020
Repository : https://github.com/latex3/latex2e
On branch : gnats3357
Link : https://github.com/latex3/latex2e/commit/06692ee877ca9b488eb993af895f5a78be728f60
>---------------------------------------------------------------
commit 06692ee877ca9b488eb993af895f5a78be728f60
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Thu Mar 19 22:00:13 2020 +0100
fix for gnats/3357
>---------------------------------------------------------------
06692ee877ca9b488eb993af895f5a78be728f60
base/changes.txt | 6 ++
base/ltfssbas.dtx | 2 +-
base/ltfssdcl.dtx | 47 +++++++++++++-
base/testfiles/tlb-latexrelease-003.luatex.tlg | 2 +
base/testfiles/tlb-latexrelease-003.tlg | 2 +
base/testfiles/tlb-latexrelease-003.xetex.tlg | 2 +
base/testfiles/tlb3357.lvt | 16 +++++
base/testfiles/{tlb0063.tlg => tlb3357.tlg} | 86 +++++++++++++++-----------
8 files changed, 122 insertions(+), 41 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index 4fb7d643..c0d3434f 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -1,3 +1,9 @@
+2020-03-19 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * ltfssdcl.dtx (section{Interface Commands}):
+ Avoid generating an Ord math atom when loading a math alphabet using
+ the legacy interface ${\cal ...}$ (gnats/3357)
+
2020-03-07 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
* ltspace.dtx: Moved \cs{thinspace}, \cs{negthinspace} and \cs{,} to
diff --git a/base/ltfssbas.dtx b/base/ltfssbas.dtx
index 5715106c..4a6afca3 100644
--- a/base/ltfssbas.dtx
+++ b/base/ltfssbas.dtx
@@ -1850,7 +1850,7 @@
% Finally, it is not possible to simply call the new definition
% since we
% have an argument (the third argument of |\use at mathgroup|
-% or more exactly the argument od |\math at egroup| if the {\ttfamily
+% or more exactly the argument of |\math at egroup| if the {\ttfamily
% margid} option is in force)
% which would swallow our closing |\fi|. So
% we use the |\expandafter| technique to remove the |\fi|
diff --git a/base/ltfssdcl.dtx b/base/ltfssdcl.dtx
index 951c6de2..8ae58780 100644
--- a/base/ltfssdcl.dtx
+++ b/base/ltfssdcl.dtx
@@ -36,7 +36,7 @@
%
%
\ProvidesFile{ltfssdcl.dtx}
- [2020/01/20 v3.0t LaTeX Kernel (NFSS Declarative Interface)]
+ [2020/03/19 v3.0u LaTeX Kernel (NFSS Declarative Interface)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -465,7 +465,7 @@
% \changes{v3.0q}{2015/03/18}{Introduce \cs{e at mathgroup@top}}
% \begin{macrocode}
%</2ekernel>
-%<latexrelease>\IncludeInRelease{2015/01/01}
+%<latexrelease>\IncludeInRelease{2020/10/01}
%<latexrelease> {\document at select@group}{\document at select@group}%
%<*2ekernel|latexrelease>
\def\document at select@group#1#2#3#4{%
@@ -491,13 +491,54 @@
\@eha
\fi
\else \expandafter\non at alpherr\fi
- #1{#4}%
+% \end{macrocode}
+% If the legacy interface is used, e.g., \verb=$\sf -1$= the math
+% alphabet \verb=#1= does not take and argument so we better do not
+% surround \verb=#4= with braces, because then we get
+% \verb={\relax}= into the formula and introduce an extra Ord
+% atom. The two different cases can be distinguished the the
+% current value of \cs{math at bgroup}.
+% \changes{v3.0u}{2020/03/19}{fix for (gnats/3357)}
+% \begin{macrocode}
+ \expandafter#1\ifx\math at bgroup\bgroup{#4}\else#4\fi
}%
}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2015/01/01}
+%<latexrelease> {\document at select@group}{\document at select@group}%
+%<latexrelease>
+%<latexrelease>\def\document at select@group#1#2#3#4{%
+%<latexrelease> \ifx\math at bgroup\bgroup\else\relax\expandafter\@firstofone\fi
+%<latexrelease> {%
+%<latexrelease> \ifmmode
+%<latexrelease> \ifnum\csname c at mv@\math at version\endcsname<\e at mathgroup@top
+%<latexrelease> \begingroup
+%<latexrelease> \escapechar\m at ne
+%<latexrelease> \getanddefine at fonts{\csname c at mv@\math at version\endcsname}#3%
+%<latexrelease> \globaldefs\@ne \math at fonts
+%<latexrelease> \endgroup
+%<latexrelease> \expandafter\extract at alph@from at version
+%<latexrelease> \csname mv@\math at version\expandafter\endcsname
+%<latexrelease> \expandafter{\number\csname
+%<latexrelease> c at mv@\math at version\endcsname}%
+%<latexrelease> #1%
+%<latexrelease> \global\advance\csname c at mv@\math at version\endcsname\@ne
+%<latexrelease> \else
+%<latexrelease> \let#1\relax
+%<latexrelease> \@latex at error{Too many math alphabets used
+%<latexrelease> in version \math at version}%
+%<latexrelease> \@eha
+%<latexrelease> \fi
+%<latexrelease> \else \expandafter\non at alpherr\fi
+%<latexrelease> #1{#4}%
+%<latexrelease> }%
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>
%<latexrelease>\IncludeInRelease{0000/00/00}
%<latexrelease> {\document at select@group}{\document at select@group}%
+%<latexrelease>
%<latexrelease>\def\document at select@group#1#2#3#4{%
%<latexrelease> \ifx\math at bgroup\bgroup\else\relax\expandafter\@firstofone\fi
%<latexrelease> {%
diff --git a/base/testfiles/tlb-latexrelease-003.luatex.tlg b/base/testfiles/tlb-latexrelease-003.luatex.tlg
index 1fdaee67..5f8b8cac 100644
--- a/base/testfiles/tlb-latexrelease-003.luatex.tlg
+++ b/base/testfiles/tlb-latexrelease-003.luatex.tlg
@@ -178,6 +178,7 @@ Applying: [....-..-..] turn off etex tracing on input line ....
Skipping: [....-..-..] \select at group on input line ....
Applying: [....-..-..] \select at 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: [....-..-..] Make math accents robust on input line ....
Applying: [....-..-..] Make math accents robust on input line ....
@@ -521,6 +522,7 @@ Applying: [....-..-..] turn off etex tracing on input line ....
Already applied: [....-..-..] turn off etex tracing on input line ....
Applying: [....-..-..] \select at group on input line ....
Already applied: [....-..-..] \select at 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 ....
Applying: [....-..-..] Make math accents robust on input line ....
diff --git a/base/testfiles/tlb-latexrelease-003.tlg b/base/testfiles/tlb-latexrelease-003.tlg
index 15b6ff24..62da6f17 100644
--- a/base/testfiles/tlb-latexrelease-003.tlg
+++ b/base/testfiles/tlb-latexrelease-003.tlg
@@ -176,6 +176,7 @@ Applying: [....-..-..] turn off etex tracing on input line ....
Skipping: [....-..-..] \select at group on input line ....
Applying: [....-..-..] \select at 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: [....-..-..] Make math accents robust on input line ....
Applying: [....-..-..] Make math accents robust on input line ....
@@ -513,6 +514,7 @@ Applying: [....-..-..] turn off etex tracing on input line ....
Already applied: [....-..-..] turn off etex tracing on input line ....
Applying: [....-..-..] \select at group on input line ....
Already applied: [....-..-..] \select at 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 ....
Applying: [....-..-..] Make math accents robust on input line ....
diff --git a/base/testfiles/tlb-latexrelease-003.xetex.tlg b/base/testfiles/tlb-latexrelease-003.xetex.tlg
index 92291661..1025954d 100644
--- a/base/testfiles/tlb-latexrelease-003.xetex.tlg
+++ b/base/testfiles/tlb-latexrelease-003.xetex.tlg
@@ -176,6 +176,7 @@ Applying: [....-..-..] turn off etex tracing on input line ....
Skipping: [....-..-..] \select at group on input line ....
Applying: [....-..-..] \select at 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: [....-..-..] Make math accents robust on input line ....
Applying: [....-..-..] Make math accents robust on input line ....
@@ -522,6 +523,7 @@ Applying: [....-..-..] turn off etex tracing on input line ....
Already applied: [....-..-..] turn off etex tracing on input line ....
Applying: [....-..-..] \select at group on input line ....
Already applied: [....-..-..] \select at 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 ....
Applying: [....-..-..] Make math accents robust on input line ....
diff --git a/base/testfiles/tlb3357.lvt b/base/testfiles/tlb3357.lvt
new file mode 100644
index 00000000..de711297
--- /dev/null
+++ b/base/testfiles/tlb3357.lvt
@@ -0,0 +1,16 @@
+
+\documentclass{article}
+
+\input{test2e}
+
+\showoutput
+
+\begin{document}
+
+\START
+
+When not loaded: ($\sf -1$). % loading turns the uniary - into a binary
+
+Already loaded: ($\sf -1$).
+
+\end{document}
diff --git a/base/testfiles/tlb0063.tlg b/base/testfiles/tlb3357.tlg
similarity index 52%
copy from base/testfiles/tlb0063.tlg
copy to base/testfiles/tlb3357.tlg
index a392afa6..5b728eaf 100644
--- a/base/testfiles/tlb0063.tlg
+++ b/base/testfiles/tlb3357.tlg
@@ -1,69 +1,81 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
-Author: Rainer Schoepf
-Format: LaTeX2e<1993/12/24>
-Main Class: article
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: Trying to load font information for U+lasy on input line ....
-! LaTeX Error: \mathrm allowed only in math mode.
-See the LaTeX manual or LaTeX Companion for explanation.
-Type H <return> for immediate help.
- ...
-l. ...\mathrm
- {x}
-You're in trouble here. Try typing <return> to proceed.
-If that doesn't work, type X <return> to quit.
Completed box being shipped out [1]
-\vbox(620.0+0.0)x408.0
-.\glue 27.0
-.\vbox(593.0+0.0)x345.0, shifted 63.0
+\vbox(633.0+0.0)x407.0
+.\glue 16.0
+.\vbox(617.0+0.0)x345.0, shifted 62.0
..\vbox(12.0+0.0)x345.0, glue set 12.0fil
...\glue 0.0 plus 1.0fil
...\hbox(0.0+0.0)x345.0
..\glue 25.0
..\glue(\lineskip) 0.0
-..\vbox(526.0+0.0)x345.0, glue set 503.94617fil
-...\mark{{}{}}
+..\vbox(550.0+0.0)x345.0, glue set 527.9436fil
...\write-{}
-...\glue(\topskip) 3.05556
-...\hbox(6.94444+0.0)x345.0, glue set 281.66655fil
+...\glue(\topskip) 2.5
+...\hbox(7.5+2.5)x345.0, glue set 224.16643fil
....\hbox(0.0+0.0)x15.0
-....\OT1/cmr/m/n/10 1
-....\OT1/cmr/m/n/10 .
-....\glue 4.44444 plus 4.99997 minus 0.37036
-....\OT1/cmr/m/n/10 M
-....\OT1/cmr/m/n/10 a
-....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 W
....\OT1/cmr/m/n/10 h
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 n
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 n
+....\OT1/cmr/m/n/10 o
+....\OT1/cmr/m/n/10 t
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 l
+....\OT1/cmr/m/n/10 o
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 d
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 d
....\OT1/cmr/m/n/10 :
....\glue 4.44444 plus 3.33331 minus 0.55556
+....\OT1/cmr/m/n/10 (
....\mathon
-....\OT1/cmr/m/n/10 x
+....\OMS/cmsy/m/n/10 ^^@
+....\OT1/cmss/m/n/10 1
....\mathoff
+....\OT1/cmr/m/n/10 )
+....\OT1/cmr/m/n/10 .
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
...\glue(\parskip) 0.0 plus 1.0
-...\glue(\baselineskip) 5.16669
-...\hbox(6.83331+0.0)x345.0, glue set 285.2777fil
+...\glue(\baselineskip) 2.0
+...\hbox(7.5+2.5)x345.0, glue set 233.30533fil
....\hbox(0.0+0.0)x15.0
-....\OT1/cmr/m/n/10 2
-....\OT1/cmr/m/n/10 .
-....\glue 4.44444 plus 4.99997 minus 0.37036
-....\OT1/cmr/m/n/10 T
-....\kern-0.83334
+....\OT1/cmr/m/n/10 A
+....\OT1/cmr/m/n/10 l
+....\OT1/cmr/m/n/10 r
....\OT1/cmr/m/n/10 e
-....\OT1/cmr/m/n/10 x
-....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 d
+....\OT1/cmr/m/n/10 y
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 l
+....\OT1/cmr/m/n/10 o
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 d
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 d
....\OT1/cmr/m/n/10 :
....\glue 4.44444 plus 3.33331 minus 0.55556
-....\OT1/cmr/m/n/10 x
+....\OT1/cmr/m/n/10 (
+....\mathon
+....\OMS/cmsy/m/n/10 ^^@
+....\OT1/cmss/m/n/10 1
+....\mathoff
+....\OT1/cmr/m/n/10 )
+....\OT1/cmr/m/n/10 .
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
+...\glue -2.5
...\glue 0.0 plus 1.0fil
...\glue 0.0
...\glue 0.0 plus 0.0001fil
@@ -72,4 +84,4 @@ Completed box being shipped out [1]
...\glue 0.0 plus 1.0fil
...\OT1/cmr/m/n/10 1
...\glue 0.0 plus 1.0fil
-(tlb0063.aux)
+(tlb3357.aux)
More information about the latex3-commits
mailing list.