# Add author's name automatically while building ToC

I, along with a few others, am writing a project report, where different subsections have been authored by different people. When I build the table of contents using the \tableofcontents tag, it would be really helpful if the subsection named could bear with them the name of the authors in tiny letters. Is this possible? We are using the documentclass article.

-

You could define a command for this purpose, making use of the optional argument of the sectioning commands. In the example below \autsection has two mandatory arguments: the first one for the section title and the second one for the authors (of course, make the format adjustments that best suit your needs):

\documentclass{article}

\newcommand\autsection[2]{%
\section[#1~/ {\normalfont\small\itshape#2}]{#1}}

\begin{document}

\tableofcontents

\autsection{Strategies against widows}{Paul Isamber}

\autsection{The exact placement of superscripts and subscripts}{Joseph Wright and Timothy Hall}

\end{document}


-