This is the kind of layout that might occur in a compilation, front page of a journal, magazine, or a book with each author having a separate entry or article.
I'm trying to generate a table of contents with sequence author, page number, title on one line (more lines if the title is really long). The toc would look like this (no dashes):
author —– page# —— article title
Jane doe — 11 ——— Spectral wavelength defoliation from planet x
(author might possibly have firstname lastname as separate fields)
I cobbled together a non-working sample based on a solution that has the page number on the left, followed by article title with author below the title (by F.Mittelbach). Starting from that solution, I've been unsccessful with generating the layout (author, page, title). In addition, I can't access the author or institution name (i.e. use it in the text if I wanted to).
I've tried many variations of the “basic code'', but still no success. I hope someone can suggest what I'm missing or not understaning — would be very helpful. A mwe is included.
\documentclass{book}
\usepackage{titletoc}
\newcommand\tocauthor[1]{\\\textmd{#1}}
\newcommand\tocinstitution[1]{}
\newcommand\newpaper[3]{%
\clearpage
\chapter*{#1}%
\addcontentsline{toc}{chapter}{#1\tocauthor{#2}\tocinstitution{#3}}
\textbf{#2}\\
\textit{#3}\par
\vspace{5mm}%
}
% FM's code works: page#,title\\ author -- but not quite what I want
%\titlecontents{chapter}[3pc] % type, left indent
% {\addvspace{1.4pc}\bfseries}% above code
% {} % numbered entry format
% {{\hspace*{-3pc}\makebox[3pc] % numberless entry format
% {\thecontentspage. \hfil}}}
% {} % page format
% [\addvspace{.2pc}] % below code
% one of the many variations tried, compiles, but incorrect display
\titlecontents{chapter}[0pt]% type,left indent
{\addvspace{1.4pc}\bfseries} % above code
{\contentslabel[\tocauthor]{\Huge\thecontentspage\quad}}% numbered entry format
{} % numberless entry format
{} % page format
% [ ]% below code
\setcounter{tocdepth}{0}
\begin{document}
\tableofcontents
\newpaper{Title of the first paper}{Jane Doe}{Institution}
The author is \tocauthor from nsf.
\newpaper{The second paper}{Fred Smith}{Round Yonder}
Ever been to \tocinstitution by the bay?
\end{document}
Best Answer
Below I've created a ToC-like
\tableofauthors
from scratch without any packages:It can be expanded to accommodate a first/last name provision for the author, if needed.