mdframe 阻止全局计数。我该如何解决这个问题?
\documentclass{article}
\usepackage{enumitem,mdframed}
\begin{document}
\begin{enumerate}
\item This should have a numeral of one.
\end{enumerate}
\begin{mdframed}
\begin{enumerate}[resume]
\item This should have a numeral of two.
\end{enumerate}
\end{mdframed}
\begin{enumerate}[resume]
\item This should have a numeral of three.
\end{enumerate}
\end{document}
答案1
对于这种全局恢复,最好使用series
列表的键,然后使用resume=...
来恢复它:
\documentclass{article}
\usepackage{enumitem,mdframed}
\begin{document}
\begin{enumerate}[series=mylist]
\item This should have a numeral of one.
\end{enumerate}
\begin{mdframed}
\begin{enumerate}[resume=mylist]
\item This should have a numeral of two.
\end{enumerate}
\end{mdframed}
\begin{enumerate}[resume=mylist]
\item This should have a numeral of three.
\end{enumerate}
\end{document}