%%
%% This file will generate fast loadable files and documentation
%% driver files from the dtx file(s) in this package when run through
%% LaTeX or TeX.
%%
%% Copyright (C) 2021-2026 The LaTeX Project
%%
%%
%% This file is part of the `LaTeX-lab Bundle' for LaTeX.
%% -------------------------------------------------------------------
%%
%% 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
%%    http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2008 or later.
%%
%% In particular, NO PERMISSION is granted to modify the contents of this
%% file since it contains the legal notices that are placed in the files
%% it generates.
%%
%%
%%
%% --------------- start of docstrip commands ------------------
%%
\input docstrip

\keepsilent

\usedir{tex/latex/contrib/latex-lab}

\preamble

This is a generated file.

Copyright 2021-2026 LaTeX Project

This file was generated from file(s) of the  `LaTeX-lab Bundle'.
------------------------------------------------------------------------------------

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
   http://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 may only be distributed together with a copy of the LaTeX
`LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle'
without such generated files.

The newest sources can be found below

   https://github.com/latex3/latex2e/blob/develop/required/latex-lab

Issues may be reported at

   https://github.com/latex3/latex2e/issues


\endpreamble


\generate{\file{documentmetadata-support.ltx}{\from{documentmetadata-support.dtx}{code}}}

% files that should be loadable with the testphase key should use the naming scheme
% #1-latex-lab-testphase.ltx

% latest
\generate{%
  \file{latex-lab-testphase-latest.sty}
    {\from{latex-lab-testphase.dtx}{latest}}
    }

% tag names
\generate{\file{latex-lab-testphase-names.sty}{\from{latex-lab-namespace.dtx}{package}}}

% math
\generate{\file{latex-lab-testphase-math.sty}{\from{latex-lab-testphase.dtx}{math-package}}}  


%%% support files loaded by phases and testphase modules %%%
%footnotes
\generate{\file{latex-lab-footmisc.ltx}{\from{latex-lab-footnotes.dtx}{footmisc}}}
\generate{\file{latex-lab-footnotes.ltx}{\from{latex-lab-footnotes.dtx}{kernel}}}

%new-or-2 
\generate{\file{latex-lab-testphase-new-or-2.sty}{\from{latex-lab-new-or-2.dtx}{package}}}

%math
\generate{\file{latex-lab-math.ltx}{\from{latex-lab-math.dtx}{kernel}}}
\generate{\file{latex-lab-amsmath.ltx}{\from{latex-lab-amsmath.dtx}{kernel}}}
\generate{\file{latex-lab-mathtools.ltx}{\from{latex-lab-mathtools.dtx}{kernel}}}
\generate{\file{latex-lab-mathpkg.ltx}{\from{latex-lab-mathpkg.dtx}{kernel}}}
\generate{\file{latex-lab-mathintent.ltx}{\from{latex-lab-mathintent.dtx}{kernel}}}
\generate{\file{latex-lab-unicode-math.ltx}{\from{latex-lab-unicode-math.dtx}{kernel}}}

% kernel changes need by more than one module   
\generate{\file{latex-lab-kernel-changes.sty}
  {\from{latex-lab-toc-kernel-changes.dtx}{kernelchange}
   \from{latex-lab-sec.dtx}{kernelchange}
  }}    


%%% single modules %%%

%sec
\generate{\file{latex-lab-testphase-sec.sty}{\from{latex-lab-sec.dtx}{package}}}

%sec templates
\generate{\file{latex-lab-testphase-sec-template.sty}{\from{latex-lab-sec-template.dtx}{package}}}

%toc
\generate{\file{latex-lab-testphase-toc.sty}{%
  \from{latex-lab-toc.dtx}{header}
  \from{latex-lab-toc-kernel-changes.dtx}{package}
  \from{latex-lab-toc.dtx}{package}
  }}

%graphic
\generate{\file{latex-lab-testphase-graphic.sty}{\from{latex-lab-graphic.dtx}{package}}}

% block
\generate{\file{latex-lab-testphase-block.sty}
   {\from{latex-lab-block.dtx}{package-start}
    \from{latex-lab-block.dtx}{class-code}
    \from{latex-lab-block.dtx}{package-finish}
   }}

% minipage
\generate{\file{latex-lab-testphase-minipage.sty}{\from{latex-lab-minipage.dtx}{package}}}

%float  
\generate{\file{latex-lab-testphase-float.sty}{\from{latex-lab-float.dtx}{package}}}

%bib  
\generate{\file{latex-lab-testphase-bib.sty}{\from{latex-lab-bib.dtx}{package}}}

%context  
\generate{\file{latex-lab-testphase-context.sty}{\from{latex-lab-context.dtx}{package}}}

%text
\generate{\file{latex-lab-testphase-text.sty}{\from{latex-lab-text.dtx}{package}}}

%firstaid
\generate{\file{latex-lab-testphase-firstaid.sty}{\from{latex-lab-firstaid.dtx}{package}}}
\generate{\file{latex-lab-firstaid-amsart.ltx}{\from{latex-lab-firstaid.dtx}{amscls,amsart}}}
\generate{\file{latex-lab-firstaid-amsbook.ltx}{\from{latex-lab-firstaid.dtx}{amscls,amsbook}}}
\generate{\file{latex-lab-firstaid-amsproc.ltx}{\from{latex-lab-firstaid.dtx}{amscls,amsproc}}}

% l3doc support/firstaid
\generate{\file{latex-lab-testphase-l3doc.sty}{\from{latex-lab-l3doc-tagging.dtx}{package}}}

%table
\generate{\file{latex-lab-testphase-table.sty}{\from{latex-lab-table.dtx}{package}}}

%title
\generate{\file{latex-lab-testphase-title.sty}{\from{latex-lab-title.dtx}{package}}}

%marginpar
\generate{\file{latex-lab-testphase-marginpar.sty}{\from{latex-lab-marginpar.dtx}{package}}}

%tikz support
\generate{\file{latex-lab-testphase-tikz.sty}{\from{latex-lab-tikz.dtx}{package}}}

%enumitem emulation
\generate{\file{latex-lab-enumitem.sty}{\from{latex-lab-enumitem.dtx}{package}}}

%template additions
\generate{\file{latex-lab-testphase-template.sty}{\from{latex-lab-template.dtx}{package}}}


% stop docstrip adding \endinput
\preamble
\endpreamble
\postamble
\endpostamble
% namespace definitions
\generate{\file{tagpdf-ns-latex-lab.def}{\from{latex-lab-namespace.dtx}{ns-latex-lab}}}
  

\endbatchfile
