Hi,
 
I'm using the latex-package "color" by invoking
\usepackage{color} and later calling \textcolor{yellow}{text in yellow color} etc. in my LaTeX-source.
 
I ran into some difficulties using latex2html with -html_version 4.0:
 
The css-file contained multiple definitions of the same color (really a lot - one for each call of \textcolor{}{} ).
Here is a small example:
 
#hue11672  { color: #ff0000;  }
#hue11674  { color: #ff0000;  }
#hue11676  { color: #ff0000;  }
#hue11678  { color: #ff0000;  }
#hue11692  { color: #00cc00  }
#hue11694  { color: #ffcc00;  }
#hue11696  { color: #00cc00;  }
#hue11698  { color: #ffcc00;  }
#hue11700  { color: #00cc00;  }
#hue11702  { color: #ffcc00;  }
#hue11704  { color: #ff0000;  }
Obviously each time I invoked a color, a new hue was generated.
Since I'm no Pearl programmer, I don't know how to change the color.pearl -file to avoid this behaviour.
 
The idea should be, to note in each line of the css-file the color for which the hue stands as a comment.
Then when a new \textcolor-command is found in the source during a latex2html-run, the css-file  should be checked, if this color is already coded.
This would eliminate a problem, which is arising now, when introducing a new color after a previous latex2html-run. Then quite curious coloring-effects may happen, if the existing css-file is not deleted before the new latex2html-run.
 
With the following test-file I
 
\documentclass[english,11pt]{article}
\usepackage{babel}
\usepackage{color}
\usepackage{html}
 
\begin{document}
 
Farbtest:
\textcolor{red}{red}
\textcolor{blue}{blue}
%\textcolor{green}{green}
%\textcolor{red}{red}
normaler Text
\textcolor{red}{red}
\textcolor{blue}{blue}
 
\end{document}
 
I got correct colors and these lines in the css-file:
 
DIV.navigation  {   }
#hue11  { color: #ff0000;  }
#hue13  { color: #0000ff;  }
#hue7  { color: #ff0000;  }
#hue9  { color: #0000ff;  }

Inserting the outcommented lines in the testfile and running latex2html again,
I got the same lines in the css-file !!
Together with the html-file:

<P>Farbtest:

<SPAN ID="hue7">red</SPAN>

<SPAN ID="hue9">blue</SPAN>

<SPAN ID="hue11">green</SPAN>

<SPAN ID="hue13">red</SPAN>normaler Text

<SPAN ID="hue15">red</SPAN><SPAN ID="hue17">blue</SPAN>

<P>

the result was a completely incorrect color-rendering!!!
 
 
 
Can anyone reproduce this behaviour on his machine?
Is any workaround known? (I'll have to go for hand-editing the css-file, if not.)
 
Thanks for any hints!
 
Ralf Scholl
SkillsOnline
Heidelberg
Germany
 
 

Reply via email to