[latex3-commits] [git/LaTeX3-latex3-latex2e] firstaid: first aid initial version (bbda14d6)

Frank Mittelbach frank.mittelbach at latex-project.org
Sat Sep 26 14:20:23 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : firstaid
Link       : https://github.com/latex3/latex2e/commit/bbda14d65ab16c379f458be54b66a244a9cdbcd6

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

commit bbda14d65ab16c379f458be54b66a244a9cdbcd6
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Sat Sep 26 14:20:23 2020 +0200

    first aid initial version


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

bbda14d65ab16c379f458be54b66a244a9cdbcd6
 base/changes.txt                                   |   6 +
 base/ltfinal.dtx                                   |   6 +-
 build.lua                                          |   2 +-
 required/firstaid/README.md                        |   4 +
 required/firstaid/build.lua                        |  65 +++++
 .../firstaid/changes.txt                           |   0
 {base => required/firstaid}/config-TU.lua          |   0
 .../{tools/longtable.ins => firstaid/firstaid.ins} |  22 +-
 .../latex2e-first-aid-for-external-files.dtx       | 311 +++++++++++++++++++++
 .../firstaid/testfiles-TU/firstaid-bidi.luatex.tlg |  51 ++++
 .../firstaid/testfiles-TU/firstaid-bidi.lvt        |  12 +-
 required/firstaid/testfiles-TU/firstaid-bidi.tlg   | 154 ++++++++++
 required/firstaid/testfiles/firstaid-000.lvt       |  14 +
 required/firstaid/testfiles/firstaid-000.tlg       |   8 +
 required/firstaid/testfiles/firstaid-dinbrief.lvt  |  13 +
 .../firstaid/testfiles/firstaid-dinbrief.tlg       |   4 +-
 .../testfiles/firstaid-filehook.luatex.tlg}        |  12 +-
 required/firstaid/testfiles/firstaid-filehook.lvt  |  17 ++
 .../testfiles/firstaid-filehook.tlg}               |  12 +-
 .../testfiles/firstaid-filehook.xetex.tlg}         |  12 +-
 required/firstaid/update-all.sh                    |   7 +
 21 files changed, 698 insertions(+), 34 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index ef9406cd..bc186923 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,12 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 ================================================================================
 
+2020-09-26  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* ltfinal.dtx (subsection{Some last minute initializations \ldots}):
+	Load a "first aid" containing temporary fixes file for external
+	packages that await updates.
+
 2020-09-09  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* ltshipout.dtx (subsection{Emulating \pkg{atbegshi}}):
diff --git a/base/ltfinal.dtx b/base/ltfinal.dtx
index 2555e21a..aa421972 100644
--- a/base/ltfinal.dtx
+++ b/base/ltfinal.dtx
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltfinal.dtx}
-             [2020-08-21 v2.2i LaTeX Kernel (Final Settings)]
+             [2020-09-26 v2.2j LaTeX Kernel (Final Settings)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltfinal.dtx}
@@ -1139,7 +1139,11 @@
 %
 %    \subsection{Some last minute initializations \ldots}
 %
+%    Load the first aid set of definitions for external packages that await updates.
+% \changes{v2.2j}{2020/09/26}
+%         {Load first aid file if existing}
 %    \begin{macrocode}
+\@input{latex2e-first-aid-for-external-files.ltx}
 %    \end{macrocode}
 %
 %
diff --git a/build.lua b/build.lua
index c135e9b6..dff8cccd 100644
--- a/build.lua
+++ b/build.lua
@@ -8,7 +8,7 @@ module  = ""
 
 -- A couple of custom variables: the order here is set up for 'importance'
 bundles  = {"base"}
-required = {"cyrillic", "graphics", "tools", "amsmath"}
+required = {"cyrillic", "graphics", "tools", "amsmath", "firstaid"}
 
 -- Location of main directory: use Unix-style path separators
 maindir = "."
