I have applied the answer of question Theorem content right after theorem name in beamer to my question. I put \normalfont after \inserttheorempunctuation but the result is unexpected. Could you please see the image 1.
\documentclass[envcountsect]{beamer}
\usetheme{CambridgeUS}
\usefonttheme{serif}
\makeatletter
\setbeamertemplate{theorem begin}
{%
\begin{\inserttheoremblockenv}
{%
\inserttheoremheadfont
\inserttheoremname
\inserttheoremnumber
\ifx \inserttheoremaddition \empty \else\ (\inserttheoremaddition)\fi%
\inserttheorempunctuation
\normalfont
}
}
\setbeamertemplate{theorem end}{\end{\inserttheoremblockenv}}
\makeatother
\begin{document}
\section{ABC}
\begin{frame}
\begin{theorem}[ABC]
This is a theorem
\end{theorem}
\end{frame}
\end{document}
The result is:
I would like to put the content right after Theorem (no break line). It looks like this
Best Answer
You need to put your formatting commands in to the body, rather than the title, of the
theoremblockenv
and select theblock title
font and colour for the heading elements to mimic the style you ask for. Compare with the two examples of blocks with and without titles.