1

enter image description hereHow can I get the author to go first in the TOC (within the scrbook-class - I did find solutions that seem to work with other classes...), while not changing anything about the headings etc., which work fine? There is probably an easy solution, but I don't see it! Thanks for your help!

Here is my minimal example:

\documentclass[paper=A4, 10pt, headings=small, toc=index, listof, toc=flat]{scrbook}
\usepackage[papersize={17.0cm, 24cm},left=2.2cm, right=2.8cm, top=2.6cm, bottom=0.8cm, includefoot]{geometry}
\usepackage{fontspec}
\usepackage[utf8]{luainputenc}
\setmainfont[Ligatures=TeX]{texgyrepagella-regular.otf}[BoldFont = texgyrepagella-bold.otf , ItalicFont = texgyrepagella-italic.otf , BoldItalicFont = texgyrepagella-bolditalic.otf ]
\setkomafont{disposition}{\normalcolor\bfseries\centering}
\setkomafont{sectioning}{\rmfamily\normalfont\bfseries}
\setkomafont{pagehead}{\rmfamily\scshape\small}
\addtokomafont{chapterentry}{\normalfont}

\usepackage[greek,ngerman]{babel} \usepackage{luatex85} \usepackage{tocbasic} \usepackage{blindtext} \usepackage{textcomp} \linespread{1.1} %%%%%%%%%%%%%% \usepackage{suffix} \newcommand{\chapterauthor}[1]{\authortoc{#1}\printchapterauthor{#1}\markright{#1}}% setting \markright to author

\usepackage{scrlayer-scrpage} \clearpairofpagestyles \renewcommand{\chaptermarkformat}{} \cohead{\small{\leftmark}} \cehead{\small{\rightmark}} \cfoot*{\pagemark}

\makeatletter \newcommand{\printchapterauthor}[1]{% {\centering\vspace{10pt}% \linespread{1.1}\large\scshape#1% \par\nobreak\vspace{30pt}} @afterheading% } \newcommand{\authortoc}[1]{% \addtocontents{toc}{\vskip-10pt}% \addtocontents{toc}{% \protect\contentsline{chapter}% {\mdseries\scshape\protect\normalsize#1}{}{}} \addtocontents{toc}{\vskip5pt}% } \makeatother

\begin{document} \tableofcontents \addchap{\centering Überlegungen zu allem Möglichen} \chapterauthor{Mirijam Mustermann} \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext \addchap{\centering Fiktion und Fakten} \chapterauthor{Eva Mustermann} \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext \end{document}

  • Your code seems needlessly convoluted in places. Why use \addchap instead of simply \chapter, e.g.? Also, perhaps you can show us the result you're ultimately looking for? – Ingmar Jul 14 '22 at 13:55
  • The answer to why I use \addchap instead of \chapter is in scrguide p. 113. I don't know, how I would show you the result, because I am not getting the result I want: I would like the author to go before the title of the chapter in the TOC, which it doesn't, and I don't know why. – Eberlinin Jul 18 '22 at 08:00
  • The answers to this question I have found so far, are all for the class memoir, while I use scrbook. – Eberlinin Jul 18 '22 at 08:04
  • I still can't quite picture what exactly you're trying to achieve. Can you add a mock-up? Fake the TOC in Word if you have to, but please show us an image of your desired result. – Ingmar Jul 18 '22 at 09:03
  • I just added, how the TOC looks like right now. I would like the chapterauthor to go before the title of the chapter. Thanks for helping me! – Eberlinin Jul 21 '22 at 13:25
  • At the same time I want the chapterauthor after the title during the book. Title and author should be centered. I realize that my solution is not great and my affect the TOC. – Eberlinin Jul 21 '22 at 13:43
  • https://tex.stackexchange.com/questions/175942/authors-in-the-table-of-contents – Susanne Hoffmann Jul 30 '22 at 18:20
  • Thanks, but unfortunately, it is the same: the author is still after the title in the toc, while she/he is not printed any more after the title of each chapter in the book and it has disappeared from the headings on each page, for which usepackage scrlayer-scrpage worked fine...... – Eberlinin Aug 02 '22 at 15:29
  • Still looking for a solution.... – Eberlinin Nov 17 '22 at 10:54

0 Answers0