我正在使用 exsheets 输入问题和答案。当我开始新的部分时,问题编号会从上一个继续。我如何重置它并使其再次从 1 开始?以下是 MWE:
\documentclass{article}
\usepackage{exsheets}
\begin{document}
\section{One}
\begin{question}
This is question number 1 in section 1.
\end{question}
\section{two}
\begin{question}
This is question number 1 in section 2. But it is numbered as "Exercise 2" how do I make it 1?
\end{question}
\end{document}
答案1
使用包选项counter-within=section
以便在每次开始某个部分时重置问题计数器(参见 exsheets 文档第 8 章)
\documentclass{article}
\usepackage[counter-within=section]{exsheets}
\begin{document}
\section{One}
\begin{question}
This is question number 1 in section 1.
\end{question}
\section{two}
\begin{question}
This is question number 1 in section 2. But it is numbered as "Exercise 2" how do I make it 1?
\end{question}
\end{document}