[OS X TeX] writing sty files

Maarten Sneep maarten.sneep at xs4all.nl
Tue Nov 21 17:37:09 EST 2006

On 21-nov-2006, at 17:54, Themis Matsoukas wrote:

> 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!

In addition to that: there is a comment.sty, which probably allows  
you to define similar behaviour in the else part.

------------------------- 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