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.

I'm using the \begin{proof} of the amsthm package. And I want to change the style of the Proof word that is added in the beginning. By default it is italic, I want to make it bold. How can I do it?

share|improve this question
add comment

5 Answers

up vote 12 down vote accepted

How about:

\renewenvironment{proof}{{\bfseries Proof}}{*something*}

*something* - something to be executed after environment argument is processed (possibly empty).

More here: http://en.wikibooks.org/wiki/LaTeX/Customizing_LaTeX.

share|improve this answer
1  
Thanks. I've just changed *something* to \qed –  jutky Jan 1 '11 at 22:11
6  
As a slight improvement for those who like to put \begin{proof}[Proof of the Lemma] ... \end{proof}, you can do \renewenvironment{proof}[1][\proofname]{{\bfseries #1.}}{*something*}. –  Bruno Le Floch Jan 1 '11 at 23:21
2  
if you're using amsthm, all these redefinitions are too simple-minded; you will lose the ability to use \qedhere to adjust the placement of the "tombstone" if the proof ends with a list or display. –  barbara beeton Jul 24 '12 at 14:08
    
@barbarabeeton You don't. I just tried, and \qedhere works perfectly with amsthm and the adjustment given by Bruno Le Floch. –  Jayesh Badwaik Mar 25 at 21:30
add comment

If you don't mind changing the name of the environment, just use a variant of the following code. Change \ttfamily \scshape \large #1 (yes, "#1") to something more sensible: #1 denotes the "Proof" word.

\newenvironment{myproof}[1][\proofname]{%
  \proof[\ttfamily \scshape \large #1 (yes, ``#1'')]%
}{\endproof}

\begin{myproof}
Hi.
\end{myproof}

The proof environment takes one argument and puts it in italics (by default this argument is Proof in English). Our new environment also takes one argument, denoted #1 (with the same default), and feeds it to the proof environment after transforming it a bit (or a lot). Here I decided to write the "proof" word in typewriter small-caps, large, and I even put it twice: "Proof, (yes, 'Proof')". Anything can be done with it.

If you want to redefine the proof environment itself, you can do

\documentclass{article}
\usepackage{amsthm}
\expandafter\let\expandafter\oldproof\csname\string\proof\endcsname
\let\oldendproof\endproof
\renewenvironment{proof}[1][\proofname]{%
  \oldproof[\ttfamily \scshape \large #1 (yes, ``#1'')]%
}{\oldendproof}
\begin{document}
  \begin{proof}[Foobar]
    Some example text.
  \end{proof}
\end{document}

When we redefine the proof environment, we are in fact defining \proof and \endproof. The primitive \let makes \oldproof into an exact copy of what \\proof means initially, so that we can use it for defining \proof. Otherwise, \proof would expand to \proof[...], which would expand to \proof[...], etc, looping forever.

EDIT: revised the last code snippet, which was completely wrong.

share|improve this answer
    
Thanks for a very detailed answer. But the an_ant answer with a \renewenvironment looks simpler to me. –  jutky Jan 1 '11 at 22:17
1  
an_ant's way has a drawback: the \qed symbol won't always be placed properly (AFAIK, the ams packages work hard to do get spacing and everything right). Also, it removes the optional argument. [...] In fact, this can easily be fixed (see my comment on an_ant's answer. –  Bruno Le Floch Jan 1 '11 at 23:19
    
Your second example (redefining proof) results in "LaTeX Error: Command \proof already defined." And changing it to use \renewenvironment creates an infinite loop and crashes LaTeX due to memory overflow :-( –  Max Feb 27 at 18:05
    
@Max Sorry for the delay in fixing that. My fix is ugly but should now work. –  Bruno Le Floch Mar 5 at 21:01
add comment

many of the fonts in the ams document classes and amsthm.sty are "frozen", even though they are changed in publication-specific classes to effect a different style. for the next upgrade of the ams-latex collection, we are considering assigning "logical" names to most such fonts, to simplify the ability to make changes such as the one requested here. the "proofheadfont" will be among the fonts to be generalized.

share|improve this answer
add comment

If you're able and happy to modify your amsthm.sty, then find the command that begins \newenvironment{proof} (close to the end of the file), and change itshape to bfseries.

Alternatively, just paste the following into the preamble of your document:

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

Then the proof environment will behave exactly as before in terms of spacing, optional argument, \qedhere and so on, but you'll have bold rather than italic.

share|improve this answer
5  
I'd definitely not recommend changing a style file for this. –  Hendrik Vogt Jan 2 '11 at 16:12
    
Copying this code into the preamble did the trick for me. –  Ubiquitous Feb 15 '13 at 14:41
add comment

A better and simpler solution is to redefine \proofname:

\usepackage{amsthm}
\let\oldproofname=\proofname
\renewcommand{\proofname}{\rm\bf{\oldproofname}}

This is better than redefining the proof environment because the environment goes to considerable lengths to position the \qed mark correctly, and to respect the indentation style used in theorems (which is not necessarily the same as for normal paragraphs). It also works fine with the babel package which is helpful if you work in more than one language, or are writing a style file that might be used with multiple languages.

share|improve this answer
2  
    
You cannot use \textit or \textbf because they're block-level and you need the bold effect to propagate beyond the \oldproofname (which is 'Proof' in English) so that the full stop is also in bold. TeX's modal \rm and \bf commands do that. It might have been better had I used \upshape\bfseries instead of \rm\bf as they're the LaTeX versions, but to be honest, I don't see a big difference. –  richard Jul 24 '12 at 21:07
    
The proposed link(s) provide a reason behind the choice to stick to LaTeX-related commands. It may not be evident from your example, but in general it is a good idea to avoid the two-letter font commands. True, using \upshape\bfseries would act as switches in analogue to \rm\bf compared to macros that gobble their arguments (as does \textbf and company). To that extent, you don't need to group \oldproofname, since neither \rm not \bf takes an argument. –  Werner Jul 24 '12 at 21:46
    
If you redefine \proofname only then the dot after proof name will remain non-bold italic. –  Smylic Nov 18 '13 at 23:52
add comment

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.