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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Fri Apr 29 17:04:45 CEST 2022


Author: michal_h21
Date: 2022-04-29 15:04:44 +0000 (Fri, 29 Apr 2022)
New Revision: 1124

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-4ht.tex
   trunk/lit/tex4ht-html4.tex
Log:
moved multicol code from multicol.4ht to html4.4ht

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2022-04-29 14:10:43 UTC (rev 1123)
+++ trunk/lit/ChangeLog	2022-04-29 15:04:44 UTC (rev 1124)
@@ -1,5 +1,8 @@
 2022-04-29  Michal Hoftich  <michal.h21 at gmail.com>
 
+	* tex4ht-4ht.tex (multicol.4ht),
+	* tex4ht-html4.tex (html4.4ht): moved HTML code for Multicol to
+	from multicol.4ht to html4.4ht. Fixed minor CSS issues.
 	* tex4ht-4ht.tex (enumitem.4ht): execute code stored in the "after"
 	key after closing commands for the environment.
 	* tex4ht-html4.tex (html4.4ht): vertically align enumitem numers and

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2022-04-29 14:10:43 UTC (rev 1123)
+++ trunk/lit/tex4ht-4ht.tex	2022-04-29 15:04:44 UTC (rev 1124)
@@ -32635,7 +32635,7 @@
 
 \def\columnrulecolor{\a:columnrulecolor}
 \NewConfigure{columnrulecolor}{1}
-\Configure{columnrulecolor}{\#555;}
+\Configure{columnrulecolor}{\#555}
 
 % legal color
 
@@ -32686,37 +32686,19 @@
 \NewConfigure{multicols}{1}
 \Configure{multicols}{columns}
 
-\def\:wr:mcol:css{%
-        \Css{.\a:multicols-\mcolnum\space p:first-child { margin-top: 0em; }}%
-        \Css{.\a:multicols-\mcolnum {%
-           -moz-column-count:\mcolnum; 
-           -webkit-column-count:\mcolnum;
-           column-count:\mcolnum;
-           -moz-column-gap: \a:columngap;
-           -webkit-column-gap: \a:columngap; 
-           column-gap: \a:columngap;
-           -moz-column-rule-width: \a:columnrulewidth; 
-           -webkit-column-rule-width: \a:columnrulewidth; 
-           column-rule-rule-width: \a:columnrulewidth;
-           -moz-column-rule-color: \a:columnrulecolor; 
-           -webkit-column-rule-color: \a:columnrulecolor; 
-           column-rule-color: \a:columnrulecolor;
-           -moz-column-rule-style: \a:columnrulestyle; 
-           -webkit-column-rule-style: \a:columnrulestyle; 
-           column-rule-style: \a:columnrulestyle;
-           -moz-column-fill: \a:columnfill; 
-           -webkit-column-fill: \a:columnfill; 
-           column-fill: \a:columnfill;
-           }%
-        }%
-}
-\def\mult:cols{\IgnorePar\EndP%
-        \HCode{<div class="\a:multicols-\mcolnum">}%
+% CSS needs to be written for every column count
+\NewConfigure{multicolscss}{1}
+\def\:wr:mcol:css{\a:multicolscss }
+
+% this configuration should configure HTML code inserted for multicols environment
+\NewConfigure{multicolscolumn}{2}
+
+\def\mult:cols{\a:multicolscolumn%
         \expandafter\ifx\csname .\a:multicols-\mcolnum\endcsname\relax%
         \:wr:mcol:css
         \expandafter\gdef\csname .\a:multicols-\mcolnum\endcsname{1}%
         \fi\ShowPar\par}
-\append:def\endmulticols{\ifvmode\IgnorePar\fi\EndP\HCode{</div>}} 
+\append:def\endmulticols{\b:multicolscolumn} 
 >>>
 
 \Section{lettrine.sty}

Modified: trunk/lit/tex4ht-html4.tex
===================================================================
--- trunk/lit/tex4ht-html4.tex	2022-04-29 14:10:43 UTC (rev 1123)
+++ trunk/lit/tex4ht-html4.tex	2022-04-29 15:04:44 UTC (rev 1124)
@@ -15672,6 +15672,35 @@
 \<configure html4 multicol\><<<
 \HAssign\MultiCols=0
 \ConfigureEnv{multicols}{}{}{}{}
+
+\Configure{multicolscolumn}
+{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="\a:multicols-\mcolnum">}} 
+{\ifvmode\IgnorePar\fi\EndP\HCode{</div>}}
+
+\Configure{multicolscss}{%
+  \Css{.\a:multicols-\mcolnum\space :first-child { margin-top: 0em; }}%
+  \Css{.\a:multicols-\mcolnum {%
+      -moz-column-count:\mcolnum; 
+      -webkit-column-count:\mcolnum;
+      column-count:\mcolnum;
+      -moz-column-gap: \a:columngap;
+      -webkit-column-gap: \a:columngap; 
+      column-gap: \a:columngap;
+      -moz-column-rule-width: \a:columnrulewidth; 
+      -webkit-column-rule-width: \a:columnrulewidth; 
+      column-rule-rule-width: \a:columnrulewidth;
+      -moz-column-rule-color: \a:columnrulecolor; 
+      -webkit-column-rule-color: \a:columnrulecolor; 
+      column-rule-color: \a:columnrulecolor;
+      -moz-column-rule-style: \a:columnrulestyle; 
+      -webkit-column-rule-style: \a:columnrulestyle; 
+      column-rule-style: \a:columnrulestyle;
+      -moz-column-fill: \a:columnfill; 
+      -webkit-column-fill: \a:columnfill; 
+      column-fill: \a:columnfill;
+    }%
+  }%
+}
 %    {\par\IgnorePar\EndP
 %     \gHAdvance\MultiCols by 1\relax
 %     \HCode{<table class="multicols"



More information about the tex4ht-commits mailing list.