On Wed, Sep 18, 2002 at 01:14:28AM -0400, Pierre Joyal wrote:
>I am using tex4ht for publishing html documents from latex documents
> (command htlatex)
> To get a blue chapter, I added to the preamble the following :
> \usepackage{color}
> \let\myChapter\chapter
> \renewcommand\chapter[1]{%
>   \myChaper[#1]{\protect\textcolor{blue}{#1}}%
> }
> To my surprise, Chapter 1 starts  before the table of contents.
> It includes only a star and the real chapter 1 becomes chapter 2.

This is because \chapter and \chapter* are implemented by a single macro
\chpater that checks whether the next char is *.
You can use for example the following code:

\let\mychapter=\chapter
\def\chapter{\@ifstar\starchapter\ordchapter}
\def\starchapter#1{\mychapter*{#1}}
\def\ordchapter#1{\mychapter[#1]{\color{blue}#1}}

Another alternative, is to use sectsty/titlesec *but I don't know if they
work with tex4ht). For example:

\usepackage{sectsty}
\chaptertitlefont{\color{blue}}

Reply via email to