% Imitate some macros from unicode-math

\ExplSyntaxOn

% https://tex.stackexchange.com/a/564222
\NewDocumentCommand \DefineAlphabet {mmmm}
  {% #1 = prefix, #2 = command, #3 = start, #4 = end
    \int_step_inline:nnn { `#3 } { `#4 }
      {
        \cs_new_protected:cpx { #1 \char_generate:nn { ##1 }{ 11 } }
          {
            \exp_not:N #2 { \char_generate:nn { ##1 } { 11 } }
          }
      }
  }

\ExplSyntaxOff

\let\Bbbk\relax

\DefineAlphabet {Bbb}   \mathbb   {A} {Z}
\DefineAlphabet {Bbb}   \mathbb   {a} {z}
\DefineAlphabet {mscr}  \mathcal  {A} {Z}
\DefineAlphabet {mscr}  \mathcal  {a} {z}
\DefineAlphabet {mfrak} \mathfrak {A} {Z}
\DefineAlphabet {mfrak} \mathfrak {a} {z}

\let\DefineAlphabet\relax
