Option notebraces
replaces the parentheses with the given symbols with the help of macro \thmt@embrace
:
\def\thmt@embrace#1#2(#3){#1#3#2}
Argument #1
and #2
are the new open and closing braces, \thmt@embrace
is fed with the full title inclusive standard parentheses, which are detected by the parameter text (#3)
. However, in this case, #3
already contains (
and )
, thus that the detection of the correct closing )
fails.
Workaround: Protect the inner parentheses by curly braces, as already suggested by Barbara Beeton's comment:
\begin{theorem}[Pythagorean Theorem {(Pythagoras)}]
\end{theorem}
The curly braces should be at least partially inside the title as in the example above to avoid automatic removal of the curly braces, when the title argument is read.
Another way is fixing \thmthead@plain
to insert the protecting curly braces internally:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{thmtools}
\makeatletter
\renewcommand*{\thmhead@plain}[3]{%
\thmname{#1}%
\thmnumber{%
\@ifnotempty{#1}{ }%
\@upn{#2}%
}%
\thmnote{ {\the\thm@notefont({#3})}}%
}
\makeatother
\declaretheoremstyle[notebraces={[}{]}]{style}
\declaretheorem[style=style]{theorem}
\begin{document}
\begin{theorem}[Pythagorean Theorem (Pythagoras)]
\end{theorem}
\end{document}
thmtools
. of course, you can work around the problem manually by wrapping(Pythagoras)
in braces.