tags:

views:

75

answers:

4

How can I change the \section{} style? Especially I want to change the color of section heading.

I happen to find some neat style following Edward R. Tufte (http://code.google.com/p/tufte-latex/), and I'm trying to find a way to modify the section color.

Added

color package works fine, but the thing is that the color chapter number is not changed.

\section{\color{Red}ELPA}

+1  A: 

Have you tried using the color package?

\usepackage[usenames, dvipsnames]{color}

\section{\color{Red} Section Header}

You can also define your own colors:

\usepackage[usenames, dvipsnames]{color}
\definecolor{MetallicGold}{RGB}{212, 175, 55}

\section{\color{MetallicGold} Section Header}

You can define a command to make it simplier to type:

\usepackage[usenames, dvipsnames]{color}
\definecolor{MetallicGold}{RGB}{212, 175, 55}
\newcommand{\coloredsection}[2]{\section{\color{#1} #2} }

\coloredsection{MetallicGold}{Section Header}
In silico
@In silico : It seems to work, but the section number is not changed.
prosseek
A: 
\usepackage{sectsty}
%\allsectionsfont{\color{blue}\itshape\underline}
\sectionfont{\color{blue}\itshape\selectfont}
\subsectionfont{\color{green}\itshape\selectfont}

I could change color using sectsty style.

prosseek
A: 

You could use the titlesec package and its \titleformat command.

Stefan
+1  A: 

Use package titlesec.

Put this in the LaTeX header (before \begin{document})

\usepackage{titlesec}

\titleformat{\section}
{\color{red}\normalfont\Large\bfseries}
{\color{red}\thesection}{1em}{}

Example

\section{Section}

would show as

alt text

Cloudanger