summaryrefslogtreecommitdiff
path: root/macros/latex/required/firstaid
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-06-03 03:02:26 +0000
committerNorbert Preining <norbert@preining.info>2024-06-03 03:02:26 +0000
commite83ddb0c0c40cddccb9e35b6a1f83b3a70fc2b3d (patch)
treeee8ec365464694362978c23540a534e20c29592c /macros/latex/required/firstaid
parentd751a6e51be81d6c1ba797cd91d4079e7e2e407b (diff)
CTAN sync 202406030302
Diffstat (limited to 'macros/latex/required/firstaid')
-rw-r--r--macros/latex/required/firstaid/changes.txt42
-rw-r--r--macros/latex/required/firstaid/firstaid.ins4
-rw-r--r--macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx92
-rw-r--r--macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdfbin265925 -> 274055 bytes
4 files changed, 114 insertions, 24 deletions
diff --git a/macros/latex/required/firstaid/changes.txt b/macros/latex/required/firstaid/changes.txt
index 6e53f7f010..7ddcfbcec2 100644
--- a/macros/latex/required/firstaid/changes.txt
+++ b/macros/latex/required/firstaid/changes.txt
@@ -1,27 +1,37 @@
+2024-03-22 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+
+ * latex2e-first-aid-for-external-files.dtx: add firstaid for cleveref
+ to support five data in \newlabel.
+
+2024-03-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latex2e-first-aid-for-external-files.dtx:
+ add first aid for acro to not patch longtable (never worked in
+ the past, but now errors)
+
2024-02-29 Joseph Wright <Joseph.Wright@latex-project.org>
* latex2e-first-aid-for-external-files.dtx:
- - add firstaid for acro to declare a temporary prop
- - add firstaid for chemformula to load l3keys2e
+ - add first aid for acro to declare a temporary prop
+ - add first aid for chemformula to load l3keys2e
- add chemnum for acro to declare a temporary prop
2023-09-20 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
- * latex2e-first-aid-for-external-files.dtx: add firstaid for underscore to
+ * latex2e-first-aid-for-external-files.dtx: add firstaid for underscore to
make the active char protected and safe for use in csnames.
-
+
2023-07-18 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
- * latex2e-first-aid-for-external-files.dtx: remove no longer needed code for
- everysel
- * latex2e-first-aid-for-external-files.dtx: remove no longer needed code for bidi
- * latex2e-first-aid-for-external-files.dtx:
- remove no longer needed code for memoir/stockheight
-
+ * latex2e-first-aid-for-external-files.dtx:
+ remove no longer needed code for everysel
+ remove no longer needed code for bidi
+ remove no longer needed code for memoir/stockheight
+
2023-05-20 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
- * latex2e-first-aid-for-external-files.dtx: removed temporary fix for
- GitHub issue 591, unneeded now and it breaks for luatex the fix for gh 989
- (minipage/list spacing)
+ * latex2e-first-aid-for-external-files.dtx: removed temporary fix for
+ GitHub issue 591, unneeded now and it breaks for luatex the fix for gh 989
+ (minipage/list spacing)
2022-12-06 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
@@ -38,17 +48,17 @@
* latex2e-first-aid-for-external-files.dtx (subsection{The unicode-math package first aid}):
A first aid for unicode-math used together with the doc package.
-2022-10-27 Joseph Wright <Joseph.Wright@latex-project.org>
+2022-10-27 Joseph Wright <Joseph.Wright@latex-project.org>
* latex2e-first-aid-for-external-files.dtx:
Much easier babel patch
-2022-10-27 Joseph Wright <Joseph.Wright@latex-project.org>
+2022-10-27 Joseph Wright <Joseph.Wright@latex-project.org>
* latex2e-first-aid-for-external-files.dtx:
Add first aid for babel to undo a no-longer required patch
-2022-10-03 Joseph Wright <Joseph.Wright@latex-project.org>
+2022-10-03 Joseph Wright <Joseph.Wright@latex-project.org>
* latex2e-first-aid-for-external-files.dtx:
Add first aid for memoir to support kernel-provided
diff --git a/macros/latex/required/firstaid/firstaid.ins b/macros/latex/required/firstaid/firstaid.ins
index 22067390cd..5de510ba51 100644
--- a/macros/latex/required/firstaid/firstaid.ins
+++ b/macros/latex/required/firstaid/firstaid.ins
@@ -3,7 +3,7 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright (C) 2020-2023
+%% Copyright (C) 2020-2024
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -44,7 +44,7 @@ reports for it can be opened at https://latex-project.org/bugs/
(but please observe conditions on bug reports sent to that address!)
-Copyright (C) 2020-2023
+Copyright (C) 2020-2024
The LaTeX Project and any individual authors listed elsewhere
in this file.
diff --git a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx
index 2317c05141..152737eaf7 100644
--- a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx
+++ b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: latex2e-first-aid-for-external-files.dtx (C) Copyright 2020-2023
+%% File: latex2e-first-aid-for-external-files.dtx (C) Copyright 2020-2024
%%
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
@@ -111,8 +111,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-\def\LaTeXFirstAidDate{2024/02/29}
-\def\LaTeXFirstAidVersion{v1.1c}
+\def\LaTeXFirstAidDate{2024/03/20}
+\def\LaTeXFirstAidVersion{v1.1e}
% \end{macrocode}
%
% \begin{macrocode}
@@ -612,8 +612,21 @@
% routines in \pkg{expl3}.
% \begin{macrocode}
\AddToHook{package/acro/after}[firstaid]{%
- \FirstAidNeededT{acro}{sty}{2022/04/01 v3.8 typeset acronyms and other abbreviations (CN)}
- {\UseName{prop_new:c}{l__acro_tmpa_prop}}%
+ \FirstAidNeededT{acro}{sty}{2022/04/01 v3.8 typeset acronyms
+ and other abbreviations (CN)}
+ {\UseName{prop_new:c}{l__acro_tmpa_prop}%
+% \end{macrocode}
+% With the 2024 June release of \LaTeX{} it will also fail to patch
+% \cs{endlongtable} and therefore errors when loading. However, the
+% patch it tries never worked (because it was setting a local
+% boolean at a point where it was more or less immediately
+% reset). Thus, rather than fixing the patch approach (which
+% requires to surround the patch with \cs{ExplSyntaxOn}
+% \verb*/\catcode`\ =10 / and \cs{ExplSyntaxOff}) we simply disable
+% the patch for now.
+% \begin{macrocode}
+ \acsetup{patch/longtable=false}%
+ }%
}
% \end{macrocode}
%
@@ -636,11 +649,78 @@
% routines in \pkg{expl3}.
% \begin{macrocode}
\AddToHook{package/chemnum/after}[firstaid]{%
- \FirstAidNeededT{chemnum}{sty}{2021/01/21 v1.3a a comprehensive approach for the numbering of chemical compounds (CN)}
+ \FirstAidNeededT{chemnum}{sty}{2021/01/21 v1.3a a comprehensive
+ approach for the numbering of chemical compounds (CN)}
{\UseName{prop_new:c}{l__chemnum_tmpa_prop}}%
}
% \end{macrocode}
%
+% \subsection{The \pkg{cleveref} package first aid}
+%
+% The \pkg{cleveref} package expects only two data containers
+% for its internal \cs{newlabel} command. This fails if
+% \pkg{xr-hyper} is used which expands every \cs{newlabel} to
+% five data container and puts the file name into the last one.
+% \begin{macrocode}
+\AddToHook{package/cleveref/after}[firstaid]{%
+ \FirstAidNeededT{cleveref}{sty}{2018/03/27 v0.21.4 Intelligent cross-referencing}
+ {%
+% \end{macrocode}
+% This are the two commands which retrieve the data from the label info.
+% We change them to expect five arguments.
+% \begin{macrocode}
+ \def\cref@getref#1#2{%
+ \expandafter\let\expandafter#2\csname r@#1@cref\endcsname%
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter#2%
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@firstoffive#2}}% <-------- five
+ \def\cpageref@getref#1#2{%
+ \expandafter\let\expandafter#2\csname r@#1@cref\endcsname%
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter#2%
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@secondoffive#2}}% <----------- five
+% \end{macrocode}
+% We also need to redefine the internal label commands of cleveref.
+% This must be done after \pkg{cleveref} has made its changes
+% in \texttt{begindocument} so we add it to the same hook using
+% the hook label used by \pkg{cleveref}.
+% This way it is guaranteed to overwrite the definitions.
+% \begin{macrocode}
+ \AddToHook{begindocument}[cleveref]{%
+ \def\label@noarg#1{%
+ \cref@old@label{#1}%
+ \@bsphack%
+ \edef\@tempa{{page}{\the\c@page}}%
+ \setcounter{page}{1}%
+ \edef\@tempb{\thepage}%
+ \expandafter\setcounter\@tempa%
+ \cref@constructprefix{page}{\cref@result}%
+ \protected@write\@auxout{}%
+ {\string\newlabel{#1@cref}{{\cref@currentlabel}%
+ {[\@tempb][\arabic{page}][\cref@result]\thepage}{}{}{}}}% <----- five
+ \@esphack}%
+ \def\label@optarg[#1]#2{%
+ \cref@old@label{#2}%
+ \@bsphack%
+ \edef\@tempa{{page}{\the\c@page}}%
+ \setcounter{page}{1}%
+ \edef\@tempb{\thepage}%
+ \expandafter\setcounter\@tempa%
+ \cref@constructprefix{page}{\cref@result}%
+ \protected@edef\cref@currentlabel{%
+ \expandafter\cref@override@label@type%
+ \cref@currentlabel\@nil{#1}}%
+ \protected@write\@auxout{}%
+ {\string\newlabel{#2@cref}{{\cref@currentlabel}%
+ {[\@tempb][\arabic{page}][\cref@result]\thepage}{}{}{}}}% <------- five
+ \@esphack}%
+ }
+ }%
+}
+% \end{macrocode}
+%
% \begin{macrocode}
%</kernel>
% \end{macrocode}
diff --git a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf
index ab5db23f44..7dd3d43aa8 100644
--- a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf
+++ b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf
Binary files differ