I'm using the excellent exsheets package, and I'd like to have different orders of questions in the different variants of my test. That is, I'd like \variant{1} to print one order of questions, \variant{2} to print another, etc. So given a document like:
\documentclass[12pt]{article}
\usepackage{exsheets}
\SetVariations{2}
\variant{1}
\begin{document}
\begin{question}
foo
\end{question}
\begin{question}
bar
\end{question}
\begin{question}
baz
\end{question}
\end{document}
For \variant{1} I'd like it to render something like:
Exercise 1.
foo
Exercise 2.
bar
Exercise 3.
baz
And for \variant{2} I'd like it to render in some other order, say:
Exercise 1.
baz
Exercise 2.
bar
Exercise 3.
foo
I've managed to achieve something like this by defining commands like \varyreversethree which work like the following:
\documentclass[12pt]{article}
\usepackage{exsheets}
\SetVariations{2}
\variant{2}
\newcommand{\varyreversethree}[3]{\vary{#1#2#3}{#3#2#1}}
\begin{document}
\varyreversethree{
\begin{question}
foo
\end{question}
}{
\begin{question}
bar
\end{question}
}{
\begin{question}
baz
\end{question}
}
\end{document}
Some things I don't like about this solution are that I have to define a new version of it for each possible number of things that might be reversed, and I can't leave any blank lines between the arguments (e.g. between questions) or later arguments are lost.
Is there a better way to do this in exsheets?


exsheets. – cgnieder Jan 23 '14 at 17:05