2

This is probably very simple to do, but I am trying to write restatable theorems with boxes around them. Looking at this answer, box around theorem statement, I get a way to put boxes around a theorem, but then using the restatable option removes the boxes, as shown below:

\documentclass{article} \usepackage{mdframed} \usepackage{lipsum} \usepackage{thmtools, thm-restate} \newmdtheoremenv{thm}{Theorem} \begin{document} \begin{thm} \lipsum*[1] \end{thm} \begin{restatable}{thm}{Lips} \lipsum*[1] \end{restatable} \end{document} 

produces:enter image description here

2 Answers 2

3

Instead of using directly the newmdtheoremenv command, you can declare your own theorem style. In the following, I defined a framedstyle, and defined the thm environment simply to be a theorem of that style. This way, when the theorem is restated, it is restated in the same theorem style, so it is framed again.

\documentclass{article} \usepackage{mdframed} \usepackage{lipsum} \usepackage{amsthm} \usepackage{thmtools, thm-restate} \declaretheoremstyle[ headfont=\bfseries, bodyfont=\normalfont\itshape, headpunct={}, spacebelow=\parsep, spaceabove=\parsep, mdframed={ innertopmargin=6pt, innerbottommargin=6pt, skipabove=\parsep, skipbelow=\parsep} ]{framedstyle} \declaretheorem[ style=framedstyle, name=Theorem ]{thm} \begin{document} \begin{thm} \lipsum*[101] \end{thm} \begin{restatable}{thm}{Lips} \lipsum*[101] \end{restatable} \Lips* \end{document} 

2

(Disclaimer: I wrote the package, keytheorems, used below.)

With keytheorems it's easy to define and restate theorems wrapped in a tcolorbox.

\documentclass{article} \usepackage{keytheorems} \usepackage{lipsum} \newkeytheoremstyle{framedstyle} { headpunct={}, tcolorbox-no-titlebar= { sharp corners, boxrule=1pt, colback=white, }, } \newkeytheorem{thm}[ style=framedstyle, name=Theorem, ] \begin{document} \begin{thm} \lipsum*[101] \end{thm} \begin{thm}[store=Lips] \lipsum*[101] \end{thm} \getkeytheorem{Lips} \end{document} 

tcolorbox theorems

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.