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.tex252
1 files changed, 235 insertions, 17 deletions
diff --git a/support/TeX4ht/source/tex4ht-html4.tex b/support/TeX4ht/source/tex4ht-html4.tex
index 4c591c9b37..012883e471 100644
--- a/support/TeX4ht/source/tex4ht-html4.tex
+++ b/support/TeX4ht/source/tex4ht-html4.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-html4.tex 1516 2024-05-09 13:28:51Z 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
>>>
@@ -9041,8 +9065,70 @@ The hbox is for avoiding the start of a new paragraph, if in vmode.
+%%%%%%%%%%%%%%%%%%
+\section{juramisc}
+%%%%%%%%%%%%%%%%%%
+
+\<configure html4 jurabook\><<<
+|<jurabook sections|>
+|<jurabook toc|>
+>>>
+
+\<configure html4 juraurtl\><<<
+>>>
+
+\<configure html4 juraovw\><<<
+>>>
+
+\<jurabook sections\><<<
+\Configure{subthreesection}
+ {}{}
+ {\ifvmode\IgnorePar\fi\EndP\HCode{<h5 class="subthreesection">}\TitleMark\space} {\HCode{</h5>}\par\ShowPar}
+\ConfigureMark{subthreesection}{\HCode{<span class="titlemark">}\thesubthreesection\HCode{</span>}}
+\Configure{subfoursection}
+ {}{}
+ {\ifvmode\IgnorePar\fi\EndP\HCode{<h5 class="subfoursection">}\TitleMark\space} {\HCode{</h5>}\par\ShowPar}
+
+\ConfigureMark{subfoursection}{\HCode{<span class="titlemark">}\thesubfoursection\HCode{</span>}}
+
+\Configure{subfivesection}
+ {}{}
+ {\ifvmode\IgnorePar\fi\EndP\HCode{<h5 class="subfivesection">}\TitleMark\space} {\HCode{</h5>}\par\ShowPar}
+
+\ConfigureMark{subfivesection}{\HCode{<span class="titlemark">}\thesubfivesection\HCode{</span>}}
+
+\Configure{subsixsection}
+ {}{}
+ {\ifvmode\IgnorePar\fi\EndP\HCode{<h5 class="subsixsection">}\TitleMark\space} {\HCode{</h5>}\par\ShowPar}
+
+\ConfigureMark{subsixsection}{\HCode{<span class="titlemark">}\thesubsixsection\HCode{</span>}}
+
+
+\Configure{subsevensection}
+ {}{}
+ {\ifvmode\IgnorePar\fi\EndP\HCode{<h5 class="subsevensection">}\TitleMark\space} {\HCode{</h5>}\par\ShowPar}
+
+\ConfigureMark{subsevensection}{\HCode{<span class="titlemark">}\thesubsevensection\HCode{</span>}}
+
+
+\Configure{subeightsection}
+ {}{}
+ {\ifvmode\IgnorePar\fi\EndP\HCode{<h5 class="subeightsection">}\TitleMark\space} {\HCode{</h5>}\par\ShowPar}
+
+\ConfigureMark{subeightsection}{\HCode{<span class="titlemark">}\thesubeightsection\HCode{</span>}}
+>>>
+
+\<jurabook toc\><<<
+\def\tocsubthreesection#1#2#3{\par\toc:num{subthreesection}{#1}{#2}\par}
+\def\tocsubfoursection#1#2#3{\par\toc:num{subfoursection}{#1}{#2}\par}
+\def\tocsubfivesection#1#2#3{\par\toc:num{subfivesection}{#1}{#2}\par}
+\def\tocsubsixsection#1#2#3{\par\toc:num{subsixsection}{#1}{#2}\par}
+\def\tocsubsevensection#1#2#3{\par\toc:num{subsevensection}{#1}{#2}\par}
+\def\tocsubeightsection#1#2#3{\par\toc:num{subeightsection}{#1}{#2}\par}
+
+>>>
%%%%%%%%%%%%%%%%%%
\section{letter}
@@ -13762,7 +13848,7 @@ for margin pars.
\<configure html4 epsf\><<<
\Configure{epsfsetgraph}
- {\Picture+[\PicName]{}}
+ {\Picture+[]{}}
{\EndPicture}
>>>
@@ -15872,6 +15958,51 @@ IE doesn't distinguish between upper and lower case characters in css
>>>
+\section{lettrine.sty}
+
+\<configure html4 lettrine\><<<
+%
+% a: before lettrine
+% b: after lettrine
+% c: before letter
+% d: between letter and string
+% e: after string
+% f: before ante
+% g: after ante
+%
+\Configure{lettrine}
+ {\HCode{<span class="lettrine">}}
+ {\HCode{</span>}}
+%
+ {\HCode{<span class="lettrine-letter">}}
+ {\HCode{</span><span class="lettrine-line">}}
+ {\HCode{</span>}}
+%
+ {\HCode{<span class="lettrine-ante">}}
+ {\HCode{</span>}}
+
+\Configure{lettrinechar}{\HCode{<span class="lettrine-\HlettrineChar">}}{\HCode{</span>}}
+%
+% Define default Css
+%
+\Css{.lettrine{float: left;
+ line-height: 0.7; margin-left: -0.1em;
+ margin-bottom: -.5em; margin-right: 0.2em;
+ }}
+\Css{.lettrine-ante{vertical-align: top;}}
+\Css{.lettrine-letter{font-style: normal;
+ font-size: 4em; color: gray;}}
+%
+\Css{.lettrine-A{margin-right: 0em;}}
+\Css{.lettrine-A + .lettrine-line{margin-left: -0.4em;}}
+\Css{.lettrine-J{line-height: 0.9; margin-right: 0;}}
+\Css{.lettrine-H, .lettrine-I, .lettrine-N, .lettrine-U{margin-right: 0;}}
+\Css{.lettrine-V{margin-right: -0.0em;}}
+\Css{.lettrine-V + .lettrine-line{margin-left: 0.3em;}}
+\Css{.lettrine-Q{line-height: 0.9;padding-bottom: 1em;margin-top: -0.6em;}}
+\Css{.lettrine-line{font-variant: small-caps;}}
+>>>
+
%%%%%%%%%%%%%%%%%%
\section{gmatrix.sty}
@@ -16349,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}}
>>>
@@ -16417,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\><<<
@@ -16723,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}
@@ -17683,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}
%%%%%%%%%%%%%%%%%%
@@ -18232,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\><<<
@@ -19779,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|>
>>>
@@ -22746,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
>>>