On 11/09/10 10:03, Grahame Blackwood wrote:
Hi LyXers

I would like to have coloured section and subsection headings for a
document I am producing. I've tried the following document settings code
from Uwe Stohr's reply (11March10) to a similar request and it works
fine for numbered sections/subsections.

My question is, how do I adapt it for the starred version, ie no
section/subsection numbering? The colours are, at the moment, arbitrary.

\...@ifundefined{textcolor}
{\usepackage{color}}{}
% color the text of subsections green
\let\mySection\section
\renewcommand{\section}[1]{%
\mySection{\textcolor{green}{#1}}
}

% color the text of subsections blue
\let\mySubsection\subsection
\renewcommand{\subsection}[1]{%
\mySubsection{\textcolor{blue}{#1}}
}

Cheers

G


Hi All

Solved it.

I left the section headings unstarred in the text of the document and
then in Document settings, Numbering and TOC menu, turned off the
numbering using the slider bar.

Thanks for the code Uwe.

Cheers

G

Reply via email to