0

I am writing a solutions manual companion to some lecture notes. I want the numbering of exercises, solutions, and chapter to align. Thus I want the structure of the document to be something like

\documentclass{report}
\usepackage{hyperref}
\usepackage[numbered]{bookmark}
\begin{document}
    \tableofcontents
\chapter*{Exercises}
\addcontentsline{toc}{chapter}{Exercises}
\setcounter{section}{0}
\renewcommand*{\theHsection}{exercises.\the\value{section}}
    \section{Laplace transform (chapter 1 in the lecture notes)}
    \subsection{}
    \subsection{}
    \subsection{}
    \section{Matrix algebra (chapter 2 in the lecture notes)}
    \subsection{}
    \subsection{}
    \subsection{}
\chapter*{Solutions}
\addcontentsline{toc}{chapter}{Solutions}
\setcounter{section}{0}
\renewcommand*{\theHsection}{solutions.\the\value{section}}
    \section{Laplace transform (chapter 1 in the lecture notes)}
    \subsection{}
    \subsection{}
    \subsection{}
    \section{Matrix algebra (chapter 2 in the lecture notes)}
    \subsection{}
    \subsection{}
    \subsection{}
\end{document}

...using the hack on hyperref from here: Reset section numbering between unnumbered chapters

enter image description here

There is one issue with this. I get the chapter level numbering displayed! E.g. subsection 0.2.1 for exercise/solution 2.1

How do I get rid of that numbering?

2
  • 2
    Imho it would make more sense to use article class and \part instead of \chapter. Mar 12, 2021 at 9:38
  • @UlrikeFischer yes indeed. I didnt know that was possible. I think I get it all to work correctly by doing the replacements of article instead of report, and then changing all "chapter" to "part". And that is it.... it seems. Any pitfalls to consider? Otherwise Im happy to use that as an answer, if you propose it as such.
    – LudvigH
    Mar 12, 2021 at 9:56

1 Answer 1

0

Adding this to the preamble did the trick for me :

Taken from Skipping Chapter numbering but getting the Chapter layout

\makeatletter
  \renewcommand \thesection {\@arabic\c@section}
  \@removefromreset{section}{chapter}
\makeatother

enter image description here

You must log in to answer this question.

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