Graphics, Figures & TablesColor of Table of Content

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Creck
Posts: 3
Joined: Wed Nov 07, 2012 11:51 pm

Color of Table of Content

Post by Creck »

Hi, as I am fairly new to LaTeX at all, would like to ask you how to change color of table of content. The problem is that it sets automatically red and dunno how to change it :/. Thanks in advance

Creck

Recommended reading 2024:

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

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

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

Color of Table of Content

Post by Stefan Kottwitz »

Hi Creck,

welcome to the board!

The default is black color. So you have a setting which causes red color. We could see that if you would post your preamble. I guess it's red because TOC entries are hyperlinks to the sections in the text if you use the hyperref package. So disable hyperlinking in the TOC or change the hyperlink color. Both is described in the hyperref manual.

Stefan
LaTeX.org admin
Creck
Posts: 3
Joined: Wed Nov 07, 2012 11:51 pm

Color of Table of Content

Post by Creck »

Thanks for reply,

the problem is that I gotta use http package, because of adding an email link at the title page, btw here is the code ...

Code: Select all

\documentclass[12pt, a4paper]{article}

%Lang & fonts
\usepackage[slovak]{babel}
\usepackage[utf8]{inputenc}

%Http
\usepackage[bookmarksopen,colorlinks,plainpages=false,urlcolor=blue,unicode]{hyperref}
\usepackage{url}
%Images
\usepackage[dvipdf]{graphicx}
%Page settings
\usepackage[top=3.5cm, left=2.5cm, text={17cm, 24cm}, ignorefoot]{geometry}


\begin{document}

\input{./title.tex}

% Content
\tableofcontents
\pagenumbering{roman}
\setcounter{page}{0}
\newpage

\pagenumbering{arabic}
\setcounter{page}{1}
\section{Section1}
\subsection{Subsection}
\section{Section 2}

\end{document}
I've copied most of the packages from the sample form of my project, as I have no idea which of them should be attached....
Creck
Posts: 3
Joined: Wed Nov 07, 2012 11:51 pm

Color of Table of Content

Post by Creck »

Well, I have fixed it adding "colorlinks=black" into \usepackage[]{hyperref}, thanks anyway.

Creck
Last edited by cgnieder on Fri Nov 09, 2012 11:53 am, edited 1 time in total.
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Color of Table of Content

Post by svend_tveskaeg »

@Creck: See this post for my settings when using hyperref. It is a setup that I find aestheticly pleasing.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Color of Table of Content

Post by localghost »

Creck wrote:Well, I have fixed it adding "colorlinks=black" into \usepackage[]{hyperref}, thanks anyway.[…]
Just use the option hidelinks.


Thorsten
Post Reply