[latex3-commits] [git/LaTeX3-latex3-latex2e] mathdefaultsmode: Set mathdefaultsmode for LuaLaTeX (2adb4f87)

Marcel Fabian Krüger tex at 2krueger.de
Sun May 8 11:35:54 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : mathdefaultsmode
Link       : https://github.com/latex3/latex2e/commit/2adb4f8723a97d29c145fa79d5e218e87bf251b0

>---------------------------------------------------------------

commit 2adb4f8723a97d29c145fa79d5e218e87bf251b0
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Sun May 8 11:32:57 2022 +0200

    Set mathdefaultsmode for LuaLaTeX


>---------------------------------------------------------------

2adb4f8723a97d29c145fa79d5e218e87bf251b0
 base/changes.txt      |  4 ++++
 base/doc/ltnews35.tex | 21 +++++++++++++++++++++
 base/ltmath.dtx       | 14 +++++++++++++-
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/base/changes.txt b/base/changes.txt
index 7dee0404..c8033a10 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,10 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 ================================================================================
 
+2022-05-08  Marcel Krüger  <Marcel.Krueger at latex-project.org>
+
+	* ltmath.dtx: Use more consistent default math styles on LuaLaTeX
+
 2022-04-21  Joseph Wright <Joseph.Wright at latex-project.org>
 
 	* ltfinal.dtx (subsection{Lccodes and uccodes}):
diff --git a/base/doc/ltnews35.tex b/base/doc/ltnews35.tex
index 3edfd91d..fde02b9b 100644
--- a/base/doc/ltnews35.tex
+++ b/base/doc/ltnews35.tex
@@ -695,6 +695,27 @@ been fixed in the latest release.
 \sxissue{q/637565}
 
 
+
+\subsection{More consistent use of cramped math styles in \LuaTeX}
+
+Using \LuaTeX's \cs{Udelimiterover} to place a horizontally extensible glyph
+on top of a mathematical expression now causes the expression to be set in cramped
+style as used in similar situations by traditional \TeX\ math rendering.
+Similarly cramped style is now used for expressions set under such a delimiter
+using \cs{Uunderdelimiter} but no longer used when setting an expression on top
+of such extensible glyphs using \cs{Uoverdelimiter}.
+This new behavior follows \TeX's rule that cramped style is used whenever something
+else appears above the expression.
+Additionally the math style of these constructs can now be detected using \cs{mathstyle}.
+
+The old behavior can be restored by adding
+\begin{verbatim}
+   \mathdefaultsmode=0
+\end{verbatim}
+to a document.
+
+
+
 \section{Changes to packages in the \pkg{amsmath} category}
 
 
diff --git a/base/ltmath.dtx b/base/ltmath.dtx
index 2f2eb101..1bd979f7 100644
--- a/base/ltmath.dtx
+++ b/base/ltmath.dtx
@@ -38,7 +38,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltmath.dtx}
-              [2022/04/08 v1.2k LaTeX Kernel (Math Setup)]
+              [2022/05/08 v1.2l LaTeX Kernel (Math Setup)]
 % \iffalse
 %</driver>
 %
@@ -1090,6 +1090,18 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \changes{v1.2l}{2022/05/08}{Use consistent math styles under \LuaTeX}
+% \LuaTeX\ contains new math primitives to place expression over or under
+% horizontally extensible glyphs. Before \LuaTeX\ 1.14 these did not work
+% correctly with the |\mathstyle| primitive and sometimes did not use
+% cramped style in consistent ways. For newer version, we opt into the
+% corrected behavior.
+%    \begin{macrocode}
+\ifx\mathdefaultsmode\@undefined\else
+  \mathdefaultsmode=1
+\fi
+%    \end{macrocode}
+%
 %    \begin{macrocode}
 %</2ekernel>
 %    \end{macrocode}





More information about the latex3-commits mailing list.