# Do any of the LaTeX variants support namespaces?

The scenario is that I'm writing a book and it looks like I'm going to need to do some munging as the document class Memoir has some wonderful features but Octavio has the presentation.

Now, one of the things that really bugs me with LaTeX is that they use a global namespace, which means they interact with each other in unpredictable ways. I can't predict easily what a hack-and-splice job will do. As for finding and fixing problems... well..

LaTeX 2e has dozens of variants these days and there are an endless number of preprocessors to support them. If just one supports namespaces then I can munge with safety. I don't know of any, but that doesn't mean they're not there. Anyone know of anything that might help?

-
I'm not sure what you mean by 'variants' or 'preprocessors' here. There is only one LaTeX2e format, and in any case the flat namespace is a consequence of TeX, not LaTeX. –  Joseph Wright Nov 23 '11 at 10:43
AFAIK exTeX supports namespaces. But I've never used it. AFAIK it's a TeX engine written in Java. –  Schweinebacke Nov 23 '11 at 11:09
I don't really get the idea what you want to achieve. But wouldn't it be enough to prefix your macros with a something like MyPackage:Index:DirtyHack? –  Marco Nov 23 '11 at 11:15
@Schweinebacke: exTeX is the project of writing a TeX engine in Java. I doubt that anything usable exists today. –  Martin Schröder Nov 23 '11 at 17:58
@Martin: But the development state shows a system, that is already able to make DVI, PS and SVG and maybe PDF. Neverless you are right, that it is not TeX-complete, because some primitives like \outer are currently not implemented. –  Schweinebacke Nov 24 '11 at 7:29

Many packages have been written without the need of namespaces and the system is pretty stable; in some occasions a clash can show up, but usually this happens with badly written packages (I found one where the author uses \value as an internal command: ouch!).
Just stick to a consistent naming scheme: prefix all of your personal macros with jonathan@ (or whatever you prefer). The chance that a package uses the same prefix is small; in such a case just change your prefix in your macros.