views:

21

answers:

2

Is it possible to change the header font color in Latex?

+1  A: 

You could have a look at the sectsty package.

The secsty package provides a set of commands for changing the fount 1 used for the various sectional headings in the standard LATEX 2ε document classes

From the manual:

Make sure you include the package in your document by saying in your document preamble:

\usepackage{sectsty}
You will then have some new commands available. For example:
\allsectionsfont{\sffamily}
will give you sanserif for all sectional headings.
 

aioobe
When I enter \usepackage{sectsty} I get an error: File 'scetsty.sty' not found. Is there a place where I can download this package?
Sigurd Holsen
Yes, at CTAN: http://www.ctan.org/tex-archive/macros/latex/contrib/sectsty/ Here is a description of how to install new packages: http://www.inf.ed.ac.uk/systems/tex/new-packages.html
aioobe
A: 

If you want to change the section heading's font color all at once, then you need to re-define the startsection command.

The following link has a detailed description of customizing sectiong headings' font color, Title and Section Headings

I have copy pasted the relevant code that needs to be inserted into the preamble,

\renewcommand\section{%
\@startsection{section}{1}{\z@}%
              {-3.5ex \@plus -1ex \@minus -.2ex}%
              {2.3ex \@plus.2ex}%
              {\color{RoyalBlue}\sffamily\Large\bfseries}}
\renewcommand\subsection{%
\@startsection{subsection}{2}{\z@}%
              {-3.25ex\@plus -1ex \@minus -.2ex}%
              {1.5ex \@plus .2ex}%
              {\color{RoyalBlue}\sffamily\large\bfseries}}

Also, you must remember to import the color package

\usepackage{color}

Here is the link for more information on colors, Color Info

nEm