[Tex/LaTex] Proof titles with ntheorem

ntheoremtheorems

I am using the ntheorem package. I have a theorem in a document where the proof appears somewhat later. When I start the proof, I'd like to indicate what exactly I am proving. Currently the code I am using looks like this:

\documentclass{article}

\usepackage{ntheorem}

\theoremstyle{nonumberplain}

\theorembodyfont{\upshape}
\newtheorem{proof}{Proof}

\begin{document}

\begin{proof}[Proof of something]
  Proof here.
\end{proof}

\end{document}

This results in output like:

Proof (Proof of something) Proof here.

I would like it to instead just look like

Proof of something. Proof here.

Is it possible to do this? This will happen several times in the document, so I'd rather not create a custom environment for each instance.

Best Answer

You have to provide your own theorem style.

Try:

\makeatletter
\newtheoremstyle{MyNonumberplain}%
  {\item[\theorem@headerfont\hskip\labelsep ##1\theorem@separator]}%
  {\item[\theorem@headerfont\hskip\labelsep ##3\theorem@separator]}
\makeatother
\theoremstyle{MyNonumberplain}
\theorembodyfont{\upshape}
\newtheorem{proof}{Proof}

With the definition above you will get the following output:

enter image description here

\documentclass{article}

\usepackage{ntheorem}
\makeatletter
\newtheoremstyle{MyNonumberplain}%
  {\item[\theorem@headerfont\hskip\labelsep ##1\theorem@separator]}%
  {\item[\theorem@headerfont\hskip\labelsep ##3\theorem@separator]}
\makeatother
\theoremstyle{MyNonumberplain}
\theorembodyfont{\upshape}
\newtheorem{proof}{Proof}

\begin{document}
\begin{proof}
  Proof here.
\end{proof}
\begin{proof}[Proof of something]
  Proof here.
\end{proof}
\end{document}