diff options
Diffstat (limited to 'macros/latex/contrib/ximera/src/utilitymacros.dtx')
-rw-r--r-- | macros/latex/contrib/ximera/src/utilitymacros.dtx | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/macros/latex/contrib/ximera/src/utilitymacros.dtx b/macros/latex/contrib/ximera/src/utilitymacros.dtx new file mode 100644 index 0000000000..e44b490e06 --- /dev/null +++ b/macros/latex/contrib/ximera/src/utilitymacros.dtx @@ -0,0 +1,45 @@ +% \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} +%</classXimera> +% \end{macro} + +% \begin{macro}{latexProblemContent} +% Added for those that want to use UF problems without using the problem filter code. This command is renewed into something meaningful in the 'ProblemSelector.sty'. +% \begin{macrocode} +\providecommand{\latexProblemContent}[1]{#1} +% Iterate count for problem counts. +\Make@Counter{Iteration@probCnt} +% \end{macrocode} +% \end{macro} + + |