# Corners for theorems and definitions [duplicate]

This question already has an answer here:

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. ## marked as duplicate by CarLaTeX, Raaja, siracusa, Stefan Pinnow, schtandardJun 22 at 8:00

• Yes, such packages exist and they are called tcolorbox and tcolorbox. Just do a google image search for site:tex.stackexchange.com tcolorbox theorem and click on whatever looks promising. This will give you an idea and also a starting point for a question which is more appreciated. – user121799 Jun 22 at 1:38
• @marmot I found some packages like that one but they provide full boxes. I didn't see any example showing isolated corners. Maybe it's possible to do it with the tcolorbox tools, but I have no idea how. – Alan Rapoport Jun 22 at 1:43

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}{\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.

• Thanks a lot. That would definitely work. I didn't provide any MWE because I had no idea that an example like the one in the link you passed me could be adapted to my needs. This is the first time I heard of tcolorbox. – Alan Rapoport Jun 22 at 15:20