summaryrefslogtreecommitdiff
path: root/support/TeX4ht/source/tex4ht-html4.tex
diff options
context:
space:
mode:
Diffstat (limited to 'support/TeX4ht/source/tex4ht-html4.tex')
-rw-r--r--support/TeX4ht/source/tex4ht-html4.tex143
1 files changed, 127 insertions, 16 deletions
diff --git a/support/TeX4ht/source/tex4ht-html4.tex b/support/TeX4ht/source/tex4ht-html4.tex
index eb45f6f2ac..012883e471 100644
--- a/support/TeX4ht/source/tex4ht-html4.tex
+++ b/support/TeX4ht/source/tex4ht-html4.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-html4.tex 1533 2024-06-21 13:38:57Z michal_h21 $
+% $Id: tex4ht-html4.tex 1591 2024-10-29 13:48:36Z michal_h21 $
% Compile 4 times: latex tex4ht-html4
% Copy html4.4ht into the work directory before all but the last compilation.
%
@@ -73,7 +73,7 @@
\<html4-math\><<<
% html4-math.4ht (|version), generated from |jobname.tex
-% Copyright 2009-2023 TeX Users Group
+% Copyright 2009-2024 TeX Users Group
% Copyright |CopyYear.1999. Eitan M. Gurari
|<TeX4ht copywrite|>
>>>
@@ -2950,6 +2950,22 @@ such a case, we don't have proper nestings of environments.
\EndP\HCode{</li></ul>}\ShowPar}
{\end:itm \global\def\end:itm{\EndP\Tg</li>}\DeleteMark}
{\HCode{<li class="\getClass{li}itemize">}\afterGetClass{li}|<list par|>}
+
+\:CheckOption{itemize+}\if:Option
+\ConfigureList{itemize}%
+ {\EndP\HCode{<ul \a:LRdir
+ class="\getClass{itemize}itemize\expandafter\the
+ \csname @itemdepth\endcsname">}%
+ \afterGetClass{itemize}%
+ |<save end:itm|>\global\let\end:itm=\empty}
+ {|<recall end:itm|>\ifvmode \IgnorePar\fi
+ \EndP\HCode{</li></ul>}\ShowPar}
+ {\end:itm \global\def\end:itm{\EndP\Tg</li>}\HCode{<li class="\getClass{li}itemize"><span class="itemizeHead" aria-hidden="true">}\afterGetClass{li}}
+ {\HCode{</span>}|<list par|>}
+\Css{.itemizeHead{float: left; margin-left: -1em; width: 1em;}}
+\Css{li.itemize{list-style: none;}}
+\fi
+
\NewConfigure{itemizeClass}{2}
\Configure{itemizeClass}{}{}
\NewConfigure{liClass}{2}
@@ -5980,7 +5996,7 @@ thanks author date and>>>
\<tug boat maketitle\><<<
\@ifclassloaded{ltugproc}{}{%
- \@ifpackageloaded{ltugproc}{}{\Configure{@BODY}{\rtitlex}}
+ \@ifpackageloaded{ltugproc}{}{\Configure{@BODY}{\@ifundefined{:rtitlexused}{\rtitlex}{}\def\:rtitlexused{}}}
}
\Configure{maketitle}
{\ifvmode \IgnorePar\fi \EndP
@@ -7645,7 +7661,7 @@ consecutive \verb+<br />+ tags.
{}
{\xdef\col:Css{\col:Css
border-\ifnum \ar:cnt=0 left\else right\fi
- :solid black 0.4pt;}%
+ :1px solid \VBorder:color;}%
}{}{}%
}
{\ifx \col:Css\empty \else
@@ -7793,6 +7809,7 @@ Currently, we either have empty \verb'\VBorder', or one defined to
\<html latex array/tabular Config 4.0t\><<<
\let\VBorder|=\empty \let\AllColMargins|=\empty
+\def\VBorder:color{black}
\Configure{VBorder}
{\let\VBorder|=\empty \let\AllColMargins|=\empty
\global\let\GROUPS|=\empty \HAssign\NewGroup = 0
@@ -7802,10 +7819,10 @@ Currently, we either have empty \verb'\VBorder', or one defined to
% put vertical border for a column
\ifnum\ar:cnt > 0%
% in all other cases, we should put right border
- \Css{\#TBL-\TableNo-\ar:cnt {border-right:1px solid black;}}%
+ \Css{\#TBL-\TableNo-\ar:cnt {border-right:1px solid \VBorder:color;}}%
\else%
% columns are numbered from 1. if \ar:cnt == 0 then it is the left border
- \Css{\#TBL-\TableNo-1{border-left: 1px solid black;}}%
+ \Css{\#TBL-\TableNo-1{border-left: 1px solid \VBorder:color;}}%
\fi%
}
{\Advance:\NewGroup by 1
@@ -7816,8 +7833,8 @@ Currently, we either have empty \verb'\VBorder', or one defined to
{\xdef\AllColMargins{\AllColMargins 0}}
\Configure{HBorder}
{<tr\Hnewline class="hline">} {<td><hr\xml:empty></td>} {</tr>}
- {<tr\Hnewline class="cline">}
- {<td></td>} {<td><hr\xml:empty></td>} {</tr>}
+ {<tr\Hnewline class="cline">}
+ {<td></td>} {<td style="border-top:1px solid \#\hline:color;"></td>} {</tr>}
{<tr\Hnewline class="vspace" style="font-size:\HBorderspace">}
{<td\Hnewline>\string&nbsp;</td>}
{</tr>}
@@ -7828,7 +7845,8 @@ Currently, we either have empty \verb'\VBorder', or one defined to
\Css{.hline hr, .cline hr{border:none;border-top:1px solid black;}}
\Css{.hline {border-top: 1px solid black;}}
\Css{.hline + .vspace:last-child{display:none;}}
-\Css{.hline:first-child{border-bottom:1px solid black;border-top:none;}}
+% why was there this rule? it adds unnecessary extra rule at the top of tables
+% \Css{.hline:first-child{border-bottom:1px solid black;border-top:none;}}
>>>
When \verb'\putVBorder' is call in \verb'\VBorder'
@@ -8774,16 +8792,22 @@ The hbox is for avoiding the start of a new paragraph, if in vmode.
};
}
\fi
+\NewConfigure{MathjaxInline}{2}
+\NewConfigure{MathjaxBlock}{2}
+\Configure{MathjaxInline}{\HCode{<span class="mathjax-inline">}}{\HCode{</span>}}
+\Configure{MathjaxBlock}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="mathjax-block">}}{\HCode{</div>}}
+\Configure{MathjaxEnv}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="mathjax-env mathjax-\@currenvir">}}{\HCode{</div>}}
+
\Configure{@HEAD}{\HCode{<script>window.MathJax = \a:MathJaxConfig</script>\Hnewline}}
\Configure{MathjaxSource}{https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js}
-\Configure{@HEAD}{\HCode{ <script type="text/javascript" async="async" id="MathJax-script" src="\a:MathjaxSource"></script> \Hnewline}}
+\Configure{@HEAD}{\ifx\a:MathjaxSource\@empty\else\HCode{<script type="text/javascript" async="async" id="MathJax-script" src="\a:MathjaxSource"></script> \Hnewline}\fi}
\edef\:RestoreMathjaxCatcodes{\catcode`\noexpand \&=\the\catcode`\&}
\def\:HandleMathjaxCatcodes{\edef\:RestoreMathjaxCatcodes{\catcode`\noexpand \&=\the\catcode`\&}\catcode`\&=11}
-\Configure{$}{\:HandleMathjaxCatcodes}{\:RestoreMathjaxCatcodes}{\expandafter\AltMathOne}
-\Configure{$$}{\:HandleMathjaxCatcodes}{\:RestoreMathjaxCatcodes}{\expandafter\AltlDisplayDollars}
-% for some reason, it is necessary to specify the catcode change directly in the configuration
-\Configure{()}{\:HandleMathjaxCatcodes\catcode`\&=11\AltlMath}{\:RestoreMathjaxCatcodes}
-\Configure{[]}{\:HandleMathjaxCatcodes\catcode`\&=11\AltlDisplay}{\:RestoreMathjaxCatcodes}
+\Configure{$}{\a:MathjaxInline\:HandleMathjaxCatcodes}{\:RestoreMathjaxCatcodes\b:MathjaxInline}{\expandafter\AltMathOne}
+\Configure{()}{\a:MathjaxInline\:HandleMathjaxCatcodes\catcode`\&=11\AltlMath}{\:RestoreMathjaxCatcodes\b:MathjaxInline}
+\Configure{$$}{\a:MathjaxBlock\:HandleMathjaxCatcodes}{\:RestoreMathjaxCatcodes\b:MathjaxBlock}{\expandafter\AltlDisplayDollars}
+\Configure{[]}{\a:MathjaxBlock\:HandleMathjaxCatcodes\catcode`\&=11\AltlDisplay}{\:RestoreMathjaxCatcodes\b:MathjaxBlock}
+
\fi
>>>
@@ -16456,6 +16480,9 @@ Blue = 1-minimum(1,Yellow *(1-Black)+Black)
% redefine default table configuration and put the color rule
\def\a:HBorder{<tr class="hline" style="border-top:1px solid \#\hline:color">}
+
+% use the hline color also for vertial lines
+\def\VBorder:color{\#\hline:color}
% don't display <hr> elements in colored \hline
\Css{tr.hline td hr{display:none}}
>>>
@@ -16524,6 +16551,18 @@ Blue = 1-minimum(1,Yellow *(1-Black)+Black)
>>>
%%%%%%%%%%%%%%%%
+\section{lua-ul}
+%%%%%%%%%%%%%%%%
+
+\<configure html4 lua-ul\><<<
+\Configure{highLight}{\HCode{<span class="highLight" style="background-color:\:highLightColor;">}}{\HCode{</span>}}
+\Configure{strikeThrough}{\HCode{<span class="strikeThrough" style="text-decoration-color:\:strikeThroughColor;" >}}{\HCode{</span>}}
+\Css{.strikeThrough{text-decoration: line-through;}}
+\Configure{underLine}{\HCode{<span class="underLine" style="text-decoration-color:\:underLineColor;">}}{\HCode{</span>}}
+\Css{.underLine{text-decoration: underline;}}
+>>>
+
+%%%%%%%%%%%%%%%%
\section{framed}
\<configure html4 framed\><<<
@@ -16830,9 +16869,26 @@ Blue = 1-minimum(1,Yellow *(1-Black)+Black)
{\end:itm \global\def\end:itm{\EndP\Tg</dd>}\HCode{<dt
class="enumerate-enumitem">}\bgroup \bf}
{\egroup\EndP\HCode{</dt><dd\Hnewline class="enumerate-enumitem">}}
+
\Css{dl.enumerate-enumitem{display:grid; grid-template-columns: 3ch 1fr; align-items: top; row-gap:1ch;}}
>>>
+Configurations for new list environments.
+
+\<configure html4 enumitem\><<<
+\Configure{enumitemnewlist}{%
+\ConfigureList{\a:enumitemenv}%
+ {\EndP\HCode{<dl \a:LRdir class="enumerate-enumitem enumitem-\a:enumitemenv">}%
+ |<save end:itm|>\global\let\end:itm=\empty}
+ {|<recall end:itm|>\EndP\HCode{</dd></dl>}\ShowPar}
+ {\end:itm \global\def\end:itm{\EndP\Tg</dd>}\HCode{<dt
+ class="enumerate-enumitem enumitem-\a:enumitemenv">}\bgroup \bf}
+ {\egroup\EndP\HCode{</dt><dd\Hnewline class="enumerate-enumitem">}}
+}
+
+
+>>>
+
%%%%%%%%%%%%%
\subsection{IEEEtran}
@@ -17790,6 +17846,45 @@ Blue = 1-minimum(1,Yellow *(1-Black)+Black)
>>>
%%%%%%%%%%%%%%%%%%
+\section{moderncv}
+%%%%%%%%%%%%%%%%%%
+
+\<configure html4 moderncv\><<<
+\Configure{cvhead}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="cvhead">}}{\ifvmode\IgnorePar\fi\EndP\HCode{</div>}}
+\Configure{cvphoto}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="cvphoto">}}{\ifvmode\IgnorePar\fi\EndP\HCode{</div>}}
+
+\Configure{section}{\ifvmode\IgnorePar\fi\EndP\HCode{<h2>}}{\HCode{</h2>}}
+\Configure{subsection}{\ifvmode\IgnorePar\fi\EndP\HCode{<h3>}}{\HCode{</h3>}}
+\Configure{cvitem}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="cvitem"><span class="cvitemhead">}}{\HCode{</span><span class="cvitembody">}}{\HCode{</span></div>}}
+\Configure{cvdoubleitem}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="cvdoubleitem">}}{\HCode{</div>}}
+\Configure{cvlistitem}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="cvlistitem">}}{\HCode{</div>}}
+\Configure{cvlistdoubleitem}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="cvlistdoubleitem">}}{\HCode{</div>}}
+
+\Configure{cvskillhead}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="cvskillhead">}}{\HCode{</div>}}
+\Configure{cvskillentry}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="cvskillentry">}}{\HCode{</div>}}
+
+\Configure{cvskill}{\Picture*[skill level: \:cvskillamount]{}}{\EndPicture}
+
+\Css{.cvskillentry .tabular, .cvskillhead .tabular {margin:0pt;}}
+\Css{.cvskillentry .tabular td:nth-child(1), .cvskillhead .tabular td:nth-child(1){width: 8ch}}
+\Css{.cvskillentry .tabular td:nth-child(2), .cvskillhead .tabular td:nth-child(2){width: 12ch}}
+\Css{.cvskillentry .tabular td:nth-child(3), .cvskillhead .tabular td:nth-child(3){width: 6ch}}
+\Css{.cvskillentry .tabular td:nth-child(4), .cvskillhead .tabular td:nth-child(4){width: 54ch}}
+
+\Css{.cvitemhead{margin-right: 1em;}}
+
+\Css{
+@media (min-width:94ch) {
+.cvitemhead{
+ margin-left: -14ch;
+ width: 12ch;
+ float: left;
+ text-align: right;
+ }
+}}
+>>>
+
+%%%%%%%%%%%%%%%%%%
\section{CSS}
%%%%%%%%%%%%%%%%%%
@@ -18339,6 +18434,19 @@ font-size:70\%;
>>>
+This should remove part number in French Babel, because
+the number is a part of the partname.
+\Link[https://github.com/michal-h21/make4ht/issues/155]{}{}Bug report\EndLink.
+
+\<configure html4 french\><<<
+\Configure{part}{}{}
+ {\IgnorePar \EndP\HCode{<h1 class="partHead"\a:LRdir>}%
+ \HCode{<span class="titlemark">}\partname
+ \HCode{</span><br />}}
+ {\HCode{</h1>}\IgnoreIndent\par}
+>>>
+
+
\<configure html4 galician\><<<
@@ -19886,9 +19994,10 @@ chess notation as an alt text.
\<configure html4 ltugboat\><<<
|<tug boat maketitle|>
\Configure{titlex}
- {\HCode{<div class="titlex">}}
+ {\ifvmode\IgnorePar\fi\EndP\HCode{<div class="titlex">}}
{\HCode{</div>}}
\Css{div.titlex p{margin-bottom:1em;}}
+\Css{div.titlex {text-align: center;}}
|<ltugboat congif|>
>>>
@@ -22853,7 +22962,9 @@ The \verb|\hline:color| macro is defined by TeX4ht configuration for colortbl.st
We reuse it to support change of rule colors. It is initialized as black.
\<booktabs default hline color\><<<
+\ifdefined\hline:color\else
\def\hline:color{000}
+\fi
>>>