%%
%% This is file `latex-lab-mathpkg.ltx',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% latex-lab-mathpkg.dtx  (with options: `kernel')
%% 
%% 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
%% 
%% 
%% File: latex-lab-mathpkg.dtx
\ProvidesFile{latex-lab-mathpkg.ltx}
        [2026-04-25 v0.1d mathpkg adaptions]
\AddToHook{package/breqn/after}{
   \RegisterMathEnvironment{dmath}
   \RegisterMathEnvironment{dgroup*}
   \AddToHook{env/dmath/begin}{\tagpdfparaOff}
   \AddToHook{env/dgroup*/begin}{\tagpdfparaOff}
}
\AddToHook{package/cases/before}{\RequirePackage{amsmath}}
\AddToHook{package/cases/after}{
  \RegisterMathEnvironment{subnumcases}
}
\ExplSyntaxOn
\cs_new:Npn\__math_patch_bm_pmb:
 {
   \NewTaggingSocket{bm/pmb}{2}
   \NewTaggingSocketPlug{bm/pmb}{default}
    {
      \tag_mc_end:\tag_mc_begin:n{artifact}
      \tag_mc_reset_box:N##1
      ##2
      \tag_mc_end:
      \tag_mc_begin:n{}
    }
   \AssignTaggingSocketPlug{amsbsy/pmb}{default}
   \def\bm@pmb@@##1##2##3{{%
     \hbox_set:Nn\l__math_tmpa_box{$\m@th##1##3$}%
     \dimen@##2\wd\tw@
     \rlap{\box_use:N\l__math_tmpa_box}%
     \UseTaggingSocket{bm/pmb}{\l__math_tmpa_box}
      {
        \kern\dimen@
        \raise1.5\dimen@\rlap{\box_use:N\l__math_tmpa_box}%
        \kern\dimen@
        \box_use_drop:N\l__math_tmpa_box
      }}}
   }
\AddToHook{package/bm/after}
 { \__math_patch_bm_pmb: }
\ExplSyntaxOff
\AddToHook{package/accents/before}{\RequirePackage{amsmath}}
\AddToHook{package/cleveref/before}{\RequirePackage{amsmath}}
\AddToHook{package/esint/before}{\RequirePackage{amsmath}}
\AddToHook{package/grmath/before}{\RequirePackage{amsmath}}
\AddToHook{package/mathabx/before}{\RequirePackage{amsmath}}
\AddToHook{package/wasysym/before}{\RequirePackage{amsmath}}
\endinput
%%
%% End of file `latex-lab-mathpkg.ltx'.
