I want to include the author name before the chapter title. I am using the following:

\usepackage{lipsum}% just to generate some text




\chapter{Test chapter one}
\chapaut{The name of the first author, The name of second author and The name of the third author}

\chapter{Test chapter two}
\chapaut{The First author and The second author}


I want to change chapter with chapaut, so it will look like:

enter image description here

Also, in the table of contents:

enter image description here

  • drives me nuts, not sure want you mean. Can you please show me a code example – mvp285286 May 29 '16 at 7:18
  • Is the problem resolved? – Runar May 29 '16 at 20:51
  • thank you for your example. But my problem isn't solved yet. Your code is good, but very complex :-) Is it possible to change my code, I just want to change the chapter with the author name like the img above – mvp285286 May 30 '16 at 14:30
  • I simplified the code, removed some unused packages and some other code, and added a lot of comments to make sense of the code. Does it help? – Runar May 30 '16 at 20:55
  • awesome! thx, it works fine – mvp285286 May 31 '16 at 9:49

if I understand you correctly, you want to achieve two things:

In the Tabel of Contents, you would like the author(s) of that chapter to be listed before the title of the chapter.

When the chapter is printed, you would also here, like to have the author(s) before the chapter title.

I think this might help, but I do believe there is a better way to do it, than this, especially for the ToC.

One other way to print the authors on top of the chaptertitle in the text, might be to change the definition of \chapter, but sometimes changing the definition of certain commands might have unforeseen sideeffects, so only do that if you know what you are doing. This question might be of interest: Start new chapter on same page.

EDIT: Really long chaptertitles, spanning multiple lines in the toc, will now be indentet on every line, instead of only the first.

\usepackage{lipsum}% just to generate some text

% This part changes how chapters are displayed in the Table of COntents
  [0pt]% Left margin, optional
  {}% Code insertet above
  {\bfseries}% Numbered-entryformat
  {\bfseries}% Numberless-format
  {\contentspage\vskip1.5ex} %Below code, here: add dotfill and pagenumber for entry, and some vertical space between entries

% Custom command to keep the author on the same page of chaptertitle, and above it.  
 % Takes the following input
 % #1: Author
 % #2: Chaptertitle
    % Minipage to keep the author and chaptertitle on same page
        % Set the author style
        % Bring the chaptertitle a bit closer to the authrotitle
        % Add an entry to the Table of Contents, with the name of the author in italics and the chapter title
        \addcontentsline{toc}{chapter}{{\normalfont\itshape #1}\vspace{1ex}\newline%
        %To make long chapter titles spanning multiple lines indent on each line, a \parbox is created. This is siimply a box holding a wrapped paragraph at a certain length. Also, we need to move the dotfill here.
        \hspace*{1em}\protect{\parbox[b]{\textwidth}{#2 \dotfill}}}
        % Print the chapter



\chapterAndAuthor{The name of the first author, The name of second author and The name of the third author}{Test Chapter One is really long, and I wouldn't really bother to read it as I am falling asleep}


\chapterAndAuthor{John Doe}{Test Chapter Two}


enter image description here Chapter title

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.