Since accepting Jasper Habicht's working answer to my earlier question, I have switched from standard book
-class to KOMA-script's scrbook
. I still need to add a specific column to my ToC, and the following MWE is a book
-class solution that unfortunately no longer works for me in the KOMA-script environment:
\documentclass{book}
\usepackage[utf8]{inputenc}
\newcommand{\toclineinsert}[3][25mm]{%
\dotfill\ #2\makebox[#1][l]{#3\dotfill}%
}
\title{test}
\author{name}
\date{now}
\begin{document}
\tableofcontents
\addcontentsline{toc}{chapter}{first lecture title \toclineinsert{4 }{January}}
\addcontentsline{toc}{chapter}{second lecture title \toclineinsert{2nd half }{January}}
\addcontentsline{toc}{chapter}{third lecture title \toclineinsert{February/}{March}}
\addcontentsline{toc}{chapter}{a pretty long fourth lecture title \newline that goes over two lines \toclineinsert{29 or 30 }{March}}
\end{document}
How can achieve the same (or similar) in the scrbook
class?