summaryrefslogtreecommitdiff
path: root/macros/latex-dev/required/latex-lab/latex-lab-firstaid.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-09-15 03:02:43 +0000
committerNorbert Preining <norbert@preining.info>2023-09-15 03:02:43 +0000
commitdeda1937c52481b2259e1061840b99e18e8ca361 (patch)
tree2dede32b7c181f98c1fa00cfa9d531a306e5d5fd /macros/latex-dev/required/latex-lab/latex-lab-firstaid.dtx
parent527001b634c06d34f92d1809f507add012c320f6 (diff)
CTAN sync 202309150302
Diffstat (limited to 'macros/latex-dev/required/latex-lab/latex-lab-firstaid.dtx')
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-firstaid.dtx62
1 files changed, 30 insertions, 32 deletions
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-firstaid.dtx b/macros/latex-dev/required/latex-lab/latex-lab-firstaid.dtx
index 8f474e6b12..e2ee78b2ff 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-firstaid.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-firstaid.dtx
@@ -16,6 +16,8 @@
%
% for those people who are interested or want to report an issue.
%
+\def\ltlabfirstaiddate{2023-07-20}
+\def\ltlabfirstaidversion{0.85a}
%<*driver>
\documentclass{l3doc}
\EnableCrossrefs
@@ -28,9 +30,9 @@
% \fi
%
% \title{The \textsf{latex-lab-firstaid} package\\
-% Temporary patches to external packages}
+% Temporary patches to external packages needed for the tagging project}
% \author{\LaTeX{} Project\thanks{Initial implementation done by Ulrike Fischer}}
-% \date{Version 0.80 2023-06-04}
+% \date{v\ltlabfirstaidversion\ \ltlabfirstaiddate}
%
% \maketitle
%
@@ -58,8 +60,9 @@
%<@@=tag>
% \end{macrocode}
% \begin{macrocode}
-\ProvidesPackage {latex-lab-testphase-firstaid} [2023-06-04 v0.8
- Temporary patches to external packages need for the tagging project]
+\ProvidesPackage {latex-lab-testphase-firstaid} [%
+ \ltlabfirstaiddate\space v\ltlabfirstaiddate\space
+ Temporary patches to external packages needed for the tagging project]
% \end{macrocode}
% \subsection{blindtext}
@@ -103,43 +106,38 @@
}%
}
% \end{macrocode}
-% \subsection{ltugboat}
-% ltugboat need only a redefinition of \cs{l@section} to add the hooks
+% \subsection{cleveref}
+% The cleveref package redefines \cs{@makefntext} and this means that the patches in
+% the new footnote code fails. We use a hook instead
% \begin{macrocode}
-\AddToHook{file/ltugboat.cls/after}
+\AddToHook{package/cleveref/after}
{
- \def\l@section#1#2{\addpenalty{\@secpenalty}%
- \addvspace{\TBtocsectionspace}%
- \@tempdima 1.5em
- \begingroup
- \parindent\z@ \rightskip\z@ % article style makes \rightskip > 0
- \parfillskip\z@
- \TBtocsectionfont
- \leavevmode\advance\leftskip\@tempdima\hskip-\leftskip
- \UseHookWithArguments{contentsline/text/before}{4}
- {\toclevel@part}{#1}{#2}{\@contentsline@destination}%
- \csname contentsline@text@1@format\endcsname{#1}%
- \UseHookWithArguments{contentsline/text/after}{4}
- {\toclevel@part}{#1}{#2}{\@contentsline@destination}%
- \nobreak\hfil
- \nobreak\hb@xt@\@pnumwidth{\hss
- \UseHookWithArguments{contentsline/page/before}{4}
- {\toclevel@part}{#1}{#2}{\@contentsline@destination}%
- #2%
- \UseHookWithArguments{contentsline/page/after}{4}
- {\toclevel@part}{#1}{#2}{\@contentsline@destination}%
- }\par
- \endgroup}
- }
+ \let\@makefntext\cref@old@makefntext
+ \AddToHook{cmd/@makefntext/before}{%
+ \cref@constructprefix{footnote}{\cref@result}%
+ \protected@edef\cref@currentlabel{%
+ [footnote][\arabic{footnote}][\cref@result]%
+ \p@footnote\@thefnmark}}
+% \end{macrocode}
+% The second problem is that it redefines \cs{refstepcounter} to use an argument.
+% In itself this isn't a problem but as the new definition doesn't grab the arguments
+% directly it fails over the generic hook inserted at the end of the definition
+% \begin{macrocode}
+ \RenewDocumentCommand\refstepcounter{om}{%
+ \IfNoValueTF{#1}%
+ {\refstepcounter@noarg{#2}}%
+ {\refstepcounter@optarg[#1]{#2}}%
+ }%
+ }
% \end{macrocode}
-
% \begin{macrocode}
%</package>
% \end{macrocode}
% \begin{macrocode}
%<*latex-lab>
\ProvidesFile{firstaid-latex-lab-testphase.ltx}
- [2023-06-04 v0.8 Temporary patches to external packages need for the tagging project]
+ [\ltlabfirstaiddate\space v\ltlabfirstaidversion\space
+ latex-lab wrapper firstaid]
\RequirePackage{latex-lab-testphase-firstaid}