diff --git a/required/firstaid/README.md b/required/firstaid/README.md
new file mode 100644
index 00000000..0374aeed
--- /dev/null
+++ b/required/firstaid/README.md
@@ -0,0 +1,4 @@
+# LaTeX2e-temporary-external-fixes
+LaTeX2e kernel code that temporarily adjusts packages that are not yet updated and therefore fail.
+
+This is stored in a separate file external to the base bundle, so that it can be easily updated when fixes become available without the need to upload a full new LaTeX2e release to CTAN.
diff --git a/required/firstaid/build.lua b/required/firstaid/build.lua
new file mode 100644
index 00000000..fd9ec472
--- /dev/null
+++ b/required/firstaid/build.lua
@@ -0,0 +1,65 @@
+#!/usr/bin/env texlua
+
+-- Build script for LaTeX2e "firstaid" files
+
+-- Identify the bundle and module
+bundle = ""
+module = "firstaid"
+
+-- CTAN's name for this is a bit different from ours
+ctanpkg = "latex-firstaid"
+
+-- Location of main directory: use Unix-style path separators
+maindir = "../.."
+
+-- Minor modifications to file types
+installfiles = {"*.ltx", "*.sty", "*.tex"}
+typesetfiles = {"*.dtx"}
+unpackfiles  = {"*.ins"}
+
+sourcefiles  = {"*.dtx", "*.ins", "*-????-??-??.sty"}
+
+checkdeps =
+  {
+    maindir .. "/base",
+  }
+
+checkruns     = 2
+typesetruns   = 2
+
+
+-- we want to test against external packages
+
+checksearch  = true
+
+-- Allow for TU and other test configurations
+checkconfigs = {"build","config-TU"}
+
+
+
+-- Upload meta data
+
+uploadconfig = {
+ pkg = module,
+-- version = "v1.0a 2020-01-01",
+ author = "LaTeX Project team",
+ license = "lppl1.3c",
+-- summary = "",
+ ctanPath = "/macros/latex/" .. module,
+ repository = "https://github.com/latex3/latex2e",
+ bugtracker = "https://github.com/latex3/latex2e/issues",
+ uploader = "LaTeX Project team",
+ email = "latex-team at latex-project.org",
+ update = true ,
+ note = [[Uploaded automatically by l3build...]],
+}
+
+
+-- Load the common settings for the LaTeX2e repo
+dofile (maindir .. "/build-config.lua")
+
+-- Find and run the build system
+kpse.set_program_name ("kpsewhich")
+if not release_date then
+  dofile(kpse.lookup("l3build.lua"))
+end
diff --git a/base/testfiles-TU/github-0282.tlg b/required/firstaid/changes.txt
similarity index 100%
copy from base/testfiles-TU/github-0282.tlg
copy to required/firstaid/changes.txt
diff --git a/base/config-TU.lua b/required/firstaid/config-TU.lua
similarity index 100%
copy from base/config-TU.lua
copy to required/firstaid/config-TU.lua
diff --git a/required/tools/longtable.ins b/required/firstaid/firstaid.ins
similarity index 78%
copy from required/tools/longtable.ins
copy to required/firstaid/firstaid.ins
index 7ada121e..5d888cf6 100644
--- a/required/tools/longtable.ins
+++ b/required/firstaid/firstaid.ins
@@ -7,7 +7,7 @@
 %% The LaTeX3 Project and any individual authors listed elsewhere
 %% in this file.
 %%
-%% This file is part of the Standard LaTeX `Tools Bundle'.
+%% This file is part of the Standard LaTeX `First Aid Bundle'.
 %% -------------------------------------------------------
 %%
 %% It may be distributed and/or modified under the
@@ -25,7 +25,7 @@
 %% (parts of) the content is reused in a different WORK producing its
 %% own generated files.
 %%
-%% The list of all files belonging to the `Tools Bundle' is
+%% The list of all files belonging to the `First Aid Bundle' is
 %% given in the file `manifest.txt'.
 %%
 %%
@@ -35,21 +35,20 @@
 
 \keepsilent
 
-\usedir{tex/latex/tools}
+\usedir{tex/latex/firstaid}
 
 \preamble
 
-This is a generated file.
-
 The source is maintained by the LaTeX Project team and bug
 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) 1993-2020
 The LaTeX3 Project and any individual authors listed elsewhere
 in this file.
 
-This file was generated from file(s) of the Standard LaTeX `Tools Bundle'.
+This file was generated from file(s) of the Standard LaTeX `First Aid Bundle'.
 --------------------------------------------------------------------------
 
 It may be distributed and/or modified under the
@@ -61,15 +60,16 @@ and version 1.3c or later is part of all distributions of LaTeX
 version 2005/12/01 or later.
 
 This file may only be distributed together with a copy of the LaTeX
-`Tools Bundle'. You may however distribute the LaTeX `Tools Bundle'
+`First Aid Bundle'. You may however distribute the LaTeX `First Aid Bundle'
 without such generated files.
 
-The list of all files belonging to the LaTeX `Tools Bundle' is
-given in the file `manifest.txt'.
-
 \endpreamble
 
 
-\generate{\file{longtable.sty}{\from{longtable.dtx}{package}}}
+\generate{\file{latex2e-first-aid-for-external-files.ltx}
+               {\from{latex2e-first-aid-for-external-files.dtx}{kernel}}}
+
+\generate{\file{filehook-ltx.sty}
+               {\from{latex2e-first-aid-for-external-files.dtx}{filehook}}}
 
 \endbatchfile
