Math & Scienceproblem renewing proof environment

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
peter-andrews
Posts: 1
Joined: Mon Apr 11, 2011 9:39 pm

problem renewing proof environment

Post by peter-andrews »

I am typing a math paper in latex.
I wanted to make a small change in the proof environment,
(just changing the addpunct symbol from . to :), so I copied the
\newenvironment{proof} from amsthm.sty into the heading of my paper,
and modified it slightly. However, this produces an error.

Here is a minimal example which latex processes with no problem:

Code: Select all

\documentclass[11pt,dvips,twoside]{book}
\usepackage{amsthm}

\begin{document}

\begin{proof}

obvious.

\end{proof}

\end{document}

Here is the modified file which produces an error:

Code: Select all

\documentclass[11pt,dvips,twoside]{book}
\usepackage{amsthm}

\renewenvironment{proof}[1][\proofname]{\par
  \pushQED{\qed}%
  \normalfont \topsep6\p@\@plus6\p@\relax
  \trivlist
  \item[\hskip\labelsep
        \itshape
    #1\@addpunct{:}]\ignorespaces
}{%
  \popQED\endtrivlist\@endpefalse
}

\begin{document}

\begin{proof}

obvious.

\end{proof}

\end{document}
Here is the error message produced when i run latex on the latter file:
! Undefined control sequence.
\\proof ...pushQED {\qed }\normalfont \topsep 6\p
@\@plus6\p @\relax \trivli...
l.18

? h
The control sequence at the end of the top line
of your error message was never \def'ed.
If latex is not confused by the standard proof environment,
why is it confused now?

Note: On two computers, I found amsthm.sty in the following locations:
/usr/share/texmf-texlive/tex/latex/amscls/amsthm.sty
/usr/share/texmf/tex/latex/amscls/amsthm.sty
Last edited by peter-andrews on Wed Apr 13, 2011 8:08 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

problem renewing proof environment

Post by localghost »

You have to present the problem by a full but minimal example [1]. This has to reduced to only relevant code and must be compilable for others as provided.

[1] View topic: Avoidable mistakes


Best regards and welcome to the board
Thorsten
Post Reply