I'm trying to build exam sheets with xsim
using collections where exercises doesn't show up in the id
order.
The exercises print in the specified order (= counter
order) in the exam itself but in the id
order in the grading table which can be confusing.
Here is a MWE:
\documentclass{article}
\usepackage{xsim}
\DeclareExerciseCollection{test}
\xsimsetup{
print-solutions/headings=false ,
collect
}
\begin{document}
\gradingtable
\begin{exercise}[ID=one,points=3]
Exercise one.
\end{exercise}
\begin{solution}
Answer one.
\end{solution}
\begin{exercise}[ID=two,points=7]
Exercise two.
\end{exercise}
\begin{solution}
Answer two.
\end{solution}
\begin{exercise}[ID=three,points=1]
Exercise three.
\end{exercise}
\begin{solution}
Answer three.
\end{solution}
\printexercise{exercise}{one,three, two}
\end{document}
Here is what I get:
And here is what I would like to have (exercises 2 and 3 are switched in the grading table):
As far as understood from the manual of the package, xsim only include build-in functions to sort exercises by Type then ID or by ID. I've tried to dig in the source code of the package to build a function to sort exercises by counter but it's beyond my present abilities.
Is there a build-in (or an easy) way to do so that I overlooked? Otherwise, have you an idea of how to get it?