[Tex/LaTex] How to remove parentheses from theorem optional argument

amsthmbracketsformattingoptional argumentstheorems

This is a MWE:

\documentclass[12pt]{article}

\usepackage{amsfonts, amsthm, amsmath, amssymb}

\theoremstyle{definition}
\newtheorem{Theorem}{Theorem}[section]

\newtheorem*{Pythagorean theorem}{Pythagorean theorem}

%=======

\begin{document}

\begin{Pythagorean theorem}[\cite{Pythagoras}]
This is Pythagoras' theorem.
\end{Pythagorean theorem}

%===

\begin{thebibliography}{HD}

\bibitem[1]{Pythagoras}
Pythagoras' theorem.

\end{thebibliography}

\end{document}

If I use

\newtheorem*{Pythagorean theorem}{Pythagorean theorem}

plus

\begin{Pythagorean theorem}[\cite{Pythagoras}]
This is Pythagoras' theorem.
\end{Pythagorean theorem}

I get the following:

Pythagorean theorem ([1]). This is Pythagoras' theorem.

My question is: how do I remove the parenthesis around [1]?

In order words, I want LaTeX to display the following:

Pythagorean theorem [1]. This is Pythagoras' theorem.

Note that the first period in the sentence above must be in boldface.

Best Answer

You need to update the way the theorem header is set, since it includes ( ) by default (taken from amsclass.dtx):

\def\thmhead@plain#1#2#3{%
  \thmname{#1}\thmnumber{\@ifnotempty{#1}{ }\@upn{#2}}%
  \thmnote{ {\the\thm@notefont(#3)}}}
\let\thmhead\thmhead@plain

Note the use of (#3) above. So, we copy-and-paste the above definition with the adjustment:

\makeatletter
\def\thmhead@plain#1#2#3{%
  \thmname{#1}\thmnumber{\@ifnotempty{#1}{ }\@upn{#2}}%
  \thmnote{ {\the\thm@notefont#3}}}
\let\thmhead\thmhead@plain
\makeatother

This just has the ( ) removed. Here's a MWE:

enter image description here

\documentclass{article}

\usepackage{amsthm}% http://ctan.org/pkg/amsthm

\makeatletter
\def\thmhead@plain#1#2#3{%
  \thmname{#1}\thmnumber{\@ifnotempty{#1}{ }\@upn{#2}}%
  \thmnote{ {\the\thm@notefont#3}}}
\let\thmhead\thmhead@plain
\makeatother
\theoremstyle{definition}

\newtheorem{Theorem}{Theorem}[section]

\newtheorem*{Pythagorean theorem}{Pythagorean theorem}

\expandafter\show\csname Pythagorean theorem\endcsname
%=======

\begin{document}

\begin{Pythagorean theorem}[\cite{Pythagoras}]
This is Pythagoras' theorem.
\end{Pythagorean theorem}

%===

\begin{thebibliography}{HD}

\bibitem[1]{Pythagoras}
Pythagoras' theorem.

\end{thebibliography}

\end{document}

A somewhat simpler solution is provided via an etoolbox patch:

\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\patchcmd{\thmhead}{(#3)}{#3}{}{}
Related Question