[OS X TeX] writing sty files

Themis Matsoukas matsoukas at psu.edu
Tue Nov 21 17:54:36 CET 2006


On Nov 21, 2006, at 10:36 AM, Alan Munn wrote:

> At 9:58 AM -0500 11/21/06, Themis Matsoukas wrote:
>> 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.
>
> \@ifpackageloaded{<package name>}{<then part>}{<else part>}
>
> Alan

Many thanks!

Themis
------------------------- 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 macostex-archives mailing list