I am using ntheorem to include theorems in my thesis. Currently, my theorem headers are printed as follows: (x.y) Theorem (Title).
The code I use to achieve this is roughly as follows.
\documentclass{scrreprt}
\usepackage[english]{babel}
\usepackage[intlimits]{amsmath}
\usepackage[amsmath,thmmarks,hyperref]{ntheorem} % Definitionen, Sätze, ...
\makeatletter
\newtheoremstyle{nummermitklammern}
{\item[\theorem@headerfont\hskip\labelsep (##2)\ ##1.\theorem@separator]}%
{\item[\theorem@headerfont\hskip\labelsep (##2)\ ##1 (##3).\theorem@separator]}%
\makeatother
\theoremstyle{nummermitklammern}
\newtheorem{x}{}[chapter]
\newtheorem{theorem}[x]{Theorem}
\begin{document}
\begin{theorem}[Title]
This is a theorem.
\end{theorem}
\end{document}
What I would like to do now is to be able to provide a second optional argument when inserting a theorem, for example a source. If a source is provided, I would like to have the theorem header printed as: (x.y) Theorem (Title) [Source].
Is there some way to do this? Note that I have other theorem-like environments like corollary and example defined (that use the same counter as theorem), which I would like to behave the same.
\NewDocumentCommand\finaslonchasnummermitklammernaux{mmoo}. – finaslonchas Jan 24 '16 at 13:15