GeneralColoring Table of Contents Title

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
User avatar
tripwire45
Posts: 129
Joined: Thu Apr 10, 2008 4:35 am

Coloring Table of Contents Title

Post by tripwire45 »

Using \usepackage{titlesec}, I can change the color of sections and subsections so they are all the same, but the title of the Table of Contents ("Contents") remains black text. I suspect that using \usepackage{titletoc} will enable me to change its color so it matches the section titles, but in my research, I can't find anything this specific. my documentclass is book, if that makes any difference. Thanks.

-Trip

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Coloring Table of Contents Title

Post by Stefan Kottwitz »

Hi Trip,

try changing the chapter style, Contents should be printed by \chapter*, not \section*.

Stefan
LaTeX.org admin
User avatar
tripwire45
Posts: 129
Joined: Thu Apr 10, 2008 4:35 am

Re: Coloring Table of Contents Title

Post by tripwire45 »

Thanks. Of course, I was making heavy use of subsections and subsubsections, so I had to make some changes throughout the document to get things to work out. It did the trick, though. Thanks.
Post Reply