1

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

Cragfelt
  • 4,005
Ollie
  • 13

1 Answers1

2

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}

Vincent
  • 20,157