I was wondering if there is any package or a simple snippet I could use to get the kind of corners shown in the picture for theorems and definitions.
Thanks in advance.
I was wondering if there is any package or a simple snippet I could use to get the kind of corners shown in the picture for theorems and definitions.
Thanks in advance.
This is to give you a start. All I did was to look up an answer, I randomly chose this one and cooked it down to
\documentclass{book}
\usepackage{amsmath}
\usepackage{cleveref}
\usepackage[most]{tcolorbox}
\newtcbtheorem[number within=chapter]{Theorem}{}{
enhanced,sharp corners,colback=white,colframe=white,top=-0.5em,
overlay={%
\draw[gray!40,line width=3pt] ([yshift=-1cm]frame.north west)
|- ++ (1,1) ([yshift=1cm]frame.south east) |- ++ (-1,-1);
},
}{thm}
\newenvironment{myTheorem}[1]{\begin{Theorem}{}{#1}\textbf{Theorem:}}{\end{Theorem}}
\begin{document}
\chapter{Foo}
\begin{myTheorem}{thm:FermatsLastTheorem}
No three positive integers \(a\), \(b\) and \(c\) satisfy the equation \(a^{n} + b^{n} = c^{n}\) for any integer greater than two.
\end{myTheorem}
\end{document}
The fact that the answer I link to achieves so much more than this one may give you an idea of what it possible. Note that the answer I link to answers a question in which the user provided an MWE, such questions tend to get received better.
declaretheoremstyle declarations?
– Jonathan Prieto-Cubides
Jan 23 '24 at 11:31
site:tex.stackexchange.com tcolorbox theoremand click on whatever looks promising. This will give you an idea and also a starting point for a question which is more appreciated. – Jun 22 '19 at 01:38