To avoid the problem of having to decide whether to use \newcommand or \renewcommand, LaTeX has the option of \providecommand.
Is there something corresponding to this for environments? I'd like to be able to type \provideenvironment (or similar) rather than first using \newenvironment and then using \renewenvironment.
newXmacro ought to also provide bothrenewXandprovideXvariants. (I got so fed up of journals defining all different types of theorem variants - and therefore messing up my own definitions - that I wrote a\providetheoremcommand.) – Andrew Stacey Jun 14 '11 at 10:07\providecommandisn't to avoid having to decide which to use, it's to provide a definition if one does not already exist. If it does, then\providecommanddoes not redefine it. – TH. Jun 14 '11 at 10:37\providecommandrather than keep track of whether my LaTeX code has already defined a command (hence the weird way I described its purpose). – bryn Jun 19 '11 at 07:49