I would do with xsim
, successor of exsheets
, the same I do with it: lists of questions inside a tasks environment.
Is that possible?
Something like this:
\documentclass{article}
\usepackage{exsheets, tasks}
\makeatletter
\def\sol{\relax}
\newcommand*{\@exoSol}[1]{%
\ES@Line #1 \sol\sol%
}
\ExplSyntaxOn
\cs_set_eq:NN \exsheets_par: \scan_stop:
\ExplSyntaxOff
\SetupExSheets{
headings=inline-nr,
counter-format=$\cdot$qu$\cdot$,
question/no-skip-below = true,
question/post-hook={},
solution/post-hook={\hspace{1em}},
solution/pre-hook={}
}
\long\def\ES@Line#1\sol#2\sol{%
\begin{question}#1\end{question}%
\long\def\@test{#2}\ifx\@test\empty\else\begin{solution}#2
\end{solution}\fi%
}
\NewTasks[
label={\relax},
label-width=0em,
item-indent=0em,
label-offset=0em,
item-format={\@exoSol},
before-skip = 0pt]{series}[?]
\makeatother
\begin{document}
Solve with natural numbers, when possible:
\begin{series}(3)
? $1+5$ \sol $6$
? $4-2$ \sol $2$
? $3-4$ \sol impossible
? $8+2$ \sol $10$
? $0+0$
? $6\times 0$ \sol $0$
\end{series}
Solutions:\par
\printsolutions
\end{document}