I am working on a text that involves some theorems and I am using mdframed I want a theorem whit just the optional title
\begin{teorema}[title desired] Some text \end{teorema}
so far I've seen two options but no one does what I want
the first method I used is the next
\documentclass[12pt]{book}
\usepackage[framemethod=TikZ]{mdframed}
\mdtheorem[frametitlealignment=\center,
frametitlerule=false,
linecolor=FireBrick,
linewidth=1pt,
innerlinewidth=1pt,
frametitlerulewidth=5pt,
frametitlebackgroundcolor=DarkSalmon,
backgroundcolor=gray!10,
userdefinedwidth=12cm,
align=center,
frametitle={},
theoremseparator={},
]{teorema}{}
\begin{document}
\begin{teorema*}
Some text
\end{teorema*}
\end{document}
with this one there is no frame title and no number but the theorem separator appears and I don't want that and the second method is the next
\documentclass[12pt]{book}
\usepackage[framemethod=TikZ]{mdframed}
\mdtheorem[frametitlealignment=\center,
frametitlerule=false,
linecolor=FireBrick,
linewidth=1pt,
innerlinewidth=1pt,
frametitlerulewidth=5pt,
frametitlebackgroundcolor=DarkSalmon,
backgroundcolor=gray!10,
userdefinedwidth=12cm,
align=center,
frametitle={},
theoremseparator={},
]{teorema}{}
\begin{document}
\begin{teorema}
Some text
\end{teorema}
\end{document}
with this one I don't get the frame title and the theorem separator but the number appears. How can I solve this problem
Best Answer
The easiest way to remove the number is to remove the number:
If you want to turn it off and on again: