]> mj.ucw.cz Git - ucwmac.git/blobdiff - ucwmac.tex
ucw-link: Better macros for URLs and URL links
[ucwmac.git] / ucwmac.tex
index 5dd13f2fdf14291adb84ad86beccd87ddb8cb582..bbee36d376e4aa3553613630549682d7fdc5e544 100644 (file)
@@ -2,6 +2,8 @@
 % Written by Martin Mares <mj@ucw.cz> in 2010--2018 and placed into public domain
 % -------------------------------------------------------------------------------
 
+\ifx\ucwmodule\undefined\else\endinput\fi
+
 %%% Prolog %%%
 
 % We'll use internal macros of plain TeX
        \fi
 }
 
+%%% Modules %%%
+
+\def\ucwmodule#1{
+       \ifcsname ucwmod:#1\endcsname
+       \else
+               \input ucw-#1.tex
+       \fi
+}
+
+\def\ucwdefmodule#1{
+       \ifcsname ucwmod:#1\endcsname\endinput\fi
+       \expandafter\let\csname ucwmod:#1\endcsname=\relax
+}
+
 %%% Epilog %%%
 
 % Let's hide all internal macros