This is a question about getting colors with tex4ht. The issue was discussed e.g. here, where a suggestion was made, which however I can't get to work. I asked a comment there and it was suggested to make a new question, so here it goes:
Can you give a working example of a config file with a working syntax for \Configure{HColor}{colorname}{csscode}
, I can't get it to translate \textcolor{red}{blah}
properly.
More precisely, if I have:
\documentclass[12pt]{article}
\usepackage[latin9]{inputenc}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[unicode=true]
{hyperref}
\usepackage{breakurl}
\usepackage{xcolor}
\usepackage[english]{babel}
\begin{document}
\paragraph{\textcolor{red}{WARNING}}
\end{document}
and I compile with tex4ht I get
<?xml version="1.0" encoding="iso-8859-1" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!--http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd--> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)" /> <meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)" /> <!-- html,xhtml,-css,NoFonts --> <meta name="src" content="post2.tex" /> <meta name="date" content="2017-09-07 08:56:00" /> </head>
<body > <p style="text-align:justify"><span class="paragraphHead"><a id="x1-1000"></a><span id="textcolor1">WARNING</span></span> </p> </body></html>
which does not look red on a browser. Note the command
<span id="textcolor1">WARNING</span></span>
My htlatex options are xhtml,-css,NoFonts
css
file with the-css
option.