\:CheckOption{javascript}
\if:Option \else\:CheckOption{th4}\fi
\if:Option
\Configure{JavaScript}
{\HCode{<script type="text/JavaScript" ><!--\Hnewline}}
{\HCode{//-->\Hnewline </script>}}
\fi
-_-_-
Should we go for
<script type="text/javascript"><!--//--><![CDATA[//><!--
...
//--><!]]></script>
http://www.hixie.ch/advocacy/xhtml
\:CheckOption{draw} \if:Option \:CheckOption{th4} \if:Option
\Configure{Fig}
{\ifx \AltFig\empty \Picture*{ \a:@Picture{Fig}}%
\else \Picture*[\AltFig]{ \a:@Picture{Fig}}\fi}
{\EndPicture}
\fi \fi
-_-_-
\Configure{Columns}
{\IgnorePar\EndP
\HCode{<table \Hnewline cellspacing="15"><tr style="vertical-align:top;">}}
{\HCode{</tr></table>}}
{\HCode{<td>}\ColMag{1.03}}
{\IgnorePar\EndP\HCode{</td>}}
-_-_-
\:CheckOption{index}\if:Option
\Configure{index}
{\bgroup
\Configure{Columns}
{\IgnorePar\EndP
\HCode{<table \Hnewline class="index" width="100\%"
cellspacing="15"><tr style="vertical-align:top;">}}
{\HCode{</tr></table>}}
{\HCode{<td>}\ColMag{1.1}}
{\IgnorePar\EndP\HCode{</td>}}
\Columns{2}\IndexFonts}
{\EndColumns \egroup}
{\bgroup\IgnorePar\EndP
\expandafter\ifx \csname prev:A\endcsname\relax
\else \hfil\break \expandafter\Tg<br />\par\IgnorePar \fi \IndexSec}
{\egroup~~~~}
{\bgroup\hfil\break\expandafter\Tg<br />~~~}{\egroup~~~~}
{~}{}
\def\Idx:ch{0}
\def\IndexSec#1{%
\tmp:cnt=‘#1\relax
\ifnum \tmp:cnt>‘Z\advance\tmp:cnt by -32 \fi
\ifnum \tmp:cnt<‘A\else \ifnum \tmp:cnt>‘Z \else
\ifnum \Idx:ch<\tmp:cnt
\bgroup
\Configure{centerline}
{\HCode{<div\Hnewline class="IndexSec">}}{\HCode{</div>}}
\leftline{\bf \char\tmp:cnt }%
\global\let\prev:A=\:UnDef
\xdef\Idx:ch{\the\tmp:cnt}%
\egroup
\fi
\fi \fi #1%
}
\Css{.IndexSec {margin-top:1em; margin-bottom:0.5em;}}
\fi
-_-_-
\Configure{Part}{}{}{%
\html:rightskip
\bgroup
\html:rightskip \ht:everypar{}
\IgnorePar\EndP\HCode{<h1 class="PartHead">}\HtmlParOff}
{\HCode{</h1>}\HtmlParOn\IgnoreIndent \egroup\par\ShowPar \IgnoreIndent}
\Configure{LikeSection}{}{}
{\IgnorePar \EndP\HCode{<h3 class="LikeSectionHead">}}
{\HCode{</h3>}\IgnoreIndent
<.addr for Tag and Ref of Sec.>%
\par \IgnoreIndent
}
\ConfigureMark{Section}
{\theSection}
\Configure{Section}
{}{}
{\IgnorePar\EndP\HCode{<h3 class="SectionHead">}%
\gHAdvance\SectionCounter by 1 \TitleMark\space
}{\HCode{</h3>}\IgnoreIndent
<.addr for Tag and Ref of Sec.>%
\par \IgnoreIndent
}
\Configure{SubSection}
{}{}
{\par \IgnorePar\EndP\HCode{<h3 class="SubSectionHead">}}
{\HCode{</h3>}\IgnoreIndent \ShowPar} -_-_-
\ConfigureMark{Chapter}
{Chapter \theChapterCounter}
\Configure{Chapter}
{}{}
{\IgnorePar\EndP\HCode{<h2 class="ChapterHead"\a:LRdir>}%
\TitleMark{\HCode{<br />}}}
{\HCode{</h2>}\IgnoreIndent\IgnorePar}
\ConfigureMark{Appendix}{Appendix \theChapterCounter}
\Configure{Appendix}
{}{}
{\IgnorePar\EndP\HCode{<h2 class="AppendixHead"\a:LRdir>}%
\TitleMark {\HCode{<br />}}}
{\HCode{</h2>}\IgnoreIndent\IgnorePar}
\Configure{LikeChapter}
{}{}
{\IgnorePar\EndP\HCode{<h2 class="LikeChapterHead"\a:LRdir>}\noindent
\bgroup \def\uppercase##1{##1}}
{\egroup \HCode{</h2>}\IgnoreIndent\IgnorePar }
-_-_-
\Configure{+CutAt}{Chapter}{[}{] }
\Configure{+CutAt}{Section}{[}{] }
\Configure{+CutAt}{LikeSection}{[}{] }
\Configure{+CutAt}{SubSection}{[}{] }
-_-_-
\ConfigureToc{Chapter}
{\HCode{<span class="ChapterToc" \a:LRdir>}}
{~}
{}
{\HCode{</span><br />}}
\ConfigureToc{Section}
{\HCode{<span class="SectionToc" \a:LRdir>}~~~}
{~}
{}
{\HCode{</span><br />}}
\ConfigureToc{LikeSection}
{}
{\HCode{<span class="LikeSectionToc" \a:LRdir>}~~~}
{}
{\HCode{</span><br />}}
\ConfigureToc{SubSection}
{}
{\HCode{<span class="SubSectionToc" \a:LRdir>}~~~~~~}
{}
{\HCode{</span><br />}}
-_-_-
\Configure{Verbatim}
{\ifvmode \IgnorePar\fi
\HAssign\Verb:N = 0
\EndP\HCode{<div class="Verbatim">}}
{\IgnorePar\HCode{</div>}\par\ShowPar}
{\HAdvance\Verb:N by 1 \ifnum \Verb:N>1 \HCode{<br />}\fi}
{\:nbsp}
\Css{div.Verbatim { font-family: monospace; white-space: nowrap; }}
\Css{body .Verbatim { margin: 1em; }}
-_-_-
\Configure{buttonList+}
{\ifnum \ListCounter>1 \IgnorePar\EndP\HCode{<hr\xml:empty>}\fi
\ShowPar\par\IgnoreIndent
}
{. #1\ShowPar} {\IgnorePar\EndP} {\ListCounter}
-_-_-
\Configure{UList}
{\IgnorePar\EndP\def\:tempB{disc}%
\ifx\:tempA\:tempB \else \def\:tempB{square}\fi
\ifx\:tempA\:tempB \else \def\:tempB{circle}\fi
\hbox{\IgnorePar\EndP\HCode{<ul
\ifx\:tempA\:tempB type="\:tempA" \fi \:UL:>}}}
{\ht:everypar{}\EndP\HCode{</li></ul>}\ShowPar\par}
{\ifnum \ListCounter>1 \EndP\HCode{</li>}\fi \hfil\break \HCode{<li>}}
\Configure{OList}
{\IgnorePar\EndP\hbox{\HCode{<ol
\ifx \:temp\empty \else type="\:temp" \fi
\:OL:>}}}
{\ht:everypar{}\EndP
\HCode{\ifnum \ListCounter=0<li>\fi </li></ol>}\ShowPar\par}
{\ifnum \ListCounter>1 \EndP\HCode{</li>}\fi \hfil\break \HCode{<li>}}
-_-_-
\Configure{Item}{}{\par}%
\Configure{DList}
{\IgnorePar\EndP\HCode{<dl \:DL:>}}
{\ht:everypar{}\EndP\HCode{\End:dd</dl>}%
\ShowPar\par }
{\IgnorePar\EndP\ifnum \ListCounter>1 \HCode{</dd>}\fi
\HCode{<dt>}}
{\HCode{</dt><dd>}\ShowPar \def\End:dd{</dd>}\hfil\break}
\Configure{buttonList}{}{}
{}{.\ #1 }{\ListCounter}
-_-_-
\HAssign\TableNo=0
\Configure{HTable}
{\gHAdvance\TableNo by 1
\ht:everypar{}\EndP\HCode{<table id="TBL-\TableNo"
\Hnewline\TABLE:\:HTable:>}%
\def\BR{\HCode{<br />}}}
{\HCode{</table>}}
{\HCode{<tr \:TR>}}{\HCode{</tr>}}
{\ht:everypar{}\HCode{<\TD:typ\TD:more\Hnewline>}}
{\EndP\ht:everypar{}\HCode{</\TD:typ>}}
\let\:HTable:=\empty
\Configure{HTable+}
{B}{ cellspacing="0" cellpadding="3pt" frame="border" }
{<}{ style="text-align:left;" }
{>}{ style="text-align:right;" }
{-}{ style="text-align:center;" }
{^}{ style="vertical-align:top;" }
{|}{ style="vertical-align:middle;" }
{_}{ style="vertical-align:bottom;" }
{=}{ style="vertical-align:baseline;" }
{}{}
\Css{table[rules] {border-left:solid black 0.4pt;
border-right:solid black 0.4pt; }}
-_-_-