diff options
Diffstat (limited to 'macros/plain/contrib/misc/maybeload.tex')
-rw-r--r-- | macros/plain/contrib/misc/maybeload.tex | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/macros/plain/contrib/misc/maybeload.tex b/macros/plain/contrib/misc/maybeload.tex new file mode 100644 index 0000000000..0c8a088de5 --- /dev/null +++ b/macros/plain/contrib/misc/maybeload.tex @@ -0,0 +1,13 @@ +% A small macro for Tex82 or Latex. You can prevent a file of +% macros from being loaded twice by putting +% \input maybeload +% \thisfileis{<dirname>filename} +% in the macro file. -- eb@oz 6/27/86 +\global\def\thisfileis#1{\if T\csname #1=loaded\endcsname \endinput + \else \global\expandafter\def\csname #1=loaded\endcsname{T}\fi} +% +% If you like, you can conditionalize the \input maybeload with the +% incantation +% \ifx\thisfileis\anUndefinedMacro\input maybeload \fi +% instead of just \input maybeload. +% |