summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/base/ltspace.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-12-01 20:38:11 +0000
committerKarl Berry <karl@freefriends.org>2022-12-01 20:38:11 +0000
commit7b89e8971f880d3c7b3cdbc6144d8d7d25e622f6 (patch)
treee341c4bfc74e3b4e9a5c3bb0b2f7ba29a4a0fd38 /Master/texmf-dist/source/latex/base/ltspace.dtx
parent82a361bf5afe1ab883a6dcb1b7dccf21b06bc121 (diff)
latex (1dec22)
git-svn-id: svn://tug.org/texlive/trunk@65161 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/base/ltspace.dtx')
-rw-r--r--Master/texmf-dist/source/latex/base/ltspace.dtx16
1 files changed, 13 insertions, 3 deletions
diff --git a/Master/texmf-dist/source/latex/base/ltspace.dtx b/Master/texmf-dist/source/latex/base/ltspace.dtx
index feb82730ece..30bda278fbf 100644
--- a/Master/texmf-dist/source/latex/base/ltspace.dtx
+++ b/Master/texmf-dist/source/latex/base/ltspace.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltspace.dtx}
- [2020/05/06 v1.3n LaTeX Kernel (spacing)]
+ [2022/11/28 v1.3o LaTeX Kernel (spacing)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltspace.dtx}
@@ -438,12 +438,13 @@
% \cs{setlength}. This way the \texttt{calc} package can operate on
% the argument value.
% \changes{v1.3m}{2020/04/21}{Support calc syntax (gh/152)}
+% \changes{v1.3o}{2022/11/28}{Support calc syntax without a group (gh/967)}
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
%<latexrelease>\IncludeInRelease{2020/10/01}%
%<latexrelease> {\@vspace@calcify}{Add calc support}%
-\def\@vspace@calcify#1{\begingroup\setlength\skip@{#1}\vskip\skip@\endgroup}
+\def\@vspace@calcify#1{\setlength\sp@ce@skip{#1}\vskip\sp@ce@skip}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
@@ -1261,12 +1262,21 @@
% {(RmS) Removed superfluous \cs{leavevmode} in \cs{@hspace} and
% \cs{@hspacer}, as suggested by CAR.}
% \changes{v1.3m}{2020/04/21}{Support calc syntax (gh/152)}
+% \changes{v1.3o}{2022/11/28}{Support calc syntax correctly (gh/967)}
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
%<latexrelease>\IncludeInRelease{2020/10/01}%
%<latexrelease> {\@hspace}{Support calc with \hspace}%
-\def\@hspace#1{\begingroup\setlength\skip@{#1}\hskip\skip@\endgroup}
+% \end{macrocode}
+% We use a private register to calculate the space (if \pkg{calc} is used). Previously
+% we used a group but that results in
+% \cs{everypar} etc.\ being executed inside the group if the \cs{hspace} starts a paragraph.
+% This is a bug fix so
+% we do not provide rollback to the incorrect intermediate version.
+% \begin{macrocode}
+\newskip\sp@ce@skip
+\def\@hspace#1{\setlength\sp@ce@skip{#1}\hskip\sp@ce@skip}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
% \end{macrocode}