David Soukal wrote: > > Hello guys, > > I'm sorry to bother you with something that's must have been answered > many times, but I can't find a quick answer in the documentation. > <SNIP> > The chapters compile fine, however, the master won't compile because of > multiple definition of the same macros. > > So, I'm looking for conditional compilation... something from C header > files.. > perhaps the ifthen package would do what you need:
http://www.mail-archive.com/[email protected]/msg40105.html http://www.mail-archive.com/[email protected]/msg41939.html perhaps in your macro "include" file you could have something like: \usepackage{ifthen} \newboolean{macrosAlreadyIncluded} % assuming newboolean initially sets the % variable to false, but only if % variable not already defined. \ifthenelse{\boolean{macrosAlreadyIncluded}} { % defined true, so already in } { % not defined, so not yet in \setboolean{macrosAlreadyIncluded}{true} % your macros } % note Todd Probably offended the LaTeX gods by % putting the true/false output on lines that have % LF/CRLF between them and the ifthenelse, % but I think you might get the idea. UNTESTED. BTW if it works, or has problems, let me/us know. I was thinking of using this on a project I have in the near future. Thanks. -- Todd Denniston Crane Division, Naval Surface Warfare Center (NSWC Crane) Harnessing the Power of Technology for the Warfighter
