[latex3-commits] [git/LaTeX3-latex3-latex2e] gh152: fix for #152 (eb232ba9)
Frank Mittelbach
frank.mittelbach at latex-project.org
Tue Apr 21 15:56:23 CEST 2020
Repository : https://github.com/latex3/latex2e
On branch : gh152
Link : https://github.com/latex3/latex2e/commit/eb232ba95d4a8608936c7151a28641eb207faa46
>---------------------------------------------------------------
commit eb232ba95d4a8608936c7151a28641eb207faa46
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Tue Apr 21 15:56:23 2020 +0200
fix for #152
>---------------------------------------------------------------
eb232ba95d4a8608936c7151a28641eb207faa46
base/changes.txt | 5 +++++
base/doc/ltnews32.tex | 12 +++++++++++
base/ltspace.dtx | 25 ++++++++++++++++++----
.../github-0069.lvt => testfiles/github-0152.lvt} | 9 ++++----
.../{tlb-utf8-bom.tlg => github-0152.tlg} | 12 +++++------
.../tlb-latexrelease-rollback-003.luatex.tlg | 4 ++++
base/testfiles/tlb-latexrelease-rollback-003.tlg | 4 ++++
.../tlb-latexrelease-rollback-003.xetex.tlg | 4 ++++
8 files changed, 59 insertions(+), 16 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index bf0f84b3..ec9ef21b 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -1,3 +1,8 @@
+2020-04-21 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * ltspace.dtx (subsection{Horizontal space (and breaks)}):
+ Support calc syntax with \hspace (gh/152)
+
2020-04-13 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
* ltfssini.dtx (subsection{Miscellaneous}):
diff --git a/base/doc/ltnews32.tex b/base/doc/ltnews32.tex
index 86a3d4fd..3bd05b9f 100644
--- a/base/doc/ltnews32.tex
+++ b/base/doc/ltnews32.tex
@@ -204,6 +204,17 @@ $2^{16}$, and this limitation has now been lifted.
\githubissue{124}
+\subsection{Support \pkg{calc} in \cs{hspace}}
+
+The \cs{hspace} command was implemented by passing its value directly
+to a \TeX{} primitive. As a result it was impossible to specify
+anything other than a simple dimension value in its argument. This has
+been changed, so that now \pkg{calc} syntax (as in other places) is also
+supported.
+%
+\githubissue{152}
+
+
\subsection{Set a non-zero \cs{baselineskip} in text scripts}
As \cs{textsuperscript} and \cs{textsubscript} usually contain only a
@@ -224,6 +235,7 @@ to the right. This has been corrected.
\githubissue{274}
+
\subsection{Better support for the legacy series default interface}
In the initial implementation of \LaTeX's font selection scheme (NFSS)
diff --git a/base/ltspace.dtx b/base/ltspace.dtx
index 1460ef5b..9afcae35 100644
--- a/base/ltspace.dtx
+++ b/base/ltspace.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltspace.dtx}
- [2020/03/07 v1.3l LaTeX Kernel (spacing)]
+ [2020/04/21 v1.3m LaTeX Kernel (spacing)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltspace.dtx}
@@ -1133,20 +1133,37 @@
% \changes{LaTeX2e}{1993/08/05}
% {(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)}
% \begin{macrocode}
-\def\@hspace#1{\hskip #1\relax}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@hspace}{Support calc with \hspace}%
+\def\@hspace#1{\begingroup\setlength\dimen@{#1}\hskip\dimen@\endgroup}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@hspace}{Support calc with \hspace}%
+
+%<latexrelease>
+%<latexrelease>\def\@hspace#1{\hskip #1\relax}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\@hspacer}
-% extra |\hskip 0pt| added 1985/17/12 to guard
+% Extra |\hskip 0pt| added 1985/17/12 to guard
% against a following |\unskip|
% |\relax| added 13 Oct 88 for usual \TeX\ lossage
% replaced both changes by |\hskip\z at skip| 27 Nov 91
% \begin{macrocode}
\def\@hspacer#1{\vrule \@width\z@\nobreak
- \hskip #1\hskip \z at skip}
+ \@hspace{#1}\hskip \z at skip}
% \end{macrocode}
% \end{macro}
%
diff --git a/base/testfiles-legacy/github-0069.lvt b/base/testfiles/github-0152.lvt
similarity index 54%
copy from base/testfiles-legacy/github-0069.lvt
copy to base/testfiles/github-0152.lvt
index 87ec5f67..f3420e2c 100644
--- a/base/testfiles-legacy/github-0069.lvt
+++ b/base/testfiles/github-0152.lvt
@@ -1,4 +1,7 @@
+% should compile without error
+
\documentclass{article}
+\usepackage{calc}
\input{test2e}
@@ -8,10 +11,6 @@
\START
-\verb*|x x|
-
-\begin{verbatim*}
- A B C
-\end{verbatim*}
+a\hspace{\widthof{some text}}b
\end{document}
diff --git a/base/testfiles/tlb-utf8-bom.tlg b/base/testfiles/github-0152.tlg
similarity index 80%
copy from base/testfiles/tlb-utf8-bom.tlg
copy to base/testfiles/github-0152.tlg
index ad1ff6cc..5f660f90 100644
--- a/base/testfiles/tlb-utf8-bom.tlg
+++ b/base/testfiles/github-0152.tlg
@@ -1,6 +1,5 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
-(tlb-utf8-bom.lvt)
Completed box being shipped out [1]
\vbox(633.0+0.0)x407.0
.\glue 16.0
@@ -13,12 +12,11 @@ Completed box being shipped out [1]
..\vbox(550.0+0.0)x345.0, glue set 539.94232fil
...\write-{}
...\glue(\topskip) 3.05556
-...\hbox(6.94444+0.0)x345.0, glue set 311.63887fil
+...\hbox(6.94444+0.0)x345.0, glue set 276.88878fil
....\hbox(0.0+0.0)x15.0
-....\OT1/cmr/m/n/10 h
-....\OT1/cmr/m/n/10 e
-....\OT1/cmr/m/n/10 r
-....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 a
+....\glue 42.55563
+....\OT1/cmr/m/n/10 b
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
@@ -30,4 +28,4 @@ Completed box being shipped out [1]
...\glue 0.0 plus 1.0fil
...\OT1/cmr/m/n/10 1
...\glue 0.0 plus 1.0fil
-(tlb-utf8-bom.aux)
+(github-0152.aux)
diff --git a/base/testfiles/tlb-latexrelease-rollback-003.luatex.tlg b/base/testfiles/tlb-latexrelease-rollback-003.luatex.tlg
index a873f213..dbd88b9f 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003.luatex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003.luatex.tlg
@@ -167,6 +167,8 @@ Skipping: [....-..-..] \addpenalty on input line ....
Applying: [....-..-..] \addpenalty on input line ....
Skipping: [....-..-..] Space after \@ on input line ....
Applying: [....-..-..] Space after \@ on input line ....
+Skipping: [....-..-..] Support calc with \hspace on input line ....
+Applying: [....-..-..] Support calc with \hspace on input line ....
Skipping: [....-..-..] Start LR-mode on input line ....
Applying: [....-..-..] Start LR-mode on input line ....
Skipping: [....-..-..] Extended Allocation on input line ....
@@ -524,6 +526,8 @@ Applying: [....-..-..] \addpenalty on input line ....
Already applied: [....-..-..] \addpenalty on input line ....
Applying: [....-..-..] Space after \@ on input line ....
Already applied: [....-..-..] Space after \@ on input line ....
+Skipping: [....-..-..] Support calc with \hspace on input line ....
+Applying: [....-..-..] Support calc with \hspace on input line ....
Applying: [....-..-..] Start LR-mode on input line ....
LaTeX Info: Redefining \enspace on input line ....
Already applied: [....-..-..] Start LR-mode on input line ....
diff --git a/base/testfiles/tlb-latexrelease-rollback-003.tlg b/base/testfiles/tlb-latexrelease-rollback-003.tlg
index 7d09c4b2..4bfcce0a 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003.tlg
@@ -165,6 +165,8 @@ Skipping: [....-..-..] \addpenalty on input line ....
Applying: [....-..-..] \addpenalty on input line ....
Skipping: [....-..-..] Space after \@ on input line ....
Applying: [....-..-..] Space after \@ on input line ....
+Skipping: [....-..-..] Support calc with \hspace on input line ....
+Applying: [....-..-..] Support calc with \hspace on input line ....
Skipping: [....-..-..] Start LR-mode on input line ....
Applying: [....-..-..] Start LR-mode on input line ....
Skipping: [....-..-..] Extended Allocation on input line ....
@@ -516,6 +518,8 @@ Applying: [....-..-..] \addpenalty on input line ....
Already applied: [....-..-..] \addpenalty on input line ....
Applying: [....-..-..] Space after \@ on input line ....
Already applied: [....-..-..] Space after \@ on input line ....
+Skipping: [....-..-..] Support calc with \hspace on input line ....
+Applying: [....-..-..] Support calc with \hspace on input line ....
Applying: [....-..-..] Start LR-mode on input line ....
LaTeX Info: Redefining \enspace on input line ....
Already applied: [....-..-..] Start LR-mode on input line ....
diff --git a/base/testfiles/tlb-latexrelease-rollback-003.xetex.tlg b/base/testfiles/tlb-latexrelease-rollback-003.xetex.tlg
index 5690ef08..0c0ac338 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003.xetex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003.xetex.tlg
@@ -165,6 +165,8 @@ Skipping: [....-..-..] \addpenalty on input line ....
Applying: [....-..-..] \addpenalty on input line ....
Skipping: [....-..-..] Space after \@ on input line ....
Applying: [....-..-..] Space after \@ on input line ....
+Skipping: [....-..-..] Support calc with \hspace on input line ....
+Applying: [....-..-..] Support calc with \hspace on input line ....
Skipping: [....-..-..] Start LR-mode on input line ....
Applying: [....-..-..] Start LR-mode on input line ....
Skipping: [....-..-..] Extended Allocation on input line ....
@@ -525,6 +527,8 @@ Applying: [....-..-..] \addpenalty on input line ....
Already applied: [....-..-..] \addpenalty on input line ....
Applying: [....-..-..] Space after \@ on input line ....
Already applied: [....-..-..] Space after \@ on input line ....
+Skipping: [....-..-..] Support calc with \hspace on input line ....
+Applying: [....-..-..] Support calc with \hspace on input line ....
Applying: [....-..-..] Start LR-mode on input line ....
LaTeX Info: Redefining \enspace on input line ....
Already applied: [....-..-..] Start LR-mode on input line ....
More information about the latex3-commits
mailing list.