summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/base/ltfssbas.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/base/ltfssbas.dtx')
-rw-r--r--Master/texmf-dist/source/latex/base/ltfssbas.dtx66
1 files changed, 56 insertions, 10 deletions
diff --git a/Master/texmf-dist/source/latex/base/ltfssbas.dtx b/Master/texmf-dist/source/latex/base/ltfssbas.dtx
index d013ec0ecbc..cc43622a4bc 100644
--- a/Master/texmf-dist/source/latex/base/ltfssbas.dtx
+++ b/Master/texmf-dist/source/latex/base/ltfssbas.dtx
@@ -35,7 +35,7 @@
%
%
\ProvidesFile{ltfssbas.dtx}
- [2021/06/09 v3.2j LaTeX Kernel (NFSS Basic Macros)]
+ [2022/07/04 v3.2k LaTeX Kernel (NFSS Basic Macros)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -1127,26 +1127,72 @@
% \end{macro}
%
%
-% \begin{macro}{\frozen@everymath}
+%
+
+%
+% \begin{macro}{\frozen@everydisplay}
% \changes{v2.1a}{1994/01/17}{New math font setup}
% Now we define the behaviour of the frozen hooks: first
% check the math setup then call the user hook.
+%
+% The check code may push tokens after the math formula with
+% \cs{aftergroup} and they would prevent a \verb=$$= from dropping
+% following spaces. We therefore use a switch to be set as the
+% first thing after the group so that following code can determine
+% if there was a display or some inline math (in the latter case
+% we better not drop spaces).
+% After setting the switch we also have to place \cs{ignorespaces}
+% because setting the switch may be the only thing that happens
+% after the display.
+% \changes{v3.2k}{2022/07/04}{Ignore spaces if necessary (gh/886)}
+% The issue with handling of spaces was found in 2022, but it is
+% really a bug fix for the code added in 2021/11.
% \begin{macrocode}
-\frozen@everymath = {\check@mathfonts
- \the\everymath}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2021/11/15}
+%<latexrelease> {\frozen@everydisplay}{Handle spaces after math}%
+%<*2ekernel|latexrelease>
+\frozen@everydisplay = {%
+ \aftergroup\@ignoretrue \aftergroup\ignorespaces
+ \check@mathfonts
+ \the\everydisplay}
% \end{macrocode}
% \end{macro}
-%
-%
-% \begin{macro}{\frozen@everydisplay}
+
+
+% \begin{macro}{\frozen@everymath}
% \changes{v2.1a}{1994/01/17}{New math font setup}
-% Ditto for the display hook.
+% \changes{v3.2k}{2022/07/04}{Ignore spaces if necessary (gh/886)}
+% The frozen code for inline math is similar, except that here we
+% do not want to drop following spaces.
% \begin{macrocode}
-\frozen@everydisplay = {\check@mathfonts
- \the\everydisplay}
+\frozen@everymath = {%
+ \aftergroup\@ignorefalse
+ \check@mathfonts
+ \the\everymath}
% \end{macrocode}
% \end{macro}
%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2020/10/01}
+%<latexrelease> {\frozen@everydisplay}{Handle spaces after math}%
+%<latexrelease>
+%<latexrelease>\frozen@everydisplay = {\check@mathfonts
+%<latexrelease> \the\everydisplay}
+%<latexrelease>\frozen@everymath = {\check@mathfonts
+%<latexrelease> \the\everymath}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+%
+%
+%
+%
+%
% \changes{v3.0q}{1996/07/27}{\cs{if@inmath} switch removed}
%
% \begin{macro}{\curr@math@size}