1

I am working on a Table of Contents that was typeset in LaTeX (I didn't do it manually). The TOC is created using the titletoc package. Here is the current code of importance:

\documentclass{easychair}
\titlerunning{ICMI Study 25}
\authorrunning{Table of Contents}
\usepackage{titletoc}
\titlecontents{subsubsection}[2pt]{\addvspace{10pt}\bfseries\titlerule[0.5pt]\filright}{}{}{}[]
\titlecontents{section}[0pt]{\addvspace{5pt}\filright}{}{}{\dotfill\contentspage}[]
\titlecontents{subsection}[10pt]{\addvspace{1pt}\itshape\filright}{}{}{}[]
\newcommand{\tocSection}[1]{\contentsline{subsubsection}{#1\\*\titlerule[0.5pt]\vspace{-9pt plus 2pt minus 2pt}}{}{}\nopagebreak[4]}
\newcommand{\tocTitle}[2]{\contentsline{section}{#1}{#2}{}\nopagebreak[4]}
\newcommand{\tocAuthors}[1]{\contentsline{subsection}{#1}{}{}}
\begin{document}
\begin{center}
\section*{Table of Contents}
\end{center}
\subsection*{Plenary Lectures}
  \tocTitle{First Paper}{1}
  \tocAuthors{Jane Doe}
  \tocTitle{Second Paper}{12}
  \tocAuthors{John Smith}
\end{document}

This formats to where the first page of the first paper get assigned page #1. However, I would like the subsections to also be assigned a single page number, making Jane Doe's Paper start at page 2. I've read the documentation for the package and can't quite figure out how to make this happen.

Here's what it looks like now, but I'd like the Plenary Lectures to be on Page 1, and then Jane's paper to start on Page 2: Current Compile

I think part of my problem is that I don't understand the arguments here:

\newcommand{\tocTitle}[2]{\contentsline{section}{#1}{#2}{}\nopagebreak[4]}
\newcommand{\tocAuthors}[1]{\contentsline{subsection}{#1}{}{}}

I also am not sure what the {1} after {First Paper} is referencing, but it has to be (I think) the length of the PDF paper that is its referent.

 \tocTitle{First Paper}{1}
  \tocAuthors{Jane Doe}

Thank you!

  • 1
    Thank you! I had documentclass, but somehow it didn't show up in the post. Hit enter and it's there now. I just added the \end{document} line. Thanks for the help! – R_is_Broken Dec 27 '19 at 02:40
  • Where can we find the document class easychair.cls? – Werner Dec 27 '19 at 03:16
  • Here. It's part of the file I inherited, but you can download it at this link: https://easychair.org/publications/for_authors – R_is_Broken Dec 27 '19 at 03:25
  • It's not entirely clear what you're after here... you haven't used \tableofcontents at all, yet you're printing a contents via a number of \contentslines. Can you update your code and show what it would look like with more content? Something that represents a minimal example that replicates your current setup. – Werner Dec 27 '19 at 05:04
  • I didn't write this code. The program generates it. This is all the code is, and it works. I just can't decide how. There are just a lot more rows of \tocTitle and \tocAuthors (one each for about 100 papers), then the \end{document} line. I added a second example. That's it. Period. I think understanding easychair.cls is important, but I can't figure out the arguments laid out for the \tocTitle \ tocAuthors, etc. – R_is_Broken Dec 27 '19 at 05:20
  • Tried to add more context in original post. There isn't any important code that I'm leaving out. Just repetitions of \tocTitle and \tocAuthors. – R_is_Broken Dec 27 '19 at 05:34
  • You can easily start Jane's paper on page 2 via \tocTitle{First paper}{2}. The Plenary Lectures though, being a \subsection is not set as a \contentline. You could try with \newcommand{\subsectionheading}[2]{\subsection*{#1\hfill #2}} and then \subsectionheading{Plenary Lectures}{2}. – Werner Dec 27 '19 at 06:02
  • Hi. Thanks for the help. That did not work, though. – R_is_Broken Dec 27 '19 at 18:52
  • It worked for me... this is what I get as the output showing a page number for the \subsection and the first paper starting on page 2. Perhaps you can explain in more detail why "that did not work." Can you? – Werner Dec 27 '19 at 19:09
  • This is what I get. – R_is_Broken Dec 28 '19 at 01:19
  • Did you add \newcommand{\subsectionheading}[2]{\subsection*{#1\hfill #2}} to your preamble and then use \subsectionheading{Plenary Lectures}{1} instead of just \subsection*{Plenary Lectures}{1}? – Werner Dec 28 '19 at 02:22
  • Yes. I did. I'm not sure why we get different results. – R_is_Broken Dec 28 '19 at 02:30

0 Answers0