I want to print (dump) the solutions to questions at the end of the book.
If I just use \printsolutions I get every solution on a new line (as a new paragraph).
I need to have them on the same line (only numbers, no names), Something like this:
1) Sol one. 2) Sol two. 3) ... etc.
Is there a way/workaround to accomplish this?
If yes, is there a way to automatically include the section/subsection name in the list (on the same line)? Like: ¨
Section 1. Subsection one. 1) Sol one. 2) Sol two. Subsection two. 1) Sol one. 2) Sol two. Section 2. Subsection 1. 1) Sol one ...
Edit:
Following cgnieder Edit I'm trying to find a way to avoid manual labeling and '\nameref'. I came up with something but it's not working as it should - 'printsolutions' gives the same name for sections. Please see the inline text and comments as well. Help!
\documentclass{scrartcl}
\usepackage{exsheets}
\setlength{\parindent}{0pt}
\DeclareQuestionProperty{section-title}
\SetupExSheets{counter-within=section ,
headings=inline-nr ,
counter-format=qu)}
\newcommand{\lsection}[1]{
\def\secName{#1}
\section{#1}
}
\SetupExSheets{section-hook = \noindent\bfseries
Section \GetQuestionProperty{section-title}{\CurrentQuestionID}
\space}
\begin{document}
\lsection{One}
\begin{question}
\SetQuestionProperties{section-title= \secName }
foo
\end{question}
\begin{solution}
foo
\end{solution}
\begin{question}
\SetQuestionProperties{section-title= \secName }
bar
\end{question}
\begin{solution}
bar
\end{solution}
Solutions for section "\secName" are: \printsolutions[section]\\ % OK
ALL the solutions until here are: \printsolutions % OK
\lsection{Two}
\begin{question}
\SetQuestionProperties{section-title= \secName }
baz
\end{question}
\begin{solution}
baz
\end{solution}
\begin{question}
\SetQuestionProperties{section-title= \secName }
foobar
\end{question}
\begin{solution}
foobar
\end{solution}
Solutions for section "\secName" are: \printsolutions[section]\\ % OK
ALL the solutions at this point are wrong, the 1st section name is "Two" instead of "One": \printsolutions % WRONG!!
\lsection{Answers} %changing '\lsection' to '\section' makes all the section names as "Two"
This is the output of 'printsolutions' wrongly showing the same section name throuhout (the last name used):
\printsolutions
\end{document}

section-titleproperty is set to the token\secName(and not to whatever tokenlist it is defined) – cgnieder Oct 15 '14 at 07:58