I'm writing a book which includes exercises spreaded through its chapters. To typeset the exercises I'm using the exsheets package. I want to make an appendix with all the solutions listed per chapter (and I've been aware this wasn't possible, according to Exsheets: how do I print the 'solutions' on the same line?).
I've seen that the newest version of exsheets has a chapter-hook option that, according to the manual (found at http://ctan.mirrors.hoobly.com/macros/latex/contrib/exsheets/exsheets_en.pdf.):
[chapter-hook = {code}] Adds "code" to the list of solutions every time solutions from a new chapter are printed (before the solutions of the corresponding chapter are printed).
The problem is that it's the only mention of chapter-hook the author makes, with no particular examples, so I don't even know where to put the option.
I've tried with the following:
\chapter{Grouped Exercises I}
\begin{question}
Integrate $\int \cos{x}\ \mathrm{d}x$
\end{question}
\begin{solution}
$\sin{x} + C$
\end{solution}
% ...
% more code here
% ...
\appendix
\chapter{Solutions to exercises}
\printsolutions[all,chapter-hook={Chapter}]
but when compiling with pdfLaTeX, it throws the error:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! LaTeX error: "kernel/key-choice-unknown"
!
! Key 'exsheets/exsheets_print_solutions/chapter-hook' accepts only a fixed
! set of choices.
!
! See the LaTeX3 documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.6 \printsolutions[all,chapter-hook={Chapter}]
What to do? How's the correct way of using chapter-hook option under these circumstances?
Thanks in advance!

\documentclass{...}and ending with\end{document}. – Jun 01 '14 at 08:33exerciseenvironment inexsheets, as far as I know and understood the manual, it should rather read\begin{question}...\end{question}. Furthermore you do not use any mathematical mode for your math question – Jun 01 '14 at 09:02exsheetsusesLaTeX3syntax, I am not familiar with that, but looking into the code and using the error message, there is possibly a bug, wherechapter-hookis treated as a choice-key whereas it is intended to be a command-key. – Jun 01 '14 at 09:04section-hook@ChristianHupfer users only get notified in comments if they already have commented on a question/answer. It's easier to ping me in chat. – cgnieder Jun 01 '14 at 10:39