summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ximera/src/clearEnv.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/ximera/src/clearEnv.dtx')
-rw-r--r--macros/latex/contrib/ximera/src/clearEnv.dtx18
1 files changed, 18 insertions, 0 deletions
diff --git a/macros/latex/contrib/ximera/src/clearEnv.dtx b/macros/latex/contrib/ximera/src/clearEnv.dtx
new file mode 100644
index 0000000000..af906995d9
--- /dev/null
+++ b/macros/latex/contrib/ximera/src/clearEnv.dtx
@@ -0,0 +1,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}
+