summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/base/ltmath.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-11-01 19:57:17 +0000
committerKarl Berry <karl@freefriends.org>2022-11-01 19:57:17 +0000
commitcfd5d22753b4fdca36d85f59b8ba0e5d1e8a9ad0 (patch)
tree06d78cd6aa3bc8723a05ec9c682510ff774b3cef /Master/texmf-dist/source/latex/base/ltmath.dtx
parent820f14d57cd6b67d5793e43d5d1e4866a51ffaa7 (diff)
latex2e 2022-11 (1nov22)
git-svn-id: svn://tug.org/texlive/trunk@64892 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/base/ltmath.dtx')
-rw-r--r--Master/texmf-dist/source/latex/base/ltmath.dtx34
1 files changed, 32 insertions, 2 deletions
diff --git a/Master/texmf-dist/source/latex/base/ltmath.dtx b/Master/texmf-dist/source/latex/base/ltmath.dtx
index 1bd979f7de5..60394460f57 100644
--- a/Master/texmf-dist/source/latex/base/ltmath.dtx
+++ b/Master/texmf-dist/source/latex/base/ltmath.dtx
@@ -38,7 +38,7 @@
%<*driver>
% \fi
\ProvidesFile{ltmath.dtx}
- [2022/05/08 v1.2l LaTeX Kernel (Math Setup)]
+ [2022/09/07 v1.2m LaTeX Kernel (Math Setup)]
% \iffalse
%</driver>
%
@@ -370,9 +370,39 @@
% \begin{macrocode}
\def\makesm@sh#1{%
\setbox\z@\hbox{\color@begingroup#1\color@endgroup}\finsm@sh}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2022/11/01}%
+%<latexrelease> {\mathsm@sh}{Guard against reboxing}%
\def\mathsm@sh#1#2{%
- \setbox\z@\hbox{$\m@th#1{#2}$}\finsm@sh}
+ \setbox\z@\hbox{$\m@th#1{#2}$}%
+% \end{macrocode}
+% The empty brace groups in front of the smashed box (which is
+% placed by \cs{finsm@sh}) ensures that a \cs{smash} in math is not
+% just producing a single box with its dimensions altered, but a
+% box plus this second ord atom. The reason is that \TeX{} sometimes reboxes a
+% box if its the only thing in a place like the denominator of a
+% fraction. This would then undo the smashing and the additional
+% ord atom prevents that. Two ord atoms in a row do not alter the
+% horizontal spacing in a formula so this is otherwise transparent.
+% \changes{v1.2m}{2022/09/03}{Guard against reboxing in fractions (gh/517)}
+% \begin{macrocode}
+ {}\finsm@sh}
% \end{macrocode}
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\mathsm@sh}{Guard against reboxing}%
+%<latexrelease>\def\mathsm@sh#1#2{%
+%<latexrelease> \setbox\z@\hbox{$\m@th#1{#2}$}\finsm@sh}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
% \changes{v1.2b}{2018/09/24}{Start LR-mode if necessary (git/49)}
% \begin{macrocode}
%</2ekernel>