[OS X TeX] writing sty files

Themis Matsoukas matsoukas at psu.edu
Tue Nov 21 09:58:54 EST 2006

I have a custom .sty file that contains my personal environments and  
shortcuts. One of these shortcuts involves the command \newcomment  
which only works inside memoir. This means that if I call the style  
file using anything other class than memoir, this command gives an  
error (even if it is not used in the current file). Is there a way to  
check within a package whether the current class is memoir or  
something else? This would allow me to define \newcomment only if  
memoir is loaded.

I could of course move \newcomment to a separate sty file that I  
manually load only under memoir but I'd rather work with a single  
personal style file. I appreciate any pointers.


------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/

More information about the MacOSX-TeX mailing list