From: Michael Orlitzky Date: Sun, 15 Sep 2019 20:16:08 +0000 (-0400) Subject: Wrap all mjotex files in conditionals to prevent double-loading. X-Git-Url: http://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=fc7cfa7f3d02715cb09eae2e1c6bc501dc2d8d50;hp=fc7cfa7f3d02715cb09eae2e1c6bc501dc2d8d50;p=mjotex.git Wrap all mjotex files in conditionals to prevent double-loading. I plan to start putting glossary entries in mjo-common, and that reveals a problem: some files (i.e. mjo-common.tex) get loaded more than once. And there's not always a way to ignore the duplicate definitions. So, finally, after avoiding it for as long as possible, I've wrapped everything in "ifx" tests that check the value of a macro I define (just like #ifdef HAVE_FOO in C). The \ifx test was chosen over of \ifdefined (which is an e-TeX primitive) because it makes the conditional simpler; we don't need to have an empty "if" block. Of course, testing against \undefined only works if \undefined is... undefined. But theoretically someone could probably redefine \ifdefined, too. Whatever. I can change it if it ever causes a problem. ---