update package with proper naming conventions

This commit is contained in:
Maximilian Keßler 2022-01-30 17:04:49 +01:00
parent 52438fd0a3
commit 91db761097

View file

@ -10,16 +10,17 @@ __NEW_IF__(extended,false)
__END_OPTIONS_X__ __END_OPTIONS_X__
%Usage: \makealiasesforwith\<mathcommand>{<prefix>}{<Set of letters>} %Usage: \MakeAliasesForwith\<mathcommand>{<prefix>}{<Set of letters>}
% to declare commands of form \<prefix><Letter> as \<mathcommand>{<Letter>} for each % to declare commands of form \<prefix><Letter> as \<mathcommand>{<Letter>} for each
% of the specfied letters % of the specfied letters
% %
% E.g. \makealiasesforwith\mathcal{c}{ABC} will declare % E.g. \MakeAliasesForwith\mathcal{c}{ABC} will declare
% \cA \cB \cC \cD as \mathcal{A}, \mathcal{B}, \mathcal{C} % \cA \cB \cC \cD as \mathcal{A}, \mathcal{B}, \mathcal{C}
% This is also ensuring math context, so that % This is also ensuring math context, so that
% \cA will be valid even in normal text. % \cA will be valid even in normal text.
\def\makealiasesforwith#1#2#3{ \NewDocumentCommand{\MakeAliasesForwith}{m m m}
{
\def__PACKAGE_MACRO__(makealias)##1{ \def__PACKAGE_MACRO__(makealias)##1{
\expandafter\def\csname #2##1\endcsname{\ensuremath{#1{##1}}} \expandafter\def\csname #2##1\endcsname{\ensuremath{#1{##1}}}
} }
@ -34,11 +35,11 @@ __END_OPTIONS_X__
__IF__(basic) __IF__(basic)
\RequirePackage{amsfonts} \RequirePackage{amsfonts}
\makealiasesforwith\mathbb{}{CFKNQRZ} \MakeAliasesForwith\mathbb{}{CFKNQRZ}
\fi \fi
__IF__(extended) __IF__(extended)
\expandafter\makealiasesforwith\expandafter\mathcal\expandafter{\expandafter c\expandafter}\expandafter{__PACKAGE_MACRO__(all)} \expandafter\MakeAliasesForwith\expandafter\mathcal\expandafter{\expandafter c\expandafter}\expandafter{__PACKAGE_MACRO__(all)}
\expandafter\makealiasesforwith\expandafter\mathfrak\expandafter{\expandafter f\expandafter}\expandafter{__PACKAGE_MACRO__(all)} \expandafter\MakeAliasesForwith\expandafter\mathfrak\expandafter{\expandafter f\expandafter}\expandafter{__PACKAGE_MACRO__(all)}
\expandafter\makealiasesforwith\expandafter\mathbb\expandafter{\expandafter b\expandafter}\expandafter{__PACKAGE_MACRO__(all)} \expandafter\MakeAliasesForwith\expandafter\mathbb\expandafter{\expandafter b\expandafter}\expandafter{__PACKAGE_MACRO__(all)}
\fi \fi