I am making a custom book style for my thesis, and I came up with a style for the theorem environments that I like, as you can see in the image below. However I have two problems:
- I would like the theorem's title to be in parenthesis, as is the case with the usual amsthm's theorem
- I would like the theorem environments to be similar to amsthm's environments. For example, the theorem's body would be in italics, and the remark's title would be in not boldface italics.
I know that these issues can be solved by using the package thmtools, however I could not find a way to reproduce this style and colors, in particular I could not make the title to appear in this shaded bar, and I also had issues with shaded theorems not braking along pages, wich is a must for me, as I am going to have some long ones.
Could somebody tell me how I can produce the same result, but with my two issues solved?
Extra question: I learnt from experience that when I'm having a hard time changing latex styles, there is a good reason for that, and changes produce worse results. I guess it's a matter of taste, but from a typesetting point of view, is there a good reason to avoid doing the changes I'm asking here?
\documentclass{article}
\usepackage{amsthm}
\usepackage{lipsum} %dummy text
\usepackage[usenames,dvipsnames,table]{xcolor}
\definecolor{lightblue}{rgb}{.31,.506,.741}
\definecolor{pale}{HTML}{F7F8E0}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{tikz}
\theoremstyle{theorem}
\mdfdefinestyle{mytheoremstyle}{%
linewidth =0pt, %
frametitlerule =true, %
frametitlebackgroundcolor=lightblue!20,
backgroundcolor=pale,
}
\theoremstyle{theorem}
\mdfdefinestyle{mytheoremstyle}{%
linewidth =0pt, %
frametitlerule =true, %
frametitlebackgroundcolor=lightblue!20,
backgroundcolor=pale,
}
\mdtheorem[style=mytheoremstyle]{theorem}{Theorem}[section]
\theoremstyle{remark}
\mdfdefinestyle{myremarkstyle}{%
linewidth =0pt, %
frametitlerule =true, %
frametitlebackgroundcolor=lightblue!20,
backgroundcolor=pale,
}
\mdtheorem[style=myremarkstyle]{remark}[theorem]{Remark}
\begin{document}
\section{A section}
\lipsum[1]
\begin{theorem}[The theorem's title]
I would like two things:
\begin{enumerate}
\item the theorem's title to appear in parentheses,
like ``Theorem 1.1. (The theorem's title.)''
\item the fonts to be in italics, like the
amsthm's theorem style
\end{enumerate}
\end{theorem}
\lipsum[2]
\begin{remark}
I would like the fonts to be as in amsthm's remark
style.
\end{remark}
\end{document}
amthm
were made on the basis of long tradition, so to not recognize them would be breaking with tradition. unrelated comment: some people have had good results withtcolorbox
; haven't used it myself, so this is second hand only.