In short, when I create a \marginnote
and a list inside of a thmtools
box which uses mdframed
, the list formatting of the first item in the list gets eaten.
Here's a minimal working example.
\documentclass{article}
\usepackage{marginnote}
\usepackage{amsthm,thmtools,mdframed}
\declaretheorem[mdframed={},name=Boxed]{theoremboxed}
\declaretheorem[name=Unboxed]{theoremunboxed}
\begin{document}
\begin{theoremboxed} \marginnote{Note}
Here is a list.
\begin{enumerate}
\item Item 1.
\item Item 2.
\end{enumerate}
\end{theoremboxed}
\begin{theoremunboxed} \marginnote{Note}
Here is a list.
\begin{enumerate}
\item Item 1.
\item Item 2.
\end{enumerate}
\end{theoremunboxed}
\begin{mdframed} \marginnote{Note}
Here is a list.
\begin{enumerate}
\item Item 1.
\item Item 2.
\end{enumerate}
\end{mdframed}
\end{document}
Here is what it looks like when compiled:
The only box with the issue is the first one. Namely, the problem is that the label of the first item has disappeared and moved to the second item.
Here is a list. \marginnote{Note}
\begin{theoremboxed} \leavevmode\marginnote{Note} ...
seems to work.