18

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.

User X
  • 513
  • What about \begin{Pythagorean theorem~\cite{Pythagoras}} – Dox Apr 29 '14 at 18:28
  • @Dox Thank you for your comment. I've just tried that and I get the following error: `! Missing \endcsname inserted. \protect l.14 \begin{Pythagorean theorem~\cite{Pythagoras}}

    ?`.

    – User X Apr 29 '14 at 18:37

1 Answers1

21

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}{}{}
Werner
  • 603,163
  • I spent much time searching for information on the web and trying to figure out how to fix the problem. This answer definitely fixed it. Thanks so much!!! – User X Apr 29 '14 at 19:38
  • It took me a while to notice that if you use swapped numbers then you need to redefine \swappedhead@plain as well – Reimundo Heluani Mar 19 '18 at 18:03