出于一些不切题的原因,我想同时进行这两项练习,
例 1.1,例 1.2,例 1.3,...,
和问题
概率 1.1,概率 1.2,概率 1.3,...
也许还有示例 1.1、示例 1.2……
问题通常出现在章节末尾,在该章的所有练习之后,但有时我也会插入它们。
答案1
这是不可能的exsheets
(也不会是),但是exsheets
'官方继任者包xsim
本机支持这一点:
\documentclass{article}
\usepackage{xsim}
\DeclareExerciseType{problem}{
exercise-env = problem ,
solution-env = answer ,
exercise-name = Prob. ,
solution-name = Answer ,
exercise-template = default ,
solution-template = default
}
\DeclareExerciseType{example}{
exercise-env = example ,
solution-env = hint ,
exercise-name = Example ,
solution-name = Hint ,
exercise-template = default ,
solution-template = default
}
\xsimsetup{
exercise/name = Ex. ,
exercise/within = section ,
exercise/the-counter = \thesection.\arabic{exercise} ,
problem/within = section ,
problem/the-counter = \thesection.\arabic{problem} ,
example/within = section ,
example/the-counter = \thesection.\arabic{example}
}
\begin{document}
\section{Foo}
\begin{exercise}
\end{exercise}
\begin{problem}
\end{problem}
\begin{exercise}
\end{exercise}
\begin{example}
\end{example}
\begin{exercise}
\end{exercise}
\begin{problem}
\end{problem}
\begin{example}
\end{example}
\end{document}