7

I am new to LaTeX and I was using the amsthm package in order to write proofs by using the proof environment:

\documentclass{book}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}

\begin{document}

\begin{theorem}
Stuff in here
\end{theorem}
\begin{proof}
Proof in here
\end{proof}

\end{document}

I then decided to use the mathtools package, since it contains more symbols and corrects some of the amsthm's bugs. However, if I substitute the line

\usepackage{amsthm}

for

\usepackage{mathtools}

I get the error "! LaTeX Error: Environment proof undefined."

Is there a way to correct this? Thanks for helping!

13

amsthm and mathtools are unrelated. mathtools updates and extends amsmath.

you still need amsthm if you want the proof environment.

  • Thanks! That cleared things up! I was thinking that amsthm was 'contained' by amsmath. – Guilherme Salomé Nov 7 '14 at 22:10
  • But mathtools loads amsthm anyway no? – percusse Nov 8 '14 at 1:37
  • 1
    mathtools does not load amsthm. According to this post, amsmath, amsthm and amssymb are different packages. Even though they share the 'ams' name, they must be loaded separately. Therefore, mathtools only loads amsmath. @percusse – Guilherme Salomé Nov 8 '14 at 3:09
  • 1
    @GuilhermeSalomé Ah of course. A moment of dyslexic reading, I kept on reading amsmath all the way.. – percusse Nov 8 '14 at 3:16
0

I think the document class might be a source of confusion.

The document class amsart.cls loads the package amsthm.sty, but since your using the document class book.cls you need to manually load the package amsthm.sty.

  • Welcome to TeX.SX! I don't see how this answers the question. – karlkoeller Feb 24 '15 at 16:30
  • @karlkoeller -- slight correction here ... amsart incorporates the features and code of amsthm, but with slightly different defaults for spacing and fonts. input directed at these features is identical, but output will differ slightly. (for comparison, amsart does actually load amsmath with \RequirePackage.) – barbara beeton Mar 19 '15 at 12:20

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.