]> gitweb.michael.orlitzky.com - mjotex.git/commitdiff
Wrap all mjotex files in conditionals to prevent double-loading.
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 15 Sep 2019 20:16:08 +0000 (16:16 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sun, 15 Sep 2019 20:16:08 +0000 (16:16 -0400)
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.


No differences found