35

This is the preamble to a book I'm editing:

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{xspace}
\usepackage{proof}
\usepackage{url}
\usepackage{xy}
\xyoption{all}
\usepackage{amsthm}
\usepackage{stmaryrd}
\usepackage{amsfonts}
\usepackage{amstext}
\usepackage{algorithmic}
\usepackage{algorithm}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{enumerate}
\usepackage{paralist}
\usepackage{mathrsfs}

Trying to compile this document yields the error:

LaTeX Error: Command \proof already defined.

This error only occurred after the inclusion of amsthm in the above list, which I need for one of the chapters. Obviously amsthm is clashing with some other package in the list, but I have no way of finding which one (the other packages are needed for other chapters anyway).

Is there any way of telling LaTeX to ignore the definition of proof from amsthm, thus hopefully resolving the conflict?

Edit: The class I'm using is monog3, which is provided to me by Oxford University Press. I don't know if I can share its contents, but I have checked and it does contain the conflicting definition:

\def\proof{\trivlist \item[\hskip \labelsep{\bf Proof\ }]}

With this in mind, is there a way to get around the clash?

  • This works for me. If you're using TeX Live, I suggest you do an update: tlmgr update --all (I just did that myself.) – user10274 Feb 8 '12 at 15:29
  • 1
    Welcome to TeX.sx! Please take a look at advice on creating a minimal working example (MWE), as this may well help you isolate the issue you have. – Joseph Wright Feb 8 '12 at 15:33
  • 1
    Please, show what class you're using. Probably it's defining \proof. – egreg Feb 8 '12 at 15:35
  • @MarcvanDongen I've tried this. It didn't help (but thanks for pointing this out anyway, I definitely needed to update). – Edward Grefenstette Feb 8 '12 at 16:19
  • @egreg There is indeed a clash at class level. I've edited the post above. – Edward Grefenstette Feb 8 '12 at 16:19
53

If the class defines either a macro or an environment called proof, add the instructions \let\proof\relax and \let\endproof\relax before loading amsthm.

  • 3
    That doesn't seem to do the trick. Same error is popping up :-( – Edward Grefenstette Feb 8 '12 at 15:25
  • 1
    If your document class is defining "proof" then the above line from David has to go before loading amsthm (not after). – Frank Mittelbach Feb 8 '12 at 16:12
  • 1
    @FrankMittelbach That solved it! – Edward Grefenstette Feb 8 '12 at 16:23
  • 2
    @EdwardGrefenstette You got several people trying to help you and it took a long time to solve your problem. In the end only you knew what was going on because you didn't suply a minimal example. For future reference, please provide one, it will save us all some time.... – user10274 Feb 8 '12 at 22:55
  • 2
    This just saved me. – user7013 Sep 22 '13 at 4:25
9

The above instruction worked for me only after putting \let\proof\relax and \let\endproof\relax AFTER the \usepackage{amsthm}

  • 3
    I guess it depends on if the conflicting passage is included before or after the \usepackage{amsthm} – Konrad Höffner Jun 20 '14 at 11:32
0

I had a conflict between amsmath and aip-cp conference proceedings class because txfonts also defined iint. I found a useful FAQ on the conflict at www.tex.ac.uk/FAQ-alreadydefined.html

Essentially, it uses the "savesym" package to de-conflict amsmath and the txfonts by saving the symbols prior to including amsmath:

\documentclass{aip-cp}

\usepackage{savesym}
\savesymbol{iint}
\savesymbol{iiint}
\savesymbol{iiiint}
\savesymbol{idotsint}
\usepackage{amsmath}
\restoresymbol{AMS}{iint}
\restoresymbol{AMS}{iiint}
\restoresymbol{AMS}{iiiint}
\restoresymbol{AMS}{idotsint}

...

Perhaps you could save/restore your proof command similarly?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.