我能够使用 xsim 从标记的问题库中提取简单、中等和困难的问题。但是,我无法获取包含所有简单问题、所有中等问题和所有困难问题的列表的 tex 文件。
以下是 MWE:
\documentclass[14pt]{article}
\usepackage{amsmath, amssymb, amsthm, amsfonts}
\usepackage[verbose,clear-aux]{xsim}
\usepackage{filecontents}
\DeclareExerciseCollection{foo-easy}
\DeclareExerciseCollection{foo-medium}
\DeclareExerciseCollection{foo-difficult}
\DeclareExerciseTagging{difficulty}
\xsimsetup
{
difficulty={1,2,3},
print-collection/print=both
}
\begin{filecontents*}
{foo.tex}
\begin{exercise}[difficulty=1]
bla bla
\end{exercise}
\begin{solution}
bla bla bla
\end{solution}
\begin{exercise}[difficulty = 2]
bla
\end{exercise}
\begin{solution}
bla bla bla bla
\end{solution}
\end{filecontents*}
\begin{document}
\collectexercises{foo-easy}
\xsimsetup{difficulty=1}
\input{foo.tex}
\collectexercisesstop{foo-easy}
\collectexercises{foo-medium}
\xsimsetup{difficulty=2}
\input{foo.tex}
\collectexercisesstop{foo-medium}
\collectexercises{foo-difficult}
\xsimsetup{difficulty=3}
\input{foo.tex}
\collectexercisesstop{foo-difficult}
\section{Level 01 Problems}
\printcollection{foo-easy}
\printsolutionstype*{foo-easy}
\section{Level 02 Problems}
\printcollection{foo-medium}
\section{Level 03 Problems}
\printcollection{foo-difficult}
\end{document}