[tex4ht-commits] [SCM] tex4ht updated: r596 - trunk/lit

michal_h21 at gnu.org.ua michal_h21 at gnu.org.ua
Sat Aug 31 22:45:49 CEST 2019


Author: michal_h21
Date: 2019-08-31 23:45:48 +0300 (Sat, 31 Aug 2019)
New Revision: 596

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-4ht.tex
   trunk/lit/tex4ht-html4.tex
Log:
Fix for the \definecolor support

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2019-08-30 11:38:33 UTC (rev 595)
+++ trunk/lit/ChangeLog	2019-08-31 20:45:48 UTC (rev 596)
@@ -1,3 +1,9 @@
+2019-08-31 Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-html4.tex (html4.4ht),
+	tex4ht-4ht.tex (color.4ht): fix for colors defined with spaces. Like
+	\definecolor{sample}{rgb}{0.2, 0.2, 0.2}
+
 2019-08-30 Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-html4.tex (html4.4ht): added non breaking space to remove

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2019-08-30 11:38:33 UTC (rev 595)
+++ trunk/lit/tex4ht-4ht.tex	2019-08-31 20:45:48 UTC (rev 596)
@@ -25545,7 +25545,7 @@
      \let\HColor=\relax
      |<color from def|>%
   \else
-     \csname HColor:#1\endcsname #2//%
+     \csname HColor:#1\endcsname #2 //%
   \fi
 }
 \def\c:HColor:gray:{\def\HColor:gray##1 ##2//}

Modified: trunk/lit/tex4ht-html4.tex
===================================================================
--- trunk/lit/tex4ht-html4.tex	2019-08-30 11:38:33 UTC (rev 595)
+++ trunk/lit/tex4ht-html4.tex	2019-08-31 20:45:48 UTC (rev 596)
@@ -15725,24 +15725,40 @@
 %   {\Configure{color}
 %       {\Configure{SetHColor}{\Css{body {background-color:\HColor}}}}}
 
+Configurations for saving colors to CSS. When the color declaration specified
+by the user contains spaces, the parameter for the last color is empty and 
+we may get compilation errors. This is why it is necessary to test the 
+argument for content. If it is empty, then the next argument contains the 
+actual color.
 
-
 \<configure html4 color\><<<
 \Configure{HColor:gray}{%
+  \if :#1:%
+   \int:of\:tempa{255}{#2}%
+  \else%
    \int:of\:tempa{255}{#1}%
+  \fi%
    \Configure{HColor}{}{rgb(\:tempa,\:tempa,\:tempa)}%
 }
 \Configure{HColor:rgb}{%
    \int:of\:tempa{255}{#1}%
    \int:of\:tempb{255}{#2}%
+   \if :#3:
+   \int:of\:tempc{255}{#4}%
+   \else%
    \int:of\:tempc{255}{#3}%
+   \fi%
    \Configure{HColor}{}{rgb(\:tempa,\:tempb,\:tempc)}%
 }
 \Configure{HColor:cmyk}{%
    \int:of\:Cyan{255}{#1}%
    \int:of\:Magenta{255}{#2}%
    \int:of\:Yellow{255}{#3}%
+   \if :#4:%
+   \int:of\:Black{255}{#5}%
+   \else%
    \int:of\:Black{255}{#4}%
+   \fi%
    \:cmyk\:tempa\:Cyan
    \:cmyk\:tempb\:Magenta
    \:cmyk\:tempc\:Yellow



More information about the tex4ht-commits mailing list