0

I want to change the color of a single section, and that color must not be changed in Table of Contents.

\subsubsection{{\color{red} Embedded Design}}

This is the code I used, but the color will automatically changed in Content. Please Help.

Best Regards.

  • You're asking just for the section title, right? Not the whole section – sheß May 20 '16 at 8:02
4
\subsubsection[Embedded Design]{{\color{red} Embedded Design}}

The part in the square brackets, defines the optional title of a *section that will be shown in the toc

  • Exactly what I wanted to achieve. Thank you! – Haris May 30 '16 at 8:57
  • Great. Why don't you use the checkmark then, this will mark this answer as answering your question – sheß May 30 '16 at 9:05
4

I wouldn't do it, but ... you asked for it.

harisSectionColored

\documentclass{article}
\usepackage{xcolor}
\begin{document}
\tableofcontents
\section{Wombat}
{\color{blue!50!black}
\section{Capybara}
}
\section{Mara}
\end{document}
1

You can use following code in preamble to change color of links according to your choice.Use black instead of red if you want links in toc to appear black.

\hypersetup{
colorlinks,
linkcolor={red!100!black},
citecolor={blue!100!black},
urlcolor={green!100!black}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.