diff --git a/src/math/mathalias/mathalias.pysty b/src/math/mathalias/mathalias.pysty index bf9d00f..c09d398 100644 --- a/src/math/mathalias/mathalias.pysty +++ b/src/math/mathalias/mathalias.pysty @@ -10,16 +10,17 @@ __NEW_IF__(extended,false) __END_OPTIONS_X__ -%Usage: \makealiasesforwith\{}{} +%Usage: \MakeAliasesForwith\{}{} % to declare commands of form \ as \{} for each % 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} % This is also ensuring math context, so that % \cA will be valid even in normal text. -\def\makealiasesforwith#1#2#3{ +\NewDocumentCommand{\MakeAliasesForwith}{m m m} +{ \def__PACKAGE_MACRO__(makealias)##1{ \expandafter\def\csname #2##1\endcsname{\ensuremath{#1{##1}}} } @@ -34,11 +35,11 @@ __END_OPTIONS_X__ __IF__(basic) \RequirePackage{amsfonts} - \makealiasesforwith\mathbb{}{CFKNQRZ} + \MakeAliasesForwith\mathbb{}{CFKNQRZ} \fi __IF__(extended) - \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\mathbb\expandafter{\expandafter b\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\mathbb\expandafter{\expandafter b\expandafter}\expandafter{__PACKAGE_MACRO__(all)} \fi