[latex3-commits] [latex3/latex2e] latex-lab/tagging12: attempt to patch a few more styles/classes (that contain \makebox rather than \hb at xt@) (9b91d1dd)
github at latex-project.org
github at latex-project.org
Mon Mar 11 21:56:10 CET 2024
Repository : https://github.com/latex3/latex2e
On branch : latex-lab/tagging12
Link : https://github.com/latex3/latex2e/commit/9b91d1dd3cdc6d17631b688b9bbf8565e0716794
>---------------------------------------------------------------
commit 9b91d1dd3cdc6d17631b688b9bbf8565e0716794
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Mon Mar 11 21:56:10 2024 +0100
attempt to patch a few more styles/classes (that contain \makebox rather than \hb at xt@)
>---------------------------------------------------------------
9b91d1dd3cdc6d17631b688b9bbf8565e0716794
required/latex-lab/changes.txt | 5 ++++
required/latex-lab/latex-lab-footnotes.dtx | 27 +++++++++++++++++---
.../latex-lab/testfiles-OR/footnote-patches.lvt | 29 ++++++++++++++++++++++
.../latex-lab/testfiles-OR/footnote-patches.tlg | 11 ++++++++
4 files changed, 68 insertions(+), 4 deletions(-)
diff --git a/required/latex-lab/changes.txt b/required/latex-lab/changes.txt
index 213c6353..c11feb8b 100644
--- a/required/latex-lab/changes.txt
+++ b/required/latex-lab/changes.txt
@@ -9,6 +9,11 @@
definition of \@makefntext is the one that was suppliedd by footmisc for
the hang option. (gh/12)
+ (subsubsection{Making documents use the new \cs{@makefntext}}):
+ Some classes/styles use \makebox rather than \hb at xt@, so try to patch
+ them too. Of course, none of this is very robust. By the end of the
+ day well need updating to the new standard solution.
+
2024-02-12 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
* latex-lab-block.dtx: left align description labels.
diff --git a/required/latex-lab/latex-lab-footnotes.dtx b/required/latex-lab/latex-lab-footnotes.dtx
index cd29bf86..bef4c1f5 100644
--- a/required/latex-lab/latex-lab-footnotes.dtx
+++ b/required/latex-lab/latex-lab-footnotes.dtx
@@ -1502,10 +1502,18 @@
\tl_if_in:NnTF \l_@@_patch_tl { \hb at xt@ }
{ \cs_set_eq:NN \@@_tmp:w \@@_patch_hb at xt@:w }
{
- \tl_if_in:NnTF \l_@@_patch_tl { \@makefnmark }
- { \cs_set_eq:NN \@@_tmp:w \@@_patch_ at makefnmark:w }
- { \ERROR
- \cs_set_eq:NN \@@_tmp:w \exp_stop_f: }
+% \end{macrocode}
+% Some styles/classes use \verb=\makebox[...][...]= instead of \cs{hb at xt@}
+% so try to patch those too.
+% \begin{macrocode}
+ \tl_if_in:NnTF \l_@@_patch_tl { \makebox }
+ { \cs_set_eq:NN \@@_tmp:w \@@_patch_makebox:w }
+ {
+ \tl_if_in:NnTF \l_@@_patch_tl { \@makefnmark }
+ { \cs_set_eq:NN \@@_tmp:w \@@_patch_ at makefnmark:w }
+ { \ERROR
+ \cs_set_eq:NN \@@_tmp:w \exp_stop_f: }
+ }
}
}
\tl_set:Nf \l_@@_patch_tl
@@ -1529,6 +1537,17 @@
% \begin{macrocode}
\cs_new:Npn \@@_patch_hb at xt@:w #1 \hb at xt@ #2 #
{ \exp_stop_f: #1 \@makefntext at processX { \hb at xt@ #2 } }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new:Npn \@@_patch_makebox:w #1 \makebox #2 #
+ { \exp_stop_f: #1 \@makefntext at processX { \makebox #2 } }
+% \end{macrocode}
+%
+% If the definition contains neither \cs{hbox}, \cs{hb at xt@} nor \cs{makebox},
+% we see if it contains \cs{@makefnmark} and if so put the socket
+% before that.
+% \begin{macrocode}
\cs_new:Npn \@@_patch_ at makefnmark:w #1 \@makefnmark
{ \exp_stop_f: #1 \@makefntext at processX { \use:n } { \@makefnmark } }
% \end{macrocode}
diff --git a/required/latex-lab/testfiles-OR/footnote-patches.lvt b/required/latex-lab/testfiles-OR/footnote-patches.lvt
new file mode 100644
index 00000000..b1a1218c
--- /dev/null
+++ b/required/latex-lab/testfiles-OR/footnote-patches.lvt
@@ -0,0 +1,29 @@
+\DocumentMetadata{testphase=new-or}
+\input{regression-test}
+
+\documentclass{article}
+
+\makeatletter
+
+% make what biblatex-chicago.sty does and see if that gets patched:
+
+\renewcommand\@makefntext[1]{% Provides in-line footnote marks
+ \setlength\parindent{1em}%
+ \noindent
+ \makebox[2.3em][r]{\@thefnmark.\,\,}#1}
+
+\makeatother
+
+\begin{document}
+
+\START
+
+\makeatletter
+\show\@makefntext
+\makeatother
+
+test\footnote{aaa}
+
+\newpage
+\OMIT
+\end{document}
diff --git a/required/latex-lab/testfiles-OR/footnote-patches.tlg b/required/latex-lab/testfiles-OR/footnote-patches.tlg
new file mode 100644
index 00000000..097b2b85
--- /dev/null
+++ b/required/latex-lab/testfiles-OR/footnote-patches.tlg
@@ -0,0 +1,11 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+> \@makefntext=\long macro:
+#1->\setlength \parindent {1em}\noindent \@makefntext at processX {\makebox [2.3em][r]}{\@thefnmark .\,ZZZZZ\,}\UseSocket {tagsupport/fntext/text}{#1}.
+l. ...\show\@makefntext
+LaTeX Font Info: External font `cmex10' loaded for size
+(Font) <7> on input line ....
+LaTeX Font Info: External font `cmex10' loaded for size
+(Font) <5> on input line ....
+[1
+]
More information about the latex3-commits
mailing list.