I want to have a document with the following preconditions:
sections in separate files ->
\include{}
chapters and sections are unnumbered -> using
\addchap{}
and\addsec{}
chapter headings should only appear in tableofcontents
For the not appearing chapter headings I adopted and modified a brilliant solution by user egreg:
Removing any one of the preconditions gives a sensible table of contents. All three make a mess. It's like a reverse borromean ring. My main document looks something like this:
\documentclass[english, a4paper, 12pt]{scrbook}
\usepackage[english]{babel}
\usepackage{blindtext}
\begin{document}
\makeatletter
\newcommand\nochap[1]{%
\begingroup
\let\@makeschapterhead\@gobble % make \@makechapterhead do nothing
\addchap{#1}
\endgroup
}
\makeatother
\tableofcontents
\nochap{That'n'those}
\include{alottatext}
\include{alottamoretext}
\end{document}
with alottatext looking like:
\addsec{alottatext}
\blindtext
With this option the table of contents looks like:
alottatext
That'n'Those
alottamoretext
whereas the expected result would've been:
That'n'Those
alottatext
alottamoretext
So it always moves the Chapter one position down. hyperref
would still work right.
I know it's quite a puzzle but maybe anyone can help getting the order right.