I would like to change the theorem environment so that the title and name are coloured. What can I do? Have checked ways to do this (e.g. with \newtheoremstyle) but have not worked well yet. I do not want to use theorom packages such as amsthm, but stick with basic built-in theorem structure.
\documentclass[12pt]{article}
\usepackage[b5paper,body={13cm,18cm}]{geometry}
\usepackage{xcolor}
\begin{document}
\begin{theorem}[Continuous Function]
Let (f) be a function whose derivative exists in every point,
then (f) is a continuous function.
\end{theorem}
\end{document}
I would have other environments using \newtheorem that I would want the same colouring scheme as would happen with \begin{theorem} ... \end{theorem}.



theorem. This should be diable usingthmtools(haven't tested it) or directly viaamsthmand defining custom theorem styles. – daleif Sep 07 '22 at 11:49amsthm. Doable but how? – Veak Sep 07 '22 at 13:07@nameto notify.thmtoolsworks with regular\newtheorem. What is wrong with usingamsthm? You're already usingxcolorso what is the point is requiring build-in latex functionality? – daleif Sep 07 '22 at 13:26amsthm, which makes it a different question. – Marijn Sep 07 '22 at 13:27amsthmor other particular packages, please add that to your question. – barbara beeton Sep 07 '22 at 15:42\newtheoremis in the core. The op does not need amsthm, it is just a strange requirement to not use packages – daleif Sep 07 '22 at 18:20