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??
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
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