I have a trivial theorem that is like:
\begin{Prop}
\[1+1=2\]
\begin{proof}
Trivial.
\end{proof}
\end{Prop}
and my overleaf marks the "Trivial" red and says:
Something's wrong--perhaps a missing \item.
Everything works as intended, but the red mark just won't go.
Then, I tried adding some comment to the proposition
\begin{Prop}
This statement is true:
\[1+1=2\]
\begin{proof}
Trivial.
\end{proof}
\end{Prop}
and the red mark is gone.
Why is this?
This is the code to duplicate the problem:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{mdframed}
\newtheorem{proposition}{Proposition}
\newmdtheoremenv{Prop}{Proposition}
\surroundwithmdframed{proof}
\begin{document}
\begin{Prop}
\[1+1=2\]
\begin{proof}
Trivial.
\end{proof}
\end{Prop}
\end{document}
The result:
The error:
Also, if I remove the \usepackage{amsmath}
, the line would be fine. This is also strange.