1

I want to number my questions with exsheets with subsection which is possible with the command: counter-within={subsection}. But I wish to have the same numbers in my solutions.

I found this solution: Theorem numbering as subsections and automatic solutions

but when I enter the exact same code into TexShop, I get something else.

With the following code

\documentclass[a4paper,12pt]{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{multicol}

\usepackage{exsheets}
\AddCounterPattern[exsheets]{subsection}{sub}


\DeclareInstance{exsheets-heading}{mystyle}{default}{
points-pre-code = [ ,
points-post-code = ) ,
join = 
{
title[r,B]number[l,B](0.333em,0pt) ;
number[r,B]points[l,B](0.333em,0pt)
} ,
attach = { main[l,vc]title[l,vc](0pt,0pt) }
}

\NewQuSolPair{pr}[name=Problem]{Solution}[name=ad Problem]

\SetupExSheets{
question/pre-body-hook=\itshape,
solution/pre-body-hook=\itshape,
counter-within={subsection},
headings=mystyle,
points/name=Punkt/e,counter-format=se.sub.qu}

\begin{document}


\section{Section}

\subsection{Subsection}
\begin{pr}
 Problem
\end{pr}
\begin{Solution}
  Solution
\end{Solution}

\subsection{Subsection}

\begin{pr}
 Problem
\end{pr}
\begin{Solution}
  Solution
\end{Solution}

\begin{pr}
 Problem
\end{pr}
\begin{Solution}
  Solution
\end{Solution}

\section{Section}

\subsection{Subsection}
\begin{pr}
 Problem
\end{pr}
\begin{Solution}
  Solution
\end{Solution}
\newpage


\section{Solutions}
\begin{multicols}{2}
  \printsolutions
\end{multicols}

\end{document}

I have the outputenter image description hereenter image description here

but I want solutions numbers like 1.1.1 and 1.2.1. Does anybody know how to do this?

1 Answer 1

1

I solved it: I had an old version of the exsheets.sty file. I works with the newest version - but I have seen that there is a newer version of exsheets called xsim.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .