0

I am trying to add some text in my table of contents a la this question. I am already using titlesec, so the titlecontents command from the titletoc package seems to fit the bill. However, I am not sure how to only edit the bits that I need. Specifically, the example in the linked question:

\titlecontents{chapter}% <section-type>
  [0pt]% <left>
  {}% <above-code>
  {\bfseries\chaptername\ \thecontentslabel:\quad}% <numbered-entry-format>
  {\bfseries}% <numberless-entry-format>
  {\bfseries\hfill\contentspage}% <filler-page-format>

Changes a great deal about the formatting. It seems that many of these arguments are mandatory, and I'm not sure how to obtain the defaults. Specifically, I would like to only change the second mandatory argument (to get the \chaptername in the entry), but would not like to change any of the other behavior (the last argument, for example, gets rid of the line of dots).

What are the defaults for the \titlecontents{chapter}?

Him
  • 169
  • 1
  • 8
  • Usually, there's no line of dots for chapters – only for sections. Which document class do you use? – Bernard Mar 17 '20 at 20:08
  • I am using a variant of the puthesis class from here – Him Mar 17 '20 at 20:14
  • If I do not include the above hunk of code, then I get dots for chapters as well. That is the desired behavior. – Him Mar 17 '20 at 20:14
  • It is due to this line in the cls file: \renewcommand{\cftchapleader}{\cftdotfill{\cftsecdotsep}} – Him Mar 17 '20 at 20:15
  • 1
    These commands come from tocloft . You shouldn't use packages which tackle the same things. It's preferable to use the tools from tocloft. See p.11 of the documenntation of the latter package on how to add something in the number box – Bernard Mar 17 '20 at 20:24

0 Answers0