Customized table of contents
Here is a small example with authors at the table of contents and with first till last page.
\documentclass{scrbook}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage[ngerman]{babel}
\makeatletter
\providecommand*{\addchap}[1]{% define if, if you are not using a KOMA-Script class
\chapter*{#1}\markboth{#1}{}%
}
% document commands
\newenvironment{authorsection}[2][]{% optional arg = author; mandatory arg = title
\cleardoublepage
\addtocontents{toc}{\protect\startauthorsection{#1}{#2}{\thepage}}%
\addchap{#2}% Don't use a number
}{%
\addtocontents{toc}{\protect\finishauthorsection{\thepage}}%
}
\newcommand*{\addtocpart}[1]{% add something like a part but only start a new
% (odd) page and set up a toc-entry without page
% number
\cleardoublepage
\addtocontents{toc}{\protect\tocpart{#1}}%
}
\setcounter{tocdepth}{0}% only chapters at the table of contents
\setcounter{secnumdepth}{-1}% No chapter, section etc. numbers
% toc commands
\newcommand*{\aname}{}% needed to store author until end
\newcommand*{\stitle}{}% needed to store title until end
\newcommand*{\fpage}{}% needed to store page until end
\newcommand{\startauthorsection}[3]{% #1 = author, #2 = title, #3 = page
\def\aname{#1}%
\def\stitle{#2}%
\def\fpage{#3}%
\begingroup
\let\l@chapter\@gobbletwo% deactivate chapter entries
}
\renewcommand*{\l@chapter}{%
\addvspace{\baselineskip}%
\@dottedtocline{0}{0pt}{1.5em}% use chapter entries with dots
}%
\newcommand*{\finishauthorsection}[1]{% #1 = page
\endgroup% reactivate normal chapter entries
\l@chapter{% make a chapter entry
\normalfont% but with normal font
\ifx\aname\@empty\unskip\else\mbox{\itshape\aname}\\\fi% show the author if there's any
\stitle% show the title
}{\fpage--#1}% and the page range
}
\newcommand*{\tocpart}[1]{%
\addvspace{2\baselineskip}
\setlength{\parindent}{0pt}
\textbf{#1}\par
\smallskip
}
% neeed more space for page numbers at toc:
\renewcommand*{\@pnumwidth}{3em}
\renewcommand*{\@tocrmarg}{4em}
\makeatother
\begin{document}
\tableofcontents
\addtocpart{Zu diesem Heft}
\begin{authorsection}[Rüdiger Lux]{Vorwort}
\lipsum
\end{authorsection}
\addtocpart{Beiträge}
\begin{authorsection}[Hans Seidel]{20 Jahre Forschungsstelle Judentum 1988--2008}
\lipsum
\end{authorsection}
\begin{authorsection}[Harald Samuel]{Leipzig -- Jerusalem -- Rom\protect\\
Mit Hebräisch spielend unterwegs}
\lipsum
\section{Überschrift innerhalb der Geschichte}
\lipsum
\end{authorsection}
\end{document}
I've used a KOMA-Script class, because AFAIK most Germans like to use them. But you may replace it by a standard class. While you've commented, that you are using \chapter
, I'm using a book class. You may change this into a report class. But if you change it into a article class, you have to replace e.g. \addchap
by \addsec
, \chapter*
by \section*
, \section
by \subsection
, \l@chapter
by \l@section
.
If you are interested in changing the ToC, you might be interested in the titletoc
package. You can add arbitrary content (like "Beiträge") to the ToC by \addtocontents{toc}{ <something> }
, e.g.
\addtocontents{toc}{\bigskip \textbf{Beiträge} \par \smallskip }
. Whole entries can be added with
\addcontentsline{toc}{chapter}{Beitr{\"{a}}ge}
(where chapter
is the according level, others would be e.g. part
or section
).
\dotfill \pageref{ first page of chapter label } -- \pageref{ last page of chapter label }
(where there is a label placed at the first and another one at the end of each chapter) would create the "...... 7-12" part of the entries in case you create everything by \addcontentsline
, but probably you want a package automatically doing it (sorry, I do not know of any one doing this).