I would like to add a summary of sections in chapters at the beginning. Is there a nice way to get good looking headings with information (numbering, heading text) replicating those of the chapters and sections?
I have found an answer that seems to do a nice job for the main headings, e.g. sections in an article, but I don't know how to extent it to sections of chapters in a book and it also does not reproduce the numbering and one has to repeat headings: https://tex.stackexchange.com/a/166978/36836
For now, I tried it manually like this:
\documentclass{scrbook}
\usepackage{nameref}
\begin{document}
\chapter*{Summary}
\section*{\ref{One} \nameref{One}}
\subsection*{\ref{One-one} \nameref{One-one}}
Bla bla
\subsection*{\ref{One-two} \nameref{One-two}}
Bla bla
\section*{\ref{Two} \nameref{Two}}
\subsection*{\ref{Two-one} \nameref{Two-one}}
Bla bla
\subsection*{\ref{Two-two} \nameref{Two-two}}
Bla bla
\chapter{One}
\label{One}
\section{One-one}
\label{One-one}
\section{One-two}
\label{One-two}
\chapter{Two}
\label{Two}
\section{Two-one}
\label{Two-one}
\section{Two-two}
\label{Two-two}
\end{document}
Best Answer
Using the link you provided (for a answer regarding the collect package), I modified it to fit your needs:
Result: