[l2h] Bug or glitch when using colors ?
Ralf Scholl
rasch@skillsonline.de
Thu, 19 Jul 2001 15:20:48 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_0011_01C11066.635E0820
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
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.=20
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=20
\documentclass[english,11pt]{article}
\usepackage{babel}
\usepackage{color}
\usepackage{html}
\begin{document}
Farbtest:
\textcolor{red}{red}=20
\textcolor{blue}{blue}=20
%\textcolor{green}{green}=20
%\textcolor{red}{red}
normaler Text=20
\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=3D"hue7">red</SPAN>=20
<SPAN ID=3D"hue9">blue</SPAN>=20
<SPAN ID=3D"hue11">green</SPAN>=20
<SPAN ID=3D"hue13">red</SPAN>normaler Text=20
<SPAN ID=3D"hue15">red</SPAN><SPAN ID=3D"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
------=_NextPart_000_0011_01C11066.635E0820
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I'm using the latex-package "color" by=20
invoking</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>\usepackage{color} and later =
calling</FONT><FONT=20
face=3DArial size=3D2> \textcolor{yellow}{text in yellow color} etc. in =
my=20
LaTeX-source.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I ran into some difficulties using =
latex2html with=20
-html_version 4.0:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>The css-file contained multiple =
definitions of the=20
same color (really a lot - one for each call of \textcolor{}{} =
).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Here is a small example:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>#hue11672 { color: =
#ff0000; =20
}<BR>#hue11674 { color: #ff0000; =
}<BR>#hue11676 {=20
color: #ff0000; }<BR>#hue11678 { color: #ff0000; =20
}<BR>#hue11692 { color: #00cc00 =
}<BR>#hue11694 {=20
color: #ffcc00; }<BR>#hue11696 { color: #00cc00; =20
}<BR>#hue11698 { color: #ffcc00; =
}<BR>#hue11700 {=20
color: #00cc00; }<BR>#hue11702 { color: #ffcc00; =20
}<BR>#hue11704 { color: #ff0000; }<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Obviously each time I invoked a color, =
a new hue=20
was generated.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Since I'm no Pearl programmer, I don't =
know how to=20
change the color.pearl -file to avoid this behaviour.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>The idea should be, to note in each =
line <FONT=20
face=3DArial size=3D2>of the css-file</FONT> the color for which the hue =
stands as a=20
comment.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Then when a new \textcolor-command is =
found in the=20
source during a latex2html-run, the css-file should be =
checked, if=20
this color is already coded. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>This would eliminate a problem, which =
is arising=20
now, when introducing a new color after a previous latex2html-run. Then =
quite=20
curious coloring-effects may happen, if the existing css-file is not =
deleted=20
before the new latex2html-run.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>With the following test-file I =
</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial =
size=3D2>\documentclass[english,11pt]{article}</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>\usepackage{babel}<BR>\usepackage{color}<BR>\usepackage{html}</F=
ONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>\begin{document}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Farbtest:<BR>\textcolor{red}{red}=20
<BR>\textcolor{blue}{blue} <BR>%\textcolor{green}{green}=20
<BR>%\textcolor{red}{red}<BR>normaler Text=20
<BR>\textcolor{red}{red}<BR>\textcolor{blue}{blue}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>\end{document}<BR></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I got correct colors and these lines in =
the=20
css-file:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>DIV.navigation { =
}<BR>#hue11 { color: #ff0000; }<BR>#hue13 { =
color:=20
#0000ff; }<BR>#hue7 { color: #ff0000; =20
}<BR>#hue9 { color: #0000ff; }</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><BR></FONT></FONT></DIV></DIV>
<DIV><FONT face=3DArial size=3D2>Inserting the outcommented lines in the =
testfile</FONT><FONT face=3DArial size=3D2> and running latex2html=20
again,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I got the same lines in the css-file=20
!!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Together with the =
html-file:</FONT></DIV>
<DIV><FONT size=3D2>
<P><P>Farbtest:</P>
<P><SPAN ID=3D"hue7">red</SPAN> </P>
<P><SPAN ID=3D"hue9">blue</SPAN> </P>
<P><SPAN ID=3D"hue11">green</SPAN> </P>
<P><SPAN ID=3D"hue13">red</SPAN>normaler Text </P>
<P><SPAN ID=3D"hue15">red</SPAN><SPAN=20
ID=3D"hue17">blue</SPAN></P>
<P><P></P></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>the result was a completely incorrect=20
color-rendering!!!</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Can anyone reproduce this behaviour on =
his=20
machine?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Is any workaround known? (I'll have to =
go for=20
hand-editing the css-file, if not.)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for any hints!</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Ralf Scholl</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>SkillsOnline</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Heidelberg</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Germany</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV></BODY></HTML>
------=_NextPart_000_0011_01C11066.635E0820--