[latex3-commits] [git/LaTeX3-latex3-latex2e] gh005: Forgot that I wanted to do an f-expansion as part of the lookup for the position argument in #5 (867d01cd)
Frank Mittelbach
frank.mittelbach at latex-project.org
Mon Mar 16 23:33:00 CET 2020
Repository : https://github.com/latex3/latex2e
On branch : gh005
Link : https://github.com/latex3/latex2e/commit/867d01cdf8909051e88abe179228cbaa8307951f
>---------------------------------------------------------------
commit 867d01cdf8909051e88abe179228cbaa8307951f
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Mon Mar 16 23:33:00 2020 +0100
Forgot that I wanted to do an f-expansion as part of the lookup for the position argument in #5
>---------------------------------------------------------------
867d01cdf8909051e88abe179228cbaa8307951f
required/amsmath/amsmath.dtx | 11 +++-
.../testfiles/github-amsmath-0005.luatex.tlg | 68 +++++++++++++++++++++-
required/amsmath/testfiles/github-amsmath-0005.lvt | 6 ++
required/amsmath/testfiles/github-amsmath-0005.tlg | 68 +++++++++++++++++++++-
4 files changed, 148 insertions(+), 5 deletions(-)
diff --git a/required/amsmath/amsmath.dtx b/required/amsmath/amsmath.dtx
index cb4ce512..726d7a21 100644
--- a/required/amsmath/amsmath.dtx
+++ b/required/amsmath/amsmath.dtx
@@ -86,7 +86,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesPackage{amsmath}[2020/03/10 v2.17g AMS math features]
+\ProvidesPackage{amsmath}[2020/03/16 v2.17g AMS math features]
% \end{macrocode}
%
% \section{Catcode defenses}
@@ -3692,10 +3692,15 @@ and fix things up.}
% \end{macrocode}
% As we may pick up an arbitrary part of the formula by mistake, we
% need to be very careful with the testing to avoid low-level
-% errors. This is why we use \cs{detokenize}. The code assumes that
+% errors. This is why we use \cs{detokenize}. But we also need to
+% expand the argument (if possible) in case the position value is
+% hidden inside a macro. We therefore apply the \cs{romannumeral}
+% trick (known as f-expansion in \texttt{expl3}) in its old form.
+% The code assumes that
% the default is correctly set up (which in this case is \texttt{c}).
% \begin{macrocode}
- \edef\reserved at a{\csname ams at pos@\detokenize{#1}\endcsname}%
+ \edef\reserved at a{\csname ams at pos@\expandafter\detokenize
+ \expandafter{\romannumeral-`\0#1}\endcsname}%
\expandafter\ifx\reserved at a\relax
% \end{macrocode}
% If the argument is neither \texttt{b}, \texttt{c} or \texttt{t}
diff --git a/required/amsmath/testfiles/github-amsmath-0005.luatex.tlg b/required/amsmath/testfiles/github-amsmath-0005.luatex.tlg
index 82551596..a4edce9b 100644
--- a/required/amsmath/testfiles/github-amsmath-0005.luatex.tlg
+++ b/required/amsmath/testfiles/github-amsmath-0005.luatex.tlg
@@ -41,7 +41,7 @@ Completed box being shipped out [1]
...\penalty 10000
...\glue(\abovedisplayshortskip) 0.0 plus 3.0
...\glue(\lineskip) 1.0
-...\hbox(23.39996+18.60004)x40.22571, shifted 152.38715, direction TLT
+...\hbox(23.39996+18.60004)x56.8368, shifted 144.0816, direction TLT
....\hbox(0.0+0.0)x0.0, direction TLT
....\vbox(8.39996+18.60004)x9.06943, direction TLT
.....\hbox(8.39996+3.60004)x9.06943, direction TLT
@@ -206,6 +206,72 @@ Completed box being shipped out [1]
.......\mathoff
.......\glue 0.0 plus 1.0fil
......\glue(\tabskip) 0.0
+....\hbox(0.0+0.0)x0.0, direction TLT
+....\vbox(8.39996+18.60004)x9.06943, direction TLT
+.....\hbox(8.39996+3.60004)x9.06943, direction TLT
+......\glue(\tabskip) 0.0
+......\hbox(8.39996+3.60004)x9.06943, direction TLT
+.......\glue 0.0 plus 1.0fil
+.......\hbox(8.39996+3.60004)x0.0, direction TLT
+........\vbox(8.39996+3.60004)x0.0, direction TLT
+.........\kern0.0
+.........\hbox(8.39996+3.60004)x0.0, direction TLT
+..........\rule(8.39996+3.60004)x0.0
+.......\mathon
+.......\OML/cmm/m/it/10 X
+.......\kern0.7847 (italic)
+.......\mathoff
+.......\glue 0.0 plus 1.0fil
+......\glue(\tabskip) 0.0
+.....\glue 0.0
+.....\glue(\baselineskip) 3.0
+.....\hbox(8.39996+3.60004)x9.06943, direction TLT
+......\glue(\tabskip) 0.0
+......\hbox(8.39996+3.60004)x9.06943, direction TLT
+.......\glue 0.0 plus 1.0fil
+.......\hbox(8.39996+3.60004)x0.0, direction TLT
+........\vbox(8.39996+3.60004)x0.0, direction TLT
+.........\kern0.0
+.........\hbox(8.39996+3.60004)x0.0, direction TLT
+..........\rule(8.39996+3.60004)x0.0
+.......\mathon
+.......\OML/cmm/m/it/10 X
+.......\kern0.7847 (italic)
+.......\mathoff
+.......\glue 0.0 plus 1.0fil
+......\glue(\tabskip) 0.0
+....\hbox(0.0+0.0)x0.0, direction TLT
+....\vbox(23.39996+3.60004)x7.54167, direction TLT
+.....\hbox(8.39996+3.60004)x7.54167, direction TLT
+......\glue(\tabskip) 0.0
+......\hbox(8.39996+3.60004)x7.54167, direction TLT
+.......\glue 0.0 plus 1.0fil
+.......\hbox(8.39996+3.60004)x0.0, direction TLT
+........\vbox(8.39996+3.60004)x0.0, direction TLT
+.........\kern0.0
+.........\hbox(8.39996+3.60004)x0.0, direction TLT
+..........\rule(8.39996+3.60004)x0.0
+.......\mathon
+.......\OML/cmm/m/it/10 Z
+.......\kern0.71527 (italic)
+.......\mathoff
+......\glue(\tabskip) 0.0
+.....\glue 0.0
+.....\glue(\baselineskip) 3.0
+.....\hbox(8.39996+3.60004)x7.54167, direction TLT
+......\glue(\tabskip) 0.0
+......\hbox(8.39996+3.60004)x7.54167, direction TLT
+.......\glue 0.0 plus 1.0fil
+.......\hbox(8.39996+3.60004)x0.0, direction TLT
+........\vbox(8.39996+3.60004)x0.0, direction TLT
+.........\kern0.0
+.........\hbox(8.39996+3.60004)x0.0, direction TLT
+..........\rule(8.39996+3.60004)x0.0
+.......\mathon
+.......\OML/cmm/m/it/10 Z
+.......\kern0.71527 (italic)
+.......\mathoff
+......\glue(\tabskip) 0.0
...\penalty 0
...\glue(\belowdisplayshortskip) 6.0 plus 3.0 minus 3.0
...\glue(\parskip) 0.0 plus 1.0
diff --git a/required/amsmath/testfiles/github-amsmath-0005.lvt b/required/amsmath/testfiles/github-amsmath-0005.lvt
index bfd9374f..c6847fd1 100644
--- a/required/amsmath/testfiles/github-amsmath-0005.lvt
+++ b/required/amsmath/testfiles/github-amsmath-0005.lvt
@@ -10,12 +10,18 @@
\START
+\def\hiddent{t}
+\def\hiddenb{b}
+\def\hiddenbii{\hiddenb}
+
\[
\begin{gathered}[t] X \\ X \end{gathered}
\begin{gathered}[c] Y \\ Y\end{gathered}
\begin{aligned}[b] Z \\ Z \end{aligned}
\begin{aligned} A \\ A \end{aligned}
\begin{gathered} B \\ B \end{gathered}
+ \begin{gathered}[\hiddent] X \\ X \end{gathered}
+ \begin{aligned}[\hiddenbii] Z \\ Z \end{aligned}
\]
\[
diff --git a/required/amsmath/testfiles/github-amsmath-0005.tlg b/required/amsmath/testfiles/github-amsmath-0005.tlg
index 69c42b8d..40be30fa 100644
--- a/required/amsmath/testfiles/github-amsmath-0005.tlg
+++ b/required/amsmath/testfiles/github-amsmath-0005.tlg
@@ -36,7 +36,7 @@ Completed box being shipped out [1]
...\penalty 10000
...\glue(\abovedisplayshortskip) 0.0 plus 3.0
...\glue(\lineskip) 1.0
-...\hbox(23.39996+18.60004)x40.22571, shifted 152.38715, display
+...\hbox(23.39996+18.60004)x56.8368, shifted 144.0816, display
....\hbox(0.0+0.0)x0.0
....\vbox(8.39996+18.60004)x9.06943
.....\hbox(8.39996+3.60004)x9.06943
@@ -201,6 +201,72 @@ Completed box being shipped out [1]
.......\mathoff
.......\glue 0.0 plus 1.0fil
......\glue(\tabskip) 0.0
+....\hbox(0.0+0.0)x0.0
+....\vbox(8.39996+18.60004)x9.06943
+.....\hbox(8.39996+3.60004)x9.06943
+......\glue(\tabskip) 0.0
+......\hbox(8.39996+3.60004)x9.06943
+.......\glue 0.0 plus 1.0fil
+.......\hbox(8.39996+3.60004)x0.0
+........\vbox(8.39996+3.60004)x0.0
+.........\kern 0.0
+.........\hbox(8.39996+3.60004)x0.0
+..........\rule(8.39996+3.60004)x0.0
+.......\mathon
+.......\OML/cmm/m/it/10 X
+.......\kern0.7847
+.......\mathoff
+.......\glue 0.0 plus 1.0fil
+......\glue(\tabskip) 0.0
+.....\glue 0.0
+.....\glue(\baselineskip) 3.0
+.....\hbox(8.39996+3.60004)x9.06943
+......\glue(\tabskip) 0.0
+......\hbox(8.39996+3.60004)x9.06943
+.......\glue 0.0 plus 1.0fil
+.......\hbox(8.39996+3.60004)x0.0
+........\vbox(8.39996+3.60004)x0.0
+.........\kern 0.0
+.........\hbox(8.39996+3.60004)x0.0
+..........\rule(8.39996+3.60004)x0.0
+.......\mathon
+.......\OML/cmm/m/it/10 X
+.......\kern0.7847
+.......\mathoff
+.......\glue 0.0 plus 1.0fil
+......\glue(\tabskip) 0.0
+....\hbox(0.0+0.0)x0.0
+....\vbox(23.39996+3.60004)x7.54167
+.....\hbox(8.39996+3.60004)x7.54167
+......\glue(\tabskip) 0.0
+......\hbox(8.39996+3.60004)x7.54167
+.......\glue 0.0 plus 1.0fil
+.......\hbox(8.39996+3.60004)x0.0
+........\vbox(8.39996+3.60004)x0.0
+.........\kern 0.0
+.........\hbox(8.39996+3.60004)x0.0
+..........\rule(8.39996+3.60004)x0.0
+.......\mathon
+.......\OML/cmm/m/it/10 Z
+.......\kern0.71527
+.......\mathoff
+......\glue(\tabskip) 0.0
+.....\glue 0.0
+.....\glue(\baselineskip) 3.0
+.....\hbox(8.39996+3.60004)x7.54167
+......\glue(\tabskip) 0.0
+......\hbox(8.39996+3.60004)x7.54167
+.......\glue 0.0 plus 1.0fil
+.......\hbox(8.39996+3.60004)x0.0
+........\vbox(8.39996+3.60004)x0.0
+.........\kern 0.0
+.........\hbox(8.39996+3.60004)x0.0
+..........\rule(8.39996+3.60004)x0.0
+.......\mathon
+.......\OML/cmm/m/it/10 Z
+.......\kern0.71527
+.......\mathoff
+......\glue(\tabskip) 0.0
...\penalty 0
...\glue(\belowdisplayshortskip) 6.0 plus 3.0 minus 3.0
...\glue(\parskip) 0.0 plus 1.0
More information about the latex3-commits
mailing list.