[OS X TeX] writing sty files

Alan Munn amunn at msu.edu
Tue Nov 21 10:36:13 EST 2006


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

-- 
Alan Munn 
amunn at msu.edu
Department of Linguistics                             
and Germanic, Slavic, Asian and African Languages   Fax.  +1-517-432-2736
Michigan State University, East Lansing MI 48824       Tel.  +1-517-355-7491
------------------------- 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