I used thmtools package to define theorem style because I wanted just the note to have a different colour:
\documentclass{article}
\usepackage{xcolor}
\usepackage{amsthm}
\usepackage{thmtools}
\declaretheoremstyle[
spaceabove = \topsep,
spacebelow = \topsep,
headfont = \normalfont\bfseries,
notefont = \color{olive}\normalfont\mdseries,
notebraces = {}{},
headformat = \NAME{} {\NUMBER}\NOTE,
headpunct = {\newline},
bodyfont = \normalfont\upshape
]{fordefinition}
\theoremstyle{fordefinition}
\newtheorem{defn}{Definition}[section]
\begin{document}
\begin{defn}[Property(T) group]
asdg
\end{defn}
\end{document}
But parentheses () behave weirdly within the note. The right parenthesis always appears at the end of the note.
Any idea how to fix this so that I get the parenthesis where I want it to?
I tried using \right) but it didn't work and I don't think it is a good idea.
P.S. Have I also defined the newline properly to give a line break after the heading? It works, but I am unsure whether this is the ideal way to do it.


