Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Using amsthm, is there a possibility to remove the dot when typing \begin{proof}...\end{proof}? This would be typeset as "Proof." If you change your proofname \begin{proof}[Proof:]...\end{proof} you would get "Proof:"; but for typesetting without a dot or colon?

share|improve this question

6 Answers 6

up vote 12 down vote accepted

with amsthm, you can provide an optional proof heading ending with \nopunct; this setting is checked by \@addpunct before adding the period. so you could input \begin{proof}[Proof:\nopunct] ... \end{proof} and the last thing in the heading would be the colon. or you could just omit all punctuation -- but you do have to use the option to provide the text.

the \nopunct technique was originally created to take care of situations in which a heading ends with (say) a question mark, but since it would work for this as well, ...

share|improve this answer

A way to do this is to use the thmtools package:

enter image description here

\documentclass{article} 
\usepackage{amsthm} 
\usepackage{thmtools}

\declaretheorem{theorem} 
\declaretheoremstyle[%
  spaceabove=-6pt,%
  spacebelow=6pt,%
  headfont=\normalfont\itshape,%
  postheadspace=1em,%
  qed=\qedsymbol,%
  headpunct={}
]{mystyle} 
\declaretheorem[name={Proof},style=mystyle,unnumbered,
]{Proof}

\begin{document}
\begin{proof}% Old
\end{proof}
%
\begin{Proof}% New
\end{Proof}
\end{document}
share|improve this answer

The dot is hard-coded in amsthms definition of the proof environment, so the definition has to be changed.

\documentclass{article}

\usepackage{amsthm}

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

\begin{document}

\begin{proof}[Proof]
Some text.
\end{proof}

\end{document}
share|improve this answer
    
please see my answer. –  Marco Daniel Oct 12 '11 at 15:44

In order to get rid of the pesky punctuation mark following the string "Proof", one could perform a full \renewenvironment on the proof environment (see @lockstep's answer), or one could use the package etoolbox to "patch" (obliterate, in the present case) a single command in the proof environment:

\documentclass{article}
\usepackage{amsthm}   % amsthm defines the environment 'proof'
\usepackage{etoolbox} % etoolbox defines the command 'AtBeginEnvironment'
\makeatletter
\AtBeginEnvironment{proof}{\let\@addpunct\@gobble}
\makeatother

\begin{document}
\begin{proof} Hello World. \end{proof}
\end{document}
share|improve this answer
2  
i'm surprised nobody took a look at the definition of \addpunct. it already contains a trap for omitting punctuation when the \spacefactor is greater than 1000, hence the definition of \nopunct{\spacefactor 1007 }. please see my answer. –  barbara beeton Oct 12 '11 at 18:50
    
Very interesting indeed! I must confess not recalling ever having noticed this detail in the documentation for the amsthm package. So I checked the user guide for the current version (2.20, August 2004, correct?) and sure enough, there's still no reference to this nifty feature, whether for the proof environment specifically or all theorem-like environments in general. :-( Fortunately, though, the user guide does state that "An optional argument of the proof environment allows you to substitute a different name for the standard 'Proof'." –  Mico Oct 12 '11 at 19:21
    
thanks for checking the amsthm documentation. i'll make sure this feature makes it into the next edition. –  barbara beeton Oct 21 '11 at 6:25

You can redefine the output with:

\makeatletter
\let\@addpunct\@gobble
\makeatother

MWE:

\documentclass{article}
\usepackage{amsthm}
\makeatletter
\let\@addpunct\@gobble
\makeatother
\begin{document}
\begin{proof}
Text
\end{proof}
\end{document}
share|improve this answer
3  
If one uses one of the AMS classes, this would omit punctuation also in the references. –  egreg Oct 12 '11 at 15:46
2  
@egreg: Of course but the op said he is using amsthm. : If he used a amsclass, he wouldn't need this package. –  Marco Daniel Oct 12 '11 at 16:03
1  
@Marco: Maybe the OP doesn't know this. –  lockstep Oct 12 '11 at 16:45
    
@lockstep: ;-) –  Marco Daniel Oct 12 '11 at 16:46

The amsthm package also provides a means to modify or define your own theorem environments using

\newtheoremstyle{<name>}%
  {<space above>}%
  {<space below>}%
  {<body font>}%
  {<indent amount>}%
  {<theorem head font>}%
  {<punctuation after theorem head>}%
  {<space after theorem>}%

You would need to set <punctuation after theorem head>. The other setting could remain similar to the existing proof environment. Then you would use

\theoremstyle{<name>}
\newtheorem*{Proof}{Proof}

to have a Proof environment (without number *) labelled Proof.

share|improve this answer
6  
This won't give the automagical QED symbol. –  egreg Oct 12 '11 at 16:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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