diff --git a/required/firstaid/latex2e-first-aid-for-external-files.dtx b/required/firstaid/latex2e-first-aid-for-external-files.dtx
new file mode 100644
index 00000000..206de256
--- /dev/null
+++ b/required/firstaid/latex2e-first-aid-for-external-files.dtx
@@ -0,0 +1,311 @@
+% \iffalse meta-comment
+%
+%% File: latex2e-first-aid-for-external-files.dtx (C) Copyright 2020 
+%% The LaTeX Project and any individual authors listed elsewhere
+%% in this file.
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+%    https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+%
+%
+%<*driver>
+\documentclass{ltxdoc}
+\EnableCrossrefs
+\CodelineIndex
+\begin{document}
+  \DocInput{latex2e-first-aid-for-external-files.dtx}
+\end{document}
+%</driver>
+%
+% \fi
+%
+%
+% \providecommand\pkg[1]{\texttt{#1}}
+
+% \title{First aid for external files and packages that need updating\thanks{}}
+% \author{Frank Mittelbach, \LaTeX{} Project}
+%
+% \maketitle
+%
+%
+% \begin{abstract}
+%    The file provided contains some first aid for packages that
+%    requiring updates because of internal changes to \LaTeX{} that
+%    aren't yet reflected in the package code.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section{Introduction}
+%
+%    Over the years package writers have hooked into
+%    various parts of internal \LaTeX{} commands (largely because
+%    proper interfaces were missing in important places) and if such
+%    we are now gradually adding such interfaces these internal
+%    commands do change and as a result patching into them stops
+%    working.
+%
+%    As part of making such internal changes the \LaTeX{} Project team
+%    attempts to check for such usage in packages, alert the package
+%    maintainers and ensures that the packages get updated alongside
+%    the core \LaTeX{} system. However it is not always possible to
+%    get packages that will fail with a new kernel updated in time and
+%    if that is the case we try to provide a temparary fix in this
+%    file for them.
+%    Once the package gets updated the fix will then be removed again.
+%
+%    For that reason, it is put into a separate bundle so that we can
+%    update it easily without requiring the CTAN maintainers to
+%    install a new full LaTeX system just because we take out (or add)
+%    a fix for a package here.
+%
+%    In the best case scenario the file documented here should be
+%    empty. In practice it will probably always contain one or the
+%    other fix while we are waiting for the package to get updated.
+%
+%
+% \StopEventually{\setlength\IndexMin{200pt}  \PrintIndex  }
+%
+%
+% \section{The Implementation}
+%
+%    This file is meant to be loaded during format generation which is
+%    why we give it the extension \texttt{.ltx}.
+%    \begin{macrocode}
+%<*kernel>
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\def\LaTeXFirstAidDate{2020/09/25}     
+\def\LaTeXFirstAidVersion{v1.0a}     
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\ProvidesFile{latex2e-first-aid-for-external-files.ltx}
+             [\LaTeXFirstAidDate\space \LaTeXFirstAidVersion\space
+               LaTeX kernel fixes to external files and packages]
+%    \end{macrocode}
+%    
+%
+%
+% \subsection{The \pkg{filehook} package first aid}
+%     
+%    The \pkg{filehook} package implements hooks into file loading
+%    commands. These days this is already provided by the kernel
+%    albeit not with the same user interface. Until that package gets
+%    updated (to use the kernel interfaces) we provide a
+%    substitution. This does not offer all hooks from \pkg{filehook}
+%    but all that have been used in packages available in \TeX{} Live.
+%
+%    \begin{macrocode}
+\declare at file@substitution{filehook.sty}{filehook-ltx.sty}
+%    \end{macrocode}
+%
+%    If a new filehook package becomes available it can be tested
+%    simply by  undoing the above substitution via
+%    \begin{verbatim}
+%  \undeclare at file@substitution{filehook.sty}
+%    \end{verbatim}
+%    Once ready this will then taken out of the first aid file.
+%    
+%    \begin{macrocode}
+%</kernel>
+%    \end{macrocode}
+%
+%    What followes is a partial implementation of the  \pkg{filehook}
+%    interfaces.
+%
+%    Not implemented are:
+%\begin{verbatim}
+%  \AtBeginOfFiles
+%  \AtEndOfFiles
+%  \AtBeginOfInputs
+%  \AtEndOfInputs
+%  \AtBeginOfInputFile
+%  \AtEndOfInputFile
+%\end{verbatim}
+%
+%    \begin{macrocode}
+%<*filehook>
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\newcommand\AtBeginOfEveryFile [1]
+  {\AddToHook{file/before}{#1}}
+\newcommand\AtEndOfEveryFile [1]
+  {\AddToHook{file/after}{#1}}
+%    \end{macrocode}
+%    
+%    \begin{macrocode}
+\newcommand\AtBeginOfIncludes [1]
+  {\AddToHook{include/before}{#1}}
+\newcommand\AtEndOfIncludes [1]
+  {\AddToHook{include/end}{#1}}
+\newcommand\AfterIncludes [1]
+  {\AddToHook{include/after}{#1}}
+%    \end{macrocode}
+%    
+%    \begin{macrocode}
+\newcommand\AtBeginOfPackages [1]
+  {\AddToHook{package/before}{#1}}
+\newcommand\AtEndOfPackages [1]
+  {\AddToHook{package/after}{#1}}
+%    \end{macrocode}
+%    
+%    \begin{macrocode}
+\newcommand\AtBeginOfClasses [1]
+  {\AddToHook{class/before}{#1}}
+\newcommand\AtEndOfClasses [1]
+  {\AddToHook{class/after}{#1}}
+%    \end{macrocode}
+%
+%    For normal files we drop the \texttt{.tex} extension for now:
+%    \begin{macrocode}
+\newcommand\AtBeginOfFile [2]
+  {\AddToHook{file/before/#1}{#2}}
+\newcommand\AtEndOfFile [2]
+  {\AddToHook{file/after/#1}{#2}}
+%    \end{macrocode}
+%    
+%    \begin{macrocode}
+\DeclareDocumentCommand \AtBeginOfPackageFile {smm}
+   {\IfBooleanTF{#1}%
+     {\@ifpackageloaded{#2}%
+         {#3}%
+         {\AddToHook{package/before/#2}{#3}}}%
+     {\AddToHook{package/before/#2}{#3}}%
+   }
+\DeclareDocumentCommand \AtEndOfPackageFile {smm}
+   {\IfBooleanTF{#1}%
+     {\@ifpackageloaded{#2}%
+         {#3}%
+         {\AddToHook{package/after/#2}{#3}}}%
+     {\AddToHook{package/after/#2}{#3}}%
+   }
+%    \end{macrocode}
+%
+%    Are the * forms here of any use? I know they are use 3--4 times
+%    on CTAN but I wonder if those are real or mistaken usages.  
+%    \begin{macrocode}
+\DeclareDocumentCommand \AtBeginOfClassFile {smm}
+   {\IfBooleanTF{#1}%
+     {\@ifclassloaded{#2}%
+         {#3}%
+         {\AddToHook{class/before/#2}{#3}}}%
+     {\AddToHook{class/before/#2}{#3}}%
+   }
+\DeclareDocumentCommand \AtEndOfClassFile {smm}
+   {\IfBooleanTF{#1}%
+     {\@ifclassloaded{#2}%
+         {#3}%
+         {\AddToHook{class/after/#2}{#3}}}%
+     {\AddToHook{class/after/#2}{#3}}%
+   }
+%    \end{macrocode}
+%    
+%    \begin{macrocode}
+\newcommand\AtBeginOfIncludeFile [2]
+  {\AddToHook{include/before/#1}{#2}}
+\newcommand\AtEndOfIncludeFile [2]
+  {\AddToHook{include/end/#1}{#2}}
+\newcommand\AfterIncludeFile [2]
+  {\AddToHook{include/after/#1}{#2}}
+%    \end{macrocode}
+%
+%
+%    This is missing some interfaces so disabling the package isn't
+%    really correct, but then this code above is not supposed to stay
+%    like this anyway.
+%    \begin{macrocode}
+\expandafter\let\csname ver at filehook.sty\endcsname\fmtversion
+\@namedef {ver at filehook.sty}{2020/10/01}
+%    \end{macrocode}
+%
+%
+%    \begin{macrocode}
+%</filehook>
+%    \end{macrocode}
+%
+%
+%
+% \subsection{The \pkg{bidi} package first aid}
+%
+%     The \cs{bidi} package adds a lot of hooks in various places and
+%    those added to \cs{document} and \cs{enddocument} are now no
+%    longer necessary as the kernel already provides the right hooks
+%    there.
+%
+%    However, we aren't trying to change that but instead only make
+%    sure that the existing patches still work by adding some first
+%    aid after \pkg{biditools} has been loaded.
+%
+%    If the package gets updated one can easily take that out simply
+%    through
+%\begin{verbatim}
+%  \RemoveFromHook{file/after/biditools.sty}[firstaid]
+%\end{verbatim}
+%    This makes it easy to test new bidi code while the first aid code
+%    is still in the kernel.
+%
+%    \begin{macrocode}
+\AddToHook{file/after/biditools.sty}[firstaid]{%
+%    \end{macrocode}
+%    \pkg{bidi} adds some code to the beginning of \cs{document} which
+%    contains \cs{endgroup} and \cs{begingroup} which is no longer
+%    correct.
+%  
+%    Patching \cs{document} using \cs{bidi at patchcmd} doesn't work so
+%    we take the extra groups out by hand:
+%    \begin{macrocode}
+  \def\firstaid at bidi@document at patch
+          \endgroup#1\begingroup#2\firstaid at bidi@document at patch
+          {\unexpanded{#1#2}}%
+  \edef\document{\expandafter\firstaid at bidi@document at patch\document
+            \firstaid at bidi@document at patch}%
+%    \end{macrocode}
+%    There are also some patches into \cs{enddocument}, some continue
+%    to go in but one fails, so we add that now into the right place.
+%    \begin{macrocode}
+  \AddToHook{enddocument/info}%
+            {\let\bidi at AfterEndDocumentCheckLabelsRerun\@firstofone
+              \bidi at afterenddocumentchecklabelsrerunhook}%
+}
+%    \end{macrocode}
+%    
+%    \begin{macrocode}
+%<*kernel>
+%    \end{macrocode}
+%
+%
+%
+% \subsection{The \pkg{dinbrief} class first aid}
+%
+%    Again a case of a no longer correct \cs{endgroup} in document.
+%    Here the fix is simply though.
+%    \begin{macrocode}
+\AddToHook{file/after/dinbrief.cls}[firstaid]{%
+  \AddToHook{env/document/begin}{\begingroup}%
+}
+%    \end{macrocode}
+%
+%
+%
+% \subsection{}
+%
+%
+%    \begin{macrocode}
+%</kernel>
+%    \end{macrocode}
+%
+% \Finale
+%
+
+
diff --git a/required/firstaid/testfiles-TU/firstaid-bidi.luatex.tlg b/required/firstaid/testfiles-TU/firstaid-bidi.luatex.tlg
new file mode 100644
index 00000000..5a7d4b60
--- /dev/null
+++ b/required/firstaid/testfiles-TU/firstaid-bidi.luatex.tlg
@@ -0,0 +1,51 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+-> The hook 'file/after/biditools.sty':
+> Code chunks:
+>     firstaid -> \def \firstaid at bidi@document at patch \endgroup ##1\begingroup ##2\firstaid at bidi@document at patch {\unexpanded {##1##2}}\edef \document {\expandafter \firstaid at bidi@document at patch \document \firstaid at bidi@document at patch }\AddToHook {enddocument/info}{\let \bidi at AfterEndDocumentCheckLabelsRerun \@firstofone \bidi at afterenddocumentchecklabelsrerunhook }
+> Extra code for next invocation:
+>     ---
+> Rules:
+>     ---
+> Execution order (after reversal):
+>     firstaid.
+<recently read> }
+l. ...\ShowHook{file/after/biditools.sty}
+(../bidi.sty
+Package: bidi ....-..-.. v... Bidirectional typesetting in plain TeX and LaTeX
+****************************************************
+* 
+* bidi package (Bidirectional typesetting in
+* plain TeX and LaTeX, using XeTeX engine)
+* 
+* Description: A convenient interface for
+* typesetting bidirectional texts in plain TeX
+* and LaTeX. The package includes adaptations
+* for use with many other commonly-used packages.
+* 
+* Copyright (c) 2007--2020 Vafa Khalighi
+* Copyright (c) 2018--2020 bidi-tex GitHub organization
+* 
+* v..., ....-..-..
+* 
+* License: LaTeX Project Public License, version
+* 1.3c or higher (your choice)
+* 
+* Location on CTAN: /macros/xetex/latex/bidi
+* 
+* Issue tracker: https://github.com/persiantex/bidi/issues
+* 
+* Primary author of bidi package: Vafa Khalighi.
+* 
+****************************************************
+(../iftex.sty
+Package: iftex ....-..-.. v... TeX engine tests
+)
+ ********************************************
+ * XeTeX is required to compile this document.
+ * Sorry!
+ ********************************************
+! Emergency stop.
+<read *> 
+l. ...\RequireXeTeX
+*** (cannot \read from terminal in nonstop modes)
diff --git a/base/testfiles-lthooks/lthooks-000.lvt b/required/firstaid/testfiles-TU/firstaid-bidi.lvt
similarity index 50%
copy from base/testfiles-lthooks/lthooks-000.lvt
copy to required/firstaid/testfiles-TU/firstaid-bidi.lvt
index d4fb95d9..254a07c0 100644
--- a/base/testfiles-lthooks/lthooks-000.lvt
+++ b/required/firstaid/testfiles-TU/firstaid-bidi.lvt
@@ -1,17 +1,15 @@
-
 \documentclass{article}
-
 \input{regression-test}
 
-\RequirePackage[enable-debug,check-declarations]{expl3}
-
 \START
 
-\DebugHooksOn
-\DebugShipoutsOn
+\ShowHook{file/after/biditools.sty}
+
+\usepackage{bidi}
 
 \begin{document}
 
-Test
+Bidi only works with XeTeX
 
 \end{document}
+
diff --git a/required/firstaid/testfiles-TU/firstaid-bidi.tlg b/required/firstaid/testfiles-TU/firstaid-bidi.tlg
new file mode 100644
index 00000000..a7627ac9
--- /dev/null
+++ b/required/firstaid/testfiles-TU/firstaid-bidi.tlg
@@ -0,0 +1,154 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+-> The hook 'file/after/biditools.sty':
+> Code chunks:
+>     firstaid -> \def \firstaid at bidi@document at patch \endgroup ##1\begingroup ##2\firstaid at bidi@document at patch {\unexpanded {##1##2}}\edef \document {\expandafter \firstaid at bidi@document at patch \document \firstaid at bidi@document at patch }\AddToHook {enddocument/info}{\let \bidi at AfterEndDocumentCheckLabelsRerun \@firstofone \bidi at afterenddocumentchecklabelsrerunhook }
+> Extra code for next invocation:
+>     ---
+> Rules:
+>     ---
+> Execution order (after reversal):
+>     firstaid.
+<recently read> }
+l. ...\ShowHook{file/after/biditools.sty}
+(../bidi.sty
+Package: bidi ....-..-.. v... Bidirectional typesetting in plain TeX and LaTeX
+****************************************************
+* 
+* bidi package (Bidirectional typesetting in
+* plain TeX and LaTeX, using XeTeX engine)
+* 
+* Description: A convenient interface for
+* typesetting bidirectional texts in plain TeX
+* and LaTeX. The package includes adaptations
+* for use with many other commonly-used packages.
+* 
+* Copyright (c) 2007--2020 Vafa Khalighi
+* Copyright (c) 2018--2020 bidi-tex GitHub organization
+* 
+* v..., ....-..-..
+* 
+* License: LaTeX Project Public License, version
+* 1.3c or higher (your choice)
+* 
+* Location on CTAN: /macros/xetex/latex/bidi
+* 
+* Issue tracker: https://github.com/persiantex/bidi/issues
+* 
+* Primary author of bidi package: Vafa Khalighi.
+* 
+****************************************************
+(../iftex.sty
+Package: iftex ....-..-.. v... TeX engine tests
+)
+(../biditools.sty
+Package: biditools ....-..-.. v... Programming tools for bidi package
+\@bidi at envbody=\toks...
+\@bidi at emptytoks=\toks...
+\bidi at poscount=\count...
+Package biditools Warning: Patching `\enddocument' failed on input line ...
+\bidi at tempcountb=\count...
+\bidi at temptoksa=\toks...
+\bidi at temptoksb=\toks...
+\bidi at dummies=\count...
+\bidi at are@these at correct=\toks...
+\bidi at toks@lista=\toks...
+\bidi at toks@listb=\toks...
+\bidi at stack@length=\count...
+\bidi at empty@stack=\toks...
+\bidi at looprepeat@depth=\count...
+) (../zref-abspage.sty
+Package: zref-abspage ....-..-.. v... Module abspage for zref (HO)
+(../zref-base.sty
+Package: zref-base ....-..-.. v... Module base for zref (HO)
+(../ltxcmds.sty
+Package: ltxcmds ....-..-.. v... LaTeX kernel commands for general use (HO)
+)
+(../infwarerr.sty
+Package: infwarerr ....-..-.. v... Providing info/warning/error messages (HO)
+)
+(../kvsetkeys.sty
+Package: kvsetkeys ....-..-.. v... Key value parser (HO)
+)
+(../kvdefinekeys.sty
+Package: kvdefinekeys ....-..-.. v... Define keys (HO)
+)
+(../pdftexcmds.sty
+Package: pdftexcmds ....-..-.. v... Utility functions of pdfTeX for LuaTeX (HO)
+Package pdftexcmds Info: \pdf at primitive is available.
+Package pdftexcmds Info: \pdf at ifprimitive is available.
+Package pdftexcmds Info: \pdfdraftmode not found.
+)
+(../etexcmds.sty
+Package: etexcmds ....-..-.. v... Avoid name clashes with e-TeX commands (HO)
+)
+(../auxhook.sty
+Package: auxhook ....-..-.. v... Hooks for auxiliary files (HO)
+)
+Package zref Info: New property list: main on input line ....
+Package zref Info: New property: default on input line ....
+Package zref Info: New property: page on input line ....
+)
+(atbegshi-ltx.sty
+Package: atbegshi-ltx ....-..-.. v... Emulation of the original atbegshi package
+with kernel methods
+)
+\c at abspage=\count...
+Package zref Info: New property: abspage on input line ....
+)
+(../xkeyval.sty
+Package: xkeyval ....-..-.. v... package option processing (HA)
+(../xkeyval.tex
+(../xkvutils.tex
+\XKV at toks=\toks...
+\XKV at tempa@toks=\toks...
+(../keyval.tex))
+\XKV at depth=\count...
+File: xkeyval.tex ....-..-.. v... key=value parser (HA)
+))
+\@bidi at copyins@=\insert...
+(../latex-xetex-bidi.def
+File: latex-xetex-bidi.def ....-..-.. v....7 bidi adaptations for `latex.ltx' for XeTeX engine
+\bidi at n@everypar=\toks...
+\bidi at column@check at number=\count...
+(../footnote-xetex-bidi.def
+File: footnote-xetex-bidi.def ....-..-.. v... bidi footnote macros for XeTeX engine
+\c at footdir@label=\count...
+\footdir at toks=\toks...
+)
+(../article-xetex-bidi.def
+File: article-xetex-bidi.def ....-..-.. v... bidi adaptations for standard article class for XeTeX engine
+))
+(../loadingorder-xetex-bidi.def
+File: loadingorder-xetex-bidi.def ....-..-.. v... making sure that bidi is the last package loaded
+)
+\bidi at digits=\count...
+\bidi at digits@charclass=\XeTeXcharclass1
+\bidi at sepmark@charclass=\XeTeXcharclass2
+)
+(../l3backend-xetex.def
+File: l3backend-xetex.def ....-..-.. L3 backend support: XeTeX
+\g__graphics_track_int=\count...
+\l__pdf_internal_box=\box...
+\g__pdf_backend_object_int=\count...
+\g__pdf_backend_annotation_int=\count...
+) (firstaid-bidi.aux)
+LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line ....
+LaTeX Font Info:    ... okay on input line ....
+LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line ....
+LaTeX Font Info:    ... okay on input line ....
+LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line ....
+LaTeX Font Info:    ... okay on input line ....
+LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line ....
+LaTeX Font Info:    ... okay on input line ....
+LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line ....
+LaTeX Font Info:    Trying to load font information for TS1+cmr on input line ....
+LaTeX Font Info:    ... okay on input line ....
+LaTeX Font Info:    Checking defaults for TU/lmr/m/n on input line ....
+LaTeX Font Info:    ... okay on input line ....
+LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line ....
+LaTeX Font Info:    ... okay on input line ....
+LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line ....
+LaTeX Font Info:    ... okay on input line ....
+[1
+] (firstaid-bidi.aux)
diff --git a/required/firstaid/testfiles/firstaid-000.lvt b/required/firstaid/testfiles/firstaid-000.lvt
new file mode 100644
index 00000000..19f830a0
--- /dev/null
+++ b/required/firstaid/testfiles/firstaid-000.lvt
@@ -0,0 +1,14 @@
+
+\input{regression-test}
+
+\RequirePackage[enable-debug,check-declarations]{expl3}
+\ExplSyntaxOn
+\debug_on:n { deprecation }
+\ExplSyntaxOff
+
+\START
+
+\show\LaTeXFirstAidDate
+\show\LaTeXFirstAidVersion
+
+\END
diff --git a/required/firstaid/testfiles/firstaid-000.tlg b/required/firstaid/testfiles/firstaid-000.tlg
new file mode 100644
index 00000000..6adf7dd7
--- /dev/null
+++ b/required/firstaid/testfiles/firstaid-000.tlg
@@ -0,0 +1,8 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+> \LaTeXFirstAidDate=macro:
+->....-..-...
+l. ...\show\LaTeXFirstAidDate
+> \LaTeXFirstAidVersion=macro:
+->v1.0a.
+l. ...\show\LaTeXFirstAidVersion
diff --git a/required/firstaid/testfiles/firstaid-dinbrief.lvt b/required/firstaid/testfiles/firstaid-dinbrief.lvt
new file mode 100644
index 00000000..417c7352
--- /dev/null
+++ b/required/firstaid/testfiles/firstaid-dinbrief.lvt
@@ -0,0 +1,13 @@
+\documentclass{dinbrief}
+
+\usepackage{expl3}  % make sure the backend files are loaded early
+
+\input{regression-test}
+
+\START
+
+\begin{document}
+
+Test
+
+\end{document}
diff --git a/base/testfiles-disabled/lthooks2-003.tlg b/required/firstaid/testfiles/firstaid-dinbrief.tlg
similarity index 95%
copy from base/testfiles-disabled/lthooks2-003.tlg
copy to required/firstaid/testfiles/firstaid-dinbrief.tlg
index 3e824a24..27de3446 100644
--- a/base/testfiles-disabled/lthooks2-003.tlg
+++ b/required/firstaid/testfiles/firstaid-dinbrief.tlg
@@ -1,6 +1,6 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-(lthooks2-003.aux)
+(firstaid-dinbrief.aux)
 LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line ....
 LaTeX Font Info:    ... okay on input line ....
 LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line ....
@@ -16,4 +16,4 @@ LaTeX Font Info:    ... okay on input line ....
 LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line ....
 LaTeX Font Info:    ... okay on input line ....
 [1
-] (lthooks2-003.aux)
+]
diff --git a/required/amsmath/testfiles/tlb-stdminus.luatex.tlg b/required/firstaid/testfiles/firstaid-filehook.luatex.tlg
similarity index 70%
copy from required/amsmath/testfiles/tlb-stdminus.luatex.tlg
copy to required/firstaid/testfiles/firstaid-filehook.luatex.tlg
index 08cc8004..1d4e33b2 100644
--- a/required/amsmath/testfiles/tlb-stdminus.luatex.tlg
+++ b/required/firstaid/testfiles/firstaid-filehook.luatex.tlg
@@ -1,6 +1,12 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-(tlb-stdminus.aux)
+(filehook-ltx.sty
+LaTeX3 Info: Defining command \AtBeginOfPackageFile with sig. 'smm' on line
+(LaTeX3)     63.
+LaTeX3 Info: Defining command \AtEndOfPackageFile with sig. 'smm' on line ...
+LaTeX3 Info: Defining command \AtBeginOfClassFile with sig. 'smm' on line ...
+LaTeX3 Info: Defining command \AtEndOfClassFile with sig. 'smm' on line ...
+) (firstaid-filehook.aux)
 LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line ....
 LaTeX Font Info:    ... okay on input line ....
 LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line ....
@@ -15,7 +21,5 @@ LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line ....
 LaTeX Font Info:    ... okay on input line ....
 LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line ....
 LaTeX Font Info:    ... okay on input line ....
-> \std at minus=\Umathchar"2"00"002212.
-l. ...\show\std at minus
 [1
-] (tlb-stdminus.aux)
+] (firstaid-filehook.aux)
diff --git a/required/firstaid/testfiles/firstaid-filehook.lvt b/required/firstaid/testfiles/firstaid-filehook.lvt
new file mode 100644
index 00000000..34b7f0ef
--- /dev/null
+++ b/required/firstaid/testfiles/firstaid-filehook.lvt
@@ -0,0 +1,17 @@
+\documentclass{article}
+
+\usepackage{expl3}  % make sure the backend files are loaded early
+
+\input{regression-test}
+
+\START
+
+\usepackage{filehook}
+
+\AtBeginOfEveryFile{\typeout{A file is loaded}}
+
+\begin{document}
+
+Test
+
+\end{document}
diff --git a/required/amsmath/testfiles/tlb-stdminus.luatex.tlg b/required/firstaid/testfiles/firstaid-filehook.tlg
similarity index 70%
copy from required/amsmath/testfiles/tlb-stdminus.luatex.tlg
copy to required/firstaid/testfiles/firstaid-filehook.tlg
index 08cc8004..06362be4 100644
--- a/required/amsmath/testfiles/tlb-stdminus.luatex.tlg
+++ b/required/firstaid/testfiles/firstaid-filehook.tlg
@@ -1,6 +1,12 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-(tlb-stdminus.aux)
+(filehook-ltx.sty
+LaTeX3 Info: Defining command \AtBeginOfPackageFile with sig. 'smm' on line
+(LaTeX3)     65.
+LaTeX3 Info: Defining command \AtEndOfPackageFile with sig. 'smm' on line ...
+LaTeX3 Info: Defining command \AtBeginOfClassFile with sig. 'smm' on line ...
+LaTeX3 Info: Defining command \AtEndOfClassFile with sig. 'smm' on line ...
+) (firstaid-filehook.aux)
 LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line ....
 LaTeX Font Info:    ... okay on input line ....
 LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line ....
@@ -15,7 +21,5 @@ LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line ....
 LaTeX Font Info:    ... okay on input line ....
 LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line ....
 LaTeX Font Info:    ... okay on input line ....
-> \std at minus=\Umathchar"2"00"002212.
-l. ...\show\std at minus
 [1
-] (tlb-stdminus.aux)
+] (firstaid-filehook.aux)
diff --git a/required/amsmath/testfiles/tlb-stdminus.luatex.tlg b/required/firstaid/testfiles/firstaid-filehook.xetex.tlg
similarity index 70%
copy from required/amsmath/testfiles/tlb-stdminus.luatex.tlg
copy to required/firstaid/testfiles/firstaid-filehook.xetex.tlg
index 08cc8004..1d4e33b2 100644
--- a/required/amsmath/testfiles/tlb-stdminus.luatex.tlg
+++ b/required/firstaid/testfiles/firstaid-filehook.xetex.tlg
@@ -1,6 +1,12 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-(tlb-stdminus.aux)
+(filehook-ltx.sty
+LaTeX3 Info: Defining command \AtBeginOfPackageFile with sig. 'smm' on line
+(LaTeX3)     63.
+LaTeX3 Info: Defining command \AtEndOfPackageFile with sig. 'smm' on line ...
+LaTeX3 Info: Defining command \AtBeginOfClassFile with sig. 'smm' on line ...
+LaTeX3 Info: Defining command \AtEndOfClassFile with sig. 'smm' on line ...
+) (firstaid-filehook.aux)
 LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line ....
 LaTeX Font Info:    ... okay on input line ....
 LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line ....
@@ -15,7 +21,5 @@ LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line ....
 LaTeX Font Info:    ... okay on input line ....
 LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line ....
 LaTeX Font Info:    ... okay on input line ....
-> \std at minus=\Umathchar"2"00"002212.
-l. ...\show\std at minus
 [1
-] (tlb-stdminus.aux)
+] (firstaid-filehook.aux)
diff --git a/required/firstaid/update-all.sh b/required/firstaid/update-all.sh
new file mode 100644
index 00000000..7afe930b
--- /dev/null
+++ b/required/firstaid/update-all.sh
@@ -0,0 +1,7 @@
+l3build save \
+	firstaid-000\
+	firstaid-dinbrief \
+	firstaid-filehook
+
+l3build save -cconfig-TU -exetex,luatex \
+	firstaid-bidi





More information about the latex3-commits mailing list.