% \subsubsection{Utility macros} % These are a list of new utility macros that are generally useful and are loaded after packages and the Tikz Fix. % \begin{macrocode} %<*classXimera> % \end{macrocode} % \begin{macro}{NewCounter} % Improved version of |\newcounter| to check for existance before creating a counter to minimize conflicts with packages. Added by Jason Nowell % \begin{macrocode} \newcommand{\Make@Counter}[1]{% This is an internal macro that should probably be depreciated for the below universal macro. % Code located in "Utilitymacros.dtx" \@ifundefined{c@#1}% Check to see if counter exists { % If not, create it and set it to 0. \newcounter{#1} \setcounter{#1}{0} } {%If so, reset to 0. \setcounter{#1}{0} } } \newcommand{\MakeCounter}[1]{%% Code located in "Utilitymacros.dtx" % Code located in "Utilitymacros.dtx" \@ifundefined{c@#1}% Check to see if counter exists { % If not, create it and set it to 0. \newcounter{#1} \setcounter{#1}{0} } {%If so, reset to 0. \setcounter{#1}{0} } } % \end{macrocode} % % \end{macro}