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

cvr at gnu.org.ua cvr at gnu.org.ua
Wed Jul 31 04:45:43 CEST 2013


Author: cvr
Date: 2013-07-31 05:45:43 +0300 (Wed, 31 Jul 2013)
New Revision: 107

Modified:
   trunk/lit/tex4ht-4ht.tex
Log:
multicol.4ht written afresh to bring in support for multicolumn layout in HTML output.


Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2013-07-03 17:05:12 UTC (rev 106)
+++ trunk/lit/tex4ht-4ht.tex	2013-07-31 02:45:43 UTC (rev 107)
@@ -32701,17 +32701,124 @@
 >>>        \AddFile{9}{multicol}
 
 \<multicols config\><<<
-\def\multicols#1{\bgroup \par \col at number=1
-     \@ifnextchar[\mult at cols{\mult at cols[]}}
-\def\mult@@cols#1[#2]{\ignorespaces}
+\def\mcolnum{1}
+\def\multicols#1{%
+      \bgroup \par \col at number=#1
+      \def\mcolnum{#1}
+      \@ifnextchar[{\mult at cols}{\mult at cols[]}%]
+   }
+
+\def\mult@@cols#1[#2]{#1\ignorespaces\mult:cols}
 \def\endmulticols{\egroup\par }
+
 \def\columnbreak{\a:columnbreak}
 \NewConfigure{columnbreak}{1}
->>>
+\Configure{columnbreak}{auto}
 
+%  break-before, break-after, break-inside
+%-----------------------------------------
+% auto  always  avoid  left  right  page  column  avoid-page 
+% avoid-column
 
+\def\columngap{\a:columngap}
+\NewConfigure{columngap}{1}
+\Configure{columngap}{\the\columnsep}
 
+% dimen  normal (1em)
 
+\def\columnrulewidth{\a:columnrulewidth}
+\NewConfigure{columnrulewidth}{1}
+\Configure{columnrulewidth}{\the\columnseprule}
+
+% thin  medium  thick  dimen
+
+\def\columnrulecolor{\a:columnrulecolor}
+\NewConfigure{columnrulecolor}{1}
+\Configure{columnrulecolor}{\#555;}
+
+% legal color
+
+\def\columnrulestyle{\a:columnrulestyle}
+\NewConfigure{columnrulestyle}{1}
+\Configure{columnrulestyle}{outset}
+
+% none
+%     No border. 
+% *hidden
+%     Same as 'none', but in the collapsing border model, also inhibits
+%     any other border (see the section on border conflicts).  
+% dotted
+%     The border is a series of dots. 
+% dashed
+%     The border is a series of short line segments. 
+% solid
+%     The border is a single line segment. 
+% double
+%     The border is two solid lines. The sum of the two lines and the
+%     space between them equals the value of 'border-width'.  
+% groove
+%     The border looks as though it were carved into the canvas. 
+% ridge
+%     The opposite of 'groove': the border looks as though it were
+%     coming out of the canvas.  
+% *inset
+%     In the separated borders model, the border makes the entire box
+%     look as though it were embedded in the canvas. In the collapsing
+%     border model, drawn the same as 'ridge'.  
+% *outset
+%     In the separated borders model, the border makes the entire box
+%     look as though it were coming out of the canvas. In the collapsing
+%     border model, drawn the same as 'groove'.  
+
+\def\columnspan{\a:columnspan}
+\NewConfigure{columnspan}{1}
+\Configure{columnspan}{none}
+
+% none  all
+
+\def\columnfill{\a:columnfill}
+\NewConfigure{columnfill}{1}
+\Configure{columnfill}{balance}
+
+% auto  balance
+
+\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">}%
+        \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{\EndP\HCode{</div>}} 
+>>>
+
+
 %-------------------------------- Baby osudeG.sty -------------
 
 \Section{osudeG.sty}



More information about the tex4ht-commits mailing list