how to set header font color in Latex
Is it possible to cha开发者_Python百科nge the header font color in Latex?
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:
You will then have some new commands available. For example:\usepackage{sectsty}
will give you sanserif for all sectional headings.\allsectionsfont{\sffamily}
- Here is the full manual
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
精彩评论