Às 12:02 de 22/12/2018, Jose Ramom Flores das Seixas escreveu:

I am sending a minimal not working example.

Às 21:57 de 21/12/2018, Richard Kimberly Heck escreveu:
On 12/21/18 8:17 AM, Jose Ramom Flores das Seixas wrote:
Hi:

I'm editing a book written by different authors, each chapter one or several authors. I would like to include the name of the authors of each chapter in the ToC, and *also in the headers*.

To include the name of the chapter authors in the Toc, I have follow a method explained in  StackExchange:

https://tex.stackexchange.com/questions/156862/displaying-author-for-each-chapter-in-book?newreg=cc7bd951630649d0af0686b5a3446973

I tried to expand the method, including the following code in the Latex Preamble, but it doesn't work.

Any idea of how to include the authors of the chapters in the TOC and in the header?

There are so many things that could be going wrong. I'd suggest creating a simple test document that includes this code and tries to do what you want to do. Then we can maybe diagnose the problem.

Riki

I have obtained an answer in tex.stackechange.com.  In case anyone is interested, the solution is as follows:

\newcommand\thechapterauthor[1]{}

\newcommand\chapterauthor[1]{\authortoc{#1}\printchapterauthor{#1}}

\makeatletter

\newcommand{\printchapterauthor}[1]{%

  {\parindent0pt\vspace*{-25pt}%

  \linespread{1.1}\large\scshape#1%

  \par\nobreak\vspace*{35pt}}

  \@afterheading%

}

\newcommand{\authortoc}[1]{%

  \addtocontents{toc}{\vskip-10pt}%

  \addtocontents{toc}{%

    \protect\contentsline{chapter}%

    {\hskip1.3em\mdseries\scshape\protect\scriptsize#1}{}{}}

  \addtocontents{toc}{\vskip5pt}%

}

\makeatother

\fancyhf{}

\fancyhead[LE,RO]{\thepage}

\fancyhead[LO]{\textbf{\leftmark}}

\fancyhead[RE]{\thechapterauthor}

Reply via email to