[latex3-commits] [latex3/latex2e] fixcleveref: correct spurious space in cleverref firstaid (ccff23fca)
github at latex-project.org
github at latex-project.org
Mon Nov 4 17:11:03 CET 2024
Repository : https://github.com/latex3/latex2e
On branch : fixcleveref
Link : https://github.com/latex3/latex2e/commit/ccff23fcae5a6cfbddc76309538252f4f4d1585b
>---------------------------------------------------------------
commit ccff23fcae5a6cfbddc76309538252f4f4d1585b
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Mon Nov 4 17:11:03 2024 +0100
correct spurious space in cleverref firstaid
>---------------------------------------------------------------
ccff23fcae5a6cfbddc76309538252f4f4d1585b
required/firstaid/changes.txt | 4 +++
.../latex2e-first-aid-for-external-files.dtx | 7 +++--
.../testfiles/firstaid-cleveref-1393.luatex.tlg | 33 ++++++++++++++++++----
.../firstaid/testfiles/firstaid-cleveref-1393.lvt | 6 ++++
.../firstaid/testfiles/firstaid-cleveref-1393.tlg | 28 ++++++++++++++----
5 files changed, 63 insertions(+), 15 deletions(-)
diff --git a/required/firstaid/changes.txt b/required/firstaid/changes.txt
index 5bfe7f1a5..3cdb776ef 100644
--- a/required/firstaid/changes.txt
+++ b/required/firstaid/changes.txt
@@ -1,3 +1,7 @@
+2024-11-04 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+
+ * latex2e-first-aid-for-external-files.dtx: correct spurious space
+
2024-10-16 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
* latex2e-first-aid-for-external-files.dtx: extend firstaid for cleveref
diff --git a/required/firstaid/latex2e-first-aid-for-external-files.dtx b/required/firstaid/latex2e-first-aid-for-external-files.dtx
index 68877bc24..111c88c21 100644
--- a/required/firstaid/latex2e-first-aid-for-external-files.dtx
+++ b/required/firstaid/latex2e-first-aid-for-external-files.dtx
@@ -111,8 +111,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-\def\LaTeXFirstAidDate{2024/10/16}
-\def\LaTeXFirstAidVersion{v1.1g}
+\def\LaTeXFirstAidDate{2024/11/04}
+\def\LaTeXFirstAidVersion{v1.1h}
% \end{macrocode}
%
% \begin{macrocode}
@@ -738,12 +738,13 @@
}
% \end{macrocode}
% we test if \cs{@currentcounter} is empty for unnumbered sections
+% \changes{v1.1h}{2024/11/01}{fix spurious space}
% \begin{macrocode}
\AddToHook{label}[firstaid/cleveref]
{\ifx
\@currentcounter\@empty
\else
- \firstaid at cref@updatelabeldata{\@currentcounter}
+ \firstaid at cref@updatelabeldata{\@currentcounter}%
\fi}
}%
}
diff --git a/required/firstaid/testfiles/firstaid-cleveref-1393.luatex.tlg b/required/firstaid/testfiles/firstaid-cleveref-1393.luatex.tlg
index d3836f32b..db6faae49 100644
--- a/required/firstaid/testfiles/firstaid-cleveref-1393.luatex.tlg
+++ b/required/firstaid/testfiles/firstaid-cleveref-1393.luatex.tlg
@@ -10,13 +10,13 @@ Completed box being shipped out [1]
....\hbox(0.0+0.0)x345.0, direction TLT
..\glue 25.0
..\glue(\lineskip) 0.0
-..\vbox(550.0+0.0)x345.0, glue set 458.00662fil, direction TLT
+..\vbox(550.0+0.0)x345.0, glue set 446.0079fil, direction TLT
...\write-{}
...\special{}
...\glue(\topskip) 1.60004
-...\hbox(8.39996+13.94444)x345.0, glue set 164.83333fill, direction TLT
+...\hbox(8.39996+13.94444)x345.0, glue set 166.5fill, direction TLT
....\glue(\tabskip) 0.0 plus 1.0fill
-....\hbox(8.39996+13.94444)x15.33334, direction TLT
+....\hbox(8.39996+13.94444)x12.00002, direction TLT
.....\rule(8.39996+3.60004)x0.0
.....\glue 6.0
.....\glue 0.0 plus 1.0fil
@@ -58,7 +58,6 @@ Completed box being shipped out [1]
.....\glue 6.0
.....\hbox(0.0+0.0)x0.0, direction TLT
.....\write1{\@writefile{lot}{\protect \contentsline {table}{\protect \numberline {1}{a caption}}{\thepage }{}\protected at file@percent }}
-.....\glue(\spaceskip) 3.33333 plus 1.66666 minus 1.11111
.....\write1{\newlabel{tab:long}{{1}{\thepage }{}{table.1}{}}}
.....\write1{\newlabel{tab:long at cref}{{[table][1][]1}{[1][1][]\thepage }{}{}{}}}
....\glue(\tabskip) 0.0 plus 1.0fill
@@ -114,7 +113,7 @@ Completed box being shipped out [1]
...\glue(\parskip) 0.0 plus 1.0
...\glue(\parskip) 0.0
...\glue(\baselineskip) 5.05556
-...\hbox(6.94444+1.94444)x345.0, glue set 207.18275fil, direction TLT
+...\hbox(6.94444+1.94444)x345.0, glue set 211.7827fil, direction TLT
....\localpar
.....\localinterlinepenalty=0
.....\localbrokenpenalty=0
@@ -179,7 +178,6 @@ Completed box being shipped out [1]
....\OT1/cmr/m/it/10 n
....\OT1/cmr/m/it/10 .
....\glue(\spaceskip) 4.59995 plus 4.59998 minus 0.34073
-....\glue(\spaceskip) 4.59995 plus 4.59998 minus 0.34073
....\write1{\newlabel{thm_defn}{{0.1}{\thepage }{}{target*.2}{}}}
....\penalty 10000
....\glue 0.0
@@ -250,6 +248,29 @@ Completed box being shipped out [1]
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 5.05556
+...\hbox(6.94444+0.0)x345.0, glue set 299.44437fil, direction TLT
+....\localpar
+.....\localinterlinepenalty=0
+.....\localbrokenpenalty=0
+.....\localleftbox=null
+.....\localrightbox=null
+....\hbox(0.0+0.0)x15.0, direction TLT
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 b
+....\kern0.27779 (font)
+....\OT1/cmr/m/n/10 c
+....\write1{\newlabel{test}{{1}{\thepage }{}{section.1}{}}}
+....\write1{\newlabel{test at cref}{{[section][1][]1}{[1][1][]\thepage }{}{}{}}}
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 b
+....\kern0.27779 (font)
+....\OT1/cmr/m/n/10 c
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
...\glue 0.0 plus 1.0fil
...\glue 0.0
...\glue 0.0 plus 0.0001fil
diff --git a/required/firstaid/testfiles/firstaid-cleveref-1393.lvt b/required/firstaid/testfiles/firstaid-cleveref-1393.lvt
index 0f57f8abd..5138a331c 100644
--- a/required/firstaid/testfiles/firstaid-cleveref-1393.lvt
+++ b/required/firstaid/testfiles/firstaid-cleveref-1393.lvt
@@ -21,4 +21,10 @@ A definition.
\end{defn}
The reference is \cref{thm_defn}.
+
+%from https://tex.stackexchange.com/q/730126/2388
+\refstepcounter{section}
+
+abc\label{test}abc
+
\end{document}
diff --git a/required/firstaid/testfiles/firstaid-cleveref-1393.tlg b/required/firstaid/testfiles/firstaid-cleveref-1393.tlg
index 48af01872..6611b1c02 100644
--- a/required/firstaid/testfiles/firstaid-cleveref-1393.tlg
+++ b/required/firstaid/testfiles/firstaid-cleveref-1393.tlg
@@ -10,13 +10,13 @@ Completed box being shipped out [1]
....\hbox(0.0+0.0)x345.0
..\glue 25.0
..\glue(\lineskip) 0.0
-..\vbox(550.0+0.0)x345.0, glue set 458.00664fil
+..\vbox(550.0+0.0)x345.0, glue set 446.00792fil
...\write-{}
...\special{}
...\glue(\topskip) 1.60004
-...\hbox(8.39996+13.94444)x345.0, glue set 164.83333fill
+...\hbox(8.39996+13.94444)x345.0, glue set 166.5fill
....\glue(\tabskip) 0.0 plus 1.0fill
-....\hbox(8.39996+13.94444)x15.33334
+....\hbox(8.39996+13.94444)x12.00002
.....\rule(8.39996+3.60004)x0.0
.....\glue 6.0
.....\glue 0.0 plus 1.0fil
@@ -54,7 +54,6 @@ Completed box being shipped out [1]
.....\glue 6.0
.....\hbox(0.0+0.0)x0.0
.....\write1{\@writefile{lot}{\protect \contentsline {table}{\protect \numberline {1}{a caption}}{\thepage }{}\protected at file@percent }}
-.....\glue 3.33333 plus 1.66666 minus 1.11111
.....\write1{\newlabel{tab:long}{{1}{\thepage }{}{table.1}{}}}
.....\write1{\newlabel{tab:long at cref}{{[table][1][]1}{[1][1][]\thepage }{}{}{}}}
....\glue(\tabskip) 0.0 plus 1.0fill
@@ -99,7 +98,7 @@ Completed box being shipped out [1]
...\glue(\parskip) 0.0 plus 1.0
...\glue(\parskip) 0.0
...\glue(\baselineskip) 5.05556
-...\hbox(6.94444+1.94444)x345.0, glue set 207.18275fil
+...\hbox(6.94444+1.94444)x345.0, glue set 211.7827fil
....\hbox(6.94444+0.0)x73.39548
.....\glue 0.0
.....\glue 0.0
@@ -135,7 +134,6 @@ Completed box being shipped out [1]
....\OT1/cmr/m/it/10 n
....\OT1/cmr/m/it/10 .
....\glue 4.59995 plus 4.59998 minus 0.34073
-....\glue 4.59995 plus 4.59998 minus 0.34073
....\write1{\newlabel{thm_defn}{{0.1}{\thepage }{}{target*.2}{}}}
....\penalty 10000
....\glue 0.0
@@ -185,6 +183,24 @@ Completed box being shipped out [1]
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 5.05556
+...\hbox(6.94444+0.0)x345.0, glue set 299.44437fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 b
+....\kern0.27779
+....\OT1/cmr/m/n/10 c
+....\write1{\newlabel{test}{{1}{\thepage }{}{section.1}{}}}
+....\write1{\newlabel{test at cref}{{[section][1][]1}{[1][1][]\thepage }{}{}{}}}
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 b
+....\kern0.27779
+....\OT1/cmr/m/n/10 c
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
...\glue 0.0 plus 1.0fil
...\glue 0.0
...\glue 0.0 plus 0.0001fil
More information about the latex3-commits
mailing list.