summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ximera/src/clearEnv.dtx
blob: af906995d98e4df7e0f3acfe5c5ba74a15cbfa26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
% \subsubsection{clearEnv}
% \DescribeMacro{clearEnv}{envName}
%   This macro allows you to delete an environment by redefining it as null. This also deletes any corresponding internal counter - such as those generated by "\newtheorem" command.
%   #1 is envName is the name of the environment you want to clear. This will (re)define the 
%       begin and end environments, as well as the internal counter from \newtheoremenv to \relax.
%    \begin{macrocode}
%<*classXimera>
\newcommand{\clearEnv}[1]{
    %% Syntax: \clearEnv{envName}
    %   #1 is envName is the name of the environment you want to clear. This will (re)define the 
    %       begin and end environments, as well as the internal counter from \newtheoremenv to \relax.
    \expandafter\let\csname #1\endcsname\relax
    \expandafter\let\csname end#1\endcsname\relax
    \expandafter\let\csname c@#1\endcsname\relax
    }
%</classXimera>
%   \end{macrocode}