Math & Scienceamsthm | Boldfaced Proof Label

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
itatitl
Posts: 13
Joined: Thu Mar 24, 2011 8:20 am

amsthm | Boldfaced Proof Label

Post by itatitl »

I am using the packages amsmath and amsthm for the document. I wanted the theorems and proofs (while using the environments thm, proof, etc) to be printed in the same bold font. I found a workaround at TeX.SX which suggested pasting the following to the preamble.

Code: Select all

\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 
It works fine except that when I use the optional theorem name to print "Proof of Theorem ***", it doesn't print the theorem number in boldface. Any solution?


Thanks,

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

amsthm | Boldfaced Proof Label

Post by Stefan Kottwitz »

For a specific problem, please post a Infominimal working example. Follow the link to learn why and how. For example, here one reason for this requirement is, that the description doesn't lead to the problem. When I tested, the theorem number was bold.

Here I show you my minimal example:

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\newtheorem{theo}{Theorem}
\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
\begin{document}
\begin{theo}
A statement which has to be proved.
\label{th:test}
\end{theo}
\begin{proof}[Proof of Theorem \ref{th:test}] Left as an exercise.
\end{proof}
\end{document}
proof.png
proof.png (4.06 KiB) Viewed 9465 times
So, it seems that you do it in a different way, just show us how.

Stefan
LaTeX.org admin
itatitl
Posts: 13
Joined: Thu Mar 24, 2011 8:20 am

amsthm | Boldfaced Proof Label

Post by itatitl »

Thank you very much for the reply. It seems the problem is with the theoremref package.

Code: Select all

\documentclass[12pt,twoside,a4paper]{report}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{theoremref}
\newtheorem{theo}{Theorem}
\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
\begin{document}
\begin{theo}
A statement which has to be proved.
\thlabel{th:test}
\end{theo}
\begin{proof}[Proof of  \thref{th:test}] Left as an exercise.
\end{proof}
\end{document}
Post Reply