[latex3-commits] [git/LaTeX3-latex3-latex2e] develop, uniangle: Set mathdefaultsmode for LuaLaTeX (d6c2c589)
Marcel Fabian Krüger
tex at 2krueger.de
Sun May 8 11:52:42 CEST 2022
Repository : https://github.com/latex3/latex2e
On branches: develop,uniangle
Link : https://github.com/latex3/latex2e/commit/d6c2c5898f40d86319688ba525db1ffb4ec45f9c
>---------------------------------------------------------------
commit d6c2c5898f40d86319688ba525db1ffb4ec45f9c
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Sun May 8 11:32:57 2022 +0200
Set mathdefaultsmode for LuaLaTeX
>---------------------------------------------------------------
d6c2c5898f40d86319688ba525db1ffb4ec45f9c
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 e8b8a605..fb7226cf 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -5,6 +5,10 @@ It is provided for convenience only. It therefore makes no claims to
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-13 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
* ltxref.dtx:
diff --git a/base/doc/ltnews35.tex b/base/doc/ltnews35.tex
index 5031949a..ca171469 100644
--- a/base/doc/ltnews35.tex
+++ b/base/doc/ltnews35.tex
@@ -708,6 +708,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.