[latex3-commits] [git/LaTeX3-latex3-pdfresources] test-OR-lab: new OR code (1376d03)

Ulrike Fischer fischer at troubleshooting-tex.de
Sun Feb 6 12:00:20 CET 2022


Repository : https://github.com/latex3/pdfresources
On branch  : test-OR-lab
Link       : https://github.com/latex3/pdfresources/commit/1376d0338a5b56b9fd756dcc7cab27f9f85697be

>---------------------------------------------------------------

commit 1376d0338a5b56b9fd756dcc7cab27f9f85697be
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Sun Feb 6 12:00:20 2022 +0100

    new OR code


>---------------------------------------------------------------

1376d0338a5b56b9fd756dcc7cab27f9f85697be
 firstaid/output-patches-tmp-ltx.dtx | 38 ++++++++++++++++++++++---------------
 1 file changed, 23 insertions(+), 15 deletions(-)

diff --git a/firstaid/output-patches-tmp-ltx.dtx b/firstaid/output-patches-tmp-ltx.dtx
index f084030..96b9d32 100644
--- a/firstaid/output-patches-tmp-ltx.dtx
+++ b/firstaid/output-patches-tmp-ltx.dtx
@@ -58,16 +58,15 @@
 %
 %
 %  \subsection{Patching the OR}
-%  This add hooks around header and footer.
-%  At first initialize the hooks
+%  This add hooks around header and footer, in \cs{@makecol} and in multicol.
+%  At first initialize some of the hooks. We use providecommand to avoid problems if
+%  the kernel changes here and provides them directly.
 %    \begin{macrocode}
-\newcommand\@kernel at before@head{}
-\newcommand\@kernel at before@foot{}
-\newcommand\@kernel at after@head{}
-\newcommand\@kernel at after@foot{}
-\newcommand\@kernel at before@footins{}
-\newcommand\@kernel at before@cclv{}
-\newcommand\@mult at ptagging@hook{}
+\providecommand\@kernel at before@head{}
+\providecommand\@kernel at before@foot{}
+\providecommand\@kernel at after@head{}
+\providecommand\@kernel at after@foot{}
+\providecommand\@mult at ptagging@hook{}% multicol
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -92,17 +91,26 @@
 %    \item
 %      update the \cs{footins} stream if that one got split
 %    \end{itemize}
+%
+%   If the new latex-lab file for the output routine exists we load it.
+%   In the other case we patch \cs{@makecol} manually.
 %    \begin{macrocode}
+\IfFileExists{latex-lab-new-or.ltx}
+ {\input{latex-lab-new-or.ltx}}
+ {
+  \providecommand\@kernel at before@footins{}
+  \providecommand\@kernel at before@cclv{}
 
-\patchcmd\@makecol
-    {\vskip\skip\footins}
-    {\vskip\skip\footins\@kernel at before@footins}
-  {\typeout{Patching \string\@makecol\space for tagging}}{\PATCHerror }
+  \patchcmd\@makecol
+      {\vskip\skip\footins}
+      {\vskip\skip\footins\@kernel at before@footins}
+    {\typeout{Patching \string\@makecol\space for tagging}}{\PATCHerror }
 
 % for some reason patching with etoolbox only works in this order ...
 
-\pretocmd\@makecol{\@kernel at before@cclv}
-  {\typeout{Patching \string\@makecol\space for tagging}}{\PATCHerror }
+  \pretocmd\@makecol{\@kernel at before@cclv}
+    {\typeout{Patching \string\@makecol\space for tagging}}{\PATCHerror }
+  }
 %    \end{macrocode}
 %  \end{macro}
 %





More information about the latex3-commits mailing list.