General ⇒ Colored headline should show as black in table of contents
Colored headline should show as black in table of contents
I'm setting up a report in LaTex at the moment, and in order to make it more appealing, I've made the headlnes another color than black. But, the headline is also this color in the table of contents, so I was wondering if it is possible to have it appear black in the table of contents?
It could be because of the way I have defined the color. I don't know.
I have used the \textcolor on the headline. But there must be another way. A way that can define all headlines to be a specific color. How can I do this??
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
Colored headline should show as black in table of contents
Sapientum wrote: Hi,
I'm setting up a report in LaTex at the moment, and in order to make it more appealing, I've made the headlnes another color than black. But, the headline is also this color in the table of contents, so I was wondering if it is possible to have it appear black in the table of contents?
One possibility is to use the optional argument of the sectioning commands, as the following example suggests:
Code: Select all
\documentclass{report}
\usepackage{xcolor}
\begin{document}
\tableofcontents
\chapter[First chapter]{\textcolor{blue}{First chapter}}
\end{document}
Re: Colored headline should show as black in table of contents
Regards,
B.A.
Re: Colored headline should show as black in table of contents

Thanks for the quick answers