LaTeX forum ⇒ GeneralChange chapter style in table of contents

LaTeX specific issues not fitting into one of the other forums of this category.
lampageu
Posts: 1
Joined: Thu Jan 31, 2019 3:06 pm

Change chapter style in table of contents

Postby lampageu » Thu Jan 31, 2019 3:44 pm

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[12pt, times new roman, a4paper, onecolumn, oneside, final]{report}
  2. \usepackage{tocbibind}
  3. \usepackage{tocloft}
  4. \usepackage{titletoc,tocloft}
  5.  
  6. \begin{document}
  7. \setcounter{tocdepth}{3}
  8. \tableofcontents
  9.  
  10. \addcontentsline{toc}{chapter}{Custom1}
  11. \addcontentsline{toc}{chapter}{Custom2}
  12. \addcontentsline{toc}{chapter}{Custom3}
  13.  
  14. \chapter{A}
  15. \section{bla bla}
  16. \section{bla bla}
  17.  
  18. \chapter{B}
  19. \section{bla bla}
  20.  
  21. \chapter{C}
  22. \end{document}


I get the following
Image
I want Custom1, Custom2, and Custom3 to be not bold and have dots leader. Right now, Custom1, Custom2, and Custom3 follows the style of Chapter A, B, C because I \addcontetsline Custom1, Custom2, and Custom3 as Chapter. Also the space(the blue line) between Custom1, Custom2, and Custom3 is too big, how could I make them smaller.

My attempt : If I change
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \addcontentsline{toc}{chapter}{Custom1}
  2. \addcontentsline{toc}{chapter}{Custom2}
  3. \addcontentsline{toc}{chapter}{Custom3}

to
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \addcontentsline{toc}{section}{Custom1}
  2. \addcontentsline{toc}{section}{Custom2}
  3. \addcontentsline{toc}{section}{Custom3}

I'll get the following
Image
which is close to what I want, but now Custom1, Custom2, and Custom3 got indented.

Any help appreciated.

Return to “General”

Who is online

Users browsing this forum: No registered users and 19 guests