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

Marcel Fabian Krüger tex at 2krueger.de
Wed Apr 13 08:26:04 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : mathdefaultsmode
Link       : https://github.com/latex3/latex2e/commit/62d77bb74e93860aef6639e1f2364a46c61d3ca9

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

commit 62d77bb74e93860aef6639e1f2364a46c61d3ca9
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Tue Apr 12 15:28:33 2022 +0200

    Set mathdefaultsmode for LuaLaTeX


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

62d77bb74e93860aef6639e1f2364a46c61d3ca9
 base/changes.txt      |  4 ++++
 base/doc/ltnews35.tex | 20 ++++++++++++++++++++
 base/ltmath.dtx       | 14 +++++++++++++-
 3 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/base/changes.txt b/base/changes.txt
index 313072a6..a14ecb14 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-04-03  Marcel Krüger  <Marcel.Krueger at latex-project.org>
+
+	* ltmath.dtx: Use more consistent default math styles on LuaLaTeX
+
 2022-04-03  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* ltmarks.dtx: New module to implement new marks mechanism
diff --git a/base/doc/ltnews35.tex b/base/doc/ltnews35.tex
index 52fe193d..3647f7a6 100644
--- a/base/doc/ltnews35.tex
+++ b/base/doc/ltnews35.tex
@@ -684,6 +684,26 @@ This has finally been corrected and a warning is now generated also in this case
 
 
 
+\subsection{More consisten 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 9f000a41..f35fa82c 100644
--- a/base/ltmath.dtx
+++ b/base/ltmath.dtx
@@ -38,7 +38,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltmath.dtx}
-              [2021/10/14 v1.2j LaTeX Kernel (Math Setup)]
+              [2022/04/11 v1.2k LaTeX Kernel (Math Setup)]
 % \iffalse
 %</driver>
 %
@@ -1089,6 +1089,18 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \changes{v1.2k}{2022/04/11}{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.