% tex tex4ht-4ht   or   ht tex tex4ht-4ht
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% tex4ht-4ht.tex                                         %
% Copyright (C) 1996--            Eitan M. Gurari        %
%                                                        %
% This work may be distributed and/or modified under the %
% conditions of the LaTeX Project Public License, either %
% version 1.3 of this license or (at your option) any    %
% later version. The latest version of this license is   %
% in                                                     %
%   http://www.latex-project.org/lppl.txt                %
% and version 1.3 or later is part of all distributions  %
% of LaTeX version 2003/12/01 or later.                  %
%                                                        %
% This work has the LPPL maintenance status "maintained".%
%                                                        %
% This Current Maintainer of this work                   %
% is Eitan M. Gurari.                                    %
%                                                        %
% If you modify this file your changing the signature    %
% in \message{(signature)} below will be appreciated.    %
%                                                        %
%                             gurari@cse.ohio-state.edu  %
%                 http://www.cse.ohio-state.edu/~gurari  %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
\message{(<signature>)}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
\input DraTex.sty
\input AlDraTex.sty

\DrawOff

\immediate\write16{----------Verify length of lines!!!!------------}
\immediate\write16{----------Verify length of lines!!!!------------}
\immediate\write16{----------Verify length of lines!!!!------------}
\immediate\write16{----------Verify length of lines!!!!------------}


\newif\ifalprotex \alprotexfalse

\hbadness=10000     \vbadness=10000  \hfuzz=99in \vfuzz=99in
\def\BREAK{^^J}

\def\Link#1\EndLink{}

\openin15=th4.4ht
          \ifeof15

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% replacement for TeX4ht %%%%%%%%%%%%%%%%%%
\csname newif\endcsname\ifHtml \Htmlfalse
\def\-#1{\ifx#1-\expandafter\TEMP\else\expandafter#1\fi}
\expandafter\let\csname bye\endcsname=\end
\def\TEMP#1/#2/#3/{}
\def\HTable#1{}
\def\'#1'{}
\def\`#1'{}
\let\TableOfContents=\relax
\def\Part#1{}
\def\Chapter#1{}
\def\Appendix#1{}
\def\Section#1{}
\def\SubSection#1{}
\def\Margin#1{}
\def\HCode#1{}
\def\LinkPort\<#1\>{}
\def\TagSec#1{}
\def\RefSec#1{}
\def\List#1{}   \let\ShortList=\List
\def\EndList{}
\def\item{}
\catcode`\:=11
\csname newcount\endcsname\tmp:cnt
          \def\no:catcodes#1#2#3{%
   \tmp:cnt=#1
   \def\no::catcodes{%
      \catcode\tmp:cnt=#3
      \ifnum\tmp:cnt<#2
          \advance\tmp:cnt by 1  \expandafter\no::catcodes
      \fi }%
   \no::catcodes }
           \let\:oldlq=\`
\let\:oldrq=\'
\def\'{\leavevmode \:cats  \::cats}
\def\::cats#1{\if  #1"\expandafter\:oldrq
              \else  \def\:eat##1#1{\tt ##1\egroup}\expandafter\:eat\fi}
\def\`{\leavevmode \:cats  \:::cats}
\def\:::cats#1{\if #1"\expandafter\:oldlq
               \else \def\:eat##1#1{`{\tt ##1}'\egroup}\expandafter\:eat\fi}
\def\:cats{\bgroup  \no:catcodes0{255}{12}\catcode`\ = 10
           \catcode`\^^M = 10 \catcode`\^^I = 10
}

\def\HPage{}  \def\EndHPage{}
\def\Verbatim{\bgroup\catcode`\\=12 \catcode`\#=12
   \catcode`\^=12 \catcode`\_=12
   \catcode`\{=12 \catcode`\}=12 \catcode`\%=12 \:vrb}
\long\def\:vrb#1EndVerbatim{\egroup}


   \closein15 
       \def\next{%\input DraTex.sty
                 \input ProTex.sty
             \AlProTex{sty,<<<>>>,|,title,list,[],ClearCode}}
   \catcode`\:=12
\else 
   \closein15 
      \def\next{%\input DraTex.sty
                \input tex4ht.sty
                \Preamble{html,th4,family,sections+,xhtml}
                \Configure{@HEAD}{\HCode{<link rev="made" 
                      href="mailto:gurari@cse.ohio-state.edu" />}}
%                \input MyTeX4ht.sty {}%
                \input ProTex.sty
             \AlProTex{sty,<<<>>>,|,title,list,[],ClearCode}
                \EndPreamble
       }
\fi



\next

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\expandafter \ifx \csname append:def\endcsname \relax
   \expandafter\def\csname append:def\endcsname#1#2{%
      \def\Xtemp{\def#1}%
      \expandafter\expandafter\expandafter\Xtemp\expandafter{#1#2}}
\fi

\expandafter \ifx \csname Verbatim\endcsname \relax
   \def\Verbatim{\bgroup 
      \catcode`\^=10 \catcode`\\=10  \catcode`\%=10
       \catcode`\{=10    \catcode`\}=10    \catcode`\#=10     \catcode`\#=10
       \XVerbatim}
   \long\def\XVerbatim#1EndVerbatim{\egroup}
\fi

\expandafter \ifx \csname Verb\endcsname \relax
    \def\Verb{\bgroup \catcode`\^=10 \catcode`\\=10  \catcode`\%=10
       \catcode`\{=10    \catcode`\}=10    \catcode`\#=10     \catcode`\#=10
       \leavevmode \Xctgs}
    \def\Xctgs#1{\def\Xeat##1#1{\egroup}\Xeat }
\fi

\ifx \HAssign\UnDef

\csname newcount\endcsname \tmpXxXcnt

\def\advXxX#1{\def\XxXvar{#1}\futurelet\XxXtemp\AdvancXxX}
\def\AdvancXxX{\ifx [\XxXtemp \expandafter\AdvancXxXe
              \else \expandXxXafter{\expandafter\advXxXc\XxXvar}\fi}
\def\AdvancXxXe[#1]{\expandafter\advXxXc\csname
                  \expandafter\string\XxXvar[#1]\endcsname}

\def\gXxXAdvance#1{\bgroup \def\XxXtemp{#1}%
                 \tmpXxXcnt#1\afterassignment\XxXgplus \mthXxXop\tmpXxXcnt}
\def\XxXgplus{\expandafter\xdef\XxXtemp{\the\tmpXxXcnt}\egroup}
\def\XxXAdvance#1{\bgroup \def\XxXtemp{#1}%
                \tmpXxXcnt#1\afterassignment\XxXaplus \mthXxXop\tmpXxXcnt}
\def\XxXaplus{\xdef\XxXtemp{\def\expandafter\noexpand\XxXtemp{\the\tmpXxXcnt}}%
            \egroup \XxXtemp}
\def\HAssign{\XxXssg\edef}
\def\gHAssign{\XxXssg\xdef}

\def\XxXssg#1#2{\let\dXxXfn#1\def\XxXvar{#2}\futurelet\XxXtemp\XxXAssgn}
\def\XxXAssgn{%
   \ifx [\XxXtemp
         \expandafter\dXxXfn\XxXvar[##1]{%
              \noexpand\csname  \expandafter
                                  \string\XxXvar[##1]\noexpand\endcsname}%
         \expandafter\assgXxXm
   \else \afterassignment\assgXxXv \expandafter \tmpXxXcnt \fi }

\def\assgXxXv{\expandafter\dXxXfn\XxXvar{\the\tmpXxXcnt}}
\def\assgXxXm[#1]{%
   \def\XxXtemp{\expandafter\dXxXfn
      \csname \expandafter\string\XxXvar[#1]\endcsname{\the\tmpXxXcnt}}%
   \afterassignment\XxXtemp  \tmpXxXcnt}

\fi
\catcode`\:=11
\csname newcount\endcsname\tmp:cnt
\expandafter\ifx \csname no:catcodes\endcsname\relax
   \def\no:catcodes#1#2#3{%
      \tmp:cnt=#1
      \def\no::catcodes{%
         \catcode\tmp:cnt=#3
         \ifnum\tmp:cnt<#2
             \advance\tmp:cnt by 1  \expandafter\no::catcodes
         \fi }%
      \no::catcodes }
\fi
\let\:oldlq=\`
\let\:oldrq=\'
\def\'{\leavevmode \:cats  \::cats}
\def\::cats#1{\if  #1"\expandafter\:oldrq
              \else  \def\:eat##1#1{\tt ##1\egroup}\expandafter\:eat\fi}
\def\`{\leavevmode \:cats  \:::cats}
\def\:::cats#1{\if #1"\expandafter\:oldlq
               \else \def\:eat##1#1{`{\tt ##1}'\egroup}\expandafter\:eat\fi}
\bgroup
  \catcode`\^=7
  \gdef\:cats{\bgroup  \no:catcodes0{255}{12}\catcode`\ = 10
           \catcode`\^^M = 10 \catcode`\^^I = 10
  }
\egroup
\catcode`\:=12
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\HOME{/n/gold/5/gurari/tex4ht.dir/texmf/tex/generic/tex4ht/}
\def\SOURCE{/n/gold/5/gurari/main.dir/html.dir}

\newcount\tmpcnt  \tmpcnt\time  \divide\tmpcnt  60
\edef\temp{\the\tmpcnt}
\multiply\tmpcnt  -60 \advance\tmpcnt  \time

\edef\version{\the\year-\ifnum \month<10 0\fi
  \the\month-\ifnum \day<10 0\fi\the\day
   -\ifnum \temp<10 0\fi \temp
   :\ifnum \tmpcnt<10 0\fi\the\tmpcnt}

\def\CopyYear.#1.{%
   \ifnum #1=\year #1\space\space\space\space\space\space
    \else          #1--\the\year\fi
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\let\ConfigFiles=\empty
\def\AddFile#1#2{\csname append:def\endcsname\ConfigFiles{\AddFile{#1}{#2}}}

\AddFile{0}{Preamble}
\AddFile{0}{tex4ht}
\AddFile{0}{tex4ht2}

\let\OutFiles=\empty
\def\AddFile{\futurelet\next\contAddFile}
\def\contAddFile{%
   \ifx [\next \def\next{\finishAddFile}%
   \else       \def\next{\finishAddFile[]}\fi
   \bgroup \catcode`\_=12 \next
}
\def\finishAddFile[#1]#2#3{\egroup
   \immediate\write16{ ==> <#1, #2, #3>}%
   \csname append:def\endcsname\OutFiles{\OutputCodE\<\if !#1!#3\else #1\fi.4ht\>}%
   \csname append:def\endcsname\ConfigFiles{\AddFile{#2}{#3}}%
}


\ifHtml

\def\tocSubSection#1#2#3{\par| #2}  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                                    % must appear before all TocAt
                                    % that refer to SubSection
                                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\TocAt{Part,Chapter,Section,LikeSection}
\TocAt{Chapter,Section,LikeSection,/Appendix,/Part}
\TocAt{LikeChapter,Section,LikeSection,/Appendix,/Part}
\TocAt{Appendix,Section,LikeSection,/Appendix,/Part}
\TocAt{Section,SubSection,/LikeSection}
\TocAt{LikeSection,SubSection,/Section}

\CutAt{Part}
\CutAt{Chapter,LikeChapter,Appendix,Part}
\CutAt{LikeChapter,Chapter,Appendix,Part}
\CutAt{Appendix,Chapter,LikeChapter,Part}
\CutAt{Section,LikeSection,Appendix,Chapter,LikeChapter,Part}
\CutAt{LikeSection,Section,Appendix,Chapter,LikeChapter,Part}

\else
\def\ParentOf#1{}
\csname TableOfContents\endcsname
\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\by{by}\def\={=}
\let\pReModifyOutputCode=\ModifyOutputCode
\def\ModifyOutputCode{%
   \def\by{}\def\={}%
   \pReModifyOutputCode}

\csname NoOutputCode\endcsname

\let\coDE=\<
\def\<{\vfil\par\coDE}

\tracingstats=1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\IgnorePar\EndP \HCode{<h1>A `Literate' View of tex4ht.sty</h1>}


\csname TableOfContents\endcsname[ParentOf,Part,Chapter,%
                         Appendix,LikeChapter%,Section,LikeSection%
     ]

%----------------- shared with TeX4ht ------------------------------------

%%%%%%%%%%%%%%%%%%%%%
\Part{Shared}
%%%%%%%%%%%%%%%%%%


\<par del\><<<
!*?: >>>


\<section html addr\><<<
|<toc tag|>1-\file:id-\TitleCount >>>

\<toc tag\><<<
Q>>>

%------------------------------ start here ------------------------

\Chapter{Outline of the Code}



\<TeX4ht copyright\><<<
%                                                        %
% This work may be distributed and/or modified under the %
% conditions of the LaTeX Project Public License, either %
% version 1.3 of this license or (at your option) any    %
% later version. The latest version of this license is   %
% in                                                     %
%   http://www.latex-project.org/lppl.txt                %
% and version 1.3 or later is part of all distributions  %
% of LaTeX version 2003/12/01 or later.                  %
%                                                        %
% This work has the LPPL maintenance status "maintained".%
%                                                        %
% This Current Maintainer of this work                   %
% is Eitan M. Gurari.                                    %
%                                                        %
% If you modify this program your changing its signature %
% with a directive of the following form will be         %
% appreciated.                                           %
%            \message{signature}                         %
%                                                        %
%                             gurari@cse.ohio-state.edu  %
%                 http://www.cse.ohio-state.edu/~gurari  %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\immediate\write-1{version |version}
>>>


\<book.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% book.4ht                             |version %
% Copyright (C) |CopyYear.1997.      Eitan M. Gurari         %
|<TeX4ht copyright|>
|<book / report / article cut points|>
|<book et al tocs|>
|<chapters for book / report|>
|<config book.sty utilities|>
|<book / report / article|>


|<config book-report-article utilities|>
|<redefine maketitle|>
|<config book-report-article shared|>
|<report,book tocs|>
\Hinput{book}
\endinput
>>>                        \AddFile{2}{book}



\<report.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% report.4ht                           |version %
% Copyright (C) |CopyYear.1997.      Eitan M. Gurari         %
|<TeX4ht copyright|>

|<book / report / article cut points|>
|<book et al tocs|>
|<chapters for book / report|>

|<config book-report-article utilities|>
|<redefine maketitle|>
|<config book-report-article shared|>
|<config report / article shared|>
|<config report.sty utilities|>
|<book / report / article|>

|<report,book tocs|>
\Hinput{report}
\endinput
>>>                        \AddFile{2}{report}



\<article.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
% article.4ht                           |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

|<book / report / article cut points|>
|<config article.sty utilities|>

|<config book-report-article utilities|>
|<redefine maketitle|>
|<config book-report-article shared|>
|<config report / article shared|>
|<config article.sty shared|>
|<book / report / article|>
|<article et al tocs|>
|<article tocs|>
\Hinput{article}
\endinput
>>>                        \AddFile{2}{article}

\<book / report / article\><<<
|<html latex tocs|>
|<book, report, article|>
|<latex options 1, 2, 3|>     |%after tocs, divs, and cuts|%
>>>


\<book, report, article\><<<
|<halign-based tables|>
>>>







\<report,book tocs\><<<
|<article tocs|>
\ConfigureToc{appendix} {\empty}{\ }{}{\newline}
\ConfigureToc{chapter} {\empty}{\ }{}{\newline}
\ConfigureToc{likechapter} {}{\empty}{}{\newline}
>>>

\<article tocs\><<<
\ConfigureToc{likeparagraph} {}{\empty}{}{\newline}
\ConfigureToc{likepart} {}{\empty}{}{\newline}
\ConfigureToc{likesection} {}{\empty}{}{\newline}
\ConfigureToc{likesubparagraph} {}{\empty}{}{\newline}
\ConfigureToc{likesubsection} {}{\empty}{}{\newline}
\ConfigureToc{likesubsubsection} {}{\empty}{}{\newline}
\ConfigureToc{paragraph} {\empty}{\ }{}{\newline}
\ConfigureToc{part} {\empty}{\ }{}{\newline}
\ConfigureToc{section} {\empty}{\ }{}{\newline}
\ConfigureToc{subparagraph} {\empty}{\ }{}{\newline}
\ConfigureToc{subsection} {\empty}{\ }{}{\newline}
\ConfigureToc{subsubsection} {\empty}{\ }{}{\newline}
>>>





\<usepackage.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% usepackage.4ht                        |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
   |<insert into latex|>
\endinput
>>>

\<insert into latex\><<<
\def\:temp{tex4ht}\ifx \:temp\@currname
   \:warning{\string\usepackage{tex4ht} again?}
   |<problem due to hyperref?|>
\fi
\gdef\a:usepackage{\use:package |<use package|>,|<par del|>}
\gdef\use:package#1,{%
   \if :#1:\def\:temp##1|<par del|>{}\else
      \def\:temp{#1}\ifx \@currname\:temp
             \def\:temp##1|<par del|>{\input usepackage.4ht  }%
      \else \let\:temp=\use:package \fi
   \fi \:temp}
|<add to usepackage|>
>>>

\<problem due to hyperref?\><<<
\def\:temp#1htex4ht.def,tex4ht.sty#2|<par del|>{\def\:temp{#2}}
\expandafter\:temp \@filelist htex4ht.def,tex4ht.sty|<par del|>%
\ifx \:temp\empty  \else
   \:warning{if 
    \string\RequirePackage[tex4ht]{hyperref} or
    \string\usepackage[tex4ht]{hyperref} was 
    used try instead, repectively,
    \string\RequirePackage{hyperref} or
    \string\usepackage{hyperref}}
\fi
>>>

%%%%%%%%%%%%%%%%%
\Part{latex.ltx}
%%%%%%%%%%%%%%%%



\Link[/usr/local/teTeX/share/texmf/tex/latex/base/latex.ltx]{}{}latex.ltx\EndLink,

\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/]{}{}latex
source components\EndLink

\def\1.#1.{\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/#1.dtx]{}{}#1\EndLink}

\<latex.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% latex.4ht                             |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<exit if already loaded|>
|<latex changes for tex4ht.sty|>
|<plain,latex utilities|>
|<latex ltclass|>     |%|1.ltclass.|%
                      |%|1.ltdirchk.|%  
|<latex ltplain|>     |%|1.ltplain.|%
                      |%|1.ltvers.|% 
                      |%|1.ltdefns.|%
                      |%|1.ltalloc.|%
                      |%|1.ltcntrl.|%
                      |%|1.lterror.|%
                      |%|1.ltpar.|%
|<latex ltspace|>     |%|1.ltspace.|% 
                      |%|1.ltlogos.|%
                      |%|1.ltfiles.|%
|<latex ltoutenc|>    |%|1.ltoutenc.|%
|<latex ltcounts|>    |%|1.ltcounts.|%
|<latex ltlength|>    |%|1.ltlength.|%
                      |%|1.ltfssbas.|%
                      |%|1.ltfsstrc.|%
                      |%|1.ltfsscmp.|%
|<latex ltfssdcl|>    |%|1.ltfssdcl.|%
                      |%|1.ltfssini.|%
                      |%|1.ltfntcmd.|%
                      |%|1.ltpageno.|%
|<latex ltxref|>      |%|1.ltxref.|%
|<latex ltmiscen|>    |%|1.ltmiscen.|%  
|<latex ltmath|>      |%|1.ltmath.|%
|<latex ltlists|>     |%|1.ltlists.|% 
|<latex ltboxes|>     |%|1.ltboxes.|% 
|<latex lttab|>       |%|1.lttab.|% 
|<latex ltpictur|>    |%|1.oltpictur.|% 
|<latex ltthm|>       |%|1.ltthm.|%
|<latex ltsect|>      |%|1.ltsect.|%
|<latex ltfloat|>     |%|1.ltfloat.|%
|<latex ltidxglo|>    |%|1.ltidxglo.|%
|<latex ltbibl|>      |%|1.ltbibl.|%
|<latex ltpage|>      |%|1.ltpage.|%
|<latex ltoutput|>    |%|1.ltoutput.|%
|<latex ltfinal|>     |%|1.ltfinal.|%
|<non classified latex|>
|<html /addcontentsline|>

\let\:MClass:|=\c:MathClass:
\NewConfigure{MathClass}[5]{\bgroup 
   \let\@nodocument|=\empty
   \let\normalcolor|=\relax
   \:MClass:{#1}{#2}{#3}{#4}{#5}\egroup}

\let\:MDelims:|=\c:MathDelimiters:
\NewConfigure{MathDelimiters}[2]{\bgroup 
   \let\@nodocument|=\empty
   \let\normalcolor|=\relax
   \:MDelims:{#1}{#2}\egroup}



\Hinput{latex}
\endinput
>>>        \AddFile{1}{latex}






\<exit if already loaded\><<<
\ifx\SaveMkHalignConf:g\:UnDef \else \expandafter\endinput\fi
>>>



 Latex prohibits content before the \`'\begin{document}' by putting
\`'\ht:everypar{\@nodocument}' before
\`'\begin{document}' to  get an error if text appears before the
beginning.  A possible solution is to put sensitive stuff
in, for instance,  \`'{ \let\@nodocument=\empty ...}'.


It is unsafe to define \''\romannumeral' because it is used
within immediate definition \''\edef', as well as definitions of macro
names \''\csname ...\romannumeral ...\endcsname'. Consider also
\''\Configure{enumerate}' (e.g.,
\HPage{paralist}
\Verbatim
\documentclass[a4paper]{article}
\usepackage{amssymb}
\usepackage{amsmath}

\setcounter{MaxMatrixCols}{10}

% \RequirePackage[nocfg]{paralist}% avoid locals
% \setdefaultenum{a.}{(i)}{A.}{I.}

\begin{document}

\title{Test}
\date
\author{C. Fierro}

Default list:
\begin{enumerate}
\item \label{7-a}$x \underset{\text{(\ref{7-i})}}{\leq }y$
\item \label{7-b} $a\underset{\text{(\ref{7-ii})}}{\geq }b$
\end{enumerate}

Custom list:
\begin{enumerate}%[\itshape (i)]{}
\item \label{7-i}$y\underset{\text{(\ref{7-a})}}{\geq }x$,
\item \label{7-ii}$b \underset{\text{(\ref{7-b})}}{\leq }a$
\end{enumerate}

\end{document}
\EndVerbatim
\EndHPage{})

\<latex ltcounts\><<<
\:CheckOption{enum}\if:Option 
   \def\:temp#1{\a:romannumeral {\expandafter
      \:slowroman\romannumeral #1@}\b:romannumeral}
   \HLet\@roman=\:temp
   \def\:temp#1{\a:romannumeral {\expandafter
      \:Slowroman\romannumeral #1@}\b:romannumeral}
   \HLet\@Roman=\:temp
\item
   :warning{for configure roman numbers use the option 'enum' (unsafe)}
\fi
\NewConfigure{romannumeral}{2}
>>>

\<latex ltcounts\><<<
\def\:Slowroman#1{\ifx @#1\else |%\@slowromancap|%
  \if i#1\I:rnum\else
  \if v#1\V:rnum\else
  \if x#1\X:rnum\else
  \if l#1\L:rnum\else
  \if c#1\C:rnum\else
  \if d#1\D:rnum\else
  \if m#1\M:rnum\else
  #1\fi\fi\fi\fi\fi\fi\fi\expandafter\:Slowroman\fi
}
\NewConfigure{Roman}[7]{%
   \def\I:rnum{#1}\def\V:rnum{#2}\def\X:rnum{#3}\def\L:rnum{#4}%
   \def\C:rnum{#5}\def\D:rnum{#6}\def\M:rnum{#7}}
\Configure{Roman}{I}{V}{X}{L}{C}{D}{M}
>>>

\<latex ltcounts\><<<
\def\:slowroman#1{\ifx @#1\else
  \if i#1\i:rnum\else
  \if v#1\v:rnum\else
  \if x#1\x:rnum\else
  \if l#1\l:rnum\else
  \if c#1\c:rnum\else
  \if d#1\d:rnum\else
  \if m#1\m:rnum\else
  #1\fi\fi\fi\fi\fi\fi\fi\expandafter\:slowroman\fi
}
\NewConfigure{roman}[7]{%
   \def\i:rnum{#1}\def\v:rnum{#2}\def\x:rnum{#3}\def\l:rnum{#4}%
   \def\c:rnum{#5}\def\d:rnum{#6}\def\m:rnum{#7}}
\Configure{roman}{i}{v}{x}{l}{c}{d}{m}
>>>



\Chapter{Classes and Packages}

\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/ltdirchk.dtx]{}{}ltdirchk.dtx\EndLink

An option \`'no_#1' asks not to load the style file \`'#1.4ht'.



\<latex ltclass\><<<
\ifx \@ifpackageloaded\:UnDef  
   \long\def\@ifpackageloaded#1#2#3{}
\fi
\def\:ifpackageloaded#1#2#3{%
   \:CheckOption{no_#1}\if:Option \:Optionfalse
   \else \@ifpackageloaded{#1}{#2}{#3}\fi}
>>>

\<NO\><<<
\def\:ifclassloaded#1#2#3{%
   \:CheckOption{no_#1}\if:Option \:Optionfalse
   \else \@ifclassloaded{#1}{#2}{#3}\fi}
\def\:iffileloaded#1#2#3{%
   \:CheckOption{no_#1}\if:Option \:Optionfalse 
   \else |<search in filelist|> \expandafter \:tempa\fi }
>>>

\<search in filelistNO\><<< 
\def\:temp{#1}\expandafter
   \:iffil\@filelist,,|<par del|>%
   \ifx \:tempa\:temp \def\:tempa{#2}\else \def\:tempa{#3}\fi 
>>>

\<latex ltclass\><<<
\def\:iffil#1,#2|<par del|>{\def\:tempa{#1}\ifx \:temp\:tempa
      \let\:tempb=\empty 
   \else
      \ifx \:tempa\empty       \let\:tempb=\empty 
      \else \def\:tempb{\:iffil#2|<par del|>}\fi
   \fi \:tempb}
>>>


We need the follwoing for definition of fonts that are introduced late, e.e., 

\Verbatim
\documentclass{amsart}
  \usepackage{textcomp}
  \usepackage{amssymb}
\begin{document}

\csname Configure\endcsname{mathfrak}{[[[[}{]]]}
\csname Configure\endcsname{mathbb}{[[[[}{]]]}

$\mathfrak{A}a^{\mathfrak{A}}$
\end{document}
\EndVerbatim



\<latex ltfssdcl\><<<
\let\document:select:group\document@select@group
\def\document@select@group#1#2#3#4{%
  \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi 
  {%
      \document:select:group{#1}{#2}{#3}{}%
      \expandafter\ifx \csname n:\expandafter
                      \:gobble\string#1:\endcsname\relax\else
      \expandafter\let\csname o:\expandafter\:gobble
                                  \string#1:\endcsname\:UnDef
      \expandafter\HLet\expandafter#1\csname
              n:\expandafter\:gobble\string#1:\endcsname
      \expand:after{\global\expandafter\let
         \csname o:\expandafter\:gobble\string#1:\endcsname}%
         \csname o:\expandafter\:gobble\string#1:\endcsname
      \global\let#1=#1%
   \fi
   #1{#4}%
}}
>>>


\Section{titlesec}





\<titlesec.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% titlesec.4ht                         |version %
% Copyright (C) |CopyYear.2000.      Eitan M. Gurari         %
|<TeX4ht copyright|>
\ifx \ttl@sect\:UnDef\else
  |<titlesec pre 2.3.5|>
\fi
\ifx \ttl@useclass\:UnDef\else
  |<titlesec since 2.3.5|>
\fi
|<shared titlesec|>
\Hinput{titlesec}
\endinput
>>>                        \AddFile{9}{titlesec}



\<titlesec since 2.3.5\><<<
\pend:defII\ttl@useclass{%
  \@ifstar {}{\SkipRefstepAnchor}}
\let\ttl:select|=\ttl@select
\def\ttl@select#1{%
  \def\sc:tp{#1}\def\c:secnumdepth{\@nameuse{ttll@#1}}%
  \ttl:select{#1}}
\let\ttl@write|=\:gobbleII
\let\ttl@glcmds\relax
\let\ttl@beginlongest\@empty
\let\ttl@midlongest\@empty
\let\ttl@endlongest\@empty
>>>





\<titlesec pre 2.3.5\><<<
\pend:defII\ttl@sect{%
  \@ifstar {}{\SkipRefstepAnchor}}
\let\ttl:select=\ttl@select
\def\ttl@select#1#2#3#4#5{%
  \def\sc:tp{#1}\def\c:secnumdepth{#5}%
  \ttl:select{#1}{#2}{#3}{#4}{#5}}
\let\ttl@write|=\:gobbleIII
>>>




\<shared titlesec\><<<
\let\ttlh:hang|=\ttlh@hang
\def\ttlh@hang#1#2#3#4#5#6#7#8{%
   \HtmlEnv  \expandafter\def\csname thetitle\sc:tp\endcsname{#2}%
   \csname no:\sc:tp\endcsname{#8}%
   \ttlh:hang{}{}{#3}{}{}{#6}{#7}{}}
>>>

\<shared titlesec\><<<
\let\:seccntformat=\@seccntformat
\def\@seccntformat#1{\ifnum 0=0\the\csname c@#1\endcsname\else
   \:seccntformat{#1}\fi}
>>>


%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Scientific Word}
%%%%%%%%%%%%%%%%%%%%%%%%%%

\Link[ftp://ftp.mackichan.com/]{}{}mackichan\EndLink,
\Link[http://cutter.ship.edu/\string
       ~ensley/tci/]{}{}tci\EndLink


\<tcilatex.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% tcilatex.4ht                         |version %
% Copyright (C) |CopyYear.2000.      Eitan M. Gurari         %
|<TeX4ht copyright|>
|<shared tcilatex|>
\expandafter\ifx \csname @TCItagstar\endcsname\relax 
   |<tcilatex 2.5|>
\else 
   |<tcilatex 3.5|>
   \ifx \@msidraft\:Undef 
      |<tcilatex 3.5 not 4.0|>
\fi \fi
|<undo swpframe|>
\Hinput{tcilatex}
\endinput
>>>                        \AddFile{2}{tcilatex}

\<undo swpframe\><<<
\let\tci:ProvidesPackage=\ProvidesPackage
\def\ProvidesPackage#1{%
   \tci:ProvidesPackage{#1}%
   \def\:temp{swpframe}\def\:tempa{#1}\ifx \:temp\:tempa
      \ifx \GRAPHICSHP\:UnDef\else
         \let\swp:GRAPHICSHP=\GRAPHICSHP
         \AtEndOfPackage{\let\GRAPHICSHP\swp:GRAPHICSHP}%
      \fi
      \ifx \graffile\:UnDef\else
         \let\swp:graffile=\graffile
         \AtEndOfPackage{\let\graffile\swp:graffile}%
      \fi
      \ifx \GRAPHIC\:UnDef\else
         \let\swp:GRAPHIC=\GRAPHIC
         \AtEndOfPackage{\let\GRAPHIC\swp:GRAPHIC}%
      \fi
  \fi
}
>>>


%       \ifx \BOXEDSPECIAL\:UnDef\else
%          \let\swp:BOXEDSPECIAL=\BOXEDSPECIAL
%          \AtEndOfPackage{\let\BOXEDSPECIAL\swp:BOXEDSPECIAL}%
%       \fi
% 
% 


The \`'\protect' in \`'\section{The second Section
  \protect\label{two}}' is problematic because of double labels when
the toc is on.  The problem can be solved with the code.



\<tcilatex post 3.5--Not Needed anymore\><<<
\def\label:gobble{\futurelet\:temp\lbl:gobble}
\def\lbl:gobble#1{\ifx\:temp\relax \expandafter\label:gobble\fi}
\AtBeginDocument{\immediate\write\:tocout{%
   \let\string\label \string\label:gobble }}
>>>




\<shared tcilatex\><<<
\def\:temp#1#2#3#4{#2\ref{#4}#3}
\ifx \:temp\hyperref
   \def\hyperref{\bgroup
        \catcode`\#=12 \catcode`\~=12 \catcode`\_=12 \h:pref}%
   \def\h:pref#1#2#3#4{\egroup\Link[#4]{}{}#1\EndLink}%
\fi
>>>


In version 4 \''\hyperref' is aliased to \''\x@hyperref'.

\<tcilatex 3.5\><<<
\def\y@hyperref#1#2#3#4{%
   \Link[#4]{}{}#1\EndLink
   \catcode`\~ = 13 
   \catcode`\$ = 3 
   \catcode`\_ = 8 
   \catcode`\# = 6 
   \catcode`\& = 4
}
>>>


\<shared tcilatex\><<<
\let\:tempc=\GRAPHICSPS
\pend:defI\:tempc{\a:GRAPHICSPS}
\append:defI\:tempc{\b:GRAPHICSPS}
\HLet\GRAPHICSPS=\:tempc
\NewConfigure{GRAPHICSPS}{2}
>>>

\<shared tcilatex\><<<
\let\:tempc=\GRAPHICSHP
\pend:defI\:tempc{\a:GRAPHICSHP}
\append:defI\:tempc{\b:GRAPHICSHP}
\HLet\GRAPHICSHP=\:tempc
\NewConfigure{GRAPHICSHP}{2}
>>>

\<shared tcilatex\><<<
\let\:tempc=\BOXTHEFRAME
\pend:defI\:tempc{\hbox\bgroup\a:BOXTHEFRAME}
\append:defI\:tempc{\b:BOXTHEFRAME\egroup}
\HLet\BOXTHEFRAME=\:tempc
\NewConfigure{BOXTHEFRAME}{2}
\let\:IFRAME=\IFRAME
\let\:DFRAME=\DFRAME
\let\:FFRAME=\FFRAME
\def\IFRAME#1#2#3#4#5#6{\a:IFRAME\leavevmode
   \IgnorePar\:IFRAME{#1}{#2}{#3}{#4}{#5}{#6}\b:IFRAME}
\def\DFRAME#1#2#3#4#5{\a:DFRAME\leavevmode
   \IgnorePar\:DFRAME{#1}{#2}{#3}{#4}{#5}\b:DFRAME}
\def\FFRAME#1#2#3#4#5#6#7#8{\a:FFRAME\leavevmode
   \IgnorePar\:FFRAME{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}\b:FFRAME}
\NewConfigure{IFRAME}{2}
\NewConfigure{DFRAME}{2}
\NewConfigure{FFRAME}{2}
>>>


%  \def\mailto{\bgroup \catcode`\#=12 \catcode`\~=12 \catcode`\_=12 \mlto}%
%  \def\mlto#1{\egroup \Link[mailto:#1]{}{}\texttt{#1}\EndLink}%

\<tcilatex 3.5\><<<
\def\:tempc#1#2{\o:QATOP:{\a:QATOP #1\b:QATOP}{\c:QATOP #2\d:QATOP}}
\HLet\QATOP=\:tempc
\NewConfigure{QATOP}{4}
\def\:tempc#1#2{\o:QDATOP:{\a:QDATOP #1\b:QDATOP}{\c:QDATOP #2\d:QDATOP}}
\HLet\QDATOP=\:tempc
\NewConfigure{QDATOP}{4}
\def\:tempc#1#2{\o:QTATOP:{\a:QTATOP #1\b:QTATOP}{\c:QTATOP #2\d:QTATOP}}
\HLet\QTATOP=\:tempc
\NewConfigure{QTATOP}{4}
>>>

\<tcilatex 3.5 not 4.0\><<<
\expandafter\ifx \csname o:dfrac:\endcsname \relax
  |<tcilatex fractions|>
\fi
>>>







The following protection, e.g., for titles of sections.

\<shared tcilatex\><<<
\let\o:Greekmath:|=\Greekmath
\def\Greekmath{\protect\o:Greekmath:}
>>>


\<seslideb.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% seslideb.4ht                         |version %
% Copyright (C) |CopyYear.2001.      Eitan M. Gurari         %
|<TeX4ht copyright|>
|<seslideb code|>
\Hinput{seslideb}
\endinput
>>>                        \AddFile{7}{seslideb}

\<seslideb code\><<<
\NewSection\swSlide{}{}
\def\PageBreak{\swSlide{\swTitle}}
\let\swTitle|=\relax
>>>




\<jeep.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% jeep.4ht                             |version %
% Copyright (C) |CopyYear.2002.      Eitan M. Gurari         %
|<TeX4ht copyright|>
|<jeep code|>
\Hinput{jeep}
\endinput
>>>                        \AddFile{9}{jeep}

\<jeep code\><<<
\let\jeep:@sect|=\no@sect
\def\no@sect#1#2#3#4#5{%
   \jeep:@sect{#1}{#2}{#3}{#4}{#5\let\@svsec=\empty}}
>>>

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Common to Plain and LaTeX-Plain}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/ltplain.dtx]{}{}ltplain.dtx\EndLink

\<latex ltplain\><<<
|<plain,ltplain obeylines,oalign|>
>>>



plain.tex and latex.

The following is assumed to be within a group.

\<plain,ltplain obeylines,oalign\><<<
\def\:temp{\o:obeylines:  
   \let\obeylines|=\o:obeylines:
   \a:obyln \global\let\x:obln|=\end:obeylines \aftergroup\x:obln 
   \def\:temp{%
      \ifx\:tempa\par \ht:everypar{\ht:everypar{\b:obyln}}%
      \else \ht:everypar{\b:obyln}\fi}%
   \futurelet\:tempa\:temp }
\HLet\obeylines|=\:temp
\NewConfigure{obeylines}[3]{\c:def\a:obyln{#1}\c:def\b:obyln{#3}%
   \c:def\end:obeylines{#2}}
>>>












\ifHtml[\HPage{more}\Verbatim
xxxxxxxxxxxxxxxxxxxxx

{\obeylines neither do
things too high for me.}

xxxxxxxxxxxxxxxxxxxxxxxxxxxx

xxxxxxxxxxxxxxxxxxxxx
{\obeylines neither do
things too high for me.}
xxxxxxxxxxxx

xxxxxxxxxxxxxxxxxxxxxxx
{\obeylines neither do
things too high for me.}

xxxxxxxxxxxxxxxxxxxxxxxxxx


xxxxxxxxxxxxxxxxxxxxx
    <P >neither do
    <P >things too high for me.
    <P >xxxxxxxxxxxxxxxxxxxxxxxxxxxx
    <P >xxxxxxxxxxxxxxxxxxxxx neither do
    <P >things too high for me. xxxxxxxxxxxx
    <P >xxxxxxxxxxxxxxxxxxxxxxx neither do
    <P >things too high for me.
    <P >xxxxxxxxxxxxxxxxxxxxxxxxxx

\EndVerbatim\EndHPage{}]\fi


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{ltspace (Horizontal Spaces)}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/ltspace.dtx]{}{}ltspace.dtx\EndLink

\<latex ltspace\><<<
\NewConfigure{hspace}{3}
\Configure{hspace}{}{}{ }
\def\:temp#1{\tmp:dim|=#1\relax
   \a:hspace \hsp:c\hskip #1\relax\b:hspace}
\HLet\@hspace|=\:temp
\def\:temp#1{\tmp:dim|=#1\relax 
   \a:hspace \hsp:c\vrule \@width\z@\nobreak
   \hskip #1\hskip \z@skip\b:hspace}
\HLet\@hspacer|=\:temp
\def\hsp:c{\ifdim \tmp:dim<1em\else\c:hspace\fi
   \ifdim \tmp:dim<2em\else\c:hspace\fi
   \ifdim \tmp:dim<3em\else\c:hspace\fi
   \ifdim \tmp:dim<4em\else\c:hspace\fi
   \ifdim \tmp:dim<5em\else\c:hspace\fi}
>>>


We need  the assignment to \''\tmp:dim'  because of commands like
\''\hspace{0.25em plus 0.125em minus 0.08em}'.


\<latex ltspace\><<<
\let\:tempc\@vspace
\append:defI\:tempc{\a:vspace{#1}}
\HLet\@vspace\:tempc
\let\:tempc\@vspacer
\append:defI\:tempc{\a:vspace{#1}}
\HLet\@vspacer\:tempc
\NewConfigure{vspace}[1]{\def\a:vspace##1{#1}}
\Configure{vspace}{}
>>>


%%%%%%%%%%%%%%%%%%
\Chapter{ltlength}
%%%%%%%%%%%%%%%%%%

\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/ltlength.dtx]{}{}ltlength.dtx\EndLink

%
%>>>

The commands \''\settoheight', \''\settodepth', and \''\settowidth'
invoke \''\setbox' without producing output. To avoid fake pictures,
we do the following.

\<latex ltlength\><<<
\let\:settodim|=\@settodim
\def\@settodim#1#2#3{\PictureOff \:settodim#1{#2}{#3}\PictureOn}
>>>

























%%%%%%%%%%%%%
\Chapter{Cross References}
%%%%%%%%%%%%%




\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/ltxref.dtx]{}{}ltxref.dtx\EndLink




\<latex ltxref\><<<
|<no lbl index|>
|<cross ref|>
>>>


%%%%%%%%%%%%%
\Section{Index Labels}
%%%%%%%%%%%%%



Try to delete, or at least contain, \''\no:lbl:idx'.

\<no lbl index\><<<
\def\no:lnk#1#2#3\EndLink{#3}
\let\:ref|=\ref
\let\:index|=\index
\def\no:lbl:idx{\let\label|=\@gobble }
\def\toc:lbl:idx{\a:NoSection}
>>>



%%%%%%%%%%%%%
\Section{ref, label, newlabel}
%%%%%%%%%%%%%

%%%%%%%%%%%%%
\SubSection{Usage}
%%%%%%%%%%%%%


\<cross ref\><<<
\def\:tempc#1{\a:pageref\o:pageref:{#1}\b:pageref}
\HLet\pageref\:tempc
\NewConfigure{pageref}[3]{%
   \def\a:pageref{#1\bgroup \Configure{ref}{\Link}{\EndLink}{#3}}%
   \def\b:pageref{\egroup #2}%
}
\Configure{pageref}{}{}{}
>>>

\<cross ref\><<<
\NewConfigure{@newlabel}[1]{\concat:config\a:@newlabel{#1}}
\let\a:@newlabel|=\relax
\NewConfigure{newlabel}[2]{%
   \def\a:newlabel{#1}\ifx  \a:newlabel\empty
      \def\label:addr{\cur:th \:currentlabel}%
   \else
      \def\label:addr{#1}%
   \fi
   \def\a:newlabel##1{\expandafter\string\c:rEfLiNK{\label:addr}{#2}}}
\NewConfigure{ref}[3]{%
   \def\a:rEfLiNK{#1}\def\b:rEfLiNK{#3}%
   \ifx \a:rEfLiNK\empty 
      \ifx \b:rEfLiNK\empty
         \expandafter\def\c:rEfLiNK##1##2{##2}%
      \else
         \expandafter\def\c:rEfLiNK##1##2{#3}%
      \fi
   \else 
      \ifx \b:rEfLiNK\empty
         \expandafter\def\c:rEfLiNK##1##2{#1{##1}{}##2#2}%
      \else
         \expandafter\def\c:rEfLiNK##1##2{#1{##1}{}#3#2}%
      \fi
   \fi
   \def\b:rEfLiNK{#2}%
}
\Configure{newlabel}{\cur:th \:currentlabel}{#1}
\NewConfigure{newlabel-ref}[1]{\def\c:rEfLiNK{#1}%
   \ifx \at:startdoc\:UnDef \dflt:ref{#1}\else
      \pend:def\at:startdoc{\dflt:ref{#1}}\fi
}
\def\dflt:ref#1{\if@filesw\immediate\write\@auxout{\string\ifx
    \string#1\string\UnDef\gdef\string#1\#1\#2{\#2}\string\fi}\fi}
\Configure{newlabel-ref}{\rEfLiNK}
\let\:writefile|=\@writefile
\def\@writefile#1{\bgroup \catcode`\:|=11 \:wrtfile{#1}}
\def\:wrtfile#1#2{\egroup\:writefile{#1}{#2}}
>>>



\List{*}
\item
\`'\Configure{ref}{\Link}{\EndLink}{anchor}' tells what \''\Link'-type command
should be on insertions of \''\ref'.  If the third parameter is empty,
the anchor is the one provided by the system. If the first parameter
is empty, no Link is assumed.

\item
\''\Configure{newlabel}{\cur:th \:currentlabel}{#1}' supplies the
target address and the anchor.  
\item
\''\Configure{newlabel}{}{#1}' 
is equivalent to
\''\Configure{newlabel}{\cur:th \:currentlabel}{#1}' 
\item
The
\''\Configure{newlabel-ref}{\rEfLiNK}' command provides an
intermediate link command for the aux command, which
\`'\Configure{ref}{\Link}{\EndLink}{anchor}' configures.   If the first
field of the  last configuration command is empty, than the anchor is
provided without its surrounding. 
\EndList

\Verbatim

 > One more thing.  You will notice from `minitoc.tex' that the HTML
 > anchors given to the sections depend on the value of \@currentlabel,
 > be it set explicitely or implicitly (e.g., by the previous section).
 > Is it what you want ?

Yes.  I believe the reason was to avoid ambiguities--unfortunately,
I can't locate now where they could occur.


{\makeatletter \gdef\@currentlabel{XxX}}
\section*{first section/First chapter}
\section{second section/First chapter}
\section*{third section/First chapter}

\EndVerbatim


\SubSection{Hooking into Label}

\<cross ref\><<<
\let\:label|=\label
\def\label{\relax
   \expandafter\ifx \csname cur:th\endcsname\relax \expandafter\:label
   \else \expandafter\l:bel \fi}
\let\lb:l|=\label
\def\l:bel#1{\@bsphack\if@filesw {\let\thepage|=\relax
   |<control @|>%
   \let\protect|=\@unexpandable@protect \cur:lbl{}%
   \ifx \EndPicture\:UnDef
      \ifx \cur:th\skip:anchor
         |<if-label anchors|>%
      \else \ifx \:currentlabel\empty
         |<pre section anchor|>%
      \fi \fi
   \else
      |<anchors for pictures|>%
   \fi
   \a:@newlabel
   \edef\@tempa{\write\@auxout{\string
      \newlabel{#1}{{|<logical label|>}{|<page label|>}|<hyperref label|>}}}%
   \expandafter}\@tempa
   \if@nobreak \ifvmode\nobreak\fi\fi\fi
   |<cancel if-label anchors|>%
   \@esphack}
|<sub/sup in labels/refs|>
>>>


We had before \`'\ifx \EndPicture\:UnDef...\else...\fi' embeded within
\`'\ifx \cur:th\skip:anchor' but that eliminated the anchors for
eqnarray of pictures.


To save memory, we try to get anchors only when refered by labels.
For instance, this is the case for \''\@thm'.

\<if-label anchors\><<<
\bgroup   \a:@newlabel
   \Make:Label{\label:addr}{}\egroup
>>>

\<cancel if-label anchors\><<<
\let\skip:anchor|=\:UnDef
>>>


The following deals with labels \''\label' provided before sectioning commands.

\<pre section anchor\><<<
\def\:currentlabel{doc}%
|<if-label anchors|>%
>>>
         


\<replace AutoRefstepAnchor\><<<
\def\AutoRefstepAnchor{\SkipRefstepAnchor}
>>>

The following is to ensure anchors for labels in pictures.


\<anchors for pictures\><<<
\begingroup
   \a:@newlabel
   \edef\:temp{\noexpand\AfterPicture{%
       \noexpand\Make:Label{\label:addr}{}%
       \noexpand\uno:lbl{\label:addr}}%
   }\:temp
\endgroup
>>>


The following is to avoid eliminated anchors as is the case in, for instance, \`'\[xx\label{a}\label{b}\] '.

\<cross ref\><<<
\def\uno:lbl#1{\def\:temp{#1}\futurelet\:tempa\I:lbl}
\def\I:lbl{\ifx \:tempa\Make:Label \expandafter\no:mklbl \fi}
\def\no:mklbl#1#2#3{\def\:tempa{#2}\ifx \:temp\:tempa \else
   \Make:Label{#2}{#3}\fi}
>>>


\<logical label\><<<
\a:newlabel\@currentlabel
>>>

The anchor for the page is approximated to the anchor of the logical unit.
This is so to solve the possible problem of having a \`'label' in a position
where \`'<A>' links are not allowed. 

\<page label\><<<
\a:newlabel\thepage
>>>


\<cross ref\><<<
\let\:currentlabel|=\empty
>>>

In pure latex, \''\Configure{newlabel}{##1}'.



The following is treated in a similar manner to cite.
It provides the means to disable nested links in
entries of tocs. The \''\Link' doesn't seem to need
the \''[]' option there, so a \''\:gobbleII' can do the job.











A better def is given to \''\l:bel' in AmsLaTeX .



\<sub/sup in labels/refs\><<<
\let\l:bel:|=\l:bel
\def\l::bel#1{{\:SUBOff\:SUPOff\xdef\:temp{\noexpand\l:bel:{#1}}}\:temp}
\def\l:bel{\Protect\l::bel}
\let\o:ref|=\:ref
\def\::ref#1{{\:SUBOff\:SUPOff\xdef\RefArg{#1}}\expandafter\o:ref
                                               \expandafter{\RefArg}}
\def\:ref{\Protect\::ref}
\let\ref|=\:ref
>>>

Without the \'''\expandafter' we may get \''\RefArg' passed
 as the first argument to \''\T@arg',
resulting in \''\def\RefArg{\RefArg}'.


\<sub/sup in labels/refs\><<<
\let\:newl@bel|=\@newl@bel
\let\n:wlbl|=\@newl@bel
\def\@newl@bel#1#2{{\:SUBOff\:SUPOff
   \xdef\:temp{\noexpand\n:wlbl{#1}{#2}}}\:temp}
>>>



\<sub/sup in labels/refs\><<<
\let\:testdef|=\@testdef
\def\@testdef #1#2{{\:SUBOff\:SUPOff
   \xdef\:temp{\noexpand\:testdef{#1}{#2}}}\:temp}
>>>




\Section{@currentlabel}






The second parameter of \''\anc:lbl' is a counter name, when such is know.



The \`'\@currentlabel' comes sometimes with font info.  Normally, it
comes from \''\refstepcounter' in the form of
\''\the..counter-name..'. In such cases, we can take the counter
name which is provided in the parameter of \''\cur:lbl'.



\<cross ref\><<<
\NewConfigure{@:currentlabel}[1]{\concat:config\a:@:currentlabel{#1}}
\let\a:@:currentlabel|=\relax
\def\cur:lbl#1{{\a:@:currentlabel 
  |<body of cur:lbl|>\expandafter}\:currentlabel}
>>>

\<body of cur:lbl\><<<
\def\:currentlabel{\par}%
\ifx\@currentlabel\:currentlabel 
   \def\:currentlabel{\let\:currentlabel|=\empty}%
\else \def\:currentlabel{#1}%
   \edef\:currentlabel{\def\noexpand
                 \:currentlabel{\ifx\:currentlabel\empty
         \ifx \:@currentlabel\:UnDef \@currentlabel
         \else \:@currentlabel \fi
      \else 
          \expandafter\ifx\csname #1:Count\endcsname\relax
             \expandafter\the\csname c@#1\endcsname
          \else \csname #1:Count\endcsname\fi
      \fi}}%
\fi
>>>




The \''\label' command of latex invokes \''\cur:lbl{}'. If
\''\:@currentlabel' is deined, it is the to be used for the current label.
The   \''\ltx@label' command of amsmath.sty ignores it.

Whenever \''\@currentlabel' is redefined, we also want to redefine
\''\:@currentlabel'. It is redefined in 
\List{*}
\item  latex.ltx within
    \''\refstepcounter', \''\eqnarray', \''\@mpfootnotetext',
     and \''\@footnotetext';
\item amsart.cls, amsbook.cls, and amsproc.cls
    within \''eqnarray' and \''\@footnotetext'; 
\item amsmath.sty within
    \''\df@tag' and \''\make@df@tag@@';  
\item amstex.sty  within
    \''\@currentlabel', \''\@seteqlabel', and \''multline*'. 
\EndList





\<def :currentlabel for make@df@tag\><<<
\let\cnt:currentlabel|=\@currentlabel
\def\:@currentlabel{\ifx \cnt:currentlabel\@currentlabel
   \expandafter\the\csname c@equation\endcsname\else \@currentlabel\fi}%
>>>


\<def :currentlabel for refstepcounter\><<<
\let\cnt:currentlabel|=\@currentlabel
\def\:@currentlabel{\ifx \cnt:currentlabel\@currentlabel
   \expandafter\the\csname c@#1\endcsname\else \@currentlabel\fi}%
>>>



\<def :currentlabel for eqnarray\><<<
\html:addr \edef\cur:th{|<haddr prefix|>\last:haddr r}% 
>>>

\<def :currentlabel for eqncr\><<<
\anc:lbl r{}%
>>>


\<def :currentlabel for pic-eqnarray\><<<
|<def :currentlabel for eqnarray|>
\def\cnt:currentlabel{\p@equation\theequation}%   
\def\:@currentlabel{\ifx \cnt:currentlabel\@currentlabel
   \expandafter\the\csname c@equation\endcsname\else \@currentlabel\fi}%
>>>


\Section{/link for /label from /refstepcounter}

The following is late arrival into TeX4ht, inserted for handling
\''\newtheorem', and possibly other structures.  It might cause
duplicated anchors.  At least in the  case of figures and lists they
are overided by other anchors, and hence not needed. In case of 
lists and new theorems we ended to delete the overriden case. Still
need to do it
for pictures, and amybe also other cases.




The \''\refstepcounter' may appear in places (e.g., before first item
of a list) where no text is allowed, hence we have to ensure that
\''\anc:lbl' will not break this restriction.
How about within pictures?




\<cross ref\><<<
\append:defI\refstepcounter{%
  |<def :currentlabel for refstepcounter|>%
  \anc:lbl r{#1}}
\def\anc:lbl#1#2{%
   \html:addr   \edef\cur:th{|<haddr prefix|>\last:haddr #1}%
   \ifx \EndPicture\:UnDef
      {\let\leavevmode|=\empty \cur:lbl{#2}%
      \Make:Label{\cur:th\:currentlabel}{}}%
   \else \ifx \label\@gobble \else  \cur:lbl{#2}%
       \edef\:temp{\noexpand\AfterPicture{%
          \noexpand\Make:Label{\cur:th\:currentlabel}{}}}\:temp
   \fi \fi}
\let\onc:lbl|=\anc:lbl
\def\SkipRefstepAnchor{\def\anc:lbl##1##2{\html:addr
   \edef\cur:th{|<haddr prefix|>\last:haddr}\ShowRefstepAnchor
   \let\skip:anchor|=\cur:th}}
\def\ShowRefstepAnchor{\let\anc:lbl|=\onc:lbl}
|<replace AutoRefstepAnchor|>
\html:addr   \edef\cur:th{|<haddr prefix|>\last:haddr}
>>>


% \def\AutoRefstepAnchor{\def\anc:lbl##1##2{\onc:lbl{##2}{}%
%   \ShowRefstepAnchor}}



We can't use ref- below, because 


The MakeLabel removes duplicates such as in

\Verbatim
         \documentclass{article}
         \begin{document}
            \begin{equation}\label{jh}
              c
            \end{equation}
         \end{document}
\EndVerbatim


For memory conservation, a maximum is placed on the number of labels
recorded.

\<cross ref\><<<
\def\Make:Label#1#2{%
   \def\:tempb##1|<par del|>{%
      \xdef\Made:Labels{{#1}\Made:Labels}%
      \hbox{\Link{}{#1}#2\EndLink}%
      \trim:Labels
   }%
   \def\:tempc##1|<par del|>{\hbox{#2}}%
   \let\:next=\check:labels \edef\:tempa{#1}%
   \expandafter\:next\Made:Labels{}|<par del|>%      
}
>>>

\<cross ref\><<<
\let\Made:Labels=\empty
\def\check:labels#1{%
   \def\:temp{#1}\ifx\:temp\empty \let\:next=\:tempb 
   \else\ifx \:temp\:tempa        \let\:next=\:tempc
   \fi \fi
   \:next }
>>>

\<cross ref\><<<
\HAssign\Labels:Cnt |= 0
\def\trim:Labels{%
   \ifnum \Labels:Cnt>100 
      \def\:tempa##1|<par del|>{}%
      \gHAssign\Labels:Cnt = 0
      \let\:tempb\Made:Labels  
      \let\Made:Labels\empty
      \expandafter\keep:Labels\:tempb|<par del|>%
   \else \gHAdvance\Labels:Cnt by 1 \fi
}
\def\keep:Labels#1{\relax
   \ifnum \Labels:Cnt<50
     \xdef\Made:Labels{\Made:Labels{#1}}\gHAdvance\Labels:Cnt |by 1
         \expandafter\keep:Labels
   \else \expandafter\:tempa \fi }
>>>



We need the \''\hbox' above because \''\label' complains if vertical
mode is replaced with horizontal mode.


\`'   \let\Link:Labe|=\Make:Label
   \def\Tag:Label#1#2{\Tag{fR\label:Count}{#1}#2\GetLabel}
   \def\LinkLabels{\let\Make:Label|=\Link:Label} 
   \def\SendLabels{\let\Make:Label|=\Tag:Label}'


\ifHtml[\HPage{test data}\Verbatim
\newtheorem{example}{Example}[section]

\begin{example} 

\label{E}

\end{example} 

Example \ref{E}

\EndVerbatim\EndHPage{}]\fi

\Section{divisions in tex4ht.sty}



\<elements for latex divs\><<<
\def\Get:SecAnchor#1#2#3{%
   |</edef /@currentlabel|>%
   \xdef\cur:th{|<haddr prefix|>\last:haddr}%
   |<get :currentlabel|>%
   \edef\:SecAnchor{\cur:th\:currentlabel}%
 }
>>>


We redefine \''\@Roman' for \''\thepart' to have the same number
of entries as \''\Alph'.

\</edef /@currentlabel\><<<
\bgroup  \def\@Roman##1{%
  \ifcase##1\or I\or II\or III\or IV\or V\or VI\or 
     VII\or VIII\or IX\or X\or XI\or XII\or XIII\or 
     XIV\or XV\or XVI\or XVII\or XVIII\or XIX\or XX\or 
     XXI\or XXII\or XXIII\or XXIV\or XV\or XVI\else
     \expandafter\uppercase\expandafter{\romannumeral ##1}\fi}%
   \a:currentlabel
   \edef\:temp{#2}\ifx \:temp\empty
   \else \global\let\@currentlabel|=\:temp\fi
\egroup
>>>

\<cross ref\><<<
\NewConfigure{currentlabel}{1}
>>>


The \''\@currentlabel' may hold a \''\uppercase' due to \''\thepart'
that has a \''\@Roman' in it.
Tried to go for \`'\cur:lbl{#1}%', but that was a problem for cross
references with labels of sections, because \''\label' uses \`'\cur:lbl{}'.

\<get :currentlabel\><<<
\let\:tempa|=\uppercase \def\uppercase##1{##1}\cur:lbl{}%
\let\uppercase|=\:tempa
>>>


How the above  \`'\global\let\cur:th|=\last:haddr'
work with the change in \''\refstepcounter'?


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
\Section{apacite.sty bibtex}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  




\<apacite.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% apacite.4ht                         |version %
% Copyright (C) |CopyYear.2000.      Eitan M. Gurari         %
|<TeX4ht copyright|>
   |<apacite.sty|> 
   \ifx \@@citeNP\:UnDef
     |<apacite 2003|>
   \else
     |<pre 2003 apacite|>
   \fi
\Hinput{apacite}
\endinput
>>>        \AddFile{9}{apacite}


\<apacite.sty\><<<
\def\B:my@dummy{\B@my@dummy}
\def\:citeP{\@citeP}

\def\:tempc<#1>[#2]#3{%
   \start:cite\a:cite \o:@@cite:<#1>[#2]{#3}\b:cite \end:cite
}
\HLet\@@cite=\:tempc
>>>


\<apacite 2003\><<<
\def\start:cite{%
   \let\sv:edef\edef
   \let\gobble:cite=\:gobble
   \def\edef##1{\def\:temp{##1}%
      \ifx \:temp\B:my@dummy
         \ifx \o:BCA\:UnDef
             \ifx \BCA\:UnDef\else
                \let\o:BCA=\BCA
                \def\BCA####1####2{\Protect\cIteLink{X\@citeb}{}%
                       \o:BCA{####1}{####2}\Protect\EndcIteLink}%
             \fi
         \fi
      \fi
      \sv:edef##1}%
}
\def\end:cite{%
   \let\edef=\sv:edef
   \let\BCA=\o:BCA  \let\o:BCA=\:UnDef
}
>>>



\<pre 2003 apacite\><<<
\def\start:cite{%
   \let\sv:edef\edef
   \let\gobble:cite=\:gobble
   \def\edef##1{\def\:temp{##1}%
      \ifx \:temp\B:my@dummy
         \cIteLink{X\@citeb}{}\let\gobble:cite=\empty
         \ifx \o:@BBOP\:UnDef 
             \let\o:@BBOP=\@BBOP
             \let\o:@BBAY=\@BBAY
             \pend:def\@BBOP{\gobble:cite\EndcIteLink
                        \let\gobble:cite=\:gobble}%
             \pend:def\@BBAY{\gobble:cite\EndcIteLink
                        \let\gobble:cite=\:gobble}%
         \fi
      \fi
      \ifx \:temp\:citeP
         \gobble:cite\EndcIteLink \let\gobble:cite=\:gobble
      \fi
      \sv:edef##1}%
}
\def\end:cite{%
   \let\edef=\sv:edef
   \let\@BBOP=\o:@BBOP  \let\o:@BBOP=\:UnDef
   \let\@BBAY=\o:@BBAY  \let\o:@BBAY=\:UnDef
}
\def\:tempc[#1]#2{%
   \start:cite\a:cite \o:@citeA:[#1]{#2}\b:cite \end:cite
}
\HLet\@citeA=\:tempc
\def\:tempc[#1]#2{%
   \start:cite\a:cite \o:@citeyear:[#1]{#2}\b:cite \end:cite
}
\HLet\@citeyear=\:tempc
\def\:tempc<#1>[#2]#3{%
   \start:cite\a:cite \o:@@citeNP:<#1>[#2]{#3}\b:cite \end:cite
}
\HLet\@@citeNP=\:tempc
\def\:tempc#1{%
   \start:cite\a:cite \o:@citeauthor:{#1}\b:cite \end:cite
}
\HLet\@citeauthor=\:tempc
\def\:tempc[#1]#2{%
   \start:cite\a:cite \o:@citeyearNP:[#1]{#2}\b:cite \end:cite
}
\HLet\@citeyearNP=\:tempc
>>>





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
\Section{mla.sty bibtex}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  


\<mla.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% mla.4ht                             |version %
% Copyright (C) |CopyYear.2002.      Eitan M. Gurari         %
|<TeX4ht copyright|>
   |<mla.sty|> 
\Hinput{mla}
\endinput
>>>        \AddFile{9}{mla}


\<mla.sty\><<<
\catcode`\:=12  
\def\@citedatax[#1]#2{%
\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
  \def\@citea{}\csname a:cite\endcsname
  \@cite{\@for\@citeb:=#2\do%
    {\@citea\def\@citea{, }\@ifundefined% by Young
       {b@\@citeb}{{\bf ?}%
       \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
       {\cIteLink {X\@citeb}{}\csname b@\@citeb\endcsname \EndcIteLink
   }}}{#1}\csname b:cite\endcsname}
\catcode`\:=11 
>>>


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
\Section{varioref.sty}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  


\<varioref.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% varioref.4ht                         |version %
% Copyright (C) |CopyYear.1997.      Eitan M. Gurari         %
|<TeX4ht copyright|>
   |<varioref.sty|> 
\Hinput{varioref}
\endinput
>>>        \AddFile{8}{varioref}

\<varioref.sty\><<<
   |<fix varioref|>
   |<varioref.sty shared config|>
>>>


\<fix varioref\><<<
\let\:vpageref|=\@@vpageref
\def\@@vpageref#1[#2]#3{{%
  \advance\c@vrcnt\@ne
  \expandafter\let\csname r@\the\c@vrcnt @vr\expandafter\endcsname
        \csname r@\the\c@vrcnt @xvr\endcsname
  \advance\c@vrcnt-\@ne  
  \Configure{ref}{}{}{}%
  \:vpageref{#1}[#2]{#3}}}
>>>


\Link[/n/ship/0/packages/tetex/teTeX/texmf/tex/latex/tools/varioref.sty]{}{}%
varioref.sty\EndLink




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
\Section{amstex}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  



\<label of amstex.sty\><<<
\edef\l:bel#1{\noexpand\@bsphack
   \expandafter\noexpand\csname iffirstchoice@\endcsname
   \expandafter\noexpand\csname if@filesw\endcsname
   \noexpand \L:bll{#1}%
   \expandafter\noexpand\csname if@nobreak\endcsname
   \noexpand\ifvmode\noexpand\nobreak\noexpand\fi
   \expandafter\noexpand\csname fi\endcsname
   \expandafter\noexpand\csname fi\endcsname
   \expandafter\noexpand\csname fi\endcsname
   \noexpand\@esphack}
\def\L:bll#1{{\let\thepage|=\relax
   \def\protect{\noexpand\noexpand\noexpand}%
   \cur:lbl{}\let\Link|=\:gobbleII \let\EndLink|=\empty \let\ref|=\o:ref
   \a:@currentlabel
   \xdef\@gtempa{\write\@auxout{\string
      \newlabel{#1}{{|<logical label|>}{|<page label|>}|<hyperref label|>}}}%
   }\@gtempa}
\let\l:bel:|=\l:bel
>>>




\Section{ref-}





To reduce conflicts, we deal with labels indirectly
through a counter. The counter is increased before
\''\getlabel' and after \''ref'. That is, this pair is assured
consistency of a label.  The separation between \''\GetLabel' and
\''\PutLabel' is
to allow the latter one into immediate arguments such as \''\HCode'
and \''\Tg'.

\''\label' sends its info to \''\getlabel'. It insert a 
\`'<pageref name="#1">' iff it is a target of a \''\pageref'.

\Verbatim
\:info{\string\Configure{label}{\string#1}{\string#1}}
\:info{\string\Configure{pageref}{\string#1}}
\:info{\string\Configure{ref}{\string#1}}



\Configure{label}{#1}{\HCode{[pagelabel label="#1"/]}}
\Configure{pageref}{\HCode{[pageref label="#1"/]}}
\Configure{ref}{\HCode{[ref label="#1"/]}}
\GetLabel \PutLabel  \ref{a}  \pageref{a}  \label{a}
\EndVerbatim


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
\Chapter{Miscellaneous Environments}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  



\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/ltmiscen.dtx]{}{}ltmiscen.dtx\EndLink

\<latex ltmiscen\><<<
|<html latex env|>
|<html latex local env|>
>>>


\Section{document...enddocument}




\<html latex hook on end\><<<
\let\end|=\o:end
\let\o:end|=\:UnDef
\let\o:enddocumenthook|=\@enddocumenthook
\def\@enddocumenthook{\HtmlEnv
   \o:enddocumenthook
   \at:docend  \csname export:hook\endcsname  }
>>>

\<html latex start\><<<
\def\:startdoc{%
   \pageno=1
   \let\no@document|=\document
   \def\document{%
      \let\document|=\no@document 
      \let\no@document|=\:UnDef
      \document \at:startdoc }%
}
>>>

\Section{Output Encoding}


Connector punctuation (the default is probably not the right one for
unicode):

\<latex ltoutenc\><<<
\NewConfigure{textundescore}[1]{\expandafter
   \def\csname ?\string\textunderscore\endcsname{\leavevmode#1}}
\Configure{textundescore}{\HChar{95}}
>>>


\<latex ltoutenc\><<<
\expandafter\let\expandafter\OMS:textcircled\csname
                               OMS\string\textcircled\endcsname
\expandafter\def\csname OMS\string\textcircled\endcsname#1{%
   \def\:next{\OMS:textcircled{#1}}%
   \def\:temp{#1}\expandafter\scan:textcircled\a:textcircled{}|<par del|>%
   \:next  }
\def\scan:textcircled#1{\def\:tempa{#1}\ifx \:tempa\empty
      \expandafter\gob:textcircled
   \else
     \ifx \:tempa\:temp
          \expandafter\expandafter\expandafter\found:textcircled
     \else\expandafter\expandafter\expandafter\cont:textcircled \fi
   \fi}
\def\found:textcircled#1#2|<par del|>{\def\:next{#1}}
\def\gob:textcircled#1|<par del|>{}
\def\cont:textcircled#1{\scan:textcircled}

\NewConfigure{textcircled}[1]{%
   \def\:temp{#1}\ifx \:temp\empty \let\a:textcircled\empty \fi
   \get:textcircled{#1}}
\def\get:textcircled#1{\def\:temp{#1}\ifx \:temp\empty
  \else
     \append:def\a:textcircled{{#1}}\expandafter\more:textcircled
   \fi }
\def\more:textcircled#1{%
   \append:def\a:textcircled{{#1}}\get:textcircled}
\Configure{textcircled}{}
>>>



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Blocks: The /begin.../end Delimiters}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


The command \`'\begin{xxx}' referes to the meaning of \`'\xxx',
and the command \`'\end{xxx}' referes to the meaning of \`'\endxxx'.



  




\<latex ltmiscen\><<<
\let\o:begin:|=\begin
\let\choose:begin\@firstoftwo
\def\begin#1{\csname @begin:#1\endcsname \choose:begin
  {\let\choose:begin\@firstoftwo |<revised begin|>}%
  {\o:begin:{#1}}}
\def\recall:afterend{\ifx \chk:pic\:UnDef
   |<recall after /end|>\fi}
|<hooks+ for ConfigureEnv|>
\NewConfigure{@begin}[2]{% 
   \expandafter\ifx\csname @begin:#1\endcsname\relax\fi
   \expandafter\concat:config\csname @begin:#1\endcsname{#2}}
>>>

% \pend:defI\begin{\ifx \EndPicture\:Undef 
%  \PushStack\envn:list\n:list  \SaveEverypar \fi}


\<revised begin\><<<
\ifx \EndPicture\:Undef 
  \PushStack\envn:list\n:list  \SaveEverypar \fi
|<before begin(...)|>%
\@ifundefined{#1}%
  {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
  {\def\reserved@a{\def\@currenvir{#1}%
   \edef\@currenvline{\on@line}%
   |<LoopOf before begin(...)|>%
   \csname #1\endcsname 
   |<after begin(...)|>}}%
\global\@ignorefalse 
\begingroup\@endpefalse \reserved@a
>>>


\<before begin(...)\><<<
\let\chk:pic|=\EndPicture 
\ifx \EndPicture\:UnDef  \list:save   
\let\after:end|=\empty   \csname before:begin#1\endcsname   \fi
>>>


\<LoopOf before begin(...)\><<<
\ifx \EndPicture\:UnDef
   \ifx \this:listConfigure\empty  
       \null:listConfigure  \csname on#1:list\endcsname \fi
\fi
>>>

The \''\before:begin' ensures that only the outer most 
\''\before:begin...' will be activated.  

\<after begin(...)\><<<
|%                 % can't put anything after \csname #1\endcsname
\let\before:begin|=\:UnDef
|%               %
>>>

The \`'\ifx \EndPicture\:UnDef...\fi' should be inside
\''\recall:afterend', and not on top of it, because we want the conditions 
that exited before entering the group. It is expressed indirectly theough
\`'\chk:pic'.


A definition \''\HLet\end\...' would not work for cases that pictures
are initiated within  \''\begin{...}'. For instance, in eqnarray there
  is an embedded \`'$$' that can start a picture environment.

\Verbatim
\begin{eqnarray}
  x &=& y \\
  z &=& ww
\end{eqnarray}
\EndVerbatim

\<latex ltmiscen\><<<
\let\o:end:|=\end
\def\end#1{\choose:begin
  {|<revised end|>}%
  {\o:end:{#1}}}
>>>

\<revised end\><<<
%\IgnoreIndent
  \ifvmode |<ignore par before hline in end|>\fi
  \csname end#1\endcsname\@checkend{#1}%
  \aftergroup\recall:afterend
  \expandafter\endgroup\if@endpe\@doendpe\fi
  \ifx \chk:pic\:UnDef  |<after end of /end|>%
     |<check Everypar at end|>\list:recall \fi
  \if@ignore\global\@ignorefalse\ignorespaces\fi
>>>


A \`'\def\::temp{...}\HLet\end=\:temp' is no good in cases like
\Verbatim
xxxxxxx
\begin{equation}
g(E) = 
\fff{....\meaning\end}
\end{equation}
yyyyyyyy
\EndVerbatim
because the \`'\end' is within picture which brings
the false part in \`'\ifx \EndPicture\:UnDef \n:end:\else \o:end:\fi'.

The \''\csname before:begin#1\endcsname' sends \''\csname
after:end#1\endcsname' to the end with \''\csname
after:end\endcsname'.  Hence, allowing to change or interrupt the
delivery by redefining \''\csname after:end\endcsname' on the way.

        
\<after end of /end\><<<
\csname after:end\endcsname   
\expandafter\let\csname after:end\endcsname|=\:UnDef
>>>


\<check Everypar at end\><<<
\PopStack\envn:list\:tempb
\ifnum \:tempb=\n:list \else
   \def\:temp{#1}\def\:tempa{thebibliography}\ifx \:temp\:tempa
   \else\:warning{\string\SaveEverypar's: \:tempb\space at
          \string\begin{#1} and \n:list\space \string\end{#1}}%
\fi \fi
>>>

The  \''\thebibliography' contains a \`'chapter*'  which is
a problem here in case of cutoff because we get
\`'\SaveEverypar....\HPage...\RecallEverypar....\EndHPage', 
where the hypertext also saves and recalls the status. Hence, a partial 
overlap that would have forced a warning.




The \''\RecallEverypar' must appear first because it sets the
counter \''\n:list', the appropriate \''\ht:everypar' contents,
and \''\ShowIndent' or \''\IgnoreIndent'.


The \''\@doendpe' deals with piles of \''\end's.     The 
\`'\Protect\HtmlPar' goes to the first paragraph outside the
pile.


\<recall after /endNO\><<<
\ifhmode \hfill\break\fi
\edef\@doendpe{%
   \if:removeindent \noexpand\IgnoreIndent \else \noexpand\ShowIndent \fi
   \if:nopar        \noexpand\IgnorePar\else \noexpand\ShowPar\fi}%
\RecallEverypar \@doendpe
\edef\@doendpe{\noexpand\@endpetrue
   \def\noexpand\par{\noexpand\@restorepar
      \ht:everypar{\noexpand\HtmlPar}%        |%\the\ht:everypar|%
      \noexpand\par\noexpand\@endpefalse }%
   \ht:everypar{{\setbox\z@\lastbox}%
      \noexpand\if@endpe \noexpand\HtmlPar \noexpand\fi
      \ht:everypar{\the\ht:everypar}%
      \noexpand\@endpefalse}%
   }%
>>>

\<recall after /end\><<<
\ifhmode \hfill\break\fi
\RecallEverypar
>>>

\<latex ltmiscen\><<<
\def\:tempc{\@endpetrue
   \def\par{\@restorepar\ht:everypar{\HtmlPar}\par\@endpefalse}%
   \ht:everypar{{\setbox\z@\lastbox}\IgnoreIndent\HtmlPar
                \ht:everypar{\HtmlPar}\@endpefalse}}
\HLet\@doendpe\:tempc
>>>





The \''\hfill\break' is to help prevent losses of space separators.

We might get here leading empty paragrphs after an \`'\end'. Is there
a way to remove them without a post processor.

\HPage{Yes!}
\Verbatim

\newenvironment{toto}%
    {\begin{list}{\textbullet}{}}%
    {\end{list}\addvspace{4ex}}
\begin{document}

xxx

\begin{toto}
\item Bla bla bla...
\end{toto}
xxxx

\begin{toto}
\item Bla bla bla...
\end{toto}

xxxx
\EndVerbatim

\EndHPage{}


We can't add grouping of the  form
\`'\append:defI\begin{\bgroup}.......\pend:defI\end{\egroup}'
 for catching enclosed fonts because \''\begin{...}' commands might
include parametric subcommands like in
\`'\begin{list}{default-label}{definitions}...\end{list}'.


La\TeX{} changes the meaning of \`'\ht:everypar' upon reaching
\`'\end'.  Hence, the \`'\ht:everypar{}\begin{...}...\end{...}' does
not let the effect of \`'\ht:everypar' through.








\ifHtml[\HPage{test data}\Verbatim

\documentstyle{report}

\input tex4ht.sty \Preamble{html} 
     \begin{document}  
  \EndPreamble






a pair of these characters as ``argument delimiters''.  I usually use the 
\verb"@" or \verb@"@ charachters, as I rarely have any other uses for them.
Thus

\result{%
\noindent use \verb"\%" to obtain a \% sign
}
\noindent
 is typed as

\moveright0.1\textwidth\vbox{
\footnotesize\begin{verbatim}
use \verb"\%" to obtain a \% sign
\end{verbatim}
}


YES-NO for `{\tt <P>}'

The section of program in NO
\begin{verbatim}
{ this finds %a & %b }

for i := 1 to 27 do
\end{verbatim}
NO xxxxxxxxxxxxxxxxxxxxxxxxxxxxx{x1}

The section of program in YES

\begin{verbatim}
{ this finds %a & %b }

for i := 1 to 27 do
\end{verbatim}
YES xxxxxxxxxxxxxxxxxxxxxxxxxxxxx{x2}

The section of program inNO
\begin{quote}\begin{verbatim}
{ this finds %a & %b }

for i := 1 to 27 do
\end{verbatim}\end{quote}
NOxxxxxxxxxxxxxxxxxxxxxxxxxxxxx{x3}

The section of program inNO

\begin{quote}\begin{verbatim}
{ this finds %a & %b }

for i := 1 to 27 do
\end{verbatim}\end{quote}

NOxxxxxxxxxxxxxxxxxxxxxxxxxxxxx{x4}

aaaaaaaaaaaaaaaaaaaaaaaa

\end{document}

\EndVerbatim\EndHPage{}]\fi





Commands \''\setbox...= box{...}' might produce extra spaces because
of the \''\par\leavevmode', an undesirable phenomena for framed
pictures.  Since boxes are in any case a problem for us for standard
text, we are probably better-off deal properly at least with pictures.




\<html latex env\><<<
|<initial env configurations|>
>>>


The above had \`'}{\csname after:listend\endcsname' earlier.


The following are needed for cases like

\Verbatim
\newenvironment{syntax}{\begin{center}
                        \begin{tabular}{|p{0.9\linewidth}|} \hline}%
                       {\hline
                        \end{tabular}
                        \end{center}}
\begin{syntax} aa \\  \end{syntax}
\EndVerbatim


\<ignore par before hline in end\><<<
\def\:temp{|<end row before hline|>%
   \expandafter\expandafter\expandafter\:temp}
\expandafter\:temp 
>>>

\<end row before hline\><<<
\def\:temp{%
   \def\:temp{\IgnorePar 
     \ifx \:tempa\hline \expandafter\\\else\fi
   }%
   \futurelet\:tempa\:temp
}%
>>>




%%%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{ConfigureEnv}



In the following, a list configuration is requested only if either
the third or the fourth parameter is not empty.

\<config latex.ltx utilities\><<<
\long\def\ConfigureEnv#1#2#3#4#5{%
   \def\:temp{#2#3#4#5}\ifx \:temp\empty \let\:temp|=\null
   \else   \def\:temp{#2#3}\fi
   \ifx \:temp\empty \else 
      \expandafter\def\csname before:begin#1\endcsname
         {#2\def\after:end{#3}}%
   \fi
   \def\:temp{#2#3#4#5}\ifx \:temp\empty \let\:temp|=\null
   \else   \def\:temp{#4#5}\fi
   \ifx \:temp\empty 
                   \else \ConfigureList{#1}{#4}{#5}{}{}\fi}
>>>



\<config latex.ltx utilitiesNO\><<<
\NewConfigure{TraceEnv}[4]{\def\trc:Bg{#1}\def\trc:eBg{#2}%
   \def\trc:Nd{#3}\def\trc:eNd{#4}}
\NewConfigure{TraceList}[8]{\def\trc:Ls{#1}\def\trc:eLs{#2}%
   \def\trc:El{#3}\def\trc:eEl{#4}\def\trc:It{#5}\def\trc:eIt{#6}%
   \def\trc:iT{#7}\def\trc:eiT{#8}}
>>>



\<latex trace configurations\><<<
\:CheckOption{hooks+}  \if:Option
    \def\trc:wrt{\immediate\write16}
\else \:CheckOption{hooks}  \if:Option
    \let\trc:wrt|=\:gobble
\fi\fi

>>>

XML as a backend for LaTeX



\<latex.ltx latex trace configurations\><<<
|<latex.ltx non trace configurations|>
\:CheckOption{hooks++} \if:Option
   |<latex.ltx latex edit+ commands|>
\else \:CheckOption{hooks+}  \if:Option
       \def\trc:wrt{\immediate\write16}
    \else \:CheckOption{hooks}  \if:Option
       \let\trc:wrt|=\:gobble
    \fi\fi
 \if:Option
   \if:latex |<latex.ltx latex edit commands|>\fi
\fi\fi
>>>




\<latex.ltx latex edit+ commands\><<<
\long\def\ConfigureEnv#1#2#3#4#5{%
      \expandafter\def\csname before:begin#1\endcsname{%
           \ifx \EndPicture\:Undef\a:trc Env(#1)1\b:trc\fi 
           #2\ifx \EndPicture\:Undef\c:trc Env(#1)1\d:trc\fi
          \def\after:end{%
                \ifx \EndPicture\:Undef\a:trc END(#1)2\b:trc\fi
                #3\ifx \EndPicture\:Undef\c:trc END(#1)2\d:trc\fi
          }}%
       \ConfigureList{#1}{#4}{#5}{}{}}
>>>



\<latex.ltx latex edit commands\><<<
\long\def\ConfigureEnv#1#2#3#4#5{%
      \expandafter\def\csname before:begin#1\endcsname{%
         \def\:temp{#2}\ifx \:temp\empty
           \ifx \EndPicture\:Undef\a:trc Env(#1)1\b:trc\fi 
           #2\ifx \EndPicture\:Undef\c:trc Env(#1)1\d:trc\fi
         \else #2\fi
          \def\after:end{%
              \def\:temp{#3}\ifx \:temp\empty
                \ifx \EndPicture\:Undef\a:trc Env(#1)2\b:trc\fi
                #3\ifx \EndPicture\:Undef\c:trc Env(#1)2\d:trc\fi
              \else #3\fi
          }}%
       \ConfigureList{#1}{#4}{#5}{}{}}
>>>



\<hooks+ for ConfigureEnv\><<<
\:CheckOption{hooks+}  \if:Option
   \pend:defI\begin{\expandafter
      \ifx\csname before:begin##1\endcsname\relax
      \expandafter\ifx\csname bfr:begin##1\endcsname\relax
         \immediate\write16{....\string\ConfigureEnv{##1}{}{}{}{}}%
         \expandafter\let\csname bfr:begin##1\endcsname=\empty
      \fi\fi}
\fi
>>>




\Section{CR-based Line Breaks}

Line breaks \''\\' in , for instance, the \`'verse' environment 
are requested indirectly through the following.

\<html latex env\><<<
\def\@centercr{\ifhmode \unskip\else \@nolnerr\fi 
   \ifx \EndPicture\:UnDef \a:centercr \b:centercr
   \fi    \par   \@ifstar{\nobreak\@xcentercr}\@xcentercr}
>>>

\<html latex env\><<<
\def\@icentercr[#1]{%
   \ifx \EndPicture\:UnDef
      \ifdim #1>0.5\baselineskip \a:centercr\fi
   \fi  \vskip #1\ignorespaces}
>>>




\<config latex.ltx utilities\><<<
\NewConfigure{centercr}{2}
>>>

Where \`'<P>' comes from???





\ifHtml[\HPage{test data}\Verbatim

\documentstyle{article}

 \input tex4ht.sty \Preamble{html,fonts}
        \begin{document}
     \EndPreamble

\begin{verse}
Gertjan Klein\\
Postbus 23656
\end{verse}


\end{document}


\EndVerbatim\EndHPage{}]\fi



\Section{Verbatim}



\<html latex local env\><<<
\bgroup
  \catcode`\-=13
  \catcode`\(=1   \catcode`\)=2  \catcode`\/=0
  \catcode`\{=12   \catcode`\}=12  \catcode`\\=12
/gdef/ScriptEnv#1(%
   /expandafter/let/csname :#1:/endcsname=/empty
   /edef/:temp(/def/expandafter/noexpand/csname a:#1/endcsname
      ####1/expandafter/noexpand/csname end/endcsname{#1}%
      (####1/noexpand/:EndVerbatim/noexpand/end(#1)))/:temp
%   /expandafter/def/csname 
%      b:#1/endcsname##1\end{#1}(##1/:EndVerbatim/end(#1))%
   /expandafter/def/csname
      b:#1/endcsname(/bgroup /catcode`/-=13 
     /def/:temp####1\end{#1}(/egroup 
         /def-(/string-/relax)%
         ####1/:EndVerbatim/end(#1))%
     /:temp)
   /edef/:temp(/noexpand/DefScript:
      /expandafter/noexpand/csname #1/endcsname
      (/expandafter/noexpand/csname a:#1/endcsname)%
      (/expandafter/noexpand/csname b:#1/endcsname))/:temp
)
/egroup
>>>


The following is for \`'\verb'.

\<html latex local env\><<<
\let\:sverb|=\@sverb
\def\@sverb#1{\a:verb \pend:def\verb@egroup{\b:verb}%
   \:sverb#1}
>>>


A \`'\aftergroup\b:verb' is no good above because it is preceded by 
a \''\aftergroup' for an embedded \''\obeylines' commands which can produce, for instance, 
\`'<NOBR><CODE>strong</NOBR></CODE>'.


The \`'\HChar{160}=\:nbsp' is required in empty lines by Netscape. Tex4ht
also loses empty lines, byt it can survive with the weaker
insertion of \`'\special{t4ht=<!---->}'.




\<html latex local env\><<<
\let\:temp|=\@verbatim
\HLet\@verbatim|=\:temp
\pend:def\@verbatim{%
  \Configure{obeylines}{\let\ |=\v:ch}{}{\v:par}}
>>>





\<config latex.ltx utilities\><<<
\NewConfigure{verbatim}[2]{\c:def\v:par{#1}\c:def\v:ch{#2}}
\def\c:verb:#1#2{\c:def\a:verb{#1}\c:def\b:verb{#2}}
>>>




The \''\SaveEverypar...\RecallEverypar' needs to be well parenthesized
here with those in the embeded lists.  The indirection through
\''\end:saveeverypar' is because the \''\endverbatim' can be for
a start of a \''\verbatim' from another lib (e.g., verbatim.sty).



The configuration of the verbatim environment is on the loop, not
the begin-end, to eliminate extra lines in the content.





\`'\ConfigureEnv{verbatim}{}{}{\env:verb}{\endenv:verb}' fails in
\Link[/n/ship/0/packages/tetex/teTeX/texmf/tex/latex/tools/verbatim.sty]{}{}%
verbatim.sty\EndLink. The same is true whn nested within another
\`'\begin{..}...\end{..}' block.  This is so because only the external-most
list entries are \ifHtml[\HPage{recognized}\Verbatim

\ConfigureEnv{verbatim}{AA}{BB}{11}{22}

\ConfigureEnv{foo}{}{}{}{}

\begin{foo}
\begin{verbatim}
XXXX
\end{verbatim}
\end{foo}


\ConfigureEnv{foo}{}{}{}{ }

\begin{foo}
\begin{verbatim}
XXXX
\end{verbatim}
\end{foo}
\EndVerbatim\EndHPage{}]\fi.










\ifHtml[\HPage{test data}\Verbatim
\documentstyle{article}

\input tex4ht.sty \Preamble{html,fonts}
        \begin{document}
     \EndPreamble

ati

\begin{enumerate}    \item All

\begin{verbatim}  $x$  \end{verbatim}

\end{enumerate}   The


s document was

\moveright0.1\textwidth\vbox{%
\begin{verbatim}
\subsection{Sectioning commands}
\end{verbatim}
}
\noindent and that was all that was required to get the numbered
sectio

YES-NO for `{\tt <P>}'

The section of program in NO
\begin{verbatim}
{ this finds %a & %b }

for i := 1 to 27 do
\end{verbatim}
NO xxxxxxxxxxxxxxxxxxxxxxxxxxxxx{x1}

The section of program in YES

\begin{verbatim}
{ this finds %a & %b }

for i := 1 to 27 do
\end{verbatim}
YES xxxxxxxxxxxxxxxxxxxxxxxxxxxxx{x2}

The section of program inNO
\begin{quote}\begin{verbatim}
{ this finds %a & %b }

for i := 1 to 27 do
\end{verbatim}\end{quote}
NOxxxxxxxxxxxxxxxxxxxxxxxxxxxxx{x3}

YESThe section of pr

YESogram inNO

\begin{quote}\begin{verbatim}
{ this finds %a & %b }

for i := 1 to 27 do
\end{verbatim}\end{quote}

NOxxxxxxxxxxxxxxxxxxxxxxxxxxxxx{x4}

aaaaaaaaaaaaaaaaaaaaaaaa

\end{document}

\EndVerbatim\EndHPage{}]\fi

The verbatim environmrnt is typeset in \''\trivlist' environment
that intreduces paragraph break in the first line through
\''\def\:D:T{<P>}'.  To eliminate the spaces that precede we introduce
the parindent=0.




\<leading line in /verbatim\><<<
\parindent|=\z@ 
>>>




\Chapter{Math Setup}

\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/ltmath.dtx]{}{}ltmath.dtx\EndLink

\<latex ltmath\><<<
|<plain,latex bordermatrix|>
|<displaylines|>
|<plain,latex math symbols|>        
|<latex math symbols|>        
|<plain,latex math|>
|<latex math|>
|<html eqnarray|>
>>>



%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Big, BIG, ....}
%%%%%%%%%%%%%%%%%%%%%%%%%%%

We could have taken the following into using \''<BIG>', but this
wouldn't probably make much sense because the other stuf would
probably not fit.

\<fontmath + plain classes\><<<
\def\:tempc#1{{\hbox{\pic:gobble\a:big$\pic:gobble\c:big\left#1\vbox
    to8.5\p@{}\right.\n@space\pic:gobble\d:big$\pic:gobble\b:big}}}
\HLet\big=\:tempc
\def\:tempc#1{{\hbox{\pic:gobble\a:Big$\pic:gobble\c:Big\left#1\vbox
    to11.5\p@{}\right.\n@space\pic:gobble\d:Big$\pic:gobble\b:Big}}}
\HLet\Big\:tempc
\def\:tempc#1{{\hbox{\pic:gobble\a:bigg$\pic:gobble\c:bigg\left#1\vbox
    to14.5\p@{}\right.\n@space\pic:gobble\d:bigg$\pic:gobble\b:bigg}}}
\HLet\bigg\:tempc
\def\:tempc#1{{\hbox{\pic:gobble\a:Bigg$\pic:gobble\c:Bigg\left#1\vbox
    to17.5\p@{}\right.\n@space\pic:gobble\d:Bigg$\pic:gobble\b:Bigg}}}
\HLet\Bigg\:tempc
\HLet\Bigg=\:tempc
\NewConfigure{big}{4}    
\NewConfigure{Big}{4}    
\NewConfigure{bigg}{4}    
\NewConfigure{Bigg}{4}    
>>>



Need the following revisions for mathopen etc. Originally, we had
parameterless definitions. 

\<plain,latex math\><<<
\def\bigl#1{\mathopen{\big{#1}}}
\def\bigm#1{\mathrel{\big{#1}}}
\def\bigr#1{\mathclose{\big{#1}}}
\def\Bigl#1{\mathopen{\Big{#1}}}
\def\Bigm#1{\mathrel{\Big{#1}}}
\def\Bigr#1{\mathclose{\Big{#1}}}
\def\biggl#1{\mathopen{\bigg{#1}}}
\def\biggm#1{\mathrel{\bigg{#1}}}
\def\biggr#1{\mathclose{\bigg{#1}}}
\def\Biggl#1{\mathopen{\Bigg{#1}}}
\def\Biggm#1{\mathrel{\Bigg{#1}}}
\def\Biggr#1{\mathclose{\Bigg{#1}}}
>>>


\<plain,latex math\><<<
\def\:tempc{\a:quad}   \HLet\quad|=\:tempc
\def\:tempc{\a:qquad}  \HLet\qquad|=\:tempc
\NewConfigure{quad}{1}        \Configure{quad}{\o:quad:}
\NewConfigure{qquad}{1}       \Configure{qquad}{\o:qquad:}
>>>



% \def\,{\mskip\thinmuskip}
% \def\>{\mskip\medmuskip}
% \def\;{\mskip\thickmuskip}
% \def\!{\mskip-\thinmuskip}
% 
% \DeclareRobustCommand{\,}{%
%    \relax\ifmmode\mskip\thinmuskip\else\thinspace\fi
% }

\<latex math\><<<
\def\:tempc{\relax\ifmmode\csname a:,\endcsname\else\thinspace\fi}
\expandafter\HLet\csname , \endcsname=\:tempc
\def\:tempc{\relax
  \ifmmode\csname a:,\endcsname\expandafter\:gobble\fi 
  \o:thinspace: }
\HLet\thinspace=\:tempc
\NewConfigure{,}{1} 
\Configure{,}{\mskip\thinmuskip}
>>>

\<plain math\><<<
 \def\:tempc{\relax\csname a:,\endcsname}
\HLet\,=\:tempc
\NewConfigure{,}{1} 
\Configure{,}{\relax \ifmmode \mskip \thinmuskip \else \thinspace \fi}
>>>

\ifHtml[\HPage{more}\Verbatim

>  - The user.tex document does some tricks with square hooks that cause
> them:
>   + to be written as GIF files

A \big? is internally defined as a construct `\left?\right.', where
normally costructs of the form `\left?...\right?' are used for larger
formulas (that TeX4ht converts to formulas}.  I changed, at least for
the time being, the definition of \big to avoid creating pictures for
its arguments.

>   + to not be recognised as equal (i.e., two ['s in two places will be
>     written as two GIF files).

This is a problem that I don't have a satisfying solution for it
(except of providing some tools that allow with minimal user
intervention to eliminate duplications).  At some point I toyed with
the idea of using a perl script to reduce duplications, but I shelved
it as a low priority task.

> This is unpleasant, and I wonder if TeX4ht can do something about it (I
> do realize that it is weird trickery in the source that causes the
> problems to begin with).

The code is fine in this case.  TeX4ht should take the full blame.

> The following document demonstrates:
> 
>   \documentstyle[fullpage]{article}
>   \input tex4ht.sty
> 
>   \def\unit#1{\hbox{\tt #1}} % ... \unit{-x foo} ...
>   \def\meta#1{{\it #1\/}}    % ... <blah> ...
> 
>   \newenvironment{command}{\def\[{$\bigl[$}\def\]{$\bigr]$}\def\|{$\big\vert$}%
>     \parindent=-2em\advance\leftskip by -\parindent\vskip -\parskip~\par
>     \begingroup\tt\textfont0=\font}{%
>     ~\endgroup\par\advance\hoffset by \parindent}
> 
>   \Preamble{html}
>   \begin{document}
>   \EndPreamble
> 
>   \begin{command}
>     /sbin/lilo
>       \unit{\[ -C \meta{config\_file} \]}
>       \unit{-q}
>       \unit{\[ -m \meta{map\_file} \]}
>       \unit{\[ -v $\ldots$ \]}
>   \end{command}
> 
>   \end{document}
> 

\EndVerbatim\EndHPage{}]\fi




The following is to handle math primes like in \'+$A'$+, \'+$A''$+,
 \'+$A'_5$+, and \'+$A_5'$+.  Latex converts such primes to \'+^{\prime}+

\<latex math\><<<
\def\:temp{\csname a:'\endcsname
   \bgroup |<b: '|>\prim@s}
\HLet\active@math@prime|=\:temp
{\catcode`\'=\active \global\let'\active@math@prime}
|<plain,latex math prime|>
>>>

\<plain,latex math prime\><<<
\let\:tempc|=\prim@s
\pend:def\:tempc{\csname c:'\endcsname\:gobble}
\HLet\prim@s|=\:tempc
\NewConfigure{'}{3}
\Configure{'}{}{}{\prime}
>>>

We want to expose the closing configuration out the \''\egrop' abd \''\fi', 
to be able to check for successive subscripts in caes of subsup.


\<b: '\><<<
\aftergroup\:pr@m@s
>>>

\<latex math\><<<
\def\:pr@m@s{\futurelet\:temp\pr@m:s}
\def\pr@m:s{%
  \ifx\:temp\fi \expandafter\expandafter\expandafter\:pr@m@s
  \else \expandafter\expandafter\csname b:'\endcsname\fi}
>>>

\<plain math\><<<
\def\:temp{\csname a:'\endcsname
   \bgroup |<b: '|>\prim@s}
{\catcode`\'=\active \HLet'=\:temp \global\let'=`}
|<plain,latex math prime|>
>>>



\Section{Choose}

\<plain,latex mathNO\><<<
\def\:temp{\a:choose\o:choose:\b:choose}
\HLet\choose|=\:temp
\NewConfigure{choose}{2}
>>>




\Section{Mathpalette}


\<plain,latex math\><<<
\def\:temp#1#2{\a:mthpl\o:mathpalette:{#1}{#2}\b:mthpl}  
\HLet\mathpalette|=\:temp
\NewConfigure{mathpalette}[2]{\c:def\a:mthpl{#1}\c:def\b:mthpl{#2}}
\Configure{mathpalette}{}{}
|<phantom and smash|>
>>>


The following is to avoid empty pictures.

\<phantom and smash\><<<
\def\:temp{\relax
  \ifmmode \expandafter\o:mathpalette:\expandafter\mathph@nt
  \else  \expandafter\makeph@nt  \fi}
\HLet\ph@nt|=\:temp
\def\:temp{\relax 
  \ifmmode  \expandafter\o:mathpalette:\expandafter\mathsm@sh
  \else     \expandafter\makesm@sh  \fi}
\HLet\smash|=\:temp
>>>





Before we hade for non-pic 
\Verbatim
\expandafter\ifx \csname\string#1:\endcsname\relax
      \ifx \a:mthpl\empty\else
         \a:mthpl\expandafter\:gobble\string#1\b:mthpl
      \fi
   \else \expandafter\expandafter\expandafter
      \csname\string#1:\endcsname\fi
   \o:mathpalette:{#1}}
\EndVerbatim
However, the first parameter need not be a singlton macro, so we had
failures with that code.






\Section{roots}


\<plain,latex math\><<<
\def\:temp #1\of #2{%
    {\a:root #1\b:root#2\c:root}}
\HLet\root|=\:temp
\NewConfigure{root}{3}  
>>>




\Section{Matrices}



\SubSection{Cases}

% \def\cases#1{\left\{\,\vcenter{\normalbaselines\m@th
%     \ialign{$##\hfil$&\quad{##}\hfil\crcr#1\crcr}}\right.}

Under pic math the \''\cases' becomes a picture due to the \''\left' 
and \''\right' operations.


\<plain,latex math\><<<
\NewConfigure{cases}[8]{\c:def\a:cases{#1}\c:def\b:cases{#2}%
    \c:def\c:cases{#5}\c:def\d:cases{#6}\c:def\e:cases{#7}%
    \c:def\f:cases{#8}\c:def\g:cases{#3}\c:def\h:cases{#4}}
\Configure{cases}{}{}{}{}{}{}{}{}
>>>

\<plain,latex math\><<<
\def\:tempc#1{\tx:halign{cases}{#1}}
\HLet\cases|=\:tempc
                                    \catcode`\#13 \catcode`\!6
\def\reg:cases!1{\left\{\vcenter{\normalbaselines\m@th  \g:cases
   \SaveMkHalignConf:g{cases}\RecallTeXcr
   \MkHalign#{$#$&{#}}!1\crcr
   \EndMkHalign\RecallMkHalignConfig   \h:cases}\right.}
                                    \catcode`\#=6 \catcode`\!=12
>>>





\SubSection{matrix}

% \def\matrix#1{\null\,\vcenter{\normalbaselines\m@th
%     \ialign{\hfil$##$\hfil&&\quad\hfil$##$\hfil\crcr
%       \mathstrut\crcr\noalign{\kern-\baselineskip}
%       #1\crcr\mathstrut\crcr\noalign{\kern-\baselineskip}}}\,}


The last four parameters of pictorial configurations must be empty.

\<plain,latex math\><<<
\def\:tempc#1{\tx:halign{matrix}{#1}}
\HLet\matrix|=\:tempc
                                    \catcode`\#13 \catcode`\!6
\def\reg:matrix!1{\null\,\vcenter{\normalbaselines\m@th
   \SaveMkHalignConf:g{matrix}\RecallTeXcr
   \MkHalign#{$#$&&$#$}!1\crcr
   \EndMkHalign\RecallMkHalignConfig}}
                                    \catcode`\#=6 \catcode`\!=12
\NewConfigure{matrix}{6}
>>>



\SubSection{pmatrix}




\<plain,latex math\><<<
\:CheckOption{no-pmatrix} \if:Option \else
   |<shared plain/latex pmatrix|>
\fi
>>>


\<shared plain/latex pmatrix\><<<
\def\:temp#1{\a:pmatrix\o:pmatrix:{#1}\b:pmatrix}
\HLet\pmatrix|=\:temp
>>>


\<shared plain/latex pmatrix\><<<
\NewConfigure{pmatrix}{2}
>>>






\Section{TeX and LaTex: Bordermatrix}




\<plain,latex bordermatrix\><<<
\def\:temp#1{\a:bordermatrix\o:bordermatrix:{#1}\b:bordermatrix}
\HLet\bordermatrix|=\:temp
\NewConfigure{bordermatrix}{2}
>>>




\Section{Displaylines}




\<displaylines\><<<
\def\tx:halign#1#2{\csname a:#1\endcsname
   \csname  \ifx \EndPicture\:Undef reg:#1\else o:#1:\fi
   \endcsname{#2}\csname b:#1\endcsname}
>>>

\<displaylines\><<<
\def\:tempc#1{\tx:halign{displaylines}{#1}}
\HLet\displaylines|=\:tempc
                                    \catcode`\#13 \catcode`\!6
\def\reg:displaylines!1{\tabskip\z@skip    
   \SaveMkHalignConf:g{displaylines}\RecallTeXcr
   \MkHalign#{\hbox{$\@lign\displaystyle#$}}!1\crcr
   \EndMkHalign\RecallMkHalignConfig}
                                    \catcode`\#=6 \catcode`\!=12
\NewConfigure{displaylines}{4}
>>>


\<displaylinesNO\><<<
\def\:temp#1{\displ@y
   |<html mode for displaylines|>%
   \TeXhalign {\hbox {$\@lign \displaystyle
       \ar:fld \R:dspln ##\r:dspln
       $}\crcr #1\aftergroup\t:dspln\crcr }}
\HLet\displaylines|=\:temp
\NewConfigure{displaylines}[4]{%
   \c:def\T:dspln{#1}\c:def\t:dspln{#2}%
   \c:def\R:dspln{#3}\c:def\r:dspln{#4}}
>>>


\<html mode for displaylinesNO\><<<
\ifx \EndPicture\:UnDef
  \def\ar:fld{\T:dspln\global\let\ar:fld|=\empty}%
\else \let\ar:fld|=\empty
\fi
>>>






When option \`'no-halign' is up, the command \`'\h:noalign' is undefined.


\<restore nohalignNO\><<<
\csname h:noalign\endcsname
>>>







\<plain,latex utilities\><<<
\:CheckOption{no-halign} \if:Option \else
   \def\:temp{\everycr{}}
   \HLet\displ@y|=\:temp
\fi
>>>

%    \pend:def\@lign{\h:noalign}
% \pend:def\displ@y{\HRestore\noalign}







\ifHtml[\HPage{test data}\Verbatim
\input tex4ht.sty  \Preamble{html}   \EndPreamble

$$
\displaylines{
.\cr} 
$$

\csname bye\endcsname

\EndVerbatim\EndHPage{}]\fi








\Section{[] and ()}





\<latex,sty math del\><<<
  \def\({\leavevmode\st:math}
  \def\){\ed:math}
\NewConfigure{()}[2]{\def\st:math{#1}\def\ed:math{#2}}
  \def\[{\st:Math}
  \def\]{\ed:Math}
\NewConfigure{[]}[2]{\def\st:Math{#1}\def\ed:Math{#2}}
\Configure{()}{$}{$}
\Configure{[]}{$$}{$$}
>>>

\<more latex math\><<<
|<latex,sty math del|>
\ifx \a:mth\:UnDef 
   \expandafter\pend:defIII\csname c:$:\endcsname{%
      \ifx \a:mth\:UnDef |<protect (...) math|>\fi
      |<fix for tabular|>}
\else
   |<protect (...) math|>
   |<fix for tabular|>%
\fi
\ifx \a:display\:UnDef 
   \expandafter\pend:defIII\csname c:$$:\endcsname{%
      \ifx \a:display\:UnDef |<protect [...] math|>\fi}
\else
   |<protect [...] math|>
\fi

>>>

\<protect (...) math\><<<
\pend:def\({\bgroup\let\a:mth|=\empty
   \let\b:mth|=\empty  \let\c:mth|=\empty }
\append:def\){\egroup}
>>>

\<protect [...] math\><<<
\pend:def\[{\bgroup\let\a:display|=\empty 
   \let\b:display|=\empty  \let\c:display|=\empty }
\append:def\]{\egroup}
>>>






%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \Section{Equation (latex, amsmath, fleqn)}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The equation environment is defined in different manners within
the different packages.



\SubSection{in latex.ltx}

\Verbatim
\def\equation{$$\refstepcounter{equation}}
\def\endequation{\eqno \hbox{\@eqnnum}$$\global\@ignoretrue}
\EndVerbatim


\<latex.ltx\><<<
\let\o:equation:|=\equation
\let\o:endequation:|=\endequation
\def\equation{\bgroup
   \ifx \EndPicture\:Undef  
      \def\endequation{%
          \if@eqnsw \expand:after{\o:endequation:\b:equation\equ:no}%
          \else \expand:after{\o:endequation:\egroup}\fi
          \c:equation\egroup}%
      \expandafter\a:equation 
   \else
         \def\endequation{\o:endequation:\egroup}
   \fi
   \o:equation:}
>>>

% \@fleqnfalse
% \let\@fleqnfalse\empty
% \let\@fleqntrue\empty



\<config latex.ltx shared\><<<
\NewConfigure{equation}[3]{%
  \c:def\a:equation{#1\bgroup\let\@eqnnum|=\empty}%
  \c:def\b:equation{\egroup#2}\c:def\c:equation{#3}}
\def\equ:no{\@eqnnum}
\Configure{equation}{}{}{}
>>>



\<equations of amsmath.sty\><<<
\def\equation{\bgroup |<amsmath-fleqn false|>%
  \ifx \EndPicture\:Undef
     \def\endequation{%
       \let\tagform@=\:gobble  
       \if@eqnsw \expand:after{%
          |<remove amsmath-fleqn number|>%
          \o:endequation:\b:equation\equ:no}%
       \else \expand:after{%
          \ifx\df@tag\@empty \expand:after{\o:endequation:\egroup}%
          \else
             \global\let\df:tag=\df@tag
             \expand:after{\o:endequation: \expandafter\b:equation\df:tag
             }\fi
        }\fi
        \c:equation\egroup
      }%
      \expandafter\a:equation
   \else
      \def\endequation{\o:endequation:\egroup}%
   \fi
   \o:equation:}
>>>

\<amsmath-fleqn false\><<<
\@fleqnfalse
>>>

\<remove amsmath-fleqn numberNO\><<<
\if@fleqn
  \pend:def\endmathdisplay@fleqn{\global\let\df:tag=\df@tag
                       \gdef\df@tag{\global\let\df@tag=\df:tag}}%
\fi
>>>



\<\><<<
\NewConfigure{equation}[3]{%
  \c:def\a:equation{#1\bgroup \let\tagform@|=\:gobble }%
  \c:def\b:equation{\egroup#2}\c:def\c:equation{#3}}
>>>


Do we need the \`'\Configure{Picture*}{}{}%'?








\SubSection{Amsmath}



\<config amsmath.sty utilitiesNO\><<<
\NewConfigure{equation}[1]{%
  \c:def\a:equation{#1}%
  \c:def\b:equation{\def\equ:no{}}\c:def\c:equation{}}
\Configure{equation}{}
>>>












\SubSection{fleqn}





\<fleqn.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% fleqn.4ht                            |version %
% Copyright (C) |CopyYear.1997.      Eitan M. Gurari         %
|<TeX4ht copyright|>

       |<config fleqn.clo utilities|>
       |<config fleqn.clo shared|>
\Hinput{fleqn}
\endinput
>>>        \AddFile{8}{fleqn}

\Verbatim
\renewenvironment{equation}%
    {\@beginparpenalty\predisplaypenalty
     \@endparpenalty\postdisplaypenalty
     \refstepcounter{equation}%
     \trivlist \item[]\leavevmode
       \hb@xt@\linewidth\bgroup $\m@th% $
         \displaystyle
         \hskip\mathindent}%
        {$\hfil % $
         \displaywidth\linewidth\hbox{\@eqnnum}%
       \egroup
     \endtrivlist}
\EndVerbatim




\Section{stackrel}

\<config latex.ltx utilities\><<<
\def\:temp#1#2{{\a:stackrel {\mathop {#2}\b:stackrel{#1}}\c:stackrel}}
\HLet\stackrel|=\:temp
\NewConfigure{stackrel}{3}
>>>




\SubSection{/frac}





\<latex math\><<<
\def\:temp#1#2{{\a:frac\begingroup
   #1\endgroup\b:frac \over \c:frac #2\d:frac}}
\HLet\frac|=\:temp
\NewConfigure{frac}{4}
>>>



\<amsamth.sty frac\><<<
{\a:frac\begingroup
   #1\endgroup\b:frac \@@over \c:frac #2\d:frac}%
>>>



\SubSection{Sqrt's}





\<latex math\><<<
\def\:temp#1{{\a:sqrtsign{\o:sqrtsign:{#1}}\b:sqrtsign}}
\HLet\sqrtsign|=\:temp
\NewConfigure{sqrtsign}{2}
>>>

\<plain math\><<<
\def\:temp#1{{\a:sqrt{\radical"270370 {#1}}\b:sqrt}}
\HLet\sqrt|=\:temp
\NewConfigure{sqrt}{2}
>>>




%%%%%%%%%%%%%%%%%%
\Section{Eqnarray}
%%%%%%%%%%%%%%%%%%


\<html eqnarray\><<<
                                    \catcode`\#|=13 \catcode`\!|=6    
\def\reg:eq:narray!1\cr{|<halign eqnarray|>}
                                    \catcode`\#=6 \catcode`\!=12 
>>>

\<halign eqnarray\><<<
\SaveMkHalignConf:g{eq:narray\if@eqnsw\else *\fi}|%\HRestore\noalign|%
\MkHalign#{|<eqnarray pattern|>}%
>>>

\<eqnarray pattern\><<<
\hskip\@centering$\displaystyle\tabskip\z@skip{#}$\@eqnsel
&\global\@eqcnt\@ne\hskip \tw@\arraycolsep \hfil${#}$\hfil
&\global\@eqcnt\tw@ \hskip \tw@\arraycolsep
         $\displaystyle{#}$\hfil\tabskip\@centering
&\global\@eqcnt\thr@@ \hb@xt@\z@\bgroup\hss#\egroup \tabskip\z@skip
>>>


\<html eqnarray\><<<
\def\:tempc{
     \@@eqncr
     \EndMkHalign   \RecallMkHalignConfig
     \csname b:eq:narray\if@eqnsw\else *\fi\endcsname
     \global\advance\c@equation\m@ne
   $$\@ignoretrue }
\HLet\endeqnarray|=\:tempc
\def\:tempc{%
   |<def :currentlabel for eqnarray|>%
   \let\sv:halign=\halign \def\halign{\let\halign=\sv:halign 
   \eq:narray\halign}\o:eqnarray:}
\HLet\eqnarray|=\:tempc
\let\eq:narray|=\empty
\def\:tempc{\pic:MkHalign{eq:narray\if@eqnsw\else *\fi}}
\HLet\eq:narray|=\:tempc
\def\c:eqnarray:{\c:eq:narray:}  \NewConfigure{eq:narray}{6}
\expandafter\let\csname reg:eq:narray*\endcsname|=\reg:eq:narray
\expandafter\def\csname c:eqnarray*:\endcsname{\csname 
    c:eq:narray*:\endcsname}  \NewConfigure{eq:narray*}{6}
>>>




\<html eqnarray\><<<
\let\snd:halign|=\empty
\def\:temp[#1]{\ifnum 0=`{\fi }\@@eqncr}
\HLet\@xeqncr|=\:temp
\def\:temp{\let\reserved@a\relax
   \ifcase\@eqcnt \def\reserved@a{& & &}\or
       \def\reserved@a{& &}%
   \or \def\reserved@a{&}\else
     \let\reserved@a\@empty
     \@latex@error{Too many columns in eqnarray environment}\@ehc\fi
   \reserved@a |<fix eqnarray for /label|>%
   \global\@eqnswtrue\global\@eqcnt\z@\cr}
\HLet\@@eqncr|=\:temp
>>>



\`'\append:def\endeqnarray{}' is no good because
the tail of the table falls out of the traced math environment.
\`'
\def\endeqnarray{%
   \@@eqncr \egroup \global\advance\c@equation\m@ne
   \r:eqnar\t:eqnar\rc:roco $$\global\@ignoretrue }' is not good,
   because halign doesn't allow insertion iside the \`'$$'.  There are
   two \`'\snd:halign' out the \`$$': one inseted here, and one
   defined into the math env.  The first one is activated by the
   tracing of the math environment, immediately after the \`'$$'.

The indirection through \''\:temp' is required due to the \''\fi' 
without a visible \''\if'.

\<fix eqnarray for /label\><<<
\if@eqnsw \@eqnnum
  {\let\html:addr|=\empty |<def :currentlabel for eqncr|>}%
  \stepcounter{equation}\fi
>>>




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{List Environments}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%





\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/ltlists.dtx]{}{}ltlists.dtx\EndLink

\Section{Configure Description Lists}




The \''\begin#1' command has been expanded to call
\`'\csname on#1:list\endcsname' before calling
\`'\csname #1\endcsname', if \''\this:listConfigure' is empty.




\<latex ltlists\><<<
\long\def\ConfigureList#1#2#3#4#5{\expandafter
   \def\csname on#1:list\endcsname{\def\this:listConfigure{%
      \def\:DLL{#2}\def\:DT{#4}\def\:DD{#5}\def\end:DL{#3}%
      \tmp:cnt|=0  \def\:temp{#2#3#4#5}%
      \g:let\:DLL{#1}\g:let\:DT{#1}\g:let\:DD{#1}\g:let\end:DL{#1}%
      }}}
>>>







\<html lists\><<<
\let\:DL:|=\empty
\let\:OL:|=\empty
>>>

\Section{LaTeX}

\SubSection{The Items}

\Verbatim
        \def\item{\@inmatherr\item
          \@ifnextchar [\@item{\@noitemargtrue \@item[\@itemlabel]}}
        \def\@item[#1]{\if@noparitem ...  
                       \else ...\global\@inlabeltrue \fi
           \ht:everypar{\global\@minipagefalse\global\@newlistfalse
              \if@inlabel
                \global\@inlabelfalse
                \kern -\parindent
                \box\@labels
                \penalty\z@
              \fi
              \ht:everypar{}}%
           ....
           \sbox\@tempboxa{\makelabel{#1}}.... \ignorespaces}
\EndVerbatim

Note that in LaTeX the item starts at the start of the next paragrap, not
where the comamnd itself is present. Moreover, LaTex merges 
lists in \''\@donoparitem' when they are stacked directly on items.

\Verbatim

(P 0)......
\begin{trivlist}
\item[xxxA] 
        \begin{trivlist}
        \item[xxxB] 
                \begin{trivlist}
                \item[xxxC] (xxxAxxxBxxxC).................. 
                \item[xxx] (xxx).................. 
                \end{trivlist}
        \item[xxx] (xxx).................. 
        \end{trivlist}
        (P).........................
\item[xxx] 
\item[yyy](xxxyyy).................. 
\end{trivlist}
.........................

      -----------------------------------------

\begin{verbatim}
               (P 0)......
           xxxAxxxBxxxC ..................
           xxx ..................
           xxx ..................
               (P).........................
           xxx
           yyy ..................
            .........................
\end{verbatim}
\EndVerbatim





\<html latex lists\><<<
\let\:item|=\@item
\def\@item[#1]{\ifx \EndPicture\:Undef  
       |<prepend @item[...]|>\fi
   \if@newlist  \:item[{#1}]\@newlisttrue
   \else        \:item[{#1}]\fi    \global\@inlabeltrue
   \ifx \EndPicture\:Undef  
       |<append @item[...]|>\leavevmode    \ignorespaces
   \fi  }
>>>

We insert the \''\leavevmode' to ensure that all \''\items'
at the beginnig of lists are true. Otherwise,  the lack of them causes 
a lose of html-info  during collapsing effects as is the case, e.g., in
the following code.








\Verbatim
    The ten characters
    \begin{quote}\begin{verbatim}
    #  $  %  &  ~  _  ^  \ {  }
    \end{verbatim}\end{quote}
    should no
\EndVerbatim

In addition, without the \''\leavevmode' we can end up with an
outcome \`'<CODE 
>
      <LI>
      \@</CODE>' instead of \`'<LI><CODE 
>
      \@</CODE>'.


Within \`'|<prepend @item[...]|>', \''\if@noitemarg' indicates
whether we have a non user supplied label.  Within
\`'|<append @item[...]|>', \''\if@inlabel' does the job before
we encounter the first paragraph.


Note that \''X1111
   Y2222
   X1111
   X2222'
is the output of \`'\ht:everypar{X\ht:everypar{Y}}
    \par
1111
    \par
2222
    \par
\ht:everypar{X\ht:everypar{Y}}
    \par
{1111}
    \par
{2222}
'.  That is, the everypars might happen within groups. Hence, 
probably the reason for \''\if@inlabel'


\<append @item[...]\><<<
\ShowRefstepAnchor
\ht:everypar{%
   \if@newlist |<start new list|>\fi
   \global\@minipagefalse\global\@newlistfalse
              \if@inlabel
                \global\@inlabelfalse  
                |<before each item|>\box\@labels
                |<after each item|>%
                \penalty\z@
              \else  |<between list pars|>%
              \fi
              \ht:everypar{|<between list pars|>}}%
>>>


\<before each item\><<<
\global\let\empty:D:T:D|=\empty \:DT \hfill\break   
>>>

The \''\hfill\break' prevents collapsing of spaces.  We want to put
\'' \:DT ' at the end so it will gobble only the item mark.  However,
we can't because of the problem of collapsing spaces. 




\<after each item\><<<
\:DD \ShowPar
>>>

\<between list pars\><<<
\:ListParSkip   
>>>



\<html latex lists\><<<
\def\ListParSkip{\def\:ListParSkip}
\ifHtml
  \ListParSkip{\HtmlPar}
\fi
>>>

\SubSection{Boundary Points of Lists}



Because of the merging of into items lists that are 
stacked on them,
we first configure the new lis with


\<prepend @item[...]\><<<
\if@newlist        
   \null:listConfigure  \this:listConfigure
\fi  
\SkipRefstepAnchor
>>>


\<latex ltlists\><<<
\def\null:listConfigure{%
   \global\let\:DLL|=\empty
   \global\let\:DT|=\empty  \global\let\:DD|=\empty
   \global\let\end:DL|=\empty  \global\let\empty:D:T:D|=\empty}
\null:listConfigure   \let\this:listConfigure|=\empty
>>>




then we start it.

\''\:DL' is a variable in DraTeX.

\<start new list\><<<
\:DLL  \global\let\this:listConfigure|=\empty  
\gdef\empty:D:T:D{\:DT\:DD}%
>>>

The \''\ConfigureEnv' is needed for getting paragraph breaks 
after collapsed lists.

Do we need to to globally define \''\:DLL' here to empty,
and  save/resore it at \''\begin' and \''\end' boudaries.





The \''\endlist'  comamnd is defined in turns of \''\endtrivlist'.


\Verbatim
         \def\endtrivlist{%
           \if@inlabel\indent\fi
           \if@newlist\@noitemerr\fi
           \ifhmode\unskip \par\fi
           \if@noparlist \else
             \ifdim\lastskip >\z@
               \@tempskipa\lastskip \vskip -\lastskip
               \advance\@tempskipa\parskip \advance\@tempskipa -\@outerparskip
               \vskip\@tempskipa
             \fi
             \@endparenv
           \fi
         }
\EndVerbatim


\<html latex lists\><<<
\pend:def\endtrivlist{|<prepend end trivlist|>}
>>>

\<prepend end trivlist\><<<
\if@noparlist \else\ifx \EndPicture\:UnDef
   \ifhmode \unskip\else \vskip-\lastskip\fi     
   \empty:D:T:D                \global\let\empty:D:T:D|=\empty  
   \end:DL                     \global\let\end:DL|=\empty  
   \global\let\:DT|=\empty     \global\let\:DD|=\empty      
\fi \fi
>>>





\SubSection{Boundary Points of Env Blocks}


\<html latex lists\><<<
\def\list:save{%
   \let\SVempty:D:T:D|=\empty:D:T:D                
   \let\SVend:DL|=\end:DL                     
   \let\SV:DT|=\:DT
   \let\SV:DD|=\:DD }
\def\list:recall{%
   \global\let\empty:D:T:D|=\SVempty:D:T:D                
   \global\let\end:DL|=\SVend:DL                     
   \global\let\:DT|=\SV:DT
   \global\let\:DD|=\SV:DD }
>>>

\SubSection{Default Configurations}

Note also the \''\ConfigureEnv' for the following lists.









\<html latex lists\><<<
\def\AnchorLabel{\anc:lbl x{}}
\def\DeleteMark#1\@labels{\hfill\break   
   \setbox0|=\vbox{\box\@labels}}
>>>

The \''\setbox' is to clear \''\@labels' from being accumulated for
latter on use.














\ifHtml[\HPage{test data for space collapsing}\Verbatim
ferent combinations of the following options:

\begin{description}
\item[The default.] The default partition to boot can be the first
one, the one with the active flag set, or can be configurable, depending
on the MBR. Some MBRs set the active flag in the MBR to the selected
partition, and hence default to it the next boot. This requires
rewriting the MBR, and therefore may conflict with virus protection
present in some BIOSes.

Note that there is another reason for setting the active flag to the
booted partition, and rewriting the MBR: MS-DOS gets horribly confused
if it is booted f

\end{description}

\EndVerbatim\EndHPage{}]\fi



\SubSection{Comments}

In early version we got a coplain that \''\unpenality' is not allowed
in vertical mode from the following code.

\Verbatim
\begin{trivlist}  \item\relax
    \ht:everypar \expandafter{\the\ht:everypar \unpenalty}
......
\end{trivlist}
\EndVerbatim




When an item is encountered it calls \''\makelabe' to create the label.

Commands \''\setbox...= box{...}' might produce extra spaces because
of the \''\par\leavevmode', an undesirable phenomena for framed
pictures.  Since boxes are in any case a problem for us for standard
text, we are probably better-off deal properly at least with pictures.




%

\ifHtml[\HPage{test data for crosss refs}\Verbatim

 \documentclass{book}
 \input tex4ht.sty  \Preamble{sections-,fonts,html}%,debug}  
                        \begin{document}
 \EndPreamble



\section{AA}                        %       0.1   AA
 
ref{1}-\ref{1}     NO                   %       ref10.1

ref{2}-\ref{2}     NO                   %          ref20.1

ref{3}-\ref{3}     NO                %          ref30.1

ref{4}-\ref{4}     NO                 %          ref40.1

ref{5}-\ref{5}     YES              %          ref61

ref{6}-\ref{6}     YES               %          ref62

ref{5}-\ref{55}    NO                %          ref50.1

ref{6}-\ref{66}    NO                %          ref60.1

ref{7}-\ref{7}    NO               %          ref70.1

ref{8}-\ref{8}    NO                 %          ref80.1

ref{9}-\ref{9}    NO                 %          ref90.1

ref{10}-\ref{10}  NO                 %          ref100.1

ref{11}-\ref{11}  NO                 %          ref110.1

ref{12}-\ref{12}  NO                 %          ref120.1

ref{13}-\ref{13}  NO                 %          ref130.1

ref{14}-\ref{14}  NO                   %          ref140.1

ref{15}-\ref{15}  NO                 %          ref150.1



\trivlist
\item aaaaaaaaaaaa  \label{1}       %       aaaaaaaaaaaa
\item bbbbbbbbbbbb  \label{2}       %       bbbbbbbbbbbb
\endtrivlist


\trivlist
\item[X1] aaaaaaaaaaaa  \label{3}    %      X1 aaaaaaaaaaaa
\item[X2] bbbbbbbbbbbb  \label{4}    %      X2 bbbbbbbbbbbb
\endtrivlist

\begin{enumerate}
\item aaaaaaaaaaaa  \label{5}       %         1. aaaaaaaaaaaa
\item bbbbbbbbbbbb  \label{6}       %         2. bbbbbbbbbbbb
\end{enumerate}

\begin{enumerate}
\item[X1] enum aaaaaaaaaaaa  \label{55}       %         X1 enum aaaaaaaaaaaa
\item[X2] enum bbbbbbbbbbbb  \label{66}       %         X2 enum bbbbbbbbbbbb

         no html comment here for link!
\end{enumerate}


\begin{description}
\item[X1] aaaaaaaaaaaa  \label{7}    %       X1 aaaaaaaaaaaa
\item[X2] bbbbbbbbbbbb  \label{8}    %       X2 bbbbbbbbbbbb
\end{description}

\begin{description}
\item aaaaaaaaaaaa  \label{9}       %        aaaaaaaaaaaa
\item bbbbbbbbbbbb  \label{10}      %        bbbbbbbbbbbb
\end{description}


\begin{itemize}
\item[X1] aaaaaaaaaaaa  \label{11}   %          X1 aaaaaaaaaaaa
\item[X2] bbbbbbbbbbbb  \label{12}   %          X2 bbbbbbbbbbbb
\end{itemize}

\begin{itemize}
\item aaaaaaaaaaaa  \label{13}      %          * aaaaaaaaaaaa
\item bbbbbbbbbbbb  \label{14}      %          * bbbbbbbbbbbb
\end{itemize}


\label{15}

\end{document}

\EndVerbatim\EndHPage{}]\fi


%%%%%%%%%%%%%%%%%
\Chapter{List-Based Environments}
%%%%%%%%%%%%%%%%






\Section{Verse, Quote, and Quoattion}

The \''\verse' carries the following def.

\Verbatim
               \newenvironment{verse}
               {\let\\\@centercr
                \list{}{\itemsep      \z@
                        \itemindent   -1.5em%
                        \listparindent\itemindent
                        \rightmargin  \leftmargin
                        \advance\leftmargin 1.5em}%
                \item\relax}
               {\endlist}
\EndVerbatim


The verse environment doesn't seem to need the 100\% width but we
include it because it costs nothing and without it there is a slight
deviation in the left margin from the quotation environments The
groups are for enclosed groups.






In LaTeX, these environment mainly enlarge the margins.

\Verbatim
         \newenvironment{quotation}
               {\list{}{\listparindent 1.5em%
                        \itemindent    \listparindent
                        \rightmargin   \leftmargin
                        \parsep        \z@ \@plus\p@}%
                \item\relax}
               {\endlist}
         \newenvironment{quote}
               {\list{}{\rightmargin\leftmargin}%
                \item\relax}
               {\endlist}
\EndVerbatim

The zero margins are in particular important for avoiding 
extra spaces in nested verbatim environments.

\<config book-report-article shared\><<<
\append:def\quotation{\a:quotation\par\@totalleftmargin|=\z@}
\NewConfigure{quotation}{1}
>>>








\<config book-report-article utilities\><<<
\append:def\quote{\par\@totalleftmargin|=\z@}
>>>

















\SubSection{The Display}

 The \''<DIV>...</DIV>'   handles a few additional,
but not all, the missing line breaks in lynx.


The quote and quotation environments, at least,  must include 
100\% width of page to allow the flushing left, right, and center of
embedded environments. 









\Section{Centered}



\Verbatim
      \def\center{\trivlist \centering\item\relax}
      \def\endcenter{\endtrivlist}
\EndVerbatim

The \''\par' is for allowing also the last paragraph to be
formatted in the 




The table is uggly in the following.
It is included for the surrounding space, and for grouping
within other environments.


\Verbatim
\documentstyle{article}

 \input tex4ht.sty \Preamble{html,fonts}
        \begin{document}
     \EndPreamble


\begin{center}
.. ... .. .... ...... ......(BR)\\
... ... ........... ......(BR)\\
....... ......


(P)..... .........
\end{center}

\end{document}

\EndVerbatim


\Section{Flushed Blocks}

\Verbatim
      \def\flushleft{\trivlist \raggedright\item\relax}
      \def\endflushleft{\endtrivlist}
      \def\flushright{\trivlist \raggedleft\item\relax}
      \def\endflushright{\endtrivlist}
\EndVerbatim



\<html latex env\><<<
\append:def\flushleft{\linepenalty|=10 }
>>>






\<html latex env\><<<
\append:def\flushright{\linepenalty|=10 \ifx \EndPicture\:UnDef 
     \parfillskip|=\@flushglue 
     \leftskip|=\z@skip \rightskip|=\@flushglue
   \fi}
>>>





The following have a problem of lack of space below and above them,
because  we don't want space on the margins. Above we tried to force
the extra space.



\Verbatim

\documentstyle{article}

 \input tex4ht.sty \Preamble{html,fonts}
        \begin{document}
     \EndPreamble


....................
\begin{flushleft}
(P)(TABLE...).. ... .. .... ...... ......(BR)\\
... ... ........... ......(BR)\\
....... ......


(P)..... .........(/TABLE)
\end{flushleft}
(P).............

(P)................

\end{document}

\EndVerbatim

Users might not be consistent to whether spaces are introduced
at start and end of lines.



\Section{Centering and Fussy}




\SubSection{Centering}

\<html latex env\><<<
\append:def\centering{%
   \linepenalty|=10 \ifx \EndPicture\:UnDef 
     \parfillskip|=\@flushglue 
     \leftskip|=\z@skip \rightskip|=\@flushglue
   \fi}
>>>


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Boxes}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%




\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/ltboxes.dtx]{}{}ltboxes.dtx\EndLink








Boxes are occasionally before placing them within pictures.

\<latex ltboxes\><<<
\def\lrbox#1{%
  \edef\reserved@a{%
    \endgroup
    \setbox#1\hbox{%
      \noexpand\PictureOff
      \begingroup   \aftergroup}% 
        \def\noexpand\@currenvir{\@currenvir}%
        \def\noexpand\@currenvline{\on@line}}%
  \reserved@a
    \@endpefalse  
    \color@setgroup
      \ignorespaces}
>>>





We place the third parameter of \''\makebox' in a 
group for avoiding problematic font of the form
\`'</CODE><CODE 
>uparrow' from
\`'\makebox[90pt][l]{\tt uparrow}' instead of
\`'<CODE 
>uparrow</CODE>'.


\<latex ltboxes\><<<
\long\def\:tempc[#1][#2]#3{\o:@imakebox:[#1][#2]{{#3}}}
\HLet\@imakebox|=\:tempc
>>>

Similarly for the following.

\<latex ltboxes\><<<
\let\:sbox|=\sbox
\long\def\sbox#1#2{\:sbox#1{{#2}}}
>>>
 

%%%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{Mini pageas}
%%%%%%%%%%%%%%%%%%%%%%%%%%%

\<latex ltboxes\><<<
\HAssign\:mpNum=0
\HAssign\minipageNum=0
\def \@setminipage{%
  \@minipagetrue
  \ht:everypar{\@minipagefalse\HtmlPar\ht:everypar{\HtmlPar}}%
  \gHAdvance\:mpNum by 1
  \HAssign\minipageNum=\:mpNum \relax
}
>>>


\<adjust minipageNum for setcounter footnote 0\><<<
\gHAdvance\:mpNum by 1
\HAssign\minipageNum=\:mpNum \relax
>>>





%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
\SubSection{/mbox}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%5




\<latex math\><<<
\long\def\:temp#1{\leavevmode\hbox{\a:mbox {#1}\b:mbox}} 
\HLet\mbox|=\:temp
\NewConfigure{mbox}{2}  
>>>




\SubSection{/framebox and /fbox}

\<latex ltboxes\><<<
\long\def\:temp#1{\a:fbox\gobble:fbox\o:fbox:{\hbox{{#1}}}\b:fbox}
\HLet\fbox|=\:temp
\let\gobble:fbox=\empty
\def\:tempc#1{}
\HLet\gobble:fbox|=\:tempc
>>>


\<config latex.ltx utilities\><<<
\NewConfigure{fbox}{2}  
>>>

\<latex ltboxes\><<<
\long\def\:temp[#1][#2]#3{%
   \em:dim\frameboxWidth{#1}\def\frameboxAlign{#2}%
   \a:framebox \gobble:frame\o:@iframebox:[#1][#2]{#3}\b:framebox}
\HLet\@iframebox|=\:temp
\NewConfigure{framebox}{2}
\let\gobble:frame=\empty
\def\:tempc#1[#2][#3]{\hbox}
\HLet\gobble:frame|=\:tempc
>>>

We need the \`'[]' above, because the picture contains an mbox that
may include pictorial symbols that will cause nested images in ALT of
xref.

\<latex ltboxes\><<<
\def\em:dim#1#2{%
  \tmp:dim=#2\tmp:cnt=0 \em:int \edef#1{\the\tmp:cnt}%
  \tmp:dim=10\tmp:dim \tmp:cnt=0 \em:int \edef#1{#1.\the\tmp:cnt}%
  \tmp:dim=10\tmp:dim \tmp:cnt=0 \em:int \edef#1{#1\the\tmp:cnt}%
  \edef#1{#1em}%
}
\def\em:int{\relax
  \ifdim \tmp:dim>1em
     \advance\tmp:cnt by 1  \advance\tmp:dim by -1em
     \expandafter\em:int
  \fi
}
>>>






\Section{Centerline, Leftline, Rightline}

\<latex ltboxes\><<<
\NewConfigure{centerline}[2]{\c:def\cnt:a{#1}\c:def\cnt:b{#2}}
\NewConfigure{leftline}[2]{\c:def\lft:a{#1}\c:def\lft:b{#2}}
\NewConfigure{rightline}[2]{\c:def\a:rightline{#1}\c:def\b:rightline{#2}}
>>>

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Tabbing}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/lttab.dtx]{}{}lttab.dtx\EndLink


\Section{Tabbing}


 The original  has been defined as global, probbaly 
because it was in a group hiding \`'\+'. I couldn't locate that 
group. I protectd the problematic parts here from the if-else of the
first pass with \''\expandafter'.



\<latex lttab\><<<
|<TABLE tabbing|>   
|<TABLE tabbing Config util|>   
|<all html latex tabs|>  
\pend:defI\extracolsep{\a:extracolsep{##1}} 
\NewConfigure{extracolsep}[1]{\def\a:extracolsep##1{#1}}
\Configure{extracolsep}{}
>>>


The pic-tabbing' option asks for pictures just for tabbing environments 
that have the {\tt \char92'} tabbing command.













The above order of insertions is important for \''\tab:N'
nd \`'\LikeRef' to be recognized. 

\<all html latex tabs\><<<
\HAssign\tab:N|=0
\pend:def\tabbing{\let\dot:tab|=\empty \gHAdvance\tab:N |by 1}
\append:def\endtabbing{\Tag{|<tabbing tag|>.}{\dot:tab}}
\pend:def\@tablab{\xdef\dot:tab{.}}
>>>

Tabbing enironments can't be nested (latex 181).


Can we get rid of the following pictoral part by using ConfigureEnv?





\<TABLE tabbing\><<<
\let\:tempc|=\tabbing
\pend:def\:tempc{\Configure{HtmlPar}{}{}{}{}%
   \edef\ln:tab{\LikeRef{|<tabbing tag|>} 0 }%
   \let\TABBING|=\ln:tab  \gdef\locs:tab{}}
\HLet\tabbing|=\:tempc
\let\:tempc|=\endtabbing
\append:def\:tempc{%
   \Tag{|<tabbing tag|>}{\locs:tab}%
   \def\:temp{.}\ifx \:temp\dot:tab
      \:warning{\noexpand\' ignored in tabbing}     
   \fi}
\HLet\endtabbing|=\:tempc
>>>







The lengths of the fields are recorded in \''\locs:tab',
send into xref with tag \`'\tab:N', and loaded into
\''\ln:tag' for use.

\<tabbing tag\><<<
|<auto tag|>tb\tab:N >>>


\SubSection{Fields}

\<TABLE tabbing\><<<
\def\:addfield{\global\setbox\@curline\hbox{\unhbox
   \@curline\unhbox\@curfield}}
\def\:temp{%
   \global\setbox\@curline\hbox{\unhbox
      \@curline   \x:tab\D:tab
      \unhbox\@curfield  \y:tab\d:tab
      |<record len of prev field|>%
      \global\let\y:tab|=\empty
}}
\HLet\@addfield|=\:temp
>>>

\<paused addfield\><<<
\:addfield
>>>

\<record len of prev field\><<<
\ifx \y:tab\empty
   \tmp:dim|=\dimen\@curtab
   \advance\tmp:dim |by -\loc:tab
\else
   \tmp:dim|=\last:len\relax
\fi
\ifdim \tmp:dim >\z@
   \tmp:dim|=\m:tab\tmp:dim
   \xdef\locs:tab{\locs:tab\space \pt:int\tmp:dim}%
\fi
\xdef\loc:tab{\the\dimen\@curtab}%
>>>

\SubSection{Start of Line}


\<TABLE tabbing\><<<
\def\:temp{%
   \TRD:tab  \gdef\loc:tab{\z@}%
   \ifnum \@nxttabmar >\@hightab
     \@badtab  \global\@nxttabmar \@hightab
   \fi
   \global\@curtabmar \@nxttabmar
   \global\@curtab \@curtabmar
   \global\setbox\@curline \hbox {}%
   \@startfield  |<indented tabs|>%
   \strut}
\HLet\@startline|=\:temp
>>>


The \''\x:tab' is needed for an extra field at the start
when tabs start in middle of line (due to \''\+').

\<indented tabs\><<<
\ifdim \the\dimen\@curtab > \z@
       \gdef\x:tab{\D:tab  \d:tab\gdef\x:tab{}}%
\else  \gdef\x:tab{}%
\fi
>>>


The \'+\'+ command is ignored here, and the content is pushed to the
next field.


\<TABLE tabbing\><<<
\def\:temp{%
  \@stopfield
  \global\setbox\@curline\hbox{%
    \box\@curline  
    \hskip-\wd\@curfield \hskip-\tabbingsep
    |<move tab backward|>%
    \box\@curfield
    \hskip\tabbingsep}%
  \@startfield
  \ignorespaces}
\HLet\@tablab|=\:temp
>>>

\<move tab backward\><<<
\x:tab \D:tab 
>>>



\<TABLE tabbing\><<<
\def\:temp{%
  \@stopfield |<paused addfield|>%
  \global\advance\@tabpush \@ne 
  \begingroup  \@contfield}
\HLet\pushtabs|=\:temp
\def\:temp{\@stopfield |<paused addfield|>%
  \ifnum \@tabpush >\z@
    \endgroup  \global\advance\@tabpush \m@ne
    \ifnum \@curtab >\@hightab
      \global \@curtab \@hightab
      \@badtab \fi
  \else \@badpoptabs \fi
  \@contfield}
\HLet\poptabs|=\:temp
>>>



\SubSection{End of Line}

Last field width is important if its field is shifted right (with \''\`'
that translates to \''\@tabrj'). Otherwise, a 0 dimension is provided
for a place holder.

\<TABLE tabbing\><<<
\let\:tempc|=\@stopline
\pend:def\:tempc{%
   \unskip \@stopfield
   |<compute width of last field|>%
   \:gobbleII}
\append:def\:tempc{\rt:tab 
   |<width for last field|>\pic:gobble\hfill}
\HLet\@stopline|=\:tempc
>>>

\<TABLE tabbing\><<<
\let\:tempc|=\kill
\pend:def\:tempc{%
  \@stopfield
  |<width for last field of kill|>%
  \:gobble}
\HLet\kill|=\:tempc
>>>

\<compute width of last field\><<<
\tmp:dim\linewidth
\advance\tmp:dim by -\wd\@curline 
\edef\last:len{\if@rjfield \the\tmp:dim \else \z@\fi}%
>>>

\<width for last field\><<<
\tmp:dim \last:len
\tmp:dim\m:tab\tmp:dim
\xdef\locs:tab{\locs:tab\space \pt:int\tmp:dim }%
>>>

\<width for last field of kill\><<<
\tmp:dim |= \if@rjfield \the\wd\@curfield\else \z@\fi
\tmp:dim\m:tab\tmp:dim
\xdef\locs:tab{\locs:tab\space 0 }%
>>>



\<TABLE tabbing\><<<
\def\pt:int#1{\expandafter\pt:nt\the#1//}
\def\pt:nt#1.#2//{#1}
>>>


\SubSection{Flush Right with {\tt\char92}`}


\<TABLE tabbing\><<<
\let\y:tab=\empty
\let\:tempc|=\@tabrj
\pend:def\:tempc{%
  \@stopfield \edef\last:len{\the\wd\@curfield}%
  \gdef\y:tab{\d:tabalgn \let\TabType=\`\relax \c:tabalgn}%  
  \:gobble
}
\HLet\@tabrj=\:tempc 
>>>


\SubSection{The Html Commands}

\<TABLE tabbing\><<<
\def\TRD:tab{\gdef\D:tab{\a:tabalgn \c:tabalgn \gdef\D:tab{}}}
\def\d:tab{\gdef\D:tab{%
   \d:tabalgn \c:tabalgn \gdef\D:tab{}}}
\def\rt:tab{\d:tabalgn\b:tabalgn}
>>>



\<TABLE tabbing\><<<
\def\gt:tab{%
   \afterassignment\gt:tb \tmp:cnt=\ln:tab \space 0//}
\def\gt:tb#1//{\xdef\ln:tab{#1}%
   \edef\TabWidth{\ifnum \tmp:cnt> 0 \the\tmp:cnt\fi }}
>>>



\<plain,latex utilities\><<<
\def\:tblgn{\ifx [\:temp \expandafter\:tbln
   \else  \expandafter\c:tblgn \fi}
\def\:tbln[#1]#2#3#4#5{%
   \def\m:tab{#2#3#4#5}\ifx \m:tab\empty \else
      \Configure{\:tempa}{#2}{#3}{#4}{#5}{}\fi
   \def\m:tab{#1}}
\long\def\c:tblgn#1#2#3#4{%
   \c:def\a:tabalgn{\ifx \EndPicture\:UnDef 
                            \let\TabType|=\relax #1\fi}%
   \d:def\b:tabalgn{\ifx \EndPicture\:UnDef #2\fi}%
   \d:def\c:tabalgn{\ifx \EndPicture\:UnDef \gt:tab #3\fi}%
   \d:def\d:tabalgn{\ifx \EndPicture\:UnDef #4\fi}\E:tabalign}
\c:def\a:tabalgn{}
\d:def\b:tabalgn{}
\d:def\c:tabalgn{}
\d:def\d:tabalgn{}
>>>





HANDLE the above Configure.



\<TABLE tabbing Config util\><<<
\let\E:tabalign|=\empty
\def\c:tabbing:{\def\:tempa{tabbing}\futurelet\:temp\:tblgn}
>>>   














The \''\hfil\break' to force likne breaks in TeX. Lines taht
are too long might push pictures outside the boundaries where
dvips/convert may be set to process them.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Tabule and Array Environments}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Array, Tabular}
%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{Core}
%%%%%%%%%%%%%%%%%%%%%%%%

The \`'\array' and \`'\tabular' environments are both defined in
terms of \''\@array',


\<latex lttab\><<<
\:CheckOption{no-array}\if:Option \else
   |<shared html latex array/tabular|>
   \:ifpackageloaded{array}{\:Optiontrue}{}
\fi
\if:Option \else
   |<array/tabular of latex|>
\fi
>>>


Unless a substitution for html array/tabular is provided,
`no-array' also requires `no-halign'.

\<array/tabular of latex\><<<
|<html private array/tabular|>
|<pic array|>
|<pic tabular|>
>>>






\<config latex.ltx utilities\><<<
\:CheckOption{no-array}\if:Option \else
   |<html latex array/tabular Config util|>
\fi
>>>



\SubSection{Non-Pictorial Core}

\<html private array/tabular\><<<
\def\:temp[#1]#2{%
  |<init conds for @array|>%
  \setbox\@arstrutbox\hbox{%
    \vrule \@height\arraystretch\ht\strutbox
           \@depth\arraystretch \dp\strutbox
           \@width\z@}%
  \@mkpream{#2}%
  \edef\@preamble{%
        |<ialign for html @array|>}%     
  \let\@startpbox\@@startpbox \let\@endpbox\@@endpbox
  \let\tabularnewline\\%
  \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi
  \bgroup \def\v:TBL{#1}%
    \let\par\@empty \let\protect\relax
    \lineskip\z@skip\baselineskip\z@skip
    \ifx \EndPicture\:UnDef
       \SaveMkHalignConfig |<@array configuration for MkHalign|>%
    \else \let\@sharp|=##\fi  |%  \HRestore\noalign|%
    \@preamble}
\HLet\@array|=\:temp
|<latex: show paragraphs in array par box|>
>>>

% \@arrayparboxrestore


\<latex: show paragraphs in array par box\><<<
\let\:tempc|=\@@startpbox
\append:defI\:tempc{\everypar{\HtmlPar}\a:arrayparbox}%
\HLet\@@startpbox|=\:tempc
>>>

\<latex lttab\><<<
\NewConfigure{arrayparbox}{1}
>>>


\<html private array/tabular\><<<
\def\:tempc{\relax 
   \ifx \HCol\:UnDef \else \ifnum\HCol=1 \a:endarray\fi \fi
   \crcr\ifx \EndPicture\:UnDef \EndMkHalign
   \else \egroup\fi \egroup}
\HLet\endarray\:tempc
\def\:tempc{\relax
   \ifx \HCol\:UnDef \else \ifnum\HCol=1 \a:endarray\fi \fi
   \crcr\ifx \EndPicture\:UnDef
   \EndMkHalign\else \egroup\fi \egroup $\egroup}
\HLet\endtabular\:tempc
\expandafter \let \csname endtabular*\endcsname|=\endtabular
\expandafter\def\csname tabular*\endcsname#1{\tabular}
\expandafter\def\csname before:begintabular*\endcsname{\csname
   before:begintabular\endcsname} 
\expandafter\def\csname ontabular*:list\endcsname{\csname
   ontabular:list\endcsname}
>>>

\<latex lttab\><<<
\NewConfigure{endtabular}{1}
\NewConfigure{endarray}{1}
>>>




\SubSection{Pic Array/Tabular}

The checking of options needs to be at the end.







\SubSection{ialign}


\<ialign for html @array\><<<
\everycr{}\tabskip\z@skip\noexpand\MkHalign\noexpand\@sharp
   {\@arstrut \@preamble \tabskip\z@skip}%
>>>



\SubSection{Testpach}




\<html private array/tabular\><<<
\def\:temp#1{\@chclass \ifnum \@lastchclass=\tw@ 4 \else
    \ifnum \@lastchclass=3 5 
       |<tabular col width|>%
    \else
     \z@ \if #1c\@chnum \z@ \add:ar-\else
                              \if #1l\@chnum \@ne \add:ar<\else
                              \if #1r\@chnum \tw@ \add:ar>\else
          \@chclass \if #1||\@ne \b:VBorder\else
                    \if #1@\tw@ \d:VBorder\else
                    \if #1p3 \add:ar p\else \z@ \@preamerr 0\fi
  \fi  \fi  \fi  \fi  \fi  \fi
\fi}
\HLet\@testpach|=\:temp
\def\add:ar#1{%
   \Advance:\ar:cnt by 1 
   |<record alignment type|>\c:VBorder
   \edef\HAlign{\HAlign 0 \ar:cnt\space #1 }}
|<access col alignment|>
>>>

\<tabular col width\><<<
\expandafter\let \csname @testpach \ar:cnt\endcsname\@nextchar
>>>

\<html private array/tabular\><<<
\def\HColWidth{\csname @testpach \HCol\endcsname}
>>>

\<globalize HAlign and ar:cnt\><<<
\tmp:cnt=0
\global\let\:tempa\empty
\loop\ifnum \ar:cnt>\tmp:cnt 
   \advance\tmp:cnt by 1
   \expandafter\ifx \csname @testpach \the\tmp:cnt\endcsname\relax \else      
      \xdef\:tempa{%
          \:tempa
          \def \expandafter\noexpand
             \csname @testpach \the\tmp:cnt\endcsname{\csname @testpach
             \the\tmp:cnt\endcsname}}%
      \expandafter\let\csname @testpach \the\tmp:cnt\endcsname\relax
   \fi
\repeat
\aftergroup\:tempa
>>>





\<record alignment type\><<<
\def\ch:class{#1}%
>>>


\<access col alignment\><<<
\def\HColAlign{\expandafter \ifx\csname
   \expandafter\string\ch:class :T:D\endcsname\relax \else \csname
   \expandafter\string\ch:class :T:D\endcsname\fi}
>>>


%\<latex utilities\><<<
%\let\HAlign|=\empty
%>>>

\SubSection{Multicolumn}


\<html private array/tabular\><<<
\long\def\:temp#1#2#3{\multispan{#1}\begingroup
  |<add Row.Col<-> to new:span|>%
  \def\@sharp{\a:multicolumn#3\b:multicolumn}\set@typeset@protect
  \let\@startpbox\@@startpbox\let\@endpbox\@@endpbox
  \@arstrut \@preamble\hbox{}\endgroup\ignorespaces}
\HLet\multicolumn|=\:temp
\NewConfigure{multicolumn}{2} 
>>>

\<add Row.Col<-> to new:span\><<<
\let\HAlign\empty  \@mkpream{#2}%
\ifx \EndPicture\:UnDef
   \def\:temp##1 ##2 ##3 {##3}%
   \xdef\new:span{\new:span\HRow.\HCol\expandafter\:temp\HAlign;}%
\fi
>>>



We could have inserted automatic \''<PRE>...</PRE>' around tabular,
but this  may unintentionally cause nested PRE environments. The user
may also do it with comamnds of the form:
\`'\def\endPRE{\HCode{</PRE>}}
\let\oldtabular=\tabular
\def\tabular{\HCode{<PRE>}\aftergroup \endPRE\oldtabular}'.



 It is in particular 
problematic for leading lines of some, but not all, kinds.


\SubSection{Configuration}


\<@array configuration for MkHalign\><<<
\ifx \recall:ar\:UnDef
   \pend:def\@array{\recall:ar}%
   \edef\recall:ar{%
      \noexpand\ifx \noexpand\EndPicture\noexpand\:UnDef \noexpand\else
         \arrayrulewidth|=\the\arrayrulewidth
         \doublerulesep|=\the\doublerulesep
         \arraycolsep|=\the\arraycolsep
         \tabcolsep|=\the\tabcolsep
      \noexpand\fi }%
\fi
\arrayrulewidth|=\z@  \doublerulesep|=\z@
\arraycolsep|=\z@     \tabcolsep|=\z@
\Configure{MkHalign}
   {\@array:a}%
   {\@array:b\ProperTrTrue}%
   {\a:putHBorder\InitHBorder \ifProperTr{\@array:c}}%
   {\ifProperTr{\@array:d}\a:putHBorder\InitHBorder}%
   {\ifProperTr{\@array:e}\RecallMkHalignConfig\recall:ar}%
   {\ifProperTr{\@array:f}}
>>>




\<latex lttab\><<<
\def\ignoreEndTr{\expandafter
   \ifx \csname :AfterHline\endcsname\relax\else 
      \expandafter\ignore:EndTr
   \fi}
\def\ignore:EndTr{%
   \o:noalign:{\global\futurelet\:AfterHline}%
}
\long\def\ifProperTr#1{%
   \ifx \:AfterHline\end
       #1\global\let\:AfterHline\endinput  |%#1 is \@array:f|%
       \global\let\Needs:@array:d\@array:d
   \else \ifx \:AfterHline\endinput
       \ifx \Needs:@array:d\@array:d
          #1\global\let\Needs:@array:d\:UnDef
       \fi
       \global\let\:AfterHline\relax
   \else  #1%
   \fi\fi}
\def\ProperTrTrue{\global\let\:AfterHline=\relax}
\NewConfigure{putHBorder}{1}
>>>



\<shared html latex array/tabular\><<<
\def\:temp{\let\@array:a|=\a:array \let\@array:b|=\b:array
   \let\@array:c|=\c:array \let\@array:d|=\d:array
   \let\@array:e|=\e:array \let\@array:f|=\f:array \o:array:}
\HLet\array|=\:temp
\ifx \:@tabular:\:UnDef \let\:@tabular:|=\empty \fi
>>>

\<array/tabular of latex\><<<
\def\:temp{%
   |<set hooks of tabular|>%
   \leavevmode \hbox \bgroup \:@tabular:
   $\let\@acol\@tabacol  \let\@classz\@tabclassz
   \let\@classiv\@tabclassiv \let\\\@tabularcr\@tabarray}
\HLet\tabular|=\:temp
>>>

\<set hooks of tabular\><<<
\let\@array:a|=\a:tabular \let\@array:b|=\b:tabular
\let\@array:c|=\c:tabular \let\@array:d|=\d:tabular
\let\@array:e|=\e:tabular \let\@array:f|=\f:tabular
>>>








The \`'\@tabular' above to capture both \`'\begin{tabular}'
and  \`'\begin{tabular*}'.


\<html latex array/tabular Config util\><<<
\NewConfigure{array}{6}
\NewConfigure{tabular}{6}
\NewConfigure{VBorder}{4}
\NewConfigure{HBorder}[9]{\c:def\a:HBorder{#1}%
   \c:def\b:HBorder{#2}\c:def\c:HBorder{#3}\c:def\d:HBorder{#4}%
   \c:def\e:HBorder{#5}\c:def\f:HBorder{#6}\c:def\g:HBorder{#7}%
   \c:def\h:HBorder{#8}\c:def\i:HBorder{#9}\c:HBRD}
\def\c:HBRD#1{\c:def\j:HBorder{#1}}
|<configuring @()|>
>>>


\`'\@nextchar' holds the contents of \`'@{...}'


\<configuring @()\><<<
\def\:temp{\@addtopreamble{\@nextchar
   \csname a:@{}\endcsname}}         \HLet\@tabclassiv|=\:temp
\def\:temp{\@addtopreamble{$\@nextchar
   $\csname a:@{}\endcsname}}        \HLet\@arrayclassiv|=\:temp
\NewConfigure{@{}}{1}
\Configure{@{}}{}
>>>



\SubSection{Border Lines and Alignments}

The alignments, and whether borders are to be employed,
are decided from the \`'(|c|@{...}l|r|...)' like parameter.
A border is set if the parameter request a drawing of a line.

\<init conds for @array\><<<
\def\Clr{#2}\a:VBorder
\HAssign\ar:cnt|=0
\let\HAlign|=\empty
>>>















%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{supertabular.sty}
%%%%%%%%%%%%%%%%%%%%%%%%%%%



\<supertabular.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% supertabular.4ht                     |version %
% Copyright (C) |CopyYear.2002.      Eitan M. Gurari         %
|<TeX4ht copyright|>
   |<supertabular code|>
\Hinput{supertabular}
\endinput
>>>        \AddFile{7}{supertabular}


\<supertabular code\><<<
\long\def\tablelasttail#1{%
   \def\:temp{#1}\ifx \:temp\empty
      \gdef \@table@last@tail {}%
   \else 
      \gdef \@table@last@tail {\cr #1}%
   \fi
}
\ifx \@table@last@tail\:UnDef \else
  \gdef\:temp{}
  \ifx \@table@last@tail\:temp\else
    \pend:def\@table@last@tail{\cr}%
\fi \fi
\def\ST@xargarraycr#1{%
  \@tempdima #1\relax  \cr
  \ifdim #1>5pt
    \ifx \ar:cnt \:UnDef \else 
      \o:noalign: {%
        \gdef\SpBorder{#1}%
        \append:def \hline:s {\a:SpBorder }%
        \def\:tempb{\ifnum \tmp:cnt <\ar:cnt 
           \advance \tmp:cnt by 1 
           \append:def\hline:s{\b:SpBorder }\expandafter\:tempb \fi }%
        \tmp:cnt=0 \:tempb
        \append:def\hline:s{\c:SpBorder }%
        \global\let\hline:s=\hline:s }%
  \fi \fi
}
\NewConfigure{SpBorder}{3}
\def\ST@cr{}
\long\def\tabletail#1{\gdef\@tabletail{}}
\tabletail{}
\let\o:ST@caption:=\ST@caption
\def\ST@caption{\gHAdvance\TitleCount by 1 \o:ST@caption:}
>>>


%%%%%%%%%%%%%%%%%%%
\Section{array.sty}
%%%%%%%%%%%%%%%%%%%

Good sample: tabsatz.tex


\<array.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% array.4ht                            |version %
% Copyright (C) |CopyYear.1997.      Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<array hooks|>
\Hinput{array}
\endinput
>>>        \AddFile{7}{array}

\Link[file://localhost/n/candy/0/tex/teTeX/texmf/tex/latex/tools/array.sty]{}{}%
array.sty\EndLink


\<array hooks\><<<
|<html private array/tabular array.sty|>
>>>



In array.sty we have

\Verbatim
ol=\relax        \let\@expast=\relax
\let\@arrayclassiv=\relax   \let\@arrayclassz=\relax
\let\@tabclassiv=\relax     \let\@tabclassz=\relax
\let\@arrayacol=\relax      \let\@tabacol=\relax
\let\@tabularcr=\relax      \let\@@endpbox=\relax
\let\@argtabularcr=\relax   \let\@xtabularcr=\relax
\EndVerbatim

so we need diffenent definition than in latex

\<html private array/tabular array.sty\><<<
\def\@tabular{\leavevmode
  \hbox \bgroup \:@tabular:
      $\col@sep\tabcolsep \let\d@llarbegin\begingroup
                                    \let\d@llarend\endgroup
  \@tabarray}
\pend:def\@tabular{\let\@array:a|=\a:tabular \let\@array:b|=\b:tabular
   \let\@array:c|=\c:tabular \let\@array:d|=\d:tabular
   \let\@array:e|=\e:tabular \let\@array:f|=\f:tabular }
>>>





The \`'\array' and \`'\tabular' environments are both defined in
terms of \''\@array',

Two definitions of \''\@mkpream' appear in array.sty, with the following
being the second one. What use the first def has?

The checking of options needs to be at the end.







\<html private array/tabular array.sty\><<<
\def\:temp[#1]#2{%
  |<init conds for @array|>%
  \@tempdima \ht \strutbox
  \advance \@tempdima by\extrarowheight
  \setbox \@arstrutbox \hbox{\vrule
             \@height \arraystretch \@tempdima
             \@depth \arraystretch \dp \strutbox
             \@width \z@}%
  \begingroup
    \@mkpream{#2}%
    \xdef\@preamble{%
        |<ialign for html @array|>}%     
    |<globalize ar:cnt for array.sty|>%
  \endgroup
  \@arrayleft
  \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi \fi
  \bgroup
    \def\v:TBL{#1}%
    \let \protect \relax  \lineskip \z@  
    \baselineskip \z@ \m@th
    \let\\\@arraycr \let\tabularnewline\\\let\par\@empty
    \ifx \EndPicture\:UnDef
       \SaveMkHalignConfig %%%%%%%%% \let\sv:ALIGN|=\HAlign
       |<@array configuration for MkHalign|>%
       |<modefied @array config|>%
    \else \let\@sharp|=##\fi  |%\HRestore\noalign|%
    \@preamble}
\HLet\@array|=\:temp
\HLet\@@array|=\@array 
|<array.hooks: show paragraphs in array par box|>
>>>



\<array.hooks: show paragraphs in array par box\><<<
\let\:tempc|=\@startpbox
\append:defI\:tempc{\expandafter\everypar
   \expandafter{\the\everypar\everypar{\HtmlPar}\HtmlPar}}
\HLet\@startpbox|=\:tempc
>>>


\<modefied @array config\><<<
\Configure{MkHalign}%
   {\@array:a}%
   {\@array:b\ProperTrTrue}%
   {\a:putHBorder\InitHBorder \ifProperTr{\@array:c}}%
   {\ifProperTr{\@array:d}\a:putHBorder\InitHBorder}%
   {\ifProperTr{\@array:e}%%%%%%%%%%\global \let\HAlign|=\sv:ALIGN
          \RecallMkHalignConfig\recall:ar}%
   {\ifProperTr{\@array:f}}
>>>





\''\endarray' has two defs in array.sty. Where the first one is
in use (it is ignored here).

\<html private array/tabular array.sty\><<<
\def\:tempc{\relax \ifnum\HCol=1 \a:endarray\fi
   \enda:rray}
\HLet\endarray\:tempc
\def\:tempc{\relax \ifnum\HCol=1 \a:endtabular\fi
   \enda:rray $\egroup}
\HLet\endtabular\:tempc
\def\enda:rray{\crcr\ifx \EndPicture\:UnDef \EndMkHalign
   \else \egroup\fi  \egroup \@arrayright \gdef\@preamble{}}
\expandafter \let \csname endtabular*\endcsname|=\endtabular
>>>

We can't put \''\endarray' in \''\endtabular' directly, because
both change dynamically.


%%%%%%%%%%%%%%%%%%%%
\SubSection{Options}
%%%%%%%%%%%%%%%%%%%%


The alignments, and whether borders are to be employed,
are decided from the \`'(|c|@{...}l|r|...)' like parameter.
A border is set if the parameter request a drawing of a line.


\<html private array/tabular array.sty\><<<
\def\:tempc{\@chclass
 \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else
  \ifnum \@lastchclass=7 5 \else
   \ifnum \@lastchclass=8 \tw@ \else
    \ifnum \@lastchclass=9 \thr@@
   \else \z@
   \ifnum \@lastchclass = 10 \else
   \edef\@nextchar{\expandafter\string\@nextchar}%
   \@chnum
   \if \@nextchar c\z@ \add:ar-\else
    \if \@nextchar l\@ne \add:ar<\else
     \if \@nextchar r\tw@ \add:ar>\else
   \z@ \@chclass
   \if\@nextchar ||\@ne \b:VBorder\else
    \if \@nextchar !6 \else
     \if \@nextchar @7 \d:VBorder\else
      \if \@nextchar <8 \else
       \if \@nextchar >9 \else
  10
  \@chnum
  \if \@nextchar m\thr@@ \add:ar m\else
   \if \@nextchar p4 \add:ar p\else
    \if \@nextchar b5 \add:ar b\else
   \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi
   \fi \fi  \fi  \fi  \fi  \fi  \fi \fi \fi \fi \fi \fi}
\HLet\@testpach|=\:tempc
>>>



Note that in latex \''\VBorder' and the internals of \''\add:ar' are defined
as locals and not globals. Make sure that we have no problems with the
new way.  Don't globalize ar:cnt!!!!

\<html private array/tabular array.sty\><<<
\def\add:ar#1{\HAdvance\ar:cnt by 1
   |<record alignment type|>\c:VBorder
   \edef\HAlign{\HAlign 0 \ar:cnt\space #1 }}
|<access col alignment|>
>>>




\<html private array/tabular array.sty\><<<
\long\def\:temp#1#2#3{%
   \multispan{#1}\begingroup    
%%%%%%%%     \let\sv:ALIGN|=\HAlign % \let\ar:cnt:|=\ar:cnt
     \def\@addamp{\if@firstamp \@firstampfalse \else
                \@preamerr 5\fi}%
     |<add Row.Col<-> to new:span|>\@addtopreamble\@empty
     \global\let\ch:class|=\ch:class
%%%%%%%%     \global\let\HAlign|=\sv:ALIGN  
     |<globalize ar:cnt for array.sty|>%
   \endgroup 
   \def\@sharp{\a:multicolumn#3\b:multicolumn}%
   \@arstrut \@preamble
   \null
   \ignorespaces}
\HLet\multicolumn|=\:temp
>>>




\<shared html latex array/tabular\><<<
\NewConfigure{multicolumn}{2} 
>>>




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{Options 8 and 9}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\<array hooks\><<<
\def\save@decl{%
  \toks \count@ = \expandafter\expandafter\expandafter {%
     |<open lt/gt array opt|>\expandafter\@nextchar\the\toks
     \expandafter\count@|<close lt/gt array opt|>}}
\NewConfigure{array>}{2}
\NewConfigure{array<}{2}
>>>


\<open lt/gt array opt\><<<
\csname a:array\ifnum\@lastchclass=9 
   >\else <\fi \expandafter\expandafter\expandafter\endcsname
>>>


\<close lt/gt array opt\><<<
\csname b:array\ifnum\@lastchclass=9 
   >\else <\fi\endcsname
>>>


%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{dcolumn}
%%%%%%%%%%%%%%%%%%%%%%%%%


\<dcolumn.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% dcolumn.4ht                      |version %
% Copyright (C) |CopyYear.2004.      Eitan M. Gurari         %
|<TeX4ht copyright|>
   |<dcolumn hooks|>
\Hinput{dcolumn}
\endinput
>>>        \AddFile{9}{dcolumn}


\<dcolumn hooks\><<<
\pend:defIII\DC@centre{\def\Dpoint{##2}\a:dcolumn}
\append:def\DC@endcentre{\b:dcolumn}
\pend:defIII\DC@right{\def\Dpoint{##2}\a:dcolumn}
\append:def\DC@endright{\b:dcolumn}
\NewConfigure{dcolumn}{2}
>>>


%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{longtable.sty}
%%%%%%%%%%%%%%%%%%%%%%%%%



\<longtable.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% longtable.4ht                        |version %
% Copyright (C) |CopyYear.1997.      Eitan M. Gurari         %
|<TeX4ht copyright|>
   |<longtable code|>
   |<longtable hline|>
   |<longtable captions|>
\Hinput{longtable}
\endinput
>>>        \AddFile{7}{longtable}

% \:CheckOption{old-longtable}        \if:Option  
%    |<longtable.sty|>
% \else
% \fi

\Link[file://localhost/n/candy/0/tex/teTeX/texmf/tex/latex/tools/longtable.sty]{}{}%
longtable.sty\EndLink{ \tt|}
\Link[http://www.fi.infn.it/pub/tex/doc/html/latex.html]{}{}latex\EndLink


\<longtable code\><<<
\def\LT@array[#1]#2{%
  |<tags for captions, empty|>%
  |<init conds for longtable|>%      
  \refstepcounter{table}\stepcounter{LT@tables}%
  \if l#1%
    \LTleft\z@ \LTright\fill
  \else\if r#1%
    \LTleft\fill \LTright\z@
  \else\if c#1%
    \LTleft\fill \LTright\fill
  \fi\fi\fi
  \let\LT@mcol\multicolumn
  \let\LT@@tabarray\@tabarray
  \let\LT@@hl\hline
  \def\@tabarray{%
    \let\hline\LT@@hl
    \LT@@tabarray}%
  \let\\\LT@tabularcr\let\tabularnewline\\%
  \def\newpage{\noalign{\break}}%
  \def\pagebreak{\noalign{\ifnum`}=0\fi\@testopt{\LT@no@pgbk-}4}%
  \def\nopagebreak{\noalign{\ifnum`}=0\fi\@testopt\LT@no@pgbk4}%
  \let\hline\LT@hline \let\kill\LT@kill\let\caption\LT@caption
  \@tempdima\ht\strutbox
  \let\@endpbox\LT@endpbox
  \ifx\extrarowheight\@undefined
    \let\@acol\@tabacol
    \let\@classz\@tabclassz \let\@classiv\@tabclassiv
    \def\@startpbox{\vtop\LT@startpbox}%
    \let\@@startpbox\@startpbox
    \let\@@endpbox\@endpbox
    \let\LT@LL@FM@cr\@tabularcr
  \else
    \advance\@tempdima\extrarowheight
    \col@sep\tabcolsep
    \let\@startpbox\LT@startpbox\let\LT@LL@FM@cr\@arraycr
  \fi
  \setbox\@arstrutbox\hbox{\vrule
    \@height \arraystretch \@tempdima
    \@depth \arraystretch \dp \strutbox
    \@width \z@}%
  \let\@sharp##\let\protect\relax
   \begingroup
    \@mkpream{#2}%
    \xdef\LT@bchunk{%
       \global\advance\c@LT@chunks\@ne
       \global\LT@rows\z@\setbox\z@\vbox\bgroup
       \LT@setprevdepth
       |<ialign for html longtable|>}%
       |<globalize HAlign and ar:cnt|>%
  \endgroup
  |<set LT@cols|>%
  \LT@make@row
  \m@th\let\par\@empty 
  \everycr{}\lineskip\z@\baselineskip\z@
  \ifx \EndPicture\:UnDef
     \SaveMkHalignConfig |<longtable configuration for MkHalign|>% 
     \let\@sharp|=\relax
  \else \let\@sharp##\fi  
  \LT@bchunk}
>>>


\<globalize HAlign and ar:cnt\><<<
\xdef\:temp{%
   \def\noexpand\HAlign{\HAlign}%
   \def\noexpand\ar:cnt{\ar:cnt}}\aftergroup\:temp
>>>


\<globalize ar:cnt for array.sty\><<<
\xdef\:temp{%
   \def\noexpand\HAlign{\HAlign}%
   \def\noexpand\ar:cnt{\ar:cnt}}\aftergroup\:temp
>>>

\<set LT@cols\><<<
\LT@cols|=\ar:cnt
>>>

\<longtable code\><<<
\def\LT@echunk{%
  \crcr\LT@save@row\cr
  |<end longtable chunk|>%
  \global\setbox\@ne\lastbox    \unskip
  \egroup}
>>>

\<end longtable chunk\><<<
\ifx \EndPicture\:UnDef \EndMkHalign\else \egroup\fi
>>>



\<longtable code\><<<
\let\:tempc\LT@startpbox
\append:defI\:tempc{\everypar{\HtmlPar}\a:longtableparbox}%
\HLet\LT@startpbox\:tempc
\NewConfigure{longtableparbox}{1}
>>>


\<longtable code\><<<
\NewConfigure{longtable}{6}
>>>



\<ialign for html longtable\><<<
\everycr{}\tabskip\LTleft\noexpand\MkHalign\noexpand\@sharp
   {\tabskip\z@ \@arstrut \@preamble \tabskip\LTright}%
>>>

\<longtable configuration for MkHalign\><<<
\ifx \recall:ar\:UnDef
   \edef\recall:ar{%
      \noexpand\ifx \noexpand\EndPicture\noexpand\:UnDef \noexpand\else
         \arrayrulewidth\the\arrayrulewidth
         \doublerulesep\the\doublerulesep
         \arraycolsep\the\arraycolsep
         \tabcolsep\the\tabcolsep
      \noexpand\fi }%
\fi
\arrayrulewidth\z@  \doublerulesep\z@
\arraycolsep\z@     \tabcolsep\z@
\Configure{MkHalign}
  \aa:longtable   
  {\bb:longtable \ProperTrTrue}
  {\a:putHBorder\InitHBorder \ifProperTr{\c:longtable}}
  {\ifProperTr{\d:longtable}\a:putHBorder\InitHBorder}%
  {\ifProperTr{\e:longtable}\RecallMkHalignConfig\recall:ar}
  {\ifProperTr{\f:longtable}}
>>>


\<init conds for longtable\><<<
|<init conds for @array|>%      
\def\aa:longtable{%
   \gdef\aa:longtable{\let\HRow|=\lt:sv
       \HAdvance\HRow by 1 \global\let\:MkHalign:|=\lt:MkHalign:}%
   \global\setbox\LT:box|=\vbox{\a:longtable}%
   \global\let\lt:MkHalign:|=\:MkHalign:}%
\def\bb:longtable{%
   \ifHCond \global\let\bb:longtable|=\empty 
      \global\setbox\LT:ebox=\vbox{{\ht:everypar{}\leavevmode}\b:longtable}%
      \global\HCondfalse
   \fi}  
>>>


\<longtable code\><<<
\csname newbox\endcsname\LT:box
\csname newbox\endcsname\LT:ebox
\pend:def\LT@start{\box\LT:box}   
\append:def\endlongtable{\box\LT:ebox}
>>>


\<longtable code\><<<
\pend:def\LT@ntabularcr{\global\let\lt:sv|=\HRow}
\pend:defI\LT@end@hd@ft{\global\let\lt:sv|=\HRow}
\def\LT@kill{\global\let\lt:sv|=\HRow}
\let\LT:argtabularcr|=\LT@argtabularcr
\def\LT@argtabularcr{\global\let\lt:sv|=\HRow  \LT:argtabularcr}
\ifx \tmp:bx\:UnDef \csname newbox\endcsname \tmp:bx \fi
\def\endhead{\LT@end@hd@ft\tmp:bx}
\def\endfoot{\LT@end@hd@ft\tmp:bx}
\def\endlastfoot{\global\HCondtrue \LT@end@hd@ft\LT@lastfoot}
\pend:def\endlongtable{\global\HCondtrue}
>>>


\<longtable hline\><<<
\def\LT@hline{%
  \o:noalign:{\ifnum0=`}\fi
    \penalty\@M
    \futurelet\@let@token\LT@@hline}
\def\LT@@hline{%
  \ifx\@let@token\hline
    \global\let\@gtempa\@gobble
    \gdef\LT@sep{\penalty-\@medpenalty\vskip\doublerulesep}%
  \else
    \global\let\@gtempa\@empty
    \gdef\LT@sep{\penalty-\@lowpenalty\vskip-\arrayrulewidth}%
  \fi
  \ifnum0=`{\fi}%
  |<put longtable hline|>%
  \o:noalign:{\penalty\@M}%
  \@gtempa}
>>>


\<put longtable hline\><<<
\a:hline
>>>

\<longtable captions\><<<
\def\LT@caption{%
  \o:noalign:\bgroup  \gHAdvance\TitleCount  1 
    \@ifnextchar[{\egroup\LT@c@ption\@firstofone}\LT@capti@n}
\def\LT@makecaption#1#2#3{%
  \LT@mcol\LT@cols c{\hbox{\parbox[t]\LTcapwidth{%
       \cptA: #1{\cap:ref{#2}}\cptB:\cptC:#3\cptD:
    \endgraf\vskip\baselineskip}}}}
>>>

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{Old}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

We convert the following into tabular.

\<longtable.sty\><<<
\def\:temp{\@float{table}%
   \let\newpage|=\empty    \edef\recall:c@table{\the\c@table}%
   \let\caption|=\LT:CAPTION  \bgroup
   |<config from longtable.sty|>%
   |<config longtable|>%
   \tabular}
\HLet\longtable|=\:temp
\def\:temp{\endtabular  \egroup  \end@float}
\HLet\endlongtable|=\:temp
>>>

\<config from longtable.sty\><<<
\let\newpage|=\empty
\let\pagebreak|=\empty
\let\nopagebreak|=\empty
>>>

\<config longtable\><<<
\let\sva:tabular|=\a:tabular  \let\svb:tabular|=\b:tabular
\let\svc:tabular|=\c:tabular  \let\svd:tabular|=\d:tabular
\let\sve:tabular|=\e:tabular  \let\svf:tabular|=\f:tabular
\def\a:tabular{\let\a:tabular|=\sva:tabular
   \Configure{PauseMkHalign}{}{}{}{}}%
\def\b:tabular{}%
\def\c:tabular{\c:longtable \let\c:tabular|=\svc:tabular
   \Configure{PauseMkHalign}{}{}{}{}}%
\def\d:tabular{\last:dLT\d:longtable  \global\let\last:dLT|=\empty
   \let\d:tabular|=\svd:tabular}%
\def\e:tabular{\e:longtable \let\e:tabular|=\sve:tabular
   \Configure{PauseMkHalign}{}{}{}{}}%
\def\f:tabular{\f:longtable }%
\let\last:dLT|=\empty
>>>

The \''\last:dLT' mechanism is for inserting theend of row \''</tr>'
into the box, so that the chunck boundary will not be displaced before
it.  We want all chunks to containg the staring and endin points of
the rows.



\<config longtable\><<<
\Configure{PauseMkHalign} 
   {|<auto decompose longtable|>%
    \a:longtable    \global\LT@rows|=\HRow  
    \ifmmode \setbox0=\vbox\bgroup$$\else \setbox0=\vbox\bgroup\fi}
   {\ifmmode $$\egroup   \def\cont:hlg{$$}\else 
               \egroup \let\cont:hlg|=\empty \fi }
   {\setbox0=\vbox\bgroup\cont:hlg     \global\LT@rows|=\HRow }
   {\ifmmode $$\fi \d:longtable \global\let\last:dLT|=\:gobble \egroup 
     \hbox{\csname longtable0\endcsname}%
     \hbox{\csname longtable1\endcsname}%
     \hbox{\csname longtable2\endcsname}%
     \hbox{\csname longtable3\endcsname}%
     \hbox{\csname longtable4\endcsname}\b:longtable
   }%
>>>

\<auto decompose longtable\><<<
|<def LT:pause|>%
\let\LT:cr|=\\
\def\\{%
   \advance\LT@rows |by -\HRow
   \advance\LT@rows |by \LT:cnt\relax
   \ifnum \LT@rows=0 \LT:pause \else \expandafter\LT:cr \fi
}%
>>>
\<def LT:pause\><<<
\def\LT:pause{%
   \PauseMkHalign{%
     \ifx \:LTfirsthead\relax \else
         \csname longtable\:LTfirsthead\endcsname
     \fi
     \ifx \:LTtable\relax \else
                  \csname longtable\:LTtable\endcsname
     \fi
     |<redefine LT:pase|>%
     |<redefine end placement|>%
   }%
}%
>>>

\<redefine LT:pase\><<<
\def\LT:pause{\PauseMkHalign{\LT:ft \LT:hd \LT:tbl}}%
\ifx \:LTtable\relax 
    \let\LT:tbl|=\relax
\else
     \expand:after{\let\LT:tbl|=}\csname longtable\:LTtable\endcsname
\fi
\ifx \:LTfoot\relax
   \let\LT:ft|=\relax
\else
   \expand:after{\let\LT:ft|=}\csname longtable\:LTfoot\endcsname
\fi
\ifx \:LThead\relax
   \let\LT:hd|=\relax
\else
   \expand:after{\let\LT:hd|=}\csname longtable\:LThead\endcsname
\fi
>>>

\<redefine end placement\><<<
\ifx \:LTlastfoot\relax
   \expandafter\let\csname longtable3\endcsname|=\relax
\else
   \expand:after{\expandafter\let\csname longtable3\endcsname|=}\csname
                                      longtable\:LTlastfoot\endcsname
\fi
\expandafter\let\csname longtable0\endcsname|=\LT:ft
\expandafter\let\csname longtable1\endcsname|=\LT:hd
\expandafter\let\csname longtable2\endcsname|=\LT:tbl
\expandafter\let\csname longtable4\endcsname|=\empty
>>>


\<longtable.sty\><<<
\NewConfigure{longtable}{6}
\NewConfigure{longtable+}[1]{%
   \let\a:LT@table|=\relax     \let\b:LT@table|=\relax 
   \let\:LTtable|=\relax
   \let\a:LT@head|=\relax      \let\b:LT@head|=\relax 
   \let\:LThead|=\relax
   \let\a:LT@foot|=\relax      \let\b:LT@foot|=\relax 
   \let\:LTfoot|=\relax
   \let\a:LT@firsthead|=\relax \let\b:LT@firsthead|=\relax 
   \let\:LTfirsthead|=\relax
   \let\a:LT@lastfoot|=\relax  \let\b:LT@lastfoot|=\relax 
   \let\:LTlastfoot|=\relax
   \HAssign\LT:cnt|=#1  \LT@rows|=0   \LT:cfg}
\def\LT:cfg#1#2#3{%
   \def\:temp{#1}\ifx \:temp\empty
      \expandafter\let\csname longtable\the\LT@rows\endcsname|=\empty
   \else
      \def\:tempa{table}\ifx \:temp\:tempa
         \expandafter\def\csname longtable\the\LT@rows\endcsname{#2\box0#3}%
      \else 
         \expandafter\def\csname longtable\the\LT@rows\endcsname
            {\expandafter\copy\csname LT@#1\endcsname}%
         \expandafter\def\csname a:LT@#1\endcsname{#2}%
         \expandafter\def\csname b:LT@#1\endcsname{#3}%
      \fi
      \expandafter\HAssign\csname :LT#1\endcsname |=\LT@rows
   \fi
   \advance\LT@rows |by 1
   \ifnum \LT@rows<5   \expandafter\LT:cfg  \fi}
\Configure{longtable+}{20}
   {firsthead}{}{}  {table}{}{}  {lastfoot}{}{}  {}{}{}   {}{}{}
>>>

The following define break-up points for the tables.  

\<longtable.sty\><<<
\def\:tempc{\PauseMkHalign{\setbox\LT@lastfoot=\hbox
          {\a:LT@lastfoot\box0\b:LT@lastfoot}}}
\HLet\endlastfoot|=\:tempc
\def\:tempc{\PauseMkHalign{\setbox\LT@head=\hbox
          {\a:LT@head\box0\b:LT@head}}}
\HLet\endhead|=\:tempc
\def\:tempc{\PauseMkHalign{\setbox\LT@firsthead=\hbox
          {\a:LT@firsthead\box0\b:LT@firsthead}}}
\HLet\endfirsthead|=\:tempc
\def\:tempc{\PauseMkHalign{\setbox\LT@foot=\hbox
           {\a:LT@foot\box0\b:LT@foot}}}
\HLet\endfoot|=\:tempc
\def\:tempc{\PauseMkHalign{%
   \setbox0=\hbox{}%
   \advance\LT@rows |by -\HRow \LT@rows|=-\LT@rows \advance\LT@rows |by -1
   \ifnum \LT@rows>0 
        \:warning{Lost \the\LT@rows\space lines; 
                  Move \noexpand\kill \the\LT@rows\space rows back}%
   \fi}}
\HLet\kill|=\:tempc
>>>


\Verbatim
\caption{...} =>  \multicolumn{n}{c}{\parbox{\LTcapwidth}{...}} while
  inserting an entry to the list of tables.
\caption[optional entry into list of figures]{...}
\caption* --- Without entry to toc of tables
\EndVerbatim

\<longtable.sty\><<<
\let\caption:LT|=\caption
\def\LT:caption{\futurelet\:temp\LT:cpt}
\def\LT:cpt{\ifx *\:temp
   \let\addcontentsline|=\:gobbleIII
   \expandafter\@firstoftwo \fi\caption:LT}
\def\LT:CAPTION{\multispan{\ar:cnt}%
   \expandafter\:gobble\n:multicolumn:{}{c}{}%
   \ifnum \recall:c@table<\c@table 
      \c@table|=\recall:c@table 
      \expandafter\expandafter\expandafter\LT:caption\expandafter*%
   \else \expandafter\LT:caption
   \fi}%
>>>


The \''\:gobble' below 
\`'\multispan{\ar:cnt}\expandafter\:gobble\multicolumn'
is to remove the \''\multispan' from there.




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{table.sty of pctex}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\<pctable.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% pctable.4ht                          |version %
% Copyright (C) |CopyYear.1999.      Eitan M. Gurari         %
|<TeX4ht copyright|>
\:CheckOption{pic-table}\if:Option
   \pend:def\BeginTable{\Picture*{}}
   \append:def\EndTable{\EndPicture}
\else
   \catcode`\!=11
   |<fix pctex table|>
   \catcode`\!=12
\fi

   |<pctex table shared config|>
\Hinput{pctable}
\endinput
>>>        \AddFile{7}{pctable}


Didn't implement vertical lines. Default: html tables; can switch
to pictorial tables by rasing the \`'pic-table' switch.

\<fix pctex table\><<<
\HAssign\pc:tbl=0
\let\pctex:vrule=\relax
 \pend:def\BeginTable{\bgroup \Configure{HtmlPar}{}{}{}{}
\let\pc:endtd=\relax
\let\pc:endtr=\relax
\let\pc:cols=\relax\gHAdvance\pc:tbl by 1
    \Tg<table class="pctable\pc:tbl">
    \let\halign\TeXhalign \HRestore\noalign  }
 \append:def\EndTable{\pc:endtd\Tg</table>\egroup}

\def\pctex:vrule#1{} 

 \let\:tfSetVrule=\!tfSetVrule
\def\!tfSetVrule{%
  \!thToksEdef\!taRuleColumnTemplate={%
   \pctex:vrule{\the\!taColumnNumber}\the
      \!taRuleColumnTemplate}\:tfSetVrule}

\expandafter\def\csname !tk:l\endcsname{%
 \Css{.pctable\pc:tbl\space     
    td.pc-\the\!taColumnNumber{text-align:left;white-space: nowrap;
   padding-left:3pt;padding-right:3pt;}}}
\expandafter\def\csname !tk:c\endcsname{%
 \Css{.pctable\pc:tbl\space     
    td.pc-\the\!taColumnNumber{text-align:center;white-space: nowrap;
    padding-left:3pt;padding-right:3pt;}}}
\expandafter\def\csname !tk:r\endcsname{%
 \Css{.pctable\pc:tbl\space     
    td.pc-\the\!taColumnNumber{text-align:right;white-space: nowrap;
    padding-left:3pt;padding-right:3pt;}}}
\expandafter\def\csname !tk:p\endcsname{%
 \Css{.pctable\pc:tbl\space     
    td.pc-\the\!taColumnNumber{padding-left:3pt;padding-right:3pt;}}}

\pend:defI\ReadFormatKeys{\csname !tk:\string##1\endcsname}

\Css{.justleft{text-align:left;white-space: nowrap;
      padding-left:3pt;padding-right:3pt;}}
\Css{.justright{text-align:right; white-space: nowrap;
      padding-left:3pt;padding-right:3pt;}}
\Css{.justcenter{text-align:center; white-space: nowrap;
      padding-left:3pt;padding-right:3pt;}}

\let\:ReadFormatKeys=\ReadFormatKeys
\let\:tfAdjoinPriorColumn=\!tfAdjoinPriorColumn
\def\!tfAdjoinPriorColumn{%
   \def\ReadFormatKeys{%
   \!thToksEdef\!taDataColumnTemplate={%
      \pc:endtd\Tg<td\Hnewline
         class="pc-\the\!taColumnNumber">\the
                \!taDataColumnTemplate\Tg</td>}%
   \let\ReadFormatKeys=\:ReadFormatKeys\ReadFormatKeys}%
   \:tfAdjoinPriorColumn}

\let\:tfFinishFormat=\!tfFinishFormat
\def\!tfFinishFormat{%
  \edef\:temp{\!taPreamble{\noexpand\pc:endtd
    \Tg<tr>\the\!taPreamble \Tg</tr>}}\:temp
  \edef\pc:cols{\the\!taColumnNumber}\HAdvance \pc:cols by -1 
    \:tfFinishFormat}

\def\ReFormat[{%
  \omit
  \!taDataColumnTemplate{\pc:endtd
       \Tg<td\Hnewline class="refformat">##\Tg</td>}%
  \!taLeftGlue{}% 
  \!taRightGlue{}% 
  \catcode`\||=12  
  \catcode`\"=12  
  \ReadFormatKeys}

\pend:defI\!ttuse{%
  \ifnum ##1>\@ne   
     \omit \def\:multspn{colspan="##1"}%
     \expandafter\expandafter\expandafter\:gobble
  \fi}

\def\!ttShortHruleA{\pc:endtd\HCode{<tr><td 
   colspan="\pc:cols" class="short"><hr\Hnewline class="short"
   /></td></tr>}\null\ignorespaces}
\def\!ttFullHruleA{%
  \pc:endtd   \HCode{<tr><td
   class="full" colspan="\pc:cols"><hr\Hnewline 
   class="full" /></td></tr>}\penalty0 \egroup} 

\append:def\JustLeft{\pc:endtd
   \pc:td{justleft}\def\!ttRightGlue{\Tg</td>}}
\append:def\JustCenter{\pc:endtd
   \pc:td{justcenter}\def\!ttRightGlue{\Tg</td>}}
\append:def\JustRight{\pc:td{justright}\def\!ttRightGlue{\Tg</td>}}
\def\pc:td#1{\Tg<td class="#1"\:multspn>}
\let\:multspn|=\empty
>>>




%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Horizontal Lines}
%%%%%%%%%%%%%%%%%%%%%%%%%%%

In the case of vertical lines and spaces, we allow for
horizontal segmenattion to allow for vertical
lines to go through.

\SubSection{hline}


\<html latex halign\><<<
\def\:temp{\a:hline}
\HLet\hline|=\:temp
\NewConfigure{hline}[1]{\c:def\a:hline{#1}}
>>>



\<hline body for array/tabular\><<<
\append:def\hline:s{\a:HBorder}%
\def\:tempb{\ifnum \tmp:cnt<\ar:cnt 
    \advance\tmp:cnt by 1 \append:def\hline:s{\b:HBorder}%
    \expandafter\:tempb
  \fi }
\tmp:cnt|=0 \:tempb
\append:def\hline:s{\c:HBorder}\global\let\hline:s|=\hline:s
>>>

\<init for hlines\><<<
\global\let\hline:s|=\empty
>>>


\SubSection{V Spaces}




\<html latex halign\><<<
\def\:temp#1{\tmp:dim|=#1\xdef\HBorderspace{\the\tmp:dim}\cr\a:vspc}
\HLet\@xargarraycr|=\:temp
\NewConfigure{//[]}[1]{\c:def\a:vspc{#1}}
>>>






\<init for vspaces\><<<
\global\let\vspc:s|=\empty
>>>

\SubSection{cline}

\<html latex halign\><<<
\def\:temp#1-#2\@nil{\o:noalign:{\HAssign\:tempb=#1
                                 \set:clines{#2}}\ignoreEndTr}
\HLet\@cline|=\:temp
\def\set:clines#1{\expandafter\gHAssign\csname :\:tempb\endcsname=1
   \ifnum \:tempb<#1 \Advance:\:tempb by 1 \expandafter\set:clines
   \else \expandafter\:gobble
   \fi {#1}}
>>>



\<init for clines\><<<
\global\let\cline:s|=\empty
\HAssign\:tempb=0 \init:clines  \global\let\cline:s|=\cline:s 
>>>

\<html latex halign\><<<
\def\init:clines{\ifnum \:tempb<0\csname ar:cnt\endcsname 
     \Advance:\:tempb by 1
     \expandafter\gHAssign\csname :\:tempb\endcsname=0
     \expandafter\append:def\expandafter\cline:s\expandafter{\csname
          :\:tempb\endcsname}%
     \expandafter\init:clines 
  \fi}
>>>
%%%%%%%%%%%%%%%%%%%
\SubSection{Configurations}
%%%%%%%%%%%%%%%%%%%

\<html latex halign\><<<
\def\InitHBorder{%
   |<init for vspaces|>%
   |<init for hlines|>%
   |<init for clines|>}
\def\HBorder{%
   \ifx \hline:s\empty \else\hline:s\fi
   \ifx \vspc:s\empty \else\vspc:s\fi
   \ifnum \expandafter\inspect:cline\cline:s{-1}>0 \d:HBorder
      \expandafter\reset:cline\cline:s2\g:HBorder\fi}
|<cline contains non-zero value?|>
\def\reset:cline#1{\ifcase #1
       \e:HBorder\expandafter\reset:cline
  \or  \f:HBorder\expandafter\reset:cline
  \else                                  
  \fi}
\InitHBorder
>>>

The value of \`'\cline:s' might contain too many digits for a TeX integer, hence
the  recursive macro \`'\inspect:cline' checks the digits separately.

\<cline contains non-zero value?\><<<
\def\inspect:cline#1{%
   \ifnum #1>0 1\expandafter\exit:inspect:cline
   \else \ifnum #1=-1 
        0\else \expandafter\expandafter\expandafter\inspect:cline  
   \fi   \fi
}
\def\exit:inspect:cline#1{%
   \ifnum #1=-1 
        0\else \expandafter\exit:inspect:cline
   \fi
}
>>>

%%%%%%%%%%%%%%%%%%%
\Chapter{multirow}
%%%%%%%%%%%%%%%%%%%

\<multirow.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% multirow.4ht                         |version %
% Copyright (C) |CopyYear.2004.      Eitan M. Gurari         %
|<TeX4ht copyright|>
 |<multirow hooks|>
\Hinput{multirow}
\endinput
>>>        \AddFile{9}{multirow}

\<multirow hooks\><<<
\def\@xmultirow#1[#2]#3[#4]#5{\@tempcnta=#1%
  \@tempdima\@tempcnta\ht\@arstrutbox
  \advance\@tempdima\@tempcnta\dp\@arstrutbox
  \ifnum\@tempcnta<0\@tempdima=-\@tempdima\fi
  \advance\@tempdima#2\bigstrutjot
  \leavevmode \a:multirow
  \if*#3\vtop to \@tempdima{\vfill\multirowsetup
    \hbox{\strut#5\strut}\vfill}%
  \else
      \vtop to \@tempdima{\hsize#3\@parboxrestore
                \vfill \multirowsetup \strut#5\strut\par\vfill}%
  \fi \b:multirow}
\NewConfigure{multirow}{2}
>>>


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Pictures}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/ltpictur.dtx]{}{}ltpictur.dtx\EndLink



The \`'\picture' does not offer text substitute (too much pain to
create them).  Also note that \`'\Picture+{}' puts the picture in a box, but not so \`'\Picture+[]{}'


DON't we need in the following \''\LaTexEnv'

\<latex ltpictur\><<<
\let\lt:pic|=\picture
\def\picture{%
   \ifx \EndPicture\:UnDef
      \a:picture
      \let\end:lt:pic|=\endpicture
      \def\endpicture{\end:lt:pic \b:picture}%
   \else \let\EndPicture|=\empty
   \fi\lt:pic}
>>>


Picture environments, and other also, can be indirectly nested in
setbox comamnds. Hence the setting of \''\EndPicture' to empty
for nested occurances of \''\endpicture'.

\<latex ltpictur\><<<
\NewConfigure{picture}{2}
>>>




%\ConfigureEnv{picture}
%    {\ifvmode \Indent\HCode{<div align=center>}%
%        \def\aft:Env{\HCode{</div>}\Indent}%
%     \else \def\aft:Env{}\fi}
%    {\aft:Env}{}{}





% \ConfigureEnv{picture}{\leavevmode}{\HCode{<BR CLEAR="ALL">}\Indent}{}{}


The BR tag is used to force line breaks within text.
Normally, linebreaks are treated as a space by browsers
(except inside the PRE tag). The optional CLEAR
attribute is used when you have an IMG image in your
text. If that image uses ALIGN=LEFT or
ALIGN=RIGHT, the text will flow around it. If you have
text you want below the image, you can do this with
{\tt <BR CLEAR=LEFT>} or CLEAR=RIGHT to force
scrolling down to a clear left or right margin,
respectively. Using CLEAR=ALL will scroll down until
both marings are clear. CLEAR=NONE is the default,
and does nothing. 











%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Theorem Environments}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%
\Section{LaTeX}
%%%%%%%%%%%%%%%%%%%%

\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/ltthm.dtx]{}{}ltthm.dtx\EndLink



In latex.cls \''\@thm'  is defined with two arguments, and in
amsthm.sty with three parameters. In both cases we have a
\''\@currentlabel' defined through a \''refstepcounter', and
the latter command introducing its own identity, instead of that
of the theorem, into the xref file (and then the href fields
of the html tags). The following code corrects that behavior.


\<latex ltthm\><<<
\def\:thm{\o:@thm:}
\def\:temp{|<seed begin theorem|>\:thm}
\HLet\@thm|=\:temp
\let\o:@endtheorem:|=\@endtheorem
\append:def\@endtheorem{\c:newtheorem}
\NewConfigure{newtheorem}{3}
>>>



\<seed begin theorem\><<<
\let\sv:item|=\item
\def\item[##1]{|<no page break before item|>\let\item|=\sv:item
               \item[##1]\b:newtheorem}%
\a:newtheorem\AutoRefstepAnchor 
>>>

A page break before an item might have a different behavor than a
regular start of a paragraph at an item. Hence, the following code.

\<no page break before item\><<<
\nobreak
>>>

%%%%%%%%%%%%%%%%%%%%%%%%
\Section{ntheorem.sty}
%%%%%%%%%%%%%%%%%%%%%%%%



\<theorem.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% theorem.4ht                          |version %
% Copyright (C) |CopyYear.2003.      Eitan M. Gurari         %
|<TeX4ht copyright|>
|<theorem sty|>
\Hinput{theorem}
\endinput
>>>        \AddFile{8}{theorem}

\<theorem sty\><<<
\let\theo:@thm=\@thm
\def\@thm#1#2{%
   \expandafter\ifx \csname end#1\endcsname\@endtheorem \else
        \expandafter\let \csname end#1\endcsname\@endtheorem
   \fi
   \theo:@thm{#1}{#2}%
}
>>>


%%%%%%%%%%%%%%%%%%%%%%%%
\Section{ntheorem.sty}
%%%%%%%%%%%%%%%%%%%%%%%%



\<ntheorem.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% ntheorem.4ht                         |version %
% Copyright (C) |CopyYear.1999.      Eitan M. Gurari         %
|<TeX4ht copyright|>
|<ntheorem.sty|>
|<ntheorem.std|>
\Hinput{ntheorem}
\endinput
>>>        \AddFile{8}{ntheorem}





\Link[http://www.informatik.uni-freiburg.de/\string
     ~may/Ntheorem/ntheorem.html]{}{}%
ntheorem\EndLink


\<ntheorem.sty\><<<
\pend:defI\@endtrivlist{|<prepend end trivlist|>}
>>>

\<ntheorem.styNO\><<<
\def\:temp{%
     \gdef\snd:halign{\t:eqnar
        \global\let\snd:halign\empty}%
      \global\let\Oldeqnnum|=\@eqnnum
      \gdef\@eqnnum{\Oldeqnnum\PotEndMark{\SetMark@endeqnarray}}%
      \@@eqncr
      \egroup
      \global\advance\c@equation\m@ne
   $$\rc:roco \global\@ignoretrue
   \global\let\@eqnnum\Oldeqnnum}
\HLet\endeqnarray|=\:temp
\def\:temp{%
    \gdef\snd:halign{\t:eqnar
        \global\let\snd:halign\empty}%
    \let\reserved@a\relax
    \ifcase\@eqcnt \def\reserved@a{& & &}\or \def\reserved@a{& &}%
     \or \def\reserved@a{&}\else
       \let\reserved@a\@empty
       \@latex@error{Too many columns in eqnarray environment}\@ehc\fi
     \reserved@a {\D:eqnar
        \normalfont \normalcolor \PotEndMark{}\d:eqnar }%
     \global\@eqnswtrue\global\@eqcnt\z@\cr
     %
      \egroup
      \global\advance\c@equation\m@ne
   $$\rc:roco \global\@ignoretrue}
\expandafter\HLet\csname endeqnarray*\endcsname|=\:temp
>>>

\<ntheorem.styNO\><<<
\def\sv:roco{\let\sv:Row|=\HRow  \let\sv:Col|=\HCol}
\def\rc:roco{\global\let\HRow|=\sv:Row  \global\let\HCol|=\sv:Col}
\def\first:row{\gHAssign\HRow|=0 }
\def\next:row{\gHAdvance\HRow |by 1 \gHAssign\HCol|=0 }
\def\next:col{\gHAdvance\HCol |by 1 }
>>>









%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Sectioning Commands}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%




\Section{Cut Points}

% 

We make the following temporary definitions so to cheat CutAt and the likes that
definitions for the keywords exist.

\<book / report / article cut points\><<<
\Configure{UndefinedSec}{likepart}
\Configure{UndefinedSec}{likechapter}
\Configure{UndefinedSec}{likesection}
\Configure{UndefinedSec}{likesubsection}
>>>

\<ams art, proc, book\><<<
\Configure{UndefinedSec}{likepart}
\Configure{UndefinedSec}{likechapter}
\Configure{UndefinedSec}{likesection}
\Configure{UndefinedSec}{likesubsection}
>>>




\<latex html cut points\><<<
\def\cut:gr#1{\lk:#1like|<par del|>%
    \ifx \:temp\empty \expand:after{%
       \expand:after{\expandafter\let\csname #1\endcsname|=}%
                                     \csname :#1\endcsname
       \ct:gr{#1}%
       \expand:after{\expandafter\let\csname :#1\endcsname|=}%
                                     \csname #1\endcsname
       \expandafter\let\csname #1\endcsname|=\:UnDef}%
    \else
        \expand:after{\ct:gr{#1}}%
    \fi}
 \def\ct:gr#1{%
   \edef\:temp{%
      \let\:csname \HP:file : #1\endcsname |=\:csname #1\endcsname
      \let\:csname \HP:file :Cut:#1\endcsname |=\:csname Cut:#1\endcsname
      \def\:csname #1\endcsname{%
         \noexpand \@ifnextchar*{\noexpand\after:gobble
                                      \:csname :like#1\endcsname}%
                                {\:csname \HP:file :#1-\endcsname}}%
      \def\:csname \HP:file :#1-\endcsname####1{%
         \noexpand\cond:cs{\HP:file}{####1}%
         \:csname \HP:file : #1\endcsname{####1}}%
      \def\:csname Cut:#1\endcsname####1{%
         \noexpand\cond:cs{Cut:\HP:file}{####1}%
         \noexpand\cond:cs{\HP:file :Cut:#1}{####1}}%
   }\:temp }
\def\lk:#1like#2|<par del|>{\def\:temp{#1}}
\def\after:gobble#1#2{#1}
>>>








\Section{Shared Below Chapter Stuff}


Sectioning commands can be called directly through their default
definitions, or indirectly throught \''\rdef:sec'.  

The latter invocation calls a corresponding tex4ht command:
\''\:likefoo' in case of a starred commands, and \''\no:foo' in case
of non-starred commands. Then it invokes the original definition,
without a title, to extract the native changes in the environment,
such as counter numbers.

\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/ltsect.dtx]{}{}ltsect.dtx\EndLink


\<\><<<
\let\no:ssect|=\@ssect
\def#1#2#3{\no:ssect{#1}{#2}{0ex}}
\let\no:sect|=\@sect
\def\no@sect#1#2#3#4#5{\no:sect{#1}{#2}{#3}{#4}{0ex}}
>>>

\<latex ltsect\><<<
\let\no@ssect|=\@ssect
\def\@ssect#1#2#3#4#5{\:Sc3
   \no@ssect{#1}{#2}{#3}{#4}{\:Sc4#5\:Sc2}\HtmlEnv}
\let\no@sect|=\@sect
\def\@sect#1#2#3#4#5#6[#7]#8{%
   \xdef\c:secnumdepth{#2}\:Sc3
   \no@sect{#1}{#2}{#3}{#4}{#5}{#6}[#7]{\:Sc4#8\:Sc2}\HtmlEnv}
\let\:startsection|=\@startsection
\def\@startsection#1{\@ifstar{\Configure{secType}{like#1}}%
   {\Configure{secType}{#1}}%
   \:Sc1\:startsection{#1}}
\NewConfigure{secType}[1]{\def\sec:typ{#1}}
>>>

\''\@sec' and \''\@ssec'  are redefined in tex4ht.4ht to be based on
building-blocks of tex4ht.sty. The \''section-'  option resestablish 
the default setting.


\<latex ltsect\><<<
\NewConfigure{@sec @ssect}[1]{%
   \def\rdef:sec##1{#1\csname no@##1\endcsname}}
\:CheckOption{sections-}     \if:Option 
   \Configure{@sec @ssect}{}
\else      
   \Configure{@sec @ssect}{%
      |<sv Sc, sec, ssec|>\let\:Sc|=\:gobble
      |<redf sec|>%
      |<redf ssec|>\IgnorePar}
\fi
>>>

The following is need for \''\@seccntformat'.


\<disable @seccntformat\><<<
\ifx \o:@seccntformat:\:UnDef
  \let\o:@seccntformat:|=\@seccntformat
\fi
\let\@seccntformat|=\:gobble
>>>


\<restore @seccntformat\><<<
\let\@seccntformat=\o:@seccntformat:
>>>


% <P \:P:>

%  \let\no:Sect|=\@sect
%   \def\no@sect{\SkipRefstepAnchor\no:Sect}

\<redf sec\><<<
\def\@sect##1##2##3##4##5##6[##7]##8{%
   |<disable @seccntformat|>%
   \let\@sect|=\no@sect   \xdef\c:secnumdepth{##2}%
   {\SkipRefstepAnchor \let\addcontentsline|=\:gobbleIII \let\mark|=\:gobble
    \no@sect{##1}{##2}{##3}{##4}{##5}{##6}[{##7}]{}}%
   |<recall Sc, sec, ssec|>%
   |<restore @seccntformat|>%
   \HtmlEnv    \Toc:Title{##7}\csname no:#1\endcsname{##8}}%
>>>

In the above we want \`'[{##7}]' instead of \`'[##7]', in case `]' is
included in the parameter.



The following is for the star option.

\<redf ssec\><<<
\def\@ssect##1##2##3##4##5{%
   \let\@ssect|=\no@ssect
   {\def\addcontentsline####1####2####3{}%
    \no@ssect{##1}{##2}{##3}{##4}{}}%
   |<recall Sc, sec, ssec|>%
   \HtmlEnv   \csname :like#1\endcsname{##5}}%
>>>


\<sv Sc, sec, ssec\><<<
\let\sv:Sc|=\:Sc \let\sv:sect|=\@sect \let\sv:ssect|=\@ssect
>>>

\<recall Sc, sec, ssec\><<<
\let\:Sc|=\sv:Sc \let\@sect|=\sv:sect \let\@ssect|=\sv:ssect
>>>



\<latex ltsect\><<<
\pend:defI\@hangfrom{\a:@hangfrom}
\append:defI\@hangfrom{\b:@hangfrom}
\NewConfigure{@hangfrom}{2}
>>>

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{Configuration for `section-' option}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\<latex ltsect\><<<
\long\def\ConfigureSec#1#2#3#4#5{%
   \expandafter\def\csname #1:Sc1\endcsname{#2}%
   \expandafter\def\csname #1:Sc2\endcsname{#3}%
   \expandafter\def\csname #1:Sc3\endcsname{#4}%
   \expandafter\def\csname #1:Sc4\endcsname{#5}%
}
\def\:Sc#1{%
   \ifx \sec:typ\:UnDef
       \:warning{Missing \string\Configure{secType}{...}}%
       \let\sec:typ|=\empty
   \fi
   \csname \sec:typ :Sc#1\endcsname}
>>>



\<latex.ltx latex edit+ commands\><<<
\def\:Sc#1{%
   \ifx \sec:typ\:UnDef
       \:warning{Missing \string\Configure{secType}{...}}%
       \let\sec:typ|=\empty
   \fi
   \ifx \EndPicture\:Undef\a:trc Sec(\sec:typ)#1\b:trc\fi
   \csname \sec:typ :Sc#1\endcsname
   \ifx \EndPicture\:Undef\c:trc Sec(\sec:typ)#1\d:trc\fi
}
>>>



\<latex.ltx latex edit commands\><<<
\def\:Sc#1{%
   \ifx \sec:typ\:UnDef
       \:warning{Missing \string\Configure{secType}{...}}%
       \let\sec:typ|=\empty
   \fi
   \expandafter\ifx \csname \sec:typ :Sc#1\endcsname \relax
      \ifx \EndPicture\:Undef\a:trc Sec(\sec:typ)#1\b:trc
                             \c:trc Sec(\sec:typ)#1\d:trc\fi
   \else  \csname \sec:typ :Sc#1\endcsname \fi
}
>>>


%%%%%%





\Section{Cut Points}

The following is for equating starred and non-starred (i.e., like) sectioning commands.


\<latex html cut points\><<<
\let\tex:cutat\:CutAt
\def\:CutAt#1#2,#3//{%
   \chk:like #2like//%
   \ifx  \:temp\empty \expand:after{\tex:cutat#1#2,}\del:like#2,#3//%
      \else                 \tex:cutat#1#2,like#2,#3//\fi}
\def\chk:like#1like#2//{\def\:temp{#1}}
\def\del:like#1like{#1}
>>>












%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Footnotes, Floats, and Figures}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Floats, Inserts, and Captions}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%







\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/ltfloat.dtx]{}{}ltfloat.dtx\EndLink


% \pend:def\caption{\html:addr \edef\cur:th{\last:haddr f}}



\<latex ltfloat\><<<
\def\@xfloat #1[#2]{%
    \def \@captype {#1}%
   \:clearpage \bf:float \:clearpage
   \begingroup
      \expandafter\ifx\csname end#1\endcsname\o:end@float:
         \expandafter\let\csname end#1\endcsname\float@end
         \expandafter\let\csname end#1*\endcsname\float@dblend
      \fi
}
\let\o:end@float:|=\end@float
\def\end@float{\endgroup\:clearpage \af:float}
\let\end@dblfloat|=\end@float
>>>

Need to fix also double float


% Floats put the content of figures within vboxes.  Setting parameter
% \`'[h]' for here, make things worse (why?). Does \`'\vsize=\z@ \vss'
% do any good? it should! The HCodes should be within the boxes so
% that they will not be detached from the figures.
% 
% 
% \<html latex floats\><<<
% \def\:temp#1#2{%                       |%%\def\pend:defIBI#1#2{% |%
%    \def\:temp{#2}%
%    \def\:tempa{\def#1####1[####2]}%
%    \expandafter\expandafter\expandafter\expandafter
%        \expandafter\expandafter\expandafter\:tempa
%    \expandafter\expandafter\expandafter{\expandafter\:temp #1{##1}[##2]}}
% 
% \:temp\@xfloat{\:clearpage {\ht:everypar{}\bf:float }\:clearpage}
% >>>
% 
% %\let\:xfloat|=\@xfloat
% %\def\@xfloat{\:clearpage {\ht:everypar{}\bf:float }\:clearpage \:xfloat}
% 
% 
% 
% \<html latex floats\><<<
% \pend:def\end@float{\vsize\z@ \vss}
% \append:def\end@float{\:clearpage {\ht:everypar{}\af:float}}
% \append:def\@endfloatbox{\ht\@currbox|=0.5\ht\@currbox }
% >>>
% 
% To get the float not to split from part of the additions of TeX4ht,
% and from floating, we cheat in the dimensions.  Since the current
% box is a \''\vbox', we cut the hight by two.
% 





\`'#1' before anchors, \`'#2' after anchors, \`'#3' after float.

\<latex ltfloat\><<<
\Odef\c:float:[#1]#2#3#4{%
   \def\bf:float{#2|<tags for captions|>#3}%
   \def\af:float{#4}}
\gHAssign\capt:cnt|=0
\Configure{float}{}{}{}
>>>

The initialization of the counter is for degenerated cases in
which the captions don't appear within floats. Does this work?


The anchors of the links are within the frames of the pictures, only if
they are  empty (or the default frame of horizontal lines before and
after the picture are used \`'   \def\:tempa{\HCode{<HR>}}\def\:tempb{#1}%
   \ifx \:tempa\:tempb  \else
').


The following has been changed for getting links in \`'.aux' files to
\`'.lot' (list of tables) and \`'lof'  (list of figures) files.

\<latex ltfloat\><<<
\long\def\:tempc#1[#2]#3{\par \cur:lbl{}%
  |<write caption to toc|>\begingroup
    \@parboxrestore \normalsize
    \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
  \endgroup |<cancel if-label anchors|>}
\def\numberline#1{\hbox to\@tempdima{#1\hfil} }
\HLet\@caption|=\:tempc
>>>

The \''|<cancel if-label anchors|>' request no 
the \''\label' commands to avoid duplicating the anchor already set by the 
\''\caption' command.


\<config book-report-article utilities\><<<
|<book-report-article caption|>
\pend:def\caption{\SkipRefstepAnchor}
>>>

\<book-report-article caption\><<<
|<config makecaption|>
>>>


\<config makecaption\><<<
\NewConfigure{caption}[4]{\c:def\cptA:{#1}\c:def\cptB:{#2}%
   \c:def\cptC:{#3}\c:def\cptD:{#4}}
\long\def\@makecaption#1#2{%   |%\:makecaption|%
   {\cptA: |<caption and ref/tag|>\cptB:}{\cptC:{#2}\cptD:}}
>>>




\<write caption to toc\><<<
\gHAdvance\TitleCount by 1 \begingroup  \protect:wrtoc
\edef\:temp{\the\:tokwrite{\string\doTocEntry
  \string\toc|<caption type|>{\csname 
     the#1\endcsname}{\string\csname\space a:TocLink\string\endcsname
   {\FileNumber}{\cur:th
     \:currentlabel}{}{\ignorespaces #2}}%
  {#1}\relax}}\:temp \endgroup
>>>

\<caption type\><<<
\expandafter\ifx\csname ext@#1\endcsname\relax
#1\else\csname ext@#1\endcsname\fi
>>>


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{Tags for Figures}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\<caption and ref/tag\><<<
\cap:ref{#1}%
>>>

A \`'\Link{}{\cur:th\@currentlabel}#1\EndLink' will send the
rferference to the caption and not the figure, a problematic situation
for cases that the captions appear at the bottom.

The \`'\global\let\skip:anchor\:UnDef' voids \`'\SkipRefstepAnchor'
in \''\caption'.

\<latex ltfloat\><<<
\:CheckOption{refcaption}     \if:Option 
   \def\cap:ref#1{\cur:lbl{}\Link{}{\cur:th\:currentlabel}#1\EndLink
                  \global\let\skip:anchor\:UnDef}
\else
   \Log:Note{for links into captions, instead
       of float heads, use the command line option `refcaption'}%
   \def\cap:ref#1{\cur:lbl{}%
      #1\Tag{\float:cnt cAp\capt:cnt}{\cur:th\:currentlabel}%
     \gHAdvance\capt:cnt |by 1  }
\fi
>>>



\<tags for captions\><<<
\gHAdvance\float:cnt |by 1
\gHAssign\capt:cnt|=0  
\hbox{\def\flt:anchor{#1}\get:cptg}%
>>>

\<tags for captions, empty\><<<
\gHAdvance\float:cnt |by 1
\gHAssign\capt:cnt|=0  
\hbox{\def\flt:anchor{}\get:cptg}%
>>>


The hbox to preserve vertical mode, and for avoiding extra \''<P>''s.

\<latex ltfloat\><<<
\HAssign\float:cnt|=0
\def\get:cptg{%
   \ifTag{\float:cnt cAp\capt:cnt}{%
      \Make:Label{\LikeRef{\float:cnt cAp\capt:cnt}}{\flt:anchor}%
      \Advance:\capt:cnt |by 1  \expandafter\get:cptg
   }{}}
>>>


\<html tex floats\><<<
\let\:ins|=\@ins
\let\:endinsert|=\endinsert
\def\::ns{\:ins \let\endinsert|=\:endinsert}
\def\@ins{\ifx \EndPicture\:UnDef \par\a:insert\par\bgroup
      \def\endinsert{\egroup\par\b:insert\par}
   \else \expandafter\::ns\fi }
>>>

\<config plain utilities\><<<
\NewConfigure{insert}{2}
>>>




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Wrapfig}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\<wrapfig.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% wrapfig.4ht                          |version %
% Copyright (C) |CopyYear.2003.      Eitan M. Gurari         %
|<TeX4ht copyright|>
|<wrap fig|>
\Hinput{wrapfig}
\endinput
>>>        \AddFile{9}{wrapfig}


\<wrap fig\><<<
\def\WF@wr[#1]#2{% 
  \lowercase{\def\WFplace{#2}}%
  \@ifnextchar[\WF@rapt{\WF@rapt[\wrapoverhang]}}
\def\WF@rapt[#1]#2{% 
   \a:wrapfloat   |<tags for captions, empty|>%
   \vtop\bgroup \setlength\hsize{\ifdim #2=0pt 0.1pt\else #2\fi}%
      \@parboxrestore}
\long\def\WF@floatstyhook#1\@ignoretrue{\b:wrapfloat  
   \global\@ignoretrue}
\NewConfigure{wrapfloat}{2}
>>>



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Footnotes}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{Thanks}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\<latex ltfloat\><<<
\def\:temp#1{{\stepcounter{footnote}%
   \ifx \footnote\thanks
      \a:thank\@fnsymbol\c@footnote\b:thank
   \fi
   \let\a:thanks\empty    \let\b:thanks\empty
   \protected@xdef\@thanks{\noexpand\a:thanks{\@thanks\c:thank
     \@fnsymbol\c@footnote\d:thank #1\e:thank}\noexpand\b:thanks}%
}}
\HLet\thanks|=\:temp
\NewConfigure{thank}{5}
\NewConfigure{thanks}{2}
>>>







%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{LaTeX}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The engines of footnotes are

\Verbatim
\def\@footnotemark{...\@makefnmark...}
\long\def\@footnotetext#1{...\@makefntext{#1}...}
\EndVerbatim

with the index suplied to both places in \''\@thefnmark'.  We set the following hooks.

\Verbatim
\def\@footnotemark{...\a:@makefnmark\@makefnmark
                                           \b:@makefnmark...}
\long\def\@footnotetext#1{...\a:@makefntext
                \@makefntext{\b:@makefntext 
                                   \a:@makefnbody #1\b:@makefnbody
                            }\c:@makefntext...}
\EndVerbatim



\<latex ltfloat\><<<
\pend:def\@footnotemark{\bgroup
  \expandafter\ifx \csname @makefnmark\endcsname\relax \else
    \pend:def\@makefnmark{\hbox\bgroup\a:footnotemark}%
    \append:def\@makefnmark{\b:footnotemark\egroup}%
  \fi
}
\append:def\@footnotemark{\egroup}
\NewConfigure{footnotemark}{2}
\NewConfigure{footnotebody}{2}
>>>


\<latex ltfloat\><<<
\long\def\@footnotetext#1{\leavevmode
   \vbox{%\IgnorePar
      \leftskip0pt {\ht:everypar{}\parindent0pt\leavevmode}%
      |<makefntext for footnotetext|>%
      \reset@font\footnotesize
      \color@begingroup
        \@makefntext{\ignorespaces#1}%
      \color@endgroup
      \ht:special{t4ht@[}}\ht:special{t4ht@]}}
\NewConfigure{footnotetext}{3}
>>>

\<makefntext for footnotetext\><<<
\long\def\:tempc##1{|<footnote label|>\a:footnotetext
   \o:@makefntext:{\b:footnotetext \csname a:footnotebody\endcsname
                {##1}\csname b:footnotebody\endcsname}\c:footnotetext
}%
\HLet\@makefntext\:tempc
>>>

\<footnote label\><<<
\protected@edef
  \@currentlabel{\csname p@footnote\endcsname\@thefnmark}%
\anc:lbl f{footnote}%
>>> 

The following arises in cases like \`'
\begin{minipage}{6in} 
x\footnote{The}
\end{minipage}'.


\<latex ltfloat\><<<
\long\def\@mpfootnotetext#1{\leavevmode
   \vbox{%
      \leftskip0pt {\ht:everypar{}\parindent0pt\leavevmode}%
      |<makefntext for mpfootnotetext|>%
      \reset@font\footnotesize
      \color@begingroup
         \@makefntext{\ignorespaces #1}%
      \color@endgroup
      \ht:special{t4ht@[}}\ht:special{t4ht@]}}
>>>


\<makefntext for mpfootnotetext\><<<
\def\:tempc##1{|<mpfootnote label|>\a:footnotetext
   \o:@makefntext:{\b:footnotetext \csname a:footnotebody\endcsname
                {##1}\csname b:footnotebody\endcsname}\c:footnotetext
}%
\HLet\@makefntext\:tempc
>>>

\<mpfootnote label\><<<
\protected@edef
  \@currentlabel{\csname p@mpfootnote\endcsname\@thefnmark}%
\anc:lbl f{footnote}%
>>> 




The following assign the counter into \''\FNnum'.

\<latex ltfloat\><<<
\def\FNnum{\the\c@footnote}
\def\:tempc{%
   \HAssign\FNnum = \csname c@\@mpfn\endcsname
   \HAdvance\FNnum by 1
   \o:footnote:
}
\HLet\footnote=\:tempc
\def\:tempc[#1]{%
   \HAssign\FNnum = #1\relax
   \o:@xfootnote:[#1]%
}
\HLet\@xfootnote\:tempc
\def\:tempc{%
   \HAssign\FNnum = \c@footnote
   \HAdvance\FNnum by 1
   \o:footnotemark:
}
\HLet\footnotemark\:tempc
\def\:tempc[#1]{%
   \HAssign\FNnum =  #1\relax
   \o:@xfootnotemark:[#1]%
}
\HLet\@xfootnotemark\:tempc
\def\:tempc{%
   \HAssign\FNnum = \csname c@\@mpfn\endcsname
   \o:footnotetext:
}
\HLet\footnotetext\:tempc
\def\:tempc[#1]{%
   \HAssign\FNnum = #1\relax
   \o:@xfootnotenext:[#1]%
}
\HLet\@xfootnotenext\:tempc
>>>

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{Other}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\Verbatim
eplain/eplain.tex:\def\vfootnote#1{\insert\footins\bgroup
musitex/musixsty.tex:\def\vfootnote#1{\insert\footins\bgroup\parskip\z@\eightpoint
context/base/plain.tex:\def\vfootnote#1{\insert\footins\bgroup
cyrplain/base/cyrplain.tex:\def\vfootnote#1{\insert\footins\bgroup
latex/mathtime/lplain-m.tex:%\def\vfootnote#1{\insert\footins\bgroup
plain/base/plain.tex:\def\vfootnote#1{\insert\footins\bgroup
plain/mathtime/plain-mt.tex:\def\vfootnote#1{\insert\footins\bgroup
plain/misc/mimulcol.tex:  \def\vfootnote##1{\insert\footins\bgroup
\EndVerbatim

\<plain vfootnote\><<<
\long\def\vfootnote#1{%
   \gHAdvance\FNnum |by 1
   \def\FNmark{#1}\ifx \FNmark\empty
      \def\FNmark{*}%
   \fi
   \a:vfootnote\b:vfootnote\bgroup
   \futurelet\:temp\fnt:body}
\def\fnt:body{\ifx \:temp\bgroup \bgroup
      \aftergroup\end:vfootnote\def\:temp{\let\:temp|=}%
   \else \def\:temp##1{##1\end:vfootnote}\fi 
   \:temp}
\def\end:vfootnote{\egroup\c:vfootnote}
\HAssign\FNnum |= 0
\NewConfigure{vfootnote}{3}
>>>

The following definition is after manmac, which allows the second
parameter to have changes of catcodes. Earlier, we had the
following definition.

\Verbatim
\long\def\vfootnote#1#2{%
   \gHAdvance\FNnum |by 1 \def\:temp{#1}\ifx \:temp\empty
      \def\:temp##1[##2]##3{##1[##2]{*}}\expandafter\:temp \fi
   \HPageButton[fn\FNnum]{#1}\BeginHPage[fn\FNnum]{ }{#2}\EndHPage{}}
\EndVerbatim

LaTeX does not redefine \`'\vfootnote'.  The splited definition of
HPage insures that the title of the hypertext will have a blank, and
not some possible math commands. An empty parameter in the HPage would
put the file name in the title.

\<eplain vfootnote\><<<
\long\def\vfootnote#1{%
   \gHAdvance\FNnum |by 1 \def\:temp{#1}\ifx \:temp\empty
      \def\:temp##1[##2]##3{##1[##2]{*}}\expandafter\:temp \fi
   \def\FNmark{#1}%
   \a:vfootnote\b:vfootnote\bgroup
   \futurelet\:temp\fnt:body}
\def\fnt:body{\ifx \:temp\bgroup \bgroup
      \aftergroup\end:vfootnote\def\:temp{\let\:temp|=}%
   \else \def\:temp##1{##1\end:vfootnote}\fi 
   \:temp}
\def\end:vfootnote{\egroup\c:vfootnote}
\HAssign\FNnum |= 0
\NewConfigure{vfootnote}{3}
>>>






AmS-TeX needs to restore footnote



\<html TeX4ht local env\><<<
\HLet\footnote|=\vfootnote
>>>






%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{Superscripts}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The following command 
\`'\def\@textsuperscript#1{%
  {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\z@#1}}}}}',
where the exponent is too early to be an
active character.


\<latex ltfloat\><<<
\def\:temp#1{%
  {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\z@#1}}}}}
\ifx \@textsuperscript\:temp
  \def\@textsuperscript#1{%
    {\m@th\ensuremath
                 {{\HCode{}}\sp{\mbox{\fontsize\sf@size\z@#1}}}}}
\fi
>>>

The definition of \`'\@textsuperscript' in latex2e uses feartures not
available in latex209.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{subfigure.sty}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%




Defines a command \`'\externaldocument' for importing exterla aux
files from foreugn sources. Should be called after \''\Preamble', and
before \''\begin{document}'.



\<subfigure.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% subfigure.4ht                        |version %
% Copyright (C) |CopyYear.1997.      Eitan M. Gurari         %
|<TeX4ht copyright|>
\ifx\subfig@oldlabel\relax 
   |<2002 subfigure|>
\else 
   |<pre 2002 subfigure|>
\fi
|<fix subfigure|>
|<subfigure.sty shared config|>
\Hinput{subfigure}
\endinput
>>>        \AddFile{9}{subfigure}

\<pre 2002 subfigure\><<<
\def\:tempc{%
  \begingroup   \gHAdvance\TitleCount 1
    \let\begingroup|=\empty
    \let\:tempa|=\xdef
    \def\xdef{\let\xdef|=\:tempa
       \def\protect{\string}\xdef}\o:@subcaption:}
\HLet\@subcaption=\:tempc
>>>


\<2002 subfigure\><<<
\def\:tempc{\gHAdvance\TitleCount 1 \o:@subcaption:}
\HLet\@subcaption=\:tempc
>>>

\<pre 2002 subfigure\><<<
\def\:tempc#1[#2]#3{\a:subfigure
      \o:@subfloat:{#1}[#2]{\cur:lbl{}#3}\b:subfigure}
\HLet\@subfloat|=\:tempc
>>>

\<2002 subfigure\><<<
\def\:tempc#1[#2][#3]#4{\a:subfigure \cur:lbl{}%
   \o:@subfloat:{#1}[#2][#3]{#4}\b:subfigure}
\HLet\@subfloat|=\:tempc
>>>

Had to remove \`'\Link{}{\cur:th \:currentlabel}\EndLink' above after 
\`'#3' to avoide duplicate \''<a id=...>' elements:

\Verbatim
\documentclass{article}
\usepackage{subfigure}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\subfigure[curve]{\includegraphics{cube.eps}}
\end{figure}
\end{document}
\EndVerbatim


\<fix subfigure\><<<
\NewConfigure{subfigure}{2}
\def\:tempc#1#2{\o:@makesubfigurecaption:{%
   \pend:def\thesubfigure{\a:subfigurecaption}%
   \append:def\thesubfigure{\b:subfigurecaption}%
   \pend:def\thesubtable{\a:subfigurecaption}%
   \append:def\thesubtable{\b:subfigurecaption}%
   #1}{\c:subfigurecaption#2\d:subfigurecaption}}
\HLet\@makesubfigurecaption|=\:tempc
\NewConfigure{subfigurecaption}{4}
>>>

\<fix subfigure\><<<
\def\:tempc{\gHAdvance\TitleCount 1 \o:subfig@oldcaption:}
\HLet\subfig@oldcaption\:tempc
>>>

Was
\Verbatim
\def\:tempc{\gHAdvance\TitleCount 1 \o:@caption:}
\HLet\@caption\:tempc
\EndVerbatim

which failed on


\Verbatim
\documentclass{article}
\usepackage{makeidx}
% try to comment out this ...
\usepackage{subfigure}

% ... and this.
\makeindex

\begin{document}

% try placing the \index-statement outside of the caption.
\begin{figure}
Foo
\caption{Bar\index{ka!boom}
}
\end{figure}
\printindex
\end{document}
\EndVerbatim





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Index and Glossary}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/ltidxglo.dtx]{}{}ltidxglo.dtx\EndLink




The index part is defined in latex.ltx, loaded by \''\makeindex', and
can be overridden elsewhwere (e.g., in  index.sty). The case is
similar for make glossary.



\<control @\><<<
\def\#{\string\#}%
>>>

Within the source, we have a definition \''\chardef\#=`\#' which
in immediate environment has the meaning of \''\#' and in regular envirionment
the meaning of \''\chat`\#'.



\<latex ltidxglo\><<<
\NewConfigure{wrindex}[1]{\concat:config\a:wrindex{#1}}
\let\a:wrindex\empty
\ifx \@indexfile\:UndDef \else
   \let\o:wrindex:|=\@wrindex
   \def\@wrindex{\a:wrindex \o:wrindex:}
   \Configure{wrindex}
      {|<control @|>\warn:idx{\jobname}%
       \:wribefr\@indexfile}
\fi
\ifx \@glossaryfile\:UndDef \else
   \let\:wrglossary|=\@wrglossary
   \def\@wrglossary{\:wribefr\@glossaryfile\:wrglossary}
\fi
\def\:wribefr#1{\title:chs{\html:addr  
   \hbox{\Link-{}{|<index haddr|>}\EndLink}}{}%
   \edef\:temp{\write#1{\expandafter\string\a:idxmake{\RefFileNumber
      \FileNumber}{\title:chs {|<index haddr|>}{\cur:th
      \:currentlabel}}{\a:makeindex}}}\:temp}
\ifx \a:makeindex\:UnDef
   \NewConfigure{makeindex}{1} \Configure{makeindex}{}
\fi
\ifx \beforeentry\:UnDef \def\beforeentry#1#2{}   \fi
\NewConfigure{idxmake}{1}
\Configure{idxmake}{\beforeentry}
>>>



Without the \''\hbox' we have sometimes a problem. Why?




%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{theindex}
%%%%%%%%%%%%%%%%%%%%%%%%%%


\Verbatim
latex foo
 makeindex -o foo.ind testindex.idx
 latex foo
\EndVerbatim



\<config book-report-article utilities\><<<
|<book-report-article idx|>
>>>


\<book-report-article idx\><<<
\long\def\c:theindex:#1#2#3#4#5#6#7#8#9{%
   \def\theindex{%
      \def\idx:item{\SaveEverypar\ht:everypar{}#1}%
      \def\endtheindex{\idx:item#2\RecallEverypar}%
      \def\item{\idx:item\def\idx:item{#4}\let\index|=\@gobble #3}%
      \def\subitem{\idx:item\def\idx:item{#6}\let\index|=\@gobble #5}%
      \def\subsubitem{\idx:item\def\idx:item{#8}\let\index|=\@gobble #7}}%
   \def\indexspace{\idx:item#9\let\idx:item|=\empty}}
|<theindex warning|>
\Configure{@begin}{theindex}{\ind:defs}
>>>

The following was in \`'\theinsex'

\Verbatim
      \ifx \idx:item\:UnDef 
         \ifx \LNK\:UnDef 
           \ifx \LNKno\:UnDef 
             \ifx \@indexfile\:UndDef \else
                \warn:idx{\jobname}%
      \fi\fi \fi \fi
\EndVerbatim



\<theindex warning\><<<
\def\warn:idx#1{%
  \expandafter\ifx \csname #1warn:idx\endcsname\relax
     \expandafter\global
         \expandafter\let \csname #1warn:idx\endcsname|=\def
     \:warning{If not done so, the index is to be processed by
      ^^J\space\space tex '\string\def\string\filename
         {{#1}{idx}{4dx}{ind}} \noexpand\input\space idxmake.4ht'
      ^^J\space\space  makeindex -o #1.ind #1.4dx
      ^^Jinstead of
      ^^J\space\space  makeindex -o #1.ind #1.idx  
      ^^JOn some platforms, the quotation marks ' should be 
      ^^J      replaced by double quotation marks " or eliminated.
     }%
     {\Configure{Needs}{File: #1.4idx}\Needs{}}%
  \fi}
>>>


\<index 4.1beta warning\><<<
\def\warn:idx#1{%
  \expandafter\ifx \csname #1warn:idx\endcsname\relax
     \expandafter\global
         \expandafter\let \csname #1warn:idx\endcsname|=\def
     \:warning{If not done so, the index is to be processed by
      ^^J\space\space tex '\string\def\string\filename
         {{\jobname}{|<index 4.1beta ext I|>}{4dx}%
          {|<index 4.1beta ext II|>}} \noexpand
             \input\space idxmake.4ht'
      ^^J\space\space  makeindex -o 
         \jobname.|<index 4.1beta ext II|>\space \jobname.4dx
      ^^Jinstead of
      ^^J\space\space  makeindex -o
         \jobname.|<index 4.1beta ext II|>\space
         \jobname.|<index 4.1beta ext I|>%
      ^^JOn some platforms, the quotation marks ' should be 
      ^^J      replaced by double quotation marks " or eliminated.
     }%
     {\Configure{Needs}{File: #1.4idx}\Needs{}}%
  \fi}
>>>

\<splitidx warning\><<<
\def\warn:idx#1{%
  \expandafter\ifx \csname #1warn:idx\endcsname\relax
     \expandafter\global
         \expandafter\let \csname #1warn:idx\endcsname|=\def
     \:warning{If not done so, the index is to be processed by
      ^^J\space\space tex '\string\def\string\filename
         {{#1}{idx}{4dx}{ind}} \noexpand\input\space idxmake.4ht'
      ^^J\space\space  move #1.4dx #1.idx
      ^^Jbefore invoking
      ^^J\space\space  splitindex #1.idx  
      ^^JOn some platforms, the quotation marks ' should be 
      ^^J      replaced by double quotation marks " or eliminated.
     }%
     {\Configure{Needs}{File: #1.4idx}\Needs{}}%
  \fi}
>>>


\<theindex warning\><<<
\ifOption{info}{\Log:Note{
A script of the form
^^Jtex '\def\string\filename{{\%\%1}{idx}{4dx}{ind}} 
                                       \string\input\space  idxmake.4ht'
^^Jmakeindex -o \%\%1.ind \%\%1.4dx
^^Jin the env file, automatically calls to the revised makeindex
^^Jcommand.  An extra compilation of the source LaTeX file is required,
^^Jto get the index correctly into the output.}}{}
>>>



\<doc warning\><<<
\def\warn:idx#1{%
  \expandafter\ifx \csname #1warn:idx\endcsname\relax
     \expandafter\global
         \expandafter\let \csname #1warn:idx\endcsname|=\def
     \:warning{If not done so, the index is to be processed by
      ^^J\space\space tex '\string\def\string\filename
         {{#1}{idx}{4dx}{ind}} \noexpand\input\space idxmake.4ht'
      ^^J\space\space  makeindex -s #1.ist -o #1.ind #1.4dx
      ^^Jinstead of
      ^^J\space\space  makeindex -s #1.ist -o #1.ind #1.idx  
      ^^JOn some platforms, the quotation marks ' should be 
      ^^J      replaced by double quotation marks " or eliminated.
     }%
     {\Configure{Needs}{File: #1.4idx}\Needs{}}%
  \fi}
>>>



%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{makeidx}
%%%%%%%%%%%%%%%%%%%%%%%%%%


\<makeidx.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% makeidx.4ht                          |version %
% Copyright (C) |CopyYear.2002.      Eitan M. Gurari         %
|<TeX4ht copyright|>
\pend:defII\see{\a:see}
\append:defII\see{\b:see}
\NewConfigure{see}{2}
\Hinput{makeidx}
\endinput
>>>        \AddFile{9}{makeidx}





%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{splitidx.sty}
%%%%%%%%%%%%%%%%%%%%%%%%%%


\<splitidx.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% splitidx.4ht                         |version %
% Copyright (C) |CopyYear.2003.      Eitan M. Gurari         %
|<TeX4ht copyright|>
|<splitidx configs|>
\Hinput{splitidx}
\endinput
>>>        \AddFile{9}{splitidx}

\<splitidx configs\><<<
|<splitidx warning|>
\pend:defII\@@@wrsindex{%
   \if@splitidx
      \warn:idx{##1}%
      \@ifundefined{@indexfile@##1}{}{\html:addr
              \hbox{\Link-{}{|<index haddr|>}\EndLink}%
      \edef\:temp{\expandafter
         \write\csname @indexfile@##1\endcsname{\expandafter
           \string\a:idxmake{\RefFileNumber
           \FileNumber}{|<index haddr|>}{\a:makeindex}}}\:temp}%
   \else
      \warn:idx{\jobname}%
      \html:addr \hbox{\Link-{}{|<index haddr|>}\EndLink
      \edef\:temp{%
         \write\@indexfile{\expandafter\string\a:idxmake{\RefFileNumber
           \FileNumber}{|<index haddr|>}{\a:makeindex}}}\:temp}%
   \fi
}
\ifx \a:makeindex\:UnDef
   \NewConfigure{makeindex}{1} \Configure{makeindex}{}
\fi
>>>

% \def\printindex#1#2{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
%  {\def\indexname{#2}\@input{#1.ind}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{External Processing of Index File (idxmake.4ht)}
%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{Shared}
%%%%%%%%%%%%%%%%%%%%%%%%%%


\<theindex warning\><<<
\def\ind:defs{\let\LNKidx\empty
   \def\LNK##1##2##3##4{\ifx\NewConfigure\:UnDef\else
        \a:LNK[##1]{##2}{}\gHAdvance\:LNKno1
           \def\:THIrd{##3}\ifx\:THIrd\empty
              \LNKidx{\ifx\c:LNK\empty\:LNKno\else \c:LNK\fi}\else
              \LNKidx{##3}\fi
           \global\let\LNKidx\empty
        \b:LNK
      \fi}%
   \def\:LNKno{0}}
\NewConfigure{LNK}{3}
\Configure{LNK}{\Link}{\EndLink}{}
>>>

A `=' in \'+\let\LNKidx=+ is harmful.


\<open 4dx output files\><<<
\newwrite\idx
\newwrite\indexes
\def\MakefileIn#1#2#3#4{#1.#3}
\def\MakefileIndexes#1#2#3#4{#1.4ix}
\immediate\openout\idx=\expandafter\MakefileIn\filename\relax
\immediate\openout\indexes=\expandafter\MakefileIndexes\filename\relax
>>>


\<close 4dx output files\><<<
\immediate\closeout\idx
\immediate\closeout\indexes
>>>


\<idxmake.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% idxmake.4ht                          |version %
% Copyright (C) |CopyYear.2000.      Eitan M. Gurari         %
|<TeX4ht copyright|>

\def\SourceInd#1#2#3#4{#1.#2}
\def\MakefileInd#1#2#3#4{#1.#4}

\newcount\cnt
\newtoks\split

\def\noXcatcodes{%
   \cnt=0
   \def\noXXcatcodes{%
      \catcode\cnt12
      \ifnum\cnt<255
          \advance\cnt  1  \expandafter\noXXcatcodes
      \fi }%
   \noXXcatcodes }

|<open 4dx output files|>
\def\beforeentry#1#2#3#4{
   \def\file{#1}\def\anchor{#2}\def\pointer{#3}
   \begingroup   \noXcatcodes
     \catcode`\s=11 \catcode`\e=11 `%for \see`%
     \catcode`\^^M=10    \catcode`\ =10    \catcode`\^^I=10
     \catcode`\{=1 \catcode`\}=2 \futurelet\next\preGetentries
}
\def\bparent#1||(#2|<par del|>{\def\core{#1}\def\parent{#2}}
\def\eparent#1||)#2|<par del|>{\def\core{#1}\def\parent{#2}}
\def\see#1||see#2||see#3|<par del|>{\def\preSee{#1}\def\isSee{#2}}
|<regular index|>
|<reverse index|>
\input \expandafter\SourceInd\filename\relax
|<close 4dx output files|>

\bye
\endinput
>>>






%%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{Reverse Index}
%%%%%%%%%%%%%%%%%%%%%%%%%%

\<reverse index\><<<
\newcount\GetentriesN
\GetentriesN=0
\def\Ganchor{\ifnum \GetentriesN<10 0\fi
  \ifnum \GetentriesN<100 0\fi
  \ifnum \GetentriesN<1000 0\fi
  \the\GetentriesN}
\def\Beforeentry{\let\getentries=\Getentries
   \let\Beforeentry=\beforeentry \Beforeentry}
\def\Getentries#1#2{\endgroup
   \advance\GetentriesN by 1
   \let\parent=\empty
   \bparent#1||(|<par del|>\ifx \parent\empty
      \eparent#1||)|<par del|>\ifx \parent\empty
        \see#1||see||see|<par del|>%
        \ifx \isSee\empty |<no see entry|>%
        \else             |<yes see entry|>\fi
      \else
        \immediate\write\idx{\string \indexentry\the\split{%
           |<alt ind nun|>\string\erange{\csname \core||(\endcsname}
           \core|<alt ind nun|>\string\comNum}{#2}}%
      \fi
   \else
        \immediate\write\idx{\string \indexentry\the\split{%
           |<alt ind nun|>\string\brange{\Ganchor}
           \core|<alt ind nun|>\string\comNum}{#2}}%
        \expandafter\edef\csname \core||(\endcsname{\Ganchor}%
   \fi
}
>>>

\<no see entry\><<<
\immediate\write\idx{\string \indexentry\the\split{%
           |<alt ind nun|>%
   #1|<alt ind nun|>\string\comNum}{#2}}%
>>>


\<yes see entry\><<< 
\immediate\write\idx{\string \indexentry\the\split{%
   {\Ganchor}%
   \preSee\string\gobble||see{\isSee}}{#2}}%
>>>


We want two references to the index numbers like in
\`'\indexentry{\indNum{0006}...\indNum{0006}\comNum}{1}' because the \`'\item
\indNum{0006}...\indNum{0006}\comNum' sometimes appear as
\`'\item...\indNum{0006}\comNum' with the first index being lost due
to `@' entries \`'\index{...@...}'.

\<alt ind nun\><<<
\string\indNum{\Ganchor}%
>>>



%%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{Regular Index}
%%%%%%%%%%%%%%%%%%%%%%%%%%

\<regular index\><<<
\newcount\entryNum
|<split index|>
\def\getentries#1#2{\endgroup
   \advance\entryNum by 1
   \let\parent=\empty
   \bparent#1||(|<par del|>\ifx \parent\empty  
      \eparent#1||)|<par del|>\ifx \parent\empty   
        |<non-regular index|>%
      \else
        \immediate\write\idx{\string \indexentry\the\split{%
          \core||LNK\csname \core||(\endcsname
          --\string\LNK{\file}{\anchor}{\pointer}}{|<entry num|>}}%
        \immediate\write\indexes{\string \indexmark\the\split{% 
          \core}{|<entry num|>}}%
      \fi
   \else
      \expandafter\edef\csname \core||(\endcsname
          {{\file}{\anchor}{\pointer}{|<entry num|>}}%
   \fi
}
>>>

We replace the page numbers to avoid foeign material there, like spaces in
case of roman numbers, introduced by tex4ht.  It also protects from
duplicate entries in a given page,  desliked by makeindex.  

\<entry num\><<<
\the\entryNum
>>>


% \ifx\chapter\:UnDef \expandafter\section
%          \else \expandafter\chapter \fi *{\indexname}
% \idx:item

The \''\hasBar' probably  removes the need for treating \''\see' and 
\''\seealso' macros.


\<non-regular index\><<<
\see#1||see||see|<par del|>%
\ifx \isSee\empty
   \hasBar#1|||<par del|>{#1}{#2}%
\else
   \immediate\write\idx{\string \indexentry\the\split{%
     \preSee||see{\string\LNK{\file}{\anchor}{\isSee}{}}}{|<entry num|>}}%
   \immediate\write\indexes{\string \indexmark\the\split{% 
     \preSee}{|<entry num|>}}%
\fi
>>>

\<regular index\><<<
\def\hasBar#1||#2|<par del|>#3#4{%
   \def\temp{#2}\ifx \temp\empty
      \immediate\write\idx{\string \indexentry\the\split{% 
         #3||LNK{\file}{\anchor}{\pointer}}{|<entry num|>}}%
      \immediate\write\indexes{\string \indexmark\the\split{% 
         #3}{|<entry num|>}}%
   \else \yeshasBar#3|<par del|>{|<entry num|>}\fi
}
\def\yeshasBar#1||#2|<par del|>#3{%
   \immediate\write\idx{\string \indexentry\the\split{% 
       #1\string\let\string\LNKidx\expandafter\string\csname
          #2\endcsname||LNK{\file}{\anchor}{\pointer}}{|<entry num|>}}%
   \immediate\write\indexes{\string \indexmark\the\split{% 
       #2}{|<entry num|>}}%
}
>>>


%%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{Split Index}
%%%%%%%%%%%%%%%%%%%%%%%%%%

Assumes  the extra `[...]' argument in 
\`'\indexentry[...]{...}{...}'

\<split index\><<<
\def\preGetentries{\ifx [\next \expandafter\opGetentries
  \else \global\split={}\expandafter\getentries\fi}
\def\opGetentries[#1]{\global\split={[#1]}\getentries}
>>>

%%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{????}
%%%%%%%%%%%%%%%%%%%%%%%%%%






Tables in two columns.

\Verbatim
\Configure{theindex}
   {\Columns[WIDTH="100\%",VALIGN="TOP"]{2}} {\EndColumns}
   {\idx:tbl}  {\endidx:tbl}
   {\idx:tbl\idx:sub}  {\endidx:tbl}
   {\idx:tbl\idx:sub\idx:sub}  {\endidx:tbl}
   {\hbox{\HCode{<P>}}}
\def\idx:tbl{\hbox\bgroup\HCode{<TABLE \:zbsp{theindex}><TR
   CLASS="theindex"><TD CLASS="theindex">}}
\def\endidx:tbl{\HCode{</TD></TR></TABLE>}\egroup}
\def\idx:sub{\ \HCode{</TD><TD CLASS="theindexsub">}}
\EndVerbatim





Redifine \''\index' and \''\glossary' to add the \`'\beforeentry{file
name}{tag}' before each \''\indexentry' and each \''\glossaryentry',
with default definition for \''\beforeentry' to eat its fields and do
nothing. 



In addition, The command inserts a tag at the file. To get a
pointer to the file, all we need to insert te redefinition
\`'\def\beforeentry#1#2#3#4{#3{\Link[#1]{#2}{}#4\EndLink}}' which puts
the link on the page number (for whatever the page number is good, or
replaces it with another mark).



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{/LoadLabels for imports}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\<html latex coauthor\><<<
\def\LoadLabels{\@ifnextchar[{\LD:lbls}{\LD:lbls[]}}
\def\LD:lbls[#1]#2{%
   |<load xrefs for Link|>%
   {\let\bibdata|=\@gobble
    \def\@newl@bel##1##2{\:newl@bel{##1}{#1##2}}%
    \let\@writefile\@gobbletwo
    \catcode`\@|=11       \get:input{#2.aux}%
    \catcode`\@|=12  }}
>>>

\''\newlabel' already given in LaTeX

\<load xrefs for Link\><<<
\if !#1!%
   \ld:flxrf{#2}{}%
\else
   \LoadRef-[)F]{#2}{)F#1##1}%
   \LoadRef-[)Q]{#2}{)Q#1##1}%
\fi
>>>



\<html latex coauthor\><<<
\def\RefLabel#1#2{{%
   \Configure{XrefFile}{#1}%
   \def\file:id{-1}%
   \ref{#1#2}}}
>>>

The above doesn't work always.  Try


*** filea.tex ***

\Verbatim
\documentclass{article}

\usepackage{tex4ht}

\begin{document}   \LoadLabels{fileb}

\section{a...a}    \ref{x}             \end{document}
\EndVerbatim

*** fileb.tex ***

\Verbatim
\documentclass{article}

\usepackage{tex4ht}

\begin{document}

\section{b...b}    \label{x}          \end{document}
\EndVerbatim





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Bibliography}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{LaTeX}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/ltbibl.dtx]{}{}ltbibl.dtx\EndLink



\`'\Link' must follow \`'\o:bibitem:'; otherwise it will insert stuff before an \`'\item'.

\<latex ltbibl\><<<
\:CheckOption{no-bib} \if:Option\else
   |<cite in doc to bib|>
   |<listing of bib|>
\fi
>>>

% 
%   \let\:citex=\@citex
%   \def\@citex[#1]#2{\Link{X#2}{}\:citex[#1]{#2}\EndLink}
% 

\<cite in doc to bib\><<<
\ifx \o:@citex:\:UnDef \let\o:@citex:|=\@citex\fi
\catcode`\:=12
\def\@citex[#1]#2{%
  \let\@citea\@empty
  |<a cite|>\@cite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{,\penalty\@m\ }%
     {|<sub sup cite|>\xdef\@citeb{\expandafter\@firstofone\@citeb}}%
     \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
     \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
       \G@refundefinedtrue
       \@latex@warning
         {Citation `\@citeb' on page \thepage \space undefined}}%
       {{|<link cite|>\csname b@\@citeb\endcsname
         |<end link cite|>}}}}{#1}|<b cite|>}
\catcode`\:=11
>>>


\<a cite\><<<
\csname a:cite\endcsname
>>>

\<b cite\><<<
\csname b:cite\endcsname
>>>

\<link cite\><<<
\cIteLink {X\@citeb}{}%
>>>

\<end link cite\><<<
\EndcIteLink
>>>

\<sub sup cite\><<<
\SUBOff \SUPOff
>>>


Was \''\x:SUBOff \x:SUPOff'--any problems?


Had to remove \''\hbox' from \`'{\cIteLink {X\@citeb}{}\csname
            b@\@citeb\endcsname\EndcIteLink}' because it created 

The following is treated in a similar manner to ref.

\<latex ltbibl\><<<
\NewConfigure{cite}[4]{\c:def\a:cite{#1}\c:def\b:cite{#2}%
   \d:def\cIteLink{#3}\ifx \cIteLink\empty 
      \let\cIteLink|=\:gobbleII\fi \c:def\EndcIteLink{#4}}
\Configure{cite}{}{}{}{}
>>>



\<latex ltbibl\><<<
\:CheckOption{bibtex2} \if:Option
   \expandafter\def\csname bibliography2\endcsname{\csname
         a:bibliography2\endcsname
      \Link{YX\b:blabel}{}\csname b:bibliography2\endcsname
      \EndLink \csname c:bibliography2\endcsname}%
   \let\bibitem:ii\@bibitem
   \def\@bibitem#1{\bibitem:ii{#1}\def\b:blabel{#1}}
   \let\lbibitem:ii=\@lbibitem
   \def\@lbibitem[#1]#2{\lbibitem:ii[#1]{#2}\def\b:blabel{#2}}
   \let\bibliography:ii=\bibliography
   \def\bibliography#1{%
      \let\bibliography=\bibliography:ii
      {\bibliography{#1}}
      \bgroup
         \ConfigureEnv{thebibliography}{}{}{}{}
         \ConfigureList{thebibliography}
            {\let\en:bib=\empty}
            {\en:bib}
            {\en:bib
             \def\en:bib{\csname b:bibitem2\endcsname\EndHPage{}}%
             \HPage{}\csname a:bibitem2\endcsname
            }
            {\csname c:bibitem2\endcsname}
         \def\section##1##2{}
         \Configure{bibanchor}{YX}
         \@fileswfalse
         \@input@{\jobname j.bbl}%
      \egroup
   }
   \NewConfigure{bibliography2}{3}
   \NewConfigure{bibitem2}{3}
   |<bib2 warning|>
   |<create aux j|>
\fi
>>>

The \`'\bibliography{#1}'  may have \''\newcommand' instructions. Hnce,
to avoid complaints about redefined commands, we  put \`'\bibliography{#1}' within a group.

\<create aux j\><<<
\bgroup
  \catcode`\/=0
  \catcode`\\=12
  /gdef/bib:style{\bibstyle}
  /catcode`/\=0
  /catcode`//=12
\egroup
>>>

\<create aux j\><<<
\bgroup  
  \catcode`\&=12
  \gdef\get:aux{%
    \immediate\read15 to \line
    \ifeof15 \else
       \expandafter\scan:aux\line @@@@@@@@@&&&&
       \expandafter\get:aux
    \fi
  }
  \gdef\put:aux#1&&&&{%
     \immediate\write15{\ifx \first\bib:style
        \expandafter\ifx \csname a:bibliographystyle2\endcsname\empty
             \line \else
             \bib:style{\csname a:bibliographystyle2\endcsname}\fi
       \else  \line\fi}}
\egroup
\def\scan:aux#1#2#3#4#5#6#7#8#9{\def\first{#1#2#3#4#5#6#7#8#9}\put:aux}
\NewConfigure{bibliographystyle2}{1}
\Configure{bibliographystyle2}{}
>>>



\<create aux j\><<<
\def\j:aux{%
  \bgroup
    \immediate\openin15=\jobname .aux
    \ifeof15 \else
      \no:catcodes{0}{255}{12}%
      \no:catcodes{65}{90}{11}%
      \no:catcodes{97}{122}{11}%
      \catcode`\^^M=5
      \immediate\openout15=\jobname j.aux
      \get:aux
      \immediate\write15{}
      \immediate\closeout15
      \immediate\closein15
    \fi
  \egroup
}
\append:def\@enddocumenthook{%
  \let\:dofilelist=\@dofilelist
  \def\@dofilelist{%
     \let\@dofilelist=\:dofilelist
     \j:aux \@dofilelist}}
>>>


\<bib2 warning\><<<
\:CheckOption{bibtex2} \if:Option
   \Log:Note{Option `bibtex2' requires
      compilation of `\jobname j.aux' with bibtex.}   
   \immediate\write-1{ Employ \string\Configure{bibliographystyle2}{...} 
     to change the bibliography style.}
\else
   \Log:Note{for 2 levels bibtex bibliography,
        use the command line option `bibtex2'}
\fi
>>>


%\def\bibitem{\@ifnextchar[\@lbibitem\@bibitem}
%\def\@lbibitem[#1]#2{\item[\@biblabel{#1}\hfill]\if@filesw
%      {\let\protect\noexpand
%       \immediate
%       \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}
%\def\@bibitem#1{\item\if@filesw \immediate\write\@auxout
%       {\string\bibcite{#1}{\the\value{\@listctr}}}\fi\ignorespaces}
%

\<listing of bib\><<<
\ifx \o:@lbibitem:\:UnDef \let\o:@lbibitem:|=\@lbibitem\fi
\def\@lbibitem[#1]#2{{\:SUBOff\:SUPOff\edef\:tempb{{#2}}%
   \pend:def\:tempb{\o:@lbibitem:[#1]}%
   \global\let\:temp|=\:tempb}%
   \setb:anc{#2}\:temp\bib:anc \let\AnchorLabel|=\sv:anc\ignorespaces}
>>>

\<listing of bib\><<<
\ifx \o:@bibitem:\:UnDef \let\o:@bibitem:|=\@bibitem \fi
\def\@bibitem#1{{\:SUBOff\:SUPOff\edef\:temp{\noexpand\o:@bibitem:{#1}}%
   \global\let\:temp|=\:temp}\:temp}
\pend:defI\@bibitem{\setb:anc{##1}}
\append:defI\@bibitem{\bib:anc
   \let\AnchorLabel|=\sv:anc \ignorespaces}
>>>

\<book / report / article\><<<
\ifx \@openbib@code\:UnDef \else
 \pend:def\@openbib@code{\labelsep|=\z@}
\fi
>>>

Old versions of latex don't have \`'\@openbib@code' (article 1995/06/26 v1.3g).




\<listing of bib\><<<
\def\setb:anc#1{\let\sv:anc|=\AnchorLabel
   \def\bib:anc{\def\bib:anc{#1}\ifx \bib:anc\empty \else
      \a:bibitem{}{\a:bibanchor#1}\b:bibitem\fi \gdef\bib:anc{}}%
   \def\AnchorLabel{\bib:anc}|<config write bibcite|>}
\NewConfigure{bibitem}{2}
\NewConfigure{bibanchor}{1}
\Configure{bibanchor}{X}
>>>


The option \''/bib' puts the (normally long) keys in a separate lines.


\<config write bibcite\><<<
\let\cite:item=\item
\def\item##1\if@filesw##2\fi{\let\item\cite:item
   \item##1\if@filesw {\a:bibcite ##2}\fi}
>>>

\<listing of bib\><<<
\NewConfigure{bibcite}{1}
>>>


\SubSection{For Xml}





%\<latex def Configure\><<<

\<latex.ltx non trace configurations\><<<
\def\g:let#1#2{\global\let#1|=#1}
>>>

\<latex.ltx latex edit commands\><<<
\def\g:let#1#2{\advance\tmp:cnt |by1
   \ifx \:temp\empty
       \edef\:temp{\noexpand\pend:def\noexpand#1{\noexpand
         \a:trc List(#2)\the\tmp:cnt\noexpand\b:trc}}\:temp
       \edef\:temp{\noexpand\append:def\noexpand#1{\noexpand
         \c:trc List(#2)\the\tmp:cnt\noexpand\d:trc}}\:temp
       \let\:temp|=\empty
   \fi
   \global\let#1|=#1}
>>>








The four parts indicate what should appear at the head, before
each label, after each label, and at the tail of the lists.


In the default setting, the lists that are not referenced through
block-environments are supposed to create no code. We made this choice
because there are many trivial lists that just create
indentation in LaTeX that is undesired in html. The outcome of such
lists would probably have been \`'<DL><DT><STRONG></STRONG><DD>.....</DL>'.







%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Page styles and related commands}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/ltpage.dtx]{}{}ltpage.dtx\EndLink






\SubSection{Fussy and Sloppy}

\<latex ltpage\><<<
\:CheckOption{fussy}  \if:Option  \else
   \def\sloppy{%
     \tolerance 9999%
     \emergencystretch 3em}
   \def\fussy{%
     \emergencystretch\z@
     \tolerance 200}
   \def \@largefloatcheck{%
     \ifdim \ht\@currbox>\textheight
       \@tempdima -\textheight
       \advance \@tempdima \ht\@currbox
       \ht\@currbox \textheight
     \fi
   }
\fi
>>>



\ifHtml[\HPage{more}\Verbatim

>  >> LaTeX Warning: Float too large for page by 1873.00085pt on input line
>
>  > No. It was a mistake of mine.
>
>   Nevertheless, this may be worth looking into a bit. I get two of these
> warnings, and four overfull hbox warnings, when compiling with the htm
> option on.

My fault.

> This is not a big problem, but it is a bit annoying because
> it forces me to look closely if perhaps an important warning is hidden
> inbetween. Maybe, since for the HTML output the pagesize is irrelevant,
> it is possible to have TeX4ht set the pagesize to a very large
> value?

This can cause too much burdun on TeX as far as resources are
concerned.  Instead TeX4ht sets the lines and spaces to flexible
dimensions, and  hides the warning messages from the users.

You can turn the overfull warning messages on with the `fussy' option
of \Preamble.  So far I never found this option to be useful,
and I suspect that the only place it can become useful is when
dvi pictures overflow the page dimensions.

fussy option in \Preamble to see box overlows.  Typically, this
messages are irrelevant.

>  >> LaTeX Warning: Float too large for page by 1873.00085pt on input line
>
>  > No. It was a mistake of mine.
>
>   Nevertheless, this may be worth looking into a bit. I get two of these
> warnings, and four overfull hbox warnings, when compiling with the htm
> option on.

My fault.

> This is not a big problem, but it is a bit annoying because
> it forces me to look closely if perhaps an important warning is hidden
> inbetween. Maybe, since for the HTML output the pagesize is irrelevant,
> it is possible to have TeX4ht set the pagesize to a very large
> value?

This can cause too much burdun on TeX as far as resources are
concerned.  Instead TeX4ht sets the lines and spaces to flexible
dimensions, and  hides the warning messages from the users.
\EndVerbatim\EndHPage{}]\fi

 
LaTeX offers the following definitions.

\Verbatim
\def\sloppy{%
  \tolerance 9999%
  \emergencystretch 3em%
  \hfuzz .5\p@
  \vfuzz\hfuzz}
\def\fussy{%
  \emergencystretch\z@
  \tolerance 200%
  \hfuzz .1\p@
  \vfuzz\hfuzz}
\def \@largefloatcheck{%
  \ifdim \ht\@currbox>\textheight
    \@tempdima -\textheight
    \advance \@tempdima \ht\@currbox
    \@latex@warning {Float too large for page by \the\@tempdima}%
    \ht\@currbox \textheight
  \fi
}
\EndVerbatim


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%















For center, flushleft, and flushright we don't want identation, so we
can't use tables for separating from above and below. Similarly is the
case for tabbing and verbatim, but they get separate treatment.



In TeX4ht, \''\begin{...}' and \''\end{...}' are redefined
to \''\SaveEverypar\begin{...}' and \''\end{...}\RecallEverypar' 
so it is pointless to directly deal with paragraph breaks 
and saving.  Since the saving and recalling are global
operations (in a pushdown fashion), the above
redefine the saved environment to eliminate 
paragraph breaks after the environment.


WE HAVE here a problem if someone goes directly, e.g., for
\''\quotation...\endquotation' instead of 
\''\begin{quotation}...\end{quotation}'. On the other hand, 
LaTeX doesn't mention the first case as an option.




\ifHtml[\HPage{test data}\Verbatim
\documentstyle{article}

\title{Essential \LaTeX}
\author{Jon Warbrick}

\input tex4ht.sty \Preamble{html,fonts}
        \begin{document}
     \EndPreamble




 \maketitle

\def\HR{\HCode{<HR>}}

\HR====== verse 

\begin{verse}
Gertjan Klein\\
Postbus 23656
\end{verse}

\HR====== quote

\begin{quote}
The buck stops here.

The buck stops here.
\end{quote}

\HR====== flushleft/flushright


We can stop \LaTeX\ from justifying each line to both the
left and the right margins.
\begin{flushright}
The {\tt flushright} environment is\\
used for text with an even right margin\\
and a ragged left margin.
\end{flushright}
\begin{flushleft}
and the {\tt flushleft} environment is\\
used for text with an even left margin\\
and a ragged right margin.
\end{flushleft}



\HR====== quote center/flushleft/flushright  

\begin{quote}
The buck stops here. The buck stops here. The buck stops here. 
The buck stops here. 
\begin{center}1\\123\\12345\end{center}
\begin{flushleft}1\\123\\12345\end{flushleft}
\begin{flushright}1\\123\\12345\end{flushright}
\end{quote}


\HR====== quote center/flushleft/flushright  par

\begin{quote}
The buck stops here. The buck stops here. The buck stops here. 
The buck stops here. 

\begin{center}1\\123\\12345\end{center}
\begin{flushleft}1\\123\\12345\end{flushleft}

\begin{flushright}1\\123\\12345\end{flushright}
\end{quote}

\HR======  quote tabbing

\begin{quote}\begin{tabbing}
\verb|\subsubsection| \= \verb|\subsubsection|~~~~~~~~~~ \=           \kill
\verb|\chapter|       \> \verb|\subsection|    \> \verb|\paragraph|    \\
\verb|\section|       \> \verb|\subsubsection| \> \verb|\subparagraph| \\
\end{tabbing}\end{quote}

\HR====== quote verbatim

\begin{quote}\begin{verbatim}
\command{text}  xx
yy
\end{verbatim}\end{quote}

\end{document}

\EndVerbatim\EndHPage{}]\fi



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{LaTeX Accents}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Handles accents that reach \''\add@accent'. Currently just empty
bases?

\<latex ltoutenc\><<<
\def\:tempc#1#2{\expandafter
   \ifx \csname accent \cf@encoding :#1\endcsname\relax 
      \o:add@accent:{#1}{#2}%
   \else \def\:temp{\add:accent{#1}{#2}}%
      \expandafter\expandafter\expandafter\:temp
      \csname accent \cf@encoding :#1\endcsname{}{}|<par del|>\fi }
\HLet\add@accent\:tempc
\def\add:accent#1#2#3#4{%
   \def\:temp{#3#4}\ifx \:temp\empty
      \o:add@accent:{#1}{#2}%
      \expandafter\expandafter\expandafter\gob:pardel
   \else \def\:temp{#2}\def\:tempa{#3}\ifx \:temp\:tempa
          #4\expandafter\expandafter\expandafter\gob:pardel
       \else 
          \expand:after{\expand:after{\add:accent{#1}{#2}}}%
   \fi \fi }
\def\gob:pardel#1|<par del|>{}
>>>

\<latex ltoutenc\><<<
\NewConfigure{add accent}[3]{%
  \expandafter\ifx \csname accent #1\endcsname\relax
     \expandafter\let\csname accent #1\endcsname=\empty
  \else \def\:temp{#2#3}\ifx \:temp\empty
     \expandafter\let\csname accent #1\endcsname=\empty
  \fi \fi 
  \expandafter\scan:accents\csname accent #1\endcsname{#2}{#3}%
  }
\def\scan:accents#1#2#3{\def\:temp{#2#3}\ifx \:temp\empty\else
    \append:def#1{{#2}{#3}}\expand:after{\scan:accents#1}%
  \fi}
>>>


The first argument should be an encoding:accent-number pair.

\Verbatim
     \Configure{add accent}{OT4:18}   
       {E}{\add:acc{00C8}}  
       {e}{\add:acc{00E8}}  
       {}{}   
\EndVerbatim 



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Output Routine}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/base/ltoutput.dtx]{}{}ltoutput.dtx\EndLink

\SubSection{Head and Foot Lines}

\<latex ltoutput\><<<
\pend:def\@outputpage{\let\@oddhead=\empty \let\@oddfoot=\empty
  \let\@evenhead=\empty \let\@evenfoot=\empty }
>>>


\<latex ltoutput\><<<
\pend:def\newpage{%
   \@noskipsectrue
   \if@nobreak \@nobreakfalse \ht:everypar{\HtmlPar}\fi }
>>>



\Verb+\clearpage+ has  a \Verb+\vtop{}+ in its body.

\<latex ltoutput\><<<
\pend:def\clearpage{\IgnorePar}
>>>


\<latex ltsect\><<<
\let\:xsect|=\@xsect
\def\@xsect#1{\:xsect{0ex}}
\append:def\@afterheading{\everypar{\HtmlPar}}
\let\@svsechd\empty
>>>


The above is needed for taking care of inserting lost paragraph breaks 
at top of pages. Can't put \''\def\@noskipsecfalse{\@noskipsectrue}'; it 
is a problem for titlesec.


The need to initialize   \''\@svsechd' arises in

\Verbatim
\documentclass{prosper}
\begin{document}
 \begin{slide}{}
    \section*{aaa}
 \end{slide}
\end{document}
\EndVerbatim


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Utilities}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%








%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{TO BE ORGANIZED}
\Section{Non-classified LaTeX************************}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\<more html latex\><<<
\NewConfigure{InsertTitle}{1}
\NewConfigure{AfterTitle}{1}
>>>




%%%%%%%%%%%%%%%%%%%%%%%%
\Section{srcltx.sty}
%%%%%%%%%%%%%%%%%%%%%%%%








\<srcltx.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% srcltx.4ht                           |version %
% Copyright (C) |CopyYear.2002.      Eitan M. Gurari         %
|<TeX4ht copyright|>
|<config srcltx|>
\Hinput{srcltx}
\endinput
>>>        \AddFile{9}{srcltx}



\<config srcltx\><<<
\:warning{disabling srcltx}%
\SRCOKfalse
\let\SRCOKtrue=\relax
\ifx \src@everypar\:UnDef \else
   \let\everypar\src@everypar
   \let\ht:everypar\everypar
\fi
\def\src@@include#1{\let\include\src@include
   \let\src@include\:UnDef \let\src@@include\:gobble \include}
\def\src@@@input#1{\let\input\src@input 
   \let\src@input\:UnDef \let\src@@@input\:gobble \input}
\def\:temp#1\expandafter\src@spec#2|<par del|>{\everymath{#1}}
\expandafter\:temp \the\everymath\expandafter\src@spec |<par del|>
\def\:temp#1\expandafter\src@spec#2|<par del|>{\everypar{#1}}
\expandafter\:temp \the\everypar\expandafter\src@spec |<par del|>
\def\src@@bibliography#1#2{\src@bibliography{#2}}
>>>


%%%%%%%%%%%%%%%%%%%%%%%%
\Section{emulateapj.sty}
%%%%%%%%%%%%%%%%%%%%%%%%



\<emulateapj.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% emulateapj.4ht                       |version %
% Copyright (C) |CopyYear.1999.      Eitan M. Gurari         %
|<TeX4ht copyright|>
|<config emulateapj.clo utilities|>
|<config emulateapj.clo shared|>
\Hinput{emulateapj}
\endinput
>>>        \AddFile{9}{emulateapj}

\<config emulateapj.clo shared\><<<
\def\make@slugcomment{\ifx\@submitted\@empty\relax\else
   \a:slugcomment\hbox{\@submitted}\b:slugcomment    
\fi}
\NewConfigure{slugcomment}[2]{\c:def\a:slugcomment{#1}%
   \c:def\b:slugcomment{#2}}
>>>




\<config emulateapj.clo shared\><<<
\def\subtitle{{\a:subtitle \noindent
   \a:submitted\scriptsize {\sc \@submitted}\b:submitted
   Preprint typeset using \LaTeX\ style emulateapj\b:subtitle}}

\NewConfigure{subtitle}[2]{\c:def\a:subtitle{#1}\c:def\b:subtitle{#2}}%
>>>




\<config emulateapj.clo shared\><<<
\NewConfigure{submitted}[2]{\c:def\a:submitted{#1}\c:def\b:submitted{#2}}%
>>>




\<config emulateapj.clo shared\><<<
\def\title#1{{%
  \subtitle  \a:title\uppercase{#1}\b:title}}
\NewConfigure{title}[2]{\c:def\a:title{#1}\c:def\b:title{#2}}%
>>>




\<config emulateapj.clo shared\><<<
\def\author#1{{\a:author\small\scshape#1\b:author}\make@slugcomment}
\NewConfigure{author}[2]{\c:def\a:author{#1}\c:def\b:author{#2}}%
>>>




\<config emulateapj.clo shared\><<<
\def\affil#1{{\a:affil#1\b:affil}}
\NewConfigure{affil}[2]{\c:def\a:affil{#1}\c:def\b:affil{#2}}%
>>>






\<config emulateapj.clo shared\><<<
\def\keywords#1{{\a:keywords{\it\@keywordtext :} #1\b:keywords}}
\NewConfigure{keywords}[2]{\c:def\a:keywords{#1}\c:def\b:keywords{#2}}%
>>>





\<config emulateapj.clo shared\><<<
\def\subjectheadings#1{{\a:subjectheadings{\it
   \@keywordtext :} #1\b:subjectheadings}}
\NewConfigure{subjectheadings}[2]{\c:def\a:subjectheadings{#1}%
   \c:def\b:subjectheadings{#2}}%
>>>




\<config emulateapj.clo shared\><<<
\let\subsecnum@size=\:gobble
\let\secnum@size=\:gobble
>>>



% renewed for catcode of ^

\<config emulateapj.clo shared\><<<
\def\altaffilmark#1{$\sp{#1}$}
\def\tablenotemark#1{$\sp{\rm #1}$}
\def\tablenotetext#1#2{
    \@temptokena={\vspace{.5ex}{\noindent\llap{$\sp{#1}$}#2}\par}
    \@temptokenb=\expandafter{\tblnote@list}
    \xdef\tblnote@list{\the\@temptokenb\the\@temptokena}}
\def\set@tblnotetext{\def\tablenotetext##1##2{{%
    \@temptokena={{\parbox{\pt@width}{\hskip1em$\sp{\rm ##1}$##2}}\par}%
    \@temptokenb=\expandafter{\tblnote@list}
    \xdef\tblnote@list{\the\@temptokenb\the\@temptokena}}}}
\def\arcdeg{\hbox{$\sp\circ$}}
\def\arcmin{\hbox{$\sp\prime$}}
\def\arcsec{\hbox{$\sp{\prime\prime}$}}
\def\fd{\hbox{$.\!\!\sp{\rm d}$}}
\def\fh{\hbox{$.\!\!\sp{\rm h}$}}
\def\fm{\hbox{$.\!\!\sp{\rm m}$}}
\def\fs{\hbox{$.\!\!\sp{\rm s}$}}
\def\fdg{\hbox{$.\!\!\sp\circ$}}
\def\farcm{\hbox{$.\mkern-4mu\sp\prime$}}
\def\farcs{\hbox{$.\!\!\sp{\prime\prime}$}}
\def\fp{\hbox{$.\!\!\sp{\scriptscriptstyle\rm p}$}}
\def\slantfrac#1#2{\hbox{$\,\sp#1\!/\sb#2$}}
>>>





\Section{ifthen.sty}




\<ifthen.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% ifthen.4ht                           |version %
% Copyright (C) |CopyYear.1997.      Eitan M. Gurari         %
|<TeX4ht copyright|>

   |<fix ifthen|>
   |<ifthen.sty shared config|>
\Hinput{ifthen}
\endinput
>>>        \AddFile{7}{ifthen}




\<fix ifthen\><<<
\toks@|={%
  \TE@repl\and\TE@and
  \TE@repl\not\TE@neg
    \begingroup
        \let\protect\@unexpandable@protect
        \def\@setref#1#2#3{%
         \ifx#1\relax\z@\else\expandafter#2#1\fi}%
        \def\value#1{\the\csname c@#1\endcsname}%
        \let\equal\TE@equal \let\(\TE@lparen \let\)\TE@rparen
        \let\isodd\TE@odd \let\lengthtest\TE@length
        \begingroup
  \Configure{ref}{}{}{}%
          \let\@tempa\relax\let\@tempb\relax
          \xdef\@gtempa{\expandafter\TE@eval\the\toks@\TE@endeval}%
        \endgroup
        \@gtempa
}
\long\edef\ifthenelse#1{%
  \toks@{#1}%
  \noexpand\TE@repl \expandafter\noexpand\csname or\endcsname 
     \noexpand\TE@or    \the\toks@
  \noexpand\expandafter\noexpand\endgroup\noexpand\ifTE@val
    \noexpand\expandafter\noexpand\@firstoftwo
  \expandafter\noexpand\csname else\endcsname
    \noexpand\expandafter\noexpand\@secondoftwo
  \expandafter\noexpand\csname fi\endcsname}
>>>


\Link[/n/ship/0/packages/tetex/teTeX/texmf/tex/latex/base/ifthen.sty]{}{}%
ifthen.sty\EndLink

Fixed for caseses like \`'\ifthenelse{\isodd{\pageref{\thechapter:\theside@count}}}'.






\<non classified latex\><<<
|<early latex util|> 
|<more latex math|>


   |<latex trace configurations|>
|<latex html cut points|>
|<config latex.ltx utilities|>
|<latex.ltx latex trace configurations|>
|<config latex.ltx shared|>
|<config plain-latex shared|>
   |<elements for lists|>
   |<html lists|>
   |<html latex lists|>
   |<html latex bib|>
   |<elements for latex divs|>
   |<elements for divs|>
   |<html latex divs|>
   \:CheckOption{new-accents}     \if:Option
      |<revised accent definitions|>
      |<revised latex accent definitions|>
      |<new accents|>
   \else
      |<temp patch for accents on small caps|>
      |<accents|>
   \fi
   |<text symbols|>
   |<html local env|>
   |<more html tex|> 
   |<html tex env|>
      |<html latex.ltx core|>
      |<html latex floats|>
   |<more html latex|>
|<latex 1999|>
|<latex 2000|>
|<html latex coauthor|>
|<latex.ltx|>
\def\:temp#1#2|<par del|>{\def\:temp{#1}}
\expandafter\:temp\usepackage|<par del|>
\def\:tempa{\@latex@e@error}
\ifx \:temp\:tempa
   |<latex209.4ht|>
\else
   |<not latex209|>
\fi
>>>










In latex, we have \`'\let\math=\(
\let\endmath=\)
\def\displaymath{\[}
\def\enddisplaymath{\]\global\@ignoretrue}'.




\`'\Configure {[]} {cond-before-math} {cond-after-math} 
{cond-start-math} {cond-end-math}' The cond is on at least one of the parameters in the pair being non-empty.


\`'$$...$$' and \`'\[...\]' should have identical behavior with
respect to paragraphs.





\`'\[..\]' is for \`'$$...$$' and \`'\(...\)' is for \`'$...$'.



Tried \`'\let\B:math|=\[  \let\E:math|=\]  
            \let\b:math|=\(  \let\e:math|=\)  '
for LaTeX{}, but there were occassions 
it failed me.


%  \def\after:protect##1{}%
%  \def\protect##1{\string\protect\string##1\after:protect{##1}\relax\space}%
%   \let\x@protect|=\protect

\<latex changes for tex4ht.sty\><<<
|<html latex start|>
|<html latex hook on end|>
\ifx \pageno\:Undef  \let\pageno|=\c@page   \fi 
\let\accent:def|=\def
\pend:def\protect:wrtoc{\:protect 
   \Configure{ }{ }\toc:lbl:idx}
  \def\endMkHalign{\EndMkHalign}
\def\:protect{\vrb:tt   
  \let\protect|=\@unexpandable@protect      
  \let\ref|=\o:ref \more:no
}
>>>

\<shared plain,eplain\><<<
\pend:def\protect:wrtoc{\Configure{ }{ }}
>>>



% \def\add:protect#1{\append:defI\after:protect{\check:protect{#1}{##1}}}
% \def\check:protect#1#2{\ifx #1#2\expandafter\gobble:space\fi}
% \def\gobble:space#1\space{}
%






The following allows pushing the math mode into the cells,
instead of being placed on top of the tabular environment (tabular
has a \`'$' outside the environment--for compatibility with the
shared environment of array?). 
\ifHtml[\HPage{more}
Removed \`'\edef\:temp{\the\everymath}\ifx \:temp\empty
        \:warning{tabular within math?}\fi \let\:@tabular:|=\empty'
to allow dealing with

\Verbatim
\documentclass{article}%
\begin{document}

\catcode`\:=11


\def\fff#1{\immediate
   \write16{....[#1]..........\the\everymath}%
%   \write16{....[#1]..........\meaning\a:mth}%
%  \immediate   \write16{.............\meaning\PicMath }%   
}

\ifx \Configure\UnDef\else
   \Configure{$}{\PicMath}{\EndPicMath}{}
\fi

\fff{}
$A$

\begin{tabular}{l}
$C$
\begin{tabular}{l}%
$D$
\end{tabular}
\end{tabular}


$
\begin{array}{l}
$C$
\begin{tabular}{l}%
$D$
\end{tabular}
\end{array}
$


\end{document}
\EndVerbatim\EndHPage{}]\fi



\<fix for tabular\><<<
\def\:@tabular:{\expandafter\everymath
  \expandafter{\expandafter \everymath \expandafter{\the\everymath}}}%
>>>






  

\<latex.ltx\><<<
|<html latex halign|>
\:CheckOption{new-accents}     \if:Option \else
   |<latex accents|>
\fi
>>>

Do we also  want \''\add@accent' redefined to
\`'\def\add@accent#1#2{{\accent#1 #2}}'.






\<latex.ltx\><<<
      \pagestyle{empty}  \def\pagestyle#1{}   
                         \def\thispagestyle#1{}
      \def\ps@plain{}
      \setlength\oddsidemargin   {0in}
      \setlength\evensidemargin  {0in}
>>>

\Chapter{Display-Paragraph Environments of LaTeX}






Environments to consider: quote, quotation, verse, center, flushleft,
flushright, tabarray (tabular/array), tabbing, and verbatim. The
last two may be combined into quote or quotations. With the exeption of
the last two, they are all displayed-paragraph environments (C.5 in LaTeX).


The above environments are built on top of \''\list...\endlist' and
\''\trivlist...\endtrivlist' in LaTeX, and there we impose the html
code.  That is, we use \''\Configure{lists}' that is common to both
constructs.



















\ifHtml[\HPage{test data}\Verbatim
\documentstyle{article}

 \input tex4ht.sty \Preamble{html,fonts}
        \begin{document}
     \EndPreamble



\begin{verse}
=============

(P)=============
\end{verse}

\begingroup \verse
=============
\endverse  \endgroup

...................
\begin{verse}
=============
\end{verse}
.............

(P)................

(P)...................
\begin{verse}
=============
\begin{verse}
+=============

+(P)=============
\end{verse}

\begingroup \verse
+=============
\endverse  \endgroup

+...................
\begin{verse}
+=============
\end{verse}
+.............

+(P)................

+(P)...................
\begin{verse}
+=============
\end{verse}
+.............


\end{verse}
.............

\end{document}
\EndVerbatim\EndHPage{}]\fi


\ifHtml[\HPage{more}\Verbatim
>   - More serious is that the verse and quote environments are still
> centered in Powerbrowser. 

The reason is probably that Powerbrowser does not recognize the
property WIDTH="1" in <TD>, a feature that should be legal in html 3.2.

> The html output for my address, for example,
> looks like this:
> 
>   <TABLE
>   WIDTH="100%" CELLPADDING="0" CELLSPACING="15"><TR><TD
>   WIDTH="1"></TD><TD
>   >
> 
>        XX XX<BR>
>        XX<BR>
>        XX xx<BR>
>        The xx<BR>
>        email: <A HREF="mailto:xx@xx.nl">xx@xx.xx</A>
>   </TD></TR></TABLE>
> 
> If I remove the ``WIDTH="100%"'' from the table tag, this is fixed,
> without breaking anything in MSIE or Netscape.

Once you remove the WIDTH property, the width of the table is
determined by its content instead of the page dimension.  This
can cause adversary conditions for nested environments.

For instance

   \documentstyle{article}
   
   \input tex4ht.sty \Preamble{html}  \begin{document}   \EndPreamble
   
   \begin{quote}
   The buck stops here.
   \begin{flushleft}1\\123\\12345\end{flushleft}
   \begin{flushright}1\\123\\12345\end{flushright}
   \end{quote}
   
   \end{document}

creates the outcome

   +-------------------------------------------------------+
   | The buck stops here.                                  |
   |       1                                               |
   |       123                                             |
   |       12345                                           |
   |                                                       |
   |                                                     1 |
   |                                                   123 |
   |                                                 12345 |
   +-------------------------------------------------------+

which translates to the following one when the WIDTH property 
is removed.

   +-------------------------------------------------------+
   | The buck stops here.                                  |
   |       1                                               |
   |       123                                             |
   |       12345                                           |
   |                                                       |
   |                    1                                  |
   |                  123                                  |
   |                12345                                  |
   +-------------------------------------------------------+

\EndVerbatim\EndHPage{}]\fi




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Tables of Contents}


\Section{Modifying LaTeX Macros}



\<article et al tocs\><<<
\def\tableofcontents{%
   \ifx\contentsname\empty \else
      \ifx\contentsname\:UnDef \else
         |<protect from TocAt|>\section*{\contentsname}%
         |<end protect from TocAt|>%
   \fi\fi
   \:tableofcontents}
>>>



\<book et al tocs\><<<
\def\tableofcontents{%
   \ifx\contentsname\empty \else
      |<protect from TocAt|>\chapter*{\contentsname}%
      |<end protect from TocAt|>%
   \fi
   \:tableofcontents}
>>>


Without the following, the chapter*/section* introduces
the cutat configuration for the  \''\tableofcontents' 

\<protect from TocAt\><<<
%
>>>

\<end protect from TocAt\><<<
%
>>>



\<html latex tocs\><<<
\edef\:TOC{%
   \noexpand\ifx [\noexpand\:temp  
      \noexpand\expandafter\noexpand\:TableOfContents
   \noexpand\else 
      \noexpand\Auto:ent{|<entries for latex tocs|>}%
   \noexpand\fi}
|<latex et al tocs|>
>>>

\<latex et al tocs\><<<
\def\:tableofcontents{\futurelet\:temp\:TOC}
\def\Auto:ent#1{%
   \edef\auto:toc{\noexpand\:TableOfContents[\ifx \auto:toc\:UnDef
      #1\else \auto:toc \fi]}  \auto:toc
   \global\let\auto:toc|=\:UnDef }
>>>









\<html /addcontentsline\><<<
\def\addcontentsline#1#2#3{\if@filesw \begingroup
   \no:lbl:idx  \let\protect\@unexpandable@protect  
   \@temptokena{\thepage}%
   |<revised /addcontentsline|>\@tempa
   \if@nobreak \ifvmode\nobreak\fi\fi\endgroup\fi}
>>>

The redefinition of \''\addcontentsline' should preserve vertical mode.
The following is the modification to the original def.  



\<revised /addcontentsline\><<<
\def\:tempb{#1}\def\:tempa{toc}%
\ifx \:tempb\:tempa
  |<addcontentsline html addr|>%
  \hbox{\Link{}{\:tempb}\EndLink}%
  \edef\@tempa{|<add contents line|>}%
\else
 |% \gHAdvance\TitleCount by 1|%%
 |<non-toc addcontentsline html addr|>%
  \hbox{\Link{}{|<haddr prefix|>\last:haddr}\EndLink}%
  \edef\@tempa{|<add non-toc contents line|>}%
\fi
>>>



\<non-toc addcontentsline html addr\><<<
\html:addr
>>>


\<add non-toc contents line\><<<
\csname if:toc\endcsname{\the\:tokwrite{\string\doTocEntry
    \string\toc#1{}{\string\csname\space a:TocLink\string\endcsname
   {\FileNumber}{|<haddr prefix|>\last:haddr}{}{#3}}{\the\@temptokena}\relax}}%
>>>



\<add contents line\><<<
\csname if:toc\endcsname{\the\:tokwrite{\string\doTocEntry
    \string\toc#2{}{\string\csname\space a:TocLink\string\endcsname
   {\FileNumber}{\:tempb}{}{#3}}{\the\@temptokena}\relax}}%
>>>






In the above link,

\List{disc}

\item Originally we didn't have a file name in \`'[...]',
and it caused a problem in parent-children relationships.  
So we introduced  
Without \`'[\RefFileNumber\FileNumber]' the cross link
is not recognized in parents-childred relationships.
\item Then it turned out that some
browsers reload the current page if the file name is mentioned,
so we removed the reference to the page name 




\<addcontentsline html addr\><<<
\edef\:tempb{|<section html addr|>}%
>>>


Instead of



\<\><<<
\NewHaddr\:tempb
>>>


\item Do the parent-children relationships still work?

\EndList

\<add aux line\><<<
\write \@auxout{\string\@writefile{#1}{\protect
     \contentsline{#2}{#3}{\the\@temptokena}}}%
>>>

The command \''\addvspace' may appear at start of list of tables
and it must be reached in vertical mode (see list tables -- lot).






The following goes also into non-core latex.
Do we need \`' \Configure{cite}{}{}{}{}%' in the following?

\<html latex.ltx core\><<<
\def\@starttoc#1{%
  \begingroup
    \makeatletter 
    \def\:temp{#1}\def\:tempa{toc}%
    \ifx \:temp\:tempa
       \@input{\jobname.4ct}%
    \else
       \@input{\jobname.#1}%
       \if@filesw
         \expandafter\expandafter\csname
             newwrite\endcsname\csname tf@#1\endcsname
         \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
       \fi
    \fi
    \global\@nobreakfalse
  \endgroup}
>>>







\Section{Default Choice of Entries for TOC's}

\<entries for latex tocs\><<<
\ifnum \c@tocdepth >-2 part,\fi
\expandafter\ifx \csname @chapter\endcsname\relax 
   \ifnum \c@tocdepth >\z@  section,\fi
\else
   \ifnum \c@tocdepth >\m@ne chapter,appendix,\fi
   \ifnum \z@>\c@tocdepth\else section,\fi
   \ifnum 1>\c@tocdepth \else subsection,\fi
\fi
\ifnum 2>\c@tocdepth \else subsection,\fi
\ifnum 3>\c@tocdepth \else subsubsection,\fi
\ifnum 4>\c@tocdepth \else paragraph,\fi
\ifnum 5>\c@tocdepth \else subparagraph,\fi
UnDFexyz>>>




\Verbatim
The paper output looks like this:
The paper output looks like this:

  5  Miscellaneous
     5.1  Changing ...
     ...
     5.5  Timer quirks
  References

The MSIE and Netscape output looks like this:

  5 Miscellaneous
    5.1 Changing ...
    ...
    5.5 Timer quirks
    References
    About this document
\EndVerbatim


\<html latex tocs\><<<
\def\:tocs{\noexpand\:tableofcontents}
>>>




\Section{Extra entries to Toc}


\<html latex tocs\><<<
\pend:defIII\addcontentsline{%
   \def\:temp{##1}\def\:tempa{toc}\ifx \:temp\:tempa
   \gHAdvance\TitleCount  1 \fi }
>>>


\Section{Configurations}


\<config latex.ltx utilities\><<<
\NewConfigure{tableofcontents}{5}
>>>

















%%%%%%%%%%%%%%%%%%
\Chapter{Content in Margins}
%%%%%%%%%%%%%%%%%%





%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Margin Notes}
%%%%%%%%%%%%%%%%%%%%%%%%%%


\<more html latex\><<<
\def\marginpar{\@ifnextchar [\:xmpar{\:xmpar[]}}
\long\def\:xmpar[#1]#2{\a:marginpar{#2}\b:marginpar}
>>>

\<config latex.ltx utilities\><<<
\NewConfigure{marginpar}{2}
>>>



\ifHtml[\HPage{more}\Verbatim

Nope. DIV is not the one to use. Alan, if you know TeX, think
\marginpar{...}. I want to stuff a box somewhere, linked to the location in
the text where the item appears. I don't want to break the text that
contains the material in question. Now Mr. Freedom X, recall that while a
box inline is not recommended in HTML 4, it isn't illegal, either. I'm not
talking SGML here, Alan.


http://www.indrev.com<STYLE TYPE="text/css">
P {border: red   solid }
body {border: blue   solid 1em }
BODY {
      margin-left:20%;
      margin-right:20%;
      text-align:justify;
      }
.leader {
         width:10em;
         float:left;
         color:blue;
         text-align:left;
         }
.leader1 {
         width:10em;
         float:left;
         color:blue;
         text-align:left;
         padding-top:1em;
         }
.in {text-indent:3em}
.center {text-align:center}
</STYLE>

<SPAN class=leader>Right of nature what.</SPAN>The 
right of nature,</SPAN>  which writers commonly call <EM>jus
naturale,</EM> is the liberty each man hath to use his own power as he
will himself for the preservation of his own nature&mdash;that is to
<P><SPAN class=leader>Liberty what.</SPAN>
 to the proper signification of the word, the absence of external impediments; which impediments may oft take away part of a man's power to do what he would, but cannot hinder him from using the power left him according as his judgement and reason shall dictate to him.
 and law, <SPAN class=leader1>Difference of right and law.</SPAN>yet they ought to be distinguished, because right consists in liberty to do, or to forbear; whereas law determines and binds to one of them: so that law and right differ as much as obligation and liberty, which in one and the same matter are inconsistent. 



\EndVerbatim\EndHPage{}]\fi



%%%%%%%%%%%%%%%%%%
\Section{Picture Insertions}
%%%%%%%%%%%%%%%%%%



\<picins.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% picins.4ht                            |version %
% Copyright (C) |CopyYear.2005.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<picins configs|>
\Hinput{picins}
\endinput
>>>        \AddFile{9}{picins}

\<picins configs\><<<
\def\ivparpic(#1,#2)(#3,#4)[#5][#6]#7{%
   \old@par
   \def\xxx{(#1,#2)(#3,#4)[#5][#6]#7}%
   \hshow{xxx}%
   \IgnorePar\EndP\HCode{<div class="picins-#5">}
   #7%
   \ifvmode \IgnorePar\fi \EndP \HCode{</div>}\old@par
}
>>>



%%%%%%%%%%%%%%%%
\Chapter{Other}
%%%%%%%%%%%%%%%%

\Section{Lost Spaces}


The following has the definition \''\def\@{\spacefactor\@m}' in latex,
and it causes  a loss of spaces in tex4ht.

\<more html latex\><<<
\let\@|=\empty
>>>

\Section{Accents}



The following is for 
\`'/n/candy/0/tex/teTeX/texmf/tex/latex/base/inputenc.sty'
and files like 
\`'/n/candy/0/tex/teTeX/texmf/tex/latex/base/latin1.def'.


\<latex accents\><<<
\let\:tabacckludge|=\@tabacckludge
\def\@tabacckludge#1{\csname #1\endcsname}
\long\def\:temp#1{\bgroup  \let\@tabacckludge|=\:tabacckludge
   \csname o:MakeUppercase :\endcsname{#1}\egroup}
\expandafter\HLet\csname MakeUppercase \endcsname|=\:temp
\long\def\:temp#1{\bgroup  \let\@tabacckludge|=\:tabacckludge
   \csname o:MakeLowercase :\endcsname{#1}\egroup}
\expandafter\HLet\csname MakeLowercase \endcsname|=\:temp
>>>




\Verbatim

> Really, [latin1] redefines "=E1" as {\@tabacckludge'a}, and TeX4ht is
> not compatible with this. But this is a minor problem: hacking the
> file latin1.def I can change {\@tabbackludge'a} for {\'a}, whith lends
> to a correct output with TeX4ht (an even in a normal compilation under
> LaTeX).

I redefined \@tabacckludge to handle the problem for TeX4ht.  I don't
yet fully understand the purpose of \@tabacckludge, but I guess that
changing latin1.def will cause font problems in standard mode.
\EndVerbatim


\ifHtml[\HPage{more}\Verbatim
 \documentclass{article}
 \usepackage[latin1]{inputenc}

\input tex4ht.sty
\Preamble{html}

\begin{document}

\EndPreamble

\catcode`\@=11

\string Z {\@tabacckludge'Z} /// 

{\string \i {\@tabacckludge`\i} /// 

ü              252

ý             253

\end{document}

\EndVerbatim\EndHPage{}]\fi



\Verbatim

> I send to you my ..... file attached, but in order to test it
> you'll ned an instalation of the EC fonts. These fonts, as you
> probably know, are an extension of the Computer Modern fonts, with 256
> characters which include all the accented letters (tha are usual in
> european languages). For using these fonts it is only required to:
> 
> \usepackage{t1enc}
> 
> Automagically, when you use in your document \'a, this generates in
> the .dvi a character with code 225, instead of putting an accent over
> the character code 97 (a), as in the Computer Modern font. This is an
> advantage for hyphenating words containing accented characters. TeXht
> redefines this behaviour, but I guess that this is not important,
> since in HTML words are not hyphenated.
> 
> In addition I use \usepackage[latin1]{inputenc}, in order to make the
> typing less painful. With this package I can type "=E1", and this letter
> is translated to \'a (which in turn is translated in a single
> character code if you use the EC fonts).=20

\EndVerbatim

\ifHtml[\HPage{nedd to be fixed}\Verbatim
 \documentclass{book}

%  \usepackage[latin1]{inputenc}
  \usepackage{t1enc}

\input tex4ht.sty
\Preamble{html}

\begin{document}

\EndPreamble

\def\x{ ü (252)  ý   (253)}

% --------------------------------

\x   ========
\Picture*{} \x \EndPicture{}

\end{document}


\EndVerbatim\EndHPage{}]\fi


LaTeX temporarily reassigngs other meaning in tables and elsewhere  
to \'=\``=, \'+\=+, and \'+\``+.  Make sure that the followin
appear after their redefinition in TeX4ht so that they will carry 
the desired meaning.


\<latex accents\><<<
\let\@acci|=\' \let\@accii|=\` \let\@acciii|=\=
>>>




\<latex accents\><<<
\def\a#1{%
   \if '#1\let\:temp=\@acci   \else
   \if `#1\let\:temp=\@accii  \else
   \if =#1\let\:temp=\@acciii \else
      \def\:temp{\@tabacckludge#1}\fi\fi\fi
   \:temp}
>>>

The \'\a' command is a compensantion for the missing cases of
\'=\``=, \'+\=+, and \'+\``+  used as
\'=\a``=, \'+\a=+, and \'+\a``+, respectively. In LaTeX
it is defined to equal \''\@tabacckludge'.









\Section{List-Tocs of Figures and Tables}




The following is for the list of figures/tables.

\<html latex tocs\><<<
\def\@dottedtocline#1#2#3#4#5{\hbox{\def\numberline##1{\e:listof
                ##1\f:listof}\c:listof#4\d:listof}\ignorespaces}
>>>


The added \''\par' after \''\a:listof' is to avoid problems in an
environment that should be entered in vertical mode, at least for
the case of \''\addvspace'.

% \@ifclassloaded{amsproc}{\:Optionfalse}{\:Optiontrue}
% \@ifclassloaded{amsbook}{\:Optionfalse}{}
%  \@ifclassloaded{amsart}{\:Optionfalse}{}
% \if:Option 



\<html latex tocs\><<<
\def\@starttoc#1{%
  \begingroup
    \makeatletter   \Configure{cite}{}{}{}{}%
    \def\:temp{#1}\def\:tempa{toc}%
    \a:listof\par
    \@input{\jobname.\ifx \:temp\:tempa 4ct\else #1\fi}%
    \b:listof
    \if@filesw
      \expandafter\expandafter\csname
          newwrite\endcsname\csname tf@#1\endcsname
      \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
    \fi
    \global\@nobreakfalse
  \endgroup}
>>>


Was \`'\pend:defI\@starttoc{\par}'



\SubSection{Configurations}



The  following is for book.cls, article.cls,...


\<config book-report-article shared\><<<
\NewConfigure{listof}{6}  
>>>





%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{/input Command}
%%%%%%%%%%%%%%%%%%%%%%%%%

\<more html latex\><<<
\pend:defI\@iinput{\egroup}
\let\o:iinput:|=\@iinput
\def\@iinput{\bgroup \catcode`\_=12 \o:iinput:}
>>>

\<more html latex\><<<
\def\:tempc{\bgroup \catcode`\_=12 \la:include}
\def\la:include#1{\egroup \o:include:{#1}}
\HLet\include\:tempc
>>>




\Section{Fonts (latex.ltx + fontmath.4ht)}








\<fontmath.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% fontmath.4ht                          |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<config fontmath.ltx utilities|>
|<config fontmath.ltx shared|>
|<config fontmath|>
|<fontmath + plain classes|>
|<over/under fontmath|>
\Hinput{fontmath}
\endinput
>>>        \AddFile{2}{fontmath}





\<fontmath + plain classes\><<<
|<plain, fontmath, amsmath, amstex|>
|<plain, fontmath, amstex|>
>>>





% fontmath.ltx:\DeclareMathAlphabet      {\mathit}{OT1}{cmr}{m}{it}
% fontmath.ltx:\SetMathAlphabet\mathit{bold}{OT1}{cmr}{bx}{it}
% 
% latex209.def:\let\mathit\undefined
% latex209.def:\DeclareSymbolFontAlphabet\mathit{italic}
% 
% oldlfont.sty:\let\mathit\undefined
% oldlfont.sty:\DeclareSymbolFontAlphabet\mathit{italic}




Fonts can create problems in edef environments. The following
definition is to get protection in titles taht go to the top of
hypertext pages.  The \`'\text...' belong to latex.ltx.

\<config fontmath.ltx utilities\><<<
\def\:same#1{#1}
\def\no:fonts{\more:no  \let\protect\@unexpandable@protect }
\def\more:no{%
   \let\footnote|=\:gobble \let\ |=\space
 }
>>>



Definitions like \Verb'\def\mathbf#1{\a:mathbf#1\b:mathbf}'
must take care of commands like \Verb'\bf'.  The latter 
commands in effect tranform the  \Verb'\mathbf' commands into
old fashion  \Verb'$\bf R$'.

\<config fontmath.ltx shared\><<<
\def\choose:mfont#1{\ifx \math@bgroup \relax
     \expandafter\old:mfont
   \else
     \expandafter\new:mfont
   \fi  
   {#1}}
\def\old:mfont#1{\csname o:@#1:\endcsname}
\def\new:mfont#1#2{%
      \csname a:#1\endcsname
      \csname o:@#1:\endcsname
  {#2}\csname b:#1\endcsname   
}    
\def\:tempd#1{%
   \def\:tempc{\choose:mfont {#1}}
   \expandafter\HLet\csname @#1\endcsname|=\:tempc
   \NewConfigure{#1}{2}%
}
\:tempd{mathbf}
\:tempd{mathrm}
\:tempd{mathsf}
\:tempd{mathit}
\:tempd{mathtt}
>>>


The \Verb+\csname mv@\math@version \endcsname+ showas the installed 
math macros. The following modification might also become handy.

\Verbatim
\def\install@mathalphabet#1{%
  \expandafter\ifx \csname o:\expandafter\:gobble\string #1:\endcsname\relax
     \:warning{\expandafter\:gobble\string #1 not configured}%
     \expand:after{\gdef#1}%
  \else
     \expand:after{\expandafter\gdef\csname o:\expandafter
         \:gobble\string #1:\endcsname}%
  \fi
}
\EndVerbatim

\Verbatim

The issue of font decoration in math is currently problematic.   

*  In unicode, decorated symbols get distinguished codes if 
   the decoration implies special math meaning.  Consequently,
   symbols with `meaningful' decorations should be embedded 
   in decorated unicode entries, whereas `meaningless' decorations
   should be set through style sheets (e.g., css or xslt). 

*  The behavior of latex doesn't seem to always be meaningful, for
   instance, \mathbf in the following example.

     \documentclass{amsart}
        \RequirePackage{bm}
     \begin{document}
     
       \def\x{ A + \alpha + \Delta }
     
       $ \x            $ \par       % none in bold
       $ \bm{ \x }     $ \par       % all in bold
       $ \mathbf{ \x } $            % just A and Delta in bold
     
     \end{document}
     
*   The decorations by \bm, I think, should be considered meaningless.
    Currently they can't be realized through style sheets, because the
    browsers don't seem to support such capabilities for mathml.

*   A few cases, like \mathbb, seem to have `meaningful' decorations.
    So tex4ht tries to implement these decorations.
\EndVerbatim


\<config latex.ltx shared\><<<
\NewConfigure{texttt}[2]{\expandafter\ifx \csname o:texttt :\endcsname\relax
  \long\def\:temp##1{{\a:texttt \csname o:texttt :\endcsname{##1}\b:texttt}}%
  \expandafter\HLet\csname texttt \endcsname|=\:temp  
  \fi \c:def\a:texttt{#1}\c:def\b:texttt{#2}}
\NewConfigure{textit}[2]{\expandafter\ifx \csname o:textit :\endcsname\relax
  \long\def\:temp##1{{\a:textit \csname o:textit :\endcsname{##1}\b:textit}}%
  \expandafter\HLet\csname textit \endcsname|=\:temp  
  \fi \c:def\a:textit{#1}\c:def\b:textit{#2}}
\NewConfigure{textrm}[2]{\expandafter\ifx \csname o:textrm :\endcsname\relax
  \long\def\:temp##1{{\a:textrm \csname o:textrm :\endcsname{##1}\b:textrm}}%
  \expandafter\HLet\csname textrm \endcsname|=\:temp  
  \fi \c:def\a:textrm{#1}\c:def\b:textrm{#2}}
\NewConfigure{textup}[2]{\expandafter\ifx \csname o:textup :\endcsname\relax
  \long\def\:temp##1{{\a:textup \csname o:textup :\endcsname{##1}\b:textup}}%
  \expandafter\HLet\csname textup \endcsname|=\:temp  
  \fi \c:def\a:textup{#1}\c:def\b:textup{#2}}
\NewConfigure{textsl}[2]{\expandafter\ifx \csname o:textsl :\endcsname\relax
  \long\def\:temp##1{{\a:textsl \csname o:textsl :\endcsname{##1}\b:textsl}}%
  \expandafter\HLet\csname textsl \endcsname|=\:temp  
  \fi \c:def\a:textsl{#1}\c:def\b:textsl{#2}}
\NewConfigure{textsf}[2]{\expandafter\ifx \csname o:textsf :\endcsname\relax
  \long\def\:temp##1{{\a:textsf \csname o:textsf :\endcsname{##1}\b:textsf}}%
  \expandafter\HLet\csname textsf \endcsname|=\:temp  
  \fi \c:def\a:textsf{#1}\c:def\b:textsf{#2}}
\NewConfigure{textbf}[2]{\expandafter\ifx \csname o:textbf :\endcsname\relax
  \long\def\:temp##1{{\a:textbf \csname o:textbf :\endcsname{##1}\b:textbf}}%
  \expandafter\HLet\csname textbf \endcsname|=\:temp  
  \fi \c:def\a:textbf{#1}\c:def\b:textbf{#2}}
\NewConfigure{textsc}[2]{\expandafter\ifx \csname o:textsc :\endcsname\relax
  \long\def\:temp##1{{\a:textsc \csname o:textsc :\endcsname{##1}\b:textsc}}%
  \expandafter\HLet\csname textsc \endcsname|=\:temp  
  \fi \c:def\a:textsc{#1}\c:def\b:textsc{#2}}
\NewConfigure{emph}[2]{\expandafter\ifx \csname o:emph :\endcsname\relax
  \long\def\:temp##1{{\a:emph \csname o:emph :\endcsname{##1}\b:emph}}%
  \expandafter\HLet\csname emph \endcsname|=\:temp  
  \fi \c:def\a:emph{#1}\c:def\b:emph{#2}}
>>>


\<base fonts\><<<
\def\:temp#1#2|<par del|>{\def\:temp{#1}}
\expandafter\:temp\usepackage|<par del|>
\def\:tempa{\@latex@e@error}
\ifx \:temp\:tempa \else
   |<not latex209 base fonts|>
\fi
>>>

\<not latex209 base fonts\><<<
\def\:tempa#1#2#3#4{\tmp:toks{#1{#2}}%
   \long\expandafter\edef\csname #4 \endcsname{\the\tmp:toks
        {\expandafter\noexpand
   \csname o:\expandafter\:gobble\string #3:\endcsname}}}
\def\:temp#1{%
  \expandafter\ifx \csname #1 \endcsname\relax\else
     \expandafter\expandafter\expandafter\:tempa\csname #1 \endcsname{#1}%
  \fi
}
\:temp{rm}
\:temp{sf}
\:temp{tt}
\:temp{bf}
\:temp{it}
>>>

\<book / report / article\><<<
|<base fonts|>
>>>

\<ams art + book + proc\><<<
|<base fonts|>       
>>>


The else part is for compabibility when the \`'fonts' option is 
inactive.



\ifHtml[\HPage{comment}\Verbatim
you probably don't want the `fonts' in \Preamble.  It is an ugly, and
not 100% safe, creature left over from the time fonts got their
support just from the from the .sty files.  Now the support comes from
tex4ht.c, based on the font information available in the dvi files.

\EndVerbatim\EndHPage{}]\fi









\Section{Hfonts}



\ifHtml[\HPage{test data}\Verbatim

\documentclass{article}

\input tex4ht.sty
\Preamble{html,3,next,fonts}
\begin{document}
\EndPreamble

The mathit needs a, preferable built-in, Protect.

\section{What is $\mathit{mathit}$?}

section one.

$\mathit{NONE-mathit}$\par
$\mathrm{NONE-mathrm}$\par
$\mathsf{NONE-mathsf}$\par
$\mathbf{NONE-mathbf}$\par
$\mathtt{NONE-mathtt}$\par
\par
\textbf{NONE-textbf}\par
\textit{NONE-textit}\par
\textrm{NONE-textrm}\par
\textsc{NONE-textsc}\par
\textsf{NONE-textsf}\par
\textsl{NONE-textsl}\par
\texttt{NONE-texttt}\par


\section{What is \textit{textit}?}

test


\end{document}

\EndVerbatim\EndHPage{}]\fi

How about the following ones?

\`'
\DeclareTextFontCommand{\textnormal}{\normalfont}
\DeclareTextFontCommand{\textmd}{\mdseries}
\DeclareTextFontCommand{\textup}{\upshape}
\DeclareTextFontCommand{\emph}{\em}'



\ifHtml[\HPage{why the extra x? in latex}\Verbatim

\Draw  \Large \baselineskip=0.8\baselineskip
   \TreeSpec(n,\Node & r,\SRectNode)()()
   \TreeAlign(H,-1,0)(0,0,0)
   \MinNodeSize(1,30)
\TreeSpace(S,30,10)  \NodeMargin(5,10)
\Tree()(
   1,n,s~~o~~u~~r~~c~~e//
   1,r,{TeX} //
   1,n,d\strut~~v\strut~~i\strut //
   2,r,{tex4ht} //
   0,n,{h\rlap{tml}}
   & 1,n,i\strut~~v\strut~~d\strut  //
   1,r,{dvi}~~{to}~~{gif}//
   0,n,g~~i~~f//
)
\EndDraw
\EndVerbatim\EndHPage{}]\fi










\SubSection{Parbox}

Hide an artificial  math.

\<latex math\><<<
\long\def\:temp#1#2[#3]#4#5{%
  \leavevmode
  \@pboxswfalse
  \setlength\@tempdima{#4}%
  \@begin@tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}%
    \ifx|<new @iiiparbox|>#2\else
    \ifx|<old @iiiparbox|>#2\else
      \setlength\@tempdimb{#2}%
      \def\@parboxto{to\@tempdimb}%
    \fi\fi
     \def\v:TBL{#1}%
    \if#1b\vbox
    \else\if #1t\vtop
    \else\ifmmode\vcenter
    \else\@pboxswtrue |<hide parbox math|>$\vcenter
    \fi\fi\fi
    \@parboxto{\let\hss\vss\let\unhbox\unvbox
       \csname bm@#3\endcsname}%
    \if@pboxsw \m@th$\fi
  \@end@tempboxa}
\HLet\@iiiparbox|=\:temp
>>>

\<hide parbox math\><<<
\expandafter\everymath\expandafter{\expandafter
           \everymath\expandafter{\the\everymath}}%
>>>

\<old @iiiparbox\><<<
\@empty >>>


\<new @iiiparbox\><<<
\relax >>>


\Chapter{latex209.def}





\<latex209.4ht\><<<
\let\:fnsymbol\@fnsymbol
\def\@fnsymbol#1{{\hbox{$\:fnsymbol{#1}$}}}
\Hinput{latex209}
>>>        \AddFile{5}{latex209}



         
\Chapter{Sectioning Commands}


   




\ifHtml[\HPage{more}\Verbatim

 >   (5.5.2.1) "likesection" instead of "section*"? Technically I don't
 > see offhand why this non-intuitive substitution should be necessary.

I always hated this part, and I hope I'll have enough time to fix it
before the text will go out of my hand for publication.
(Historically, I introduced the \like... commands to save the users
employing code like \expandafter\foo\csname ...*\endcsname.  I suspect
that historical reason is not valid anymore.)

-eitan

CAN'T, e.g., :

\Css{.sectionHead, .likesectionHead {
   text-align:right;
   font-family: cursive;
   border-bottom:solid 2px; }}

\EndVerbatim\EndHPage{}]\fi


\Section{Parts}

\<book / report / article\><<<
\ifx \part\:UnDef\else  
   |<html late parts|>
\fi
>>>


\<html late parts\><<<
\def\@part[#1]#2{%
    \ifnum \c@secnumdepth >-2\relax
      \SkipRefstepAnchor \refstepcounter{part}%
      \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
    \else
      \addcontentsline{toc}{part}{#1}%
    \fi
    \csname @endpart\endcsname}
>>>

The \''\@endpart' is not defined for \`'article' class.

The above is LaTeX's def without the output of titles.

\<html late parts\><<<
\let\:tempb|=\part
\Def:Section\part{\thepart}{#1} 
\let\:part|=\part
\let\part|=\:tempb
\let\no@part|=\@part
\def\@part[#1]#2{%
   {\let\addcontentsline|=\:gobbleIII\no@part[#1]{}}%
   \HtmlEnv   \Toc:Title{#1}\:part{#2}}
>>>


\<html late parts\><<<
\Def:Section\likepart{}{#1} 
\let\:likepart|=\likepart
\let\likepart|=\:UnDef
\let\no@spart|=\@spart
\def\@spart#1{%
   {\let\addcontentsline|=\:gobbleIII\no@spart{}}%
   \HtmlEnv   \:likepart{#1}}
>>>






\SubSection{Configurations}









\Verbatim
\renewcommand\thesubsubsection {\thesubsection .\arabic{subsubsection}}
\renewcommand\theparagraph     {\thesubsubsection.\arabic{paragraph}}
\renewcommand\thesubparagraph  {\theparagraph.\arabic{subparagraph}}
\EndVerbatim






\Section{Chapters, Appendixes, and Like Chapters}


We can test for \''\@chapter', but not fo   \''\chapter', to
check whether the unit exists. fancyheadings.sty
changes the latter into \''\relax'.








\<chapters for book / report\><<<
\let\:tempb|=\chapter
\Def:Section\chapter{\thechapter}{#1} 
\let\:chapter|=\chapter
\let\chapter|=\:tempb
\def\@makechapterhead#1{}
\let\no@chapter|=\@chapter
\def\@chapter[#1]#2{%
   |<adjust minipageNum for setcounter footnote 0|>%
   {\SkipRefstepAnchor \let\addcontentsline|=\:gobbleIII\no@chapter[#1]{}}%
   \HtmlEnv   \Toc:Title{#1}\:chapter{#2}}
>>>

\<chapters for book / report\><<<
\Def:Section\likechapter{}{#1} 
\let\:likechapter|=\likechapter
\let\likechapter|=\:UnDef
\let\no@schapter|=\@schapter
\def\@schapter#1{%
   {\let\addcontentsline|=\:gobbleIII\no@schapter{}}%
   \HtmlEnv   \:likechapter{#1}}
>>>


\<chapters for book / report\><<<
\let\no@appendix|=\appendix
\Def:Section\appendix{\thechapter}{#1} 
\let\:appendix|=\appendix
\def\appendix{%
   \def\@chapter[##1]##2{%
      |<adjust minipageNum for setcounter footnote 0|>%
      {\def\addcontentsline####1####2####3{}\no@chapter[##1]{}}%
      \HtmlEnv \Toc:Title{##1}\:appendix{##2}}%
   \no@appendix}
>>>


\<html latex divs\><<<
\def\Toc:Title#1{\gdef\TocTitle{#1}%
  \ifx\TocTitle\empty \global\let\TocTitle|=\:UnDef\fi}
>>>


If defined, the \''\TocTitle' carries  the info in the
square brackets of \`'\@chapter[##1]##2{...',
\`'\@section[##1]##2{...', etc.








\Verbatim
> I discovered that TeX4ht uses some literal strings, like "Chapter"
> for the name of the chapters. This causes an incompatibility with
> the package Babel (for typesetting documents in other languages than
> english). LaTeX uses the command \chaptername for storing the string
> "Chapter", and babel redefines this command in a convenient way for
> each language (in spanish, \chaptername is "Cap\'{\i}tulo"). Since
> TeX4ht does not use the \chaptername, its output is always
> "Chapter", which is inconvenient for non-english users. I don't know
> if TeX4ht uses other literal strings, I only noticed this one.
\EndVerbatim

\ifHtml[\HPage{more}\Verbatim
book.cls:\newcommand\contentsname{Contents}
book.cls:\newcommand\listfigurename{List of Figures}
book.cls:\newcommand\listtablename{List of Tables}
book.cls:\newcommand\bibname{Bibliography}
book.cls:\newcommand\indexname{Index}
book.cls:\newcommand\figurename{Figure}
book.cls:\newcommand\tablename{Table}
book.cls:\newcommand\partname{Part}
book.cls:\newcommand\chaptername{Chapter}
book.cls:\newcommand\appendixname{Appendix}
\EndVerbatim\EndHPage{}]\fi


\Section{Sections and Like Sections}


\<book / report / article\><<<
\ifx \section\:UnDef\else  
   |<html late sections|>
\fi
>>>

\<html late sections\><<<
\let\no@section|=\section
\Def:Section\section{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesection \fi}{#1} 
\let\no:section|=\section
\def\section{\rdef:sec{section}}
\Def:Section\likesection{}{#1} 
\let\:likesection|=\likesection
\let\likesection|=\:UnDef
>>>


\SubSection{Configurations}







%\Configure{sectionTITLE+}{\ifnum \c:secnumdepth>\c@secnumdepth
%    \else \thesection \space \fi#1}




\Section{SubSections}








\<book / report / article\><<<
|<subsections for book / report / article|>
>>>

\<subsections for book / report / article\><<<
\let\no@subsection|=\subsection
\Def:Section\subsection{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesubsection \fi}{#1}
\let\no:subsection|=\subsection
\def\subsection{\rdef:sec{subsection}}
\Def:Section\likesubsection{}{#1} 
\let\:likesubsection|=\likesubsection
\let\likesubsection|=\:UnDef
>>>



\SubSection{Configurations}



% \Configure{subsectionTITLE+}
%   {\ifnum \c:secnumdepth>\c@secnumdepth
%    \else \thesubsection \space \fi#1}









\Section{SubSubSections}




\<book / report / article\><<<
|<subsubsections for book / report / article|>
>>>

\<subsubsections for book / report / article\><<<
\let\no@subsubsection|=\subsubsection
\Def:Section\subsubsection{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesubsubsection \fi}{#1}
\let\no:subsubsection|=\subsubsection
\def\subsubsection{\rdef:sec{subsubsection}}
\Def:Section\likesubsubsection{}{#1} 
\let\:likesubsubsection|=\likesubsubsection
\let\likesubsubsection|=\:UnDef
>>>




\SubSection{Configurations}

\`'<H5>' might use too small chars







% \Configure{subsubsectionTITLE+}
%   {\ifnum \c:secnumdepth>\c@secnumdepth
%    \else \thesubsubsection \space \fi#1}








\Section{Paragraphs and Sub-Paragraphs}




\<book / report / article\><<<
|<paragraphs for book / report / article|>
>>>

\<paragraphs for book / report / article\><<<
\let\no@paragraph|=\paragraph
\Def:Section\paragraph{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \theparagraph \fi}{#1}
\let\no:paragraph|=\paragraph
\def\paragraph{\rdef:sec{paragraph}}
\Def:Section\likeparagraph{}{#1} 
\let\:likeparagraph|=\likeparagraph
\let\likeparagraph|=\:UnDef
>>>



\<paragraphs for book / report / article\><<<
\let\no@subparagraph|=\subparagraph
\Def:Section\subparagraph{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesubparagraph \fi}{#1}
\let\no:subparagraph|=\subparagraph
\def\subparagraph{\rdef:sec{subparagraph}}
\Def:Section\likesubparagraph{}{#1} 
\let\:likesubparagraph|=\likesubparagraph
\let\likesubparagraph|=\:UnDef
>>>


\SubSection{Configurations}


\<latex shared div config\><<<
\ifx\bf\:UnDef 
   \def\bf{\normalfont\bfseries}
\fi
>>>








\Section{Options 1, 2, 3 for LaTeX}




\''\:tempa' is everywhere, so we use it to conditionally call
to \''\tableofcontents' throug attachments points when tex4ht
any of the options is on.

\<latex options 1, 2, 3\><<<
\NewConfigure{tableofcontents*}[1]{%
   \def\:tempa{#1}\ifx\empty\:tempa
      \ifx \au:StartSec\:UnDef \else \gdef\:StartSec{\au:StartSec}\fi
   \else
      \edef\auto:toc{#1}%
         \ifx \au:StartSec\:UnDef
            \let\au:StartSec|=\:StartSec   
            \def\:StartSec{\:tableofcontents
               \global\let\auto:toc|=\:UnDef \:StartSec}%
            \pend:def\:tableofcontents{\gdef\:StartSec{\au:StartSec}}%
   \fi  \fi
}
>>>







%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Encodings}
%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%
\Section{t2benc}
%%%%%%%%%%%%%%%%%%


\<t2benc.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% t2benc.4ht                            |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\Hinput{t2benc}
\endinput
>>>        \AddFile{8}{t2benc}





%%%%%%%%%%%%%%%%%%
\Section{ot4enc}
%%%%%%%%%%%%%%%%%%


\<ot4enc.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% ot4enc.4ht                            |version %
% Copyright (C) |CopyYear.2005.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\Hinput{ot4enc}
\endinput
>>>        \AddFile{9}{ot4enc}




%%%%%%%%%%%%%%%%%%
\Section{pd1enc}
%%%%%%%%%%%%%%%%%%

\<pd1enc.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% pd1enc.4ht                            |version %
% Copyright (C) |CopyYear.2005.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\Hinput{pd1enc}
\endinput
>>>        \AddFile{9}{pd1enc}





%%%%%%%%%%%%%%%%%%%%%
\Section{inputenc}
%%%%%%%%%%%%%%%%%%%%%

\<inputenc.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% inputenc.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\def\temp#1{\o:IeC:{\protect#1}}
\HLet\IeC=\temp

\Hinput{inputenc}
\endinput
>>>        \AddFile{4}{inputenc}

Needed in, for instance, the definition \''\IeC {\^\i }' of \^i under
\''\edef'.




%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{More LaTeX}
%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{/listoffigures and /listoftables}
%%%%%%%%%%%%%%%%%%%%%%%%%%

\<html report, article, book\><<<
\let\:tempc|=\listoffigures
\pend:def\:tempc{\begingroup \a:listoffigures
   \def\@starttoc{\:tableofcontents[lof]\:gobble}}
\append:def\:tempc{\b:listoffigures \endgroup}
\HLet\listoffigures|=\:tempc
\let\:tempc|=\listoftables
\pend:def\:tempc{\begingroup \a:listoftables
   \def\@starttoc{\:tableofcontents[lot]\:gobble}}
\append:def\:tempc{\b:listoftables \endgroup}
\HLet\listoftables|=\:tempc
>>>

\<latex report,... shared config\><<<
\NewConfigure{listoffigures}{2} 
\NewConfigure{listoftables}{2}  
>>>







\Section{Newline and Vspace}

Latex uses vrule for vertical spaces within paragraph.  In orser
not to break paragraphs, we put line breaks.  So, for instance, 
centered paragraphs retain their shapes.


\`'\\[...]' and \''\\*[...]', in normal mode, are
 implied from \''\@xnewline', and in turn on \`'\newline' and \''\vspace'.
More recent definitions of latex rely on \''\@gnewline'.

\Verbatim
\documentclass{article}  
\begin{document}  
  
Try \\[1mm]| this.
  
\end{document}  
\EndVerbatim


\<latex 1999\><<<
\ifx \@gnewline\:UnDef
   \append:def\newline{\ifhmode \a:newline\fi}
   \def\@newline[#1]{\ifhmode\unskip
          \tmp:dim=#1\relax
          \ifdim \tmp:dim>0.98\smallskipamount \a:newline\fi
      \fi\vspace{#1}\newline}
\else   
   \append:defI\@gnewline{\ifhmode \a:newline\fi}
   \def\:temp[#1]{{\ifhmode\unskip
          \tmp:dim=#1\relax
          \ifdim \tmp:dim>0\smallskipamount \a:newline\fi  
          \let\a:newline|=\empty
      \fi\vspace{#1}\o:@newline:[#1]}}
   \HLet\@newline|=\:temp
\fi
>>>


The recent latex.ltx file introduced the code

\Verbatim
   \global\let\if@newlist\@@if@newlist
\EndVerbatim


at the end of the \''\@outputpage' macro.  In the case of plain latex, I
suspect, the task of this code is to avoid extra vertical space before
a list which starts at the top of a page.  This effect is achieved by
having the \''\if@newlist' changing to false from true at the page break.

In the case of tex4ht, the side effect of loosing the list header
caused also the loss of the code \''<ul>'.


Latex 200 introduces \`'\global\let\if@newlist\@@if@newlist' at the
end of the \''\@outputpage' routine.
Without the following, we loose start of new lists at top of pages. 




\<latex 2000\><<<
\ifx \@@if@newlist\:UnDef \else
  \pend:def\@outputpage{\expandafter\global \expandafter\let
      \expandafter\@@if@newlist\csname if@newlist\endcsname}
\fi
>>>



\<config latex.ltx utilities\><<<
\NewConfigure{newline}{1}
>>>






We can't play with the following because we may get extra \''<BR>'s
for paragraph breaks \''<P>'.

\Verbatim
    \let\:vspace|=\@vspace
    \let\:vspacer|=\@vspacer
    \def\@vspace#1{\vsp:br{#1}\:vspace{#1}}
    \def\@vspacer#1{\vsp:br{#1}\:vspacer{#1}}
    \def\vsp:br#1{\ifhmode 
          \ifdim #1>0.98\smallskipamount \HCode{<BR>}\fi
       \fi }
\EndVerbatim





\Section{Title Page}

%      \Configure{@classz}{}{}{}{}%



\<redefine maketitle\><<<
\let\o:maketitle:|=\maketitle
\def\maketitle{\bgroup 
   |<adjust minipageNum for setcounter footnote 0|>%
   \ifx \EndPicture\:UnDef  
      \def\sec:typ{title}%
      \Configure{HtmlPar}{}{}{}{}%
      \ConfigureEnv{center}{\empty}{}{\empty}{\empty}
      |<maketable save tabular|>%
      \Configure{HBorder}{}{}{}{}{}{}{}{}{}{}%
      \Configure{tabular}{}{}{}{\e:mktl}
        {\bgroup |<maketable recall tabular|>}{\egroup}
      \ConfigureEnv{tabular}{\empty}{}{}{}%
      |<title for TITLE|>%
      \pend:def\@title{\a:ttl}\append:def\@title{\b:ttl}%
      \pend:def\@date{\a:dat}\append:def\@date{\b:dat}%
      \pend:def\@author{\a:aut}\append:def\@author{\b:aut}%
      |</and for maketitle|>%
   \fi 
   \pic:gobble\a:mktl  \o:maketitle:  \pic:gobble\b:mktl
   \egroup \let\maketitle|=\empty}
>>>




\<maketable save tabular\><<<
\let\a:tabular:sv|=\a:tabular \let\b:tabular:sv|=\b:tabular
\let\c:tabular:sv|=\c:tabular \let\d:tabular:sv|=\d:tabular
\let\e:tabular:sv|=\e:tabular \let\f:tabular:sv|=\f:tabular
\let\before:begintabular:sv|=\before:begintabular
>>>

\<maketable recall tabular\><<<
\let\a:tabular|=\a:tabular:sv \let\b:tabular|=\b:tabular:sv
\let\c:tabular|=\c:tabular:sv \let\d:tabular|=\d:tabular:sv
\let\e:tabular|=\e:tabular:sv \let\f:tabular|=\f:tabular:sv
\let\before:begintabular|=\before:begintabular:sv
>>>




Old latex files need \''\no:fonts', but not new ones.---wrong, as far as writing to toc in 0.0?



\</and for maketitle\><<<
\def\and{\a:and}
>>>


\<redefine maketitle\><<<
\NewConfigure{maketitle}[4]{\c:def\a:mktl{#1}\c:def\b:mktl{#2}%
   \c:def\a:ttl{#3}\c:def\b:ttl{#4}}
\NewConfigure{thanks author date and}[8]{%
   \c:def\a:thanks{#1}\c:def\b:thanks{#2}\c:def\a:aut{#3}\c:def\b:aut{#4}%
   \c:def\a:dat{#5}\c:def\b:dat{#6}\c:def\a:and{#7}\c:def\e:mktl{#8}}
>>>













\`'<H..>' with nested fonts doesn't work nicely in NetScape.











\ifHtml[\HPage{more}\Verbatim
\documentstyle{article}

\title{A B and C}
\author{X \and Y}

\input tex4ht.sty \Preamble{html}
        \begin{document}
     \EndPreamble

 \maketitle

\end{document}
\EndVerbatim\EndHPage{}]\fi

\Section{Multi Columns}

\SubSection{xx}


\Verbatim
\CssFile
P.border {  clear: both ; }
span.tcgroup { width: 80\% ; display: block ; float: left ; }
span.title {  padding-left: 10\% ;  width: 100\% ; }
span.nodisp {display: none ; }
span.jrnl {   padding-left: 20\% ;  width: 100\% ; }
span.altgroup {   width: 18\% ;  display: block ;  float: right }
.filesize {   width: 100\% ;  font-style: italic ;  float: left ; }
.artlinks {   width: 100\% ;  clear: left ; }
\EndCssFile


\HCode{
<P class="border">
  <span class="author">xx, xx<span class="nodisp">,</span></span>
  <span class="tcgroup">
  <span class="title"><span class="nodisp">"</span>Toward a 
       xyz<span class="nodisp">,"</span></span>
  <span class="jrnl">74 <cite>abc.</cite> (1969): 12-51<span class="nodisp">.</span></span>
</span>
<span class="altgroup">
   <span 
       class="filesize"><em>107k</em></span><span class="nodisp">,</span>
   <span class="artlinks">[<A HREF=uuu.html>HTML</A>]\ [<A 
      HREF=foo.rtf>RTF</A>]</span>
</span>
</P>
}

\EndVerbatim

\SubSection{xx}

\Verbatim

DIV.left
     {                        
      width: 33%;
      float: left;
      text-align: left;
      padding:  0 1em 0 1em;
          
     }
DIV.middle
     {
      width: 33%;
      float: left;
      text-align: left;
      padding: 0 1em 0 1em;
     }
DIV.right
     {
      width: 33%;
      float: left;
      text-align: left;
      padding: 0 1em 0 1em;
     }
\EndVerbatim




%%%%%%%%%%%%%%
\Part{LaTeX Classes}
%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Book.cls, Report.cls, Article.cls}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\<book / report / article\><<<
  |<html report, article, book|>
  |<latex report,... shared config|>
>>>



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{memoir}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{memoir}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\<memoir.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% memoir.4ht                           |version %
% Copyright (C) |CopyYear.2003.      Eitan M. Gurari         %
|<TeX4ht copyright|>
\input book.4ht
\input verse.4ht
|<memoir cfg|>
\Hinput{memoir}
\endinput
>>>        \AddFile{8}{memoir}


\<memoir cfg\><<<
\let\rm\empty
\let\sf\empty
\let\tt\empty
\let\bf\empty
\let\it\empty

\def\@chapter[#1]#2{%
   |<adjust minipageNum for setcounter footnote 0|>%
   {\SkipRefstepAnchor \let\addcontentsline\:gobbleIII\no@chapter[#1]{}%
    \global\let\f@rtoc\f@rtoc
    \global\let\f@rhdr\f@rhdr  }%
   \HtmlEnv   \Toc:Title{#1}\:chapter{#2}}
>>>




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{verse}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\<verse.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% verse.4ht                             |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<verse cfg|>
\Hinput{verse}
\endinput
>>>        \AddFile{8}{verse}




\<verse cfg\><<<
\def\@vsptitle[#1]#2{%
  |<memoir verse title|>%
  \a:poemtitle
  \addcontentsline{toc}{\poemtoc}{#1}
  \poemtitlemark{#1}%
  \b:poemtitle
  \@vstypeptitle{#2}%
  \c:poemtitle
  \@afterheading}
\def\@vssptitle#1{%
  \a:likepoemtitle
  \@vstypeptitle{#1}%
  \b:likepoemtitle
  \@afterheading}
\NewConfigure{poemtitle}{3}
\NewConfigure{likepoemtitle}{2}
>>>

\<verse cfg\><<<   
\pend:def\@vscentercr{%
   \let\incr:vsline\incr@vsline
   \def\incr@vsline{\let\incr@vsline\incr:vsline}%
}
\pend:def\start@vsline{\a:verseline  \incr@vsline}
\renewcommand{\@vsifbang}[1]{\@ifnextchar !{%
   \b:verseline\incr@vsline \@firstoftwo{#1}}}
\expand:after{\let\sv:verse}\csname \string\verse\endcsname
\expandafter\def\csname \string\verse\endcsname[#1]{%
   \let\:temp\refstepcounter
   \def\refstepcounter##1\let{\let\refstepcounter\:temp\let}%
   \sv:verse[#1]%
   \a:verseline  |<memoir verse counter|>%
   \setcounter{poemline}{0}%
   \setcounter{vslineno}{1}%
   \incr@vsline
}
\NewConfigure{verseline}{2}
>>>


\<memoir verse counter\><<<
\expandafter\ifx \csname c@verse\endcsname\relax \else
   \refstepcounter{verse}%
\fi
>>>


\<memoir verse title\><<<
\csname phantomsection\endcsname
>>>

\<verse cfg\><<<   
\pend:defI\flagverse{\a:flagverse}
\append:defI\flagverse{\b:flagverse}
\NewConfigure{flagverse}{2}
>>>

\<memoir cfg\><<<
\pend:defI\getthelinenumber{%
   \let\sv:thepoemline\thepoemline
   \pend:def\thepoemline{\a:poemline}%
   \append:def\thepoemline{\b:poemline}}
\append:defI\getthelinenumber{\let\thepoemline\sv:thepoemline}
\NewConfigure{poemline}{2}
>>>


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{mempatch}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\<mempatch.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% mempatch.4ht                          |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<mempatch cfg|>
\Hinput{mempatch}
\endinput
>>>        \AddFile{8}{mempatch}


\<mempatch cfg\><<<
\let\no@Msect\M@sect
\NewConfigure{@sec @ssect}[1]{%
   \def\rdef:sec##1{#1\csname no@##1\endcsname}}
\:CheckOption{sections-}     \if:Option
   \Configure{@sec @ssect}{}
\else
   \Configure{@sec @ssect}{%
      |<sv Sc, sec, ssec|>\let\:Sc|=\:gobble
      |<redf memior sec|>%
      |<redf sec|>%
      |<redf ssec|>\IgnorePar}
\fi
>>>

\<redf memior sec\><<<
\def\M@sect##1##2##3##4##5##6[##7][##8]##9{%
   |<disable @seccntformat|>%
   \let\M@sect\no@Msect   \xdef\c:secnumdepth{##2}%
   {\SkipRefstepAnchor \let\addcontentsline\:gobbleIII \let\mark\:gobble
    \no@Msect{##1}{##2}{##3}{##4}{##5}{##6}[{##7}][{##8}]{}}%
   |<recall Sc, sec, ssec|>%
   |<restore @seccntformat|>%
   \HtmlEnv    \Toc:Title{##8}\csname no:#1\endcsname{##9}}%
>>>



\<sv Sc, sec, ssec\><<<
\let\sv:Msect|=\M@sect
>>>


\<recall Sc, sec, ssec\><<<
\let\M@sect|=\sv:Msect
>>>


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{revtex}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\Link[ftp://ftp.aip.org/revtex]{}{}REVTeX 3.0 from the American Institute of Physics,\EndLink,
\Link[http://publish.aps.org/revtex4/]{}{}REVTeX 4 Home Page\EndLink

\<revtex.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% revtex.4ht                            |version %
% Copyright (C) |CopyYear.2002.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\input \@society.4ht
\Hinput{revtex}
\endinput
>>>        \AddFile{9}{revtex}

\<aps.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% aps.4ht                               |version %
% Copyright (C) |CopyYear.2002.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\ifx \@authoraddress\:UnDef
  |<revtex4 aps.rtx|>
  \Hinput{aps}
  \expandafter\endinput
\fi
|<revtex3 aps.sty|>
\Hinput{aps}
\endinput
>>>        \AddFile{9}{aps}


\<revtex4 aps.rtx\><<<
\let\@svsechd\empty     
>>>


\<revtex3 aps.sty\><<<
|<revtex3 aps math|>
|<revtex3 aps title page|>
|<revtex3 aps sections|>
|<revtex3 prabib 4ht|>
>>>

\<revtex3 prabib 4ht\><<<
\pend:def\references{\ifpreprintsty\else \ShowPar \par\noindent\fi}
>>>

\<revtex3 aps math\><<<
\def\no:make@eqnnum{\let\make@eqnnum=\empty}
\append:def\equation{%
   \def\:@currentlabel{\the\c@equation}%
   \anc:lbl r{equation}%
   \pend:def\endequation{%
     \aftergroup\aftergroup
     \aftergroup\aftergroup
     \aftergroup\aftergroup
     \aftergroup\no:make@eqnnum}}
>>>

\<revtex3 aps title page\><<<
\def\:authoraddress{%
   \let\aps:centering=\centering
   \def\centering##1\par{\aps:centering\a:address##1\b:address\par}%
   \def\nointerlineskip{\def\centering####1\par{%
          \aps:centering\a:aut####1\b:aut\par}}}

\NewConfigure{address}{2}

\let\o:maketitle:\maketitle
\def\maketitle{\bgroup
      |<adjust minipageNum for setcounter footnote 0|>%
      \def\sec:typ{title}%
      \Configure{HtmlPar}{}{}{}{}%
      \pend:def\@title{\a:ttl}\append:def\@title{\b:ttl\vskip2.5pt}%
      \pend:def\@date{\a:dat}\append:def\@date{\b:dat}%
      \pend:def\@authoraddress{\bgroup\:authoraddress }%
      \append:def\@authoraddress{\egroup }%
      \def\and{\a:and}
     \pend:def\@maketitle{\a:mktl}%
     \append:def\@maketitle{\b:mktl}%
     \o:maketitle: 
   \egroup}

\NewConfigure{maketitle}[4]{\c:def\a:mktl{#1}\c:def\b:mktl{#2}%
   \c:def\a:ttl{#3}\c:def\b:ttl{#4}}
\NewConfigure{thanks author date and}[8]{%
   \c:def\a:thanks{#1}\c:def\b:thanks{#2}\c:def\a:aut{#3}\c:def\b:aut{#4}%
   \c:def\a:dat{#5}\c:def\b:dat{#6}\c:def\a:and{#7}\c:def\e:mktl{#8}}
>>>


\<revtex3 aps sections\><<<
   \def\@part[#1]#2{%
    \ifnum \c@secnumdepth >-2\relax
      \SkipRefstepAnchor \refstepcounter{part}%
      \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
    \else
      \addcontentsline{toc}{part}{#1}%
    \fi
    \csname @endpart\endcsname}
\let\:tempb\part
\Def:Section\part{\thepart}{#1}
\let\:part\part
\let\part\:tempb
\let\no@part\@part
\def\@part[#1]#2{%
   {\let\addcontentsline\:gobbleIII\no@part[#1]{}}%
   \HtmlEnv   \Toc:Title{#1}\:part{#2}}
\Def:Section\likepart{}{#1}
\let\:likepart\likepart
\let\likepart\:UnDef
\let\no@spart\@spart
\def\@spart#1{%
   {\let\addcontentsline\:gobbleIII\no@spart{}}%
   \HtmlEnv   \:likepart{#1}}

   \let\no@section\section
\Def:Section\section{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesection \fi}{\uppercase{#1}}
\let\no:section\section
\def\section{\rdef:sec{section}}
\Def:Section\likesection{}{\uppercase{#1}}
\let\:likesection\likesection
\let\likesection\:UnDef


\let\asp:@sect\no@sect
\def\no@sect#1#2#3#4#5{\asp:@sect{#1}{#2}{#3}{#4}{#5\let\@svsec=\empty}}



\let\no@subsection\subsection
\Def:Section\subsection{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesubsection \fi}{#1}
\let\no:subsection\subsection
\def\subsection{\rdef:sec{subsection}}
\Def:Section\likesubsection{}{#1}
\let\:likesubsection\likesubsection
\let\likesubsection\:UnDef

\let\no@subsubsection\subsubsection
\Def:Section\subsubsection{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesubsubsection \fi}{#1}
\let\no:subsubsection\subsubsection
\def\subsubsection{\rdef:sec{subsubsection}}
\Def:Section\likesubsubsection{}{#1}
\let\:likesubsubsection\likesubsubsection
\let\likesubsubsection\:UnDef

\let\no@paragraph\paragraph
\Def:Section\paragraph{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \theparagraph \fi}{#1}
\let\no:paragraph\paragraph
\def\paragraph{\rdef:sec{paragraph}}
\Def:Section\likeparagraph{}{#1}
\let\:likeparagraph\likeparagraph
\let\likeparagraph\:UnDef
\let\no@subparagraph\subparagraph
\Def:Section\subparagraph{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesubparagraph \fi}{#1}
\let\no:subparagraph\subparagraph
\def\subparagraph{\rdef:sec{subparagraph}}
\Def:Section\likesubparagraph{}{#1}
\let\:likesubparagraph\likesubparagraph
\let\likesubparagraph\:UnDef



\def\tableofcontents{%
   \ifx\contentsname\empty \else
      \ifx\contentsname\:UnDef \else
         %
\section*{\contentsname}%
         %
%
   \fi\fi
   \:tableofcontents}

\ConfigureToc{likeparagraph} {}{\empty}{}{\newline}
\ConfigureToc{likepart} {}{\empty}{}{\newline}
\ConfigureToc{likesection} {}{\empty}{}{\newline}
\ConfigureToc{likesubparagraph} {}{\empty}{}{\newline}
\ConfigureToc{likesubsection} {}{\empty}{}{\newline}
\ConfigureToc{likesubsubsection} {}{\empty}{}{\newline}
\ConfigureToc{paragraph} {\empty}{\ }{}{\newline}
\ConfigureToc{part} {\empty}{\ }{}{\newline}
\ConfigureToc{section} {\empty}{\ }{}{\newline}
\ConfigureToc{subparagraph} {\empty}{\ }{}{\newline}
\ConfigureToc{subsection} {\empty}{\ }{}{\newline}
\ConfigureToc{subsubsection} {\empty}{\ }{}{\newline}


\edef\:TOC{%
   \noexpand\ifx [\noexpand\:temp
      \noexpand\expandafter\noexpand\:TableOfContents
   \noexpand\else
      \noexpand\Auto:ent{\ifnum \c@tocdepth >-2 part,\fi
\expandafter\ifx \csname @chapter\endcsname\relax
   \ifnum \c@tocdepth >\z@  section,\fi
\else
   \ifnum \c@tocdepth >\m@ne chapter,appendix,\fi
   \ifnum \z@>\c@tocdepth\else section,\fi
   \ifnum 1>\c@tocdepth \else subsection,\fi
\fi
\ifnum 2>\c@tocdepth \else subsection,\fi
\ifnum 3>\c@tocdepth \else subsubsection,\fi
\ifnum 4>\c@tocdepth \else paragraph,\fi
\ifnum 5>\c@tocdepth \else subparagraph,\fi
UnDFexyz}%
   \noexpand\fi}
\def\:tableofcontents{\futurelet\:temp\:TOC}
\def\Auto:ent#1{%
   \edef\auto:toc{\noexpand\:TableOfContents[\ifx \auto:toc\:UnDef
      #1\else \auto:toc \fi]}  \auto:toc
   \global\let\auto:toc\:UnDef }

\def\:tocs{\noexpand\:tableofcontents}
\pend:defIII\addcontentsline{%
   \def\:temp{##1}\def\:tempa{toc}\ifx \:temp\:tempa
   \gHAdvance\TitleCount  1 \fi }
\def\@dottedtocline#1#2#3#4#5{\hbox{\def\numberline##1{\e:listof
                ##1\f:listof}\c:listof#4\d:listof}\ignorespaces}
\def\@starttoc#1{%
  \begingroup
    \makeatletter   \Configure{cite}{}{}{}{}%
    \def\:temp{#1}\def\:tempa{toc}%
    \a:listof\par
    \@input{\jobname.\ifx \:temp\:tempa 4ct\else #1\fi}%
    \b:listof
    \if@filesw
      \expandafter\expandafter\csname
          newwrite\endcsname\csname tf@#1\endcsname
      \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
    \fi
    \global\@nobreakfalse
  \endgroup}


\NewConfigure{tableofcontents*}[1]{%
   \def\:tempa{#1}\ifx\empty\:tempa
      \ifx \au:StartSec\:UnDef \else \gdef\:StartSec{\au:StartSec}\fi
   \else
      \edef\auto:toc{#1}%
         \ifx \au:StartSec\:UnDef
            \let\au:StartSec\:StartSec
            \def\:StartSec{\:tableofcontents
               \global\let\auto:toc\:UnDef \:StartSec}%
            \pend:def\:tableofcontents{\gdef\:StartSec{\au:StartSec}}%
   \fi  \fi
}
>>>




%%%%%%%%%%%%%%%
\Chapter{Polish: mwart.cls, mwrep.cls, mwbk.cls}
%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%
\Section{mwart.cls}
%%%%%%%%%%%%%%%

\<mwart.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% mwart.4ht                             |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<mwcls configs|>
  |<mwcls maketitle|>
  |<mwcls divs|>
  |<mwcls tocs|>
  |<mwart tocs|>
\Hinput{mwart}
\endinput
>>>        \AddFile{7}{mwart}

\<mwcls divs\><<<
\let\mw:sectionx\mw@sectionx
\def\mw@sectionx{\everypar{\HtmlPar}\mw:sectionx}
\append:def\mw@runinheading{%
  \expandafter\everypar\expandafter{\the\everypar
    \edef\:temp{\the\everypar}\ifx \:temp\empty \everypar{\HtmlPar}\fi
  }%
  \expandafter\everypar\expandafter{\expandafter\HtmlPar\the\everypar}%
}
>>>

\<mwcls divs\><<<
\let\no:section\section
\Def:Section\section{\thesection}{#1}
  \let\:temp\no:section
  \let\no:section\section
  \let\section=\:temp
  \let\section:head\section@head
\Def:Section\likesection{}{#1}
  \let\:likesection\likesection
  \let\likesection\:UnDef
\def\section@head{\ifHeadingNumbered
   \expandafter\no:section \else \expandafter\:likesection\fi{\HeadingText}}
>>>

\<mwcls divs\><<<
\let\no:subsection\subsection
\Def:Section\subsection{\thesubsection}{#1}
  \let\:temp\no:subsection
  \let\no:subsection\subsection
  \let\subsection=\:temp
  \let\subsection:head\subsection@head
\Def:Section\likesubsection{}{#1}
  \let\:likesubsection\likesubsection
  \let\likesubsection\:UnDef
\def\subsection@head{\ifHeadingNumbered \expandafter\no:subsection \else 
   \expandafter\:likesubsection\fi{\HeadingText}}
>>>

\<mwcls divs\><<<
\let\no:subsubsection\subsubsection
\Def:Section\subsubsection{\thesubsubsection}{#1}
  \let\:temp\no:subsubsection
  \let\no:subsubsection\subsubsection
  \let\subsubsection=\:temp
  \let\subsubsection:head\subsubsection@head
\Def:Section\likesubsubsection{}{#1}
  \let\:likesubsubsection\likesubsubsection
  \let\likesubsubsection\:UnDef
\def\subsubsection@head{\ifHeadingNumbered
   \expandafter\no:subsubsection \else \expandafter\:likesubsubsection\fi{\HeadingText}}
>>>

\<mwcls divs\><<<
\let\no:paragraph\paragraph
\Def:Section\paragraph{\theparagraph}{#1}
  \let\:temp\no:paragraph
  \let\no:paragraph\paragraph
  \let\paragraph=\:temp
  \let\paragraph:head\paragraph@head
\Def:Section\likeparagraph{}{#1}
  \let\:likeparagraph\likeparagraph
  \let\likeparagraph\:UnDef
\def\paragraph@head{\ifHeadingNumbered
   \expandafter\no:paragraph \else 
   \expandafter\:likeparagraph\fi{\HeadingText}}
>>>

\<mwcls divs\><<<
\let\no:subparagraph\subparagraph
\Def:Section\subparagraph{\thesubparagraph}{#1}
  \let\:temp\no:subparagraph
  \let\no:subparagraph\subparagraph
  \let\subparagraph=\:temp
  \let\subparagraph:head\subparagraph@head
\Def:Section\likesubparagraph{}{#1}
  \let\:likesubparagraph\likesubparagraph
  \let\likesubparagraph\:UnDef
\def\subparagraph@head{\ifHeadingNumbered
  \expandafter\no:subparagraph \else 
  \expandafter\:likesubparagraph\fi {\HeadingText}}
>>>

\<mwcls divs\><<<
\let\no:part\part
\Def:Section\part{\thepart}{#1}
  \let\:temp\no:part
  \let\no:part\part
  \let\part=\:temp
  \let\part:head\part@head
\Def:Section\likepart{}{#1}
  \let\:likepart\likepart
  \let\likepart\:UnDef
\def\part@head{\ifHeadingNumbered
   \expandafter\no:part \else \expandafter\:likepart\fi{\HeadingText}}
>>>

\<mwcls divs\><<<
\Configure{UndefinedSec}{likepart}
\Configure{UndefinedSec}{likechapter}
\Configure{UndefinedSec}{likesection}
\Configure{UndefinedSec}{likesubsection}
>>>


\<mwart tocs\><<<
\let\mw@markandtoc=\empty
\def\tableofcontents{%
   \ifx\contentsname\empty \else
      \ifx\contentsname\:UnDef \else
         \Configure{toToc}{}{likesection}%
         \section*{\contentsname}%
         \Configure{toToc}{?}{likesection}%
   \fi\fi
   \:tableofcontents}
>>>


\<entries for mwart tocs\><<<
\ifnum \c@tocdepth >-2 part,likepart,\fi
\ifnum \c@tocdepth >\z@  section,likesection,\fi
\ifnum 2>\c@tocdepth \else subsection,likesubsection,\fi
\ifnum 3>\c@tocdepth \else subsubsection,likesubsubsection,\fi
\ifnum 4>\c@tocdepth \else paragraph,likeparagraph,\fi
\ifnum 5>\c@tocdepth \else subparagraph,likesubparagraph,\fi
UnDFexyz>>>

\<mwart tocs\><<<
\edef\:TOC{%
   \noexpand\ifx [\noexpand\:temp
      \noexpand\expandafter\noexpand\:TableOfContents
   \noexpand\else
      \noexpand\Auto:ent{|<entries for mwart tocs|>}%
   \noexpand\fi}
>>>



\<mwcls tocs\><<<
\def\:tableofcontents{\futurelet\:temp\:TOC}
\def\Auto:ent#1{%
   \edef\auto:toc{\noexpand\:TableOfContents[\ifx \auto:toc\:UnDef
      #1\else \auto:toc \fi]}  \auto:toc
   \global\let\auto:toc\:UnDef }
\def\:tocs{\noexpand\:tableofcontents}
\pend:defIII\addcontentsline{%
   \def\:temp{##1}\def\:tempa{toc}\ifx \:temp\:tempa
   \gHAdvance\TitleCount  1 \fi }
\def\@dottedtocline#1#2#3#4#5{\hbox{\def\numberline##1{\e:listof
                ##1\f:listof}\c:listof#4\d:listof}\ignorespaces}
\def\@starttoc#1{%
  \begingroup
    \makeatletter   \Configure{cite}{}{}{}{}%
    \def\:temp{#1}\def\:tempa{toc}%
    \a:listof\par
    \@input{\jobname.\ifx \:temp\:tempa 4ct\else #1\fi}%
    \b:listof
    \if@filesw
      \expandafter\expandafter\csname
          newwrite\endcsname\csname tf@#1\endcsname
      \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
    \fi
    \global\@nobreakfalse
  \endgroup}
\NewConfigure{tableofcontents*}[1]{%
   \def\:tempa{#1}\ifx\empty\:tempa
      \ifx \au:StartSec\:UnDef \else \gdef\:StartSec{\au:StartSec}\fi
   \else
      \edef\auto:toc{#1}%
         \ifx \au:StartSec\:UnDef
            \let\au:StartSec\:StartSec
            \def\:StartSec{\:tableofcontents
               \global\let\auto:toc\:UnDef \:StartSec}%
            \pend:def\:tableofcontents{\gdef\:StartSec{\au:StartSec}}%
   \fi  \fi
}
>>>


\<mwcls maketitle\><<<
\let\o:maketitle:\maketitle
\def\maketitle{\bgroup
   |<adjust minipageNum for setcounter footnote 0|>%
   \ifx \EndPicture\:UnDef
      \def\sec:typ{title}%
      \Configure{HtmlPar}{}{}{}{}%
      \ConfigureEnv{center}{\empty}{}{\empty}{\empty}
      \let\a:tabular:sv\a:tabular \let\b:tabular:sv\b:tabular
\let\c:tabular:sv\c:tabular \let\d:tabular:sv\d:tabular
\let\e:tabular:sv\e:tabular \let\f:tabular:sv\f:tabular
\let\before:begintabular:sv\before:begintabular
%
      \Configure{tabular}{}{}{}{\e:mktl}
        {\bgroup \let\a:tabular\a:tabular:sv \let\b:tabular\b:tabular:sv
\let\c:tabular\c:tabular:sv \let\d:tabular\d:tabular:sv
\let\e:tabular\e:tabular:sv \let\f:tabular\f:tabular:sv
\let\before:begintabular\before:begintabular:sv
}{\egroup}
      \ConfigureEnv{tabular}{\empty}{}{}{}%
      %
      \pend:def\@title{\a:ttl}\append:def\@title{\b:ttl}%
      \pend:def\@date{\a:dat}\append:def\@date{\b:dat}%
      \pend:def\@author{\a:aut}\append:def\@author{\b:aut}%
      \def\and{\a:and}
%
   \fi
   \pic:gobble\a:mktl  \o:maketitle:  \pic:gobble\b:mktl
   \egroup \let\maketitle\empty}
\NewConfigure{maketitle}[4]{\c:def\a:mktl{#1}\c:def\b:mktl{#2}%
   \c:def\a:ttl{#3}\c:def\b:ttl{#4}}
\NewConfigure{thanks author date and}[8]{%
   \c:def\a:thanks{#1}\c:def\b:thanks{#2}\c:def\a:aut{#3}\c:def\b:aut{#4}%
   \c:def\a:dat{#5}\c:def\b:dat{#6}\c:def\a:and{#7}\c:def\e:mktl{#8}}
>>>

\<mwcls configs\><<<
\NewConfigure{caption}[4]{\c:def\cptA:{#1}\c:def\cptB:{#2}%
   \c:def\cptC:{#3}\c:def\cptD:{#4}}
\long\def\@makecaption#1#2{%   
   {\cptA: \cap:ref{#1}%
\cptB:}{\cptC:{#2}\cptD:}}

\pend:def\caption{\SkipRefstepAnchor}

\append:def\quote{\par\@totalleftmargin\z@}

|<book-report-article idx|>

\append:def\quotation{\a:quotation\par\@totalleftmargin\z@}
\NewConfigure{quotation}{1}
\NewConfigure{listof}{6}
     
\ifx \@openbib@code\:UnDef \else
 \pend:def\@openbib@code{\labelsep\z@}
\fi
\def\:temp#1#2!*?: {\def\:temp{#1}}
\expandafter\:temp\usepackage!*?: 
\def\:tempa{\@latex@e@error}
\ifx \:temp\:tempa \else
   \def\:tempa#1#2#3#4{\tmp:toks{#1{#2}}%
   \long\expandafter\edef\csname #4 \endcsname{\the\tmp:toks
        {\expandafter\noexpand
   \csname o:\expandafter\:gobble\string #3:\endcsname}}}
\def\:temp#1{%
  \expandafter\expandafter\expandafter\:tempa\csname #1 \endcsname{#1}}
\:temp{rm}
\:temp{sf}
\:temp{tt}
\:temp{bf}
\:temp{it}

\fi

  \let\:tempc\listoffigures
\pend:def\:tempc{\begingroup \a:listoffigures
   \def\@starttoc{\:tableofcontents[lof]\:gobble}}
\append:def\:tempc{\b:listoffigures \endgroup}
\HLet\listoffigures\:tempc
\let\:tempc\listoftables
\pend:def\:tempc{\begingroup \a:listoftables
   \def\@starttoc{\:tableofcontents[lot]\:gobble}}
\append:def\:tempc{\b:listoftables \endgroup}
\HLet\listoftables\:tempc

  \NewConfigure{listoffigures}{2}
\NewConfigure{listoftables}{2}
>>>


%%%%%%%%%%%%%%%
\Section{mwrep.cls}
%%%%%%%%%%%%%%%


\<mwrep.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% mwrep.4ht                             |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<mwcls configs|>
  |<mwcls maketitle|>
  |<mwcls divs|>
  |<mwrep,mwbk divs|>
  |<mwcls tocs|>
  |<mwrep,mwbk tocs|>
\Hinput{mwrep}
\endinput
>>>        \AddFile{7}{mwrep}

\<mwrep,mwbk tocs\><<<
\let\mw@markandtoc=\empty
\def\tableofcontents{%
   \ifx\contentsname\empty \else
      \ifx\contentsname\:UnDef \else
         \Configure{toToc}{}{likechapter}%
         \chapter*{\contentsname}%
         \Configure{toToc}{?}{likechapter}%
   \fi\fi
   \:tableofcontents}
>>>

\<mwrep,mwbk divs\><<<
\let\no:chapter\chapter
\Def:Section\chapter{\thechapter}{#1}
  \let\:temp\no:chapter
  \let\no:chapter\chapter
  \let\chapter=\:temp
  \let\chapter:head\chapter@head
\Def:Section\likechapter{}{#1}
  \let\:likechapter\likechapter
  \let\likechapter\:UnDef
\def\chapter@head{\ifHeadingNumbered
   \expandafter\no:chapter \else \expandafter\:likechapter\fi{\HeadingText}}
>>>



\<entries for mw rep/bk tocs\><<<
\ifnum \c@tocdepth >-2 part,likepart,\fi
\ifnum \c@tocdepth >\m@ne chapter,likechapter,appendix,\fi
\ifnum \z@>\c@tocdepth\else section,likesection,\fi
\ifnum 2>\c@tocdepth \else subsection,likesubsection,\fi
\ifnum 3>\c@tocdepth \else subsubsection,likesubsubsection,\fi
\ifnum 4>\c@tocdepth \else paragraph,likeparagraph,\fi
\ifnum 5>\c@tocdepth \else subparagraph,likesubparagraph,\fi
UnDFexyz>>>

\<mwrep,mwbk tocs\><<<
\edef\:TOC{%
   \noexpand\ifx [\noexpand\:temp
      \noexpand\expandafter\noexpand\:TableOfContents
   \noexpand\else
      \noexpand\Auto:ent{|<entries for mw rep/bk tocs|>}%
   \noexpand\fi}
>>>


%%%%%%%%%%%%%%%
\Section{mwbk.cls}
%%%%%%%%%%%%%%%

\<mwbk.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% mwbk.4ht                              |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<mwcls configs|>
  |<mwcls maketitle|>
  |<mwcls divs|>
  |<mwrep,mwbk divs|>
  |<mwcls tocs|>
  |<mwrep,mwbk tocs|>
\Hinput{mwbk}
\endinput
>>>        \AddFile{7}{mwbk}




%%%%%%%%%%%%%%%
\Chapter{aa.cls}
%%%%%%%%%%%%%%%

\Link[http://www.astro.uu.nl/\string~rutten/rrtex/manuals/aa/]{}{}%
 LaTeX document class for Astronomy and Astrophysics main journal\EndLink

  



\<aa.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% aa.4ht                                |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\onecolumn           
|<aa sections|>
|<aa maketitle|>
|<book-report-article caption|>
|<configure aa|>
\Hinput{aa}
\endinput
>>>        \AddFile{9}{aa}

%%%%%%%%%%%%%%%%%%%
\Section{Maketitle}




\<aa maketitle\><<<
\NewConfigure{subtitle institute}[7]{%
   \c:def\a:sbttl{#1}\c:def\b:sbttl{#2}%
   \c:def\a:institute{#3}\c:def\b:institute{#4}%
   \c:def\c:institute{#5}\c:def\d:institute{#6}%
   \c:def\b:and{#7}%
}
\NewConfigure{headnote}{2}

\NewConfigure{maketitle}[4]{\c:def\a:mktl{#1}\c:def\b:mktl{#2}%
   \c:def\a:ttl{#3}\c:def\b:ttl{#4}}
\NewConfigure{thanks author date and}[8]{%
   \c:def\a:thanks{#1}\c:def\a:thanks{#2}%
   \c:def\a:aut{#3}\c:def\b:aut{#4}\c:def\a:dat{#5}%
   \c:def\b:dat{#6}\c:def\a:and{#7}\c:def\e:mktl{#8}}

\def\inst#1{\unskip$\sp{#1}$}
\def\fnmsep{\unskip$\sp,$}

\let\o:maketitle:=\@maketitle
\def\@maketitle{%
   |<adjust minipageNum for setcounter footnote 0|>%
  \def\sec:typ{title}%       
  \Tag{)title)}{\@title}%
  \makeheadbox \let\makeheadbox=\empty
  \def\andname{\a:and}%
  \def\lastandname{, \a:and} 
  \if!\@headnote!\else 
    \pend:def\@headnote{\a:headnote\ignorespaces}%
    \append:def\@headnote{\b:headnote}%
  \fi
  \pend:def\@title{\a:ttl\ignorespaces}%
  \if!\@subtitle!\append:def\@title{\b:ttl}\else  
     \pend:def\@subtitle{\a:sbttl\ignorespaces}%
     \append:def\@subtitle{\b:sbttl\b:ttl}%
  \fi
  \pend:def\@author{\a:aut\ignorespaces}%
  \append:def\@author{\b:aut}%
  \let\o:institutename=\institutename
  \def\institutename{\a:institute  
    \pend:def\@institute{\pend:def\and{\b:and}}%
    \pend:def\theinst{\c:institute}\append:def\theinst{\d:institute}%
    \o:institutename \b:institute 
 \if!\@dedic!\else
    \pend:def\@dedic{\a:dedic}\append:def\@dedic{\b:dedic}%
 \fi
    \pend:def\@date{\a:dat}\append:def\@date{\b:dat}}%
  \Configure{newline}{\e:mktl}\a:mktl\o:maketitle:\b:mktl
  \relax\if!\@mail!\else
      \pend:def\@mail{\a:mail\ignorespaces}%
      \append:def\@mail{\b:mail}%
      \global\let\@mail=\@mail
  \fi
}
\let\strich|=\empty
\NewConfigure{mail}{2}
\NewConfigure{makeheadbox}{5}
\def\makeheadbox{{%
   \a:makeheadbox{\bf\@journalname\ manuscript no.}
   \b:makeheadbox{\bf Your thesaurus codes are:}
   \c:makeheadbox{\@thesaurus}
   \d:makeheadbox{\AALogo}\e:makeheadbox}}

\def\AALogo{ASTRONOMY AND ASTROPHYSICS}
>>>







\Section{Sectioning}



\<aa sections\><<<
|<book / report / article cut points|>

|<html late parts|>
|<html late sections|>
|<subsections for book / report / article|>
|<subsubsections for book / report / article|>
|<paragraphs for book / report / article|>

>>>



% 
% 
% |<config article.sty utilities|>








%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{latex2man.cls}
%%%%%%%%%%%%%%%%%%%%%%%%



\<latex2man.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% latex2man.4ht                         |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<latex2man defs|>
\Hinput{latex2man}
\endinput
>>>        \AddFile{9}{latex2man}




\<latex2man defs\><<<
\renewcommand{\SP}{~}  
\renewcommand{\Email}[1]{\Link[mailto:#1]{}{}\texttt{#1}\EndLink}
\renewcommand{\URL}[1]{\Link[#1]{}{}\texttt{#1}\EndLink}
>>>






\Chapter{texinfo.cls}

\Link[http://www.dina.kvl.dk/DinaUnix/Info/texi/texi\string
   _toc.html]{}{}Manual\EndLink

Search for `*.texi' on my pc to find files.


Compile the following with \`'tex latex2e.texi':
\Link[ftp://ctan.tug.org/tex-archive/info/latex2e-help-texinfo/latex2e.texi]{}{}info/latex2e-help-texinfo\EndLink. 

From texinfo.tex:

\Verbatim
%   tex foo.texi
%   texindex foo.??
%   tex foo.texi
%   tex foo.texi
\EndVerbatim


Other examples:
\List{*}
\item
\Link[http://ilm.mech.unsw.edu.au/tex-archive/macros/texinfo/texinfo/doc/]{}{}texinfo/doc\EndLink
\item
\Link[ftp://ftp.lip6.fr/pub/gnu/Manuals/]{}{}gnu/Manuals\EndLink
\EndList






\<texinfo.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% texinfo.4ht                           |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\let\:temp|=\o:end
        \let\o:end|=\ptexend
                \let\ptexend|=\end
                          \let\end|=\:temp
\chardef\hat|=`\^       
\let\c|=\comment
|<texinfo env|>
|<texinfo lists|>
|<texinfo titlepage|>
|<texinfo sections|>
|<texinfo index|>
|<texinfo other|>
|<texinfo tables|>
|<texinfo verbatim|>
\Hinput{texinfo}
\endinput
>>>        \AddFile{9}{texinfo}


\<texinfo verbatim\><<<
\NewConfigure{group}{2}
\def\group{\a:group\begingroup
  \ifnum\catcode13=\active \else
    \errhelp = \groupinvalidhelp
    \errmessage{@group invalid in context where filling is enabled}%
  \fi
  \def\Egroup{\egroup \endgroup \b:group }%
  \vtop\bgroup
    \everypar = {\HtmlPar}%
    \offinterlineskip
    \ifx\par\lisppar   
      \edef\par{\leavevmode \par}%
      \obeylines
    \fi
    \comment
}
>>>

\<texinfo tables\><<<
\NewConfigure{multitable}{6}
\pend:def\multitable{\a:multitable}
\def\dotable#1{\bgroup
  \let\sv:HRow=\HRow  \def\HRow{0}%
  \vskip\parskip  \setmultitablespacing    
  \let\item\crcr
  \global\colcount=0
  \def\Emultitable{\global\setpercentfalse\cr\egroup 
       \d:multitable \global\let\HRow=\sv:HRow \egroup \b:multitable}%
  \setuptable#1 \endsetuptable \edef\HCols{\the\colcount}%
  \everycr{\o:noalign:{\global\colcount=0\relax}}%  
  \TeXhalign\bgroup&\global\advance\colcount by 1\relax
    \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname
     \IgnorePar
     \noindent
     \ifnum \colcount=1 \gHAdvance\HRow by 1
        \ifnum \HRow>1 \d:multitable\fi
        \c:multitable
     \fi
     \e:multitable\ignorespaces##\f:multitable\unskip\multistrut}\cr
}
>>>




The following is to protec the \''\code' command in immediate
environments, such as section titles submitted to toc.

\<texinfo other\><<<
\NewConfigure{example}{2}
\def\example{\a:example \begingroup
   \def\Eexample{\nonfillfinish\endgroup\b:example}\lisp} 
\NewConfigure{smalldisplay}{2}
\def\smalldisplay{\a:smalldisplay \begingroup
   \def\Esmalldisplay{\nonfillfinish\endgroup \b:smalldisplay}\display}
\NewConfigure{smallexample}{2}
\def\smallexample{\a:smallexample \begingroup
   \def\Esmallexample{\nonfillfinish\endgroup \b:smallexample}\lisp}
\NewConfigure{smallformat}{2}
\def\smallformat{\a:smallformat \begingroup
   \def\Esmallformat{\nonfillfinish\endgroup \b:smallformat}\format}
\NewConfigure{smalllisp}{2}
\def\smalllisp{\a:smalllisp \begingroup
   \def\Esmalllisp{\nonfillfinish\endgroup \b:smalllisp}\lisp}
\NewConfigure{flushleft}{2}
\def\flushleft{\a:flushleft \begingroup
   \def\Eflushleft{\nonfillfinish\endgroup \b:flushleft}\format} 
>>>

\<texinfo other\><<<
\let\o:code:=\code
\def\code{\Protect\o:code:}
\NewConfigure{pdfurl}{1}
\def\pdfurl#1{\bgroup
   \def~{\string~}\def\@{@}\let\*=\empty%
   \edef\:temp{\egroup \noexpand\a:pdfurl \noexpand\Link[#1]{}{}}\:temp
}
\def\endlink{\EndLink}
\pend:defII\dosetq{\hbox{\Link{}{##1}\EndLink}}
\pend:defII\refx{\Link{##1}{}}
>>>

\<texinfo env\><<<
\def\parsearg#1{%
  \let\next = #1%
  \begingroup
    \o:obeylines:
    \futurelet\temp\parseargx
}
\def\:tempc#1{\csname env:#1\endcsname\o:beginxxx:{#1}}
\HLet\beginxxx|=\:tempc
\def\:tempc#1{%
   \bgroup 
      \removeactivespaces{#1}%
      \xdef\end:thing{\the\toks0}%
   \egroup
   \o:endxxx:{#1}%
   \csname E:\end:thing\endcsname
   \csname endenv:\end:thing\endcsname}
\HLet\endxxx|=\:tempc
\long\def\ConfigureEnv#1#2#3{\expandafter\def\csname env:#1\endcsname{#2}%
  \expandafter\def\csname endenv:#1\endcsname{#3}}
>>>

\<texinfo lists\><<<
\NewConfigure{itemizeitem}{2}
\def\itemizeitem{%
   \advance\itemno by 1   {\let\par=\endgraf \smallbreak}%
   \ifhmode \errmessage{In hmode at itemizeitem}\fi
   \csname a:itemizeitem\l:st\endcsname
   {\itemcontents}\csname b:itemizeitem\l:st\endcsname}
\let\l:st|=\empty
>>>

\<texinfo lists\><<<
\NewConfigure{enumerate}[2]{%
   \def\a:enumerate{\def\l:st{en}#1}\def\E:enumerate{#2\let\l:st=\empty}%
   \Configure{itemizeitemen}}
\NewConfigure{itemizeitemen}{2}
\pend:def\enumerate{\a:enumerate}
\let\DeleteMark|=\:gobble
\Configure{enumerate}{}{}{}{}
>>>

\<texinfo lists\><<<
\NewConfigure{itemizeitemit}{2}
\NewConfigure{itemize}[2]{%
   \def\a:itemize{\def\l:st{it}#1}\def\E:itemize{#2\let\l:st=\empty}%
   \Configure{itemizeitemit}}
\pend:def\itemize{\a:itemize}
\Configure{itemize}{}{}{}{}
>>>


\<texinfo lists\><<<
\def\:tempc#1#2#3#4#5#6{%
   \o:tablez:{#1}{#2}{#3}{#4}{#5}{#6}\a:table \aftergroup\b:table
}
\HLet\tablez|=\:tempc
\pend:defI\itemzzz{\c:table}
\append:defI\itemzzz{\d:table}
\NewConfigure{table}{4}
>>>

\<texinfo titlepage\><<<
\def\:tempc{%
   \a:titlepage  \o:titlepage:
   \def\titlezzz##1{\a:title\leftline{\titlefonts\rm ##1}%
                    \b:title        \finishedtitlepagefalse}%
   \pend:defI\subtitlezzz{\a:subtitle}%
   \append:defI\subtitlezzz{\b:subtitle}%
   \pend:defI\authorzzz{\a:author}%
   \append:defI\authorzzz{\b:author}%
}
\HLet\titlepage=\:tempc

\append:def\Etitlepage{\b:titlepage}

\NewConfigure{titlepage}{2}
\NewConfigure{title}{2}
\NewConfigure{subtitle}{2}
\NewConfigure{author}{2}

\def\:temp{%
   \vskip\titlepagebottomglue
   \finishedtitlepagetrue
}
\HLet\finishtitlepage=\:temp
>>>





\<texinfo sections\><<<
\def\:tempd#1#2{%
   \expandafter\let\csname #1\endcsname=\:UnDef
   \expandafter\Def:Section\csname #1\endcsname{#2}{##1}%
   \expand:after{\expandafter\let\csname no:#1\endcsname=}\csname #1\endcsname
   \expandafter\outer\expandafter\def
      \csname #1\endcsname{\expandafter\parsearg\csname #1yyy\endcsname}%
   \def\:tempc##1{%     
     \let\sectionheading=\:gobbleIII
     \let\unnumbchapmacro=\:gobble
     \let\chapmacro=\:gobbleII 
     \let\centerchapmacro=\:gobble
     \csname o:#1zzz:\endcsname{##1}\csname no:#1\endcsname{##1}}
   \expandafter\HLet\csname #1zzz\endcsname=\:tempc}

\:tempd{chapter}{\the\chapno}
\:tempd{appendix}{\appendixletter}
\:tempd{unnumbered}{}
\:tempd{numberedsec}{\the\chapno.\the\secno}
\let\numberedsecyyy=\secyyy
\let\o:numberedseczzz:=\seczzz
\let\seczzz=\numberedseczzz

\:tempd{appendixsec}{\appendixletter.\the\secno}
\:tempd{unnumberedsec}{}
\:tempd{numberedsubsec}{\the\chapno.\the\secno.\the\subsecno}
\:tempd{appendixsubsec}{\appendixletter.\the\secno.\the\subsecno}
\:tempd{appendixsubsec}{\appendixletter.\the\secno.\the\subsecno}
\:tempd{unnumberedsubsec}{}
\:tempd{numberedsubsubsec}{\the\chapno.\the\secno
                      .\the\subsecno.\the\subsubsecno}
\:tempd{appendixsubsubsec}{\appendixletter.\the\secno
                          .\the\subsecno.\the\subsubsecno}
\:tempd{appendixsubsubsec}{\appendixletter.\the\secno
                          .\the\subsecno.\the\subsubsecno}
\:tempd{unnumberedsubsubsec}{}
\setcontentsaftertitlepagetrue
\NewConfigure{contents}{2}
\def\contents{\a:contents{\catcode`\\=0 
  \:TableOfContents[|<toc entries|>]}\b:contents}
>>>



\<toc entries\><<<
chapter,%
appendix,%
unnumbered,%
numberedsec,%
appendixsec,%
unnumberedsec,%
numberedsubsec,%
appendixsubsec,%
appendixsubsec,%
unnumberedsubsec,%
numberedsubsubsec,%
appendixsubsubsec,%
appendixsubsubsec,%
unnumberedsubsubsec%
>>>




\<texinfo index\><<<
\HAssign\cnt:idx=0
\def\dosubind#1#2#3{%
  \ifx\SETmarginindex\relax\else
    \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}%
  \fi
  {%
    \count255=\lastpenalty
    {%
      \indexdummies  \escapechar=`\\
      {%
        \let\folio = 0%
        \def\rawbackslashxx{\indexbackslash}% 
        \def\thirdarg{#3}%
        \ifx\thirdarg\emptymacro    \let\subentry = \empty
        \else                       \def\subentry{ #3}%
        \fi
        {\indexnofonts \xdef\indexsorttmp{#2\subentry}}%
        \toks0 = {#2}%
        \ifx\thirdarg\emptymacro \else
          \toks0 = \expandafter{\the\toks0 \space #3}%
        \fi
        \edef\temp{%
          \write\csname#1indfile\endcsname{%
            \realbackslash entry{\indexsorttmp}{\folio}{%
                   \string\Link[\FileName]{idx-\cnt:idx}{}\the\toks0
                   \string\EndLink}}%
        }%
        \iflinks
          \ifvmode
            \skip0 = \lastskip
            \ifdim\lastskip = 0pt \else \nobreak\vskip-\lastskip \fi
          \fi
          %
          \temp \hbox{\Link-{}{idx-\cnt:idx}\EndLink  }%
          \gHAdvance\cnt:idx by 1
          \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi
        \fi
      }%
    }%
    \penalty\count255
  }%
}
\def\:tempc#1{\begingroup 
   \pend:def\begindoublecolumns{\a:index}%
   \append:def\enddoublecolumns{\b:index}%
   \o:doprintindex:{#1}\endgroup}
\HLet\doprintindex=\:tempc

\def\entry#1#2{\begingroup  \parindent=0pt
  \par \c:index #1\d:index  \par \endgroup}
\NewConfigure{index}{4}
>>>



%%%%%%%%%%%%%%%%%%%%%%
\Chapter{LaTeX Documentation}
%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{doc.cls}
%%%%%%%%%%%%%%%%%%%%%%%%%%%


\<doc.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% doc.4ht                               |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

|<doc.sty|>
\Hinput{doc}
\endinput
>>>        \AddFile{9}{doc}

\<doc.sty\><<<
\:CheckOption{no^} \if:Option \else
   \catcode`\^^M|=13    \def\hat:A#1^^M{\egroup}    \catcode`\^^M|=5  %
   \def\hhat:A{\bgroup \catcode`\^^M|=13 \hat:A} 
   \Configure{\string^\string^}{A}{\hhat:A}
\fi
>>>

\<doc.sty\><<<
\def\:temp{{\rmfamily B\textsc{ib}\TeX}}
\HLet\BibTeX\:temp
\def\:temp{\textsc{Plain}\TeX}
\HLet\PlainTeX\:temp
>>>




\<doc.sty\><<<
\bgroup
   \let\:temp\StopEventually
   \OnlyDescription
   \ifx \:temp\StopEventually
      \let\:temp=\empty
   \else                                   |% \AlsoImplementation |%
      \def\:temp{\long\def\StopEventually##1{##1}}    
   \fi
\expandafter \egroup \:temp
>>>



\<doc.styNO\><<<
\bgroup
   \let\:temp\StopEventually
   \OnlyDescription
   \ifx \:temp\StopEventually
      \let\:temp=\empty
   \else                                  |% \AlsoImplementation |%
      \def\:temp{\let\StopEventually=\relax }%    
   \fi
\expandafter \egroup \:temp
>>>



% \def\:temp{\leavevmode\hbox{$\mathcal A\hbox{$\mathcal M$}\mathcal S$-\TeX}}
% \HLet\AmSTeX\:temp
% \def\:temp{{\rmfamily SL{\scshape i}\TeX}}
% \HLet\SliTeX\:temp

\<doc.sty\><<<
\HRestore\maketitle
>>>


\<doc.sty\><<<
\:CheckOption{broken-index} \if:Option 
  |<doc warning|>
  \pend:defI\codeline@wrindex{\if@filesw
     \title:chs{\html:addr
              \hbox{\Link-{}{|<haddr prefix|>\last:haddr}\EndLink}}{}%
      \immediate\write\@indexfile{\string \beforeentry{\RefFileNumber
           \FileNumber}{\title:chs{|<haddr prefix|>\last:haddr}{\cur:th
           \:currentlabel}}{\a:makeindex}}\fi}
\else  
  \def\warn:idx#1{%
    \expandafter\ifx \csname #1warn:idx\endcsname\relax
       \expandafter\global
           \expandafter\let \csname #1warn:idx\endcsname\def
       \:warning{If not done so, the index is to be processed by
        ^^J\space\space  makeindex -o #1.ind #1.idx
       }%
       {\Configure{Needs}{File: #1.4idx}\Needs{}}%
    \fi}
\fi
>>>



%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{holtxdoc.sty}
%%%%%%%%%%%%%%%%%%%%%%%%%%%

\<holtxdoc.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% holtxdoc.4ht                          |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<holtxdoc configs|>
\Hinput{holtxdoc}
\endinput
>>>        \AddFile{9}{holtxdoc}


\<holtxdoc configs\><<<
\pend:defI\HistVersion{\begingroup
   \let\sv:subsection=\subsection
   \def\subsection####1####2{####2}%
   \let\sv:addcontentsline=\addcontentsline
   \def\addcontentsline####1####2####3{%
      \sv:addcontentsline{####1}{####2}{####3}%
      \sv:subsection*}%
   \:gobble
}
>>>


%%%%%%%%%%%%%%%%%%
\Chapter{src art/rep/book}
%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%
\Section{srcbook}
%%%%%%%%%%%%%%%%%%

See report at screnggu.tex


\<scrbook.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% scrbook.4ht                           |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\let\o:maketitle:|=\maketitle
|<general scrbook|>
|<addchap confic|>
|<scr artcl, reprt, book|>
\HRestore\maketitle
\Hinput{scrbook}
\endinput
>>>        \AddFile{9}{scrbook}


\<scr artcl, reprt, book\><<<
\Def:Section\minisec{}{#1}  
\let\:minisec=\minisec 
\def\minisec#1{\:minisec{#1}\@afterheading}
>>>







%%%%%%%%%%%%%%%%%%
\Section{srcbook}
%%%%%%%%%%%%%%%%%%

\<scrartcl.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% scrartcl.4ht                          |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\input article.4ht
|<scr artcl, reprt, book|>
\Hinput{scrartcl}
\endinput
>>>        \AddFile{9}{scrartcl}


%%%%%%%%%%%%%%%%%%
\Section{srcbook}
%%%%%%%%%%%%%%%%%%

\<scrreprt.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% scrreprt.4ht                           |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<general scrreprt|>
|<addchap confic|>
|<scr artcl, reprt, book|>
\Hinput{scrreprt}
\endinput
>>>        \AddFile{9}{scrreprt}

%%%%%%%%%%%%%%%%%%
\Section{maketitle}
%%%%%%%%%%%%%%%%%%


\<general scrreprt\><<<
|<redefine maketitle|>
|<scr title page|>
>>>

\<general scrbook\><<<
|<redefine maketitle|>
|<scr title page|>
>>>

\<scr title page\><<<
\pend:def\titlepage{%
   \cfg:maketitle
}
\def\cfg:maketitle{%
   \global\let\cfg:maketitle\empty   
   \ifx\@dedication\@empty \else
      \pend:def\@dedication{\a:dedication}%
      \append:def\@dedication{\b:dedication}%
   \fi
   \pend:def\@title{\a:ttl}\append:def\@title{\b:ttl}%
   \pend:def\@author{\a:aut}\append:def\@author{\b:aut}%
   \pend:def\@date{\a:dat}\append:def\@date{\b:dat}%
   \def\and{\a:and}
}
\NewConfigure{dedication}{2}
>>>



%%%%%%%%%%%%%%%%%%
\Section{TOC}
%%%%%%%%%%%%%%%%%%%



\<scrbook toc\><<<
|<book et al tocs|>
\edef\:TOC{%
   \noexpand\ifx [\noexpand\:temp
      \noexpand\expandafter\noexpand\:TableOfContents
   \noexpand\else
      \noexpand\Auto:ent{\ifnum \c@tocdepth >-2 part,\fi
\expandafter\ifx \csname @chapter\endcsname\relax
   \ifnum \c@tocdepth >\z@  section,\fi
\else
   \ifnum \c@tocdepth >\m@ne chapter,appendix,addchap,\fi
   \ifnum \z@>\c@tocdepth\else section,\fi
   \ifnum 1>\c@tocdepth \else subsection,\fi
\fi
\ifnum 2>\c@tocdepth \else subsection,\fi
\ifnum 3>\c@tocdepth \else subsubsection,\fi
\ifnum 4>\c@tocdepth \else paragraph,\fi
\ifnum 5>\c@tocdepth \else subparagraph,\fi
UnDFexyz}%
   \noexpand\fi}
\def\:tableofcontents{\futurelet\:temp\:TOC}
\def\Auto:ent#1{%
   \edef\auto:toc{\noexpand\:TableOfContents[\ifx \auto:toc\:UnDef
      #1\else \auto:toc \fi]}  \auto:toc
   \global\let\auto:toc\:UnDef }

\def\:tocs{\noexpand\:tableofcontents}
\pend:defIII\addcontentsline{%
   \def\:temp{##1}\def\:tempa{toc}\ifx \:temp\:tempa
   \gHAdvance\TitleCount  1 \fi }
\def\@dottedtocline#1#2#3#4#5{\hbox{\def\numberline##1{\e:listof
                ##1\f:listof}\c:listof#4\d:listof}\ignorespaces}
\def\@starttoc#1{%
  \begingroup
    \makeatletter   \Configure{cite}{}{}{}{}%
    \def\:temp{#1}\def\:tempa{toc}%
    \a:listof\par
    \@input{\jobname.\ifx \:temp\:tempa 4ct\else #1\fi}%
    \b:listof
    \if@filesw
      \expandafter\expandafter\csname
          newwrite\endcsname\csname tf@#1\endcsname
      \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
    \fi
    \global\@nobreakfalse
  \endgroup}

\NewConfigure{tableofcontents*}[1]{%
   \def\:tempa{#1}\ifx\empty\:tempa
      \ifx \au:StartSec\:UnDef \else \gdef\:StartSec{\au:StartSec}\fi
   \else
      \edef\auto:toc{#1}%
         \ifx \au:StartSec\:UnDef
            \let\au:StartSec\:StartSec
            \def\:StartSec{\:tableofcontents
               \global\let\auto:toc\:UnDef \:StartSec}%
            \pend:def\:tableofcontents{\gdef\:StartSec{\au:StartSec}}%
   \fi  \fi
}
>>>



%%%%%%%%%%%%%%%%%%
\Section{other}
%%%%%%%%%%%%%%%%%%%


\<scr artcl, reprt, book\><<<
\pend:defI\@makefntext{\IgnorePar}
>>>

\<general scrbook\><<<
\Configure{UndefinedSec}{likepart}
\Configure{UndefinedSec}{likechapter}
\Configure{UndefinedSec}{likesection}
\Configure{UndefinedSec}{likesubsection}
|<<book et al tocs|>

\let\:tempb\chapter
\Def:Section\chapter{\thechapter}{#1}
\let\:chapter\chapter
\let\chapter\:tempb
\def\@makechapterhead#1{}
\let\no@chapter\@chapter
\def\@chapter[#1]#2{%
   |<adjust minipageNum for setcounter footnote 0|>%
   {\SkipRefstepAnchor \let\addcontentsline\:gobbleIII\no@chapter[#1]{}}%
   \HtmlEnv   \Toc:Title{#1}\:chapter{#2}}
\Def:Section\likechapter{}{#1}
\let\:likechapter\likechapter
\let\likechapter\:UnDef
\let\no@schapter\@schapter
\def\@schapter#1{%
   {\let\addcontentsline\:gobbleIII\no@schapter{}}%
   \HtmlEnv   \:likechapter{#1}}
\let\no@appendix\appendix
\Def:Section\appendix{\thechapter}{#1}
\let\:appendix\appendix
\def\appendix{%
   \def\@chapter[##1]##2{%
      |<adjust minipageNum for setcounter footnote 0|>%
      {\def\addcontentsline####1####2####3{}\no@chapter[##1]{}}%
      \HtmlEnv \Toc:Title{##1}\:appendix{##2}}%
   \no@appendix}
|<scrbook toc|>
     
\ifx \@openbib@code\:UnDef \else
 \pend:def\@openbib@code{\labelsep\z@}
\fi
\def\:temp#1#2!*?: {\def\:temp{#1}}
\expandafter\:temp\usepackage!*?: 
\def\:tempa{\@latex@e@error}
\ifx \:temp\:tempa \else
   \def\:tempa#1#2#3#4{\tmp:toks{#1{#2}}%
   \long\expandafter\edef\csname #4 \endcsname{\the\tmp:toks
        {\expandafter\noexpand
   \csname o:\expandafter\:gobble\string #3:\endcsname}}}
\def\:temp#1{%
  \expandafter\expandafter\expandafter\:tempa\csname #1 \endcsname{#1}}
\:temp{rm}
\:temp{sf}
\:temp{tt}
\:temp{bf}
\:temp{it}

\fi
  \let\:tempc\listoffigures
\pend:def\:tempc{\begingroup \a:listoffigures
   \def\@starttoc{\:tableofcontents[lof]\:gobble}}
\append:def\:tempc{\b:listoffigures \endgroup}
\HLet\listoffigures\:tempc
\let\:tempc\listoftables
\pend:def\:tempc{\begingroup \a:listoftables
   \def\@starttoc{\:tableofcontents[lot]\:gobble}}
\append:def\:tempc{\b:listoftables \endgroup}
\HLet\listoftables\:tempc

  \NewConfigure{listoffigures}{2}
\NewConfigure{listoftables}{2}

\ifx \part\:UnDef\else
   \def\@part[#1]#2{%
    \ifnum \c@secnumdepth >-2\relax
      \SkipRefstepAnchor \refstepcounter{part}%
      \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
    \else
      \addcontentsline{toc}{part}{#1}%
    \fi
    \csname @endpart\endcsname}
\let\:tempb\part
\Def:Section\part{\thepart}{#1}
\let\:part\part
\let\part\:tempb
\let\no@part\@part
\def\@part[#1]#2{%
   {\let\addcontentsline\:gobbleIII\no@part[#1]{}}%
   \HtmlEnv   \Toc:Title{#1}\:part{#2}}
\Def:Section\likepart{}{#1}
\let\:likepart\likepart
\let\likepart\:UnDef
\let\no@spart\@spart
\def\@spart#1{%
   {\let\addcontentsline\:gobbleIII\no@spart{}}%
   \HtmlEnv   \:likepart{#1}}

\fi
\ifx \section\:UnDef\else
   \let\no@section\section
\Def:Section\section{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesection \fi}{#1}
\let\no:section\section
\def\section{\rdef:sec{section}}
\Def:Section\likesection{}{#1}
\let\:likesection\likesection
\let\likesection\:UnDef

\fi
\let\no@subsection\subsection
\Def:Section\subsection{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesubsection \fi}{#1}
\let\no:subsection\subsection
\def\subsection{\rdef:sec{subsection}}
\Def:Section\likesubsection{}{#1}
\let\:likesubsection\likesubsection
\let\likesubsection\:UnDef

\let\no@subsubsection\subsubsection
\Def:Section\subsubsection{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesubsubsection \fi}{#1}
\let\no:subsubsection\subsubsection
\def\subsubsection{\rdef:sec{subsubsection}}
\Def:Section\likesubsubsection{}{#1}
\let\:likesubsubsection\likesubsubsection
\let\likesubsubsection\:UnDef

\let\no@paragraph\paragraph
\Def:Section\paragraph{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \theparagraph \fi}{#1}
\let\no:paragraph\paragraph
\def\paragraph{\rdef:sec{paragraph}}
\Def:Section\likeparagraph{}{#1}
\let\:likeparagraph\likeparagraph
\let\likeparagraph\:UnDef
\let\no@subparagraph\subparagraph
\Def:Section\subparagraph{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesubparagraph \fi}{#1}
\let\no:subparagraph\subparagraph
\def\subparagraph{\rdef:sec{subparagraph}}
\Def:Section\likesubparagraph{}{#1}
\let\:likesubparagraph\likesubparagraph
\let\likesubparagraph\:UnDef





\NewConfigure{caption}[4]{\c:def\cptA:{#1}\c:def\cptB:{#2}%
   \c:def\cptC:{#3}\c:def\cptD:{#4}}
\long\def\@makecaption#1#2{%   
   {\cptA: \cap:ref{#1}%
\cptB:}{\cptC:{#2}\cptD:}}


\pend:def\caption{\SkipRefstepAnchor}
\append:def\quote{\par\@totalleftmargin\z@}
|<book-report-article idx|>

\NewConfigure{maketitle}[4]{\c:def\a:mktl{#1}\c:def\b:mktl{#2}%
   \c:def\a:ttl{#3}\c:def\b:ttl{#4}}
\NewConfigure{thanks author date and}[8]{%
   \c:def\a:thanks{#1}\c:def\b:thanks{#2}\c:def\a:aut{#3}\c:def\b:aut{#4}%
   \c:def\a:dat{#5}\c:def\b:dat{#6}\c:def\a:and{#7}\c:def\e:mktl{#8}}


\append:def\quotation{\a:quotation\par\@totalleftmargin\z@}
\NewConfigure{quotation}{1}
\NewConfigure{listof}{6}

\ConfigureToc{likeparagraph} {}{\empty}{}{\newline}
\ConfigureToc{likepart} {}{\empty}{}{\newline}
\ConfigureToc{likesection} {}{\empty}{}{\newline}
\ConfigureToc{likesubparagraph} {}{\empty}{}{\newline}
\ConfigureToc{likesubsection} {}{\empty}{}{\newline}
\ConfigureToc{likesubsubsection} {}{\empty}{}{\newline}
\ConfigureToc{paragraph} {\empty}{\ }{}{\newline}
\ConfigureToc{part} {\empty}{\ }{}{\newline}
\ConfigureToc{section} {\empty}{\ }{}{\newline}
\ConfigureToc{subparagraph} {\empty}{\ }{}{\newline}
\ConfigureToc{subsection} {\empty}{\ }{}{\newline}
\ConfigureToc{subsubsection} {\empty}{\ }{}{\newline}

\ConfigureToc{appendix} {\empty}{\ }{}{\newline}
\ConfigureToc{chapter} {\empty}{\ }{}{\newline}
\ConfigureToc{likechapter} {}{\empty}{}{\newline}
>>>







\<general scrreprt\><<<
\Configure{UndefinedSec}{likepart}
\Configure{UndefinedSec}{likechapter}
\Configure{UndefinedSec}{likesection}
\Configure{UndefinedSec}{likesubsection}
|<book et al tocs|>

\let\:tempb\chapter
\Def:Section\chapter{\thechapter}{#1}
\let\:chapter\chapter
\let\chapter\:tempb
\def\@makechapterhead#1{}
\let\no@chapter\@chapter
\def\@chapter[#1]#2{%
   |<adjust minipageNum for setcounter footnote 0|>%
   {\SkipRefstepAnchor \let\addcontentsline\:gobbleIII\no@chapter[#1]{}}%
   \HtmlEnv   \Toc:Title{#1}\:chapter{#2}}
\Def:Section\likechapter{}{#1}
\let\:likechapter\likechapter
\let\likechapter\:UnDef
\let\no@schapter\@schapter
\def\@schapter#1{%
   {\let\addcontentsline\:gobbleIII\no@schapter{}}%
   \HtmlEnv   \:likechapter{#1}}
\let\no@appendix\appendix
\Def:Section\appendix{\thechapter}{#1}
\let\:appendix\appendix
\def\appendix{%
   \def\@chapter[##1]##2{%
      |<adjust minipageNum for setcounter footnote 0|>%
      {\def\addcontentsline####1####2####3{}\no@chapter[##1]{}}%
      \HtmlEnv \Toc:Title{##1}\:appendix{##2}}%
   \no@appendix}

\NewConfigure{caption}[4]{\c:def\cptA:{#1}\c:def\cptB:{#2}%
   \c:def\cptC:{#3}\c:def\cptD:{#4}}
\long\def\@makecaption#1#2{%   
   {\cptA: \cap:ref{#1}%
\cptB:}{\cptC:{#2}\cptD:}}


\pend:def\caption{\SkipRefstepAnchor}
\append:def\quote{\par\@totalleftmargin\z@}
|<book-report-article idx|>
\NewConfigure{maketitle}[4]{\c:def\a:mktl{#1}\c:def\b:mktl{#2}%
   \c:def\a:ttl{#3}\c:def\b:ttl{#4}}
\NewConfigure{thanks author date and}[8]{%
   \c:def\a:thanks{#1}\c:def\b:thanks{#2}\c:def\a:aut{#3}\c:def\b:aut{#4}%
   \c:def\a:dat{#5}\c:def\b:dat{#6}\c:def\a:and{#7}\c:def\e:mktl{#8}}


\append:def\quotation{\a:quotation\par\@totalleftmargin\z@}
\NewConfigure{quotation}{1}
\NewConfigure{listof}{6}

|<scrreprt toc|>
     
\ifx \@openbib@code\:UnDef \else
 \pend:def\@openbib@code{\labelsep\z@}
\fi
\def\:temp#1#2!*?: {\def\:temp{#1}}
\expandafter\:temp\usepackage!*?: 
\def\:tempa{\@latex@e@error}
\ifx \:temp\:tempa \else
   \def\:tempa#1#2#3#4{\tmp:toks{#1{#2}}%
   \long\expandafter\edef\csname #4 \endcsname{\the\tmp:toks
        {\expandafter\noexpand
   \csname o:\expandafter\:gobble\string #3:\endcsname}}}
\def\:temp#1{%
  \expandafter\expandafter\expandafter\:tempa\csname #1 \endcsname{#1}}
\:temp{rm}
\:temp{sf}
\:temp{tt}
\:temp{bf}
\:temp{it}

\fi
  \let\:tempc\listoffigures
\pend:def\:tempc{\begingroup \a:listoffigures
   \def\@starttoc{\:tableofcontents[lof]\:gobble}}
\append:def\:tempc{\b:listoffigures \endgroup}
\HLet\listoffigures\:tempc
\let\:tempc\listoftables
\pend:def\:tempc{\begingroup \a:listoftables
   \def\@starttoc{\:tableofcontents[lot]\:gobble}}
\append:def\:tempc{\b:listoftables \endgroup}
\HLet\listoftables\:tempc

  \NewConfigure{listoffigures}{2}
\NewConfigure{listoftables}{2}

\ifx \part\:UnDef\else
   \def\@part[#1]#2{%
    \ifnum \c@secnumdepth >-2\relax
      \SkipRefstepAnchor \refstepcounter{part}%
      \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
    \else
      \addcontentsline{toc}{part}{#1}%
    \fi
    \csname @endpart\endcsname}
\let\:tempb\part
\Def:Section\part{\thepart}{#1}
\let\:part\part
\let\part\:tempb
\let\no@part\@part
\def\@part[#1]#2{%
   {\let\addcontentsline\:gobbleIII\no@part[#1]{}}%
   \HtmlEnv   \Toc:Title{#1}\:part{#2}}
\Def:Section\likepart{}{#1}
\let\:likepart\likepart
\let\likepart\:UnDef
\let\no@spart\@spart
\def\@spart#1{%
   {\let\addcontentsline\:gobbleIII\no@spart{}}%
   \HtmlEnv   \:likepart{#1}}

\fi
\ifx \section\:UnDef\else
   \let\no@section\section
\Def:Section\section{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesection \fi}{#1}
\let\no:section\section
\def\section{\rdef:sec{section}}
\Def:Section\likesection{}{#1}
\let\:likesection\likesection
\let\likesection\:UnDef
\fi
\let\no@subsection\subsection
\Def:Section\subsection{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesubsection \fi}{#1}
\let\no:subsection\subsection
\def\subsection{\rdef:sec{subsection}}
\Def:Section\likesubsection{}{#1}
\let\:likesubsection\likesubsection
\let\likesubsection\:UnDef
\let\no@subsubsection\subsubsection
\Def:Section\subsubsection{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesubsubsection \fi}{#1}
\let\no:subsubsection\subsubsection
\def\subsubsection{\rdef:sec{subsubsection}}
\Def:Section\likesubsubsection{}{#1}
\let\:likesubsubsection\likesubsubsection
\let\likesubsubsection\:UnDef
\let\no@paragraph\paragraph
\Def:Section\paragraph{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \theparagraph \fi}{#1}
\let\no:paragraph\paragraph
\def\paragraph{\rdef:sec{paragraph}}
\Def:Section\likeparagraph{}{#1}
\let\:likeparagraph\likeparagraph
\let\likeparagraph\:UnDef
\let\no@subparagraph\subparagraph
\Def:Section\subparagraph{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesubparagraph \fi}{#1}
\let\no:subparagraph\subparagraph
\def\subparagraph{\rdef:sec{subparagraph}}
\Def:Section\likesubparagraph{}{#1}
\let\:likesubparagraph\likesubparagraph
\let\likesubparagraph\:UnDef
\ConfigureToc{likeparagraph} {}{\empty}{}{\newline}
\ConfigureToc{likepart} {}{\empty}{}{\newline}
\ConfigureToc{likesection} {}{\empty}{}{\newline}
\ConfigureToc{likesubparagraph} {}{\empty}{}{\newline}
\ConfigureToc{likesubsection} {}{\empty}{}{\newline}
\ConfigureToc{likesubsubsection} {}{\empty}{}{\newline}
\ConfigureToc{paragraph} {\empty}{\ }{}{\newline}
\ConfigureToc{part} {\empty}{\ }{}{\newline}
\ConfigureToc{section} {\empty}{\ }{}{\newline}
\ConfigureToc{subparagraph} {\empty}{\ }{}{\newline}
\ConfigureToc{subsection} {\empty}{\ }{}{\newline}
\ConfigureToc{subsubsection} {\empty}{\ }{}{\newline}
\ConfigureToc{appendix} {\empty}{\ }{}{\newline}
\ConfigureToc{chapter} {\empty}{\ }{}{\newline}
\ConfigureToc{likechapter} {}{\empty}{}{\newline}
>>>


\<scrreprt toc\><<<
|<book et al tocs|>
\edef\:TOC{%
   \noexpand\ifx [\noexpand\:temp
      \noexpand\expandafter\noexpand\:TableOfContents
   \noexpand\else
      \noexpand\Auto:ent{\ifnum \c@tocdepth >-2 part,\fi
   \ifnum \c@tocdepth >\m@ne chapter,appendix,addchap,\fi
   \ifnum \z@>\c@tocdepth\else section,\fi
   \ifnum 1>\c@tocdepth \else subsection,\fi
\ifnum 2>\c@tocdepth \else subsection,\fi
\ifnum 3>\c@tocdepth \else subsubsection,\fi
\ifnum 4>\c@tocdepth \else paragraph,\fi
\ifnum 5>\c@tocdepth \else subparagraph,\fi
UnDFexyz}%
   \noexpand\fi}
\def\:tableofcontents{\futurelet\:temp\:TOC}
\def\Auto:ent#1{%
   \edef\auto:toc{\noexpand\:TableOfContents[\ifx \auto:toc\:UnDef
      #1\else \auto:toc \fi]}  \auto:toc
   \global\let\auto:toc\:UnDef }
\def\:tocs{\noexpand\:tableofcontents}
\pend:defIII\addcontentsline{%
   \def\:temp{##1}\def\:tempa{toc}\ifx \:temp\:tempa
   \gHAdvance\TitleCount  1 \fi }
\def\@dottedtocline#1#2#3#4#5{\hbox{\def\numberline##1{\e:listof
                ##1\f:listof}\c:listof#4\d:listof}\ignorespaces}
\def\@starttoc#1{%
  \begingroup
    \makeatletter   \Configure{cite}{}{}{}{}%
    \def\:temp{#1}\def\:tempa{toc}%
    \a:listof\par
    \@input{\jobname.\ifx \:temp\:tempa 4ct\else #1\fi}%
    \b:listof
    \if@filesw
      \expandafter\expandafter\csname
          newwrite\endcsname\csname tf@#1\endcsname
      \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
    \fi
    \global\@nobreakfalse
  \endgroup}
\NewConfigure{tableofcontents*}[1]{%
   \def\:tempa{#1}\ifx\empty\:tempa
      \ifx \au:StartSec\:UnDef \else \gdef\:StartSec{\au:StartSec}\fi
   \else
      \edef\auto:toc{#1}%
         \ifx \au:StartSec\:UnDef
            \let\au:StartSec\:StartSec
            \def\:StartSec{\:tableofcontents
               \global\let\auto:toc\:UnDef \:StartSec}%
            \pend:def\:tableofcontents{\gdef\:StartSec{\au:StartSec}}%
   \fi  \fi
}
>>>



\<addchap confic\><<<
\ifx \@@maybeautodot\:UnDef
   |<pre 2001 addchap|>
\else
   |<2001 addchap|>
\fi
\let\:makeschapterhead=\@makeschapterhead
\def\::makeschapterhead#1{\:makeschapterhead{\normalfont\normalsize
    \:addchap {#1}}}
\pend:def\addchap{\let\@makeschapterhead\::makeschapterhead}
\pend:def\chapter{\let\@makeschapterhead\:makeschapterhead}
\let\:tempb=\addchap
\Def:Section\addchap{}{#1} 
\let\:addchap=\addchap
\let\addchap=\:tempb
\ConfigureToc{addchap} {\empty}{\ }{}{\newline}
>>>

\<pre 2001 addchap\><<<
\let\add:chap=\@addchap
\def\@addchap{%
   \let\chap:addcontentsline=\addcontentsline
   \def\addcontentsline{\let\addcontentsline\chap:addcontentsline
       \:gobbleIII }%
  \add:chap}
>>>

\<2001 addchap\><<<
\let\no@addchap\@addchap
\def\@addchap[#1]#2{%
   \HtmlEnv \Toc:Title{#1}\:addchap{#2}}
>>>



%%%%%%%%%%%%%%%%%%%
\Chapter{letter}
%%%%%%%%%%%%%%%%%


\<letter.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
% letter.4ht                            |version %
% Copyright (C) |CopyYear.2002.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<letter class|>
\Hinput{letter}
\endinput
>>>                        \AddFile{6}{letter}




\<letter class\><<<
\def\:temp#1{\a:opening
   \ifx \@empty \fromaddress\else
      \pend:def\fromaddress{\a:address}%
      \append:def\fromaddress{\b:address}%
   \fi
   \ifx \@empty \toaddress\else
      \pend:def\toaddress{\a:toaddress}%
      \append:def\toaddress{\b:toaddress}%
   \fi
   \ifx \@empty \toname\else
      \pend:def\toname{\a:toname}%
      \append:def\toname{\b:toname}%
   \fi
   \pend:def\@date{\a:date}%
   \append:def\@date{\b:date}%
     \o:opening:{\a:dear#1\b:dear}%
   \b:opening}
\HLet\opening\:temp
\def\:temp#1{%
   \ifx\@empty\fromsig\else 
      \pend:def\fromsig{\a:signature}%
      \append:def\fromsig{\b:signature}%
   \fi
   \a:closing
   \o:closing:{\a:sincerely#1\b:sincerely}%
   \b:closing}
\HLet\closing\:temp
>>>

\<letter class\><<<
\pend:defI\cc{\a:cc}
\append:defI\cc{\b:cc}
\pend:defI\encl{\a:encl}
\append:defI\encl{\b:encl}
\AtBeginDocument{\let\@mlabel\@gobbletwo}
>>>

\<letter class\><<<
\NewConfigure{address}{2}
\NewConfigure{cc}{2}
\NewConfigure{closing}{2}
\NewConfigure{date}{2}
\NewConfigure{dear}{2}
\NewConfigure{encl}{2}
\NewConfigure{opening}{2}
\NewConfigure{signature}{2}
\NewConfigure{sincerely}{2}
\NewConfigure{toaddress}{2}
\NewConfigure{toname}{2}
>>>



%%%%%%%%%%%%%%%%%%%
\Chapter{elseart}
%%%%%%%%%%%%%%%%%


\Link[http://ctan.tug.org/ctan/tex-archive/macros/latex/contrib/supported/elsevier/]{}{}elsevier\EndLink




\<elsart.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% elsart.4ht                            |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\edef\@ptsize{\ifdim \normalbaselineskip>14pt 2\else
   \ifdim \normalbaselineskip>13pt 2\else 0\fi\fi}
\input article.4ht
|<elsevier cls|>
\Hinput{elsart}
\endinput
>>>        \AddFile{9}{elsart}



\<elsevier cls\><<<
\@twocolumnfalse \@TwoColumnfalse
\let\endtable|=\end@float
\let\endalgorithm|=\end@float
\let\endfigure|=\end@float
|<elsart sup|>
\def\@makecaption{\@makefigurecaption}
\long\def\@makefigurecaption#1#2{%  
   {\cptA: |<caption and ref/tag|>\cptB:}{\cptC:{#2}\cptD:}}
\long\def\@maketablecaption#1#2{\@tablecaptionsize
    \global \@minipagefalse
    \hbox{{\cptA: |<caption and ref/tag|>\cptB:}{\cptC:{#2}\cptD:}}}
>>>




\<elsart sup\><<<
\def\@mpmakefnmark{\,\hbox{$\sp{\mathrm{\@thefnmark}}$}}
\long\def\@mpmakefntext#1{\noindent
                     \hbox{$\sp{\mathrm{\@thefnmark}}$} #1}
\def\itnuc#1#2{\setbox\@tempboxa=\hbox{\scriptsize\it #1}
  \def\@tempa{{}\sp{\box\@tempboxa}\!\protect\text{\it #2}}\relax
  \ifmmode \@tempa \else $\@tempa$\fi}

\def\address@fmt#1#2#3#4{\@newelemtrue
  \if@Elproofing\def\@eltag{#4}\else\def\@eltag{\theaddress}\fi
  \ifnum\prev@elem=\e@address \@newelemfalse \fi
  \if@newelem \address@fmt@init \fi
  \noindent \bgroup \@addressstyle
  \ifnum#1=\z@
    #3\,$\sp{\mathrm{#2}}$\space%
  \else
    \ifnum#1=\m@ne
      $\sp{\phantom{\mathrm{\@eltag}}}$\space #3\,$\sp{\mathrm{#2}}$%
    \else
      $\sp{\mathrm{\@eltag}}\space$#3\,$\sp{\mathrm{#2}}$%
    \fi
  \fi
  \par \egroup}
\def\collab@fmt#1#2#3{\@newelemtrue
  \ifnum\prev@elem=\e@collab \global\@newelemfalse \fi
  \if@newelem \collab@fmt@init \fi
  \par                                 % Start new paragraph
  {\large #3\,$\sp{\mathrm{#2}}$}}
\def\@makefnmark{\,\hbox{$\sp{\fn@presym\mathrm{\@thefnmark}}$}\,}
\def\nuc#1#2{\relax\ifmmode{\HCode{}}\sp{#1}{\protect\text{#2}}\else
    ${\HCode{}}\sup{#1}$#2\fi}
|<elsart titles|>
>>>

\<elsart titles\><<<
\def\title@fmt#1#2{%
\@ifundefined{@runtitle}{\global\def\@runtitle{#1}}{}%
 \vspace*{12pt}             
  {\@titlesize\a:title #1\,\hbox{$\sp{#2}$}\b:title\par}%
  \vskip\@undertitleskip
\vskip24\p@  % Vertical space below title
  }
\def\subtitle@fmt#1#2{%               % No vertical space above sub-title
  {\@titlesize \a:subtitle#1\b:subtitle\,\hbox{$\sp{#2}$}}\par}
\NewConfigure{title}{2}
\NewConfigure{subtitle}{2}
>>>

\<elsevier cls\><<<
\def\endfrontmatter{%
  \ifx\@runauthor\relax
   \global\let\@runauthor\@runningauthor
  \fi
  \global\n@author=\c@author
  \global\n@collab=\c@collab \@writecount
  \global\@topnum\z@
  \thispagestyle{copyright}%            % Format rest of front matter:
  \if@preface \else                     % IF not preface THEN
  \vskip \@overhistoryskip
  \history@fmt                          % print history (received, ...)
  \newcount\c@sv@footnote
  \global\c@sv@footnote=\c@footnote     % save current footnote number
  \if@hasabstract                       % IF abstract/ keywords THEN
   \vskip \@preabstractskip     % Space above rule
%  \hrule height 0.4\p@                 % Rule above abstract/keywords
    \vskip 8\p@
    \unvbox\t@abstract                  % print abstract, if any
  \fi
  \if@haskeywords                       % IF keywords THEN
    \vskip \@overkeywordskip
    \unvbox\t@keyword                   % Keyword abstract, if any
  \fi                                   % FI
  \vskip 10\p@
%  \hrule height 0.4\p@                 % rule below abstract/keywords
  \dedicated@fmt                        % print dedication
  \vskip \@belowfmskip                  % Vertical space below frontmatter
\fi                                   % FI
  \close@fm                             % Close front matter material.
   \output@glob@notes  % Put notes at bottom of 1st page
  \global\c@footnote=\c@sv@footnote     % restore footnote number
  \global\@prefacefalse
  \global\leftskip\z@                   % Restore the normal values of
  \global\@rightskip\z@                 % \leftskip,
  \global\rightskip\@rightskip          % \rightskip and
  \global\mathsurround\sv@mathsurround  % \mathsurround.
  \let\title\relax       \let\author\relax
  \let\collab\relax      \let\address\relax
  \let\frontmatter\relax \let\endfrontmatter\relax
  \let\@maketitle\relax  \let\@@maketitle\relax
  \normal@text
}
|<elsevier thankref|>
|<elsevier abstract|>
|<elsevier keywords|>
>>>


\<elsevier abstract\><<<
\def\:temp{%
    \let\no:indent\noindent
    \def\noindent{%
       \global\let\noindent\no:indent 
       \append:def\abstractname{\aftergroup\b:abstract}%
       \a:abstract \noindent}%
    \pend:def\endabstract{\c:abstract}\o:@abstract:}
\HLet\@abstract|=\:temp
\NewConfigure{abstract}{3}
>>>

\<elsevier keywords\><<<
\def\:temp{%
    \let\no:indent\noindent
    \def\noindent{%
       \global\let\noindent\no:indent 
       \a:keyword \noindent}%
    \pend:def\endkeyword{\b:keyword}\o:keyword:}
\HLet\keyword|=\:temp
\NewConfigure{keyword}{2}
>>>

\<elsevier thankref\><<<
\def\thanks{\@ifnextchar[{\@tempswatrue
  \thanks@optarg}{\@tempswafalse\thanks@optarg[]}}
\def\thanks@optarg[#1]#2{\SkipRefstepAnchor
  \refstepcounter{footnote}
  \if@tempswa\label{#1}\else\relax\fi
  \add@tok\t@glob@notes{\els:footnotetext}%
  \add@xtok\t@glob@notes{{#1}[\the\c@footnote]}%
  \add@tok\t@glob@notes{{#2}}}
\def\els:footnotetext#1[#2]#3{%
   \footnotetext[#2]{{\def\rEfLiNK##1##2{\Link{}{##1}\EndLink}%
   \ref{#1}}#3}}
\def\author@fmt#1#2#3{\@newelemtrue
  \if@firstauthor
  \first@author \global\@firstauthorfalse \fi
  \ifnum\prev@elem=\e@author \global\@newelemfalse \fi
  \if@newelem \author@fmt@init \fi
  \edef\@tempb{#2}\ifx\@tempb\@empty
    \hbox{{\author@font #3}}\else
    \hbox{{\author@font #3}\,$\sp{\mathrm{#2}}$}%
  \fi}
>>>




%%%%%%%%%%%%%%%%%%%%%
\Chapter{American Psychological Association (APA)}
%%%%%%%%%%%%%%%%%%%%%


\<apa.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% apa.4ht                               |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\let\apa:Hinput=\Hinput
\def\Hinput#1{%
   \apa:Hinput{#1}%
   \def\:temp{#1}\def\:tempa{article}\ifx \:temp\:tempa
      \let\Hinput=\apa:Hinput
      \input apa-a.4ht
   \fi
}
\endinput
>>>        \AddFile{9}{apa}




\<apa-a.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% apa-a.4ht                             |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<apa code|>
\Hinput{apa}
\endinput
>>>        \AddFile{9}{apa-a}

\<apa code\><<<
\append:def\maketitle{\egroup}
\pend:def\maketitle{%
  \bgroup  
  \ConfigureEnv{figure}{\def\makebox[########1]########2{}}{}{}{}%
  \@ifundefined{@abstract}{}{%
     \pend:def\@abstract{\a:abstract}%
     \append:def\@abstract{\b:abstract}%
  }%
  \@ifundefined{@note}{}{%
     \pend:def\@note{\a:note}%
     \append:def\@note{\b:note}%
  }%
  |<apa authors|>%
}
\NewConfigure{abstract}{2}
\NewConfigure{note}{2}
\NewConfigure{affil}{2}
>>>

\<apa authors\><<<
\@ifundefined{@author}{}{%
   \pend:def\@affil{\a:affil}%
   \append:def\@affil{\b:affil}%  
}%
\@ifundefined{@authorOne}{}{%
   \pend:def\@authorOne{\a:aut}%
   \append:def\@authorOne{\b:aut}%
   \pend:def\@affilOne{\a:affil}%
   \append:def\@affilOne{\b:affil}% 
}%
\@ifundefined{@authorTwo}{}{%
   \pend:def\@authorTwo{\a:aut}%
   \append:def\@authorTwo{\b:aut}%
   \pend:def\@affilTwo{\a:affil}%
   \append:def\@affilTwo{\b:affil}%  
}%
\@ifundefined{@authorFour}{}{%
   \pend:def\@authorFour{\a:aut}%
   \append:def\@authorFour{\b:aut}%
   \pend:def\@affilFour{\a:affil}%
   \append:def\@affilFour{\b:affil}%  
}%
>>>


\<apa code\><<<
\def\appendix{%
  \appendixtrue
  \apaappfig                      
  \apaapptab                      
  \ifapamodejou{}{\clearpage}
  \let\old@apa@section=\leveltwo
  \newlength{\app@t@width}
  \setlength{\app@t@width}{\columnwidth}
  \addtolength{\app@t@width}{-8em}%
  \long\def\leveltwo##1{%
     \ifapamodeman{%
       \clearpage
       \setcounter{postfig}{0}
       \setcounter{posttbl}{0}
       \efloat@condopen{fff}
       \efloat@iwrite{fff}{\string\addtocounter{appendix}{1}}
       \efloat@iwrite{fff}{\string\setcounter{figure}{0}}
       \efloat@condopen{ttt}
       \efloat@iwrite{ttt}{\string\addtocounter{appendix}{1}}
       \efloat@iwrite{ttt}{\string\setcounter{table}{0}}%
      }{%
       \setcounter{figure}{0}%
       \setcounter{table}{0}%
      }%
      \refstepcounter{appendix}%
      \ifnum\c@appendix>1 \immediate\write
               \@auxout{\global\string\oneappendixfalse}\fi%
      \old@apa@section{%
             \appendixname\ifoneappendix\else~\theappendix\fi\\
             ##1%
      }%
  }%
} 
>>>


%%%%%%%%%%%%%%%%%%%%%
\Chapter{JHEP.cls}
%%%%%%%%%%%%%%%%%%%%%



\Link[http://jhep.sissa.it/]{}{}http://jhep.sissa.it/\EndLink


\<JHEP.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% JHEP.4ht                              |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
   |<config JHEP|>
\Hinput{JHEP}
\endinput
>>>        \AddFile{9}{JHEP}



\<config JHEP\><<<
|<html late parts|>
|<html late sections|>
|<subsections for book / report / article|>
|<subsubsections for book / report / article|>
|<paragraphs for book / report / article|>
\let\acm:sect|=\no@sect
\def\no@sect#1#2#3{\acm:sect{#1}{#2}{#3\relax\let\@svsec|=\empty}}
>>>



\<config JHEP\><<<
\def\@maketitle{%
\if@preprint
  \a:preprint{\tiny Preprint typeset in JHEP style. -  
    \if@hyper{HYPER VERSION}   \else{PAPER VERSION}\fi }
  \normalsize\hfill
  \begin{tabular}[t]{r}\@preprint\end{tabular}% 
  \b:preprint  
\else      
\if@proc  
   \a:conference \copy\conf@box \b:conference \logo {\tiny PROCEEDINGS}
\else
  \a:received \unhbox\rece@box \b:received
  \a:accepted \unhbox\acce@box \b:accepted  \logo
  {\tiny \if@hyper{HYPER VERSION}\else{PAPER VERSION}\fi}
\fi\fi\null
   \a:title   {\LARGE \sffamily \bfseries \@title}\b:title
   \a:author{\normalsize \bfseries \sffamily \@author }\b:author
   \ifvoid\abstract@box \else
      \a:abstract\vbox{\unhbox\abstract@box}\b:abstract
   \fi
   \a:keywords\@keywords\b:keywords 
   \ifx\dedic@box\:UnDef\else \a:dedicated\dedic@box\b:dedicated \fi
}
>>>

\<config JHEP\><<<
\def\auto:maketitle{{%   
  \global\let\auto:maketitle=\empty
  \def\JHEP:toc{\setcounter{footnote}{0}%
     \if@todotoc \tableofcontents \fi
     \@todotocfalse \@preprintfalse
     \gdef\tableofcontents{}%
     \pend:def\@author{\a:author}\append:def\@author{\b:author}%
  }%
  \pend:def\@maketitle{\aftergroup\JHEP:toc}%
  |<auto@maketitle footnotes|>%
  \auto:mktitle
  \global\let\auto:mktitle=\empty
}}
\let\auto:mktitle=\auto@maketitle
\let\auto@maketitle=\empty
\NewConfigure{@BODY}[1]{\concat:config\a::@BODY{#1}}  
\let\a::@BODY=\a:@BODY
\def\a:@BODY{\a::@BODY \auto:maketitle }
>>>


\<auto@maketitle footnotes\><<<
\let\JHEP:sva=\begingroup
\def\begingroup{\let\begingroup=\JHEP:sva
  \begingroup 
    \let\JHEP:sva=\@makefnmark
    \let\JHEP:svb=\@makefntext
    \let\JHEP:svc=\newpage
    \def\newpage{%
       \let\@makefnmark=\JHEP:sva
       \let\@makefntext=\JHEP:svb
       \let\newpage=\JHEP:svc
       \newpage  }}
>>>

\<config JHEP\><<<
\NewConfigure{abstract}{2}
\NewConfigure{accepted}{2}
\NewConfigure{author}{2}
\NewConfigure{conference}{2}
\NewConfigure{dedicated}{2}
\NewConfigure{keywords}{2}
\NewConfigure{preprint}{2}
\NewConfigure{received}{2}
\NewConfigure{title}{2}
\renewcommand{\href}[2]{\bgroup\let~\H@tilde
                        \if@hyper\Link-[#1]{}{}\fi
                        {#2}\egroup\if@hyper\EndLink\fi}
\renewcommand{\name}[1]{\if@hyper\Link-{}{#1}\EndLink\fi}
\renewcommand{\base}[1]{\if@hyper\bgroup\let~\H@tilde
                        \HCode{<base href="#1" />}\egroup\fi}
>>>

\<config JHEP\><<<
\pend:defI\label{\bgroup\@hyperfalse}
\append:defI\label{\egroup}
\pend:defI\ref{\bgroup\@hyperfalse}
\append:defI\ref{\egroup}
\pend:defI\pageref{\bgroup\@hyperfalse}
\append:defI\pageref{\egroup}
>>>




%%%%%%%%%%%%%%%
\Chapter{TextBook}
%%%%%%%%%%%%%%%%

 
By Igor A. Kotelnikov. Not available in the public domain?

%%   \OutputCodE\<TextBook.4ht\>




\<TextBook.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% TextBook.4ht                          |version %
% Copyright (C) |CopyYear.2002.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\def\thesection {\@arabic\c@section}
\def\@seccntformat#1{\S\csname the#1\endcsname\quad}
\input book.4ht

\ConfigureToc{section}
  {\HCode{<span class="sectionToc">}\S}
  {~}
  {}
  {\HCode{</span><br\xml:empty>}}
\ConfigureToc{subsection}
  {\HCode{<span class="subsectionToc">}~~\S}
  {~}
  {}
  {\HCode{</span><br\xml:empty>}}
\ConfigureToc{subsubsection}
  {\HCode{<span
       class="subsubsectionToc">}~~~~\S}
  {~}
  {}
  {\HCode{</span><br\xml:empty>}}

\Hinput{TextBook}
\endinput
>>>        \AddFile{9}{TextBook}




%%%%%%%%%%%%%%%
\Chapter{combine}
%%%%%%%%%%%%%%%%




\<combine.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% combine.4ht                           |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<combine cfg|>
\Hinput{combine}
\endinput
>>>        \AddFile{9}{combine}


\<combine cfg\><<<
\append:def\setuppapers{%
   \expandafter\let\csname :ref\endcsname\c@lbref
   \expandafter\let\csname o:ref\endcsname\c@lbref
   \def\ref{\expandafter\Protect\csname ::ref\endcsname}%
}
\def\c@lblabel#1{\@bsphack
  \bgroup
  \a:@newlabel
  \protected@write\@auxout{}%
    {\string\newlabel{#1}{{\csname a:newlabel\endcsname
     \@currentlabel}{\csname a:newlabel\endcsname \thecolpage}}}%
  \egroup
  \@esphack}
>>>

\<combine cfg\><<<
\long\def\:tempc#1{%
   \PushMacro\at:docend    \let\at:docend=\empty
   \PushMacro\export:hook  \let\export:hook\empty
   \gHAdvance\:mpNum by 1
   \HAssign\minipageNum=\:mpNum \relax 
   \o:import:{#1}%
   \PopMacro\at:docend  
   \PopMacro\export:hook
}
\HLet\import\:tempc
>>>

%%%%%%%%%%%%%%%
\Chapter{letters}
%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%
\Section{g-brief}
%%%%%%%%%%%%%

\<g-brief.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% g-brief.4ht                            |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<g-brief hooks|>
\Hinput{g-brief}
\endinput
>>>        \AddFile{9}{g-brief}


\<g-brief hooks\><<<
\def\ps@firstpage{%
  \ifcase \@ptsize\relax \normalsize \or \small \or \footnotesize \fi
  \def\@oddhead{|<g-brief head|>}
  \def\@oddfoot{|<g-brief foot|>}}
\NewConfigure{letterfoot}{3}
\NewConfigure{letterhead}{5}
>>>


\<g-brief head\><<<
\a:letterhead
  \ifklassisch \textsl{\quad\name}\else \textsc{\quad\name}\fi
\b:letterhead
  \normalsize 
  \ifklassisch 
     \begin{tabular}{r} \textsl{\strasse} \quad \\ 
       \ifx \zusatz\empty \else \textsl{\zusatz}\quad \\\fi 
       \textsl{\ort}\quad 
       \ifx \land\empty \else \\ \textsl{\land}\quad \fi
     \end{tabular} 
  \else 
     \begin{tabular}{r} 
       \textsc{\strasse}\quad \\ 
       \ifx \zusatz\empty \else \textsc{\zusatz}\quad \\ \fi 
       \textsc{\ort}\quad 
       \ifx \land\empty \else \\ \textsc{\land}\quad \fi 
     \end{tabular}%
  \fi
\c:letterhead
 \bgroup
 \scriptsize \ifx \retouradresse\empty
          \textrm{\name\ $\cdot$\ \strasse\ $\cdot$\ \ort \ifx
              \land\empty \else \ $\cdot$\ \land \fi } \else
            \textrm{\retouradresse} \fi
 \egroup
\d:letterhead
 \ifx \postvermerk\empty
          \else \textbf{\postvermerk} \par  \fi
\adresse
\e:letterhead
>>>




\<g-brief foot\><<<
\def\istsprache{german}
\a:letterfoot
\bgroup   \footnotesize
   \begin{tabular}{ll}
     \ifx \telefon\empty \else \telefontex & \telefon \\ \fi \ifx
     \telefax\empty \else \telefaxtext & \telefax \\ \fi \ifx
     \telex\empty \else \telextext & \telex \\ \fi \ifx
     \email\empty \else \emailtext & \email \\ \fi \ifx
     \http\empty \else \httptext & \http \\ \fi \
   \end{tabular}%
\egroup
\b:letterfoot
   \begin{tabular}{ll}
     \ifx \bank\empty \else \ifx \blz\empty \else \ifx
     \konto\empty \else \banktext & \bank \\ & \blztext \space \blz
     \\ & \kontotext \space \konto \\ \ \fi \fi \fi
   \end{tabular}%
\c:letterfoot
>>>


\<insert g-brief head\><<<
\ifx\zusatz\empty\else
   \pend:def\zusatz{\a:zusatz}
   \append:def\zusatz{\b:zusatz}
\fi
\ifx\land\empty\else
   \pend:def\land{\a:land}
   \append:def\land{\b:land}
\fi
\ifx\strasse\empty\else
   \pend:def\strasse{\a:strasse}
   \append:def\strasse{\b:strasse}
\fi

\ifx\ort\empty\else
   \pend:def\ort{\a:ort}
   \append:def\ort{\b:ort}
\fi

\ifx\postvermerk\empty\else
   \pend:def\postvermerk{\a:postvermerk}
   \append:def\postvermerk{\b:postvermerk}
\fi
\ifx\retouradresse\empty\else
   \pend:def\retouradresse{\a:retouradresse}
   \append:def\retouradresse{\b:retouradresse}
\fi
\par \ps@firstpage \@oddhead \let\@oddhead=\empty
>>>  

\<insert g-brief foot\><<<
\ifx\email\empty\else
   \pend:def\email{\a:email}
   \append:def\email{\b:email}
\fi
\ifx\telefon\empty\else
   \pend:def\telefon{\a:telefon}
   \append:def\telefon{\b:telefon}
\fi
\ifx\telefax\empty\else
   \pend:def\telefax{\a:telefax}
   \append:def\telefax{\b:telefax}
\fi
\ifx\telex\empty\else
   \pend:def\telex{\a:telex}
   \append:def\telex{\b:telex}
\fi
\ifx\http\empty\else
   \pend:def\http{\a:http}
   \append:def\http{\b:http}
\fi
\ifx\bank\empty\else
   \pend:def\bank{\a:bank}
   \append:def\bank{\b:bank}
\fi
\ifx\blz\empty\else
   \pend:def\blz{\a:blz}
   \append:def\blz{\b:blz}
\fi
\ifx\konto\empty\else
   \pend:def\konto{\a:konto}
   \append:def\konto{\b:konto}
\fi
\par \ps@firstpage \@oddfoot\let\@oddfoot=\empty
>>>  


\<g-brief hooks\><<<
\expandafter\pend:def\csname g-brief\endcsname{%
 \bgroup |<insert g-brief head|>\egroup
   \csname a:g-brief\endcsname
   \ifx \betreff\empty \else 
      \pend:def\betreff{\a:betreff}%
      \append:def\betreff{\b:betreff}%
   \fi
   \ifx \anrede\empty \else
      \pend:def\anrede{\a:anrede}%
      \append:def\anrede{\b:anrede}%
   \fi
}
\expandafter\append:def\csname g-brief\endcsname{%
   \csname b:g-brief\endcsname
}
>>>

\<g-brief hooks\><<<
\expandafter\pend:def\csname endg-brief\endcsname{%
   \csname c:g-brief\endcsname
   |<hooks for g-brief tail|>}
\expandafter\append:def\csname endg-brief\endcsname{%
   \csname d:g-brief\endcsname
   \bgroup |<insert g-brief foot|>\egroup
}
\NewConfigure{g-brief}{4}
>>>

\<hooks for g-brief tail\><<<
\ifx\gruss\empty \else
   \pend:def\gruss{\a:gruss}%
   \append:def\gruss{\b:gruss}%
\fi
\ifx\unterschrift\empty \else
   \pend:def\unterschrift{\a:unterschrift}%
   \append:def\unterschrift{\b:unterschrift}%
\fi
\ifx\anlagen\empty \else
   \pend:def\anlagen{\a:anlagen}%
   \append:def\anlagen{\b:anlagen}%
\fi
\ifx\verteiler\empty \else
   \pend:def\verteiler{\a:verteiler}%
   \append:def\verteiler{\b:verteiler}%
\fi
>>>




\<g-brief hooks\><<<
\pend:def\datumtext{\a:datumtext}
\append:def\datumtext{\b:datumtext}
\NewConfigure{datumtext}{2}

\pend:def\datum{\a:datum}
\append:def\datum{\b:datum}
\NewConfigure{datum}{2}

\NewConfigure{anrede}{2}
\NewConfigure{betreff}{2}

\pend:def\sprache{\a:sprache}
\append:def\sprache{\b:sprache}                        

\NewConfigure{gruss}{2}
\NewConfigure{unterschrift}{2}
\NewConfigure{anlagen}{2}
\NewConfigure{verteiler}{2}
 
\NewConfigure{sprache}{2}

\pend:def\telefontex{\a:telefontex}
\append:def\telefontex{\b:telefontex}
\NewConfigure{telefontex}{2}

\pend:def\telefaxtext{\a:telefaxtext}
\append:def\telefaxtext{\b:telefaxtext}
\NewConfigure{telefaxtext}{2}

\pend:def\telextext{\a:telextext}
\append:def\telextext{\b:telextext}
\NewConfigure{telextext}{2}

\pend:def\emailtext{\a:emailtext}
\append:def\emailtext{\b:emailtext}
\NewConfigure{emailtext}{2}

\pend:def\httptext{\a:httptext}
\append:def\httptext{\b:httptext}
\NewConfigure{httptext}{2}

\pend:def\banktext{\a:banktext}
\append:def\banktext{\b:banktext}
\NewConfigure{banktext}{2}

\pend:def\blztext{\a:blztext}
\append:def\blztext{\b:blztext}
\NewConfigure{blztext}{2}

\pend:def\betrefftext{\a:betrefftext}
\append:def\betrefftext{\b:betrefftext}
\NewConfigure{betrefftext}{2}

\pend:def\ihrzeichentext{\a:ihrzeichentext}
\append:def\ihrzeichentext{\b:ihrzeichentext}
\NewConfigure{ihrzeichentext}{2}

\pend:def\ihrschreibentext{\a:ihrschreibentext}
\append:def\ihrschreibentext{\b:ihrschreibentext}
\NewConfigure{ihrschreibentext}{2}

\pend:def\meinzeichentext{\a:meinzeichentext}
\append:def\meinzeichentext{\b:meinzeichentext}
\NewConfigure{meinzeichentext}{2}

\pend:def\unserzeichentext{\a:unserzeichentext}
\append:def\unserzeichentext{\b:unserzeichentext}
\NewConfigure{unserzeichentext}{2}

\NewConfigure{anlagen}{2}
\NewConfigure{adresse}{2}
\NewConfigure{bank}{2}
\NewConfigure{blz}{2}
\NewConfigure{email}{2}
\NewConfigure{gruss}{2}
\NewConfigure{grussskip}{2}
\NewConfigure{http}{2}
\NewConfigure{ihrschreiben}{2}
\NewConfigure{ihrzeichen}{2}
\NewConfigure{konto}{2}
\NewConfigure{land}{2}
\NewConfigure{meinzeichen}{2}
\NewConfigure{name}{2}
\NewConfigure{ort}{2}
\NewConfigure{postvermerk}{2}
\NewConfigure{retouradresse}{2}
\NewConfigure{strasse}{2}
\NewConfigure{telefax}{2}
\NewConfigure{telefon}{2}
\NewConfigure{telex}{2}
\NewConfigure{unterschrift}{2}
\NewConfigure{verteiler}{2}
\NewConfigure{zusatz}{2}

\pend:def\name{\a:name}
\append:def\name{\b:name}
>>>


\<???\><<<
   \pend:def\meinzeichen{\a:meinzeichen}
   \append:def\meinzeichen{\b:meinzeichen}

   \pend:def\ihrzeichen{\a:ihrzeichen}
   \append:def\ihrzeichen{\b:ihrzeichen}

 
\ifx\anlagen\empty\else
   \pend:def\anlagen{\a:anlagen}
   \append:def\anlagen{\b:anlagen}
\fi


\ifx\adresse\empty\else
   \pend:def\adresse{\a:adresse}
   \append:def\adresse{\b:adresse}
\fi

\ifx\gruss\empty\else
   \pend:def\gruss{\a:gruss}
   \append:def\gruss{\b:gruss}
\fi

\ifx\grussskip\empty\else
   \pend:def\grussskip{\a:grussskip}
   \append:def\grussskip{\b:grussskip}
\fi



\ifx\ihrschreiben\empty\else
   \pend:def\ihrschreiben{\a:ihrschreiben}
   \append:def\ihrschreiben{\b:ihrschreiben}
\fi











\ifx\unterschrift\empty\else
   \pend:def\unterschrift{\a:unterschrift}
   \append:def\unterschrift{\b:unterschrift}
\fi
\ifx\verteiler\empty\else
   \pend:def\verteiler{\a:verteiler}
   \append:def\verteiler{\b:verteiler}
\fi
>>>



%%%%%%%%%%%%%%%
\Chapter{ltxguide}
%%%%%%%%%%%%%%%%




\<ltxguide.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% ltxguide.4ht                          |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<ltxguide cfg|>
\Hinput{ltxguide}
\endinput
>>>        \AddFile{9}{ltxguide}

\<ltxguide cfg\><<<
\def\:tempc#1{\hbox {\a:m\it #1\b:m}}
\HLet\m\:tempc
\NewConfigure{m}{2}
\Configure{m} {$\langle $} {$\rangle $}
>>>


%%%%%%%%%%%%%%%%
\Part{AMS}
%%%%%%%%%%%%%%%%



\Chapter{AMS ART, PROC, BOOK classes}

%----------------------------- amsart.cls -----------------------
\Section{amsart.cls}



Calls:
amsgen.sty,
amsmath.sty,
amstext.sty,
amsbsy.sty,
amsopn.sty,
amsfonts.sty,
and amsthm.sty.




\<amsart.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% amsart.4ht                            |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\pend:defII\@starttoc{\par}
|<config book-report-article utilities|>
|<ams art, proc, book|>
|<ams art, proc|>
|<ams art|>
|<redefine ams maketitle|>
|<title page of amsart.cls|>
|<sections of amsart.cls|>
|<table/figure of amsart.cls|>
|<tocs of amsart.cls|>
|<latex options 1, 2, 3|>     |%after tocs, divs, and cuts|%
\Hinput{amsart}
\endinput
>>>        \AddFile{5}{amsart}





\<ams art, proc, book\><<<
|<ams divisions|>
>>>



\<ams art, proc, book\><<<
\let\:setaddresses=\@setaddresses
\def\@setaddresses{\bgroup
   \pend:def\addresses{%
     |<ams addresses|>%
   }%
  \a:addresses \:setaddresses \b:addresses\egroup }
\NewConfigure{addresses}{2}
\NewConfigure{address}{3}
\NewConfigure{curraddr}{3}
\NewConfigure{email}{3}
\NewConfigure{urladdr}{3}
>>>

\<ams addresses\><<<
\let\:address=\address
\def\address########1########2{%
  \@ifnotempty{########2}{%
     \def\:temp{########1}\ifx \:temp\empty
        \:address{}{\a:address\b:address########2\c:address}%
     \else              
        \:address{\a:address 
              ########1}{\b:address########2\c:address}%
     \fi }}%
\let\:curraddr=\curraddr
\def\curraddr########1########2{%
  \@ifnotempty{########2}{\a:curraddr
      \:curraddr{########1}{\b:curraddr########2\c:curraddr}%
}}%
\let\:email=\email
\def\email########1########2{%
  \@ifnotempty{########2}{\a:email
      \:email{########1}{\b:email########2\c:email}%
}}%
\let\:urladdr=\urladdr
\def\urladdr########1########2{%
  \@ifnotempty{########2}{\a:urladdr
      \:urladdr{########1}{\b:urladdr########2\c:urladdr}%
}}%
>>>


\<ams art, proc, book\><<<
\pend:def\@settranslators{\a:translators\bgroup
   \def\and{\unskip{ } \d:translators and~\c:translators\ignorespaces}%
   \def\andify{\nxandlist{\unskip, }{\unskip{} \and}{\unskip, \and}}% 
   \pend:def\@translators{\c:translators}%
   \append:def\@translators{\d:translators}%
}
\append:def\@settranslators{\egroup\b:translators}
\NewConfigure{translators}{4}
>>>


The followwin applies only to amsart 2000/06/02 v2.07    and on

\<ams art + book + proc\><<<
\ifx \deferred@thm@head\:UnDef\else
   |<shared ams thm/cls|>
   |<ams 2000 art + book + proc|>
\fi
>>>


\<ams 2000 art + book + proc\><<<
\def\:tempc{\ifmmode \mathqed \else
    \leavevmode \a:qed\hbox {\qedsymbol}\b:qed\fi} 
\expandafter\HLet\csname qed \endcsname=\:tempc
\NewConfigure{qed}{2}
>>>


%   \def\:temp{\a:newtheorem \:thm}
%   \HLet\@thm=\:temp
%   \append:defI\deferred@thm@head{\b:newtheorem  
%      \ifx \c:newtheorem\empty\else
%         \:warning{amsart.4ht requires empty 3rd argument 
%             in \string\Configure{newtheorem}}%
%        \fi
%  %      \ignorespaces}
  
  
  
  % \HRestore\listoffigures
  % \HRestore\listoftables





\<table/figure of amsart.cls\><<<
\def\endtable{\end@float}
\def\endfigure{\end@float}
>>>









%----------------------------- amsbook.cls -----------------------
\Section{amsbook.cls}

Calls:
amsgen.sty,
amsmath.sty,
amstext.sty,
amsbsy.sty,
amsopn.sty,

and amsthm.sty.




\<amsbook.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% amsbook.4ht                           |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>
   \pend:defII\@starttoc{\par}
|<config book-report-article utilities|>
|<ams art, proc, book|>
|<ams proc, book|>
|<ams book|>
|<redefine ams maketitle|>
|<title page of amsbook.cls|>
|<sections of amsbook.cls|>
|<table/figure of amsbook.cls|>
|<tocs of amsbook.cls|>
|<latex options 1, 2, 3|>     |%after tocs, divs, and cuts|%
\Hinput{amsbook}
\endinput
>>>        \AddFile{5}{amsbook}



% \HRestore\listoffigures
% \HRestore\listoftables

\<tocs of amsbook.cls\><<<
|<latex et al tocs|>
\edef\:TOC{%
   \noexpand\ifx [\noexpand\:temp
      \noexpand\expandafter\noexpand\:TableOfContents
   \noexpand\else
      \noexpand\Auto:ent{|<entries for tocs of amsbook.cls|>}\noexpand\fi}
|<report,book tocs|>
>>>

\<entries for tocs of amsbook.cls\><<<
\ifnum \c@tocdepth >-2 part,likepart,\fi
\ifnum \c@tocdepth >\m@ne chapter,likechapter,appendix,\fi
\ifnum \c@tocdepth >\z@ section,likesection,\fi
\ifnum \c@tocdepth >1 subsection,likesubsection,\fi
\ifnum \c@tocdepth >2 subsubsection,likesubsubsection,\fi
\ifnum \c@tocdepth >3 paragraph,\fi
\ifnum \c@tocdepth >4 subparagraph,\fi
UnDFexyz
>>>


\<table/figure of amsbook.cls\><<<
\def\endtable{\end@float}
\def\endfigure{\end@float}
>>>







%----------------------------- amsproc.cls -----------------------
\Section{amsproc.cls}

Calls:
amsgen.sty,
amsmath.sty,
amstext.sty,
amsbsy.sty,
amsopn.sty,

and amsthm.sty.





\<amsproc.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% amsproc.4ht                           |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

|<config book-report-article utilities|>
|<ams art, proc, book|>
|<ams proc, book|>
|<ams art, proc|>
|<redefine ams maketitle|>
\pend:defII\@starttoc{\par}
|<title page of amsproc.cls|>
|<sections of amsproc.cls|>
|<table/figure of amsproc.cls|>
|<tocs of amsproc.cls|>
|<latex options 1, 2, 3|>     |%after tocs, divs, and cuts|%
\Hinput{amsproc}
\endinput
>>>        \AddFile{5}{amsproc}







\<tocs of amsproc.cls\><<<
|<latex et al tocs|>
|<article et al tocs|>
\edef\:TOC{%
   \noexpand\ifx [\noexpand\:temp
      \noexpand\expandafter\noexpand\:TableOfContents
   \noexpand\else
      \noexpand\Auto:ent{|<entries for tocs of amsproc.cls|>}\noexpand\fi}
|<article tocs|>
>>>

\<entries for tocs of amsproc.cls\><<<
\ifnum \c@tocdepth >\m@ne part,likepart,\fi
\ifnum \c@tocdepth >\z@ section,likesection,\fi
\ifnum \c@tocdepth >1 subsection,likesubsection,\fi
\ifnum \c@tocdepth >2 subsubsection,likesubsubsection,\fi
\ifnum \c@tocdepth >3 paragraph,\fi
\ifnum \c@tocdepth >4 subparagraph,\fi
UnDFexyz
>>>



\<table/figure of amsproc.cls\><<<
\def\endtable{\end@float}
\def\endfigure{\end@float}
>>>

\<title page of amsproc.clsNO\><<<
\pend:def\@maketitle{%
  \Configure{footnotetext}
    {\IgnorePar\HPage{\a:dagger}}%
    {\EndHPage{}}%
}
\NewConfigure{dagger}{1} 
>>>




%%%%%%%%%%%%%%%%%%%%%
\Section{Title Page}
%%%%%%%%%%%%%%%%%%%%


\<redefine ams maketitle\><<<
\let\o:maketitle:|=\maketitle
\def\maketitle{\bgroup 
   |<adjust minipageNum for setcounter footnote 0|>%
   \ifx \EndPicture\:UnDef  
      \def\sec:typ{title}%
      |<title for TITLE|>%
      |<maketitle defs|>%
   \fi 
   \pic:gobble\a:mktl  \o:maketitle:  \pic:gobble\b:mktl
   \egroup \let\maketitle|=\empty}
>>>


\<ams art + proc\><<<
\pend:def\@settitle{\a:ttl}       
\append:def\@settitle{\b:ttl}
>>>

\<ams book\><<<
\pend:def\@maketitle{%
   \pend:def\@title{\a:ttl}%    
   \append:def\@title{\b:ttl}%
}
>>>

\<ams art, proc, book\><<<
\NewConfigure{maketitle}[4]{\c:def\a:mktl{#1}\c:def\b:mktl{#2}%
   \c:def\a:ttl{#3}\c:def\b:ttl{#4}}
>>>



\<ams art\><<<
\pend:def\@maketitle{%
     \pend:def\newpage{\IgnorePar}%
     \let\after:maketitle=\empty
     |<@ maketitle art|>%
     |<@ maketitle defs|>}
>>>

\<ams proc, book\><<<
\pend:def\@maketitle{%
     \pend:def\newpage{\IgnorePar}%
     \let\after:maketitle=\empty
     |<@ maketitle defs|>}
>>>

\<ams art, proc, book\><<< 
\append:def\@maketitle{\a:@maketitle\after:maketitle\b:@maketitle}
\long\def\end:maketitle#1#2{\ifx #1\empty \else
   \expandafter\let\csname :\string #1\endcsname=#1
   \let#1=\empty
   \append:def\after:maketitle{\expand:after{\let#1=}\csname
        :\string #1\endcsname#2}\fi}
\NewConfigure{@maketitle}{2}
>>>

The tags \''\a:@maketitle' and \''\b:@maketitle' enclose setdate,
subjclass, keywords, addresses 


\<@ maketitle art\><<<
\ifx\@date\empty\else
  \end:maketitle\@date{\a:dat\@setdate\b:dat}\fi
>>>



\<ams art + proc\><<<
\pend:defI\@setauthors{\a:aut \bgroup
   \def\andify{\nxandlist{\unskip, }{\unskip{} \and}{\unskip, \and}}%
   \def\@no@lnbk ########1[########2]{\a:newline}}
\append:defI\@setauthors{\egroup \b:aut}
>>>

\<ams book\><<<
\pend:def\@maketitle{%
   \pend:def\authors{\a:aut|</and for maketitle|>}%    
   \append:def\authors{\b:aut}%
}
>>>

\<maketitle defs\><<<
\pend:def\@author{\a:aut}\append:def\@author{\b:aut}%
|</and for maketitle|>%
>>>


\<ams art, proc, book\><<<
\HRestore\thanks
\def\:thanks#1{\par \a:thanks#1\@addpunct.\b:thanks}
\NewConfigure{thanks author date and}[8]{%
   \c:def\a:thanks{#1}\c:def\b:thanks{#2}\c:def\a:aut{#3}\c:def\b:aut{#4}%
   \c:def\a:dat{#5}\c:def\b:dat{#6}\c:def\a:and{#7}\c:def\e:mktl{#8}}
>>>


\<ams art, proc, book\><<<
\NewConfigure{subjclass}{2}
\NewConfigure{keywords}{2}
>>>

\<@ maketitle defs\><<<   |% order important |%
\end:maketitle\@subjclass{\a:subjclass\@setsubjclass\b:subjclass}%
\end:maketitle\@keywords{\a:keywords\@setkeywords\b:keywords}%
\end:maketitle\@setthanks{\let\thanks=\:thanks\thankses}%
>>>

\<ams art, proc, book\><<<
\pend:def\@setabstracta{\ifvoid\abstractbox
   \else\a:setabstract \fi}
\append:def\@setabstracta{\ifvoid\abstractbox
   \else\b:setabstract \fi}
\NewConfigure{setabstract}{2}
>>>




%%%%%%%%%%%%%%%%%%%%%
\Section{Sectioning}
%%%%%%%%%%%%%%%%%%%%

The latex classes use \`'\@sec' and \`'\@ssect' for defining sections
and starred sections.  The ams classes use only the first feature for
both types of classes, but assume negative depth \''\@m' for the depth
of starred sections (tex4ht records the level value in
\''\c:secnumdepth').  Hence, the \`'like' versions of the sectioning
comamnds are (currently?) not provided for the ams classes. The
\''\Configure{@sec @ssect}' is needed only for the \''@sec'; a
configuration for \''@ssect' is ignored.


\<sections of amsart.cls\><<<
|<ams art + book + proc|>
|<ams art + proc|>
|<ams no@sect|>
>>>

\<sections of amsbook.cls\><<<
|<ams art + book + proc|>
|<chapters for book / report|>
|<ams no@sect|>
>>>

\<sections of amsproc.cls\><<<
|<ams art + book + proc|>
|<ams art + proc|>
|<ams no@sect|>
>>>




\<ams no@sect\><<<
\def\no@sect#1#2#3#4#5#6[#7]#8{%
  \edef\@toclevel{\ifnum#2=\@m 0\else\number#2\fi}%
  \ifnum #2>\c@secnumdepth \let\@secnumber\@empty
  \else \@xp\let\@xp\@secnumber\csname the#1\endcsname
        \refstepcounter{#1}\fi
  \let\@svsec|=\empty
  \let\@svsechd|=\empty
  \global\@nobreaktrue
  \@xsect{#5}}
\let\@ssect=\relax 
>>>


\<ams art + proc\><<<
\let\no@part|=\part
\Def:Section\part{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thepart \fi}{#1} 
\let\no:part|=\part
\def\part{\rdef:sec{part}}
>>>


\<ams book\><<<
\let\:tempb\part
\Def:Section\part{\ifnum \c@secnumdepth >-2 \the\c@part\fi}{#1}
\let\:part\part
\let\part\:tempb
\let\no@part\@part
\def\@part[#1]#2{%
   \gdef\c:secnumdepth{-2}%
   \ifnum \c@secnumdepth >-2\relax \refstepcounter{part}\fi
   \HtmlEnv   \Toc:Title{#1}\:part{#2}}
\Def:Section\likepart{}{#1}
\let\:likepart\likepart
\let\likepart\:UnDef
\let\no@spart\@spart
\def\@spart#1{\HtmlEnv \:likepart{#1}}
>>>


\<ams divisions\><<<
\let\no@section|=\section
\Def:Section\section{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesection \fi}{#1} 
\let\no:section|=\section
\def\section{\rdef:sec{section}}
>>>


\<ams divisions\><<<
\let\no@subsection|=\subsection
\Def:Section\subsection{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesubsection \fi}{#1}
\let\no:subsection|=\subsection
\def\subsection{\rdef:sec{subsection}}
>>>

\<ams divisions\><<<
\let\no@subsubsection|=\subsubsection
\Def:Section\subsubsection{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesubsubsection \fi}{#1}
\let\no:subsubsection|=\subsubsection
\def\subsubsection{\rdef:sec{subsubsection}}
>>>

\<ams divisions\><<<
\let\no@paragraph|=\paragraph
\Def:Section\paragraph{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \theparagraph \fi}{#1}
\let\no:paragraph|=\paragraph
\def\paragraph{\rdef:sec{paragraph}}
>>>

\<ams divisions\><<<
\let\no@subparagraph|=\subparagraph
\Def:Section\subparagraph{\ifnum \c:secnumdepth>\c@secnumdepth   \else
   \thesubparagraph \fi}{#1}
\let\no:subparagraph|=\subparagraph
\def\subparagraph{\rdef:sec{subparagraph}}
>>>


\<ams art, proc, book\><<<
\pend:defI\@seccntformat{%
  \def\@secnumpunct{\ifnum \c:secnumdepth>0
     \expandafter\ifx\csname the##1\endcsname\relax \else. \fi\fi}}
>>>







%%%%%%%%%%%%%%%%%%%%%
\Section{Tables Of Contents}
%%%%%%%%%%%%%%%%%%%%



\<ams art, proc\><<<
\def\tableofcontents{%
   \ifx\contentsname\empty \else
      \ifx\contentsname\:UnDef \else
%         \Configure{toToc}{}{section}%
         |<protect from TocAt|>\section*{\contentsname}%
         |<end protect from TocAt|>%
%         \Configure{toToc}{?}{section}%
   \fi\fi
   \:tableofcontents}
>>>



\<ams book\><<<
\def\tableofcontents{%
   \ifx\contentsname\empty \else
%      \Configure{toToc}{}{likechapter}%
      |<protect from TocAt|>\chapter*{\contentsname}%
      |<end protect from TocAt|>%
%      \Configure{toToc}{?}{likechapter}%
   \fi
   \:tableofcontents}
>>>


\<tocs of amsart.cls\><<<
|<latex et al tocs|>
\edef\:TOC{%
   \noexpand\ifx [\noexpand\:temp
      \noexpand\expandafter\noexpand\:TableOfContents
   \noexpand\else
      \noexpand\Auto:ent{|<entries for tocs of amsart.cls|>}\noexpand\fi}
>>>

\<entries for tocs of amsart.cls\><<<
\ifnum \c@tocdepth >\m@ne part,\fi
\ifnum \c@tocdepth >\z@  section,\fi
\ifnum \c@tocdepth >1    subsection,\fi
\ifnum \c@tocdepth >2 subsubsection,\fi
\ifnum \c@tocdepth >3 paragraph,\fi
\ifnum \c@tocdepth >4 subparagraph,\fi
UnDFexyz
>>>





%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{amsldoc.cls}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Calls:


\<amsldoc.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% amsldoc.4ht                           |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\def\<#1>{\textit{$\mathord\langle$#1\/$\mathord\rangle$}}
|<qed symbol|>
\Hinput{amsldoc}
\endinput
>>>        \AddFile{5}{amsldoc}




\Chapter{amsdtx.cls}


\<amsdtx.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% amsdtx.4ht                            |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<amsdtx hooks|>
\let\amsdtx:Hinput=\Hinput
\def\Hinput#1{%
   \let\Hinput=\amsdtx:Hinput \Hinput{#1}%
   |<restore amsdtx|>%
   \Hinput{amsdtx}}
\endinput
>>>        \AddFile{9}{amsdtx}



\<restore amsdtx\><<<
\let\maketitle\o:maketitle:
>>>


\<amsdtx hooks\><<<
\pend:def\@maketitle{\bgroup
   \ifx \EndPicture\:UnDef
      \def\sec:typ{title}%
      \Configure{HtmlPar}{}{}{}{}%
      \ConfigureEnv{center}{\empty}{}{\empty}{\empty}
      \Configure{tabular}{}{}{}{\e:mktl}{}{}%
      \ConfigureEnv{tabular}{\empty}{}{}{}%
      \pend:def\@title{\a:ttl}\append:def\@title{\b:ttl}%
      \pend:def\@date{\a:dat}\append:def\@date{\b:dat}%
      \pend:def\@author{\a:aut}\append:def\@author{\b:aut}%
      \def\and{\a:and}
   \fi
   \pic:gobble\a:mktl}
\append:def\@maketitle{\pic:gobble\b:mktl
   \egroup \let\maketitle\empty}
>>>


%----------------------------- amsthm.sty -----------------------
\Chapter{amsthm.sty}








\<amsthm.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% amsthm.4ht                            |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

|<body of amsthm.sty|>
|<theorem in amsthm.sty|>
\Hinput{amsthm}
\endinput
>>>        \AddFile{5}{amsthm}



\<body of amsthm.sty\><<<
|<qed symbol|>
>>>

\<qed symbol\><<<
\def\qed:sym{%
  \leavevmode\Picture+[Q.E.D.]{}\o:qedsymbol:\EndPicture
  \SavePicture\qed:sym[Q.E.D.] }
\def\:temp{\qed:sym }
\MathSymbol\mathop{qedsymbol}
>>>



\<shared ams thm/cls\><<<  
\ifx \deferred@thm@head\:UnDef\else
   \expandafter\dth@everypar\expandafter{%
     \the\dth@everypar
     \edef\:temp{\the\ht:everypar}\ifx \:temp\empty
        \ht:everypar{\HtmlPar}\ShowPar
     \fi 
   }%
   |<revised begintheorem|>
\fi
>>>


\<revised begintheorem\><<<
\def\deferred@thm@head#1{%
  \if@inlabel \indent \par \fi |% eject a section head if one is pending|%
  \if@nobreak
    \adjust@parskip@nobreak
  \else
    \addpenalty\@beginparpenalty
    \addvspace\@topsep
    \addvspace{-\parskip}%
  \fi
  \global\@inlabeltrue
  \ht:everypar\dth@everypar
  \let\sv:newtheorem=\b:newtheorem \let\b:newtheorem=\empty
  \item[\normalfont#1]% 
  \let\b:newtheorem=\sv:newtheorem \b:newtheorem \ignorespaces
}
>>>

The old version of amsthm used \`'\item[\normalfont#1]' instead
of \`'\sbox\@labels{\normalfont#1}'--it is preferable for tex4ht,
in case the lemma starts with something like \`'\begin{equation}'.





The following code is for the cases that the \''\refstercounter'
is ignored in \''\@thm'.

\<theorem in amsthm.sty\><<<
\def\:temp{\ShowRefstepAnchor\o:@begintheorem:}
\HLet\@begintheorem|=\:temp
|<shared ams thm/cls|>
>>>

\<shared ams thm/cls\><<<  
\def\:temp#1{%
   \def\:temp{#1}%
   \edef\:temp{\expandafter\eorem:syle  \meaning\:temp|<par del|>}%
   \expandafter\let\expandafter\@tmp:sv\csname th@\:temp\endcsname
   \def\:tempa##1{%
      \expandafter\append:def\csname th@##1\endcsname{%
         \expandafter\let\csname th@##1\endcsname=\@tmp:sv 
         \let\thm:headnl=\thmheadnl
         \pend:def\thmheadnl{\let\thmheadnl\thm:headnl \b:newtheorem}%
         \append:def\thmheadnl{\expandafter
             \ht:everypar\expandafter{\the\ht:everypar 
             \ht:everypar{\HtmlPar}}}}}%
   \expandafter\:tempa\expandafter{\:temp}%
   \let\sv:trivlist=\trivlist
   \def\trivlist{\let\trivlist\sv:trivlist \let\sv:trivlist\:unDef
      \a:newtheorem \trivlist}%
   \aftergroup\c:newtheorem
   \:thm{#1}}
\HLet\@thm\:temp
\HRestore\@endtheorem
>>>







The @thm appends its setting to  the hook of theoremstyle:

\<shared ams thm/cls\><<<
\bgroup
\def\bgroup{\catcode`\\=0 \catcode`\t=11 }
\catcode`\/=0
\catcode`\@=12
\catcode`\h=12
\catcode`\\=12
/catcode`/t=12
/edef~{/def/noexpand/eorem:syle##1\th@##2 |<par del|>{##2}}
/bgroup
\expandafter\egroup ~
>>>


\<shared ams thm/cls\><<<
\long\def\:temp[#1]{\par\a:proof
    \csname o:\string\proof :\endcsname[#1]\b:proof}
\expandafter\HLet\csname \string\proof \endcsname=\:temp
\append:def\endproof{\c:proof}
\NewConfigure{proof}{3}
>>>




\Verbatim
   \newtheoremstyle{note}% name
     {3pt}%      Space above
     {3pt}%      Space below
     {}%         Body font
     {}%         Indent amount (empty = no indent, \parindent = para indent)
     {\itshape}% Thm head font
     {:}%        Punctuation after thm head
     {.5em}%     Space after thm head: `` `` = normal interword space;
           %       \newline = linebreak
     {}%         Thm head spec (can be left empty, meaning `normal')
\EndVerbatim





\Chapter{ams....sty}




\Section{amsbsy.sty}



\<amsbsy.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% amsbsy.4ht                            |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

|<amsbsy.sty|>
\Hinput{amsbsy}
\endinput
>>>        \AddFile{5}{amsbsy}

\<amsbsy.sty\><<<
   |<body of amsbsy.sty|>
>>>

\<body of amsbsy.sty\><<<
\def\binrel@#1{\begingroup
  \setboxz@h{\thinmuskip0mu
    \medmuskip\m@ne mu\thickmuskip\@ne mu
    \setbox\tw@\hbox{$#1\m@th$}\kern-\wd\tw@
    ${}#1{}\m@th$}%
  \edef\@tempa{\endgroup\let\noexpand\binrel@@
    \ifdim\wdz@<\z@ \noexpand\mathbin
    \else\ifdim\wdz@>\z@ \noexpand\mathrel
    \else \relax\fi\fi}%
  \@tempa
}
>>>

%%%%%%%%%%%%%%%%%%
\Section{amssymb.sty}
%%%%%%%%%%%%%%%%%%

\<amssymb.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% amssymb.4ht                           |version %
% Copyright (C) |CopyYear.2002.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{amssymb}
\endinput
>>>        \AddFile{8}{amssymb}





%%%%%%%%%%%
\Chapter{Ams Structures}
%%%%%%%%%

%%%%%%%%%%%%%%%%%
\Section{AMS for Plain}
%%%%%%%%%%%%%%%%%

\Verbatim
(/n/ship/0/packages/tetex/teTeX/texmf/tex/latex/amslatex/amsart.cls
Document Class: amsart 1995/02/23 v1.2b
(/n/ship/0/packages/tetex/teTeX/texmf/tex/latex/amslatex/amsgen.sty)
(/n/ship/0/packages/tetex/teTeX/texmf/tex/latex/amslatex/amsmath.sty
(/n/ship/0/packages/tetex/teTeX/texmf/tex/latex/amslatex/amstext.sty)
(/n/ship/0/packages/tetex/teTeX/texmf/tex/latex/amslatex/amsbsy.sty)
(/n/ship/0/packages/tetex/teTeX/texmf/tex/latex/amslatex/amsopn.sty))

(/n/ship/0/packages/tetex/teTeX/texmf/tex/latex/amslatex/amsthm.sty))
\EndVerbatim



/n/ship/0/packages/tetex/teTeX/texmf/tex/latex/base/book.cls













\<record ams definitions\><<<
\def\:tmp#1#2{%
   \expand:after{\expandafter\let\csname ams:#1\endcsname|=}%
      \csname #1\endcsname
   \pend:def#2{%
      \expand:after{\expandafter\let\csname #1\endcsname|=}%
          \csname ams:#1\endcsname}}
   |<recall amstex.tex|>
   |<recall amsppt.sty|>
   |<recall osudeG|> 
>>>



%----------------------------- amsmath.sty -----------------------
%%%%%%%%%%%%%%%%%%%%%%
\Section{amsmath.sty}
%%%%%%%%%%%%%%%%%%%%%%



\SubSection{OutLine}





\<amsmath.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% amsmath.4ht                           |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\HRestore\cases
\HRestore\matrix
\HRestore\pmatrix
|<restore amsmath everydisplay|>
|<config amsmath.sty utilities|>
|<config amsmath.sty shared|>
|<body of amsmath.sty|>
|<equations of amsmath.sty|>
\:CheckOption{new-accents}     \if:Option \else
   |<accents of amsmath.sty|>
\fi
|<amsmath.sty|>
|<amsmath.sty and amstex.sty|>
\ifx \ifinany@\:Undef
   |<amsmath 1999|>
\else
   \:warning{ams files too old for TeX4ht}
\fi
\Hinput{amsmath}
\endinput
>>>        \AddFile{5}{amsmath}



\<body of amsmath.sty\><<<
\expandafter\ifx \csname tmp:muskip\endcsname\relax
   \csname newmuskip\endcsname \tmp:muskip
\fi
\expandafter\def\csname :tempc\endcsname#1#2#3{%
  \ifmmode
    \bgroup 
      \tmp:muskip #1#2\edef\mathglue{\the\tmp:muskip}%
      \tmp:dim #1#3\edef\textspace{\the\tmp:dim}\a:tmspace
    \egroup
  \else \kern #1#3\fi \relax
}
\HLet\tmspace=\:tempc
\NewConfigure{tmspace}{1}       
\Configure{tmspace}{\mskip\mathglue}
>>>



\<body of amsmath.sty\><<<
\HRestore\over
\def\:tempc{\pic:gobble\a:over \o:@@over: \pic:gobble\b:over}
\HLet\@@over\:tempc
\HRestore\atop
\def\:tempc{\pic:gobble\a:atop \o:@@atop: \pic:gobble\b:atop}
\HLet\@@atop\:tempc
\def\::above{\pic:gobble\a:above \o:@@above:\tmp:dim
            \pic:gobble\b:above }
\def\:above{\afterassignment\::above}
\def\:tempc{\Protect\:above \tmp:dim=}
\HLet\@@above\:tempc
>>>


\<body of amsmath.sty\><<<
\HRestore\abovewithdelims
\def\::abovewithdelims#1#2{\pic:gobble\a:abovewithdelims 
   \o:@@abovewithdelims:#1#2\tmp:dim\pic:gobble\b:abovewithdelims}
\def\:abovewithdelims#1#2{\def\:temp{\::abovewithdelims#1#2}%
   \afterassignment\:temp\tmp:dim}
\def\:tempc{\Protect\:abovewithdelims }
\HLet\@@abovewithdelims\:tempc
\NewConfigure{abovewithdelims}{2}
\HRestore\overwithdelims
\def\:overwithdelims#1#2{\pic:gobble\a:overwithdelims 
   \o:@@overwithdelims:#1#2\pic:gobble\b:overwithdelims}
\def\:tempc{\Protect\:overwithdelims}
\HLet\@@overwithdelims\:tempc
\NewConfigure{overwithdelims}{2}
\HRestore\atopwithdelims
\def\:atopwithdelims#1#2{\pic:gobble\a:atopwithdelims 
   \o:@@atopwithdelims:#1#2\pic:gobble\b:atopwithdelims}
\def\:tempc{\Protect\:atopwithdelims}
\HLet\@@atopwithdelims\:tempc
\NewConfigure{atopwithdelims}{2}
>>>




\<amsmath.sty and amstex.sty\><<<
\def\:tempc#1#2#3{\a:underarrow@
   \hbox{$\m@th#2#3$}\b:underarrow@
   \hbox{#1#2}\c:underarrow@
}
\HLet\underarrow@\:tempc
\def\:tempc#1#2#3{\a:overarrow@
   \hbox{#1#2}\b:overarrow@
   \hbox{$\m@th#2#3$}\c:overarrow@
}
\HLet\overarrow@\:tempc
\NewConfigure{underarrow@}{3}
\NewConfigure{overarrow@}{3}
>>>



The following was needed to hide paragraph breaks in \`'math' option,
due to a \''\vtop' in the macro definition.

\<amsmath.sty and amstex.sty DEPRECATED\><<<
\def\:temp{\Configure{HtmlPar}{}{}{}{}\o:overarrow@:}
\HLet\overarrow@|=\:temp
>>>



\<amsmath.sty\><<<
\let\:tempc|=\measure@
\pend:defI\:tempc{\bgroup
   \RecallTeXcr \HRestore\noalign \let\EndPicture\empty
   \let\halign|=\TeXhalign \let\span|=\:span  \HRestore\begin 
   \HRestore\end   \a:measure@ }
\append:defI\:tempc{\egroup}
\HLet\measure@|=\:tempc
\NewConfigure{measure@}{1}
>>>

\<amsmath.sty\><<<
\HLet\savealignstate@|=\empty
\renewcommand{\n:smash:}[2][tb]{%
  \def\smash@{#1}%
  \ifmmode\@xp\o:mathpalette:\@xp\mathsm@sh\else
        \@xp\makesm@sh\fi{#2}}
>>>


\<body of amsmath.styNO\><<<
\append:defI\collect@body{\let\halign\TeXhalign \HRestore\noalign}
>>>

\<body of amsmath.sty\><<<
\let\ltx@label|=\lb:l
>>>

\<body of amsmath.sty\><<<
\let\Mathaccent:|=\mathaccent@
\def\mathaccent@#1#2{\ifx \EndPicture\:UnDef 
     \DN@{\Picture+{}\Mathaccent:{#1}{#2}\EndPicture}%
  \else\DN@{\Mathaccent:{#1}{#2}}\fi\next@}
>>>

\<body of amsmath.sty\><<<
|<amsmath.sty and amstex.sty|>
>>>

\<amsmath.sty and amstex.sty\><<<
\def\:temp#1#2{\a:overset\binrel@{#2}%
  \binrel@@{\mathop{\kern\z@#2}\limits^{#1}}\b:overset}
\HLet\overset|=\:temp
\NewConfigure{overset}{2}
\def\:temp#1#2{\a:underset\binrel@{#2}%
  \binrel@@{\mathop{\kern\z@#2}\limits_{#1}}\b:underset}
\HLet\underset|=\:temp
\NewConfigure{underset}{2}
|<plain, fontmath, amsmath, amstex|>
>>>

\<body of amsmath.sty\><<<
\def\:temp#1{{\a:boxed\leavevmode
   \vbox{\m@th$\displaystyle#1$}\b:boxed}} 
\HLet\boxed|=\:temp
\NewConfigure{boxed}{2}
>>>

%\edef\:temp{%
%   \noexpand\catcode`\noexpand\^=\the\catcode`\^
%   \noexpand\catcode`\noexpand\_=\the\catcode`\_ }


\<body of amsmath.sty\><<<
\def\:temp#1#2{\a:xrightarrow \o:xrightarrow:{#1}\b:xrightarrow}
\HLet\xrightarrow|=\:temp
\NewConfigure{xrightarrow}{2}
\def\:temp#1#2{\a:xleftarrow \o:xleftarrow:{#1}\b:xleftarrow}
\HLet\xleftarrow|=\:temp
\NewConfigure{xleftarrow}{2}
>>>



\SubSection{Fractions}


\<equations of amsmath.sty\><<<
\expandafter\def\csname genfrac \endcsname#1#2#3#4{%
  \def\@tempa{#1#2}%
  \edef\@tempb{\@nx\@genfrac\@mathstyle{#4}%
    \expandafter\noexpand\csname @@\ifx @#3@over\else above\fi
    \ifx\@tempa\@empty \else withdelims\fi\endcsname}%
  \@tempb{#1#2#3}}
\def\:tempc#1#2#3#4#5{{\a:genfrac#1\b:genfrac{\c:genfrac#4#2#3\relax
   {\d:genfrac#5\e:genfrac}}\f:genfrac}}
\HLet\@genfrac|=\:tempc
\NewConfigure{genfrac}{6}
\HRestore\frac
\def\:temp#1#2{{\a:frac\begingroup
   #1\endgroup\b:frac \@@over \c:frac #2\d:frac}}
\expandafter\HLet\csname frac \endcsname\:temp
>>>

\<tcilatex fractions\><<<
\def\:tempc#1#2{\o:dfrac:{\a:dfrac#1\b:dfrac}{\c:dfrac#2\d:dfrac}}
\HLet\dfrac|=\:tempc
\NewConfigure{dfrac}{4}
\def\:tempc#1#2{\o:tfrac:{\a:tfrac#1\b:tfrac}{\c:tfrac#2\d:tfrac}}
\HLet\tfrac|=\:tempc
\NewConfigure{tfrac}{4}
\def\:tempc#1#2{\o:binom:{\a:binom#1\b:binom}{\c:binom#2\d:binom}}
\HLet\binom|=\:tempc
\NewConfigure{binom}{4}
\def\:tempc#1#2{\o:dbinom:{\a:dbinom#1\b:dbinom}{\c:dbinom#2\d:dbinom}}
\HLet\dbinom|=\:tempc
\NewConfigure{dbinom}{4}
\def\:tempc#1#2{\o:tbinom:{\a:tbinom#1\b:tbinom}{\c:tbinom#2\d:tbinom}}
\HLet\tbinom|=\:tempc
\NewConfigure{tbinom}{4}
>>>


\<\><<<
\let\n:frac:|=\:UnDef
\DeclareRobustCommand{\n:frac:}[2]{|<amsamth.sty frac|>}    
\def\:temp#1#2{{\a:frac\begingroup
   #1\endgroup\b:frac \@@over \c:frac #2\d:frac}}
\HLet\frac|=\:temp
\NewConfigure{frac}{4}
>>>



\<amsmath.sty\><<<
\let\:tempc\maketag@@@
\pend:defI\:tempc{\a:maketag}
\append:defI\:tempc{\b:maketag}
\NewConfigure{maketag}{2}
\HLet\maketag@@@\:tempc
>>>



%%%%%%%%%%%%%%%
\SubSection{align}
%%%%%%%%%%%%%%%

\<equations of amsmath.sty\><<<
\def\math@cr@@[#1]{\ifnum0=`{\fi \iffalse}\fi\math@cr@@@
   \o:noalign:{\vskip#1\relax}}
>>>

The above had also \`+\noalign{\vskip#1\relax}}+ in it, but it cause
two extra   rows in subarray.

\<equations of amsmath.sty\><<<
                                    \catcode`\#|=13 \catcode`\!|=6    
\def\reg:align!1!2{%
   |<inany@true|>  \inalign@true |<displaybreak@|>\intertext@
   \ifingather@\else\displ@y@\fi\Let@  \let\math@cr@@@\math@cr@@@align
   \ifxxat@\else \let\tag\tag@in@align \fi
   \let\label\label@in@display !1% set st@r
   \ifst@rred\else \global\@eqnswtrue  \fi   \measure@{!2}%
   \global\row@\z@ \tabskip\eqnshift@ 
   |<clean span|>%
   |<halign amsmath align|>}
                                    \catcode`\#=6 \catcode`\!=12 
>>>

\<halign amsmath align\><<<
\SaveMkHalignConf:g{\align:type}\HRestore\noalign
\MkHalign#{|<amsmath align pattern|>}!2%
>>>

\<amsmath align pattern\><<<
\span
   &\@lign$\m@th\displaystyle{|<sub/sup base|>#}$%
   &\@lign$\m@th\displaystyle{|<sub/sup base|>#}$%
>>>

We need to clean th the \''\c:halign' and \''\d:halign' around the
\''\span'.

\<clean span\><<<
\Configure{PauseMkHalign}
  {\Configure{PauseMkHalign}{}{}{}{}\expandafter\clean:span}{}{}{}%
>>>

\<equations of amsmath.sty\><<<
\def\clean:span#1\c:halign{\TeXhalign \bgroup \:span}
>>>



\<equations of amsmath.sty\><<<
\ifx \ifinany@\:Undef
   |<since 1999 endalign|>
\else
   |<until 1999 endalign|>
\fi
\HLet\endalign|=\:tempc
\def\:tempc{\pic:MkHalign{\align:type}} 
\HLet\align@|=\:tempc
>>>



\<since 1999 endalign\><<<
\def\:tempc{%
        \math@cr
    \EndMkHalign \RecallMkHalignConfig \csname b:\align:type\endcsname
    \ifingather@  \restorealignstate@  \egroup \nonumber 
      \ifnum0=`{\fi\iffalse}\fi%
    \else         $$\fi
    \global\@ignoretrue
}
>>>


\<until 1999 endalign\><<<
\def\:tempc{%
        \math@cr
    \EndMkHalign \RecallMkHalignConfig \csname b:\align:type\endcsname
    \ifingather@  \restorealignstate@  \egroup \nonumber 
      \ifnum0=`{\fi}%
    \else         $$\fi
    \global\@ignoretrue
}
>>>



\<equations of amsmath.styNO\><<<
\NewConfigure{align}{6}
\NewConfigure{align*}{6}
>>>


\<equations of amsmath.sty\><<<
|<ams align config util|>
\def\:tempc#1{%
   \expandafter\pend:def\csname #1\endcsname{\def\align:type{#1}}%
   \NewConfigure{#1}[6]{\Config:alg{##1}{##2}{##3}{##4}{##5}{##6}{#1}}%
   \Configure{#1}{}{}{}{}{}{}%
   \def\:temp{#1}\def\:tempa{align}\ifx \:temp\:tempa\else
      \@xp\let\csname reg:#1\endcsname|=\reg:align
      \@xp\let\csname end#1\endcsname|=\endalign
   \fi }
\:tempc{alignat}
\:tempc{alignat*}
\:tempc{xalignat}
\:tempc{xalignat*}
\:tempc{xxalignat}
\:tempc{align}
\:tempc{align*}
\:tempc{flalign}
\:tempc{flalign*}
\pend:defIII\start@align{\Configure{$$}{}{}{}}             
>>>

\<ams align config util\><<<
\def\Config:alg#1#2#3#4#5#6#7{%
   \expandafter\c:def\csname a:#7\endcsname{\global
      \let\sv:amps|=\add:amps #1}%
   \expandafter\c:def\csname b:#7\endcsname{#2\global
      \let\add:amps|=\sv:amps}%
   \expandafter\c:def\csname c:#7\endcsname{#3}%
   \expandafter\c:def\csname d:#7\endcsname{#4}%
   \expandafter\c:def\csname e:#7\endcsname{\expandafter\align:td
      \expandafter{\csname f:#7\endcsname}{#5}{#6}}%
}
\def\align:td#1#2#3{\iftag@ 
     \ifnum \add:amps>0
        \gHAdvance\add:amps |by -1   \gHAdvance\HCol |by -1
        \global\let#1|=\empty 
        \ifnum \add:amps=0 \gHAdvance\HCol|=1 #2\gdef#1{#3}\fi     
     \else #2\gdef#1{#3}\fi
   \else \gHAssign\add:amps|=\HCol\relax #2\gdef#1{#3}\fi}%
>>>


The \`'align' environment set labels by rewriting the row
with empty entry, and adding the abel in an extra entry. That
is, with a format of the form
\`'align-\label=&....maxfields@-1....&latex-\label'.  The machinary is
within \''\add@amps'.

%     \let\:tempa|=\:temp
%     \def\:temp!!!!1\egroup{\:tempa !!!!1\EndMkHalign}%


Without  the \''\HRestore\noalign' we get infinite loop. Where? Why?




\<sub/sup base\><<<
{\HCode{}}%
>>>

%%%%%%%%%%%%%%%%%%
\SubSection{multline}
%%%%%%%%%%%%%%%%%%

The environment of AmsLaTeX are being scanned as parameters of
\''\collect@@body'.  Hence, the featured of TeX4ht introduced to
\''\halign' are nulled there. 


\<equations of amsmath.sty\><<<
                                    \catcode`\#|=13 \catcode`\!|=6    
\def\reg:multline!1{%
  |<inany@true|>    \Let@
  \@display@init{\global\advance\row@\@ne \global\dspbrk@lvl\m@ne}%
  |<displaybreak@|>    \restore@math@cr    \let\tag\tag@in@align
  \global\tag@false \global\let\raise@tag\@empty   |% \mmeasure@{#1}%|%
  \let\tag\gobble@tag |<multline label|>%
  |<halign amsmath multline|>}
                                    \catcode`\#=6 \catcode`\!=12 
>>>

\<halign amsmath multline\><<<
\ifst@rred
  \expandafter\let\csname e:multline*\endcsname|=\empty
  \expandafter\let\csname f:multline*\endcsname|=\empty
\fi
\SaveMkHalignConf:g{multline\ifst@rred *\fi}\HRestore\noalign
\MkHalign#{\hbox{$\m@th\displaystyle|<sub/sup base|>#$}}!1%
>>>

\<multline label\><<<
\ifst@rred  \let\label\@gobble  \else
   \stepcounter{equation}%
   \def\label{\let\cnt:currentlabel\@currentlabel
      \def\:@currentlabel{\ifx \cnt:currentlabel\@currentlabel
      \the\c@equation\else \@currentlabel\fi}%
      \anc:lbl r{equation}\ltx@label}%
   \edef\@currentlabel{\the\c@equation}%
\fi
>>>

\<multline tag\><<<
\ifst@rred\else
   \e:multline(\theequation)\f:multline
\fi 
>>>

\<equations of amsmath.sty\><<<
\def\:tempc{|<multline tag|>\math@cr \EndMkHalign 
   \RecallMkHalignConfig \csname b:multline\ifst@rred *\fi\endcsname
   $$\global\@ignoretrue  }
\HLet\endmultline|=\:tempc
\def\:tempc{\pic:MkHalign{multline\ifst@rred *\fi}} 
\HLet\multline@|=\:tempc
\NewConfigure{multline}{6}
\@xp\let\csname reg:multline*\endcsname|=\reg:multline
\@xp\let\csname endmultline*\endcsname|=\endmultline
\NewConfigure{multline*}{4}
>>>

%%%%%%%%%%%%%%%%
\SubSection{gather}
%%%%%%%%%%%%%%%%




\<equations of amsmath.sty\><<<
                                    \catcode`\#|=13 \catcode`\!|=6    
\def\reg:gather!1{%
   \ingather@true  |<gather 1999|>%
   \let\tag\tag@in@align  \let\label\label@in@display 
   \intertext@ \displ@y@
   \Let@  \let\math@cr@@@\math@cr@@@gather  |%\gmeasure@{#1}%|%
   \global\shifttag@false    \global\row@\@ne
  |<halign amsmath gather|>}
                                    \catcode`\#=6 \catcode`\!=12 
>>>

\<gather 1999\><<<
\ifx \ifinany@\:Undef
   \let\split\insplit@   \chardef\dspbrk@context\z@
\else
   \inany@true
\fi
>>>

\<halign amsmath gather\><<<
\SaveMkHalignConf:g{gather\ifst@rred *\fi}\HRestore\noalign
\MkHalign#{|<amsmath gather pattern|>}!1%
>>>

\<amsmath gather pattern\><<<
\hbox{$\m@th\displaystyle{|<sub/sup base|>#}$}%
&\hbox{|<sub/sup base|>#}%
>>>



\<equations of amsmath.sty\><<<
\def\:tempc{\math@cr \EndMkHalign 
   \RecallMkHalignConfig \csname b:gather\ifst@rred *\fi\endcsname
   $$\global\@ignoretrue  }
\HLet\endgather|=\:tempc
\def\:tempc{\pic:MkHalign{gather\ifst@rred *\fi}} 
\HLet\gather@|=\:tempc
\NewConfigure{gather}{6}
\@xp\let\csname reg:gather*\endcsname|=\reg:gather
\@xp\let\csname endgather*\endcsname|=\endgather
\NewConfigure{gather*}{6}
>>>



\<equations of amsmath.sty\><<<
\def\:tempc{%
  \def\intertext##1{%
    \ifvmode\else\\\@empty\fi
    \noalign{%
      \penalty\postdisplaypenalty\vskip\belowdisplayskip
      \vbox{\normalbaselines
        \ifdim\linewidth=\columnwidth
        \else \parshape\@ne \@totalleftmargin \linewidth
        \fi
       \a:intertext \noindent##1\b:intertext\par}%
      \penalty\predisplaypenalty\vskip\abovedisplayskip%
    }%
}}
\HLet\intertext@=\:tempc
\NewConfigure{intertext}{2}
>>>

%%%%%%%%%%%%%%%
\SubSection{Roots}
%%%%%%%%%%%%%%%

\<equations of amsmath.sty\><<<
\HLet\leftroot|=\:gobble
\HLet\uproot|=\:gobble
>>>





%%%%%%%%%%%%%%%%%
\SubSection{Accents}
%%%%%%%%%%%%%%%%%


\<accents of amsmath.sty\><<<
\HLet\Hat|=\hat
\HLet\Check|=\check
\HLet\Tilde|=\tilde
\HLet\Acute|=\acute
\HLet\Grave|=\grave
\HLet\Dot|=\dot
\HLet\Ddot|=\ddot
\HLet\Breve|=\breve
\HLet\Bar|=\bar
\HLet\Vec|=\vec
>>>

%%%%%%%%%%%%%%%%%%%%%
\SubSection{Smallmatrix}
%%%%%%%%%%%%%%%%%%%%%


\<equations of amsmath.sty\><<<
                                    \catcode`\#|=13 \catcode`\!|=6    
\def\reg:smallmatrix{%
  \vcenter\bgroup \Let@\restore@math@cr\default@tag
  |<ialign amsmath smallmatrix|>}
                                    \catcode`\#=6 \catcode`\!=12 
>>>

\<ialign amsmath smallmatrix\><<<
\SaveMkHalignConf:g{smallmatrix}%|%\HRestore\noalign|%
\MkHalign#{$\m@th\scriptstyle#$&&%
           $\m@th\scriptstyle#$}%
>>>

\<equations of amsmath.sty\><<<
\def\:tempc{\crcr\EndMkHalign 
    \RecallMkHalignConfig \egroup\b:smallmatrix}
\HLet\endsmallmatrix|=\:tempc
\def\:temp{\pic:MkHalign{smallmatrix}} 
\HLet\smallmatrix|=\:temp
\NewConfigure{smallmatrix}{6}
>>>


%%%%%%%%%%%%%%%%%%
\SubSection{substack}
%%%%%%%%%%%%%%%%%%

\<equations of amsmath.sty\><<<
\pend:defI\substack{\a:substack}
\append:defI\substack{\b:substack}
\NewConfigure{substack}{2}
>>>


%%%%%%%%%%%%%%%%%%
\SubSection{subarray}
%%%%%%%%%%%%%%%%%%

\<equations of amsmath.sty\><<<
                                    \catcode`\#|=13 \catcode`\!|=6    
\def\reg:subarray!1{%
  \vcenter\bgroup
  \Let@ \restore@math@cr \default@tag
  \baselineskip\fontdimen10 \scriptfont\tw@
  \advance\baselineskip\fontdimen12 \scriptfont\tw@
  \lineskip\thr@@\fontdimen8 \scriptfont\thr@@
  |<ialign amsmath subarray|>}
                                    \catcode`\#=6 \catcode`\!=12 
>>>

\<ialign amsmath subarray\><<<
\let\e:subarray|=\empty \let\f:subarray|=\empty 
\everycr{}\SaveMkHalignConf:g{subarray}%|%\HRestore\noalign|%
\MkHalign#{$\m@th\scriptstyle#$}%
>>>

\<equations of amsmath.sty\><<<
\def\:tempc{\crcr\EndMkHalign 
    \RecallMkHalignConfig \egroup\b:subarray}
\HLet\endsubarray|=\:tempc
\def\:temp#1{\def\Hlcr{#1}\pic:MkHalign{subarray}{#1}} 
\HLet\subarray|=\:temp
\NewConfigure{subarray}{4}
>>>


%%%%%%%%%%%%%%%
\SubSection{split}
%%%%%%%%%%%%%%%

\<equations of amsmath.sty\><<<
\NewConfigure{split}{6}
                                    \catcode`\#|=13 \catcode`\!|=6
\def\:tempc{%
   \vbox\bgroup
        |<insplit 1999|>%
        \Let@  \restore@math@cr  \default@tag \everycr{}\a:split
        \SaveMkHalignConf:g{split}\HRestore\noalign
        \MkHalign#{|<amsmath split pattern|>}}
\HLet\insplit@|=\:tempc
                                    \catcode`\#|=6 \catcode`\!|=12
\def\:tempc{%
   \crcr\EndMkHalign \b:split \egroup }
\HLet\endsplit|=\:tempc
>>>


\<insplit 1999\><<<
\ifx \ifinany@\:Undef
   \chardef\dspbrk@context\@ne 
\fi
>>>

\<amsmath split pattern\><<<
 $\m@th\displaystyle{|<sub/sup base|>#}$%
&$\m@th\displaystyle{|<sub/sup base|>#}$%
>>>


\<amsmath 1999\><<<
\let\:tempc|=\gather@split
\append:defIII\:tempc{%
   \def\endmathdisplay@a{%
     \math@cr \EndMkHalign
     \RecallMkHalignConfig \csname b:gather\ifst@rred *\fi\endcsname    
     \egroup |%on \vcenter\bgroup|%
   }%
}
\HLet\gather@split|=\:tempc
>>>

The split environment looks like 
  \`'\begin{split}...\begin{split}...\end{split}...\endmathdisplay@a'.
The folowing tries to compensate for the above extra openning split 
environment.   


\<equations of amsmath.sty\><<<
\Configure{@begin}
  {split}
  {\relax
   \ifx  \split\insplit@ \else 
   \def\choose:begin{\global\let\choose:begin\@firstoftwo
                     \@secondoftwo}%
   \fi
  }
>>>


%%%%%%%%%%%%%%%%%%%
\SubSection{Equations}
%%%%%%%%%%%%%%%%%%%



\<equations of amsmath.sty\><<<
\NewConfigure{equations}[2]{\def\pic:equa{#1}\def\pic:equb{#2}}
>>>

\<equations of amsmath.sty\><<<
\def\str:pic{\ifx \EndPicture\:UnDef
      \expandafter\Picture\pic:equa{ \pic:equb}%
   \else \let\EndPicture|=\empty  \fi
   \let\halign|=\TeXhalign}
>>>






%%%%%%%%%%%%%%%
\SubSection{Other}
%%%%%%%%%%%%%%%







\<equations of amsmath.sty\><<<
\def\make@df@tag@@#1{%
  \gdef\df@tag{\maketag@@@{#1}\def\@currentlabel{#1}%
               |<def :currentlabel for make@df@tag|>%
               \anc:lbl r{}%
}}
\def\make@df@tag@@@#1{\gdef\df@tag{\tagform@{#1}%
  \toks@\@xp{\p@equation{#1}}\edef\@currentlabel{\the\toks@}%
  |<def :currentlabel for make@df@tag|>%
  \anc:lbl r{}%
  }}
>>>




%%%%%%%%%%%%%%%
\SubSection{Fonts}
%%%%%%%%%%%%%%%



\<amsfonts.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% amsfonts.4ht                          |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<amsfonts sty|>
\Hinput{amsfonts}
\endinput
>>>        \AddFile{5}{amsfonts}


\<amsfonts sty\><<<<
\NewConfigure{mathbb}{2}  
\def\:temp#1{{\a:mathbb \o:@mathbb:{#1}\b:mathbb}}
\HLet\@mathbb\:temp
>>>

\<amsfonts sty\><<<<
\NewConfigure{mathfrak}{2}  
\def\:temp#1{{\a:mathfrak \o:@mathfrak:{#1}\b:mathfrak}}
\HLet\@mathfrak\:temp
>>>

Commands like \''\rm' need low level implemetation through 
dynamic configurations of symbols decorations at the htf source 
(e.g., \Verb+${\textbf abc}XX\bf abc \mathbf ab\mathbb{C}d\mathsf{C}$+).


%%%%%%%%%%%
amstext.sty
%%%%%%%%%%%


\<amstext.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% amstext.4ht                           |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\def\:tempc#1{\hbox{\a:text#1\b:text}}
\HLet\text@|=\:tempc
\NewConfigure{text}{2}

\Hinput{amstext}
\endinput
>>>        \AddFile{5}{amstext}


%----------------------------- amstex.sty -----------------------
%%%%%%%%%%%%%%%%%%%
\Chapter{amstex.sty}
%%%%%%%%%%%%%%%%%%%

Note that \`'\Let@' stands for \`'\let\\=\cr\', and so it should be
placed after the definition of \`'\cr' is recalled in halign tables.



\<amstex loads amsmath\><<<
 \input amsmath.4ht  
>>>

\<amstex1.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% amstex1.4ht                           |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>
% amstex.sty

\if@compatibility \else 
   |<amstex loads amsmath|>
   \expandafter\endinput
\fi            

\let\ltx@label|=\lb:l
|<body of amstex.sty|>
|<equations of amstex.sty|>
|<label of amstex.sty|>
|<amsmath.sty and amstex.sty|>
|<config amstex1 utilities|>
|<config amstex1 shared|>
|<plain, fontmath, amstex|>
\Hinput{amstex1}
\endinput
>>>        \AddFile{5}{amstex1}



\Section{Aligned}





We need the \`'\vtop' within \`'\[...\]' because of the
extra math environment taht we insert.




\<equations of amstex1\><<<
                                    \catcode`\#|=13 \catcode`\!|=6    
\def\reg:aligned@{\bgroup
  \vspace@\Let@ \everycr{}%
  \SaveMkHalignConf:g{aligned:type}%|%\HRestore\noalign|%
  \MkHalign#{|<amstex1 aligned@ pattern|>}%
}
                                    \catcode`\#=6 \catcode`\!=12 
>>>

\<amstex1 aligned@ pattern\><<<
$\m@th\displaystyle{#}$&%
$\m@th\displaystyle{{}#}$%
>>>




\<equations of amstex1\><<<
\def\:tempc{\crcr\EndMkHalign 
   \RecallMkHalignConfig \csname b:\aligned:type\endcsname \egroup}
\HLet\endaligned|=\:tempc
\def\:temp{\pic:MkHalign{aligned@}} 
\HLet\aligned@|=\:temp
\NewConfigure{aligned}{6}
\NewConfigure{topaligned}{6}
\NewConfigure{botaligned}{6}
\pend:def\topaligned{\def\aligned:type{topaligned}}
\pend:def\botaligned{\def\aligned:type{botaligned}}
\pend:def\aligned{\def\aligned:type{aligned}}
>>>





%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Other}
%%%%%%%%%%%%%%%%%%%%%%


The \''\label'  gets a definition that differs a little than the one in LaTeX, and is more complicated because of cases like in the example:
\Verbatim
\documentclass[fleqn]{article}

\title{Test of subequations environment}
\author{mjd}

\usepackage[noamsfonts]{amstex}
\numberwithin{equation}{section}

\newcommand{\env}[1]{{\normalfont\texttt{#1}}}


   \begin{document}

`\section{Prime equation numbers}


Here is a,b,c sub-numbering.
\begin{subequations}{a}
\begin{eqnarray}
A&=&B\\
D&=&C \label{e:middle}\\
E&=&F
\end{eqnarray}
\end{subequations}
That was produced with the \env{eqnarray} environment; the middle line
was labeled as \eqref{e:middle}.



First an equation.
\begin{equation}\label{e:previous}
A=B
\end{equation}
That was equation \eqref{e:previous}.


\begin{equation}%
\tag{\ref{e:previous}$'$}
\label{e:prevprime}
C=D
\end{equation}

 And that was equation \eqref{e:prevprime}.



First an equation.
\begin{subequations}{a}
\begin{xalignat}{2}
\label{xalignat:a}A+B&=B&     B&=B+A\\
\label{xalignat:b}C&=D+E&     C\oplus D&=E\\
\label{xalignat:c}E&=F&       E'&=F'
\end{xalignat}
\end{subequations}

Label check: that was \eqref{xalignat:a}, \eqref{xalignat:b}, and
\eqref{xalignat:c}.

\end{document}
\EndVerbatim



Note that the above fails if \''\@currentlabel' has a \`'\Link[]...'.

\<equations of amstex.sty\><<<
\append:defI\subequations{\cur:lbl{}\let\cur:lbl|=\:gobble \ignorespaces}
>>>

With the exception of \''\subequations', the \''\refstepcounter'
of LaTeX is not used.  The following is to compensate for
the lost  \''\Link'.

\<equations of amstex.sty\><<<
\let\:stepcounter|=\stepcounter
\append:defI\stepcounter{%
   \ifx \EndPicture\:UnDef\else \def\:temp{equation}\def\:tempa{#1}%
   \ifx\:temp\:tempa 
      \edef\:currentlabel{E\the\c@equation}\let\cur:lbl|=\:gobble
      \edef\cur:th{|<haddr prefix|>\last:haddr}%
      \edef\:temp{\noexpand\AfterPicture{\noexpand\a:eqno\noexpand
         \Make:Label{\cur:th \:currentlabel}{}%
         \noexpand\html:addr}}\:temp
      \let\stepcounter|=\:stepcounter
   \fi\fi }
>>>


\<haddr prefix\><<<
x>>>


\<equations of amstex.sty\><<<
\let\:insplit|=\insplit@
\def\insplit@{\let\halign|=\TeXhalign \:insplit}
>>>


Place the number with the equation; not under.

\<equations of amstex.sty\><<<
\NewConfigure{eqn}[1]{\def\a:eqno{#1}}
>>>




% \pmatrix    def \matrix   def \endpmatrix
% \bmatrix    def \matrix   def \endbmatrix
% \vmatrix    def \matrix   def \endvmatrix
% \Vmatrix    def \matrix   def \endVmatrix


% \equation    def \gather     def \endgather


\<equations of amstex.sty\><<<
\pend:def\gather{\a:gather}
\append:def\endgather{\b:gather}
\@xp\pend:def\csname gather*\endcsname{\Picture*{}}
\@xp\append:def\csname endgather*\endcsname{\EndPicture}
\NewConfigure{gather}{2}
>>>

In amslatex.sty, equation is defined in terms of  gather.

\<equations of amstex.sty\><<<
\pend:def\equation{\bgroup \let\tagform@|=\:gobble}
\append:def\endequation{\egroup}
>>>

\<equations of amstex.sty\><<<
\pend:def\align{\Picture*{}}
\append:def\endalign{\EndPicture}
\@xp\pend:def\csname align*\endcsname{\Picture*{}}
\@xp\append:def\csname endalign*\endcsname{\EndPicture}
>>>



%\let\ltx@label=\lb:l

\<equations of amstex.sty\><<<
\pend:defI\alignat{\Picture*{}}
\append:def\endalignat{\EndPicture}
\expandafter\pend:defI\csname alignat*\endcsname{\Picture*{}}
\expandafter\append:def\csname endalignat*\endcsname{\EndPicture}
>>>

\<equations of amstex.sty\><<<
\pend:defI\xalignat{\Picture*{}}
\append:def\endxalignat{\EndPicture}
\expandafter\pend:defI\csname xalignat*\endcsname{\Picture*{}}
\expandafter\append:def\csname endxalignat*\endcsname{\EndPicture}
>>>

\<equations of amstex.sty\><<<
\pend:defI\xxalignat{\Picture*{}}
\append:def\endxxalignat{\EndPicture}
>>>

\<equations of amstex.sty\><<<
\pend:def\alignedat{\Picture*{}$}
\append:def\endalignedat{$\EndPicture}
>>>


\<equations of amstex.sty\><<<
\pend:def\gathered{\Picture*{}$}
\append:def\endgathered{$\EndPicture}
>>>


\<equations of amstex.sty\><<<
\pend:def\multline{\Picture*{}}
\append:def\endmultline{\EndPicture}
\expandafter\pend:def\csname multline*\endcsname{\Picture*{}}
\expandafter\append:def\csname endmultline*\endcsname{\EndPicture}
>>>

\<equations of amstex.sty\><<<
\let\:smallmatrix=\smallmatrix
\def\smallmatrix{\Picture*{}$\:smallmatrix}
\append:def\endsmallmatrix{$\EndPicture}
>>>


\<body of amstex.sty\><<<
|<amsmath.sty and amstex.sty|>
>>>




%%%%%%%%%%%%%%%%
\Section{Springer Lecture Notes}
%%%%%%%%%%%%%%%



LaTeX document class for Lecture Notes in Computer Science

\Link[http://www.springer.de/author/tex/help-book.html]{}{}springer\EndLink,
\Link[http://www.springer.de/comp/lncs/authors.html]{}{}Information
for Authors\EndLink.

We have llncs.cls for latex2e, and llncs.sty for latex2.9.


llncs.cls loads article.cls and then its definitions. Hence,
llncs.4ht asks article.4ht to load the definitions in llncs-a.4ht

\<llncs.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% llncs.4ht                             |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\Hinclude{\input llncs-a.4ht}{article}    
\endinput
>>>        \AddFile{9}{llncs}



\<llncs-a.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% llncs-a.4ht                           |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\ifx \:UnDef 
  |<llcns sty|>
\else
  |<llcns cls|>
\fi
\let\:spthm|=\@spthm
\def\@spthm{|<seed begin theorem|>\:spthm}
\Hinput{llncs}
\endinput
>>>        \AddFile{9}{llncs-a}

\<llcns sty\><<<
\let\ll:maketitle|=\@maketitle
\def\@maketitle{%
   \ll:maketitle \Configure{maketitle}{}{}{}{}}
>>>

\<llcns cls\><<<
\let\ll:maketitle|=\@maketitle
\def\@maketitle{%
   \let\sva:aut\a:aut  \def\a:aut{\protect\sva:aut}%
   \let\svb:aut\b:aut  \def\b:aut{\protect\svb:aut}%
   \ll:maketitle \Configure{maketitle}{}{}{}{}}
>>>

\<llcns cls\><<<
\def\:tempc#1{\a:email\o:email:{#1}\b:email}
\HLet\email\:tempc
\NewConfigure{email}{2}
\def\:tempc{%
  \pend:def\@institute{\a:institute}%
  \append:def\@institute{\b:institute}%
  \o:institutename:
}
\HLet\institutename\:tempc
\NewConfigure{institute}{2}
>>>



\<llcns cls\><<<
\def\@Begintheorem#1#2#3{\a:newtheorem#3\trivlist
   \item[\hskip\labelsep{#2#1\@thmcounterend}]\b:newtheorem}
>>>




\<lncse.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% llncse.4ht                            |version %
% Copyright (C) |CopyYear.2002.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\Hinclude{\input lncse-a.4ht}{article}    
\endinput
>>>        \AddFile{9}{lncse}


\<lncse-a.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% llncse-a.4ht                          |version %
% Copyright (C) |CopyYear.2002.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<lncse title page|>
  |<lncse theorems|>
  |<lncse chapter|>
\Hinput{lncse}
\endinput
>>>        \AddFile{9}{lncse-a}






\<lncse title page\><<<
\ifx \o:@maketitle:\UnDef
  \let\o:@maketitle:\@maketitle
\fi
\def\@maketitle{%
   \pend:def\@title{\Protect\a:ttl}\append:def\@title{\Protect\b:ttl}
   \pend:def\@date{\a:dat}\append:def\@date{\b:dat}%
   \pend:def\@author{\Protect\a:aut}\append:def\@author{\Protect\b:aut}%
   \def\and{\a:and}%
   \a:mktl \o:@maketitle: \b:mktl
}
\let\maketitle\o:maketitle:
\def\institutename{\par
 \begingroup
 \parskip=\z@
 \parindent=\z@
 \setcounter{@inst}{1}%
 \def\and{\c:institute \stepcounter{@inst}\c:inst
           $\sp{\the@inst}$\d:inst \ignorespaces}%
 \setbox0=\vbox{\def\thanks##1{}\everypar{}\@institute}%
 \ifnum\value{@inst}>9\relax\setbox0=\hbox{$\sp{88}$\enspace}%
                 \else\setbox0=\hbox{$\sp{8}$\enspace}\fi
 \ignorespaces \a:institute
 \ifnum\value{@inst}=1\relax  \else
   \setcounter{footnote}{\c@@inst}%
   \setcounter{@inst}{1}%
   \c:inst ${\sp\the@inst}$\d:inst
 \fi
 \@institute \b:institute\par
 \endgroup}
\def\inst#1{\unskip\a:inst$\sp{#1}$\b:inst}
\def\fnmsep{\unskip$\sp,$}
\NewConfigure{institute}{3}
\NewConfigure{inst}{4}
>>>

\<lncse theorems\><<<
\def\:Thm{\o:@Thm:}
\def\:temp{\let\sv:item\item
   \def\item[##1]{|<no page break before item|>\let\item\sv:item
                  \item[##1]\b:newtheorem}%
   \a:newtheorem\AutoRefstepAnchor
   \:Thm }
\HLet\@Thm\:temp
>>>

% \ifx \@chapapp\:UnDef
%   \def\@chapapp{\chaptername}
%   \def\chaptername{Chapter}
%   \def\appendixname{Appendix}
%   \newcommand*\chaptermark[1]{}
% \fi

\<lncse chapter\><<<
\let\:tempb\chapter
\Def:Section\chapter{\thechapter}{#1}
\let\:chapter\chapter
\let\chapter\:tempb
\def\@makechapterhead#1{}
\let\no@chapter\@chapter
\def\@chapter[#1]#2{%
   |<adjust minipageNum for setcounter footnote 0|>%
   {\SkipRefstepAnchor \let\addcontentsline\:gobbleIII\no@chapter[#1]{}}%
   \HtmlEnv   \Toc:Title{#1}\:chapter{#2}}
\Def:Section\likechapter{}{#1}
\let\:likechapter\likechapter
\let\likechapter\:UnDef
\let\no@schapter\@schapter
\def\@schapter#1{%
   {\let\addcontentsline\:gobbleIII\no@schapter{}}%
   \HtmlEnv   \:likechapter{#1}}
\let\no@appendix\appendix
\Def:Section\appendix{\thechapter}{#1}
\let\:appendix\appendix
\def\appendix{%
   \def\@chapter[##1]##2{%
      |<adjust minipageNum for setcounter footnote 0|>%
      {\def\addcontentsline####1####2####3{}\no@chapter[##1]{}}%
      \HtmlEnv \Toc:Title{##1}\:appendix{##2}}%
   \no@appendix}
>>>



%--------------------------------- amstex.tex -------------------


\Chapter{amstex.tex}

\`'/n/ship/0/packages/tetex/teTeX/texmf/tex/amstex/base/amstex.tex'

\Section{Outline}






\<amstex.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% amstex.4ht                            |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>
% amstex.tex
\HRestore\cases \HRestore\matrix  \HRestore\pmatrix
|<body of amstex.tex|>
|<equations of amstex.tex|>
|<config amstex.tex utilities|>
|<config amstex.tex shared|>
|<amstex.tex matrix|>
|<amstex.tex align|>
|<amstex.tex cases|>
\Hinput{amstex}
\endinput
>>>        \AddFile{5}{amstex}





\<body of amstex.tex\><<<
\def\:tempc#1{\a:text{\ifx \a:math\:UnDef\else
    \let\:temp|=\everymath
    \def\everymath##1{\let\everymath|=\:temp\append:def\a:math{##1}}%
  \fi
  \o:text@:{#1}}\b:text}
\HLet\text@|=\:tempc
\NewConfigure{text}{2}
>>>




\Section{Sub/Sub scripts}


\<body of amstex.tex\><<<
\def\Sb#1\endSb{\sb{\a:multilimits
   \multilimits@#1\endSb\b:multilimits}}
\def\Sp#1\endSp{\sp{\a:multilimits
   \multilimits@#1\endSp\b:multilimits}}
\def\multilimits@{\bgroup\vspace@\Let@
 \baselineskip\fontdimen10 \scriptfont\tw@
 \advance\baselineskip\fontdimen12 \scriptfont\tw@
 \lineskip\thr@@\fontdimen8 \scriptfont\thr@@
 \lineskiplimit\lineskip  \let\halign|=\TeXhalign
 \vbox\bgroup\ialign\bgroup\hfil\c:multilimits
    $\m@th\scriptstyle{##}$\d:multilimits\hfil\crcr}
\NewConfigure{multilimits}{4}
>>>



\Section{Format}

\<equations of amstex.tex\><<<
                                      \catcode`\#|=13 \catcode`\!|=6
\def\format:!1\\{\def\preamble@{!1}%
   \hashtoks@{#}%
   \def\l{$\m@th\the\hashtoks@$\hfil}%
   \def\c{\hfil$\m@th\the\hashtoks@$\hfil}%
   \def\r{\hfil$\m@th\the\hashtoks@$}%
   \SaveMkHalignConf:g{format}%  
   \edef\preamble@@{\:span\preamble@}%
   |<expand amstex.tex ...alignat pattern|>\MkHalign#{\preamble@@}}
                                      \catcode`\#=6 \catcode`\!=12
\def\:tempc{\crcr\EndMkHalign\RecallMkHalignConfig
   \iffalse{\fi\ifnum`}=0 \fi\format:}     
\HLet\format|=\:tempc
\let\:format|=\format
\let\format|=\o:format:
\let\MkHformat=\empty
\def\:tempc{\def\format{\global\let\format|=\o:format: \:format}}
\HLet\MkHformat|=\:tempc
\NewConfigure{format}{6}
>>>

\Section{Align}


\<equations of amstex.tex\><<<
\catcode`\#|=13 \catcode`\!|=6
\def\:tempc!1\endalign{%%
  \Mk:ialign:end
   {|<amstex.tex align pattern|>}{align}{!1}#%
     {|<amstex.tex align env|>}}  
\catcode`\#=6 \catcode`\!=12
\expandafter\HLet\csname align \endcsname|=\:tempc
\expandafter\HLet\csname align \space\endcsname|=\:tempc
\NewConfigure{align}{6}
>>>

\<amstex.tex align env\><<<
\global\and@\z@
\ifingather@\append:def\T:halign{\global\and@\z@}\fi
\Let@\tabskip\centering@
>>>

\<amstex.tex align pattern\><<<
$\m@th\displaystyle{\@lign#}$\global\advance\and@\@ne       
&$\m@th\displaystyle{{}\@lign#}%
          $\global\advance\and@\@ne\tabskip\z@skip
&\hbox\bgroup\@lign\maketag@#\maketag@\egroup\tabskip\z@skip
>>>

\Section{Gather}


\<equations of amstex.tex\><<<
\catcode`\#|=13 \catcode`\!|=6
\def\:tempc!1\endgather{\Mk:ialign:end
   {|<amstex.tex gather pattern|>}{gather}{!1}#{}}  
\catcode`\#=6 \catcode`\!=12
\expandafter\HLet\csname gather \endcsname|=\:tempc
\expandafter\HLet\csname gather \space\endcsname|=\:tempc
\NewConfigure{gather}{6}
>>>


\<equations of amstex.tex\><<<
\def\Mk:ialign:end#1#2#3#4#5{%
   \csname a:#2\endcsname
     \ifx \EndPicture\:UnDef        
        |<SaveMkHalignConfig|>#5\RecallTeXcr
        \MkHalign#4{#1}#3\crcr\EndMkHalign
        \RecallMkHalignConfig 
     \else
        \expand:after{\csname o:#2:\endcsname #3}\csname end#2\endcsname
     \fi
   \csname b:#2\endcsname
}
>>>

\<SaveMkHalignConfig\><<<
\SaveMkHalignConfig
\Configure{MkHalign}
  {} {}
  {\csname c:#2\endcsname} {\csname d:#2\endcsname }
  {\csname e:#2\endcsname}
  {\csname f:#2\endcsname }%
>>>


\<amstex.tex gather pattern\><<<
$\m@th\displaystyle{#}$%
&\maketag@#\maketag@
>>>

%%%%%%%%%%%%%%GATHER






\Section{Matrix}





\<amstex.tex matrix\><<<
                                    \catcode`\#|=13 \catcode`\!|=6    
\def\reg:matrix{\vcenter\bgroup
   \SaveMkHalignConf:g{matrix}%
   \Let@ 
   \MkHalign#{$\m@th#$&&$\m@th#$}}
                                    \catcode`\#=6 \catcode`\!=12 
\def\:tempc{\crcr\EndMkHalign \RecallMkHalignConfig \egroup\b:matrix}
\HLet\endmatrix|=\:tempc
\def\:temp{\pic:MkHalign{matrix}} 
\HLet\matrix|=\:temp
\NewConfigure{matrix}{6}
>>>

\<equations of amstex.texNO\><<<
\def\:temp{\a:smallmatrix \o:smallmatrix:}
\HLet\smallmatrix|=\:temp
\let\:tempc|=\endsmallmatrix
\append:def\:tempc{\b:smallmatrix}
\HLet\endsmallmatrix|=\:tempc
\NewConfigure{smallmatrix}{2}
>>>

\<equations of amstex.tex\><<<
                                    \catcode`\#|=13 \catcode`\!|=6    
\def\reg:smallmatrix{\vcenter\bgroup
   \SaveMkHalignConf:g{smallmatrix}%
   \Let@ 
   \MkHalign#{$\m@th\scriptstyle{#}$&&$\m@th
                    \scriptstyle{#}$}}
                                    \catcode`\#=6 \catcode`\!=12 
\def\:tempc{\crcr\EndMkHalign 
    \RecallMkHalignConfig \egroup\b:smallmatrix}
\HLet\endsmallmatrix|=\:tempc
\def\:temp{\pic:MkHalign{smallmatrix}} 
\HLet\smallmatrix|=\:temp
\NewConfigure{smallmatrix}{6}
>>>




\<plain,latex utilities\><<<
\def\pic:MkHalign#1{%
  \csname a:#1\endcsname
  \ifx \EndPicture\:Undef
     \expandafter\expandafter\csname reg:#1\endcsname
  \else 
     \vtop\bgroup$$  
     \expandafter\def\csname #1\endcsname{\bgroup 
         \expandafter\def\csname end#1\endcsname{\csname
              o:#1:\endcsname\egroup}%
         \csname o:#1:\endcsname}%
      \expandafter\def\csname end#1\endcsname{\csname
          o:end#1:\endcsname$$\egroup
         \csname b:#1\endcsname}\expandafter
                               \expandafter\csname o:#1:\endcsname
  \fi}
>>>



\<plain,latex utilities\><<<
\def\SaveMkHalignConf:g#1{\SaveMkHalignConfig
   \edef\:temp{\noexpand\Configure{MkHalign} {} {}
     {\expandafter\noexpand\csname c:#1\endcsname} 
     {\expandafter\noexpand\csname d:#1\endcsname }
     {\expandafter\noexpand\csname e:#1\endcsname 
        \noexpand\RecallMkHalignConfig}
     {\expandafter\noexpand\csname f:#1\endcsname }}\:temp}
>>>


% \global\let\TailTD|=\:UnDef











\<amstex.tex matrix\><<<
\let\:tempc|=\pmatrix
\pend:def\:tempc{\a:pmatrix}
\HLet\pmatrix|=\:tempc
\let\:tempc|=\endpmatrix
\append:def\:tempc{\b:pmatrix}
\HLet\endpmatrix|=\:tempc
\NewConfigure{pmatrix}{2}
>>>





\Section{Align}
















\SubSection{Cases}

%  \def\cases{\bgroup\spreadmlines@\jot\left\{\,\matrix\format\l&\quad\l\\}
%  \def\endcases{\endmatrix\right.\egroup}








\<amstex.tex cases\><<<
\pend:def\cases{\a:cases\MkHformat}
\append:def\endcases{\b:cases}
\NewConfigure{cases}{2}
>>>









\Section{Others}






\<equations of amstex.tex\><<<
\let\:tempc|=\bmatrix
\pend:def\:tempc{\a:bmatrix}
\HLet\bmatrix|=\:tempc
\let\:tempc|=\endbmatrix
\append:def\:tempc{\b:bmatrix}
\HLet\endbmatrix|=\:tempc
\NewConfigure{bmatrix}{2}
>>>

\<equations of amstex.tex\><<<
\pend:def\vmatrix{\a:vmatrix}
\append:def\endvmatrix{\b:vmatrix}
\NewConfigure{vmatrix}{2}
>>>

\<equations of amstex.tex\><<<
\pend:def\Vmatrix{\a:Vmatrix}
\append:def\endVmatrix{\b:Vmatrix}
\NewConfigure{Vmatrix}{2}
>>>






\Section{Other}


\<equations of amstex.tex\><<<
\let\:tempc|=\frac
\pend:defII\:temp{\a:frac}
\append:defII\:temp{\b:frac}
\HLet\frac|=\:temp
\NewConfigure{frac}{2}
\let\:tempc|=\dfrac
\pend:defII\:temp{\a:dfrac}
\append:defII\:temp{\b:dfrac}
\HLet\dfrac|=\:temp
\NewConfigure{dfrac}{2}
\let\:tempc|=\tfrac
\pend:defII\:temp{\a:tfrac}
\append:defII\:temp{\b:tfrac}
\HLet\tfrac|=\:temp
\NewConfigure{tfrac}{2}
\let\:tempc|=\binom
\pend:defII\:temp{\a:binom}
\append:defII\:temp{\b:binom}
\HLet\binom|=\:temp
\NewConfigure{binom}{2}
\let\:tempc|=\dbinom
\pend:defII\:temp{\a:dbinom}
\append:defII\:temp{\b:dbinom}
\HLet\dbinom|=\:temp
\NewConfigure{dbinom}{2}
\let\:tempc|=\tbinom
\pend:defII\:temp{\a:tbinom}
\append:defII\:temp{\b:tbinom}
\HLet\tbinom|=\:temp
\NewConfigure{tbinom}{2}
\let\:temp|=\boxed
\pend:defI\:temp{\a:boxed}
\append:defI\:temp{\b:boxed}
\HLet\boxed|=\:temp
\NewConfigure{boxed}{2}
>>>




\Section{Incomplete}

\<body of amstex.tex\><<<
\def\:temp{{\textfontii AMS}-\TeX}
\HLet\AmSTeX|=\:temp
>>>

\<body of amstex.tex\><<<
\def\linebreak{\RIfM@\mathmodeerr@\linebreak\else
 \ifhmode\unskip\unkern\break \a:linebreak\else
 \vmodeerr@\linebreak\fi\fi}
\NewConfigure{linebreak}{1}
>>>





\<equations of amstex.tex\><<<
                                    \catcode`\#|=13 \catcode`\!|=6    
\def\reg:gathered{\vcenter\bgroup
   \SaveMkHalignConf:g{gathered}%
   \Let@ 
   \MkHalign#{$\m@th\displaystyle{#}$}}
                                    \catcode`\#=6 \catcode`\!=12 
\def\:tempc{\crcr\EndMkHalign 
    \RecallMkHalignConfig \egroup\b:gathered}
\HLet\endgathered|=\:tempc
\def\:temp{\pic:MkHalign{gathered}} 
\HLet\gathered|=\:temp
\NewConfigure{gathered}{6}
>>>

\<equations of amstex.tex\><<<
\let\:insplit|=\insplit@
\def\insplit@{\let\halign|=\TeXhalign \:insplit}
>>>


\Section{Aligned}


\<equations of amstex.tex\><<<
                                    \catcode`\#|=13 \catcode`\!|=6    
\def\reg:aligned@{\bgroup
   \SaveMkHalignConf:g{aligned@}%
   \Let@ 
   \MkHalign#{$\m@th\displaystyle{#}$&%
              $\m@th\displaystyle{{}#}$}}
                                    \catcode`\#=6 \catcode`\!=12 
\def\al:gned#1{%
   \Configure{aligned@}{\csname a:#1\endcsname}%
       {\csname b:#1\endcsname}{\csname c:#1\endcsname}%
       {\csname d:#1\endcsname}{\csname e:#1\endcsname}%
       {\csname f:#1\endcsname}\pic:MkHalign{#1}}
\NewConfigure{aligned@}{6}
>>>

\<equations of amstex.tex\><<<
\def\:tempc{\crcr\EndMkHalign 
    \RecallMkHalignConfig \egroup\b:aligned@}
\HLet\endaligned|=\:tempc
\def\:temp{\al:gned{aligned}}
\HLet\aligned|=\:temp
\def\reg:aligned{\vcenter\reg:aligned@}
\NewConfigure{aligned}{6}
\HLet\endtopaligned|=\endaligned
\def\:tempc{\al:gned{topaligned}}
\HLet\topaligned|=\:tempc
\def\reg:topaligned{\null\vtop\reg:aligned@}
\NewConfigure{topaligned}{6}
\HLet\endbotaligned|=\endaligned
\def\:tempc{\al:gned{botaligned}}
\HLet\botaligned|=\:tempc
\def\reg:botaligned{\null\vtop\reg:aligned@}
\NewConfigure{botaligned}{6}
>>>






\<equations of amstex.tex\><<<
\def\:tempc{\crcr\EndMkHalign 
    \RecallMkHalignConfig \egroup\b:alignedat}
\HLet\endalignedat|=\:tempc
\def\:tempc{\al:gned{alignedat}}
\HLet\alignedat|=\:tempc
\NewConfigure{alignedat}{6}
                                    \catcode`\#|=13 \catcode`\!|=6    
\def\reg:alignedat!1{\null\vcenter\bgroup
   \SaveMkHalignConf:g{alignedat}%
   \hashtoks@{#}{\let\@lign|=\empty \doat@{!1}}\Let@
   \pend:def\preamble@@{\:span}%
   |<expand amstex.tex ...alignat pattern|>\MkHalign#{\preamble@@}}
                                    \catcode`\#=6 \catcode`\!=12 
>>>




\Section{Aligned At}


\<equations of amstex.tex\><<<
\catcode`\#|=13 \catcode`\!|=6
\def\:tempc!1!2\endalignat{%   
  \Mk:ialign:end{\preamble@@}{alignat}{!2}#%
     {|<amstex.tex alignat get pattern|>%
      |<expand amstex.tex ...alignat pattern|>%
     }}
\catcode`\#=6 \catcode`\!=12
\expandafter\HLet\csname alignat \endcsname\:tempc
\NewConfigure{alignat}{6}
>>>

\<expand amstex.tex ...alignat pattern\><<<
\def\:temp!!1!!2{\expand:after{!!1!!2}\expandafter}%
\:temp       |%\MkHalign#{\preamble@@}...\EndMkHalign |%
>>>


\<amstex.tex alignat get pattern\><<<
\hashtoks@{#}|<inany@true|>\xat@false  
|<tag for alignat amstex.tex|>%
\measuring@false \Let@
{\let\@lign=\empty \attag@{!1}}%
\let\allowdisplaybreak  =\empty
\pend:def\preamble@@{\:span}%
>>>

\<tag for alignat amstex.tex\><<<
\def\tag{\global\tag@true\count@!1\relax\multiply\count@\tw@
   \xdef\tag@{}\loop\ifnum\count@>\and@\xdef\tag@{&\tag@}%
                \advance\count@\m@ne \repeat\tag@}%
>>>




\<equations of amstex.tex\><<<
\catcode`\#|=13 \catcode`\!|=6
\def\:tempc!1!2\endxalignat{%   
  \Mk:ialign:end{\preamble@@}{xalignat}{!2}#%
     {|<amstex.tex alignat get pattern|>%
      |<expand amstex.tex ...alignat pattern|>%
     }}
\catcode`\#=6 \catcode`\!=12
\expandafter\HLet\csname xalignat \endcsname\:tempc
\NewConfigure{xalignat}{6}
>>>


\<amstex.tex xalignat get pattern\><<<
\hashtoks@{#}|<inany@true|>\xat@true  
|<tag for xalignat amstex.tex|>%
\measuring@false \Let@
{\let\@lign=\empty \attag@{!1}}%
\let\allowdisplaybreak  =\empty
\pend:def\preamble@@{\:span}%
>>>


\<tag for xalignat amstex.tex\><<<
\def\tag{\global\tag@true\def\tag@{}\count@!1\relax
  \multiply\count@\tw@
  \loop\ifnum\count@>\and@
     \xdef\tag@{&\tag@}\advance\count@\m@ne\repeat\tag@}%
>>>








\<equations of amstex.tex\><<<
                                  \catcode`\#|=13 \catcode`\!|=6
\def\:tempc!1!2\endxxalignat{%   
  \Mk:ialign:end{\preamble@@}{xxalignat}{!2}#%
     {|<amstex.tex xxalignat get pattern|>%
      |<expand amstex.tex ...alignat pattern|>%
     }}
                                  \catcode`\#=6 \catcode`\!=12
\expandafter\HLet\csname xxalignat \endcsname\:tempc
\NewConfigure{xxalignat}{6}
>>>


\<amstex.tex xxalignat get pattern\><<<
\hashtoks@{#}|<inany@true|> \measuring@false \Let@
{\let\@lign=\empty \xxattag@{!1}}%
\let\allowdisplaybreak  =\empty
\pend:def\preamble@@{\:span}%
>>>

\`'\ifinany@' and \`'\displaybreak@' are not defined in ams* starting 
since 1999.

\<inany@true\><<<
\ifx \ifinany@\:Undef\else  \inany@true\fi  
>>>

\<displaybreak@\><<<
\ifx \displaybreak@\:UnDef
   \chardef\dspbrk@context\z@  
\else
   \displaybreak@
\fi
>>>



\<restore ams equationNO\><<<
\ifx \ifinany@\:Undef
  \HRestore\equation
  \HRestore\endequation
\fi
>>>

\<restore amsmath everydisplay\><<<
\append:def\a:display{\@displaytrue}
\expandafter\append:defIII\csname
    c:$$:\endcsname{\append:def\a:display{\@displaytrue}}
>>>

\Section{Multiline}




\<equations of amstex.tex\><<<
\let\:tempc|=\endmultline
\append:def\:tempc{\b:multline}
\HLet\endmultline|=\:tempc
\def\:tempc{\al:gned{multline}}
\HLet\multline|=\:tempc
\let\reg:multline|=\o:multline:
\NewConfigure{multline}{4}  
\let\e:multline|=\empty
\let\f:multline|=\empty
                                    \catcode`\#|=13 \catcode`\!|=6
\def\:tempc{\let\sv:halign|=\halign
   \def\halign!!1\crcr{%
      \let\halign|=\sv:halign
      \SaveMkHalignConf:g{multline}%
      \MkHalign#{|<multline amstex.tex pattern|>}}%
   \o:rmultline@@@:}
                                    \catcode`\#=6 \catcode`\!=12
\HLet\rmultline@@@|=\:tempc
\def\:tempc{\rmultline@@@}
\HLet\lmultline@@@|=\:tempc
\def\:tempc{\crcr\EndMkHalign\RecallMkHalignConfig }
\HLet\lendmultline@|=\:tempc
\def\:tempc{\lendmultline@}   
\HLet\rendmultline@|=\:tempc
>>>


\<multline amstex.tex pattern\><<<
\Let@\hbox{$\m@th\displaystyle\hfil{}#$}%
>>>




%----------------------------- amsppt.sty -----------------------

\Chapter{amsppt.sty}


\<if not amsppt.sty\><<<
\expandafter\ifx \csname amsppt.sty\endcsname\relax
>>>

\<recall amsppt.sty\><<<
|<if not amsppt.sty|> \else
   \ifx  \plainend\:UnDef \else
      \let\sv:end|=\end  \let\end|=\plainend
   \fi
   \let\sv:logo|=\logo@  \let\logo@|=\empty
\fi
>>>




\<amsppt.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% amsppt.4ht                            |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\HRestore\footnote
\append:def\EndPreamble{\let\logo@|=\sv:logo \let\sv:logo=\empty}
|<set amsppt.sty|>
|<top matter of amsppt.sty|>
|<everypar in amsppt.sty|>
|<hfonts for amsppt.sty|>
|<sectioning in amsppt.sty|>
|<footnotes in amsppt.sty|>
|<bib in amsppt.sty|>
|<roster in amsppt.sty|>
|<captions in amsppt.sty|>
|<enddocument in amsppt.sty|>
|<config amsppt + vanilla shared|>
\Hinput{amsppt}
\endinput
>>>        \AddFile{5}{amsppt}



In older files the ams-logo is printer at the first page, 
possibly before \''\endmatters'. This can be a problem if 
the \''\EndPreamble' stuff is pushed to the second page.






\<set amsppt.sty\><<<
\append:def\block{\ifx \EndPicture\:UnDef \:block 
  \pend:def\endblock{\end:block} \fi}
\NewConfigure{block}{2}
>>>



\Section{Captions}


\<captions in amsppt.sty\><<<
\append:def\@ins{\def\vspace##1{\vskip##1\relax}%
  \def\captionwidth##1{\captionwidth@##1\relax}}
\let\:topcaption|=\topcaption
\let\:botcaption|=\botcaption

\def\:caption#1#2\endcaption{\a:caption
  {\captionfont@#1}\if\notempty{#2}.\fi\b:caption
  \if\notempty{#2}{\rm#2}\fi \c:caption}

\def\botcaption{\ifx \EndPicture\:UnDef \expandafter\:caption
  \else \expandafter\:botcaption \fi}
\def\topcaption{\ifx \EndPicture\:UnDef \expandafter\:caption
  \else \expandafter\:topcaption \fi}

\NewConfigure{caption}{3}
>>>

\Section{Lists (Rosters}


without the par below we get an extra \''<P>' when \''\nextii@' applies in \''\roster'

\<roster in amsppt.sty\><<<
\let\:roster|=\roster
\def\roster{\IgnorePar
   \let\roster:par|=\par  
   \def\par{\let\par|=\roster:par \par
      \def\:tempa{\ifx \:temp\par@  \IgnorePar\leavevmode\IgnorePar\fi}%
      \futurelet\:temp\:tempa}%
   \:roster   \let\ams:tem|=\item
   \def\item{\IgnorePar\EnditemitemList \ams:tem}%
   \a:roster}
\pend:def\endroster{\EnditemitemList\b:roster}
>>>

\<roster in amsppt.sty\><<<
\pend:def\itembox@{\ifx \EndPicture\:UnDef
   \a:itembox@ \therosteritem@ \b:itembox@ \expandafter\:gobbleII\fi}
>>>


\<roster in amsppt.sty\><<<
\NewConfigure{roster}[4]{\def\:temp{#1#2#3#4}\ifx \:temp\empty
   \else \def\a:roster{\ii:conf#1}\def\b:roster{#2}%
         \def\a:itembox@{#3}\def\b:itembox@{#4}\fi
   \long\def\:temp##1##2##3##4{\def\:temp{##1##2##3##4}\ifx \:temp\empty
      \else 
      \def\ii:conf{\Configure{itemitem}{##1}{##2}{##3}{##4}}\fi}\:temp}
>>>

 Configure \''\item' and/or \''\itemitem', provided that at least one of the pars is not empty 

\<roster in amsppt.sty\><<<
|<itemitem from tex|>
>>>

The following is from TeX4ht2.

\<itemitem from tex\><<<
\ifx \EnditemitemList\:UnDef
   |<plain+ itemitem list|>
\fi
>>>



\Section{Bibliography}

\SubSection{Introduce Hooks}

\<bib in amsppt.sty\><<<
\let\:refstyle|=\refstyle
\let\endref:|=\endref@
\def\endref@{%
  \pend:defI\keyformat{\a:keyformat}%
  \append:defI\keyformat{\b:keyformat}%
  \def\refstyle##1{\let\:tempa|=\keyformat \:refstyle{##1}%
    \ifx \:tempa\keyformat  \else
       \pend:defI\keyformat{\a:keyformat}%
       \append:defI\keyformat{\b:keyformat}\fi  }
  \def\:temp##1{%
     \expandafter\ifvoid\csname ##1box@\endcsname\else
       \expandafter\setbox\csname ##1box@\endcsname=\hbox
          {\csname a:##1\endcsname \expandafter\unhbox\csname
            ##1box@\endcsname\csname b:##1\endcsname}\fi}
  \ifx \MRbox@\:UnDef\else  \:temp{MR}\fi
  \:temp{book}
  \:temp{bookinfo}
  \:temp{by}
  \:temp{ed}
  \:temp{finalinfo}
  \:temp{issue}
  \:temp{jour}
  \:temp{key}
  \:temp{lang}
  \:temp{miscnote}
  \:temp{moreref}
  \:temp{pages}
  \:temp{paper}
  \:temp{paperinfo}
  \:temp{procinfo}
  \:temp{publaddr}
  \:temp{publ}
  \:temp{vol}
  \:temp{yr}
  \endref: }
>>>



\<bib in amsppt.sty\><<<
\pend:def\ref{\Configure{HtmlPar}{}{}{}{}\a:ref}
\append:def\endref{\b:ref}
\pend:defIII\makerefbox{\IgnorePar}
>>>

\<bib in amsppt.sty\><<<
\let\:Refs|=\Refs
\def\Refs{\bgroup
   \let\sv:nofrillscheck\nofrillscheck
   \def\nofrillscheck{%
      \expand:after{\let\::Refs=}\csname Refs\endcsname
      \expandafter\def\csname Refs\endcsname####1{%
         |<header of Refs|>%
         \let\sv:ref|=\ref \def\ref{\let\ref|=\sv:ref \a:Refs\ref}%
         \pend:def\endRefs{\b:Refs}\append:def\endRefs{\egroup}}%
      \sv:nofrillscheck}%
   \csname :Refs\endcsname}
>>>

\<header of Refs\><<<
\def\:temp{####1}\ifx\:temp\empty \::Refs{}\else
   \::Refs{\csname ams:refs\endcsname{####1}}\fi 
>>>

\SubSection{Define Configures for Hooks}

\<bib in amsppt.sty\><<<
\def\:temp#1{\edef\:tempa{\long
   \def\expandafter\noexpand\csname c:#1:\endcsname
   ####1####2{\def\expandafter\noexpand\csname a:#1\endcsname{####1}
          \def\expandafter\noexpand\csname b:#1\endcsname{####2}}}\:tempa}
\ifx \MRbox@\:UnDef\else  \:temp{MR}\fi
\:temp{book}
\:temp{bookinfo}
\:temp{by}
\:temp{ed}
\:temp{finalinfo}
\:temp{issue}
\:temp{jour}
\:temp{key}
\:temp{lang}
\:temp{miscnote}
\:temp{moreref}
\:temp{pages}
\:temp{paper}
\:temp{paperinfo}
\:temp{procinfo}
\:temp{publaddr}
\:temp{publ}
\:temp{vol}
\:temp{yr}
\:temp{ref}
\:temp{keyformat}
\:temp{Refs}
>>>

\SubSection{Initialize the Hooks}


So far the hooks have been initialized to do nothing.



\SubSection{Fix}


\<bib in amsppt.sty\><<<
\def\makerefbox#1#2#3{\endgraf
  \setbox\z@\lastbox
  \global\setbox\@ne\hbox{\unhbox\holdoverbox
    \ifvoid\z@\else\unhbox\z@\unskip\unskip\unpenalty\fi}%
  \egroup
  \setbox\curbox\box \@ne
  \ifvoid#2\else\Err@{Redundant \string#1; duplicate use, or
     mutually exclusive information already given}\fi
  \def\curbox{#2}\setbox\curbox\vbox\bgroup \hsize\maxdimen \noindent
  #3}
>>>

The original file has the code \`'\setbox\curbox\box \ifdim\wd\@ne>\z@ \@ne \else\voidb@x\fi'.  That code is problematic because we can reach widths
larger than can be measured by the \`'\wd' command.




\Section{Sectioning}

\<sectioning in amsppt.sty\><<<
\def\title{\let\savedef@\title
  \def\title##1\endtitle{\let\title\savedef@
    \global\setbox\titlebox@\vtop{\tenpoint\a:title
      \raggedcenter@ \frills@\uppercasetext@{##1}\endgraf\b:title}%
  }%
  \nofrillscheck\title}
>>>

\<config amsppt + vanilla shared\><<<
\NewConfigure{title}{2}
>>>

The space above the title is needed to separate it from the `typset by AMS-TeX'
that is automatically printed.



\<sectioning in amsppt.styNO\><<<
\pend:def\endproclaim{\IgnorePar}
\append:def\endproclaim{\ShowPar}
>>>

\<sectioning in amsppt.sty\><<<
\def\proclaim#1{\csname o:proclaim:\endcsname
   {\a:proclaim#1\b:proclaim}}
\def\endproclaim{\revert@envir\endproclaim\c:proclaim \par\rm}
>>>






% \def\chapterno@{\uppercase\expandafter{\romannumeral\chaptercount@}}
% 
% \def\chapter{\let\savedef@\chapter
%   \def\chapter##1{\let\chapter\savedef@
%   \leavevmode\hskip-\leftskip
%    \rlap{\vbox to\z@{\vss\centerline{\eightpoint
%    \frills@{CHAPTER\space\afterassignment\chapterno@
%        \global\chaptercount@|=}%
%    ##1\unskip}\baselineskip2pc\null}}\hskip\leftskip}%
%  \nofrillscheck\chapter}

\<sectioning in amsppt.sty\><<<
\let\:specialhead|=\specialhead
\def\specialhead#1\endspecialhead{\let\specialheadfont:|=\specialheadfont@ 
   \ifx \ams:refs\:UnDef \def\ams:refs{\rm\ams:specialhead}\fi
   \let\specialheadfont@|=\empty
   \csname :specialhead\endcsname 
   \ams:specialhead{#1}\let\frills@\eat@ \endspecialhead
   \let\specialheadfont@|=\specialheadfont: }
\let\ams:specialhead|=\specialhead
\NewSection\specialhead{}
\let\:temp=\specialhead  \let\specialhead|=\ams:specialhead
\let\ams:specialhead|=\:temp
>>>

\<sectioning in amsppt.sty\><<<
\let\:head|=\head
\def\head#1\endhead{\let\headfont:|=\headfont@ 
   \ifx \ams:refs\:UnDef \def\ams:refs{\rm\ams:head}\fi
   \let\headfont@|=\empty
   \csname :head\endcsname 
   \ams:head{#1}\let\frills@\eat@ \endhead
   \let\headfont@|=\headfont: }
\let\ams:head|=\head
\NewSection\head{}
\let\:temp|=\head \let\head|=\ams:head
\let\ams:head|=\:temp
>>>

\<sectioning in amsppt.sty\><<<
\let\:subhead|=\subhead
\def\subhead#1\endsubhead{\let\subheadfont:|=\subheadfont@ 
   \ifx \ams:refs\:UnDef \def\ams:refs{\rm\ams:subhead}\fi
   \let\subheadfont@|=\empty  \csname :subhead\endcsname 
   \ams:subhead{#1}\let\frills@|=\eat@ \endsubhead
   \let\subheadfont@|=\subheadfont: }
\let\ams:subhead|=\subhead
\NewSection\subhead{}
\let\:temp|=\subhead \let\subhead|=\ams:subhead
\let\ams:subhead|=\:temp
>>>

\<sectioning in amsppt.sty\><<<
\let\:subsubhead|=\subsubhead
\def\subsubhead#1\endsubsubhead{\let\subsubheadfont:|=\subsubheadfont@ 
   \ifx \ams:refs\:UnDef \def\ams:refs{\rm\ams:subsubhead}\fi
   \let\subsubheadfont@|=\empty  \csname :subsubhead\endcsname 
   \ams:subsubhead{#1}\let\frills@|=\eat@ \endsubsubhead
   \let\subsubheadfont@|=\subsubheadfont: }
\let\ams:subsubhead|=\subsubhead
\NewSection\subsubhead{}
\let\:temp|=\subsubhead \let\subsubhead|=\ams:subsubhead
\let\ams:subsubhead|=\:temp
>>>




\Section{Everypar}

% group on #2 for fonts
%  \def\HtmlPar{\if:removeindent \ShowPar \hskip-\parindent
%     \else      \HCode{\html:par\html:src}%
%     \fi }

\<everypar in amsppt.sty\><<<
\def\par@{\ht:everypartoks@\expandafter{\the\ht:everypar}%
   \HtmlPar \ht:everypar{\HtmlPar}}
\def\nobreak{\penalty\@M
  \ifvmode\gdef\penalty@{\global\let\penalty@\penalty\count@@@}%
  \ht:everypar{\global\let\penalty@\penalty
    \HtmlPar \ht:everypar{\HtmlPar}}\fi}
>>>



%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Footnotes}
%%%%%%%%%%%%%%%%%%%%%%%%%%%




\<set amsppt.styNO\><<<
\let\makefootnote@|=\vfootnote
>>>



\<footnotes in amsppt.styNO\><<<
\let\footmarkform@|=\:gobble
\let\thefootnotemark|=\footmarkform@
\def\makefootnote@#1#2{\def\footmarkform@##1{$\m@th{##1}$}%
  \def\FNmark{#1}\gHAdvance\FNnum |by 1 
  \a:footnote \b:footnote{#2}\c:footnote \let\footmarkform@\:gobble}
\NewConfigure{footnote}{3}
\HAssign\FNnum|=0
>>>


%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Top Matter}

\<top matter of amsppt.sty\><<<
\let\:endtopmatter|=\endtopmatter
\def\endtopmatter{%
   |<move footnotes down|>%
  \let\inslogo@|=\logo@
  \ifx\thedate@\empty@\else
     |<neutralize line|>%
     \let\thedate:|=\thedate@
     \def\thedate@{\a:date\thedate:\b:date}\fi
  \ifvoid\tocbox@\else   \ifx \a:newtocdefs\:UnDef 
     \setbox\tocbox@=\vtop{\IgnorePar
        |<amstex.tex toc|>}%
  \fi \fi
  \csname :endtopmatter\endcsname \b:topmatter }
\pend:def\topmatter{\a:topmatter}
\NewConfigure{topmatter}{2}
>>>

\<top matter of amsppt.sty\><<<
\NewConfigure{newtocdefs}[1]{\c:def\a:newtocdefs{#1}}
\let\o:newtocdefs:=\newtocdefs
\def\newtocdefs{\o:newtocdefs:
   |<amstex.tex toc entries|>%
   \ifx \a:newtocdefs\:UnDef
   \else \a:TableOfContents
       \pend:def\endtoc{\c:TableOfContents}%
   \fi}
\pend:def\toc{\SaveEndP
   |<extract amstex.tex toc title|>}
\append:def\endtoc{\RecallEndP}
\def\c:toc:{\Configure{TableOfContents}}
>>>


\<insert amstex.tex toc title\><<<
\ifmonograph@\else
   \centerline{\headfont@\ignorespaces\toc:title\unskip}\nobreak
\fi
>>>

\<extract amstex.tex toc title\><<<
\ifx \a:newtocdefs\:UnDef 
   \let\:tempc|=\FN@
   \def\FN@{%
      \let\FN@|=\:tempc 
      \let\:tempc|=\nextii@
      \def\nextii@########1{\let\nextii@|=\:tempc 
         \gdef\toc:title{########1}\nextii@{########1}}%
      \FN@}%
\fi
>>>

If \''\a:newtocdefs' empty we go for the inlinecontent
under interpretation of entries of \''\TableOfContents',
if it is undefined we call directly to \''\TableOfContents' with
the entries that appear in the body (instead of the content part,
and we go for the body itself if \''\a:newtocdefs' is defined to a
nonempty content.  

\<amstex.tex toc entries\><<<
\ifx \a:newtocdefs\:UnDef
   \let\toc:list|=\empty
   \expandafter\def\csname title\endcsname  ##1\endtitle{%
       \xdef\toc:list{\ifx \toc:list\empty\else ,\fi title}}%
   \expandafter\def\csname specialhead\endcsname##1\endspecialhead{%
       \xdef\toc:list{\ifx \toc:list\empty\else ,\fi specialhead}}%
   \expandafter\def\csname head\endcsname##1 ##2\endhead{%
       \xdef\toc:list{\ifx \toc:list\empty\else ,\fi head}}%
   \expandafter\def\csname subhead\endcsname##1 ##2\endsubhead{%
       \xdef\toc:list{\ifx \toc:list\empty\else ,\fi subhead}}%
   \expandafter\def\csname subsubhead\endcsname##1 ##2\endsubsubhead{%
       \xdef\toc:list{\ifx \toc:list\empty\else ,\fi subsubhead}}%
\else \ifx \a:newtocdefs\empty
   \HAssign\TocCount|=0
   \expandafter\def\csname title\endcsname##1\endtitle{%
         \toctitle{}{##1}{}}%
   \expandafter\def\csname specialhead\endcsname##1\endspecialhead{%
         \tocspecialhead{}{##1}{}}%
   \expandafter\def\csname head\endcsname##1 ##2\endhead{%
         \tochead{##1}{##2}{}}%
   \expandafter\def\csname subhead\endcsname##1 ##2\endsubhead{%
         \tocsubhead{##1}{##2}{}}%
   \expandafter\def\csname subsubhead\endcsname##1 ##2\endsubsubhead{%
         \tocsubsubhead{##1}{##2}{}}%
\else
   \a:newtocdefs
\fi \fi
>>>

\<amstex.tex toc\><<<
|<insert amstex.tex toc title|>%
\ifx \toc:list\:UnDef
  \def\toc:list{\TableOfContents[title,specialhead,head,%
                       subhead,subsubhead]}%
\else
   \pend:def\toc:list{\TableOfContents[}%
   \append:def\toc:list{]}%
\fi 
\toc:list
>>>




   \<move footnotes down\><<<
\ifmonograph@\else
  \ifx \preabstract\relax \let\preabstract|=\empty\fi
  \ifx\thesubjclass@\empty@\else
     \let\:thesubjclass|=\thesubjclass@   \let\thesubjclass@|=\empty
     \pend:def\preabstract{\a:subjclass\:thesubjclass\b:subjclass}%
  \fi
  \ifx\thekeywords@\empty@\else
     \let\:thekeywords|=\thekeywords@   \let\thekeywords@|=\empty
     \pend:def\preabstract{\a:keywords\:thekeywords\b:keywords}%
  \fi
  \ifx\thethanks@\empty@\else
      \let\:thethanks|=\thethanks@    \let\thethanks@|=\empty
     \pend:def\preabstract{\a:thanks\:thethanks\b:thanks}%
  \fi
\fi
>>>


\<top matter of amsppt.sty\><<<
\NewConfigure{subjclass}{2}
\NewConfigure{thanks}{2}
\NewConfigure{keywords}{2}
>>>



\<neutralize line\><<<
\let\:predate|=\predate
\def\predate{\:predate
   \let\sv:line|=\line \def\line{\let\line|=\sv:line\hbox}}%
>>>


\<top matter of amsppt.sty\><<<
\let\:author|=\author
\def\author#1\endauthor{\:author{\a:author#1\b:author}\endauthor}
>>>

\<config amsppt + vanilla shared\><<<
\NewConfigure{author}{2}
>>>


\<top matter of amsppt.sty\><<<
\let\:affil|=\affil
\def\affil#1\endaffil{\:affil{\a:affil#1\b:affil}\endaffil}
\NewConfigure{affil}{2}
>>>

\<top matter of amsppt.sty\><<<
\def\abstract{\let\savedef@\abstract
  \def\abstract{\let\abstract\savedef@
    \setbox\abstractbox@\vbox\bgroup\IgnorePar \noindent
      \expandafter\everydisplay\expandafter{\expandafter
      \everydisplay\expandafter{\the\everydisplay}}$$\vbox\bgroup
      \def\envir@end{\endabstract}\advance\hsize-2\indenti
      \def\usualspace{\enspace}\eightpoint 
          \IgnorePar \noindent \frills@{{\smc 
          \a:abstract Abstract.\b:abstract\enspace}}}%
  \nofrillscheck\abstract}
>>>

\<top matter of amsppt.sty\><<<
\append:def\abstract{\c:abstract}
\pend:def\endabstract{\d:abstract}
\NewConfigure{abstract}{4}
>>>

\<top matter of amsppt.sty\><<<
\NewConfigure{date}{2}
>>>

\<top matter of amsppt.styNO\><<<
\NewConfigure{toc}[5]{\c:def\a:TableOfContents{#1}%
   \c:def\b:TableOfContents{#2}\c:def\c:TableOfContents{#3}%
   \c:def\d:TableOfContents{#4}\c:def\e:TableOfContents{#5}%
}
\Configure{toc} {}{}{} {}{}
>>>



\Section{EndDocument}

\<enddocument in amsppt.sty\><<<
\ifx \enddocument@text\:UnDef \else
   \pend:def\enddocument@text{\bgroup}
   \append:def\enddocument@text{\egroup}
\fi
>>>

The above is to prevent spilling of fonts when hfonts are defined.


Why the if below????

\<set amsppt.styNO\><<<
\ifx  \plainend\:UnDef \else
   \let\plainend|=\end   \let\end|=\sv:end
\fi
>>>

\<set amsppt.sty\><<<
\def\plainend{\end}   \let\end|=\sv:end
>>>

%%%%%%%%%%%%%%%%
\Part{Packages}
%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Bibliography}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%
\Section{BibTeX}
%%%%%%%%%%%%%%%%%%%%%

\Link[http://pertsserver.cs.uiuc.edu/\string ~hull/bib2html/]{}{}bib2html\EndLink


\<bibtex.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% bibtex.4ht                            |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Usage:  \input bibtex.4ht  \bibtex{file.bib}                   %
% Provides: \bibkey, \thisbib, \Configure{@...}, \Configure{...} %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|<save cat codes|>
|<bibtex body|>
|<parse fields|>
\:RestoreCatcodes
\endinput
>>>


\<save cat codes\><<<
\expandafter\ifx\csname :RestoreCatcodes\endcsname\relax
    \expandafter\let\csname :RestoreCatcodes\endcsname=\empty
\fi
\edef\bibstack{\noexpand\PushStack\expandafter\noexpand
    \csname Cat:Stack\endcsname
    \expandafter\noexpand \csname :RestoreCatcodes\endcsname}
\bibstack
\expandafter\edef\csname :RestoreCatcodes\endcsname{%
   \catcode`\noexpand :|=\the\catcode`:%
   \catcode`\noexpand "|=\the\catcode`"%
   \catcode`\noexpand @|=\the\catcode`@%
   \catcode`\noexpand _|=\the\catcode`_%
   \catcode`\noexpand ^|=\the\catcode`^%
   \catcode`\noexpand |||=\the\catcode`||%
   \csname no:restore\endcsname
   \noexpand\PopStack\expandafter\noexpand\csname Cat:Stack\endcsname
        \expandafter\noexpand \csname :RestoreCatcodes\endcsname}
\catcode`\:|=11 \catcode`\@|=11   \catcode`\^|=7 \catcode`\||=12
\catcode`"|=12
>>>

\<bibtex body\><<<
\catcode`\_=13
\gdef\bib:parse#1,{{\def_{\string_}%
   \xdef\bibkey{#1}\open:tag{\bib:type}{entry}\hfil\break}\cont:parse}
\catcode`\_=8
\gdef\bib:eat{\bgroup \catcode`\@=12  \catcode`\^^M=10 \catcode`\#=12
   \a:@bibtex \csname a:@\bib:type\endcsname
   \ifx \thisbib\:UnDef \expandafter\bib:conteat
   \else \pend:defI\thisbib{\egroup}\expandafter\thisbib \fi}
\NewConfigure{@bibtex}{1}
\def\get:key#1 #2///{\def\:temp{#2}\ifx\:temp\empty \def\bib:tag{#1}\else
      \def\:temp{\get:key#1#2///}\expandafter\:temp
   \fi}
\long\def\bib:conteat#1{\egroup
  {\bib:parse #1@="@"}\csname b:\bib:type\endcsname \vfil\break}
\def\open:tag#1#2{%
  \expandafter\ifx \csname a:#1\endcsname\relax
     \:warning{no configuration for #2 <#1>...</#1>}%
     \global\expandafter\let \csname a:#1\endcsname\empty
  \fi \csname a:#1\endcsname}    
\def\bib:scan{\ifx \:next\bgroup \expandafter\bib:eat
   \else \expandafter\bib:more \fi}
\def\bib:more#1{\edef\bib:type{\bib:type#1}\futurelet\:next\bib:scan}

\def\b:btitem#1{\egroup\def\bib:type{#1}\futurelet\:next\bib:scan}

\catcode`\@=13\relax
\gdef\bibtex#1{\begingroup
     \def@{\bgroup \catcode`\@=12\b:btitem}%
   \catcode`\@=13\relax
   \input #1\endgroup}
\catcode`\@=11\relax
>>>




\<parse fields\><<<
\def\cont:parse{\futurelet\:next\cont:parseY}
\def\cont:parseY{%
   \expandafter\ifx \space\:next
       \expandafter       \def\expandafter\:temp\space{\cont:parse}%
   \else \let\:temp\cont:parseX \fi \:temp}
\long\def\cont:parseX#1={%%
   \expandafter\get:key#1 ///\futurelet\:next\parse:value}
\def\parse:value{%
   \expandafter\ifx \space\:next
      \expandafter\def\expandafter\:temp\space{\futurelet
           \:next\parse:value}%
   \else \if "\:next   \let\:temp=\parse:valueX
   \else
      \ifx \bgroup\:next \let\:temp=\parse:valueG
      \else \let\:temp=\parse:valueC  \fi
   \fi \fi \:temp}
\def\parse:valueC#1,{\parse:valueY{#1},}
\def\parse:valueX"#1"{\parse:valueY{#1}}
\def\parse:valueG#1{\parse:valueY{#1}}
\def\parse:valueY#1{%
   \def\:temp{@}\def\:tempa{#1}\ifx \:temp\:tempa \else
     \def\:tempb{#1}\ifx \:tempb\empty\else \open:tag\bib:tag{key}%
        \:tempb\csname b:\bib:tag\endcsname\hfil\break
     \fi
     \expandafter\tail:parse
   \fi}
\def\tail:parse{\futurelet\:next\tail:parseY}
\def\tail:parseY{\ifx \:com\:next  \def\:temp##1{\cont:parse}%
   \else \expandafter\ifx \space\:next
       \expandafter       \def\expandafter\:temp\space{\tail:parse}%
   \else \ifx\:next\egroup \let\:temp|=\empty
         \else\def\:temp##1{\tail:parse}\fi
   \fi\fi \:temp}
\let\:com=,
>>>

\ifHtml[\HPage{example}\Verbatim
\input bibtex.4ht

/usr/local/teTeX/share/texmf/bibtex/bib/xampl.bib

\NewConfigure{@preamble}{1}
\Configure{@preamble}  {\let\thisbib=\ignore}
\NewConfigure{@STRING}{1}
\Configure{@STRING}  {\let\thisbib=\ignore}
\long\def\ignore#1{}

\newcommand{\noopsort}[1]{} 
\newcommand{\printfirst}[2]{#1} 
\newcommand{\singleletter}[1]{#1}
\newcommand{\switchargs}[2]{#2#1}
\def\temp#1{%
   \NewConfigure{#1}{2}
   \Configure{#1}%
      {\IgnorePar\HCode{<p class="bib-#1">
           <span class="bib-key">\bibkey</span>}}%
      {\HCode{</p>}}}

\temp{ARTICLE}
\temp{BOOKLET}
\temp{BOOK}
\temp{INBOOK}
\temp{INCOLLECTION}
\temp{INPROCEEDINGS}
\temp{MANUAL}
\temp{MASTERSTHESIS}
\temp{MISC}
\temp{PHDTHESIS}
\temp{PROCEEDINGS}
\temp{TECHREPORT}
\temp{UNPUBLISHED}

\def\temp#1{%
  \NewConfigure{#1}{2}
  \Configure{#1}%
     {\HCode{<br /><span class="bib-#1">}}%
     {\HCode{</span>}}}
\temp{address}
\temp{author}
\temp{booktitle}
\temp{chapter}
\temp{crossref}
\temp{edition}
\temp{editor}
\temp{howpublished}
\temp{institution}
\temp{journal}
\temp{key}
\temp{month}
\temp{note}
\temp{number}
\temp{organization}
\temp{pages}
\temp{publisher}
\temp{school}
\temp{series}
\temp{title}
\temp{type}
\temp{volume}
\temp{year}

\bibtex{/usr/local/teTeX/share/texmf/bibtex/bib/xampl.bib}

\end{document}
\EndVerbatim\EndHPage{}]\fi



%%%%%%%%%%%%%%%%%%%%%%%
\Section{bibtopic.sty}
%%%%%%%%%%%%%%%%%%%%%%%

\Link[http://www.tex.ac.uk/tex-archive/macros/latex/contrib/supported/bibtopic/]{}{}ctan bibtopic\EndLink

\<bibtopic.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% bibtopic.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<bibtopic cite|>
\Hinput{bibtopic}
\endinput
>>>        \AddFile{9}{bibtopic}

\<bibtopic cite\><<<
\catcode`\:=12
\def\bt@citex[#1]#2{%  Add \@extra@b@citeb to \cite
    \let\@citea\@empty
    |<a cite|>\@cite{%
        \@for\@citeb:=#2\do{%
            \@citea\let\@citea\citepunct |<sub sup cite|>%
      \edef\@citeb{\expandafter\@firstofone\@citeb}%
            \if@filesw\immediate\write\@auxout{%
                \string\citation{\@citeb}}\fi
            \@ifundefined{b@\@citeb \@extra@b@citeb}{%
                \mbox{\reset@font\bfseries ?}%
                \@warning{Citation `\@citeb' on page \thepage\space
                undefined}\G@refundefinedtrue
            }{\bt@citesurround{|<link cite|>\citeform{\csname b@\@citeb
                \@extra@b@citeb\endcsname}|<end link cite|>}%
            }%
        }%
    }{#1}|<b cite|>}
\catcode`\:=11
>>>

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Overcite}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\<overcite.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% overcite.4ht                          |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<over cite|>
\Hinput{overcite}
\endinput
>>>        \AddFile{9}{overcite}

\<over cite\><<<
\expandafter\pend:defI\csname citen \endcsname{%
   \csname a:cite\endcsname
   \begingroup \SUBOff \SUPOff 
      \csname pend:defI\endcsname\citeform{\cIteLink {X##1}{}}%
      \csname append:defI\endcsname\citeform{\EndcIteLink}%
    }
\expandafter\append:defI\csname citen \endcsname{\endgroup
      \csname b:cite\endcsname}
>>>


%%%%%%%%%%%%%%%%%%%
\Section{harvard.sty}
%%%%%%%%%%%%%%%%%%%


\<harvard.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% harvard.4ht                           |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<config harvard|>
\Hinput{harvard}
\endinput
>>>        \AddFile{9}{harvard}


\<config harvard\><<<
\long\def\harvardcite#1#2#3#4{%
  \global\@namedef{HAR@fn@#1}{\cIteLink{X#1}{}#2\EndcIteLink}%
  \global\@namedef{HAR@an@#1}{\cIteLink{X#1}{}#3\EndcIteLink}
  \global\@namedef{HAR@yr@#1}{\cIteLink{X#1}{}#4\EndcIteLink}
  \global\@namedef{HAR@df@#1}{\csname HAR@fn@#1\endcsname}
}
\expandafter\let\expandafter\:harvarditem
          \csname \string\harvarditem\endcsname
\expandafter\long\expandafter
   \def\csname \string\harvarditem\endcsname[#1]#2#3#4{%
    \let\hv:item=\item 
    \def\item[##1]{|<no page break before item|>\let\item=\hv:item
                   \item[##1]\Link{}{X#4}\EndLink}%
    \:harvarditem[#1]{#2}{#3}{#4}}
>>>

\<config harvard\><<<
\def\harvardurl#1{\Link[#1]{}{}\textit{#1}\EndLink}
\renewcommand{\harvardyearparenthesis}[1]{
  \renewcommand{\harvardyearleft}{\csname HAR@bl@#1\endcsname
                                  \a:harvardyear}
  \renewcommand{\harvardyearright}{\b:harvardyear
                                   \csname HAR@br@#1\endcsname}
}
\append:def\harvardyearleft{\a:harvardyear}
\pend:def\harvardyearright{\b:harvardyear}
\NewConfigure{harvardyear}{2}
>>>




%%%%%%%%%%%%%%%%%%%
\Section{jurabib.sty}
%%%%%%%%%%%%%%%%%%%

\Link[http://userpage.fu-berlin.de/\string
        ~jberger]{}{}Home of jurabib\EndLink

\<jurabib.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% jurabib.4ht                           |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

|<jurabib footnote|>
|<jurabib links|>
|<jurabib corrections|>
\HRestore\@citex  
\HRestore\@bibitem
\HRestore\@lbibitem

\Hinput{jurabib}
\endinput
>>>        \AddFile{9}{jurabib}


\<jurabib links\><<<
\def\hyper@jblinkstart#1{\a:jblink{#1}{}}
\def\hyper@jblinkend{\b:jblink}
\def\hyper@jbanchorstart#1{\a:jbanchor{}{#1}}
\def\hyper@jbanchorend{\b:jbanchor}
\NewConfigure{jblink}{2}   
\NewConfigure{jbanchor}{2} 
>>>



\<jurabib footnote\><<<
\ifx \@footnotetext\:UnDef\else
   \let\ju:footnotetext|=\@footnotetext
   \AtBeginDocument{%
      \ifjb@hyper
          \let\ju:footnotetext|=\:UnDef
      \else 
          \long\def\@footnotetext#1{{\jb@fntrue
             \setcounter{jb@cites@in@footnote}{0}%
             \ju:footnotetext{#1}}}%
      \fi
   }
\fi
>>>

\<jurabib corrections\><<<
\def\:temp{$\mathord\langle$}
\expandafter\HLet\csname jblangle \endcsname\:temp
\def\:temp{$\mathord\rangle$}
\expandafter\HLet\csname jbrangle \endcsname\:temp
>>>


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{natbib.sty}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\<natbib.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% natbib.4ht                            |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\HRestore\@lbibitem
\HRestore\@bibitem
\ifNAT@super
   |<natbib numbers|>
\else
  \def\hyper@natlinkstart#1{%
    \let\rel:hyper|=\def  \hyper@linkstart{cite}{X#1}%
    \def\hyper@nat@current{#1}%
  }
  \def\hyper@natlinkbreak#1#2{%
    \hyper@linkend#1\let\rel:hyper|=\def \hyper@linkstart{cite}{X#2}%
  }
  \def\hyper@natlinkend{\hyper@linkend}
  |<hyperref for natbib|>
\fi
\Hinput{natbib}
\endinput
>>>        \AddFile{7}{natbib}






\<hyperref for natbib\><<<
\expandafter\ifx \csname hyper@linkstart\endcsname\relax
   \def\hyper@linkstart#1#2{%
     \def\:temp{#1}%
     \ifx\:temp\@urltype
       \Link[#2]{}{}%
     \else
       \ifx\rel:hyper\def\Link{#2}{}\else\Link[\##2]{}{}\fi
     \fi  \global\let\rel:hyper=\:UnDef
   }
   \def\hyper@linkend{\EndLink}
\fi
\long\def\:temp#1{}\ifx \:temp\hyper@natanchorstart
   \def\hyper@natanchorstart#1{\Link{}{X#1}\EndLink}
\fi
>>>




\<natbib numbers\><<<
\def\setb:anc#1{\let\sv:anc\AnchorLabel
   \def\bib:anc{\Link{}{bibitem\the
      \c@NAT@ctr}\EndLink \gdef\bib:anc{}}%
   \def\AnchorLabel{\bib:anc}}
\def\nb:link#1{\Protect\Link{bibitem#1}{}#1\Protect\EndLink}
>>>


\<natbib numbers\><<<
\catcode`\:|=12
\def\NAT@citexnum[#1][#2]#3{%
 \NAT@sort@cites{#3}%
 \let\@citea\@empty
  \@cite{\def\NAT@num{-1}\let\NAT@last@yr\relax\let\NAT@nm\@empty
    \@for\@citeb:=\NAT@cite@list\do
    {\edef\@citeb{\expandafter\@firstofone\@citeb}%
     \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
     \@ifundefined{b@\@citeb\@extra@b@citeb}{%
       {\reset@font\bfseries?}
        \NAT@citeundefined\PackageWarning{natbib}%
       {Citation `\@citeb' on page \thepage \space undefined}}%
     {\let\NAT@last@num\NAT@num\let\NAT@last@nm\NAT@nm
      \NAT@parse{\@citeb}%
      \ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%
        \let\NAT@name=\NAT@all@names
        \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%
      \fi
      \ifNAT@full\let\NAT@nm\NAT@all@names\else
        \let\NAT@nm\NAT@name\fi
      \ifNAT@swa
       \ifnum\NAT@ctype=2\relax\@citea
        \hyper@natlinkstart{\@citeb\@extra@b@citeb}%
            \NAT@test{2}\hyper@natlinkend\else
       \ifnum\NAT@sort>1
         \begingroup\catcode`\_|=8
            \ifcat _\ifnum\z@<0\NAT@num _\else A\fi
              \global\let\NAT@nm=\NAT@num \else \gdef\NAT@nm{-2}\fi
            \ifcat _\ifnum\z@<0\NAT@last@num _\else A\fi
              \global\@tempcnta|=\NAT@last@num
              \global\advance\@tempcnta |by\@ne
            \else \global\@tempcnta\m@ne\fi
         \endgroup
         \ifnum\NAT@nm=\@tempcnta
           \ifx\NAT@last@yr\relax
             \edef\NAT@last@yr{\@citea
                \mbox{\csname nb:link\endcsname\NAT@num}}%
           \else
             \edef\NAT@last@yr{--\penalty
                \@m\mbox{\csname nb:link\endcsname\NAT@num}}%
           \fi
         \else
           \NAT@last@yr \@citea \mbox{\csname nb:link\endcsname\NAT@num}%
           \let\NAT@last@yr\relax
         \fi
       \else
         \@citea \mbox{\hyper@natlinkstart{\@citeb\@extra@b@citeb}\NAT@num
                    \hyper@natlinkend}%
       \fi
       \fi
       \def\@citea{\NAT@sep\penalty\@m\NAT@space}%
      \else
        \ifcase\NAT@ctype\relax
          \ifx\NAT@last@nm\NAT@nm \NAT@yrsep\penalty\@m\NAT@space\else
          \@citea \NAT@test{1}\ \NAT@@open
          \if\relax#1\relax\else#1\ \fi\fi \NAT@mbox{%
          \hyper@natlinkstart{\@citeb\@extra@b@citeb}%
          \NAT@num\hyper@natlinkend}%
          \def\@citea{\NAT@@close\NAT@sep\penalty\@m\ }%
        \or\@citea
          \hyper@natlinkstart{\@citeb\@extra@b@citeb}%
           \NAT@test{1}\hyper@natlinkend
          \def\@citea{\NAT@sep\penalty\@m\ }%
        \or\@citea
          \hyper@natlinkstart{\@citeb\@extra@b@citeb}\NAT@test{2}%
           \hyper@natlinkend
          \def\@citea{\NAT@sep\penalty\@m\ }%
        \fi
      \fi
      }}%
      \ifnum\NAT@sort>1\NAT@last@yr\fi
      \ifNAT@swa\else\ifnum\NAT@ctype=0\if\relax#2\relax\else
      \NAT@cmt\ #2\fi \NAT@@close\fi\fi}{#1}{#2}}
 \let\@citex|=\NAT@citexnum
\catcode`\:|=11
>>>







%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Languages}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%




%%%%%%%%%%%%%%%%%%%
\Section{babel.sty}
%%%%%%%%%%%%%%%%%%%%


\Link[http://babel.alis.com:8080/]{}{}Create your own multilingual Web\EndLink


\<babel.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% babel.4ht                             |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>

|<babel.def|>
\Hinput{babel}
\endinput
>>>        \AddFile{5}{babel}




\<babel.def\><<<
|<bbl@redefine|>
|<bbl@redefinerobust|>
|<robust babel|>
\def\:temp#1{{\leavevmode #1}}
\HLet\save@sf@q|=\:temp
|<set@low@box|>
>>>



\<set@low@box\><<<
\def\:tempc#1#2#3{\HCode{<sub>}{\let\/=\empty#1}\HCode{</sub>}}
\HLet\set@low@box|=\:tempc
\HLet\quotedblbase|=\empty
\HLet\quotesinglbase|=\empty
\NewConfigure{quotedblbase}[1]{\def\n:quotedblbase:{#1}}
\NewConfigure{quotesinglbase}[1]{\def\n:quotesinglbase:{#1}}
\Configure{quotedblbase}{\o:quotedblbase:}
\Configure{quotesinglbase}{\o:quotesinglbase:}
>>>

% \expandafter\def\csname glqq \endcsname{\HCode{&\#132;}}
% \expandafter\def\csname glq \endcsname{\HCode{&\#130;}}


\<robust babel\><<<
\def\@newl@bel#1#2{{\:SUBOff\:SUPOff \@safe@activestrue 
   \xdef\:temp{\noexpand\n:wlbl{#1}{#2}}}\:temp }
\pend:defI\l:bel{\@safe@activestrue}
\append:defI\l:bel{\@safe@activesfalse}
>>>


\<bbl@redefine\><<<
\def\:tempc#1{%
  \edef\bbl@tempa{\expandafter\@gobble\string#1}%
  \expandafter\let\csname org@\bbl@tempa\endcsname#1
  \expandafter\def\csname\bbl@tempa\endcsname}
\let\@c:tex|=\@citex
\:tempc\@c:tex[#1]#2{%
  \@safe@activestrue\org@@c:tex[#1]{#2}\@safe@activesfalse}
\let\@citex|=\@c:tex
>>>

\<robust babel\><<<
\let\@b:bitem=\@bibitem
\def\@bibitem#1{\@safe@activestrue
  \edef\:temp{\noexpand\@b:bitem{#1}}\@safe@activesfalse\:temp}
>>>


\<bbl@redefinerobust\><<<
\def\:tempc#1{%
  \edef\bbl@tempa{\expandafter\@gobble\string#1}%
  \expandafter\ifx\csname \bbl@tempa\space\endcsname\relax
    \expandafter\let\csname org@\bbl@tempa\endcsname#1
    \expandafter\edef\csname\bbl@tempa\endcsname{\noexpand\protect
      \expandafter\noexpand\csname\bbl@tempa\space\endcsname}%
  \else
    \expandafter\let\csname org@\bbl@tempa\expandafter\endcsname
                    \csname\bbl@tempa\space\endcsname
  \fi
  \expandafter\def\csname\bbl@tempa\space\endcsname}
\:tempc\:ref#1{\@safe@activestrue\org@:ref{#1}\@safe@activesfalse}
\let\ref|=\:ref
>>>


\<babel.def\><<<
\def\active:prefix#1{\protect#1}
\def\:temp#1{%
  \ifx\protect\@typeset@protect
  \else
    \bbl@afterfi\active:prefix#1\@gobble
  \fi}
\HLet\active@prefix|=\:temp
>>>

\<babel.def\><<<
\def\:tempc#1{\leavevmode \a:ddj}
\HLet\ddj@=\:tempc
\def\:tempc#1{\leavevmode \a:DDJ}
\HLet\DDJ@=\:tempc
\NewConfigure{ddj}{1}
\NewConfigure{DDJ}{1}
\Configure{DDJ}{\leavevmode\ht:special{t4ht@+{38}{35}x0110;}x}
\Configure{ddj}{\leavevmode\ht:special{t4ht@+{38}{35}x0111;}x}
>>>

%%%%%%%%%%%%%%%%%%%%%%
\Section{CJK}
%%%%%%%%%%%


\<CJK.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% CJK.4ht                               |version %
% Copyright (C) 2000             Eitan M. Gurari         %
|<TeX4ht copyright|>
|<CJK config|>
\Hinput{CJK}
\endinput
>>>        \AddFile{7}{CJK}

\<CJK config\><<<
\pend:defI\CJK@input{%
   \edef\CJK:ccode{\catcode`\noexpand\^|=\the\catcode`\^%
      \catcode`\noexpand\_|=\the\catcode`\_}\catcode`\^|=7 \catcode`\_|=8}
\append:defI\CJK@input{\CJK:ccode}
>>>


\<CJK config\><<<
\long\def\CJKboldshift{0em{}\:gobble}
\expandafter
  \pend:defI\csname CJKsymbol \endcsname{\ifCJK@bold@ \a:CJKbold\fi}
\expandafter
  \append:defI\csname CJKsymbol \endcsname{\ifCJK@bold@ \b:CJKbold\fi}
\expandafter
  \pend:defII\csname CJKsymbols \endcsname{\ifCJK@bold@ \a:CJKbold\fi}
\expandafter
  \append:defII\csname CJKsymbols \endcsname{\ifCJK@bold@ \b:CJKbold\fi}
\NewConfigure{CJKbold}{2}
>>>


\<CJK config\><<<
\let\o:CJK@envStart:=\CJK@envStart
\pend:defIII\CJK@envStart{%
   \global\let\CJK@envStart=\o:CJK@envStart:
   \global\let\o:CJK@envStart:=\:UnDef
   \Tag{CJK.enc}{##2}}
\NewConfigure{CJK.enc}[2]{%
   \edef\:temp{\LikeRef{CJK.enc}}%
   \def\:tempa{#1}\ifx \:temp\:tempa  #2\fi
}
>>>

%%%%%%%%%%%%%%%%
\Section{arabtex}
%%%%%%%%%%%%%%%

\<alatex.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% alatex.4ht                            |version %
% Copyright (C) 2001             Eitan M. Gurari         %
|<TeX4ht copyright|>
|<alatex body|>
\Hinput{alatex}
\endinput
>>>        \AddFile{8}{alatex}


\<alatex body\><<<
\ifx \undefined \LaTeX \xpa \endinput \fi
\endinput
>>>

\<\><<<
\def \@footnotetext {% 
   \let\FNmark\@thefnmark
   \leavevmode\vbox
   \bgroup 
      \leftskip0pt
      {\ht:everypar{}\parindent0pt\leavevmode}%
      \ifx \footglue \undefined    \else 
         \setbox0=\hbox \bgroup    \footnotesize
      \fi
      \gdef\@makefnmark{\let\FNmark\@thefnmark
            \leavevmode\hbox{\gHAdvance\FNnum  1
               \a:footnote}}%
      \ifnum \FNnum>\fn:txt
         \gHAssign\fn:txt\FNnum
         \b:footnote  \let\@foot:c\c:footnote
      \else
         \a:footnotetext \b:footnotetext \let\@foot:c\c:footnotetext
      \fi
      \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}%
      \anc:lbl f{footnote}%
      \let\a:footnote\empty
      \a@fntext }
\def\@foot{\unskip \strut \@foot:c
   \ht:special{t4ht@[}\egroup \ht:special{t4ht@]}}
>>>

%%%%%%%%%%%%%%%%
\Section{Right-to-Left Babel}
%%%%%%%%%%%%%%%%





\<rlbabel.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% rlbabel.4ht                           |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<rlbabel def|>
\Hinput{rlbabel}
\endinput
>>>        \AddFile{8}{rlbabel}






\<rlbabel def\><<<
\let\ht:everypar|=\o@everypar
\def\L{\protect\pL}
\def\R{\protect\pR}
\Configure{@:currentlabel}
  {\let\special\:gobble
   \let\protect\empty
   \let\o:beginL:=\empty
   \let\o:endL:=\empty
   \Configure{Lregion}{}{}%
  }
>>>

tex4ht.sty indert  Rregion  and Lregion end hooks within
\Verb+\beginL/R+ and \Verb+\endL/R+, mainly to void the 
inverse produced by the elatex compiler. The latter commands are
native to elatex. We need to be carefull how we configure them, since
they are not always nested nicely within groups.

   
\<rlbabel def\><<<
\def\:tempc{\a:moreR\bracetext \aftergroup\endR 
  \aftergroup\b:moreR \beginR\csname
  to\@rllanguagename\endcsname}
\HLet\moreR|=\:tempc
\NewConfigure{moreR}{2}
>>>

\<rlbabel def\><<<
\def\:tempc{\a:moreL\bracetext \aftergroup\endL 
  \aftergroup\b:moreL \beginL\csname
  from\@rllanguagename\endcsname}
\HLet\moreL|=\:tempc
\NewConfigure{moreL}{2}
>>>


\<rlbabel def\><<<
\NewConfigure{$$}[3]{%
   \def\a:display{\bgroup#1}%
   \def\b:display{#2\egroup \if@rl\else \beginL\fi}%
   \def\c:display{#3}%
   \everydisplay{\ifx \EndPicture\:UnDef
        $$\a:display\everymath{}\everydisplay{}$$
              \aftergroup\b:display \c:display\fi}}
\let\rl:b:display\b:display
\let\rl:c:display\c:display
\let\rl:a:display\a:display
\Configure{$$}{\rl:a:display}{\rl:b:display}{\rl:c:display}
>>>


%%%%%%%%%%%%%%%%%%
\Section{hebtex}
%%%%%%%%%%%%%%%%%%

\Link[http://www.dsg.technion.ac.il/heblatex/]{}{}heblatex\EndLink

Note: we should distinguish between
 hebrew.ldf and   hebrew.sty

\<hebtex.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% hebtex.4ht                            |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<hebtex body|>
\Hinput{hebtex}
\endinput
>>>        \AddFile{8}{hebtex}





\<hebtex body\><<<
\let\:tempc|=\arabtext
\pend:def\:tempc{\a:arabtext}
\HLet\arabtext|=\:tempc
\let\:tempc|=\endarabtext
\pend:def\:tempc{\Configure{HtmlPar}{}{}{}{}}
\append:def\:tempc{\b:arabtext}
\HLet\endarabtext|=\:tempc
\HLet\RLtext  \arabtext     \HLet\endRLtext  \endarabtext
\HLet\hebtext \arabtext     \HLet\endhebtext \endarabtext
\HLet\hebtex  \arabtext     \HLet\endhebtex  \endarabtext 
>>>


\<hebtex body\><<<
\let\:tempc|=\a@arab@codes
\pend:def\:tempc{%
    \chardef\up:de = \catcode`\^   \catcode`\^=7
    \chardef\dn:de = \catcode`\_   \catcode`\_=8 }
\append:def\:tempc {%
   \catcode`\^=\up:de  \catcode`\_=\dn:de}
\HLet\a@unarab@codes|=\:tempc
>>>

\<hebtex body\><<<
\let\put@ab@x|=\:tempc
\pend:def\:tempc{%
   \let\sv:noindent=\noindent
   \def\rc:noindent{\let\noindent=\sv:noindent}%
   \def\noindent{\rc:noindent  \noindent   \c:arabtext
      \let\sv:endgraf=\endgraf 
      \def\endgraf{\d:arabtext\sv:endgraf \aftergroup\rc:noindent }}%
}
\append:def\:tempc{\let\noindent|=\sv:noindent}
\HLet\put@ab@x|=\:tempc
\def\:tempc {\:nbsp}
\HLet\arab@space|=\:tempc
\NewConfigure{arabtext}{4}
>>>


\<hebtex body\><<<
\def\:tempc{\a:chireq} \HLet \put@chireq=\:tempc 
\NewConfigure{chireq}{1}
\def\:tempc{\a:cholem} \HLet \put@cholem=\:tempc 
\NewConfigure{cholem}{1}
\def\:tempc{\a:cholem} \HLet\h@cholem=\:tempc 
\NewConfigure{cholem}{1}
\def\:tempc{\a:chpatach} \HLet \put@chpatach=\:tempc 
\NewConfigure{chpatach}{1}
\def\:tempc{\a:chqames} \HLet \put@chqames=\:tempc 
\NewConfigure{chqames}{1}
\def\:tempc{\a:chsegol} \HLet \put@chsegol=\:tempc 
\NewConfigure{chsegol}{1}
\def\:tempc{\a:dagesh} \HLet\put@dagesh=\:tempc 
\NewConfigure{dagesh}{1}
\def\:tempc{\a:meteg} \HLet\h@meteg=\:tempc 
\NewConfigure{meteg}{1}
\def\:tempc{\a:patachf} \HLet \put@patachf=\:tempc 
\NewConfigure{patachf}{1}
\def\:tempc{\a:patach} \HLet \put@patach=\:tempc 
\NewConfigure{patach}{1}
\def\:tempc{\a:qameschat} \HLet\put@qameschat=\:tempc 
\NewConfigure{qameschat}{1}
\def\:tempc{\a:qames} \HLet \put@qames=\:tempc 
\NewConfigure{qames}{1}
\def\:tempc{\a:qibbus} \HLet\put@qibbus=\:tempc 
\NewConfigure{qibbus}{1}
\def\:tempc{\a:rdot} \HLet\h@rdot=\:tempc 
\NewConfigure{rdot}{1}
\def\:tempc{\a:segol} \HLet\put@segol=\:tempc 
\NewConfigure{segol}{1}
\def\:tempc{\a:sere} \HLet \put@sere=\:tempc 
\NewConfigure{sere}{1}
\def\:tempc{\a:shindot} \HLet\h@shindot=\:tempc 
\NewConfigure{shindot}{1}
\def\:tempc{\a:shwa} \HLet \put@shwa=\:tempc 
\NewConfigure{shwa}{1}
\def\:tempc{\a:sindot} \HLet\h@sindot=\:tempc 
\NewConfigure{sindot}{1}
>>>



\<abidir.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% abidir.4ht                            |version %
% Copyright (C) 2001             Eitan M. Gurari         %
|<TeX4ht copyright|>
|<arabtex bidir|>
\Hinput{abidir}
\endinput
>>>        \AddFile{8}{abidir}


\<arabtex bidir\><<<
\def\a@Rinsert#1{%
  \leavevmode \a:RL\vbox{\everypar{}\a@sequence {#1}}\b:RL }
\NewConfigure{RL}{6}
>>>

% 
% \pend:def\a@Ldimen{\expandafter\def
%    \expandafter\ev:disp\expandafter{\expandafter\everydisplay
%    \expandafter{\the\everydisplay}}\everydisplay{\IgnorePar}}
% \append:def\a@Ldimen{\ev:disp}
% 
% 
% \let\:tempc|=\a@RL
% \pend:def\:tempc{\a:RL\bgroup 
%    \append:defI\a@@Rinsert{\egroup\b:RL}}
% \HLet\a@RL|=\:tempc





\<hewrite.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% hewrite.4ht                           |version %
% Copyright (C) 2001             Eitan M. Gurari         %
|<TeX4ht copyright|>
|<reverse hebrew words|>
\Hinput{aparse}
\endinput
>>>        \AddFile{8}{hewrite}


\<reverse hebrew words\><<<
\def\:temp #1#2+#3*#4<{% 
   \def \next {\heb@mid #4}%
   \ifnum \act@cd = \m@qqeph
      \def \next {\heb@end #4}\put@b@x {\the\act@cd }%
      \ifhcl@s \else \put@box {\raise .6ex \hbox
         {\kern.05em\unhbox \ab@x \kern.05em}}%              
      \fi 
   \else \ifnum \act@cd = \illch@r
      \put@b@x {\the\act@cd }%
   \else
      \ifnum \act@cd = \hc@@ 
         \heb@cd \hc@y \advance \heb@cd \heb@dsp
         \put@box {\hphantom{\char \the\heb@cd }}%
      \else   \heb@cd \act@cd \advance \heb@cd \heb@dsp
         \put@b@x {\the\heb@cd }%
      \fi
      \ifhv@wel \heb@accent #2+#3*%
         \ifcase \act@mod \or \h@sindot \or \h@shindot \fi
         \if@dagesh \put@dagesh \fi
      \fi      
   \fi\fi
   \:heblet \unhbox \ab@x \end:heblet
   \h@test@chr #4}
\HLet\h@put@mid=\:temp
>>>

\<reverse hebrew words\><<<
\def\:temp #1>{% 
 \iftest@write \iftest@parse \else \a@verb (#1 )>\fi
   \tracingmacros = 1 \fi
   \a@write@hook
   \ifa@@write {\heb@beg #1>0+0*>\end:hebword}\fi
   \iftest@write \tracingmacros = 0
 \fi }
\HLet\heb@write=\:temp
>>>

\<reverse hebrew words\><<<
\def\:heblet{\a:hewrite}
\def\end:heblet{\b:hewrite}
\let\end:hebword=\empty
\:CheckOption{rl2lr}\if:Option
   \csname newbox\endcsname\heb:box
   \setbox\heb:box=\hbox{}
   \pend:def\:heblet{\setbox\heb:box=\hbox\bgroup}
   \append:def\end:heblet{\unhbox\heb:box\egroup}
   \def\end:hebword{\unhbox\heb:box}
\else
   \Log:Note{to reverse the direction of 
       Hebrew words, use the command line option `rl2lr'}
\fi
\NewConfigure{hewrite}{2} 
>>>




\<aoutput.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% aoutput.4ht                           |version %
% Copyright (C) 2001             Eitan M. Gurari         %
|<TeX4ht copyright|>
|<aoutput sentences|>
\Hinput{aoutput}
\endinput
>>>        \AddFile{8}{aoutput}

\<aoutput sentences\><<<
\let\:tempc|=\put@ab@x
\pend:def\:tempc {%
   \setbox\a@tempb@x=\hbox{\c:RL \box\a@tempb@x \d:RL}}
\HLet\put@ab@x|=\:tempc
>>>

\<aoutput sentences\><<<
\:CheckOption{RL2LR}\if:Option
  |<reverse sentences|>
\else
  \Log:Note{to reverse direction of RL sentences, 
          use the command line option `RL2LR'}
  |<non reverse sentences|>
\fi
>>>

\<non reverse sentences\><<<
\let\:tempc|=\put@word
\pend:def\:tempc{\setbox\wordb@x \hbox {\e:RL \unhcopy \wordb@x \f:RL }}
\HLet\put@word|=\:tempc
>>>


\<reverse sentences\><<<
\def\:tempc{%
   \ifa@space \putlineb@x
       {\unhcopy \lineb@x \arab@space \e:RL \unhcopy \wordb@x \f:RL}%
   \else \add@word   \fi }
\HLet\addt@line|=\:tempc
\def\:tempc{% 
   \putlineb@x {\unhbox \lineb@x \e:RL \unhbox \wordb@x  \f:RL}}
\HLet\add@word|=\:tempc
>>>





% \def\put:word {%
%    \setbox\wordb@x \hbox {\e:RL \unhcopy \wordb@x \f:RL }%
%    \setbox \a@tempb@x \hbox
%    {\unhcopy \lineb@x \ifa@space \arab@space \fi \unhcopy \wordb@x}%
%    \ifdim \a@limit < \wd\lineb@x \put@line \add@word \else 
%    \ifdim \a@limit < \wd\a@tempb@x \put@line \add@word \else 
%       \setbox \lineb@x \box \a@tempb@x
%    \fi\fi 
% }
%    \let\:tempc|=\a@@Rinsert
%    \pend:defI\:tempc{\HLet\put@word|=\put:word }
%    \HLet\a@@Rinsert|=\:tempc



 
%%%%%%%%%%%%%%%%%%
\Section{koi8-r}
%%%%%%%%%%%%%%%%%%


\<koi8-r.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% koi8-r.4ht                            |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\Hinput{koi8-r}
\endinput
>>>        \AddFile{8}{koi8-r}



 
%%%%%%%%%%%%%%%%%%
\Section{latin2}
%%%%%%%%%%%%%%%%%%


\<latin2.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% latin2.4ht                            |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\Hinput{latin2}
\endinput
>>>        \AddFile{6}{latin2}




%%%%%%%%%%%%%%%%%%%%%%%
\Section{frenchb.ldf}
%%%%%%%%%%%%%%%%%%%%%%%



\<frenchb.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% frenchb.4ht                           |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<declare frenchb shorthand|>
|<frenchb nbsp|>
\Hinput{frenchb}
\endinput
>>>        \AddFile{8}{frenchb}




\<declare frenchb shorthand\><<<
\def\frenchb:shorthand#1#2#3#4{%
  \ifhmode
     \ifdim \lastskip >\z@ \unskip \penalty \@M
        \csname a:#1-#2\endcsname#3\csname b:#1-#2\endcsname
     \else
        \csname a:#1-#2\endcsname#4\csname b:#1-#2\endcsname
  \fi \fi }
>>>




\<frenchb nbsp\><<<
\def\:temp{\leavevmode \nobreak \csname a:system-nbsp\endcsname\ \csname 
                  b:system-nbsp\endcsname}
\expandafter\HLet\csname \system@group @sh@\string ~@\endcsname=\:temp
\expandafter \ifx \csname FDP@colonspace\endcsname\relax
  |<pre 2001/09/09 v1.5g frenchb|>
\else
  |<since 2001/09/09 v1.5g frenchb|>
\fi
\AtBeginDocument{%
 \def\:temp{\frenchb:shorthand{frenchb}{thinspace}
                              {\thinspace }{\FDP@thinspace}\string ;}%
 \expandafter\HLet\csname\language@group @sh@\string ;@\endcsname=\:temp
 \def\:temp{\frenchb:shorthand{frenchb}{thinspace}
                              {\thinspace }{\FDP@thinspace}\string !}%
 \expandafter\HLet\csname\language@group @sh@\string !@\endcsname=\:temp
 \def\:temp{\frenchb:shorthand{frenchb}{thinspace}
                              {\thinspace }{\FDP@thinspace}\string ?}%
 \expandafter\HLet\csname\language@group @sh@\string ?@\endcsname=\:temp
}
\NewConfigure{frenchb-nbsp}{2}
\NewConfigure{frenchb-thinspace}{2}
\NewConfigure{system-nbsp}{2}
>>>

\<pre 2001/09/09 v1.5g frenchb\><<<
\AtBeginDocument{%
 \def\:temp{\frenchb:shorthand{frenchb}{nbsp}{\ }{\FDP@space}\string :}%
 \expandafter\HLet\csname\language@group @sh@\string :@\endcsname=\:temp
}
>>>


\<since 2001/09/09 v1.5g frenchb\><<<
\AtBeginDocument{%
 \def\:temp{\frenchb:shorthand{frenchb}{nbsp}{\ }{\FDP@colonspace}\string :}%
 \expandafter\HLet\csname\language@group @sh@\string :@\endcsname=\:temp
}
>>>



\Verbatim
\declare@shorthand{frenchb}{:}{%
    \ifhmode
      \ifdim\lastskip>\z@
        \unskip\penalty\@M\
      \else
        \FDP@space
      \fi
    \fi
    \string:}
\EndVerbatim


\Verbatim
\declare@shorthand{french}{:}{%
    \ifhmode
      \ifdim\lastskip>\z@
        \unskip\penalty\@M\Fcolonspace
      \else
        \FDP@colonspace
      \fi
    \fi
    \string:}
\EndVerbatim


The following is for code such as 

\Verbatim
 \documentclass{article}
  \usepackage[francais]{babel}
 \begin{document}

 \tableofcontents
 
 \section{Ma premi{\`e}re section !}
 
 \section{Culture : d{\'e}sillusions}

 \section{Culture :d{\'e}sillusions} 
 \end{document}
\EndVerbatim


\<frenchb nbsp\><<<
\catcode`\:=13
\expandafter\let\csname protect\string:\endcsname=:
\expandafter\def\csname active\string
    :prefix\endcsname#1{\protect#1\ifx#1:{}\fi}
\catcode`\:=11
>>>


\`=With the package « \usepackage[francais]{babel} », every `;' `:' ...
 must be preceded by an unbreakable space.  This works okay for the
 input `a:' and `a :', but for `a~:' TeX4ht introduces _2_ unbreakable
 spaces instead of one.=


\Section{german.sty}


\Link[/n/ship/0/packages/tetex/teTeX/texmf/tex/generic/misc/german.sty]{}{}german.sty\EndLink

\<german.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% german.4ht                            |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<set@low@box|>
\Hinput{german}
\endinput
>>>        \AddFile{7}{german}



\<german accents\><<<
\ifx \@begindocumenthook\:UnDef\else
   \:CheckOption{new-accents}        \if:Option  \else
      \def\:tempc{\csname grmn:OTumlaut\endcsname}
      \HLet\grmn@OTumlaut\:tempc
\fi \fi
>>>

% \expandafter
%   \def\csname glqq \endcsname{\HCode{&}\HChar{35}\HCode{8222;}}
% \expandafter
%    \def\csname glq \endcsname{\HCode{&}\HChar{35}\HCode{8218;}}


\Verbatim

> A minor problem showed up with hyphenation hints. In the german
> language, compound words of different languages are built with
> a hyphen between them, e.g. "Select-Klausel" or "depends-Abhängigkeit", 
> to make the change of language clear (there are other reasons for
> explicit hyphens, too). Since TeX does not hyphenate such compounds,
> and they can get very long in german, we use a macro "" (with active
> doublequote), defined as \hskip\z@skip, so TeX will hyphenate again:
> Select-""Klausel, depends-""Abh"angigkeit ("a is short for \"{a} = ä).
> tex4ht translates this to a space, which makes sense since browsers
> will not break the compounds without that space either. However, I'd
> prefer to not have such spaces. Could this be configurable?

\EndVerbatim




%%%%%%%%%%%%%%%%%%%
\Section{manju}
%%%%%%%%%%%%%%%%%%%

See also
CTAN:language/mongolian/montex/examples

\<manju.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% manju.4ht                           |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<manju hooks|>
\Hinput{manju}
\endinput
>>>        \AddFile{9}{manju}



\<manju hooks\><<<
\renewcommand{\mabosoo}[1]{\def\:temp{#1}\ifx \:temp\empty\else
     \bosoo{{\bth #1}}\fi}
>>>




%%%%%%%%%%%%%%%%%%%%
\Section{italian}
%%%%%%%%%%%%%%%%%%%%


\<italian.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% italian.4ht                           |version %
% Copyright (C) |CopyYear.2002.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<italian 4ht|>
\Hinput{italian}
\endinput
>>>       \AddFile{7}{italian}



\<italian 4ht\><<<
\expandafter\def\csname bbl@ap \endcsname#1{%
  \textormath{\textsuperscript{#1}}{{\HCode{}}\sp{\mathrm{#1}}}}%
\expandafter\def\csname bbl@ped \endcsname#1{%
   \textormath{${\HCode{}}\sb{\mbox{\fontsize\sf@size\z@
        \selectfont#1}}$}{{\HCode{}}\sb{\mathrm{#1}}}}
>>>

%%%%%%%%%%%%%%%%%
\Section{french}
%%%%%%%%%%%%%%%%



\<french.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% french.4ht                            |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<french 4ht|>
\Configure{special}{\csname @s@ORI\endcsname}
\Hinput{french}
\endinput
>>>       \AddFile{7}{french}



\<french 4ht\><<<
\let\:GOfrench|=\GOfrench
\def\GOfrench{\:GOfrench \let\:GOfrench|=\:UnDef%
  \def\@makefnmark{%
     \ifFTY\hbox{\normalfont \ifx\thefootnote\relax\else\,\fi}\fi
     \let\FNmark\@thefnmark
     \leavevmode\hbox{%
        \gHAdvance\FNnum  1 \a:footnote}}%
}
>>>

\<french 4ht\><<<
\def\:temp#1#2{\seename \/ {#1}}
\ifx\see\:temp
   \pend:def\printindex{%
      \Configure{toToc}{likechapter}{chapter}%         
      \Configure{toToc}{likesection}{section}%
      \let\sv:addcontentsline=\addcontentsline
      \def\addcontentsline{\let\addcontentsline=\sv:addcontentsline
         \:gobbleIII}}
   \append:def\printindex{%
      \Configure{toToc}{likechapter}{}%         
      \Configure{toToc}{likesection}{}}
\fi
>>>


%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Cross References}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%
\Section{xr.sty: Cross-Document References}
%%%%%%%%%%%%%%%%%%%%%



Defines a command \`'\externaldocument' for importing exterla aux
files from foreugn sources. Should be called after \''\Preamble', and
before \''\begin{document}'.



\<xr.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% xr.4ht                                |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>
   |<fix xr|>
\Hinput{xr}
\endinput
>>>        \AddFile{7}{xr}



\<use package\><<<
xr,>>>

\<add to usepackage\><<<
\def\:temp{xr}\ifx \@currname\:temp
   |<wait with xr|>
\fi
>>>



\<wait with xr\><<<
\AtEndOfPackage{\let\XR:\XR@ 
   \def\XR@[#1]#2{%
    \Configure{AtBeginDocument}{\XR:[#1]{#2}}{}}%
}
>>>



\<fix xr\><<<
\let\XR:loop=\XR@loop
\def\XR@loop#1{%
   \def\:temp##1.aux{|<load xref of aux|>}%
   \catcode`\:=11 
     |<xref for xr|>%
     \:temp#1%
   \catcode`\:=12
   \XR:loop{#1}%
}
>>>


\<load xref of aux\><<<
\openin15=##1.xref 
\ifeof15
   \:warning{missing ##1.xref for ##1.aux}%
   \let\:temp\empty    
\else
   \def\:temp{\input ##1.xref}%
\fi
\closein15  \:temp
>>>

\<xref for xr\><<<
\expandafter\ifx \csname xr:CrossWord\endcsname\relax
  \let\xr:CrossWord=\Cross:Word
  \def\Cross:Word##1##2{%
     \expandafter\let\csname  cw:\cw:format{##1##2}\endcsname\:UnDef
     \xr:CrossWord{##1}{##2}}%
\fi
>>>




\<fix xr\><<<
\def\XRrEfLiNK[#1]#2#3{\a:xr[#1]{#2}{}%
   \ifx\hyperrefLabel\:UnDef #3\else \hyperrefLabel\fi \b:xr}
\NewConfigure{xr}{2}
\Configure{xr}{\Link}{\EndLink}
\def\XR:rEfLiNK#1#2{{\xr:rEfLiNK#1}{\xr:rEfLiNK#2}}
\def\xr:rEfLiNK#1#2{\noexpand\XRrEfLiNK[\Get:HFile#2-]{#2}}
\def\Get:HFile#1-#2-{\:LikeRef{)F\:gobble #1F-}}
>>>

For xref file

\Verbatim
\:CrossWord{)F1F-}{essai.html}{1}%
\:CrossWord{)Qx1-10000.1}{1}{1}%
\EndVerbatim

\''\XGet:HFile' acts on \''x1-10000.1' to retrieve the 1 between \`'x' and
\`'-'. The if acts on \`')F1F-' to get the file name. Where the \`'x' got into the picture? Did \''\aXrefFile' introduced it? where?




\<xr newlabel\><<<
\expandafter\xdef\csname r@\XR@prefix#2\endcsname{\XR:rEfLiNK #3}%
>>>

\<fix xr\><<<
\long\def\XR@test#1#2#3#4\XR@{%
  \ifx#1\newlabel
     |<xr newlabel|>%
  \else\ifx#1\@input
     \edef\XR@list{\XR@list#2\relax}%
  \fi\fi
  \ifeof\@inputcheck\expandafter\XR@aux
  \else\expandafter\XR@read\fi}
>>>



%%%%%%%%%%%%%%%%%%%%%
\Section{xr-hyper.sty: Hyperref-Oriented Cross-Document References}
%%%%%%%%%%%%%%%%%%%%%


\<xr-hyper.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% xr-hyper.4ht                          |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
   |<fix xr|>
\Hinput{xr}
\endinput
>>>        \AddFile{7}{xr-hyper}

\<use package\><<<
xr-hyper,>>>


\<add to usepackage\><<<
\def\:temp{xr-hyper}\ifx \@currname\:temp
   |<wait with xr|>
\fi
>>>



%%%%%%%%%%%%%%%%%%
\Section{url.sty}
%%%%%%%%%%%%%%%%%%




\<url.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% url.4ht                               |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\expandafter\ifx\csname Url@OT1encSpecials\endcsname\relax
   |<url.sty|>  
\else
   |<url-2004.sty|>  
\fi
|<shared url|>
\Hinput{url}
\endinput
>>>        \AddFile{7}{url}

\<url.sty\><<<
   |<fix url|>
>>>


\<fix url\><<<
\def\:temp{\begingroup
  \def\UrlLeft##1\UrlRight{\ifmmode \else \UrlFont\fi \Url:use{##1}}%
  \def\Url@use##1 ##2{\ifmmode \else \UrlFont\fi
                      \Url:use{##1}}\let\,\empty \Configure{$}{}{}{}\Url}
\HLet\url\:temp
>>>

Old url.sty filesemploy \''\Url@use', new ones employ \''Url@Left'.


\<url-2004.sty\><<<
\pend:defI\Url@z{%
   \ht:special{t4ht@[}%
   \Configure{$}{}{}{}%
   \let\,\empty
   \def\Url@HyperHook####1{\ifmmode \else \UrlFont\fi
       \ht:special{t4ht@]}%
       \expandafter\Url:use  \expandafter{\Url@String}}%
}
>>>


\<shared url\><<<
\def\c:url:{\def\Url:use##1}
\Configure{url}{#1}
>>>

\<url-2004.sty\><<<
\def\:temp{\begingroup \urlstyle {tt}\Url}
\ifx \:temp\path
   \def\:tempc{\a:path\begingroup\aftergroup\b:path
      \Configure{url}{\ifmmode \else \UrlFont\fi ##1}\urlstyle {tt}\Url}
   \HLet\path\:tempc
\fi
>>>

\<shared url\><<<
\NewConfigure{path}{2}
>>>



%%%%%%%%%%%%%%%%%%
\Section{path.sty}
%%%%%%%%%%%%%%%%%%




\<path.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% path.4ht                              |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<path config|>
\Hinput{path}
\endinput
>>>        \AddFile{9}{path}


\<path config\><<<
\pend:def\path{\a:path 
   \let\sv:begingroup\begingroup 
   \def\begingroup{% 
      \let\begingroup\sv:begingroup 
      \begingroup \aftergroup\b:path}% 
} 
\NewConfigure{path}{2}
>>>


%%%%%%%%%%%%%%%%%%%%%
\Section{hyperref}
%%%%%%%%%%%%%%%%%%%%%

\Link[http://ftp.gwdg.de/pub/dante/macros/latex/contrib/supported/hyperref/]{}{}%
hyperref\EndLink


Ask hyperref to load 
\List{1}
\item
A cut-down version of hyperref.sty in which the modifications
to LaTeX commands are removed.
\item The
\`'hypertex.def' file with the \`'\special{htm:...}' commands 
being replaced by TeX4ht-oriented commands of the form
\`'\special{t4ht=...}'. 

This will not work for documents broken into pages!!  The
\''\Link' command should be used for the specials.  

\EndList

\Link[http://tug.org/applications/hyperref/manual.html]{}{}manual\EndLink,
\Link[http://www.tug.org/ListsArchives/pdftex/msg02358.html]{}{}msg02358\EndLink,
\Link[http://www.tug.org/ListsArchives/pdftex/msg02400.html]{}{}msg02400\EndLink





\<hyperref.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% hyperref.4ht                          |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\csname end:hyperref\endcsname
|<ifHy@texht undefined?|>
\expandafter\ifx \csname ifhy@texht\endcsname\relax
    \ifx \pdf@bbox\:UnDef 
       |<post 2001 late hyperrref|>
    \else
       |<pre 2001 late hyperrref|>
    \fi
\else
    |<early hyperref|>
\fi
|<tex4ht option on hyperrref|>
|<hyperref utils|>
|<config hyperref|>
|<htex4ht.def|>
\expandafter\ifx\csname ifHy@hyperindex\endcsname\relax
\else \Hy@hyperindexfalse
\fi
\Hinput{hyperref} 
\endinput
>>>        \AddFile{7}{hyperref}


\<pre 2001 late hyperrref\><<<
|<late hyperref|>
\let\end:hyperref|=\endinput
>>>



\<hyperref utils\><<<
\ifx \@@wrindex\:UnDef \else
   \def\@@wrindex#1||#2||#3\\{%
     \protected@write\@indexfile{}{\string\indexentry{#1}{\thepage}}%
     \endgroup \@esphack
   }
\fi
\ifx \HyInd@@wrindex\:UnDef \else
   \def\HyInd@@wrindex#1#2||#3||#4\\{\HyInd@org@wrindex{#1}{#2}}%
\fi
\ifx \Hy@RestoreLastskip\:UnDef
   \let\Hy@RestoreLastskip\relax
\fi
>>>


\<config hyperref\><<<
\def\hyper@natlinkend{%
  \hyper@linkend
}
>>>


\<htex4ht.def\><<<
\def\hyper@linkstart#1#2{%
  \Hy@colorlink{\csname @#1color\endcsname}%
  \def\Hy@tempa{#1}%
  \ifx\Hy@tempa\@urltype
    \Link[#2]{}{}%
  \else
    {\hyper@chars\ifx\rel:hyper\def\Link{#2}{}\else\Link[\##2]{}{}\fi}%
  \fi  \global\let\rel:hyper=\:UnDef
}
\def\hyper@linkend{%
  \EndLink
  \Hy@endcolorlink
}
>>>


\<htex4ht.def\><<<
\def\hyper@anchorstart#1{%
  \Hy@SaveLastskip
  \begingroup
    \hyper@chars\Link{}{#1}%
  \endgroup
  \Hy@activeanchortrue
}
\def\hyper@anchorend{%
  \EndLink
  \Hy@activeanchorfalse
  \Hy@RestoreLastskip
}
>>>


\<config hyperref\><<<
\def\hyper@linkurl#1#2{%
  \leavevmode  \begingroup    \hyper@chars
   \ifx \hyper:normalise\:UnDef
      \Hy@colorlink{\@urlcolor}#1\Hy@endcolorlink
    \else      
      \Link[#2]{}{}\Hy@colorlink{\@urlcolor}#1\Hy@endcolorlink\EndLink
      \global\let\hyper:normalise|=\:UnDef
    \fi
  \endgroup }
\AtBeginDocument{%
  \pend:defI\hyper@normalise{\let\hyper:normalise|=\def}%
  \pend:defI\T@ref{\edef\RefArg{##1}}}
>>>

\''\XR@ext' get its value from the the \`'\usepackage' option:
dvi---default;
html---tex4ht;
pdf---hpdftex, dvipdfm, pdfmark, dvips, vtex, dvipsone, textures;
htm---vtex.


\<tex4ht option on hyperrref\><<<
\expandafter\ifx \csname H@item\endcsname\relax 
   \def\:temp{dvi}\ifx \XR@ext\:temp \else
     \def\:temp{html}\ifx \XR@ext\:temp \else
         \:warning{\string\usepackage[...]{hyperref} assumes `\XR@ext'
              option, not `tex4ht'}      
   \fi\fi
\else
      \:warning{\string\usepackage[...]{hyperref} assumes `\XR@ext'
           option, not `tex4ht'}
\fi
>>>

Check  \`'\zap@space#2 \@empty' for removing spaces





\''ifHy@texht' might be undefined, or defined with lowercase
character (in earlier versions).

\<ifHy@texht undefined?\><<<
\expandafter\ifx \csname ifHy@texht\endcsname\relax
   \expand:after{\expandafter
      \let \csname ifHy@texht\endcsname|=}\csname ifhy@texht\endcsname
\fi
\expandafter\ifx \csname ifHy@texht\endcsname\relax
   \expand:after{\expandafter
      \let \csname ifHy@texht\endcsname|=}\csname iffalse\endcsname
\fi
\ifHy@texht \else
    \:warning{tex4ht loaded after hyperref}
    \csname Hy@texhttrue\endcsname
\fi
>>>


The following is to take care of \''\newlabel' of hyperef,
which requires 5 fields instead of 2.

\<hyperref label\><<<
\ifx \prf:label\:UnDef \else \prf:label\fi
>>>

\<hyperref utils\><<<
\def\prf:label{{}{}{}}%
>>>





%\def\@hyperref{\ref}
%\def\label@hyperref[#1]#2{{%
%  \def\@firstoffive##1##2##3{##1}%   |%can we remove thi line?|%
%  \Configure{ref}{}{}{}\ref{#1}}}

\<config hyperref\><<<
\def\label@hyperref[#1]#2{{%
   \def\hyperrefLabel{#2}%
   \Configure{ref}
     {\Link}{\EndLink}{\Configure{ref}{}{}{}#2}\ref{#1}}}
\def\@@hyperref#1#2#3{\Link[#2]{}{}#1\EndLink}
|<autoref references|>
|<restore pre hyperref|>
\@ifpackageloaded{subfigure}{% 
  \@ifundefined{sub@label}{}{%
      \RequirePackage{nameref}%
}}{}
|<nameref.sty|>
>>>

The nameref offers \`'\def\strip@period#1.\relax#2\@@@{#1}' to subfigure.

\<restore pre hyperref\><<<
\ifx \H@equation\:UnDef \else
   \let\o:equation:\H@equation
\fi
\ifx \H@endequation\:UnDef \else
   \let\o:endequation:\H@endequation
\fi
\ifx \H@eqnarray\:UnDef \else
   \let\o:eqnarray:\H@eqnarray
\fi
\ifx \H@endsubeqnarray\:UnDef \else
   \let\o:endsubeqnarray:\H@endsubeqnarray
\fi
\ifx \H@subeqnarray\:UnDef \else
   \let\o:subeqnarray:\H@subeqnarray
\fi
\ifx \H@endsubeqnarray\:UnDef \else
   \let\o:endsubeqnarray:\H@endsubeqnarray
\fi
>>>




\<nameref.sty\><<<
\Configure{newlabel}
   {\cur:th \:currentlabel}
   {\string\csname\space
    :autoref\string\endcsname {\@currentlabelname}#1}
\ifx \@currentlabelname\:UnDef 
   \let\@currentlabelname\empty
\fi
\append:defI\refstepcounter{\def\@currentlabelname{#1}}
\pend:def\eqnarray{\def\@currentlabelname{equation}}
\pend:def\equation{\def\@currentlabelname{equation}}
\ifx \figure\:UnDef \else  
  \pend:def\figure{\def\@currentlabelname{figure}}
  \expandafter\pend:def\csname
     figure*\endcsname{\def\@currentlabelname{figure}}
\fi
\pend:defII\:thm{\def\@currentlabelname{##1}}
\ifx \part\:UnDef \else
   \def\:temp#1->#2//{#1}
   \def\:tempc#1{}
   \edef\:tempc{\expandafter\:temp\meaning\:tempc//}
   \edef\:temp{\expandafter\:temp\meaning\part//}
   \ifx \:temp\:tempc  
      \pend:defI\part{\def\@currentlabelname{part}}
\fi\fi
\ifx \chapter\:UnDef \else
   \let\NR:chapter\@chapter
   \def\@chapter[#1]#2{%
     |<adjust minipageNum for setcounter footnote 0|>%
     \def\@currentlabelname{\ch:autorefname}%
     \NR:chapter[{#1}]{#2}%
   }
   \let\NR:schapter\@schapter
   \def\@schapter#1{%
     \gdef\@currentlabelname{}%
     \NR:schapter{#1}%
   }
   \def\ch:autorefname{chapter}
   \let\hy:appendix\appendix
   \def\appendix{\def\ch:autorefname{appendix}\hy:appendix}
\fi   
\let\NR:sect\no@sect
\def\no@sect#1#2#3#4#5#6[#7]#8{%
  \xdef\@currentlabelname{\ifnum #2>\c@secnumdepth\else #1\fi}%
  \NR:sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]{#8}%
}
\let\NR:ssect\no@ssect
\def\no@ssect#1#2#3#4#5{%
  \gdef\@currentlabelname{}%
  \NR:ssect{#1}{#2}{#3}{#4}{#5}%
}
>>>

% \let\:rdef:sec|=\rdef:sec
% \def\rdef:sec#1{\def\@currentlabelname{#1}\:rdef:sec{#1}}

% \let\hy:@footnotetext|=\@footnotetext
% \def\@footnotetext#1{\hy:@footnotetext{\def\@currentlabelname{footnote}#1}} 


% \pend:def\table{\def\@currentlabelname{table}}
% \expandafter\pend:def\csname
%   table*\endcsname{\def\@currentlabelname{table}}



% \let\hy:item|=\item
% \def\item{\def\@currentlabelname{item}\hy:item} 

%  \let\:rEfLiNK|=\rEfLiNK
%  \def\rEfLiNK##1##2{\:rEfLiNK{##1}{{\let\rEfLiNK=\:gobble#2}}}%

\<late hyperref\><<<
\let\:temp|=\real@setref
\let\real@setref|=\ref
\let\ref|=\o:ref
\let\o:ref|=\:temp
>>>

\<early hyperref\><<<
\ifx \real@setref\:UnDef \else \let\o:ref|=\real@setref  \fi
\let\r:ref|=\ref
\def\:refstar#1{\r:ref}
\def\real@setref{\@ifnextchar*{\:refstar}{\r:ref}}
\DeclareRobustCommand\ref{\@ifnextchar*{\@refstar}{\real@setref}}
\def\@refstar{\real@setref}
>>>

\<early hyperref\><<<
\def\@pagerefstar#1{%
  \@safe@activestrue
  \expandafter\@setref\csname r@#1\endcsname \@secondoftwo{#1}%
  \@safe@activesfalse
}
>>>





\<hyperref utils\><<<
\def\hyperlink#1#2{\Link{#1}{}#2\EndLink}
\def\hypertarget#1#2{\Link{}{#1}#2\EndLink}
\ifx \hyperpage\:UnDef  \let\hyperpage=\empty  \fi
>>>

\<config hyperref\><<<
\ifx \Hy@linkfileprefix\empty\else
   \:warning{\noexpand\href of hyperref.sty introduces the prefix
             `\Hy@linkfileprefix' to prefix-free references. 
             The command \string\hyperlinkfileprefix{...}
             may be used for changing the prefix (probably 
             \string\hyperlinkfileprefix{}).}
\fi
>>>

\<config hyperref\><<<
\def\hyper@linkfile#1#2#3{\Link[#2]{#3}{}#1\EndLink}
>>>

\<config hyperref\><<<
\def\phantomsection{%
 \Hy@GlobalStepCount\Hy@linkcounter
 \xdef\@currentHref{likesection.\the\Hy@linkcounter}%
 \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
}
>>>

The following fix is to hold hypertex from modifying the links in
\Verbatim
\documentclass{article}  
  \usepackage{hyperref}  \hyperlinkfileprefix{}  
\begin{document}  
  \href{/somewhere/foo/}{look here}  
\end{document}  
\EndVerbatim

\<config hyperref\><<<
\catcode`\:=12
\def\@hyper@readexternallink#1#2#3#4:#5:#6\\#7{%
      \hyper@linkurl{#3}{#7\ifx\\#2\\\else\##2\fi}}
\catcode`\:=11
>>>


%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{Forms}
%%%%%%%%%%%%%%%%%%%%%%

\<config hyperref\><<<
\def\@Form[#1]{%
   \def\default:textarea{Form}%
   \scan:args{}#1,//\a:Form }  
                                        \def\@endForm{\b:Form}
                                         \NewConfigure{Form}{2}
\def\@TextField[#1]#2{%
   \def\default:textarea{TextField}%
   \scan:args{Field}#1,//%
   \csname a:TextField::\:textarea\endcsname  \leavevmode#2%
   \csname b:TextField::\:textarea\endcsname  }
\def\@PushButton[#1]#2{%
   \def\default:textarea{PushButton}%
   \scan:args{}#1,value=#2,//%
   \csname a:PushButton::\:textarea\endcsname }
\def\@Reset[#1]#2{%
   \def\default:textarea{Reset}%
   \scan:args{}#1,value=#2,//%
   \csname a:Reset::\:textarea\endcsname }
\def\@Submit[#1]#2{%
   \def\default:textarea{Submit}%
   \scan:args{}#1,value=#2,//%
   \csname a:Submit::\:textarea\endcsname }
\def\@CheckBox[#1]#2{%
   \def\default:textarea{CheckBox}%
   \scan:args{}#1,//%
   \csname a:CheckBox::\:textarea\endcsname
   #2\csname b:CheckBox::\:textarea\endcsname}
\def\@ChoiceMenu[#1]#2#3{% 
   \def\default:textarea{ChoiceMenu}%
   \scan:args{}#1,//%
   \csname a:ChoiceMenu::\:textarea\endcsname  \leavevmode#2%
   \csname b:ChoiceMenu::\:textarea\endcsname
   \:choices  #3,//{\csname d:ChoiceMenu::\:textarea\endcsname}%
         {\csname e:ChoiceMenu::\:textarea\endcsname}%
   \csname c:ChoiceMenu::\:textarea\endcsname }
>>>

\`'\setkeys' belongs to keyval.sty.

\<hyperref utils\><<<
\pend:defII\setkeys{%
   \expandafter\ifx \csname ##1:keys\endcsname\relax
          \expandafter\def\csname ##1:keys\endcsname{##2}%
   \else  \expandafter\append:def\csname ##1:keys\endcsname{##2}%
   \fi  }
\def\:choices#1,#2//#3#4{%
   \def\AttributeVal{#1}#3\AttributeVal#4%
   \def\:temp{#2}\ifx \:temp\empty \else
   \def\:temp{\:choices#2//{#3}{#4}}\expandafter\:temp\fi}
\def\check:args#1=#2//{\def\:temp{#2}}
\def\arg:quote#1=#2//{%
   \del:sp#1//%
   \expandafter\ifx \csname a:\:form:attr ::\nosp:arg\endcsname\relax
      \expandafter\ifx \csname a:::\nosp:arg\endcsname\relax
            \:warning{No configuration for \:form:attr ::\nosp:arg}%
      \else \def\AttributeVal{#2}\csname a:::\nosp:arg\endcsname
      \fi
   \else
      \def\AttributeVal{#2}\csname a:\:form:attr ::\nosp:arg\endcsname
   \fi
   }
\def\del:sp#1#2//{\def\nosp:arg{#1#2}}
\def\:form:attr{\ifx\:textarea\empty 
   \default:textarea\else \:textarea\fi}
\def\scan:args#1{\let\Attributes=\empty \let\:textarea=\empty
   \expandafter\ifx \csname #1:keys\endcsname\relax
      \expandafter\scan:arg
   \else  \expand:after{\expand:after
      {\expandafter\scan:arg}\csname #1:keys\endcsname,}\fi
}
\def\scan:arg#1,#2//{%
   \def\:temp{#1}\ifx \:temp\empty\else \ifx \:temp\space\else
      \check:args#1=//%
      \ifx \:temp\empty
         \edef\:textarea{\ifx \:textarea\empty\else ,\fi #1}%
      \else
         \arg:quote#1//%
   \fi\fi\fi
   \def\:temp{#2}\ifx \:temp\empty \else
   \def\:temp{\scan:arg#2//}\expandafter\:temp\fi
}        
\def\check:type#1{\:Optionfalse
   \def\:temp{#1}\expandafter\check:t\:textarea,//}%
\def\check:t#1,#2//{\def\:tempa{#1}\ifx \:temp\:tempa \:Optiontrue
   \else
       \def\:tempa{#2}\ifx\:tempa\empty\else \def\:tempa{\check:t#2//}\fi 
       \expandafter\:tempa
   \fi} 
>>>



The \''\nosp:arg' removes leading spaces from attribute names.
Why \`'\def\del:sp#1//{\def\nosp:arg{#1}}' doesn't work?




\Verbatim
\documentclass{article} 
\usepackage[tex4ht,bookmarks=false]{hyperref} 
\begin{document} 
 
 
\begin{Form}[action=mailto:foo,encoding=html,method=post] 
 
\TextField[width=7cm,name=somename,value={default value}] 
    {TextFields--input--text:  } 
 
\TextField[password,name=anymade]{TextFields--input--password: } 
 
\TextField[multiline,width=1in,height=0.6in,name=address,borderstyle=D, 
    color=1 1 1,backgroundcolor=0 0 .5, 
    value={first,second,third}]{TextFields--textarea: } 
 
 
 
\ChoiceMenu[combo,default=two,name=any, 
     ]{Choice menus--select:} 
     {one,two,three} 
 
\ChoiceMenu[default=Home,menulength=3,width=2in,name=xyz,default=two] 
     {Choice menus--select:} 
     {one,two,three} 
 
 
\ChoiceMenu[radio,default=second,name=next,borderwidth=3,bordercolor=0 1 0] 
     {Choice menus--radio:} 
     {one=first, 
      two=second, 
      and three=third} 
 
\CheckBox[]{checkbox 1} 
\CheckBox[name=namea]{checkbox 2} 
\CheckBox[name=nameb,checked]{checkbox 3} 
 
\PushButton[name=xxx,onclick={callsome.foo}]{pushbotton} 
\Submit{Submit}  
\Reset{Reset} 
 
\end{Form} 
\end{document} 

\EndVerbatim


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{ref and autoref}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\`'\csname Hy@captionsenglish\endcsname' not defined in old
versions

\<autoref references\><<<
\expandafter\ifx \csname sectionautorefname\endcsname\relax
   \let\:temp=\def
   \def\def#1{\expandafter
     \ifx \csname \expandafter\:gobble\string#1\endcsname\relax
         \expandafter\:temp\expandafter#1\else
      \expandafter\:gobble\fi }
   \csname Hy@captionsenglish\endcsname 
   \let\def=\:temp
\fi
\def\::autoref#1{%
  \expandafter\ifx \csname  #1autorefname\endcsname \relax
     \expandafter \ifx \csname #1name\endcsname \relax
     \else   \csname #1name\endcsname~\fi
  \else    \csname #1autorefname\endcsname~\fi}
\let\:autoref|=\:gobble
>>>


\<early hyperref\><<<
\expandafter\pend:defI\csname autoref \endcsname{%
   \let\:autoref|=\::autoref \edef\RefArg{##1}}
\expandafter\append:defI\csname autoref \endcsname{%
   \let\:autoref|=\:gobble}
>>>

\<pre 2001 late hyperrref\><<<
\pend:defIII\@setref{\edef\RefArg{##3}}
\append:defIII\@setref{|<no autoref name|>}
>>>

\<post 2001 late hyperrref\><<<
\pend:defIII\@setref{\edef\RefArg{##3}}
\append:defIII\@setref{\let\:autoref\:gobble}
>>>

\<post 2001 late hyperrref\><<<
\AtBeginDocument{%
   \edef\autoref{\noexpand\protect\expandafter\noexpand
   \csname autoref \endcsname}}
\long\expandafter\def\csname autoref \endcsname#1{\expandafter
    \auto@setref \csname r@#1\endcsname \@firstoffive {#1}}
>>>


\<post 2001 late hyperrref\><<<
\def\auto@setref#1#2#3{\@safe@activestrue
   |<yes autoref name|>\T@ref{#3}\@safe@activesfalse}
\ifx\@refstar\:UnDef
  \def\@refstar{|<no autoref name|>\T@ref} 
\fi
|<no autoref name|>
>>>

\<yes autoref name\><<<
\let\:autoref\::autoref
>>>

\<no autoref name\><<<
\let\:autoref\:gobble
>>>



%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{hypcap.sty}
%%%%%%%%%%%%%%%%%%%%%%%%%%%

\<hypcap.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% hypcap.4ht                            |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<hypcap configs|>
\Hinput{hypcap}
\endinput
>>>        \AddFile{9}{hypcap}


\<hypcap configs\><<<
\let\capstart=\empty 
>>>



%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Verbatim}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{verbatimfiles.sty}
%%%%%%%%%%%%%%%%%%%%%%%%%%%

\<verbatimfiles.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% verbatimfiles.4ht                     |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<verbatimfiles.sty code|>
\Hinput{verbatimfiles}
\endinput
>>>        \AddFile{9}{verbatimfiles}



\<verbatimfiles.sty code\><<<
\pend:defI\verbatimlisting{\a:verbatimlisting\bgroup
    \pend:def\thelineno{\c:verbatimlisting}
    \append:def\thelineno{\d:verbatimlisting}}
\append:defI\verbatimlisting{\egroup\b:verbatimlisting}
\NewConfigure{verbatimlisting}{4}
>>>

%%%%%%%%%%%%%%%%%%%%%%%
\Section{verbatim.sty}
%%%%%%%%%%%%%%%%%%%%%%%


\Link[/n/ship/0/packages/tetex/teTeX/texmf/tex/latex/tools/verbatim.sty]{}{}%
verbatim.sty\EndLink



\<verbatim.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% verbatim.4ht                          |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<verbatim.sty code|>
\Hinput{verbatim}
\endinput
>>>        \AddFile{9}{verbatim}


\<verbatim.sty code\><<<
\pend:def\endverbatim{\Configure{obeylines}{}{}{}}
\pend:def\verbatiminput{\a:verbatiminput \list:save \begingroup
   \aftergroup\list:recall \aftergroup\b:verbatiminput
   \:gobble}
\NewConfigure{verbatiminput}{2}
>>>



\Section{moreverb.sty}


\Link[/n/ship/0/packages/tetex/teTeX/texmf/tex/latex/tools/moreverb.sty]{}{}%
moreverb.sty\EndLink



\<moreverb.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% moreverb.4ht                          |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

|<moreverb.sty|>
\Hinput{moreverb}
\endinput
>>>        \AddFile{7}{moreverb}

\<moreverb.sty\><<<
|<fix moreverb|>
|<moreverb.sty shared config|>
>>>


\<fix moreverb\><<<
\pend:def\endverbatimtab{\ht:everypar{}}
\pend:def\verbatimtab{\bgroup
  \Configure{obeylines}{}{}{}%
  \Configure{HtmlPar}{\a:verbatimtab}{\a:verbatimtab}{}{}%
  \let\ =\b:verbatimtab }
\append:def\endverbatimtab{\egroup\IgnorePar}
\NewConfigure{verbatimtab}{2}
>>>


\<fix moreverb\><<<
\def\boxedverbatim{\verbatim}
\def\endboxedverbatim{\endverbatim}
>>>


\<fix moreverb\><<<
\let\:listinginput|=\@listinginput
\def\@listinginput{\a:listinginput\begingroup
   \def\@verbatim{\aftergroup\endgroup\aftergroup\b:listinginput
      \o:@verbatim:}%
   \:listinginput}
>>>



\<moreverb.sty shared config\><<<
\NewConfigure{listinginput}{2} 
>>>


\<moreverb.sty\><<<
\let\o:verbatimtabinput:=\verbatimtabinput
\def\verbatimtabinput{\a:verbatimtabinput\begingroup  
   \aftergroup\b:verbatimtabinput
   \let\:temp=\begingroup
   \def\begingroup{\let\begingroup=\:temp}%
   \o:verbatimtabinput:}
\NewConfigure{verbatimtabinput}{2}
>>>







\Section{fancyvrb.sty}


\Link[/n/ship/0/packages/tetex/teTeX/texmf/tex/latex/tools/fancyvrb.sty]{}{}%
fancyvrb.sty\EndLink



\<fancyvrb.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% fancyvrb.4ht                          |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

  |<fancyvrb.sty|>
\Hinput{fancyvrb}
\endinput
>>>        \AddFile{7}{fancyvrb}





\<fancyvrb.sty\><<<
 |<fix fancyvrb|>
   |<fancyvrb.sty shared config|>
>>>


\SubSection{Verbatim}


\<fix fancyvrb\><<<
\pend:def\FV@FormattingPrep{|<find color for fancyvrb|>}
\append:def\FV@FormattingPrep{\a:fancyvrb
   |<frames for fancyvrb|>%
   |<color for fancyvrb|>%
}
>>>

\''\FV@RightListNumber' not recognized in ttct.cls with test.tex. Why?


\<fix fancyvrb\><<<
\def\FV@ListProcessLine#1{%
    \hbox{\c:fancyvrb \anc:lbl r{FancyVerbLine}\FV@LeftListNumber
      \FV@LeftListFrame \e:fancyvrb \FancyVerbFormatLine{#1}\f:fancyvrb
      \FV@RightListFrame \csname FV@RightListNumber\endcsname 
          \d:fancyvrb}}
\def\FV@EndList{\FV@ListProcessLastLine  \FV@EndListFrame
  \IgnorePar\b:fancyvrb\par\@endparenv
  \endgroup   \@endpetrue}
\def\FV@StepLineNo{%
  \FV@SetLineNo
  \def\FV@StepLineNo{\SkipRefstepAnchor\refstepcounter{FancyVerbLine}}%
  \FV@StepLineNo}
>>>

The command 
\''\@endparenv' will complain if encounter in horizontal mode.





\`'\Configure{fancyvrb}
   {before-env} {after-env} {before-line} {after-line} {before-text}
   {after-text}'---beween end points of lines, and of tex, we can have
   line numbers.



\<fancyvrb.sty shared config\><<<
\NewConfigure{fancyvrb}{6}
>>>




\SubSection{Verb}


\<fix fancyvrb\><<<
\begingroup
\catcode`\^^M=\active%
\gdef\FVC@Verb#1{%
  \begingroup%
    \FV@UseKeyValues%
    \let\a:fancyvrb|=\empty\FV@FormattingPrep%
    \FV@CatCodes%
    \outer\def^^M{}%
    \catcode`#1=12%
    \def\@tempa{\def\FancyVerbGetVerb####1####2}%
    \expandafter\@tempa\string#1{\mbox{\a:verb##2\b:verb}\endgroup}%
    \FancyVerbGetVerb\FV@EOL}%
\endgroup
>>>


\<fix fancyvrb\><<<
\def\FV@UseVerb#1{\mbox{\FV@UseKeyValues
   \let\a:fancyvrb|=\empty \FV@FormattingPrep
   \a:verb #1\b:verb}}
>>>

\SubSection{Colors}




\<find color for fancyvrb\><<<
\let\fv:color|=\empty 
  \ifx \color\:UnDef\else\Configure{color}{\xdef\fv:color}\fi
>>>

\<color for fancyvrb\><<<
\bgroup
  \ifx \fv:color\empty \else{
     \let\HColor\fv:color \a:fancyvrbcolor
  }\fi
  \ifx \FancyVerbFillColor\relax \else
     \:fvcolor \b:fancyvrbcolor \FancyVerbFillColor|<par del|>%
  \fi
  \ifx \FancyVerbRuleColor\relax \else
     \:fvcolor \c:fancyvrbcolor \FancyVerbRuleColor|<par del|>%
  \fi
\egroup
\let\FV@BeginListFrame|=\relax
\let\FV@LeftListFrame|=\relax
\let\FV@RightListFrame|=\relax
\let\FV@EndListFrame|=\relax
>>>

\<fix fancyvrb\><<<
\def\:fvcolor#1{\def\a:color##1##2|<par del|>{%
   \Configure{SetHColor}#1{##1}}}
>>>


\<fancyvrb.sty shared config\><<<
\NewConfigure{fancyvrbcolor}{3}    
>>>

Colors text/background/frame

%%%%%%%%%%%%%%%%%%%
\SubSection{Frames}


\<frames for fancyvrb\><<<
\ifx \FV@BeginListFrame\relax\else
   \tmp:dim=\FV@FrameRule \edef\HSize{\the\tmp:dim}%
   \a:fancyvrbframe
\fi
\ifx \FV@LeftListFrame\relax\else
   \tmp:dim=\FV@FrameRule \edef\HSize{\the\tmp:dim}%
   \b:fancyvrbframe
\fi
\ifx \FV@EndListFrame\relax\else
   \tmp:dim=\FV@FrameRule \edef\HSize{\the\tmp:dim}%
   \c:fancyvrbframe
\fi
\ifx \FV@RightListFrame\relax\else
   \tmp:dim=\FV@FrameRule \edef\HSize{\the\tmp:dim}%
   \d:fancyvrbframe
\fi
>>>




\<fancyvrb.sty shared config\><<<
\NewConfigure{fancyvrbframe}{6}    
>>>

Frame up/left/down/right/thickness/padding


We get duplications, because we don't know the order of parameters
(e.g., \`'\begin{Verbatim}% [frame=single,framerule=1mm]'), and even
which ones are present at all.

\<fix fancyvrb\><<<
\define@key{FV}{framerule}{%
  \@tempdima=#1\relax
  \edef\FV@FrameRule{\number\@tempdima sp\relax}%
  {\Advance:\fancyvrbNo by 1   \tmp:dim=\FV@FrameRule
   \edef\HSize{\the\tmp:dim}%
   \e:fancyvrbframe}}
\define@key{FV}{framesep}{%
  \@tempdima=#1\relax
  \edef\FV@FrameSep{\number\@tempdima sp\relax}%
  {\Advance:\fancyvrbNo by 1    \tmp:dim=\FV@FrameSep
   \edef\HSize{\the\tmp:dim}%
   \f:fancyvrbframe}}
>>>

\SubSection{Boxed Verbatim}

Verbatim within \TeX{} box.

\<fix fancyvrb\><<<
\def\FV@BVerbatimBegin{%
  \begingroup
    \let\a:fancyvrb\empty \IgnorePar
    \FV@UseKeyValues
    \FV@BeginVBox
    \let\FV@ProcessLine\FV@BProcessLine
    \FV@FormattingPrep
    \FV@ObeyTabsInit \a:BVerbatimInput
}%
\def\FV@BVerbatimEnd{\b:BVerbatimInput \FV@EndVBox\endgroup}
\def\FV@BProcessLine#1{\hbox{\FancyVerbFormatLine
   {\c:BVerbatimInput#1\d:BVerbatimInput}}}   
\NewConfigure{BVerbatimInput}{4}
>>>

\SubSection{Verbatim in Footnores}



\<fix fancyvrb\><<<
\pend:def\V@@footnotetext{%
   \let\FNmark|=\@thefnmark
   \begingroup
   \ifnum \FNnum>\fn:txt
      \gHAssign\fn:txt|=\FNnum
      \def\@makefnmark{\hbox{\ExitHPage{\a:footnote}}}%
      \b:footnote \def\end:fverb{\c:footnote}%
   \else
      \a:footnotetext \b:footnotetext \let\end:fverb|=\c:footnotetext
   \fi
   \:gobbleII}
\append:def\V@@@footnotetext{\end:fverb\endgroup}
>>>



We mimic, and using components from, the standard verbatim environment
of LaTeX.  The \''\:gobbleII' is for getting rid of the
\`'\insert\footins'.








%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Slides}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%
\Section{Prosper}
%%%%%%%%%%%%%%%%%%%%%



\<prosper.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% prosper.4ht                           |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\let\prosper:Hinput=\Hinput
\def\Hinput#1{%
   \prosper:Hinput{#1}%
   \def\:temp{#1}\def\:tempa{seminar}\ifx \:temp\:tempa
      \let\Hinput=\prosper:Hinput
      \input prosper-a.4ht
   \fi
}
\endinput
>>>        \AddFile{9}{prosper}



The prosper class loads the article and seminar classes, and then its
own definitions.

\<prosper-a.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% prosper-a.4ht                         |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<prosper code|>
|<prosper code for hyperref|>
\Hinput{prosper}
\endinput
>>>        \AddFile{9}{prosper-a}


The prosper class loads hyperref before tex4ht. Hence:

\<prosper code\><<<
\ifHy@texht \else
   \:warning{Package option `tex4ht' missing for prosper.cls. Should
      be present with a PPR style option: default, darkblue,...}
\fi
\def\:temp{tex4ht}\ifx \:temp\Style@chosen
   \:warning{PPR style package option missing for prosper.cls
             (e.g., default, darkblue).}
\fi
\Log:Note{if figures in slides of prosper.cls
   translate to empty bitmaps, adjust the G-script in tex4ht.env  
   to handle larger page dimensions.}
>>>

\<prosper code\><<<
\let\orig@item\item
\pend:def\enditemize{\global\let\sv:end:DL\end:DL}
\append:def\enditemize{\sv:end:DL}
>>>

\<prosper code for hyperref\><<<
\let\hyp:enumerate\enumerate
\def\enumerate{\hyp:enumerate\@nmbrlistfalse}
>>>




\<prosper code\><<<
\def\maketitle{\bgroup
   |<adjust minipageNum for setcounter footnote 0|>%
   \def\sec:typ{title}%
   \ConfigureEnv{center}{\empty}{}{\empty}{\empty}
   |<prosper maketitle markup|>%
   \a:mktl  \o:maketitle:  \b:mktl
   \egroup \let\maketitle\empty}
>>>

\<prosper maketitle markup\><<<
\pend:def\@Title{\a:ttl}\append:def\@Title{\b:ttl}%
\pend:def\@Author{\a:aut}\append:def\@Author{\b:aut}%
\ifx\@Subtitle\@empty \else
   \pend:def\@Subtitle{\a:Subtitle}%
   \append:def\@Subtitle{\b:Subtitle}%
\fi
\ifx\@email\@empty \else
   \expandafter\pend:def\expandafter\@email\expandafter{%
       \expandafter\def\expandafter\@email\expandafter{\@email
                               }\a:email}\append:def\@email{\b:email}%
\fi
\ifx\@institution\@empty \else
   \pend:def\@institution{\a:institution}%
   \append:def\@institution{\b:institution}%
\fi
>>>


\<prosper code\><<<
\NewConfigure{Subtitle}{2}
\NewConfigure{email}{2}
\NewConfigure{institution}{2}
>>>


\<prosper code\><<<
\let\part=\relax
\newcommand{\part}[2][\@defaultTransition]{%
  \begin{slide}[#1]{}%
    \vspace*{1.5cm}|<prospect part toc|>\@addBookmarkOnSlide{0}{#2}%
    \begin{center}%
      \fontTitle{#2}%
    \end{center}
  \end{slide}}
>>>

\<prospect part toc\><<<
\def\Hy@temp{#2}%
\addcontentsline{toc}{part}{%
   \expandafter\strip@prefix\meaning\Hy@temp}%
>>>

\<prosper code\><<<
\def\tocslideentry#1#2#3{#3}
\def\@addBookmarkOnSlide#1#2{%
  \ifnum#1=0
    \def\Hy@temp{#2}%
    \addcontentsline{toc}{slide}{%
       \string\tocslideentry
       {}{\thetrueSlideCounter}
       {\expandafter\strip@prefix\meaning\Hy@temp}}%
  \else
    \@tempoLimit=#1%
    \advance \@tempoLimit by -1
    \ifcollapsedBookmarks
       \@tempoLimit=-\@tempoLimit
    \fi
    \def\Hy@temp{#2}%
    \addcontentsline{toc}{slide}{%
       \string\csname\space tocslideentry\string\endcsname
       {\number\@tempoLimit}{\thetrueSlideCounter}
       {\expandafter\strip@prefix\meaning\Hy@temp}}%
  \fi
}
>>>

\<prosper code\><<<
\expandafter\slide@hook\expandafter{\the \slide@hook
   \let\posit@Box=\empty
   \let\endposit@Box=\empty
}
\long\def\@on@overlay@one#1{}
>>>

\<prosper code\><<<
\pend:defI\slidetitle{\a:slidetitle}
\append:defI\slidetitle{\b:slidetitle}
\NewConfigure{slidetitle}{2}
>>>




%%%%%%%%%%%%%%%%%%%%%%%%
\Section{beamer}
%%%%%%%%%%%%%%%%%%%%%%%%




\<beamer.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% beamer.4ht                            |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<shared conf beamer|>
\ifx \insertinstituteshort\UnDef
  |<conf beamer 0.8|>
\else
  |<conf beamer 0.3|>
\fi
\Hinput{beamer}
\endinput
>>>        \AddFile{9}{beamer}



\<shared conf beamer\><<<
|<beamer title page|>
|<beamer sections|>
|<beamer toc|>
|<beamer environments|>
|<beamer other|>
>>>

\<conf beamer 0.3\><<<
\append:def\andtitle{\a:andtitle}
\def\insttitle#1{\a:inst$\sp{#1}$\b:inst}
\def\instinst#1{\a:inst$\sp{#1}$\b:inst\ignorespaces}
>>>

\<conf beamer 0.8\><<<
\append:def\beamer@andtitle{\a:andtitle}
\def\beamer@insttitle#1{\a:inst$\sp{#1}$\b:inst}
\def\beamer@instinst#1{\a:inst$\sp{#1}$\b:inst\ignorespaces}
>>>


\<conf beamer 0.3\><<<
\pend:def\titlepage{%
   \a:titlepage
   \pend:def\inserttitletitle{\a:title}%
   \append:def\inserttitletitle{\b:title}%
   \pend:def\insertauthortitle{\a:author}%
   \append:def\insertauthortitle{\b:author}%
   \pend:def\insertinstitute{\a:institute}%
   \append:def\insertinstitute{\b:institute}%
   \pend:def\insertdate{\a:date}%
   \append:def\insertdate{\b:date}%
   \pend:def\inserttitlegraphic{\a:titlegraphic}%
   \append:def\inserttitlegraphic{\b:titlegraphic}%
}
\append:def\titlepage{\b:titlepage}
>>>


\<conf beamer 0.8\><<<
\pend:def\titlepage{%
   \a:titlepage
   \pend:def\inserttitle{\a:title}%
   \append:def\inserttitle{\b:title}%
   \pend:def\insertauthor{\a:author}%
   \append:def\insertauthor{\b:author}%
   \pend:def\insertinstitute{\a:institute}%
   \append:def\insertinstitute{\b:institute}%
   \pend:def\insertdate{\a:date}%
   \append:def\insertdate{\b:date}%
   \pend:def\inserttitlegraphic{\a:titlegraphic}%
   \append:def\inserttitlegraphic{\b:titlegraphic}%
}
\append:def\titlepage{\b:titlepage}
>>>


\<beamer title page\><<<
\NewConfigure{titlepage}{2}
\NewConfigure{title}{2}
\NewConfigure{author}{2}
\NewConfigure{institute}{2}
\NewConfigure{date}{2}
\NewConfigure{titlegraphic}{2}
\NewConfigure{andtitle}{1}
\NewConfigure{inst}{2}
>>>

\<beamer toc\><<<
\def\addtocontents#1#2{%
   \add:toc{#1}{}{#2}%
}
\def\add:toc#1#2#3{{%
   \csname if:toc\endcsname{
      \def\protect{\noexpand\noexpand\noexpand}%
      \edef\:tempa{|<beamer toc entry|>}\:tempa
   }%
}}
>>>


\<beamer toc entry\><<<
\the\:tokwrite{\string\doTocEntry
   \string\toc#1{#2}{%
      \string\csname\space a:TocLink\string\endcsname
            {\FileNumber}{\cur:th\@currentlabel}{}{#3}%
   }{}\relax
}%
>>>      



\<beamer toc\><<<
\def\tableofcontents{\futurelet\:temp\:TOC}
\def\:TOC{\ifx [\:temp \expandafter\:TableOfContents
          \else \:TableOfContents[toc]\fi}

\pend:def\@subsectiontemplateshaded{\a:subsectionshadedintoc}
\append:def\@subsectiontemplateshaded{\b:subsectionshadedintoc}
\pend:def\@subsectiontemplate{\a:subsectionintoc}
\append:def\@subsectiontemplate{\b:subsectionintoc}
\pend:def\sectiontemplateshaded{\a:sectionshadedintoc}
\append:def\sectiontemplateshaded{\b:sectionshadedintoc}
\pend:def\sectiontemplate{\a:sectionintoc}
\append:def\sectiontemplate{\b:sectionintoc}

\NewConfigure{sectionshadedintoc}{2}
\NewConfigure{sectionintoc}{2}
\NewConfigure{subsectionshadedintoc}{2}
\NewConfigure{subsectionintoc}{2}
>>>





\<conf beamer 0.3\><<<
\let\o:subsection:\subsection
\def\subsection#1{%
   \expandafter\global\expandafter\sl:toks\expandafter
   {\the\sl:toks\leavevmode \o:subsection:{#1}%
    \add:toc{subsection}{\thesection.\thesubsection}{#1}}%
   |<cond undo delayed sect|>%
}
>>>



\<conf beamer 0.8\><<<
\let\o:@subsection:\@subsection
\def\@subsection[#1]#2{%
   \expandafter\global\expandafter\sl:toks\expandafter
   {\the\sl:toks\leavevmode \o:@subsection:[#1]{#2}%
    \add:toc{subsection}{\thesection.\thesubsection}{#2}}%
   |<cond undo delayed sect|>%
}
>>>


\<beamer sections\><<<
\let\o:@section:\@section
\def\@section[#1]#2{%
   \expandafter\global\expandafter\sl:toks\expandafter
   {\the\sl:toks\leavevmode \o:@section:[#1]{#2}%
    \add:toc{section}{\thesection}{\secname}}%
   |<cond undo delayed sect|>%
}


\let\o:untitledsubsection:\untitledsubsection
\def\untitledsubsection#1{%
   \expandafter\global\expandafter\sl:toks\expandafter
   {\the\sl:toks\leavevmode \o:untitledsubsection:}%
   |<cond undo delayed sect|>%
}

\newtoks\sl:toks
\NewConfigure{sec@slide}{2}
>>>

\<conf beamer 0.3\><<<
\pend:def\slide{\a:sec@slide\the\sl:toks\b:sec@slide 
   \global\sl:toks={}}
>>>

\<conf beamer 0.8\><<<
\let\be:frameslide\frameslide
\def\frameslide{\a:sec@slide\the\sl:toks\b:sec@slide
   \global\sl:toks={}\be:frameslide}
>>>



If sec@slide is configured, the section are subsection commands are
transported into the slide blocks.

\<cond undo delayed sect\><<<
\expandafter\ifx\csname a:sec@slide\endcsname\relax 
   \expandafter\ifx\csname b:sec@slide\endcsname\relax
       \the\sl:toks \global\sl:toks={}%
\fi\fi
>>>


\<beamer environments\><<<
\pend:def\@beginblocktemplate{\a:blocktitle}
\append:def\@beginblocktemplate{\b:blocktitle}
\pend:def\@beginalertblocktemplate{\a:blocktitle}
\append:def\@beginalertblocktemplate{\b:blocktitle}
\pend:def\@beginexampleblocktemplate{\a:blocktitle}
\append:def\@beginexampleblocktemplate{\b:blocktitle}
\NewConfigure{blocktitle}{2}
>>>



\<beamer other\><<<
\pend:defI\frametitle{\bgroup
   \pend:def\@headrenderer{\a:frametitle}%
   \append:def\@headrenderer{\b:frametitle}%
}
\append:defI\frametitle{\egroup}
\NewConfigure{frametitle}{2}
>>>

\<beamer other\><<<
\pend:defI\alert{\a:alert}
\append:defI\alert{\b:alert}
\NewConfigure{alert}{2}
\pend:defI\structure{\a:structure}
\append:defI\structure{\b:structure}
\NewConfigure{structure}{2}
>>>


%%%%%%%%%%%%%%%%%%%%%%%
\Section{seminar.cls}
%%%%%%%%%%%%%%%%%%%%%%%



\<seminar.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% seminar.4ht                           |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\let\seminar:Hinput=\Hinput
\def\Hinput#1{%
   \seminar:Hinput{#1}%
   \def\:temp{#1}\def\:tempa{article}\ifx \:temp\:tempa
      \let\Hinput=\seminar:Hinput
      \input seminar-a.4ht
   \fi
}
\endinput
>>>        \AddFile{9}{seminar}


The seminar class loads the article class, and then its own definitions.


\<seminar-a.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% seminar-a.4ht                         |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<seminar code|>
\Hinput{seminar}
\endinput
>>>        \AddFile{9}{seminar-a}


\<seminar code\><<<
\def\begin@slide[#1,#2]{\begingroup
   \slide@clearpage   \slidetrue \leavevmode   \refstepcounter{slide}%
   \the\slide@hook   \the\before@newslide
   \everyslide}
\def\end@slide{\endgroup}
>>>






%%%%%%%%%%%%%%%%%%%%%%%%
\Section{slides.cls}
%%%%%%%%%%%%%%%%%%%%%%%%




\<slides.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% slides.4ht                            |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<conf slides|>
\Hinput{slides}
\endinput
>>>        \AddFile{9}{slides}


\<conf slides\><<<
\def\btn:s{%
   \advance\c@slide by -1   
   \edef\prevCutAt{\RefFile{\jobname-sl\the\c@slide.\:html}}%
   \ifx\prevCutAt\space \let\prevCutAt=\empty \fi
   \advance\c@slide by 2   
   \edef\nextCutAt{\RefFile{\jobname-sl\the\c@slide.\:html}}%
   \ifx\nextCutAt\space \let\nextCutAt=\empty \fi
}
\append:def\slide{\expandafter\ifx  \csname slide:\endcsname\relax \else
    \NextFile{\jobname-sl\the\c@slide .\:html}%
    \HPage{\a:slidename}%
     \bgroup\btn:s \default:bts{}{tail}%
      \egroup
   \fi}
\pend:def\endslide{\expandafter\ifx  \csname slide:\endcsname\relax \else
  \bgroup \btn:s
     \pend:def\b:crsbt{\Link-{}{tail\FileName}\EndLink}%
     \default:bts{tail}{}%
   \egroup\EndHPage{}\fi}
\NewConfigure{slidename}{1}
\Configure{slidename}{\the\c@slide}
>>>

\<conf slides\><<<
\pend:def\maketitle{\bgroup
   |<adjust minipageNum for setcounter footnote 0|>%
   \pend:def\@title{\a:ttl}\append:def\@title{\b:ttl}%
   \pend:def\@date{\a:dat}\append:def\@date{\b:dat}%
   \pend:def\@author{\a:aut}\append:def\@author{\b:aut}%
   \a:mktl }
\append:def\maketitle{\b:mktl \egroup }
\NewConfigure{maketitle}[4]{\c:def\a:mktl{#1}\c:def\b:mktl{#2}%
   \c:def\a:ttl{#3}\c:def\b:ttl{#4}}
\NewConfigure{author date}[4]{%
   \c:def\a:aut{#1}\c:def\b:aut{#2}%
   \c:def\a:dat{#3}\c:def\b:dat{#4}}
>>>




%%%%%%%%%%%%%%%%%%%%%
\Section{foils.cls}
%%%%%%%%%%%%%%%%%%%%%



\<foils.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% foils.4ht                             |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\HRestore\listoffigures
\HRestore\listoftables
   |<fix foils.cls|>
   |<foils.cls shared config|>
\Hinput{foils}
\endinput
>>>        \AddFile{9}{foils}


 


\<is not foils.cls\><<<
\@ifclassloaded{foils}{\:Optionfalse}{}
>>>>


\<fix foils.cls\><<<
\NewSection\foilheads{}
\let\:foilhead|=\@foilhead
\def\@foilhead[#1]#2{%
   \def\:temp{#2}\ifx\:temp\empty \:foilhead[#1]{\foilheads{\space}}%
   \else \:foilhead[#1]{\foilheads{#2}}\fi  }
\NewConfigure{tableofcontents*}[1]{\edef\auto:toc{#1}%
   \ifx \::foilhead\:UnDef
      \let\::foilhead|=\:foilhead
      \def\:foilhead{\:tableofcontents[\auto:toc]%
          \let\:foilhead|=\::foilhead \::foilhead}
   \fi
}
>>>


 

\<fix foils.cls\><<<
\def\Str:pic{\ifx \EndPicture\:UnDef  \Picture*{}%
   \else \let\EndPicture\empty  \fi }
\let\:boldequation|=\boldequation
\def\boldequation{\Str:pic \:boldequation}
\append:def\endboldequation{\EndPicture}
\expand:after{\let\boldequation:|=}\csname boldequation*\endcsname
\expandafter\def\csname boldequation*\endcsname{\Str:pic \boldequation:}
\expandafter\append:def\csname endboldequation*\endcsname{\EndPicture}
% \let\:begintheorem|=\@begintheorem
% \def\@begintheorem#1#2{\:begintheorem{#1}{#2.}}
% \def\@opargbegintheorem#1#2#3{\:begintheorem{#1}{#2.\ [#3] }}
% \def\@beginstartheorem#1{\:begintheorem{#1.}}
% \def\@opargbeginstartheorem#1#2{\:begintheorem{#1.}{\ [#2] }}
% \long\def\@caption#1[#2]#3{\par \begingroup \@parboxrestore \normalsize
% \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
% \endgroup}
\def\end@nonfloat{\end@float}
>>>



Do we need the following?



%%%%%%%%%%%%%%%%%%%%%%
\Section{slidesec.sty}
%%%%%%%%%%%%%%%%%%%%%%

\<slidesec.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% slidesec.4ht                          |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\def\listofslides{\begingroup
  \section*{List of Slides}%
  \def\l@slide##1##2##3{%
    \slide@undottedcline{\slidenumberline{##3}{##2}}{}}%
  \let\l@subslide\l@slide   \a:listofslides
  \:tableofcontents[slidesection,subslidesection]\b:listofslides
  \endgroup}
\NewConfigure{listofslides}{2} 
\def\slide@heading[#1]#2{%
  \stepcounter{slidesection}%
  \:los{slidesection}{#1}%
  \gdef\theslideheading{#1}%
  \def\@tempa{#2}%
  \ifx\@tempa\@empty\else
    {\edef\@currentlabel{\csname
        p@slidesection\endcsname\theslidesection}%
      \makeslideheading{#2}}%
  \fi}

\def\slide@subheading[#1]#2{%
  \stepcounter{slidesection}%
  \:los{subheading}{#1}%
  \gdef\theslidesubheading{#1}%
  \def\@tempa{#2}%
  \ifx\@tempa\@empty\else
    {\edef\@currentlabel{\csname p@slidesubsection\endcsname
      \theslidesubsection}\makeslideheading{#2}}%
  \fi}

\def\:los#1#2{{\Link{#1-\expandafter\the\csname
     c@#1\endcsname}{#1\expandafter\the\csname
     c@#1\endcsname}\EndLink
\protect:wrtoc
   \edef\:temp{\the\:tokwrite{\string\doTocEntry
       \string\toc#1{\expandafter\the\csname c@#1\endcsname}{\string
      \csname\space a:TocLink\string\endcsname
   {\FileNumber}{#1\expandafter\the
    \csname c@#1\endcsname}{#1-\expandafter\the
    \csname c@#1\endcsname}{\ignorespaces #2}}{\the
    \c@slide}\relax}}\:temp
 }}


\Hinput{slidesec}
\endinput
>>>        \AddFile{9}{slidesec}

%%%%%%%%%%%%%%%%%%%%%%
\Section{texpower}
%%%%%%%%%%%%%%%%%%%%%%

\<texpower.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% texpower.4ht                          |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
 |<undo texpower|>
\Hinput{texpower}
\endinput
>>>        \AddFile{9}{texpower}


\<undo texpower\><<<
\expandafter\def\csname\string\@stepwise@TP\endcsname[#1]{}
\def\step#1{#1}
\def\bstep#1{#1}
\def\restep#1{#1}
\let\switch=\empty
\let\pause=\empty
>>>

\<texpower configs\><<<
\def\pause{\a:pause}
\NewConfigure{pause}{1}
\Configure{pause}
   {\gHAdvance\ShipoutCount by 1
     \hbox{\HCode{<!--[(\ShipoutCount) pause PPPPPPPPPPPP-->}}}

\Configure{pause}{}

\HAssign\ShipoutCount=0

\ConfigureEnv{stepcapsule}
   {\hbox{\HCode{<!-- step, l. \the\inputlineno -->}}}
   {\hbox{\HCode{<!-- /step, l. \the\inputlineno-->}}}
   {}{}

\pend:def\insertfirstduplicate@TP{\a:tp}
\append:def\insertfirstduplicate@TP{\b:tp}

\NewConfigure{tp}{2}

\Configure{tp}
   {\hbox{\HCode{<!-- first, l. \the\inputlineno -->}}}
   {\hbox{\HCode{<!-- /first, l. \the\inputlineno-->}}}

\pend:def\insertsecondduplicate@TP{\a:tpp}
\append:def\insertsecondduplicate@TP{\b:tpp}

\NewConfigure{tpp}{2}

\Configure{tpp}
   {\hbox{\HCode{<!-- second, l. \the\inputlineno -->}}}
   {\hbox{\HCode{<!-- /second, l. \the\inputlineno -->}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\:CheckOption{1} \if:Option
  \let\slide=\slide:
  \pend:def\slide{\let\slide:\:UnDef}
  \Configure{AtShipout}
   {\ifnum\ShipoutCount>0 
       \NextFile{\jobname-sl\ShipoutCount.\:html}%
       \HPage{\ShipoutCount}%
    \fi
   }
   {\ifnum\ShipoutCount>0 \rightline{%
         \ifnum \ShipoutCount>1
         \bgroup
             \HAdvance\ShipoutCount by -1
             [\Link[\jobname-sl\ShipoutCount.\:html]{}{}prev\EndLink]
         \egroup
         \fi
         \ShipoutCount{}
         \ifnum \ShipoutCount<0\LikeRef{LastShipout}%
         \bgroup
             \HAdvance\ShipoutCount by 1
             [\Link[\jobname-sl\ShipoutCount.\:html]{}{}next\EndLink]
         \egroup
         \fi
       }\EndHPage{}%
    \fi
   }
\else
  \Configure{AtShipout}
     {\ifnum\ShipoutCount>0 \HCode{<!--[\ShipoutCount]-->}\fi }
     {\ifnum\ShipoutCount>0 \HCode{<!--[/\ShipoutCount]--><hr />}\fi}
\fi
\ConfigureEnv{slide}
   {\ifvmode \IgnorePar\fi \EndP}
   {\ifvmode \IgnorePar\fi \EndP}
   {}{}
\Configure{stepwise}
   {}
   {\IgnorePar\par\leavevmode\EndP}
\Configure{@/BODY}
   {\relax \ifnum \FileNumber=1 
      \Tag{LastShipout}{\ShipoutCount}%
      \gHAssign\ShipoutCount=-2 
    \fi}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>>>

\<texpower configs\><<<
\pend:def\at@shipout@once@TP{\aftergroup\:AtShipout}
\def\:AtShipout#1\vtop#2{#1\vtop{\hbox{%
  \Configure{HtmlPar}{}{}{}{}%
  \a:AtShipout
     \box \@cclv
  \b:AtShipout
  \gHAdvance\ShipoutCount by 1
  \global\def\at@shipout@once@TP{\aftergroup\:AtShipout}}}}

\NewConfigure{AtShipout}{2}

\HAssign\ShipoutCount=0
\expandafter\let \expandafter \:stepwise@TP
                      \csname \string\@stepwise@TP\endcsname
\expandafter\long\expandafter\def\csname \string\@stepwise@TP\endcsname
       [#1]#2{\:stepwise@TP[#1]{\a:stepwise#2\b:stepwise}}

\NewConfigure{stepwise}{2}

\pend:def\pause{\ifvmode\IgnorePar\fi \EndP}
\append:def\pause{\par\ShowPar}
>>>


%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Drawing Utilities and Colors}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{PicTeX}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

In pict.sty

PicTex offers the following definitions
\`'\def\beginpicture{\setbox\!picbox=\hbox\bgroup....}
\def\endpicture{...  \egroup....}',  and it allows nested pictures.




\<pictex.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% pictex.4ht                            |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

   \let\:beginpicture|=\beginpicture
   \let\:endpicture|=\endpicture
   \def\beginpicture{%
      \ifx \EndPicture\:UnDef
          \a:pictex   \expandafter\Picture\c:pictex{}%
          \def\endpicture{\:endpicture \EndPicture\b:pictex}%
      \fi\:beginpicture \def\beginpicture{\let\endpicture|=\:endpicture
                                          \:beginpicture}}
   \NewConfigure{pictex}{3}
   \Hinput{pictex}

\endinput
>>>        \AddFile{9}{pictex}







\Section{Diagrams.tex}

By
\Link[http://www.dcs.qmw.ac.uk/\string
~pt/diagrams/index.html]{}{}Paul  Taylor \EndLink


\<diagrams.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% diagrams.4ht                          |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\pend:def\CD@bC{\ifincommdiag\else \expandafter\a:diagram \fi}
\append:def\CD@ED{\b:diagram}
\NewConfigure{diagram}{2}
   \Hinput{diagrams}
\endinput
>>>        \AddFile{9}{diagrams}








%%%%%%%%%%%%%%%%%%%%
\Section{PsTricks}
%%%%%%%%%%%%%%%%%%%%


\<pstricks.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% pstricks.4ht                         |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<pstricks pspicture|>
|<rput pspicture|>
|<pstricks configs|>
\Hinput{pstricks}
\endinput
>>>        \AddFile{9}{pstricks}



\<pst-all.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% pst-all.4ht                          |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\Hinput{pst-all}
\endinput
>>>        \AddFile{9}{pst-all}

\<pstricks configs\><<<
\pend:def\psframebox@ii{\a:pspicture}
\append:def\psframebox@ii{\b:pspicture}
>>>


\<pstricks pspicture\><<<
\pend:def\pst@picture{\global\let\pst:EndPicture\EndPicture
    \let\EndPicture=\empty}
\def\endpspicture{%
\pst@killglue
\endgroup
\egroup
\ifdim\wd\pst@hbox=\z@\else   
   \:warning{Hidden \string\@pstrickserr
        {Extraneous space in the pspicture environment}}%
\fi
\ht\pst@hbox=\pst@dimd
\dp\pst@hbox=-\pst@dimb
\setbox\pst@hbox=\hbox{%
\kern-\pst@dima
\ifx\pst@tempa\@empty\else
\advance\pst@dimd-\pst@dimb
\pst@dimd=\pst@tempa\pst@dimd
\advance\pst@dimd\pst@dimb
\lower\pst@dimd
\fi
\box\pst@hbox
\kern\pst@dimc}%
\if@star\setbox\pst@hbox=\hbox{\clipbox@@\z@}\fi@star
|<pspicture img|>%
\endgroup}
\expand:after{\let\fi@star|=}\csname fi\endcsname
\NewConfigure{pspicture}{2}
\HAssign\ps:level=0
>>>


\<pspicture img\><<<
\ifnum \ps:level=0
   \let\EndPicture\pst:EndPicture
   \global\let\pst:EndPicture=\:UnDef
   \a:pspicture\box\pst@hbox\b:pspicture 
\else
   \xdef\pspicture:dim{\the\wd\pst@hbox,
         \the\ht\pst@hbox, \the\ht\pst@hbox}%
   \box\pst@hbox
\fi
>>>




\<rput pspicture\><<<
\def\rput@iv(#1){\pst@killglue \gHAdvance\ps:level by 1
     \pst@makebox{\gHAdvance\ps:level by -1 \rput@v{#1}}} 
\def\rput@v#1{\begingroup
   \use@par
   \if@star\pst@starbox\fi
   \pst@makesmall\pst@hbox
   \pst@rotate\psk@rot\pst@hbox 
   \ifnum \ps:level=0
      \expandafter\ifx \csname pspicture:dim\endcsname\relax
         \ht:everypar{}\psput@{#1}\pst@hbox 
      \else
         |<rput fix|>%
      \fi
   \else
      \psput@{#1}\pst@hbox 
   \fi
\endgroup \ignorespaces}
>>>



A search on \`'\psput@{#1}\pst@hbox' show a few other locations
needing a similar code: \''\Rput', \''\uput', and \''\cput'.
When it is coming to paragraph breaks, they are all problematic
(because they move text around?).


\<rput fix\><<<
\def\psput@cartesian##1{%
   \hbox to \pst@dimg{{\vbox to \pst@dimh{\vss\box##1}\hss}}}%
\global\let\pspicture:dim=\:UnDef
\let\sv:leavevmode=\leavevmode
\def\leavevmode{%
   \let\leavevmode=\sv:leavevmode    
   |<rput warning|>%
   \let\EndPicture\pst:EndPicture
   \global\let\pst:EndPicture=\:UnDef
   \a:pspicture \leavevmode}%
\psput@{#1}\pst@hbox\b:pspicture
>>>


\<rput warningNO\><<<
\ifdim \pst@dimg<2pt  
   \:warning{pspicture might fail within \noexpand\rput 
        (width=\the\pst@dimg\space height=\the\pst@dimh)}%
\else \ifdim \pst@dimh<2pt
   \:warning{pspicture might fail within \noexpand\rput 
        (width=\the\pst@dimg\space height=\the\pst@dimh)}%
\fi\fi
>>>




%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{epsf.sty}
%%%%%%%%%%%%%%%%%%%%%%%%%



\<epsf.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% epsf.4ht                              |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

 |<epsf.sty|>
\Hinput{epsf}
\endinput
>>>        \AddFile{7}{epsf}

\<epsf.sty\><<<
   |<fix epsf|>
>>>

\<fix epsf\><<<
\def\:tempc#1{\def\PicName{#1}\a:epsfsetgraph
   \o:epsfsetgraph:{#1}\b:epsfsetgraph}
\HLet\epsfsetgraph=\:tempc
\NewConfigure{epsfsetgraph}{2}
>>>




%%%%%%%%%%%%%%%%
\Section{psfig.sty}
%%%%%%%%%%%%%%%%%

\<psfig.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% psfig.4ht                             |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\NewConfigure{psfig}{2}
\def\:temp#1{{\a:psfig\o:psfig:{#1}\b:psfig}}
\HLet\psfig|=\:temp
\Hinput{psfig}
\endinput
>>>        \AddFile{7}{psfig}




\Section{epsfig.sty}

\Link[/n/ship/0/packages/tetex/teTeX/texmf/tex/latex/graphics/epsfig.sty]{}{}%
epsfig.sty\EndLink.




\<epsfig.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% epsfig.4ht                            |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\NewConfigure{epsfig}{2}
\def\:temp#1{{\a:epsfig\o:epsfig:{#1}\b:epsfig}}
\HLet\epsfig|=\:temp
\Hinput{epsfig}
\endinput
>>>        \AddFile{7}{epsfig}




%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{graphics.sty}
%%%%%%%%%%%%%%%%%%%%%%%

\Link[/n/ship/0/packages/tetex/teTeX/texmf/tex/latex/graphics/graphics.sty]{}{}%
graphics.sty\EndLink.



\<graphics.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% graphics.4ht                          |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

   |<fix graphics|>
\Hinput{graphics}
\endinput
>>>        \AddFile{4}{graphics}



\<fix graphics\><<<
\def\grp:warning#1{\no:bound#1(no BoundingBox)//\:warning{#1}}
\def\no:bound#1(no BoundingBox)#2//{\gdef\noBoundingBox{#2}\ifx
   \noBoundingBox\empty \global\let\noBoundingBox\:UnDef\fi}
\let\:tempc|=\Gin@setfile
\pend:defIII\:tempc{\a:graphics
    \global\let\noBoundingBox\:UnDef
    \let\@latex@error|=\grp:warning \let\@ehc|=\empty}
\append:defIII\:tempc{\b:graphics\grf:gobble\leavevmode grf:gobble}
\HLet\Gin@setfile|=\:tempc
\NewConfigure{graphics*}[2]{%
   \expandafter\ifx \csname :.#1\endcsname\relax
      \pend:defIII\n:Gin@setfile:{\csname :.#1\endcsname}%
   \fi
   \expandafter\def\csname :.#1\endcsname{\def\:temp{.#1}%
      \ifx \:temp\Gin@ext  \let\a:graphics|=\relax
         \def\G:cnfg{#2}\expandafter\grf:gobble \fi}}
\NewConfigure{graphics}{2}
\def\grf:gobble#1\leavevmode#2grf:gobble{%
   \PictureOff#1\PictureOn \G:cnfg \let\G:cnfg|=\relax}
\let\G:cnfg|=\relax
>>>


%\expandafter\def\csname c:graphics-file:\endcsname#1{\Gin@drafttrue
%   \def\Gin@setfile##1##2##3{%
%     \def\:temp####1####2{#1}\:temp{##3}{\Gin@base}}}
%\pend:defI\Ginclude@graphics{\a:graphics}
% \append:defI\Ginclude@graphics{\b:graphics}


For figures of specific exytensions, we can tailor a configuration
with the command
\`'\Configure{graphics*}{extension}{action}'.  For the other figures,
we can use the configuration
\`'\Configure{graphics}{before}{aafter}'.  

\Verbatim
\Configure{epsfig}
  {\Configure{graphics*}
    {eps}
    {\Needs{"eps22jpg ####1 ####2"}%
     \Needs{File:           ####2}%
     \def\temp{[####2]}%
     \Picture       [\temp]{####2}}}
 {}
\EndVerbatim


Newer version

\Verbatim

\Configure{graphics*}
    {eps}
    { \Needs{"convert -crop 0x0 -density 110x110 -transparent
                '\#FFFFFF' ##3 \csname Gin@base\endcsname.gif"}
      \Picture[pict]{\csname Gin@base\endcsname.gif}
    }

\Configure{graphics*}
    {gif}
    {\Picture[pict]{\csname Gin@base\endcsname.gif}}

\EndVerbatim





For xml

\Verbatim
\def\Ginclude@graphics#1{\Tg<includegraphics file="#1"/>}
\def\Gin@setfile#1#2#3{%
  \ifx\\#2\\\Gread@false\fi
  \ifGin@bbox\else
    \ifGread@
      \csname Gread@%
         \expandafter\ifx\csname Gread@#1\endcsname\relax
           eps%
         \else
           #1%
         \fi
      \endcsname{\Gin@base#2}%
    \else
      \Gin@nosize{#3}%
    \fi
  \fi
  \Gin@viewport@code
  \Gin@nat@height\Gin@ury bp%
  \advance\Gin@nat@height-\Gin@lly bp%
  \Gin@nat@width\Gin@urx bp%
  \advance\Gin@nat@width-\Gin@llx bp%
  \Gin@req@sizes
  \Tg<includegraphics file="#3" width="\the\Gin@req@width"
        height="\the\Gin@req@height"/>
}

\EndVerbatim



%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{graphicx}
%%%%%%%%%%%%%%%%%%%%%%%

\<graphicx.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% graphicx.4ht                          |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
   |<fix graphicx|>
\Hinput{graphicx}
\endinput
>>>        \AddFile{4}{graphicx}

\<fix graphicx\><<<
\let\Gin:esetsize\Gin@esetsize
\def\Gin@esetsize{%
   \ifx \Gin@ewidth\Gin@exclamation
      \let\Gin:ewidth\Gin@ewidth
   \else
      \tmp:dim=\Gin@ewidth
      \edef\Gin:ewidth{\the\tmp:dim}%
   \fi
   \ifx \Gin@eheight\Gin@exclamation
      \let\Gin:eheight\Gin@eheight
   \else
      \tmp:dim=\Gin@eheight
      \edef\Gin:eheight{\the\tmp:dim}%
   \fi
   \Gin:esetsize
}
>>>



%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{endfloat}
%%%%%%%%%%%%%%%%%%%%%%%



\<endfloat.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% endfloat.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\Hinput{endfloat}
\endinput
>>>        \AddFile{9}{endfloat}











%%%%%%%%%%%%%%%%
\Section{mfpic.sty}
%%%%%%%%%%%%%%%%



\<mfpic.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% mfpic.4ht                             |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<mfpic config|>
\Hinput{mfpic}
\endinput
>>>        \AddFile{9}{mfpic}


\<mfpic config\><<<
\pend:def\mfpic{\a:mfpic}
\append:def\endmfpic{\b:mfpic}
\NewConfigure{mfpic}{2}
\Configure{mfpic} {\Picture+{}} {\EndPicture}
>>>


\''\opengraphsfile' is only used once in the LaTeX document. All
individual pictures generated by \''\mfpic... \endmfpic' go
into this single file.  Therefore \''\Picture+{} ... \EndPicture' should
be wrapped around \''\mfpic ...  \endmfpic',




%%%%%%%%%%%%%%%%
\Section{xy.sty}
%%%%%%%%%%%%%%%%



\<xy.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% xy.4ht                                |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\pend:def\xy{\a:xypic}
\append:def\endxy{\b:xypic}
\NewConfigure{xypic}{2}
|<sup/sub in xypic|>
\expandafter\ifx \csname xyv2version\endcsname\relax\else 
   |<config xyv2|>
\fi
\Hinput{xy}
\endinput
>>>        \AddFile{7}{xy}

xypic assum catcodes of 7 and 8 for sup and sub.

\<sup/sub in xypic\><<<
\def\:tempa#1#2{%
   \gdef\xyFN@##1{%
     \def\:temp{%
       \ifx #1\next \let\next|=^%
                    \def\:temp########1{##1^}%
       \else
          \ifx #2\next \let\next|=_%
                       \def\:temp########1{##1_}%
          \else  \let\:temp|=##1\fi
       \fi
       \:temp}\futurelet\next\:temp}%
   }
\:CheckOption{no^} \if:Option   \else
   \:CheckOption{^13} \if:Option   \catcode`\^|=13
                      \else        \catcode`\^|=12 \fi
\fi
\:CheckOption{no_} \if:Option   \else
   \:CheckOption{_13} \if:Option   \catcode`\_|=13
                      \else        \catcode`\_|=12 \fi
\fi
\:tempa^_
\catcode`\^|=7
\catcode`\_|=8
>>>


\<config xyv2\><<<
\let\xy:diagram|=\diagram
\def\diagram{\a:diagram \xy:diag}
\def\xy:diag#1\enddiagram{\xy:diagram#1\enddiagram\b:diagram}
\NewConfigure{diagram}{2}
>>>

\Section{pb-diagram.sty}



\<pb-diagram.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% pb-diagram.4ht                        |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\Hinput{pb-diagram}
\endinput
>>>        \AddFile{9}{pb-diagram}

%%%%%%%%%%%%%%%%%%%
\Section{amscd.sty}
%%%%%%%%%%%%%%%%%%%

\<amscd.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% amscd.4ht                             |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\Hinput{amscd}
\endinput
>>>        \AddFile{7}{amscd}

%%%%%%%%%%%%%%%%%%%
\Section{pgf.sty}
%%%%%%%%%%%%%%%%%%%

\<pgf.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% pgf.4ht                                |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\Hinput{pgf}
\endinput
>>>        \AddFile{9}{pgf}




%%%%%%%%%%%%%%%%%%%%%%%
\Section{color.sty}
%%%%%%%%%%%%%%%%%%%%%%%%%




Was \`'\def\color@setgroup{\begingroup \ht:special {color push
    \current@color }% \aftergroup \reset@color }' indirectly through
    \''\set@color'.  It caused an extra leading line for verbatim
    environments.  As a side comment, the \''\aftergroup' might cause
    an ordering problem, if html code is attached to it.



\<color.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% color.4ht                             |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\let\:temp|=\begingroup 
\HLet\color@setgroup|=\:temp
|<def HColor|>
\NewConfigure{color}{1}
\def\@textcolor#1#2#3{\protect\leavevmode{\protect\a:textcolor
      \color#1{#2}#3\protect\b:textcolor}}
\NewConfigure{textcolor}{2}
   |<fix color|>
|<boxes of color|>
\Hinput{color}
\endinput
>>>        \AddFile{7}{color}


\<def HColor\><<<
\def\HColor{\:warning{\string\Hcode{...}{...} is deprecated; Use 
   \string\Configure{HColor}{...}{...}}\Configure{HColor}}
\NewConfigure{HColor}[2]{\if !#1!|<internal HColor|>\else
   \expandafter\edef\csname CLR:#1\endcsname{#2}\fi}
>>>


\<\><<<
\def\:temp#1#2{%
   \let\a:fcol|=\empty   \let\b:fcol|=\empty
   \color@b@x\relax{\color#1{#2}}}
\HLet\color@box|=\:temp
\def\:temp#1#2#3{%
   \let\a:fcol|=\a:fcolorbox   \let\b:fcol|=\b:fcolorbox
   \color@b@x{\fboxsep\z@\color#1{#2}\fbox}{\color#1{#3}}}
\HLet\color@fbox|=\:temp
\long\def\:temp#1#2#3{%
   \def\:temp{#1}\def\:tempa{\relax}\ifx\:temp\:tempa\else\leavevmode\fi
   {\a:fcol #1{\ifcolors@ \a:colorbox\fi \leavevmode #2%
      {\set@color#3}\ifcolors@ \b:colorbox\fi}}\b:fcol}
\HLet\color@b@x|=\:temp
>>>

\<boxes of color\><<<
\long\def\:temp#1#2#3{%
   \ifcolors@ 
      \def\:temp{#1}\def\:tempa{\relax}\ifx\:temp\:tempa
      \a:colorbox \else \a:fcolorbox \fi
   \fi
   {#1{\leavevmode #2{\set@color#3}}}%
   \ifcolors@ 
      \def\:temp{#1}\def\:tempa{\relax}\ifx\:temp\:tempa
      \b:colorbox \else \b:fcolorbox \fi
   \fi
}
\HLet\color@b@x\:temp
\NewConfigure{colorbox}{2}
\NewConfigure{fcolorbox}{2}
>>>


\<fix color\><<<
\def\pagecolor{%
  \begingroup \a:pagecolor
      \let\ignorespaces\endgroup
      \let\set@color\set@page@color
      \color}
\NewConfigure{pagecolor}{1}
>>>


\<fix color\><<<
\def\@undeclaredcolor[#1]#2{\a:color{#1 #2}%
  \@ifundefined{color@#1}%
    {\@latex@error{Undefined color model `#1'}\@ehd}%
    {\csname color@#1\endcsname\current@color{#2}%
     \set@color}%
  \ignorespaces}
\pend:defI\@declaredcolor{\a:color{##1}}
>>>





\<fix color\><<<
\NewConfigure{SetHColor}[2]{{%
   \expandafter\let\expandafter\:temp \csname CLR:#2\endcsname
   \ifx \:temp\relax \edef\:temp{#2 //}\expandafter\get:colortyp\:temp
   \else             \let\HColor=\:temp \fi
   \ifx \HColor\relax
      \:warning{missing \string\Configure{HColor}{#2}{...} 
           (in LaTeX: \csname\string\color @#2\endcsname)}%
      \expandafter\global\expandafter\let\csname CLR:#2\endcsname|=\empty
    \else #1\fi }}
>>>


The first is the code to be added for the color, with the color
itself referenced by \''\HColor'.
The second parameter is the same as for \''\color' of color.sty.

\<fix color\><<<
\def\c:HColor:gray:{\def\HColor:gray##1 ##2//}
\Configure{HColor:gray}{\Configure{HColor}{}{}}
\def\c:HColor:rgb:{\def\HColor:rgb##1,##2,##3 ##4//}
\Configure{HColor:rgb}{\Configure{HColor}{}{}}
\def\c:HColor:cmyk:{\def\HColor:cmyk##1,##2,##3,##4 ##5//}
\Configure{HColor:cmyk}{\Configure{HColor}{}{}}
\def\get:colortyp#1 #2//{%
  \expandafter\ifx \csname HColor:#1\endcsname\relax
     \let\HColor=\relax
     |<color from def|>%
  \else
     \csname HColor:#1\endcsname #2//%
  \fi
}
>>>

\<color from def\><<<
\expandafter\ifx \csname\string\color @#1\endcsname \relax\else 
   \expandafter\ifx \csname colortyp:\endcsname\relax \else
      \csname colortyp:\expandafter\expandafter\expandafter\endcsname
         \csname\string\color @#1\expandafter\endcsname
         \space . //%
\fi \fi
>>>



\<internal HColor\><<<
\if!#2!\let\HColor|=\relax \else \edef\HColor{#2}\fi
>>>


\<def HColor\><<<
\pend:defIII\definecolor{%
  \expandafter\ifx\csname HColor:##2\endcsname\relax\else
     \csname HColor:##2\endcsname ##3 //%
     \edef\:temp{{HColor}{##1}{\HColor}}%
     \expandafter\Configure\:temp
  \fi}
>>>


The \Verb!\color{red}! instruction might be problematic since it does
not on its own determine the extent of the text to be colored.  As a
result, its effect can cross logical boundaries. That is against the
philosophy of markup languages in general and of XML in particular.

It is possible to implement the \Verb!\color{...}! feature but I'm not
sure it is desirable to do so.  I think it is preferable to expect
users to use commands of the form \Verb!\textcolor{red}{...}! for code
fragments.


%%%%%%%%%%%%%%%%%%%%%%%
\Section{dvipsnam}
%%%%%%%%%%%%%%%%%%%%%%%


\<dvipsnam.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% dvipsnam.4ht                          |version %
% Copyright (C) |CopyYear.2002.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<dvipsnam 4ht|>
\Hinput{dvipsnam}
\endinput
>>>        \AddFile{7}{dvipsnam}

\<dvipsnam 4ht\><<<
\let\sv:ProvidesFile=\ProvidesFile
\let\sv:DefineNamedColor=\DefineNamedColor

\def\ProvidesFile#1]{}
\def\DefineNamedColor#1#2#3#4{%
   \let\sv:HColor=\HColor
   \csname HColor:#3\endcsname #4 //%
   \expandafter\ifx \csname HColor\endcsname\relax
     \:warning{Improper \string\Configure{HColor:#3}}%
   \else
      \edef\HColor{\noexpand\Configure{HColor}{#2}{\HColor}}\HColor
   \fi
   \let\HColor=\sv:HColor
}
\input dvipsnam.def

\let\ProvidesFile=\sv:ProvidesFile
\let\DefineNamedColor=\sv:DefineNamedColor
>>>


%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{colortbl.sty}
%%%%%%%%%%%%%%%%%%%%%%%%%

colortbl.sty invokes color.sty, if the last package is not loaded.
The same is true for array.sty.



\<colortbl.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% colortbl.4ht                          |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

   |<fix colortbl|>
   |<colortbl.sty shared config|>
\Hinput{colortbl}
\endinput
>>>        \AddFile{7}{colortbl}




\<fix colortbl\><<<
\CT@everycr{\o:noalign:{\global\let\CT@row@color\relax}\the\everycr}
>>>


The followning is a redefinition of a macro from array.sty

\<fix colortbl\><<<
\NewConfigure{@classz}{4}
\pend:def\@classz{\pic:gobble\a:@classz}
\append:def\@classz{\pic:gobble\b:@classz}
\pend:def\insert@column{\pic:gobble\c:@classz}
\append:def\insert@column{\pic:gobble\d:@classz}
>>>


\`'\insert@column' is       used only in array.

  Used to have
\`'\let\HRow|=\relax\let\HCol|=\relax' in \`'\pend:def\@classz', but
that caused a problem in \''\multicol'.  Do we still need that
protection in \''\@classz'?

We take \`'\Configure{@classz}
    {before col}{after col}
    {before entry}{efter entry}',  where the last two need protection
if their content is to expand when the item is reached.  Otherwise,
everything expands when the Preamble is visited.



The following is a reduced definition which removes the ruler used in
painting the backrounds.


\<fix colortbl\><<<
\def\:temp{\global\let\CT@do@color|=\relax}
\HLet\CT@@do@color|=\:temp
>>>

The configuration:


\<fix colortbl\><<<
\let\::maketitle|=\o:maketitle:
\def\o:maketitle:{%
   \ifx \EndPicture\:UnDef
      \NewConfigure{@classz}{4}%
      \Configure{@classz}{}{}{}{}%
   \fi
   \::maketitle }
>>>



Don't \''\CT@setup', \''\CT@row@color', and \''\CT@do@color' 
need also a treatment similar to \''\CT@column@color'?



\SubSection{Rows}



\<fix colortbl\><<<
\def\rowcolor{%
  \o:noalign:{\ifnum0=`}\fi
  \global\let\CT@do@color\CT@@do@color
  \@ifnextchar[\CT@rowa\CT@rowb}
\def\CT@rowa[#1]#2{%
  \pic:gobbleII\a:rowcolor{#1 #2}%
  \gdef\CT@row@color{\CT@color[#1]{#2}}%
  \CT@rowc}
\def\CT@rowb#1{%
  \pic:gobbleII\a:rowcolor{#1}%
  \gdef\CT@row@color{\CT@color{#1}}%
  \CT@rowc}
>>>


\<fix colortbl\><<<
\NewConfigure{rowcolor}{1}
>>>


\SubSection{Utilities}

\<fix colortbl\><<<
\def\begin:current@color{\let\sv:curcolor|=\current@color}
\def\end:current@color{%
   \ifx \current@color\sv:curcolor 
   \else \csname a:text-colortbl\endcsname \fi
}
\NewConfigure{text-colortbl}{1}
\def\GET@column@color{}
\def\color:ii[#1]#2#3|<par del|>{\def\:temp{#1 #2}}
\def\color:i#1#2|<par del|>{\def\:temp{#1}}
>>>

We introduce css for color of text in a cell, only if the color
changed in the cell.  The last color is the that takes effect.




\<\><<<
\Configure{multicolumn}
   {\ifvmode\IgnorePar\fi
    \HCode{<div class="multicolumn"}\HColAlign\HCode{>}%
    \expandafter\MUL:LMN\meaning\@preamble//}
   {\ifvmode\IgnorePar\fi \EndP\HCode{</div>}}
>>>

\<fix colortbl\><<<
\let\ctbl:mcol|=\multicolumn
\def\multicolumn#1#2#3{%
   \ctbl:mcol{#1}{#2}{#3}%
   \expand:after{\expandafter\MUL:LMN\meaning\@preamble}\MUL:PA//%
   \ignorespaces}
{ 
  \def\MUL:PA{\gdef\MUL:PA}
  \def\MUL:LMN{%
  \catcode`\C=12
  \catcode`\T=12
  \catcode`\@=12
  \catcode`\c=12
  \catcode`\o=12
  \catcode`\l=12
  \catcode`\r=12
  \catcode`\t=12
  \catcode`\e=12
  \catcode`\m=12
  \catcode`\p=12
  \catcode`\d=12
  \catcode`\i=12
  \catcode`\b=12
  \gdef\MUL:LMN}  
  \MUL:LMN#1CT@color #2@tempdimb#3//{\::KOLOR{#2}}
  \MUL:PA{CT@color @tempdimb}
}
\def\::KOLOR#1{\if :#1:\else |<set to preamble color|>\fi}
\def\:KOLOR{\@ifnextchar[\mc:clr{\mc:clr[]}}
{
  \catcode`\{=12
  \catcode`\}=12
  \catcode`\(=1
  \catcode`\)=2
  \gdef\mc:clr[#1]{#2}((%
       \def\current@color(\if :#1:\else #1 \fi #2)%
       \csname a:cell-colortbl\endcsname
     )\def\:temp##1//()\:temp)
)
\NewConfigure{cell-colortbl}{1}
>>>


\<set to preamble color\><<<
\:KOLOR#1//%
>>>

%%%%%%%%%%%%%%%%
\Section{dvips}
%%%%%%%%%%%%%%%%


\<dvips.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% dvips.4ht                             |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<postscript colors model|>
\Hinput{dvips}
\endinput
>>>        \AddFile{6}{dvips}

\<postscript colors model\><<<
\def\colortyp:gray:#1 #2//{\HColor:gray #1 //}
\def\colortyp:cmyk:#1 #2 #3 #4 #5//{\HColor:cmyk #1,#2,#3,#4 //}
\def\colortyp:rgb:#1 #2 #3 #4//{\HColor:rgb #1,#2,#3 //}
\def\colortyp:#1 #2//{%
   \expandafter\ifx \csname colortyp:#1:\endcsname\relax \else
     \csname colortyp:#1:\endcsname #2 //\fi}
>>>

% \def\colortyp:hsb:#1//{\hshow{#1}}


%%%%%%%%%%%%%%%%
\Section{textures}
%%%%%%%%%%%%%%%%


\<textures.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% textures.4ht                          |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<textures colors model|>
\Hinput{textures}
\endinput
>>>        \AddFile{9}{textures}

\<textures colors model\><<<
\def\colortyp:cmyk:#1. #2. #3. #4. #5//{\HColor:cmyk #1,#2,#3,#4 //}
\def\colortyp:rgb:#1. #2. #3. #4//{\HColor:rgb #1,#2,#3 //}
\def\colortyp:#1 #2//{%
   \expandafter\ifx \csname colortyp:#1:\endcsname\relax \else
     \csname colortyp:#1:\endcsname #2 //\fi}
>>>

% \def\colortyp:hsb:#1//{\hshow{#1}}



%%%%%%%%%%%%%%%%
\Section{dvipdf}
%%%%%%%%%%%%%%%%


\<dvipdf.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% dvipdf.4ht                            |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<postscript colors model|>
\Hinput{dvipdf}
\endinput
>>>        \AddFile{9}{dvipdf}





%%%%%%%%%%%%%%%%
\Section{dvipsone}
%%%%%%%%%%%%%%%%


\<dvipsone.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% dvipsone.4ht                          |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<postscript colors model|>
\Hinput{dvipsone}
\endinput
>>>        \AddFile{9}{dvipsone}



%%%%%%%%%%%%%%%%
\Section{fig4tex}
%%%%%%%%%%%%%%%%


\<fig4tex.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% fig4tex.4ht                           |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|> 
|<fig4tex hooks|>
\Hinput{fig4tex}
\endinput
>>>        \AddFile{9}{fig4tex}


\<fig4tex hooks\><<<
\ifx \AtBeginDocument\UnDef
  \AtBeginDocument{%
   \let\:figvisu\figvisu
   \def\figvisu#1#2#3{\:figvisu{#1}{#2}{\a:figvisu#3\b:figvisu}}}
\else
   \let\:figvisu\figvisu
   \def\figvisu#1#2#3{\:figvisu{#1}{#2}{\a:figvisu#3\b:figvisu}}
\fi
\NewConfigure{figvisu}{2}
\Configure{figvisu}{\Picture+{}}{\EndPicture}
>>>




%%%%%%%%%%%%%%%%
\Section{pctex32}
%%%%%%%%%%%%%%%%


\<pctex32.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% pctex32.4ht                           |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<postscript colors model|>
\Hinput{pctex32}
\endinput
>>>        \AddFile{9}{pctex32}







%%%%%%%%%%%%%%%%%
\Chapter{DraTeX}
%%%%%%%%%%%%%%%%%

\Section{Gif for DraTex}

MOVE INTO DraTeX.

The comand  \`'\Draw' gives \`'\Picture*{}' and the option
 \`'\Draw[replacement]' gives
\`'\Picture*[replacement]{}'.




\<dratex.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% dratex.4ht                            |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<dratex.sty|>
\Hinput{dratex}
\endinput
>>>        \AddFile{9}{dratex}

\<dratex.sty\><<<
   \Define\html:Draw{|<definition of /:Draw in DraTeX|>%
      }

   \let\old:Draw|=\:Draw
   \def\:Draw{%
      \ifx \EndPicture\:UnDef
         \expand:after{|<html into /Draw|>}%
      \else   \expandafter\old:Draw \fi }
   |<utilities for /:Draw|>
   |<arguments of Draw into IMG|>
   |<image maps for /Draw|>
>>>




To avoid cloging the memory, when possible, move the pictures to new
pages.

\<html into /Draw\><<<
\ifvmode \vfill\break \fi
\pic:cond\:GifDraw\html:Draw
>>>

We get into \`'\Draw...\EndDraw' with the following \''\futurelet', so
we'll better ger the catcodes right.

\<utilities for /:Draw\><<<
\def\:GifDraw{\bgroup\:DraCatCodes   \futurelet\:tempa\gif:draw}
\def\gif:draw{%
  \ifx \:tempa[\g:fdr\g:ifdraw
  \else        \g:fdr\gi:fdraw \fi}
\def\g:ifdraw[#1]{\Picture*[#1]{ \a:@Picture{Draw}}\html:Draw}
\def\gi:fdraw{\Picture*{ \a:@Picture{Draw}}\html:Draw}
\def\g:fdr{\egroup\a:Draw\append:def\end:condpic{\b:Draw}\expandafter}
\NewConfigure{Draw}{2}
>>>




\<html into /EndDraw\><<<
|<measure dimension of drawing|>%
\global\let\in:pic|=\empty
\box\:box    \end:condpic 
\global\let\in:pic|=\:UnDef
>>>




\SubSection{Dimensions}


We put the picture into a box so that we will be able to measure its
dimensions. Now, we must be careful not to introduce strange stuff
into the box that will ruin the measurements.  In DraTeX we might be
less careful because
spaces are ignored due to their catcode of 9.

\<put picture in box\><<<
\setbox\:box=>>>


\<measure dimension of drawing\><<<
{\:X|=\wd\:box  \:Y|=\ht\:box  \advance\:Y by\dp\:box 
 \xdef\DrawWidth{\:InCons\:X}%
 \xdef\DrawHeight{\:InCons\:Y}%
 \xdef\MinDrawX{\:InCons\:LBorder}%
 \:X|=\:UBorder \xdef\MaxDrawy{\:InCons\:X}%
}%
>>>



\SubSection{Definition of /Draw.../EndDraw in DraTeX}

When \`'\DrawOn' is active, we have the definition
\`'\def\Draw{\:Draw}'.

\<definition of /:Draw in DraTeX\><<<
\ifvmode \noindent\hfil\fi
\global\:TeXLoc\z@
|<put picture in box|>\vbox\bgroup 
        \begingroup
\def\EndDraw{%
        \endgroup   \:SetDrawWidth 
      \egroup    |<html into /EndDraw|>%
      |<image map after /Draw|>}%
|<postscript for /Draw|>%
\:DraCatCodes      \parindent\z@    \ht:everypar{}%
\linepenalty10
\leftskip\z@     \rightskip\z@    \boxmaxdepth\maxdimen
\let\FigSize\:FigSize
\def\Draw{\:wrn1{}}%
\:CommonIID   \:InDraw 
>>>




\<postscript for /Draw\><<<
\def\PsCode##1{{\Text(--\ht:special{\PsCodeSpecial##1}--)}}%
>>>




In DraTeX dimensions don't care about the color of the pixels, but
once we go to dvips and/or convert we loose the invisible character
around the visible picture.  This causes a statement for improper
dimensions, and so for a distortion of the picture when the dimensions
are stated in \`'IMG'.  To avoid this, we can put rulers 
\`'\hrule height 1pt  \vskip2pt  \vbox\bgroup'
and
\`'\egroup  \vskip2pt  \hrule height 1pt'
at the start and end of the vbox that span to the full width.
However, such rulers are not alway desirable.


Hence, we go for the following instead of
\`'\DrawIMG{ WIDTH="\DrawWidth" HEIGHT="\DrawHeight"}'.

\<arguments of Draw into IMG\><<<
\def\DrawIMG#1{\def\Pic:Img{ \ifx \in:pic\:UnDef \at:IMG
                                \else \u:map#1\fi}}
\DrawIMG{}
\let\u:map|=\empty
>>>



\Section{Image Maps}






Origin at left-top corner of picture.

Possible options for textual links.

The <A USEMAP=...> tag is ignored by drawing displayer.



\<image maps for /Draw\><<<
\def\DrawMap{%
  \NewHaddr\:temp
  \xdef\:Map{{<map name="\:temp">}}%
  \edef\u:map{ usemap="\:sharp\:temp" }%
  \NewHaddr\alt:map
  \def\after:dra{\EndLink
      \HPage[\alt:map]{}{\expandafter\map:menu\:Map}\EndHPage{}%
      {\expandafter\HCode\:Map}\HCode{</map>}%
      \let\u:map|=\empty \let\after:dra|=\empty }%
  \Link[\RefFile{\alt:map}]{}{}\Draw[textual map]}

\let\after:dra=\empty
>>>


\<image map after /Draw\><<<
\after:dra
>>>


\SubSection{Recording Rectangles}


PUT warnings

PUT ALT ONLy IN PLACE!!!

\<image maps for /Draw\><<<
\Odef\GetRectArea[#1]#2#3{{%
  \ifnum \Point:N>0
     \MarkPoint     \area:env \gHAssign\Point:N |= 0
     \xdef\:Map{\:Map
        \rect:area{#1}\gt:crd{point:1}\gt:crd{point:2}{#2}{#3}}%
  \fi}}
\def\rect:area#1#2#3#4#5#6#7{%
   \trns:pt\:X{#2}\:Y{#3}%
   \trns:pt\:Z{#4}\:W{#5}%
   \Ar:a[#1 shape="rect"
     coords="\M:n\:X\:Z,\M:n\:Y\:W,\M:x\:X\:Z,\M:x\:Y\:W"
     \if "#7"\else alt="#7"\fi]{#6}}
>>>

\SubSection{Recording Circles}

\<image maps for /Draw\><<<
\Odef\GetCircleArea[#1]#2#3{{%
  \ifnum \Point:N>0
    \MarkPoint    \:distance(point:1,point:2)\tmp:dim|=\Map:x
    \:d|=\:Cons\tmp:dim\:d \area:env
    \gHAssign\Point:N |= 0
    \xdef\:Map{\:Map
       \circle:area{#1}\gt:crd{point:1}{\:InCons\:d}{#2}{#3}}%
  \else\fi}}
>>>

\<image maps for /Draw\><<<
\def\circle:area#1#2#3#4#5#6{%
   \trns:pt\:X{#2}\:Y{#3}%
   \Ar:a[#1 shape="circle" coords="\:X,\:Y,#4" 
       \ifx "#6"\else alt="#6"\fi]{#5}}
>>>



\SubSection{Recording Polygons}

\<image maps for /Draw\><<<
\Odef\GetPolyArea[#1]#2#3{{%
  \ifnum \Point:N>0
     \MarkPoint   \area:env  \let\:tempb|=\empty
     \Do(1,\Point:N){\edef\:tempb{\gt:crd{point:\the\DoReg}\:tempb}}%
     \gHAssign\Point:N |= 0
     \xdef\:Map{\:Map\poly:area{#1}{\:tempb}{#2}{#3}}%
  \fi}}

\def\ply:pts#1#2{%
   \def\:temp{#1}\ifx \:temp\empty\else
     \trns:pt\:X{#1}\:Y{#2}%
     \edef\:Z{\:Z\ifx \:Z\empty\else,\fi \:X,\:Y}%
     \expandafter\ply:pts
   \fi }
>>>

\<image maps for /Draw\><<<
\def\poly:area#1#2#3#4{%
   \let\:Z|=\empty  \ply:pts#2{}{}%
   \Ar:a[#1 shape="poly" coords="\:Z" 
      \ifx "#4"\else  alt="#4"\fi]{#3}}
>>>



\SubSection{alternative Textual Menues}

\<image maps for /Draw\><<<
\def\map:menu#1{\let\rect:area|=\r:mnu \let\circle:area|=\c:mnu
   \let\poly:area|=\p:mnu}

\def\r:mnu#1#2#3#4#5#6#7{[\Link[#1]{#6}{}#7\EndLink] }
\def\c:mnu#1#2#3#4#5#6{[\Link[#1]{#5}{}#6\EndLink] }
\def\p:mnu#1#2#3#4{[\Link[#1]{#3}{}#4\EndLink] }
>>>

\SubSection{Utilities}

\<image maps for /Draw\><<<
\gHAssign\Point:N |= 0
\def\MarkPoint{\gHAdvance\Point:N |by 1
   \MarkGLoc(point:\Point:N)}

\def\area:env{\def\:X##1.##2\:Y##3.##4,{{##1}{##3}}%
    \let\rect:area|=\relax
    \let\circle:area|=\relax
    \let\poly:area|=\relax }

\def\gt:crd#1{\csname Loc\space#1:\endcsname,}
>>>

\<image maps for /Draw\><<<
\def\trns:pt#1#2#3#4{%
   \ifnum #2<\MinDrawX  \HAssign#1|=0
   \else   \HAssign#1 |= #2 \Advance:#1 |by -\MinDrawX  
      \tmp:dim|=\Map:x \multiply\tmp:dim |by #1 
      \HAssign #1|=\:InCons\tmp:dim
   \fi
   \ifnum  #4>\MaxDrawy   \HAssign#3|=\MaxDrawy 
   \else   \HAssign#3|=-#4  \Advance:#3 |by \MaxDrawy 
   \fi
   \tmp:dim|=\Map:y \multiply\tmp:dim |by #3  \HAssign#3|=\:InCons\tmp:dim
}
>>>

\<image maps for /Draw\><<<
\def\MapDensity(#1,#2){%
   \tmp:dim=#1pt \divide\tmp:dim by 72 \edef\Map:x{\the\tmp:dim}%
   \tmp:dim=#2pt \divide\tmp:dim by 72 \edef\Map:y{\the\tmp:dim}}
\MapDensity(72,72)
>>>

%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Small Ones}
%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%
\Section{Beeton.sty}
%%%%%%%%%%%%%




\<beton.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% beton.4ht                             |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<beton configurations|>
\Hinput{beton}
\endinput
>>>        \AddFile{9}{beton}

\<beton configurations\><<<
\AtBeginDocument  
   {\let\@setfontsize =\beton@old@setfontsize 
    \let\beton@new@setfontsize=\beton@old@setfontsize}  
>>>





%%%%%%%%%%%%%%%%%%%%%%%%
\Section{everyshi(pment)}
%%%%%%%%%%%%%%%%%%%%%%%%



\<everyshi.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% everyshi.4ht                          |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<everyshi configurations|>
\Hinput{everyshi}
\endinput
>>>        \AddFile{9}{everyshi}

\<everyshi configurations\><<<
\let\@EveryShipout@Init\empty
>>>

%%%%%%%%%%%%%%%%%%%%%%%%
\Section{res}
%%%%%%%%%%%%%%%%%%%%%%%%



\<res.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% res.4ht                               |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  \Hinclude{\input res-a.4ht}{article} 
\endinput
>>>        \AddFile{9}{res}


\<res-a.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% res-a.4ht                             |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<res cfg|>
\Hinput{res}
\endinput
>>>        \AddFile{9}{res-a}


\<res cfg\><<<
\def\section{\no:section}
\csname pend:def\endcsname\endresume{%
  \csname d:section\endcsname
  \global\expandafter\let\csname d:section\endcsname\empty
}
\Configure{section}
   {\ifx \@@section\boxed@sectiontitle \csname a:boxed-section\endcsname
    \else \csname a:overlapped-section\endcsname \fi }
   {\ifx \@@section\boxed@sectiontitle \csname b:boxed-section\endcsname
    \else \csname b:overlapped-section\endcsname \fi }
   {\ifx \@@section\boxed@sectiontitle \csname c:boxed-section\endcsname
    \else \csname c:overlapped-section\endcsname \fi }
   {\ifx \@@section\boxed@sectiontitle \csname d:boxed-section\endcsname
    \else \csname d:overlapped-section\endcsname \fi }
\NewConfigure{overlapped-section}{4}
\NewConfigure{boxed-section}{4}
>>>


\<res cfg\><<<
\let\:temp\empty
\ifx \print@name\@printcentername 
   \def\:temp{\let\print@name\@printcentername}
\fi
\ifx \print@name\@linename 
   \def\:temp{\let\print@name\@linename}
\fi
   |<center name|>
   |<line name|>
\:temp
\NewConfigure{centername}{2}
\NewConfigure{centeraddresses}{5}
\NewConfigure{linename}{2}
\NewConfigure{lineaddress}{3}
>>>


\<center name\><<<
\def\@printcentername{\begingroup
  \a:centername\hbox{\@tablebox{\namefont\@name}}\b:centername
  \@ifundefined{@addressone}{}{%
    \@ifundefined{@addresstwo}{
      \a:centeraddresses
      \hbox{\@tablebox{\@addressone}}\b:centeraddresses
    }{
      \c:centeraddresses
      \hbox{\@tablebox{\@addressone}}\d:centeraddresses
      \hbox{\@tablebox{\@addresstwo}}\e:centeraddresses
    }%
  }%
  \endgroup}
>>>

\<line name\><<<
\def\@linename{\begingroup
  \def\\{, }%
  \a:linename{\namefont\@name}\b:linename
  \@ifundefined{@addressone}{}{%
      \a:lineaddress\hbox{\@addressone}\b:lineaddress
                    \hbox{\@addresstwo}\c:lineaddress
  }
\endgroup}
>>>




%%%%%%%%%%%%%%%%%%%%%%%%
\Section{algorithmic}
%%%%%%%%%%%%%%%%%%%%%%%%



\<algorithmic.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% algorithmic.4ht                       |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<algorithmic cfg|>
\Hinput{algorithmic}
\endinput
>>>        \AddFile{9}{algorithmic}



\<algorithmic cfg\><<<
\append:def\algorithmicthen{%
    \ConfigureEnv{ALC@if}
      {\a:ALCif}
      {\b:ALCif}
      {}{}%
}
\append:def\algorithmicelse{%
    \ConfigureEnv{ALC@if}
      {\c:ALCif}
      {\d:ALCif}
      {}{}%
}
\NewConfigure{ALCif}{4}
\pend:defI\algorithmiccomment{\a:algorithmiccomment}
\append:defI\algorithmiccomment{\b:algorithmiccomment}
\NewConfigure{algorithmiccomment}{2}
\let\ALC:item=\ALC@item
\def\ALC@item[#1]{\ALC:item[\a:ALCitem #1\b:ALCitem]}
\NewConfigure{ALCitem}{2}
>>>



%%%%%%%%%%%%%%%%%%%%%%%%
\Section{booktabs.sty}
%%%%%%%%%%%%%%%%%%%%%%%%



\<booktabs.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% booktabs.4ht                          |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\ifx \@BTfnslthree\:UnDef
   |<pre booktabs 2003|>
\else
   |<booktabs 2003|>
\fi
|<shared booktabs|>
\Hinput{booktabs}
\endinput
>>>        \AddFile{9}{booktabs}

\<booktabs 2003\><<<
\def\gobble:if#1\fi{}

\let\:tempc\toprule
\pend:def\:tempc{\o:noalign:{\ifnum0=`}\fi
   \let\cur:rule\a:toprule
   \gobble:if}
\HLet\toprule=\:tempc
\NewConfigure{toprule}{1}

\let\:tempc\midrule
\pend:def\:tempc{\o:noalign:{\ifnum0=`}\fi
   \let\cur:rule\a:midrule
   \gobble:if}
\HLet\midrule=\:tempc
\NewConfigure{midrule}{1}

\let\:tempc\bottomrule
\pend:def\:tempc{\o:noalign:{\ifnum0=`}\fi 
  \let\cur:rule\a:bottomrule
  \gobble:if}
\HLet\bottomrule=\:tempc
\NewConfigure{bottomrule}{1}
\def\@BTnormal{\hbox{\cur:rule}\futurenonspacelet\@tempa\@BTendrule}
>>>

\<pre booktabs 2003\><<<
\def\:temp{\o:noalign:{\ifnum0=`}\fi
   \let\A:midrule=\a:midrule
   \@ifnextchar[{\@midrule}{\@midrule[\lightrulewidth]}}
\HLet\midrule=\:temp
\def\:temp[#1]{\o:@midrule:[\z@\A:midrule]}
\HLet\@midrule=\:temp
\NewConfigure{midrule}{1}

\def\:temp{\o:noalign:{\ifnum0=`}\fi
    \@ifnextchar[{\@toprule}{\@toprule[\heavyrulewidth]}}   
\HLet\toprule=\:temp
\def\:temp[#1]{\o:@toprule:[\z@\a:toprule]}
\HLet\@toprule=\:temp
\NewConfigure{toprule}{1}

\def\:temp{\o:noalign:{\ifnum0=`}\fi
   \let\A:midrule=\a:bottomrule
    \@ifnextchar[{\@midrule}{\@midrule[\heavyrulewidth]}}      
\HLet\bottomrule=\:temp
\NewConfigure{bottomrule}{1}

\def\:temp{\o:noalign:{\ifnum0=`}\fi
    \@ifnextchar[{\@addspace}{\@addspace[\defaultaddspace]}}
\HLet\addlinespace=\:temp
\def\:temp[#1]{\o:@addspace:[\z@\a:addlinespace]}
\HLet\@addspace=\:temp
\NewConfigure{addlinespace}{1}
>>>

\<shared booktabs\><<<
\let\:tempc\addlinespace
\pend:def\:tempc{\o:noalign:{\ifnum0=`}\fi
    \@ifnextchar[{\@addspace}{\@addspace[\defaultaddspace]}}
\HLet\addlinespace=\:tempc
\NewConfigure{addlinespace}{1}

\def\:temp#1#2#3{\o:noalign:{\a:specialrule}}
\HLet\specialrule=\:temp
\NewConfigure{specialrule}{1}

\def\:temp{\o:noalign:{\ifnum0=`}\fi
    \@ifnextchar[{\@cmidrule}{\@cmidrule[\cmidrulewidth]}}
\HLet\cmidrule=\:temp
\NewConfigure{cmidrule}{1}  

\def\:temp{\o:noalign:{\relax}} 
\HLet\morecmidrules=\:temp
\NewConfigure{morecmidrules}{1}
>>>

\<booktabs 2003\><<< 
\def\@@@cmidrule[#1-#2]#3#4{\global\@cmidla#1\relax 
    \global\advance\@cmidla\m@ne 
    \ifnum\@cmidla>0\global\let\@gtempa\@cmidrulea\else 
    \global\let\@gtempa\@cmidruleb\fi 
    \global\@cmidlb#2\relax 
    \global\advance\@cmidlb-\@cmidla 
    \global\@thisrulewidth=#3
    \@setrulekerning{#4} 
    \ifnum\@lastruleclass=\z@\vskip \aboverulesep\fi 
    \ifnum0=`{\fi}\@gtempa 
    \o:noalign:{\ifnum0=`}\fi\futurenonspacelet\@tempa\@xcmidrule} 
\def\@cmidrulea{\multispan\@cmidla&\multispan\@cmidlb \a:cmidrule \hfill \cr} 
\def\@cmidruleb{\multispan\@cmidlb \a:cmidrule \hfill \cr} 
>>>

%%%%%%%%%%%%%%%%%%%%%
\Section{minitoc.sty}
%%%%%%%%%%%%%%%%%%%%%



\<minitoc.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% minitoc.4ht                           |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

  |<minitoc.sty|>
\Hinput{minitoc}
\endinput
>>>        \AddFile{7}{minitoc}

\<minitoc.sty\><<<
    |<minitoc.sty Configure|>
>>>

%%%%%%%%%%%%%%%%%%%5
\SubSection{Part tocs}
%%%%%%%%%%%%%%%%%%%%


\<fix minitoc\><<<
\def\parttoc@[#1]{{\mini:opt{#1}\parttoc:ttl \a:parttoc
  \csname gobble:\TocOption\endcsname{\c:parttoc
     \ptifont \ptctitle\d:parttoc}%
  \end:parttoc
  \strt:minitoc{\end:partmem,|<parttoc members|>}\b:parttoc}\par}
>>>

\<fix minitoc\><<<
\def\partlof@[#1]{{\mini:opt{#1}\partlof:ttl \a:partlof
  \csname gobble:\TocOption\endcsname{\c:partlof
     \ptifont \plftitle\d:partlof}%
  \end:parttoc
  \strt:minitoc{\end:partmem,lof}\b:partlof}\par}
>>>


\<fix minitoc\><<<
\def\partlot@[#1]{{\mini:opt{#1}\partlot:ttl \a:partlot
  \csname gobble:\TocOption\endcsname{\c:partlot
     \ptifont \plttitle\d:partlot}%
  \end:parttoc
  \strt:minitoc{\end:partmem,lot}\b:partlot}\par}
>>>





%%%%%%%%%%%%%%%%%%%5
\SubSection{Mini Tocs}
%%%%%%%%%%%%%%%%%%%%

\<fix minitoc\><<<
\def\minitoc@[#1]{{\mini:opt{#1}\minitoc:ttl \a:minitoc
  \csname gobble:\TocOption\endcsname{\c:minitoc
     \mtifont \mtctitle\d:minitoc}
  \end:minitoc
  \strt:minitoc{\end:minimem,|<minitoc members|>}\b:minitoc}\par}
>>>



\<fix minitoc\><<<
\def\minilof@[#1]{{\mini:opt{#1}\minilof:ttl \a:minilof
  \csname gobble:\TocOption\endcsname{\c:minilof
     \mtifont \mlftitle\d:minilof}
  \end:minitoc
  \strt:minitoc{\end:minimem,lof}\b:minilof}\par}
>>>


\<fix minitoc\><<<
\def\minilot@[#1]{{\mini:opt{#1}\minilot:ttl \a:minilot
  \csname gobble:\TocOption\endcsname{\c:minilot
     \mtifont \mlttitle\d:minilot}
  \end:minitoc
  \strt:minitoc{\end:minimem,lot}\b:minilot}\par}
>>>












%%%%%%%%%%%%%%%%%%%5
\SubSection{Sect tocs}
%%%%%%%%%%%%%%%%%%%%


\<fix minitoc\><<<
\ifx \stc@ssect\:UnDef \else
   |<sect toc / lof / lot|>
\fi
>>>


\<sect toc / lof / lot\><<<
\def\secttoc@[#1]{{\mini:opt{#1}\secttoc:ttl \a:secttoc
  \csname gobble:\TocOption\endcsname{\c:secttoc\stifont
      \stctitle\d:secttoc}%
  \end:secttoc 
  \strt:minitoc{\end:sectmem,|<secttoc members|>}\b:secttoc}\par}
>>>



\<sect toc / lof / lot\><<<
\def\sectlof@[#1]{{\mini:opt{#1}\sectlof:ttl \a:sectlof
  \csname gobble:\TocOption\endcsname{\c:sectlof\stifont
      \slftitle\d:sectlof}%
  \end:secttoc 
  \strt:minitoc{\end:sectmem,lof}\b:sectlof}\par}
>>>



\<sect toc / lof / lot\><<<
\def\sectlot@[#1]{{\mini:opt{#1}\sectlot:ttl \a:sectlot
  \csname gobble:\TocOption\endcsname{\c:sectlot\stifont
      \slttitle\d:sectlot}%
  \end:secttoc 
  \strt:minitoc{\end:sectmem,lot}\b:sectlot}\par}
>>>




%%%%%%%%%%%%%%%%%%%5
\SubSection{Restore Pre-Minitoc Definitions}
%%%%%%%%%%%%%%%%%%%%


\<sect toc / lof / lot\><<<
\let\no@ssect=\stc@ssect    
>>>

\<fix minitoc\><<<
\let\no@schapter=\mtc@schapter 
\let\no@spart=\ptc@spart
>>>


%%%%%%%%%%%%%%%%%%%5
\SubSection{Entries for Tables}
%%%%%%%%%%%%%%%%%%%%


\<parttoc members\><<<
chapter,appendix,%
\ifnum 1>\c@parttocdepth \else section,\fi
\ifnum 2>\c@parttocdepth \else subsection,\fi
\ifnum 3>\c@parttocdepth \else subsubsection,\fi
\ifnum 4>\c@parttocdepth \else paragraph,\fi
\ifnum 5>\c@parttocdepth \else subparagraph,\fi
UnDFexyz%
>>>

\<minitoc members\><<<
\ifnum \z@>\c@minitocdepth\else section,\fi
\ifnum 1>\c@minitocdepth \else subsection,\fi
\ifnum 2>\c@minitocdepth \else subsubsection,\fi
\ifnum 3>\c@minitocdepth \else paragraph,\fi
\ifnum 4>\c@minitocdepth \else subparagraph,\fi
UnDFexyz%
>>>


\<secttoc members\><<<
\ifnum 1>\c@secttocdepth \else subsection,\fi
\ifnum 2>\c@secttocdepth \else subsubsection,\fi
\ifnum 3>\c@secttocdepth \else paragraph,\fi
\ifnum 4>\c@secttocdepth \else subparagraph,\fi
UnDFexyz%
>>>

%%%%%%%%%%%%%%%%%%%5
\SubSection{Start and Points for Tables}
%%%%%%%%%%%%%%%%%%%%


\<fix minitoc\><<<
\def\strt:minitoc#1{%
  \par  \let\old:toc=\:doTocEntry
  \def\:doTocEntry{\HAdvance\TocCount by 1
     \ifnum \TocCount=\TitleCount  \let\doTocEntry=\old:toc\fi
     \:gobbleIV}%
  \edef\:temp{[#1]}\expandafter\:tableofcontents\:temp}
>>>

\<sect toc / lof / lot\><<<
\def\end:sectmem{\end:minimem,section,likesection,}
\def\end:secttoc{%
  \def\tocsection{\endinput\:gobbleIII}%
  \def\toclikesection{\endinput\:gobbleIII}%
  \end:minitoc
}
>>>



\<fix minitoc\><<<
\def\end:minimem{\end:partmem,chapter,likechapter,appendix}
\def\end:minitoc{%
  \def\tocchapter{\endinput\:gobbleIII}%
  \def\toclikechapter{\endinput\:gobbleIII}%
  \def\tocappendix{\endinput\:gobbleIII}%
  \end:parttoc
}
>>>



\<fix minitoc\><<<
\def\end:partmem{part,likepart}
\def\end:parttoc{%
  \def\tocpart{\endinput\:gobbleIII}%
  \def\toclikepart{\endinput\:gobbleIII}%
}
>>>


%%%%%%%%%%%%%%%%%%%5
\SubSection{Package Options}
%%%%%%%%%%%%%%%%%%%%

\Verbatim
% positioning would have been nicer here, but currently it
% is too slow


% d -default (initially l but can be changed by
% set in doparttoc), l (left), c (center), r (right),
% e, n empty/none
\EndVerbatim

\<fix minitoc\><<<
\def\mini:opt#1#2{\def\TocOption{#1}\def\:temp{d}\ifx 
  \:temp\TocOption \let\TocOption|=#2\fi}
>>>

\<fix minitoc\><<<
\let\gobble:n=\:gobble
\let\gobble:e=\:gobble
\let\gobble:d=\:gobbleIII
>>>

\<fix minitoc\><<<
\def\doparttoc@[#1]{\def\parttoc:ttl{#1}}
\def\parttoc:ttl{l}
\def\dominitoc@[#1]{\def\minitoc:ttl{#1}}
\def\minitoc:ttl{l}
>>>

\<sect toc / lof / lot\><<<
\def\dosecttoc@[#1]{\def\secttoc:ttl{#1}}
\def\secttoc:ttl{l}
>>>

\<fix minitoc\><<<
\def\dopartlot@[#1]{\def\partlot:ttl{#1}}
\def\partlot:ttl{l}
\def\dominilot@[#1]{\def\minilot:ttl{#1}}
\def\minilot:ttl{l}
\def\dosectlot@[#1]{\def\sectlot:ttl{#1}}
\def\sectlot:ttl{l}
>>>

\<fix minitoc\><<<
\def\dopartlof@[#1]{\def\partlof:ttl{#1}}
\def\partlof:ttl{l}
\def\dominilof@[#1]{\def\minilof:ttl{#1}}
\def\minilof:ttl{l}
\def\dosectlof@[#1]{\def\sectlof:ttl{#1}}
\def\sectlof:ttl{l}
>>>





%%%%%%%%%%%%%%%%%%%5
\SubSection{Html Configuration}
%%%%%%%%%%%%%%%%%%%%



\<minitoc.sty Configure\><<<
\NewConfigure{minitoc}{4}
\NewConfigure{parttoc}{4}
\NewConfigure{secttoc}{4}
\NewConfigure{minilof}{4}
\NewConfigure{partlof}{4}
\NewConfigure{sectlof}{4}
\NewConfigure{minilot}{4}
\NewConfigure{partlot}{4}
\NewConfigure{sectlot}{4}
>>>




\<minitoc.sty Configure 0.0NO\><<<
\Configure{minitoc}{}{}{}{}
\Configure{parttoc}{}{}{}{}
\Configure{secttoc}{}{}{}{}
\Configure{minilof}{}{}{}{}
\Configure{partlof}{}{}{}{}
\Configure{sectlof}{}{}{}{}
\Configure{minilot}{}{}{}{}
\Configure{partlot}{}{}{}{}
\Configure{sectlot}{}{}{}{}
>>>








%%%%%%%%%%%%%%%%
\Section{gloss}
%%%%%%%%%%%%%%%%%%

\Link[ftp://ctan.tug.org/tex-archive/macros/latex/contrib/supported/gloss/]{}{}ctan\EndLink



\Verbatim
 > latex sample
 > bibtex sample.gls
 > latex sample
 > latex sample
\EndVerbatim

\<gloss.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% gloss.4ht                             |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|<gloss body|>
|<ref gloss|>
|<label gloss|>
\Hinput{gloss}
\endinput
>>>                  \AddFile{9}{gloss}



\<ref gloss\><<<
\pend:def\glso@default{\append:def\glso@word{%
   \def\:tempc{%  
      \let\gls@refpage=\gls:refpage
      \csname gls@refpage\endcsname
      \let\gls:printtext=\gls@printtext
      \let\gls@printtext=\gls:prtxt 
   }%
   \ifx \gls@refpage\:tempc  \else
     \ifx   \gls:refpage\:UnDef   \let\gls:refpage=\gls@refpage \fi
     \let\gls@refpage=\:tempc
   \fi
}}
\def\gls:prtxt#1\fi{\a:gloss \gls:printtext#1\b:gloss\fi}
\NewConfigure{gloss}{2}
>>>


\<label gloss\><<<
\let\o:glossitem:=\glossitem
\def\glossitem#1{\gdef\GlossLabel{#1}\o:glossitem:{#1}}
\expandafter\let\csname glossitem*\endcsname\glossitem           
>>>

\<gloss body\><<<
\def\:tempc{\a:glosslist\o:glosslist:}
\HLet\glosslist=\:tempc
\append:def\endglosslist{\b:glosslist}
\renewcommand\setglosslabel[1]{%
   \def\gls@label##1##2##3{\def\gls@short{##3}%
      \c:glosslist #1\d:glosslist }}
\pend:defIII\gls@label{\c:glosslist}
\append:defIII\gls@label{\d:glosslist}
\NewConfigure{glosslist}{4}
>>>



%%%%%%%%%%%%%%%%
\Section{dsfont}
%%%%%%%%%%%%%%%%

\<dsfont.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% dsfont.4ht                            |version %
% Copyright (C) |CopyYear.2002.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{dsfont}
\endinput
>>>        \AddFile{9}{dsfont}





%%%%%%%%%%%%%%%%
\Section{afterpage}
%%%%%%%%%%%%%%%%

\<afterpage.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% afterpage.4ht                         |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\let\clearpage\AP@clearpage
\let\enddocument\AP@enddocument
\:warning{afterpage.sty not supported}
\Hinput{afterpage}
\endinput
>>>        \AddFile{9}{afterpage}








%%%%%%%%%%%%%%%%%%
\Section{euler}
%%%%%%%%%%%%%%%%%%



\<euler.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% euler.4ht                             |version %
% Copyright (C) |CopyYear.2002.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<euler configs|>
\Hinput{euler}
\endinput
>>>        \AddFile{8}{euler}


\<euler configs\><<<
\let\mathbf=\un:Def
\let\mathsf=\un:Def
\let\mathit=\un:Def
\let\mathtt=\un:Def
\AtBeginDocument{%
   \def\:tempd#1{%
      \def\:tempc{\choose:mfont {#1}}%
      \expandafter\HLet\csname @#1\endcsname\:tempc
   }
   \:tempd{mathbf}%
   \:tempd{mathsf}%
   \:tempd{mathit}%
   \:tempd{mathtt}%
}
>>>

%%%%%%%%%%%%%%%%%%
\Section{eucal}
%%%%%%%%%%%%%%%%%%



\<eucal.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% eucal.4ht                             |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{eucal}
\endinput
>>>        \AddFile{8}{eucal}



%%%%%%%%%%%%%%%%%%
\Section{longdiv}
%%%%%%%%%%%%%%%%%%









\<longdiv.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% longdiv.4ht                           |version %
% Copyright (C) |CopyYear.2002.       Eitan M. Gurari         %
|<TeX4ht copyright|>

|<longdiv.sty|>
\Hinput{longdiv}
\endinput
>>>        \AddFile{9}{longdiv}


\<longdiv.sty\><<<
\def\longdiv#1#2{{%
   \def\showdig{\edef\temp{&{\the\scratch}}\temp\cr
                &{\the\rtot}\cr}%
   \global\rtot=#1\relax
   \count0=\rtot\divide\count0by#2\edef\quotient{\the\count0}%
   \def\temp##1{\ifx##1\temp\else \noexpand\dodig ##1\expandafter\temp\fi}%
   \edef\routine{\expandafter\temp\quotient\temp}%
   \def\dodig##1{\global\multiply\gpten
     by10\relax}\global\gpten=1\relax\routine 
   \def\dodig##1{\global\divide\gpten by10\relax
      \scratch =\gpten
      \multiply\scratch  by##1\relax
      \multiply\scratch  by#2\relax
      \global\advance\rtot-\scratch \relax
      \ifnum\scratch>0 \showdig \fi
   }%
   \a:longdiv \long:div{#2}\b:longdiv
}}
\catcode`\#=13
\catcode`\@=6
\def\long:div@1{\halign{#&#\cr 
     &\quotient\cr
     @1&\the\rtot\cr
     \routine \cr 
}}
\catcode`\#=6
\catcode`\@=11

\NewConfigure{longdiv}{2}
>>>







%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Indexes}
\SubSection{index.sty}



\<index.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% index.4ht                             |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<index shared|>
\expandafter\ifx \csname @vwritefile\endcsname\relax
  |<index 4.01beta|>
\else 
  |<index 3.02|>
\fi
\Hinput{index}
\endinput
>>>        \AddFile{7}{index}





\Link[file://localhost/usr/local/teTeX/share/texmf/tex/latex/misc/index.sty]{}{}%
index.sty\EndLink


\<index 4.01beta\><<<
\pend:defII\@wrindex{\warn:idx{##1}\title:chs{\html:addr
   \hbox{\Link-{}{|<haddr prefix|>\last:haddr}\EndLink}}{}%
   \edef\:temp{\write\@auxout{%
      \string\@writefile{##1}{\string \beforeentry{\RefFileNumber
         \FileNumber}{\title:chs{|<haddr prefix|>\last:haddr}{\cur:th
         \:currentlabel}}{\a:makeindex}}}}\:temp
}
\pend:def\printindex{\def\indexname{\the\@nameuse{idxtitle@\@indextype}}}
|<index 4.1beta warning|>
>>>



\<index 4.1beta ext I\><<<
\expandafter
\expandafter\expandafter\idx:extI \csname idx@#1\endcsname//%
>>>

\<index 4.1beta ext II\><<<
\expandafter
\expandafter\expandafter\idx:extII \csname idx@#1\endcsname//%
>>>

\<index 4.1beta warning\><<<
\bgroup
   \catcode`\:=12
   \expandafter\gdef\csname idx:extI\endcsname#1:#2//{#1}
   \expandafter\gdef\csname idx:extII\endcsname#1:#2:#3//{#2}
\egroup
>>>



\<index 3.02\><<<
\pend:defII\@wrindex{\warn:idx{##1}\title:chs{\html:addr
   \hbox{\Link-{}{|<haddr prefix|>\last:haddr}\EndLink}}{}%
   \edef\:temp{\write\@auxout{%
      \string\@vwritefile{##1}{\string \beforeentry{\RefFileNumber
         \FileNumber}{\title:chs{|<haddr prefix|>\last:haddr}{\cur:th
         \:currentlabel}}{\a:makeindex}}}}\:temp
}
>>>

\<index shared\><<<
\ifx \a:makeindex\:UnDef
   \NewConfigure{makeindex}{1} \Configure{makeindex}{}
\fi
>>>


%%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{multind.sty}
%%%%%%%%%%%%%%%%%%%%%%%%%%%



\<multind.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% multind.4ht                           |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>

|<multind.sty|>
\Hinput{multind}
\endinput
>>>        \AddFile{7}{multind}





\Link[file://localhost/usr/local/teTeX/share/texmf/tex/latex/misc/multind.sty]{}{}%
multind.sty\EndLink





\<multind.sty\><<<
\pend:defII\@wrindex{\warn:idx{##1}\@ifundefined{##1@idxfile}{}{\html:addr
   \hbox{\Link-{}{|<index haddr|>}\EndLink}%
   \edef\:temp{\expandafter
      \write\csname ##1@idxfile\endcsname{\string
        \beforeentry{\RefFileNumber
        \FileNumber}{|<index haddr|>}{\a:makeindex}}}\:temp
}}
\ifx \a:makeindex\:UnDef 
   \NewConfigure{makeindex}{1} \Configure{makeindex}{}
\fi
\def\printindex#1#2{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
  {\def\indexname{#2}\@input{#1.ind}}}
>>>


\<index haddr\><<<
d|<haddr prefix|>\last:haddr
>>>





%%%%%%%%%%%%%%%%%%%%%%%%
\Section{tugboat}
%%%%%%%%%%%%%%%%%%%%%%%%



\<tugboat.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% tugboat.4ht                           |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<tugboat cfg|>
|<tugboat cmn|>
\Hinput{tugboat}
\endinput
>>>        \AddFile{9}{tugboat}


\<tugboat cfg\><<<
\let\:tempb\head
\Def:Section\head{}{#1} 
\let\:head\head
\let\head\:tempb
\def\@domainhead{\:head{\the\@argument}}
\let\:tempb\subhead
\Def:Section\subhead{}{#1} 
\let\:subhead\subhead
\let\subhead\:tempb
\def\@dosubhead{\:subhead{\the\@argument}}
\let\:tempb\subsubhead
\Def:Section\subsubhead{}{#1} 
\let\:subsubhead\subsubhead
\let\subsubhead\:tempb
\def\@dosubsubhead{\:subsubhead{\the\@argument}}
>>>


\<tugboat cfg\><<<
\let\o:figure:\figure
\def\figure{\bgroup \a:figure \o:figure:}
\append:def\endfigure{\b:figure\egroup}
\NewConfigure{figure}{2}
>>>

\<tugboat cfg\><<<
\pend:def\endverbatim{% 
   \append:def\@beforeverbinline{\a:verb}%
   \pend:def\@afterverbinline{\b:verb}%
   \append:def\@beforeverbdisplay{\a:verbatim}%
   \pend:def\@afterverbdisplay{\b:verbatim}%
   \expandafter\def\expandafter\pre:everypar\expandafter{\the\everypar}%
   \append:def\@altdisplaystyle{%  
      \expandafter\def\expandafter\:temp\expandafter{\the\everypar}%
      \ifx \:temp\pre:everypar \else
         \expandafter\everypar\expandafter{\expandafter\HtmlPar\the\everypar}%
      \fi }%
}
\pend:def\verbatim{\bgroup \Configure{obeylines}{}{}{}}
\append:def\endverbatim{\egroup}
\let\:setupverbatim\setupverbatim
\def\setupverbatim{\:setupverbatim
    \let\:ruled\empty\def\ruled{\def\:ruled{-ruled}}}
\let\:ruled\empty
\NewConfigure{verbatim}{2}
\NewConfigure{verb}{2}
>>>

\<tugboat cfg\><<<
\let\:beginlist\@beginlist
\def\@beginlist{%
    \ifx\@liststyle\@displaystyle 
       \Configure{list}
          {\csname a:display-list\endcsname}
          {\csname b:display-list\endcsname}
          {\csname c:display-list\endcsname}
          {\csname d:display-list\endcsname}%
    \else
       \Configure{list}
          {\csname a:inline-list\endcsname}
          {\csname b:inline-list\endcsname}
          {\csname c:inline-list\endcsname}
          {\csname d:inline-list\endcsname}%
    \fi
    \a:list \begingroup
    \:beginlist
    \let\:tagform=\tagform
    \def\tagform##1{\c:list\:tagform{##1}\d:list}%
      \expandafter\def\expandafter\:temp\expandafter{\the\everypar}%
      \ifx \:temp\pre:everypar \else
         \expandafter\everypar\expandafter{\expandafter\HtmlPar\the\everypar}%
      \fi 
      \def\colsep{\ignoreendline}%
     } 
\append:def\endlist{\b:list\endgroup}
\NewConfigure{list}{4}
\NewConfigure{display-list}{4}
\NewConfigure{inline-list}{4}
>>>

\<tugboat rtitle\><<<
\a:rtitle \rtitlex\qquad \midrtitle \b:rtitle
>>>

\<tugboat cfg\><<<
\NewConfigure{rtitle}{2}
\let\rtitle\empty
\let\rfoot\empty
\global\SecTitletrue 
\pend:def\article{|<tugboat rtitle|>\ifx\thetitle\relax 
  \else 
    \pend:defI\thetitle{\a:title}%
    \append:defI\thetitle{\b:title}%
  \fi
}
\NewConfigure{title}{2} 
\pend:defI\theauthor{\a:author} 
\append:defI\theauthor{{}\b:author} 
\NewConfigure{author}{2} 
\pend:defI\theaddress{\a:address} 
\append:defI\theaddress{{}\b:address} 
\NewConfigure{address}{2} 
\pend:defI\thenetaddress{\a:netaddress} 
\append:defI\thenetaddress{{}\b:netaddress} 
\NewConfigure{netaddress}{2} 
\pend:def\@defaultauthorlist{\a:authorlist\:defaultauthorlist}    
\append:def\@defaultauthorlist{\b:authorlist}    
\def\:defaultauthorlist{%
   \let\@defaultauthorlist\empty
   \count@=\authornumber 
   \loop 
   \ifnum\count@>0 
      \expandafter\pend:def\csname theauthor\number\count@\endcsname{\a:author}%
      \expandafter\append:def\csname theauthor\number\count@\endcsname{\b:author}%
      \advance\count@ by -1 
   \repeat 
  } 
\NewConfigure{authorlist}{2}
>>>

\<tugboat cmn\><<<
\append:def\makesignature{\egroup}
\pend:def\makesignature{\bgroup 
  \pend:def\@signature{%
     \expandafter\everypar\expandafter{\expandafter\HtmlPar\the\everypar}%
     \a:signature}%
  \append:def\@signature{\b:signature}%
  \let\sv:rightline\rightline
  \def\rightline{\let\rightline=\sv:rightline}%
}
\NewConfigure{signature}{2}
\pend:def\signaturemark{\a:signaturemark} 
\append:def\signaturemark{\b:signaturemark} 
\NewConfigure{signaturemark}{2}
>>>


\<tugboat cmn\><<<
\def\v@lx{\gdef\volx{Volume~\a:volno\volno\b:volno
                           ~(\a:volyr\volyr\b:volyr),
                        No.~\a:issno\issno\b:issno}} 
\NewConfigure{issno}{2}
\NewConfigure{volyr}{2}
\NewConfigure{volno}{2}
>>>

%%%%%%%%%%%%%%%%%%%%%%%%
\Section{ltugXXX.sty}
%%%%%%%%%%%%%%%%%%%%%%%%



\<ltugboat.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% ltugboat.4ht                          |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\Hinclude{\input ltugboat-a.4ht}{article}    
\endinput
>>>        \AddFile{9}{ltugboat}

\<ltugboat-a.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% ltugboat-a.4ht                        |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<ltugboat cfg|>
\Hinput{ltugboat}
\endinput
>>>        \AddFile{9}{ltugboat-a}


\<ltugboat cfg\><<<
\def\TB@nolimelabel{}
\long\def\:temp#1{{\a:textSMC \o:textSMC:{#1}\b:textSMC}} 
\HLet\textSMC|=\:temp 
\NewConfigure{textSMC}{2}
>>>

\<ltugboat cfg\><<<
\pend:defI\theauthor{\a:author}
\append:defI\theauthor{{}\b:author}
\NewConfigure{author}{2}
\pend:defI\theaddress{\a:address}
\append:defI\theaddress{{}\b:address}
\NewConfigure{address}{2}
\pend:defI\thenetaddress{\a:netaddress}
\append:defI\thenetaddress{{}\b:netaddress}
\NewConfigure{netaddress}{2}
\pend:defI\thePersonalURL{\a:PersonalURL}
\append:defI\thePersonalURL{{}\b:PersonalURL}
\NewConfigure{PersonalURL}{2}
\pend:def\signaturemark{\a:signaturemark}
\append:def\signaturemark{{}\b:signaturemark}
\NewConfigure{signaturemark}{2}
\pend:def\@makesectitle{\ifSecTitle \a:sectitle}
\append:def\@makesectitle{\b:sectitle \else\par\fi}
\NewConfigure{sectitle}{2}
>>>


\<ltugboat cfg\><<<
\long\def\:tempc[#1]{\a:makesignature\bgroup 
   \pend:def\@signature{\everypar{\HtmlPar}\a:signature}\csname 
                     o:\string\makesignature:\endcsname[#1]\egroup
   \b:makesignature}
\expandafter\HLet\csname \string\makesignature\endcsname\:tempc
\NewConfigure{makesignature}{2}
\NewConfigure{signature}{1}
>>>

\<ltugboat cfg\><<<
\def\:tempc{\a:titlex\o:rtitlex:\b:titlex} 
\HLet\rtitlex\:tempc
\NewConfigure{titlex}{2}
>>>



\<ltugproc.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% ltugproc.4ht                          |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\Hinclude{\input ltugproc-a.4ht}{article}    
\endinput
>>>        \AddFile{9}{ltugproc}


\<ltugproc-a.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% ltugproc-a.4ht                        |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<ltug proc|>
\Hinput{ltugproc}
\endinput
>>>        \AddFile{9}{ltugproc-a}





\<ltug proc\><<<
\pend:def\@maketitle{%
   \def\theauthor####1{\expandafter
      \ifx \csname theauthor####1\endcsname\relax \else
         \a:aut\csname theauthor####1\endcsname\b:aut
      \fi}%
   \if@abstract
      \expandafter\abstract@toks\expandafter{\expandafter
          \a:abstract \the\abstract@toks}%
      \expandafter\abstract@toks\expandafter{%
           \the\abstract@toks \b:abstract}%
   \fi
}
\NewConfigure{abstract}{2}
>>>

\<ltug proc\><<<
\pend:def\TITLEfont{%
   \if@abstract \aftergroup\abstract:head\fi
}
\def\abstract:head{%
   \let\tug:centerline\centerline
   \def\centerline##1{%
      \a:abstractHead \tug:centerline{##1}\b:abstractHead
      \let\centerline\centerline:tug
   }%
}
\NewConfigure{abstractHead}{2}
>>>



%%%%%%%%%%%%%%%%%%%
\Section{mls}
%%%%%%%%%%%%%%%%%%%


\<mls.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% mls.4ht                             |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<mls hooks|>
|<mlstrans hooks|>
|<mlsgalig hooks|>
|<temporary mls accents patch|>
\Hinput{mls}
\endinput
>>>        \AddFile{9}{mls}



\<temporary mls accents patch\><<<
\expandafter\HLet\csname OT1\string\"\expandafter\endcsname
     \csname n:":\endcsname
\HRestore\"
>>>


\<mls hooks\><<<
\Configure{writetoc}
   {\let\SetDocumentEncodingNeutral\relax
    \let\SetDocumentEncodingLMC\relax
    \let\SetDocumentEncodingBicig\relax
    \let\mnr\relax
    \let\mbc\relax
    \let\blr\relax
    \let\rnm\relax
   }
\renewcommand{\mbosoo}[1]{\def\:temp{#1}\ifx \:temp\empty\else
     \bosoo{{\bcg #1}}\fi}
>>>

\<mlstrans hooks\><<<
\pend:def\do@galiglist{\let\mls:sp=\  \let\ =\sp:c }
\append:def\end@galiglist{\let\ =\mls:sp}
>>>


\<mlsgalig hooks\><<<
\pend:def\do@mlsgalig{\let\mls:sp=\  \let\ =\sp:c }
\append:def\end@mlsgalig{\let\ =\mls:sp}
\pend:def\prettify@mls{\let\mls:sp=\  \let\ =\sp:c }
\append:def\prettify@mls{\let\ =\mls:sp}
>>>



%%%%%%%%%%%%%%%%%%%
\Section{rotating}
%%%%%%%%%%%%%%%%%%%


\<rotating.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% rotating.4ht                        |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<config rotating|>
\Hinput{rotating}
\endinput
>>>        \AddFile{9}{rotating}

\<config rotating\><<<
\def\@xrotfloat#1[#2]{\@float{#1}[#2]}
\def\end@rotfloat{\end@float}
\def\endsidewaysfigure{\end@float}
\def\endsidewaystable{\end@float}
>>>






%%%%%%%%%%%%%%%%%%%
\Section{boxedminipage}
%%%%%%%%%%%%%%%%%%%


\<boxedminipage.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% boxedminipage.4ht                   |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<boxedminipage configs|>
\Hinput{boxedminipage}
\endinput
>>>        \AddFile{9}{boxedminipage}


\<boxedminipage configs\><<<
\let\o:@iboxedminipage:=\@iboxedminipage
\def\@iboxedminipage[#1]{\o:@iboxedminipage:[b]}
>>>


%%%%%%%%%%%%%%%%%%%
\Section{ulem}
%%%%%%%%%%%%%%%%%%%


\<ulem.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% ulem.4ht                            |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>

|<ulem sty|>
\Hinput{ulem}
\endinput
>>>        \AddFile{9}{ulem}


\<ulem sty\><<<
\def\uline{\relax \ifmmode\expandafter\underline
   \else \a:uline \bgroup \aftergroup\b:uline \expandafter\ULset\fi}
\NewConfigure{uline}{2}
\def\uuline#1{\relax \a:uuline {#1}\b:uuline}
\NewConfigure{uuline}{2}
\def\sout#1{\relax \a:sout {#1}\b:sout}
\NewConfigure{sout}{2}
\def\xout#1{\relax \a:xout {#1}\b:xout}
\NewConfigure{xout}{2}
\def\uwave#1{\relax \a:uwave {#1}\b:uwave}
\NewConfigure{uwave}{2}
\def\:temp{\z@}
\HLet\ULthickness|=\:temp
>>>


%%%%%%%%%%%%%%%%%%%
\Section{go}
%%%%%%%%%%%%%%%%%%%


\<go.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% go.4ht                              |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>

|<go sty|>
\Hinput{go}
\endinput
>>>        \AddFile{9}{go}


\<go sty\><<<
\let\o:pos:=\pos
\def\pos#1#2=#3#4{\let\empty=\ht:empty
   \o:pos:{#1}{#2}=#3{#4}\def\empty{}}
\let\o:showdiagram:=\showdiagram
\def\showdiagram#1-#2-#3 {\a:showdiagram\let\empty=\ht:empty 
   \o:showdiagram:#1-#2-#3 \def\empty{} \b:showdiagram}
\let\o:inidiagram:=\inidiagram
\def\inidiagram#1-#2-#3 {\let\empty=\ht:empty
   \o:inidiagram:#1-#2-#3 \def\empty{}}
\NewConfigure{showdiagram}{2}
>>>

%%%%%%%%%%%%%%%%%%%
\Section{paralist}
%%%%%%%%%%%%%%%%%%%


\<paralist.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% paralist.4ht                          |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
   |<paralist hooks|>
\Hinput{paralist}
\endinput
>>>        \AddFile{9}{paralist}


\<paralist hooks\><<<
\:CheckOption{enum}\if:Option
   \HRestore\@roman
   \HRestore\@Roman
\fi
>>>

\<pifont.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% pifont.4ht                            |version %
% Copyright (C) |CopyYear.2002.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{pifont}
\endinput
>>>        \AddFile{9}{pifont}








%%%%%%%%%%%%%%%%%%%
\Section{listings}
%%%%%%%%%%%%%%%%%%%


\<listings.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% listings.4ht                          |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>

|<listings sty|>
|<lstmisc sty|>
\Hinput{listings}
\endinput
>>>        \AddFile{9}{listings}


\<listings sty\><<<
\append:defII\lst@EnterMode{%
  \pend:def\lsthk@EveryLine{\c:listings}%
  \append:def\lsthk@EveryPar{\d:listings}% 
  \a:listings\bgroup  \aftergroup\lst:EnterMode  }
\def\lst:EnterMode{\b:listings\egroup}
\NewConfigure{listings}{4}
>>>

\<listings sty\><<<
\lst@AddToHook{TextStyle}{%
   \Configure{listings}{}{}{}{}%
   \a:lstinline \bgroup \aftergroup\b:lstinline\aftergroup\egroup
  }
\NewConfigure{lstinline}{2}
>>>



\<lstmisc sty\><<<
\HLet\lst@frameInit=\empty
\HLet\lst@frameExit=\empty
>>>

 befoe env, after env, before ln, between \# and content




\<listings sty\><<<
\def\lst@NewLine{%
   \ifx\lst@OutputBox\@gobble\else \the\everypar \fi
   \global\advance\lst@newlines\m@ne
   \lst@newlinetrue
}%
\pend:defI\lst@InputListing{\a:lstinputlisting}
\append:defI\lst@InputListing{\b:lstinputlisting}
\NewConfigure{lstinputlisting}{2}
>>>



\<listings sty\><<<
\def\lst@Kern#1{% 
   \setbox\z@\hbox{{\lst@currstyle{\kern#1}}}% 
   \global\advance\lst@currlwidth \wd\z@ 
   \tmp:dim=#1 \let\:tempc=\empty
   \loop \ifdim \tmp:dim>1ex
      \advance \tmp:dim by -1ex
      \append:def\:tempc{\:nbsp}%
   \repeat
   \setbox\z@\hbox{{\lst@currstyle{\:tempc}}}%
   \lst@OutputBox\z@} 
>>>

%%%%%%%%%%%%%%%%%%%
\Section{alphanum}
%%%%%%%%%%%%%%%%%%%


\<alphanum.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% alphanum.4ht                          |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>

|<alphanum sty|>
\Hinput{alphanum}
\endinput
>>>        \AddFile{9}{alphanum}


\<alphanum sty\><<<
\append:def\J@SetCurrent{\global\let\jura:currentlabel=\@currentlabel}
\Configure{@newlabel}
   {\ifx  \jura:currentlabel\:UnDef \else
      \let\@currentlabel=\jura:currentlabel
      \global\let\jura:currentlabel=\:Undef
    \fi  }
>>>

\<alphanum sty\><<<
\renewcommand*{\ref}{%
\@ifstar{\@tempswatrue\J@ref}{\@tempswafalse\J@ref}}
\renewcommand*{\J@refX}[1]{%
   \bgroup
     \def\rEfLiNK##1##2{##2}%
     \edef\:temp{#1}%
     \def\rEfLiNK##1##2{##1}%
     \edef\:temp{\noexpand\rEfLiNK#1{\:temp}}%
     \def\rEfLiNK##1##2##3{\noexpand\rEfLiNK
         {##1}{\noexpand\J@refXX##3}}%
     \edef\:temp{\:temp}%
     \expandafter
   \egroup \:temp  }
>>>

\<alphanum sty\><<<
\renewcommand*{\J@ShortToc}[1]{\stepcounter{lvl\alph{tiefe}}\J@Number\ %
   \addcontentsline{toc}{liketoclvl\alph{tiefe}}%
   {\protect\numberline{\J@Number}#1}%
   \csname lvl\alph{tiefe}mark\endcsname{#1}\@gobblecr}
>>>


\<alphanum sty\><<<
\let\no@toclvla\toc
\let\no@toclvlb\toc
\let\no@toclvlc\toc
\let\no@toclvld\toc
\let\no@toclvle\toc
\let\no@toclvlf\toc
\let\no@toclvlg\toc
\let\no@toclvlh\toc
\let\no@toclvli\toc
\let\no@toclvlj\toc
\let\no@toclvlk\toc
\let\no@toclvll\toc
\Def:Section\toclvla{\arabic{lvla}}{#1}
\Def:Section\toclvlb{\arabic{lvlb}}{#1}
\Def:Section\toclvlc{\arabic{lvlc}}{#1}
\Def:Section\toclvld{\arabic{lvld}}{#1}
\Def:Section\toclvle{\arabic{lvle}}{#1}
\Def:Section\toclvlf{\arabic{lvlf}}{#1}
\Def:Section\toclvlg{\arabic{lvlg}}{#1}
\Def:Section\toclvlh{\arabic{lvlh}}{#1}
\Def:Section\toclvli{\arabic{lvli}}{#1}
\Def:Section\toclvlj{\arabic{lvlj}}{#1}
\Def:Section\toclvlk{\arabic{lvlk}}{#1}
\Def:Section\toclvll{\arabic{lvll}}{#1}
\let\no:toclvla\toclvla
\let\no:toclvlb\toclvlb
\let\no:toclvlc\toclvlc
\let\no:toclvld\toclvld
\let\no:toclvle\toclvle
\let\no:toclvlf\toclvlf
\let\no:toclvlg\toclvlg
\let\no:toclvlh\toclvlh
\let\no:toclvli\toclvli
\let\no:toclvlj\toclvlj
\let\no:toclvlk\toclvlk
\let\no:toclvll\toclvll
\def\toclvla{\rdef:sec{toclvla}}
\def\toclvlb{\rdef:sec{toclvlb}}
\def\toclvlc{\rdef:sec{toclvlc}}
\def\toclvld{\rdef:sec{toclvld}}
\def\toclvle{\rdef:sec{toclvle}}
\def\toclvlf{\rdef:sec{toclvlf}}
\def\toclvlg{\rdef:sec{toclvlg}}
\def\toclvlh{\rdef:sec{toclvlh}}
\def\toclvli{\rdef:sec{toclvli}}
\def\toclvlj{\rdef:sec{toclvlj}}
\def\toclvlk{\rdef:sec{toclvlk}}
\def\toclvll{\rdef:sec{toclvll}}
\def\toc{\csname toclvl\alph{tiefe}\endcsname}
>>>



\<\><<<
\let\no@toc\toc
\Def:Section\toc{\the\c@tiefe}{#1}
\let\no:toc\toc
\def\toc{\rdef:sec{toc}}
>>>

% \let\no@liketoc\J@ShortToc
% \Def:Section\liketoc{\the\c@tiefe}{#1}
% \let\no:liketoc\liketoc
% \let\liketoc\:UnDef
% \def\J@ShortToc{\rdef:sec{liketoc}}







%%%%%%%%%%%%%%%%
\Section{lineno}
%%%%%%%%%%%%%%%%

\Link[http://sunsite.sut.ac.jp/pub/archives/ctan/macros/latex/contrib/supported/lineno]{}{}lineno\EndLink

\<lineno.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% lineno.4ht                            |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\pend:defI\linelabel{\let\sv:efloat|=\end@float \HRestore\end@float  }
\append:defI\linelabel{\let\end@float|=\sv:efloat  }

\def\MakeLineNo{\@tempdima\dp\@cclv \unvbox\@cclv
   \sbox\@tempboxa{\hbox to\z@{\a:lineno\makeLineNumber\b:lineno}}%
   \stepcounter{linenumber}%
   \dp\@tempboxa=\@tempdima\ht\@tempboxa=\z@
   \nointerlineskip\kern-\@tempdima\box\@tempboxa
   \ifnum\outputpenalty=-\linenopenaltypar\else
       \@tempcnta\outputpenalty
       \advance\@tempcnta -\linenopenalty
       \penalty\@tempcnta
   \fi
   }
\NewConfigure{lineno}{2}

\Hinput{lineno}
\endinput
>>>        \AddFile{9}{lineno}







\Section{errata}


\<errata.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% errata.4ht                            |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\renewenvironment{erratalist}
  {\begin{longtable}{rp{2cm}lp{10cm}l}}
  {\endgobble\end{longtable}}

\Hinput{errata}
\endinput
>>>        \AddFile{9}{errata}









\Section{epigraph}

\Link[http://sunsite.bcc.bilkent.edu.tr/pub/tex/ctan/macros/latex/contrib/supported/epigraph/]{}{}sunsite\EndLink


\<epigraph.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% epigraph.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

|<epigraph conf|>
\Hinput{epigraph}
\endinput
>>>        \AddFile{9}{epigraph}



\<epigraph conf\><<<
\renewcommand{\epigraphhead}[2][95]{{%
  \a:epigraphhead#2\b:epigraphhead}}

\NewConfigure{epigraphhead}{2}
\NewConfigure{epirule}{1}  

\renewcommand{\epigraph}[2]{{\vspace{\beforeepigraphskip}
  \a:epigraph {#1}\ifdim\epigraphrule>\z@ \a:epirule \else \par\fi
      \b:epigraph {#2}\c:epigraph 
  \vspace{\afterepigraphskip}}}
\renewcommand{\qitem}[2]{\item 
  {\a:qitem {#1}\ifdim\epigraphrule>\z@ \a:epirule \else \par\fi
 \b:qitem  {#2}\c:qitem}}

\NewConfigure{epigraph}{3}
\NewConfigure{qitem}{3}
>>>


%%%%%%%%%%%%%%%%%%%%%
\Section{float.sty}
%%%%%%%%%%%%%%%%%%%%%



\<float.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% float.4ht                             |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<float sty|>
\ifx \floatevery\:Undef    
  |<pre 2001/11/08 v1.3d float|>
\else
  |<since 2001/11/08 v1.3d float|>
\fi
\Hinput{float}
\endinput
>>>        \AddFile{9}{float}


\<pre 2001/11/08 v1.3d float\><<<
\let\float:xfloat=\@xfloat
\def\@xfloat #1[#2]{\float:xfloat{#1}[#2]%
   \expandafter\ifx\csname end#1\endcsname\float@end
      \expandafter\def\csname end#1\endcsname{\end@float\egroup}%
   \fi
   \expandafter\ifx\csname end#1*\endcsname\float@dblend
      \expandafter\def\csname end#1*\endcsname{\end@dblfloat\egroup}%
   \fi
}
>>>


\<since 2001/11/08 v1.3d float\><<<
\let\float:xfloat=\@xfloat
\def\@xfloat #1[#2]{\float:xfloat{#1}[#2]%
   \expandafter\ifx\csname end#1\endcsname\float@end
      \expandafter\def\csname end#1\endcsname{\end@float}%
   \fi
   \expandafter\ifx\csname end#1*\endcsname\float@dblend
      \expandafter\def\csname end#1*\endcsname{\end@dblfloat}%
   \fi
}
>>>



\<float sty\><<<
\def\caption{\:CheckOption{refcaption}\if:Option 
                   \SkipRefstepAnchor \fi
\refstepcounter\@captype \@dblarg{\@caption\@captype}}
\let\:tempc\listof
\pend:defII\:tempc{\begingroup
   \expandafter\ifx \csname toc\@nameuse{ext@##1}\endcsname\relax
      \ConfigureToc{\@nameuse{ext@##1}}{\par}{ }{}{}%
   \fi
   \edef\@starttoc{\noexpand
      \:tableofcontents[\@nameuse{ext@##1}]\noexpand\:gobble}}
\append:defII\:tempc{\endgroup}
\HLet\listof\:tempc
>>>





%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{floatflt.sty}
%%%%%%%%%%%%%%%%%%%%%%%%%%



\<floatflt.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% floatflt.4ht                          |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<floatflt sty|>
\Hinput{floatflt}
\endinput
>>>        \AddFile{9}{floatflt}


\<floatflt sty\><<<
\AtBeginDocument{%
   \edef\oldeverypar{\noexpand\HtmlPar\the\everypar}}
>>>

\<floatflt sty\><<<
\def\:temp{%
   \let\:setbox=\setbox
   \def\setbox{\let\:temp=\:temp \let\setbox=\:setbox
      \def\:temp####1={\a:floatingfigure}\:temp}%
   \o:floatingfigure:}
\HLet\floatingfigure=\:temp
\def\endfloatingfigure{\egroup\b:floatingfigure\par}
\NewConfigure{floatingfigure}{2}
>>>



The following might be problematic with a caption

% \Configure{floatingfigure}
%    {\HCode{<span class="floatflt-\ifoddpages o\else e\fi
%                               \theOptionTest">}\IgnorePar}
%    {\HCode{</span>}}
% \Css{.floatflt-e0 img{float:left}}
% \Css{.floatflt-e1 img{float:left}}
% \Css{.floatflt-e2 img{float:right}}
% \Css{.floatflt-o0 img{float:left}}
% \Css{.floatflt-o1 img{float:left}}
% \Css{.floatflt-o2 img{float:right}}



\Section{fancybox.sty}


Sample
\Link[http://yoake.sys.eng.shizuoka.ac.jp/hase/pdfgal/perltex.html]{}{}sample source\EndLink



\<fancybox.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% fancybox.4ht                          |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<fancybox hooks|>
\Hinput{fancybox}
\endinput
>>>        \AddFile{7}{fancybox}

\<fancybox hooks\><<<
\def\:tempc#1#2{\begingroup #1\relax \hbox{{#2}}\endgroup}
\HLet\@ovalbox\:tempc
\HLet\doublebox|=\ovalbox
\HLet\shadowbox|=\ovalbox
\pend:defI\VerbBox{\a:VerbBox}
\append:def\end@VerbBox{\b:VerbBox}
\NewConfigure{VerbBox}{2}
\pend:def\shadowbox{\Configure{VerbBox}{\a:shadowbox}{\b:shadowbox}}
\NewConfigure{shadowbox}{2}
\pend:def\ovalbox{\Configure{VerbBox}{\a:ovalbox}{\b:ovalbox}}
\NewConfigure{ovalbox}{2}
\pend:def\Ovalbox{\Configure{VerbBox}{\a:Ovalbox}{\b:Ovalbox}}
\NewConfigure{Ovalbox}{2}
\pend:def\doublebox{\Configure{VerbBox}{\a:doublebox}{\b:doublebox}}
\NewConfigure{doublebox}{2}
>>>




%%%%%%%%%%%%%%%%%%%%%%%
\Section{alltt.sty}
%%%%%%%%%%%%%%%%%%%%%%%

\<alltt.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% alltt.4ht                             |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

   |<fix alltt|>
   |<alltt.sty shared config|>
\Hinput{alltt}
\endinput
>>>        \AddFile{7}{alltt}

\<fix alltt\><<<
\append:def\alltt{%
   \def\:tempa{\ifx\:temp\par
                   \everypar\expandafter{\expandafter\everypar
                           \expandafter{\the\ht:everypar}}\fi}%
   \futurelet\:temp\:tempa}
>>>


%%%%%%%%%%%%%%%%%%%%%%%
\Section{lb.sty}
%%%%%%%%%%%%%%%%%%%%%%%


\Verbatim

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  lb.sty, version 1.8 vom 18.07.95
%  style file fuer die reihe 'Lehrbuch'
%  copyright by International Thomson Publishing GmbH
%  autorin: luzia dietsche
%  email: x68@dante.de
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\EndVerbatim

\<lb.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% lb.4ht                                |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>
% For lb.sty, International Thomson Publishing GmbH
% \input{lb.4ht} into cfg file

\catcode`\@=11
\catcode`\:=11

\pend:defII\@makechapterhead{\bgroup \let\fbox=\hbox}
\append:defII\@makechapterhead{\egroup}

\pend:defI\@makechapterheadOhneArg{\bgroup \let\fbox=\hbox}
\append:defI\@makechapterheadOhneArg{\egroup}

\pend:defII\@makeschapterhead{\bgroup \let\fbox=\hbox}
\append:defII\@makeschapterhead{\egroup}

\pend:defI\@makeschapterheadOhneArg{\bgroup \let\fbox=\hbox}
\append:defI\@makeschapterheadOhneArg{\egroup}

\def\@makechapterheadOhneArg#1{}

\catcode`\@=12
\catcode`\:=12
\Hinput{lb}
\endinput
>>>        \AddFile{9}{lb}


%%%%%%%%%%%%%%%%%%%%%
\Section{latin1.def}
%%%%%%%%%%%%%%%%%%%%%

\<latin1.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% latin1.4ht                            |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\expandafter\let\csname ?\string\textdegree\endcsname=\:UnDef
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{\sp\circ}}}
\let\mathonesuperior=\:UnDef
\providecommand{\mathonesuperior}{{\sp1}}
\let\maththreesuperior=\:UnDef
\providecommand{\maththreesuperior}{{\sp3}}
\let\mathtwosuperior=\:Undef
\providecommand{\mathtwosuperior}{{\sp2}}

\Hinput{latin1}
\endinput
>>>        \AddFile{7}{latin1}


% \expandafter\def\csname ?\string\textdegree\endcsname{{\sp\circ}}
% \def\mathonesuperior{{\sp1}}
% \def\maththreesuperior{{\sp3}}
% \def\mathtwosuperior{{\sp2}}





%%%%%%%%%%%%%%%%%%%%%
\Section{acm-proc-article-sp.sty}
%%%%%%%%%%%%%%%%%%%%%


\Link[http://www.acm.org/sigs/pubs/proceed/template.html]{}{}files\EndLink



\<acm_proc_article-sp.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% acm_proc_article-sp.4ht               |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
   |<config acm-proc-article-sp|>
\Hinput{acm-proc-article-sp}
\endinput
>>>        \AddFile[acm_proc_article-sp]{9}{acm-proc-article-sp}


\<sig-alternate.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% sig-alternate.4ht                     |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
   \input acm_proc_article-sp.4ht  
   |<config sig-alternate|>
\Hinput{sig-alternate}
\endinput
>>>        \AddFile{9}{sig-alternate}


The above style files, and provided example, are a little weirds at points.
\List{*}
\item
+ Strange accents
\`'\affaddr{The Th{\large{\sf{\o}}}rv{$\ddot{\mbox{a}}$}ld Group}\\'
\item Empty picture in copyrightspace of acm-proc-article-sp
\item The definition \''\@ptsize{}' is improper---it should provide a number
\item
No defintion for \''\@xtitlenote'. Used in
\''\def\titlenote{\@ifnextchar[\@xtitlenote'
\item  \''\newfont' provides a tex font; not a latex font. Hence,
for instance, the braces in \''\confname{\the\conf}'  are useless (and
misleading for the human eyes). 
\item Missing \''\def\endthebibliography{\endlist}'
\item Use

\Verbatim
\def\thesubsubsection{\thesubsection.\arabic{subsubsection}}
\def\theparagraph{\thesubsubsection.\arabic{paragraph}}
\EndVerbatim

instead of

\Verbatim
\def\thesubsubsection{{\subsecfnt\thesubsection.\arabic{subsubsection}}}
\def\theparagraph{{\subsecfnt\thesubsubsection.\arabic{paragraph}}}
\EndVerbatim


We don't know where they go (in tex4ht they may arrive to attributes
of  \''<a>' elements.
\EndList



\<config sig-alternate\><<<
\def\thesubsubsection{\thesubsection.\arabic{subsubsection}}
\def\theparagraph{\thesubsubsection.\arabic{paragraph}}
\def\endthebibliography{\endlist}
>>>



\<config acm-proc-article-sp\><<<
\catcode`\:=12 
\def\@citex#1[#2]#3{%
    \let\@citea\@empty
    \csname a:cite\endcsname
    \@cite{%
        \@for\@citeb:=#3\do{%
            \@citea
            \def\@citea{#1 }%
            \edef\@citeb{\expandafter\@iden\@citeb}%
            \if@filesw
                \immediate\write\@auxout{\string\citation{\@citeb}}%
            \fi
            \@ifundefined{b@\@citeb}{%
                {\bf ?}%
                \@warning{%
                    Citation `\@citeb' on page \thepage\space undefined%
                }%
            }%
            {\cIteLink {X\@citeb}{}\csname b@\@citeb\endcsname\EndcIteLink}%
        }%
    }{#2}%
    \csname b:cite\endcsname
}
\catcode`\:=11
>>>

\<config acm-proc-article-sp\><<<
\def\qed:sym{\leavevmode\a:qed }
\def\:temp{\qed:sym \global\@qededtrue }
\HLet\qed|=\:temp
\NewConfigure{qed}{1}
\def\endfigure{\end@float}
\def\endtable{\end@float}
\def\:temp#1{\a:email{#1}}
\HLet\email=\:temp
\def\c:email:{\def\a:email##1}
\Configure{email}{\o:email:{#1}}
|<config makecaption|>
>>>


\<config acm-proc-article-sp\><<<
\def\:temp{\let\sv:item\item
   \def\item[##1]{|<no page break before item|>\let\item\sv:item
                  \item[##1]\b:newtheorem}%
   \a:newtheorem  %\AutoRefstepAnchor
   \o:@ydefthm:}
\HLet\@ydefthm\:temp
\def\:temp{\let\sv:item\item
   \def\item[##1]{|<no page break before item|>%
                  \let\item\sv:item\item[##1]\b:newtheorem}%
   \a:newtheorem  %\AutoRefstepAnchor
   \o:@begindef:}
\HLet\@begindef\:temp
\def\:temp{\let\sv:item\item
   \def\item[##1]{|<no page break before item|>%
                  \let\item\sv:item\item[##1]\b:proof}%
   \a:proof  \o:@proof:}
\HLet\@proof\:temp
\def\:temp{\let\sv:item\item
   \def\item[##1]{|<no page break before item|>%
                  \let\item\sv:item\item[##1]\b:proof}%
   \a:proof \o:@xproof:}
\HLet\@xproof\:temp
\append:def\endproof{\c:proof}
\NewConfigure{proof}{3}
>>>



\<config acm-proc-article-sp\><<<
\pend:def\@maketitle{%
  \let\thefootnote=\no:thefootnote
  \let\@makefnmark=\no:@makefnmark
  \pend:def\@title{\a:title}\append:def\@title{\b:title}%
  \edef\:temp{\the\subtitletext}%
  \ifx \:temp\empty \else
     \edef\:temp{\subtitletext={\noexpand\a:subtitle
                   \the\subtitletext\noexpand\b:subtitle}}\:temp
  \fi
  \ConfigureEnv{center}{\empty}{}{\empty}{\empty}
  \Configure{tabular}{}{}{}{}{\a:author}{\b:author}
  \ConfigureEnv{tabular}{\empty}{}{}{}%
  \ifx \@thanks\empty\else
    \pend:def\@thanks{\a:thanks}\append:def\@thanks{\b:thanks}%
  \fi
}
\NewConfigure{title}{2}
\NewConfigure{subtitle}{2}
\NewConfigure{thanks}{2}
\NewConfigure{author}{2}
\pend:def\maketitle{%
   \let\no:thefootnote=\thefootnote
   \let\no:@makefnmark=\@makefnmark
   \a:maketitle \bgroup
   |<adjust minipageNum for setcounter footnote 0|>%
}
\append:def\maketitle{\egroup \b:maketitle }
\NewConfigure{maketitle}{2}
\def\titlenote{\@ifnextchar[\@xtitlenote{%
   \global\advance\titlenotecount by 1
   \let\acm:@footnotetext=\@footnotetext
   \let\acm:thefootnote=\thefootnote
   \long\def\@footnotetext####1{%
         \let\@footnotetext=\acm:@footnotetext
         {\reset@font\footnotesize
          \@footnotetext{####1}}\let\thefootnote=\acm:thefootnote}%
   \def\thefootnote{\@fnsymbol\titlenotecount}%
   \footnote}}
\pend:def\abstract{\titlenotecount=0 }
>>>

\<config acm-proc-article-sp\><<<
\NewConfigure{toappear}{2}
\def\@copyrightspace{\ifx \@toappear\empty \else
    \a:toappear{%
      |<toappear parts|>%
      \crnotice{\@toappear}}\b:toappear
  \fi}
\NewConfigure{boilerplate}{2}
\NewConfigure{conf}{2}
\NewConfigure{confinfo}{2}
\NewConfigure{copyrightetc}{2}
>>>

\<toappear parts\><<<
\edef\:temp{\the\conf}\ifx \:temp\empty\else
  \edef\:temp{\conf={\noexpand\a:conf\the\conf\noexpand\b:conf}}\:temp
\fi
\edef\:temp{\the\confinfo}\ifx \:temp\empty\else
  \edef\:temp{\confinfo={\noexpand
      \a:confinfo\the\confinfo\noexpand\b:confinfo}}\:temp
\fi
\edef\:temp{\the\copyrightetc}\ifx \:temp\empty\else
  \edef\:temp{\copyrightetc={\noexpand
     \a:copyrightetc\the\copyrightetc\noexpand\b:copyrightetc}}\:temp
\fi
>>>




\<config acm-proc-article-sp\><<<
|<html late parts|>
|<html late sections|>
|<subsections for book / report / article|>
|<subsubsections for book / report / article|>
|<paragraphs for book / report / article|>
\let\acm:sect|=\no@sect
\def\no@sect#1#2#3{\acm:sect{#1}{#2}{#3\relax\let\@svsec|=\empty}}
>>>

%%%%%%%%%%%%%%%%%%%%%
\Section{endnotes.sty}
%%%%%%%%%%%%%%%%%%%%%



\<endnotes.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% endnotes.4ht                          |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
   |<fix endnotes|>
\Hinput{endnotes}
\endinput
>>>        \AddFile{9}{endnotes}


\<fix endnotes\><<<
\HAssign\endnote:N=0
\def\endnoteN{\endnote:N}
\def\:tempc{\addtoendnotes
   {\def\string\endnoteN{\endnote:N}}\o:@endnotetext:}
\HLet\@endnotetext=\:tempc
\def\@makeenmark{%
   \gHAdvance\endnote:N by 1
   \hbox{$\sp{\a:makeenmark\@theenmark\b:makeenmark}$}}
\NewConfigure{makeenmark}{2}
\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1.8em
     \leavevmode\llap{\hbox{$\sp{\@theenmark}$}}}
\def\:tempc{\bgroup
   \pend:def\enoteformat{\a:enoteformat}%
   \append:def\enoteformat{\b:enoteformat}%
   \a:theendnotes \o:theendnotes: \b:theendnotes \egroup}
\HLet\theendnotes=\:tempc
\NewConfigure{theendnotes}{2}
\NewConfigure{enoteformat}{2}
>>>





%%%%%%%%%%%%%%%%%
\Section{2up}
%%%%%%%%%%%%%%%%%

\<2up.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% 2up.4ht                               |version %
% Copyright (C) |CopyYear.2002.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<conf 2up|>
\Hinput{2up}
\endinput
>>>       

       \AddFile{9}{2up}

\<conf 2up\><<<
\ifx \enddocument\:UnDef \else
\pend:def\enddocument{%
   \let\twoupclearpage=\empty
   \append:def\@enddocumenthook{\clearpage \twoup@eject}%
}
\fi
>>>





%%%%%%%%%%%%%
\Section{web}
%%%%%%%%%%%%%



\<web.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% web.4ht                               |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\let\web:startsection=\@startsection
\def\@startsection{\def\@seccntformat##1{}\web:startsection}

\def\maketitle{{%
   |<adjust minipageNum for setcounter footnote 0|>%
   \a:mktl
   \pend:def\webversion{\a:webversion}%    
   \append:def\webversion{\b:webversion}%    
   \pend:def\webtitle{\a:webtitle}%
   \append:def\webtitle{\b:webtitle}%
   \pend:def\webauthor{\a:webauthor}%
   \append:def\webauthor{\b:webauthor}%
   \pend:def\webuniversity{\a:webuniversity}%
   \append:def\webuniversity{\b:webuniversity}%
   \o:maketitle: \b:mktl}}

\NewConfigure{maketitle}[2]{\def\a:mktl{#1}\def\b:mktl{#2}}
\NewConfigure{webauthor}{2}
\NewConfigure{webtitle}{2}
\NewConfigure{webuniversity}{2}
\NewConfigure{webversion}{2}
|<def HColor|>
\Hinput{web}
\endinput
>>>       \AddFile{9}{web}






\<exerquiz.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% exerquiz.4ht                          |version %
% Copyright (C) |CopyYear.1999.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\def\Rect#1{#1}
\ifx \pdf@rect\:UnDef
   \newsavebox{\pdf@box}
   \def\pdf@rect#1{\leavevmode #1}
\fi
\NewConfigure{javascript}{1}

\let\sv:tocsection|=\tocsection
\def\tocsection{\let\toclikesection|=\:gobbleIII \sv:tocsection}
\def\hypertarget#1#2{\Link{}{#1}#2\EndLink}
\def\hyperlink#1#2{\Link{#1}{}#2\EndLink}

\append:def\exercise{\Link{}{page.ex\the@exno}\EndLink }
\pend:def\endsolution{\def\thepage{ex\the@exno}}

\let\:shortquiz|=\shortquiz
\def\shortquiz{\gHAdvance\:onClick by 1
   \Link{}{page.qz\:onClick}\EndLink   \:shortquiz
   \pend:def\endsolution{\def\thepage{qz\:onClick}}}

\pend:def\include@quizsolutions{%
    \let\sv:newpage|=\newpage
    \append:def\newpage{\ht:everypar{\HtmlPar}}}
\append:def\include@solutions{%
    \let\noindent|=\sv:noindent}

|<configure answers|>
\Hinput{exerquiz}
\endinput
>>>                                   \AddFile{9}{exerquiz}



\<configure answers\><<<
\HAssign\:onClick = 0
\HAssign\Prob:N = 0
\HAssign\Quiz:N = 0

\append:def\shortquiz{\pend:def\answers{\gHAdvance\Prob:N by 1
   \let\:NAME|=\empty}}
\let\:@quiz|=\@quiz
\def\@quiz*#1#2{%
   \if #1f \let\c:quiz|=\C:quiz\fi
   \:@quiz*{#1}{#2}%
   \pend:defI\answers{\gHAdvance\Prob:N by 1
   \let\:NAME|=\empty}}

\pend:def\quiz{%
   \let\:bqlabel|=\bqlabel
   \def\bqlabel{\IgnorePar\EndP
      \Tg<form action="." class="quiz"
            id="thisform\Quiz:N">%
            \Tg<input value="\:bqlabel"  type="reset"
             onClick='\c:quiz' />}%
    \let\:eqlabel|=\eq@eqlabel
    \def\eq@eqlabel{\IgnorePar\EndP
             \Tg<input type="button" value="\:eqlabel"
             onClick='\a:javascript \d:quiz' />%
        \ifeq@nocorrections\else
           \Tg<input type="button" value="\eq@CA"
              name="correct\Quiz:N"
              onClick='\a:javascript \e:quiz' />%
        \fi
    }%
    \gHAdvance\Quiz:N by 1 \gHAssign\Prob:N=0    \ShowPar
   }
\append:def\endquiz{\let\eq@eqlabel|==\:eqlabel
   \Tg</form>\Tag{ans-\Quiz:N}{\Prob:N}}
|<configure shortquiz|>
|<configure quiz|>
|<configure quiz*|>
\LinkCommand\js:link{input,,,, /}
\LinkCommand\js:Link{input,onClick='\a:javascript \noexpand\:tempa
   href(\noexpand\:gobble,,, /}
\def\js:click#1#2#3{\ifnum #3=0
      \js:link[ type="button" value="#2"\Hnewline
                class="onClickClass"  onClick='\a:javascript #1'
                name="ans\Quiz:N y\Prob:N"
                \:NAME]{}{}%
   \else
      \def\:tempa{#1}%
      \js:Link[ );' type="button" value="#2"\Hnewline
                name="ans\Quiz:N y\Prob:N"
                class="onClickClass"  \:NAME]{\@qzsolndest}{}%
   \fi
}
>>>

\<configure shortquiz\><<<
\pend:def\shortquiz{\leavevmode
   \Tg<form action="." class="shortquiz">\IgnorePar}
\append:def\endshortquiz{\Tg</form>}{}{}
\def\Ans@i#1{\stepcounter{quizno}{
   \ifx#11
         \js:click{\b:shortquiz}{\a:shortquiz}{\ifx
                \@qzsolndest\empty 0\else 1\fi}%
   \else \js:click{\c:shortquiz}{\a:shortquiz}{0}%
   \fi
}}%
\NewConfigure{shortquiz}{3}
\pend:defII\ReturnTo{\noindent\a:ReturnTo}
\append:defII\ReturnTo{\b:ReturnTo}
\NewConfigure{ReturnTo}{2}
>>>

\<configure quiz\><<<
\def\Ans@l#1{\stepcounter{quizno}%
   \ifnum #1=1 \def\:NAME{ id="ans\Quiz:N x\Prob:N" }\fi
   \def\ANS{#1}%
   \js:click{\b:quiz}{\a:quiz}{0}}
\NewConfigure{quiz}{5}
>>>

\<configure quiz*-NOPE\><<<
\def\Ans@f#1{\stepcounter{quizno}%
   \def\ANS{#1}%
   \Tg<input type="radio"
      \ifnum #1=1 id="ans\Quiz:N x\Prob:N" \fi
      name="ans\Quiz:N y\Prob:N"
      class="onClickClass" onClick='\a:javascript \a:ANS' />}
\NewConfigure{quiz*}[1]{\def\a:ANS{#1}}
\Configure{quiz*}{}
>>>

\<configure quiz*\><<<
\def\Ans@f#1{\stepcounter{quizno}%
   \ifnum #1=1 \def\:NAME{ id="ans\Quiz:N x\Prob:N" }\fi
   \def\ANS{#1}%
   \js:click{\B:quiz}{\A:quiz}{0}}
\NewConfigure{quiz*}[3]{\def\A:quiz{#1}\def\B:quiz{#2}\def\C:quiz{#3}}
\Configure{quiz*}{}{}{}
>>>



   





 


\Section{nicefrac.sty}



\<nicefrac.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% nicefrac.4ht                          |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<config nicefrac|>
\Hinput{nicefrac}
\endinput
>>>        \AddFile{9}{nicefrac}



\<config nicefrac\><<<
\def\:tempc[#1]#2#3{\a:nicefrac#1{#2}\b:nicefrac#1{#3}\c:nicefrac}
\expandafter\HLet\csname\string\@UnitsNiceFrac\space\endcsname\:tempc
\expandafter\HLet\csname\string\@UnitsUglyFrac\space\endcsname\:tempc
\NewConfigure{nicefrac}{3}
\Configure{nicefrac}{}{/}{}
>>>






\Section{fontmath.ltx}

\<config fontmath.ltx utilities\><<<
\def\relbar{\mathrel-}
>>>

\Section{multicol.sty}

\<multicol.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% multicol.4ht                          |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\append:def\set@floatcmds{\let\end@dblfloat|=\end@float}   
\def\slocitlum#1{\let\endslocitlum|=\empty 
   \end{slocitlum}}
|<multicols config|>
\Hinput{multicol}
\endinput
>>>        \AddFile{9}{multicol}

\<multicols config\><<<
\def\multicols#1{\bgroup \par \col@number=1
     \@ifnextchar[\mult@cols{\mult@cols[]}}
\def\mult@@cols#1[#2]{\ignorespaces}
\def\endmulticols{\egroup\par }
\def\columnbreak{\a:columnbreak}
\NewConfigure{columnbreak}{1}
>>>




%-------------------------------- Baby osudeG.sty -------------

\Section{osudeG.sty}

\<recall osudeGNO\><<<<
\def\:temp{\ht:everypar={\setbox0=\lastbox\ht:everypar={}}}
\ifx \NoindentAfter\:temp    
%   \def\restore:osudeG{\let\restore:osudeG|=\:UnDef}
%   \def\:temp#1{{\accent"7D #1}}\ifx \:temp\H
%   \else      \:tmp{H}\estore:osudeG \fi
\fi
>>>

DON'T remove the equal signs from the definition
of \''\:temp' below.




\<osudeG.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% osudeG.4ht                            |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

|<osudeG.sty|>
\Hinput{osudeG}
\endinput
>>>        \AddFile{9}{osudeG}

\<osudeG.sty\><<<
   \HRestore\H
   \def\NoindentAfter{\ht:everypar|={\HtmlPar
      \setbox0|=\lastbox\ht:everypar|={\HtmlPar}}}
   \let\SOverline|=\overline \let\Overline|=\overline
>>>




%%%%%%%%%%%%%%%%%%%%%%%%
\Section{vanilla.sty}
%%%%%%%%%%%%%%%%%%%%%%%%

Old amstex.sty: 1985, 1986 BY MICHAEL SPIVAK


\<vanilla.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% vanilla.4ht                           |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

|<vanilla.sty|>
|<config amsppt + vanilla shared|>
|<config vanilla.sty utilities|>
|<config vanilla.sty shared|>
\Hinput{vanilla}
\endinput
>>>        \AddFile{7}{vanilla}



\<vanilla.sty\><<<
\expandafter\def\csname title\endcsname{\title@true
    \bgroup  \let\halign|=\TeXhalign \HRestore\noalign  \let\\|=\cr\a:title 
    \halign\bgroup\tenbf\hfill\ignorespaces##\unskip\hfill\cr}
\def\endtitle{\cr\egroup\b:title\egroup}
\expandafter\def\csname author\endcsname{\bgroup
     \let\halign|=\TeXhalign \HRestore\noalign  \let\\|=\cr\a:author
   \halign to \hsize\bgroup\smc\hfill\ignorespaces##\unskip\hfill\cr}
\def\endauthor{\cr\egroup\b:author\egroup}

\expandafter\let\csname heading\endcsname|=\empty
\expandafter\let\csname endheading\endcsname|=\empty
\NewSection\heading{}
\let\x:heading=\heading
\def\heading#1\endheading{{\let\cr|=\space \let\\|=\space
   \x:heading{#1}}}

\expandafter\let\csname subheading\endcsname|=\empty
\NewSection\subheading{}

\expandafter\def\csname proclaim\endcsname#1{\medbreak\a:proclaim
    \noindent\smc\ignorespaces  #1\unskip.\b:proclaim
    \enspace\sl\ignorespaces}
\expandafter\def\csname endproclaim\endcsname{\c:proclaim\medskip\rm}

\expandafter\def\csname demo\endcsname#1{\par \a:demo
    \noindent{\smc\ignorespaces#1\unskip\enspace}\b:demo
    \rm  \ignorespaces}
\expandafter\def\csname enddemo\endcsname{\c:demo\par}
\NewConfigure{demo}{3}

\def\footnote{\let\@sf=\empty\ifhmode\edef\@sf{\spacefactor
    =\the\spacefactor}\/\fi \futurelet\next\footnote@}
\def\footnote@{\ifx"\next\let\next\footnote@@\else
     \let\next\footnote@@@\fi\next}
\def\footnote@@"#1"#2{%
   \gHAdvance\FNnum  1 \def\:temp{#1}\ifx \:temp\empty
      \def\:temp##1[##2]##3{##1[##2]{*}}\expandafter\:temp \fi
   \HPageButton[fn\FNnum]{#1}\BeginHPage[fn\FNnum]{ }{#2}\EndHPage{}}
\HAssign\FNnum |=  0
\def\footnote@@@#1{%
    \HPageButton[nf\the\footmarkcount@]{$^{\number\footmarkcount@}$}%
    \BeginHPage[nf\the\footmarkcount@]{ }
    {{\HCode{<sup>}{\number\footmarkcount@}\HCode{</sup>}}{#1}\global
     \advance\footmarkcount@ by 1}\EndHPage{}}
>>>











\<vanilla.sty\><<<
\def\brute:halign{\let\:HAlign|=\halign   \let\:NOalign|=\noalign
  \let\halign|=\TeXhalign \HRestore\noalign     
  \let\sv:Row=\HRow  \let\sv:Col=\HCol  \def\HRow{0}}
\def\endbrute:halign#1{%
     \csname d:#1\endcsname\csname b:#1\endcsname
     \global\let\HRow|=\sv:Row  \global\let\HCol|=\sv:Col}
\def\abt:hlgn#1{\csname\ifnum \HRow=0  a\else d\fi :#1\endcsname
     \g:Advance\HRow by 1 \gdef\HCol{1}%
     \csname c:#1\endcsname\csname e:#1\endcsname\let\halign|=\:HAlign 
     \let\noalign|=\:NOalign}
\def\bbt:hlgn#1{\g:Advance \HCol by 1 \csname 
     e:#1\endcsname\let\halign|=\:HAlign
     \let\noalign|=\:NOalign}

\def\:temp{\vcenter\bgroup \brute:halign
  \vspace@\Let@\openup\jot\m@th\ialign
  \bgroup \strut\hfil\abt:hlgn{aligned}%
     $\displaystyle{##}$\f:aligned
     &\bbt:hlgn{aligned}$\displaystyle{{}##}$\f:aligned\hfil\crcr}
\HLet\aligned|=\:temp
\def\:temp{\crcr\egroup
   \endbrute:halign{aligned}\egroup}
\HLet\endaligned|=\:temp
\NewConfigure{aligned}{6}
>>>



\<vanilla.sty\><<<
\def\:temp{\vcenter\bgroup\Let@\vspace@ \brute:halign
    \normalbaselines
  \m@th\ialign\bgroup\hfil\abt:hlgn{matrix}$##$\f:matrix\hfil&&\quad\hfil
     \bbt:hlgn{matrix}$##$\f:matrix\crcr
    \mathstrut\crcr\noalign{\kern-\baselineskip}}
\HLet\matrix|=\:temp
\def\:temp{\crcr\mathstrut\crcr\egroup
    \endbrute:halign{matrix}\egroup}
\HLet\endmatrix|=\:temp
\NewConfigure{matrix}{6}
>>>

\<vanilla.sty\><<<
\def\:temp{\left\{\,\vcenter\bgroup\vspace@   \brute:halign
     \normalbaselines\openup\jot\m@th
       \Let@\ialign\bgroup\abt:hlgn{cases}$##$\f:cases
            \hfil&\quad\bbt:hlgn{cases}$##$\f:cases\hfil\crcr}
\HLet\cases|=\:temp
\def\:temp{\crcr\mathstrut\crcr\egroup
    \endbrute:halign{cases}\egroup\right.}
\HLet\endcases|=\:temp
>>>


\<vanilla.sty\><<<
\def\ralign@#1\endalign{\displ@y\Let@\tabskip\centering
    \append:def\f:align{\ifx \dn:hlgn\:UnDef \else
        \global\let\dn:hlgn=\:UnDef \endbrute:halign{align}\fi}%
    \brute:halign \halign{\abt:hlgn{align}$\displaystyle
       {##}$\f:align&\bbt:hlgn{align}$\displaystyle{{}##}$\f:align
       &\bbt:hlgn{align}\hbox{(\rm##\unskip)}\f:align\crcr
             #1\global\let\dn:hlgn|=\empty\crcr}}
\def\lalign@
 #1\endalign{\displ@y\Let@\tabskip\centering
    \append:def\f:align{\ifx \dn:hlgn\:UnDef \else
        \global\let\dn:hlgn=\:UnDef \endbrute:halign{align}\fi}%
   \brute:halign \halign{\abt:hlgn{align}$\displaystyle
       {##}$\f:align&\bbt:hlgn{align}$\displaystyle{{}##}$\f:align
   &\bbt:hlgn{align}\hbox{(\rm##\unskip)}\f:align\crcr 
   #1\global\let\dn:hlgn=|\empty\crcr}}
\NewConfigure{align}{6}
>>>




%%%%%%%%%%%%%%%%%
\Chapter{ProTex}
%%%%%%%%%%%%%%%%%




%%%%%%%%%%%%%%%%%%
\Section{ProTex}
%%%%%%%%%%%%%%%%%%




\<ProTex.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% ProTex.4ht                            |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<load protex|>
|<config protex|>
\if:latex |<latex protex|>\fi
|<program ref protex|>
\Hinput{ProTex}
\endinput
>>>        \AddFile{9}{ProTex}




\<program ref protex\><<<
\:CheckOption{prog-ref}\if:Option
   \let\oc:frag:href\frag:href 
   \def\frag:href#1#2{% 
       \expandafter \ifx \csname cw:ofile-#1\endcsname \relax 
          \oc:frag:href{#1}{#2}% 
       \else 
          \HCode {<\tag:A \:newlnch \HREF:  
             "\csname cw:ofile-#1\endcsname "#2>}% 
       \fi } 
   \let\oc:OutputCodE=\OutputCodE 
   \def\OutputCodE\<#1\>{{% 
      \Tag{ofile-)0Z:#1}{#1}% 
      \let\OutputCode=\oc:OutputCode
      \oc:OutputCodE\<#1\>}} 
   \let\oc:OutputCode=\OutputCode 
   \def\OutputCode#1\<#2\>{% 
      \def\foo##1[##2]##3//{##1.##2}% 
      \Tag{ofile-)0Z:#2}{\foo#2#1[java]//}% 
      \oc:OutputCode#1\<#2\>} 
\else
   \Log:Note{for pointers to code files from root fragments
       use the command line option 'prog-ref'}
\fi
>>>






\<load protex\><<<
\let\c:ProTex:=\:UnDef
\let\protex:sv\:RestoreCatcodes
\let\protex:sav\:CheckOption
\catcode`\:=12
   \input ProTex.sty
   \expandafter\expandafter\expandafter\AlProTex
   \expandafter\expandafter\expandafter{\csname a:ProTex\endcsname}
\catcode`\:=11
\let\:RestoreCatcodes\protex:sv
\let\:CheckOption\protex:sav
\def\:CheckProtexOption#1{
  \let\protex:sv=\Preamble
  \let\Preamble=\a:ProTex
  \:CheckOption{#1}
  \let\Preamble=\protex:sv
}
>>>   

\<config protex\><<<
\:CheckProtexOption{[[]]}\if:Option
    \NewConfigure{FrameCode}[2]{%
       \def\a:FrameCode{#1}\def\b:FrameCode{#2}%
       \def\:FrameCode##1{\ifvmode\vfill\break\fi 
          \vtop{\a:FrameCode ##1\b:FrameCode}}}
\fi
>>>


\<config protex\><<<
\let\tivt:ModifyAppendCode=\ModifyAppendCode
\def\ModifyAppendCode#1{%
   \tivt:ModifyAppendCode{#1}\a:ModifyAppendCode}
\NewConfigure{ModifyAppendCode}[1]{%
   \concat:config\a:ModifyAppendCode{#1}}
\Configure{ModifyAppendCode}{}
>>>

\<config protex\><<<
\let\tivt:ModifyOutputCode=\ModifyOutputCode
\def\ModifyOutputCode#1{\tivt:ModifyOutputCode{#1}%
   \pend:def\ProTexMssg{\Configure{Needs}{File: \:FileName}\Needs{}}%
   \a:ModifyOutputCode
}
\NewConfigure{ModifyOutputCode}[1]{%
   \concat:config\a:ModifyOutputCode{#1}}
\Configure{ModifyOutputCode}{}
>>>

\<config protex\><<<
\let\tivt:ModifyShowCode=\ModifyShowCode
\def\ModifyShowCode#1{\tivt:ModifyShowCode{#1}\a:ModifyShowCode}
\NewConfigure{ModifyShowCode}[1]{%
   \concat:config\a:ModifyShowCode{#1}}
\Configure{ModifyShowCode}{}
>>>

\<latex protex\><<<
\AtBeginDocument{\let\la:ref=\ref}
\Configure{ModifyAppendCode}
     {\let\ref\relax}
\Configure{ModifyShowCode}
     {\let\ref\prtx:ref}
\catcode`\(=1
\catcode`\)=2
\catcode`\{=12
\catcode`\}=12
\def\prtx:ref#1{#2}(\la:ref(#2))
\catcode`\(=12
\catcode`\)=12
\catcode`\{=1
\catcode`\}=2
>>>

\<config protex\><<<
\def\frnt:ttl#1{{\parindent=0pt \htmlprotex:par
      {\expandafter\ifx \csname ListCounter\endcsname\relax
         \else  \:removeindentfalse \fi   \leavevmode}%
      \PortTitle{#1}\:AppendSign}\a:protex
    }
>>>

%%%%%%%%%%%%%%%%%
\Chapter{HT4 STY}
%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%
\Section{Outline}
%%%%%%%%%%%%%%%%%





\<th4.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% th4.4ht                               |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\ifHtml
   \:CheckOption{javascript}
      \if:Option  \else\:CheckOption{th4}\fi
   \if:Option 
      |<javascript|>
   \else
      \Log:Note{for javascript support, 
          use the command line option `javascript'}
   \fi
   \:CheckOption{java}
       \if:Option  \else\:CheckOption{th4}\fi
   \if:Option 
      |<java|>
   \else
      \Log:Note{for java support, 
          use the command line option `java'}
   \fi
   \:CheckOption{image-maps}
      \if:Option  \else\:CheckOption{th4}\fi
   \if:Option 
      |<image maps|>
   \else
      \Log:Note{for image maps support, 
          use the command line option `image-maps'}
   \fi
   \:CheckOption{frames-}
      \if:Option  \else\:CheckOption{frames}\fi
      \if:Option  \else\:CheckOption{th4}\fi
   \if:Option 
      |<frames|>
      \Log:Note{for frames support, 
          use the command line option `frames-' or `frames'}
   \fi
   \:CheckOption{ShowFont}
      \if:Option  \else\:CheckOption{th4}\fi
   \if:Option 
      |<show font|>
   \fi
\fi
\:CheckOption{th4}\if:Option 
   \edef\:temp{\meaning\everypar}
   \edef\:tempa{\string\everypar}
   \ifx \:temp\:tempa
      \let\ht:everypar|=\everypar
   \fi
   |<inline verbatim|>
   |<general tex-sty configure utilities|>
   |<TeX4ht divs|>
   |<TeX4ht lists|>
   \def\Verbatim{\par\V:rbatim}
   \def\c:Verbatim:{\Configure{HVerbatim}}
   \expandafter\def\csname c:Verbatim+:\endcsname
      {\Configure{HVerbatim+}}
   \if:latex \else
      |<TeX4ht tocs|>
      \ifHtml |<html TeX4ht tocs|>
   \fi\fi
   \ifHtml
      |<tex-sty configure utilities|>
      |<tex-sty shared Configure|>
      |<html TeX4ht divs|>
      |<html TeX4ht lists|>
      |<html sty of TeX4ht|>
      |<HTable|> 
      |<postscript draw|>
      |<draw sty|>
      |<th4 indexes|>
%      \expand:after{\Hinput{th4}}
   \else
      |<non-html TeX4ht lists|>
      |<non-html sty of TeX4ht|>
      |<elements for lists|>
      |<non-html lists|>  
      |<non-html sty Verbatim|>  
      |<non-html blocks for divs|> 
      |<non-html tex divs|>    
      |<non-html tex settabs|>
      |<non-html tex env|>
      |<non-html tex-only env|>
      |<non-html inline verbatim|>
   \fi
\fi
\ifHtml        \expand:after{\Hinput{th4}}\fi
\endinput
>>>        \AddFile{9}{th4}

%           \AddFile{9}{th4-frames}












\SubSection{ShowFont}




\<show font\><<<
\:CheckOption{ShowFont}     \if:Option 
   |<HObey for ShowFont|>
   \def\ShowFont#1{{\ifx \sevenrm\Undef \let\sevenrm|=\rm\fi
      \Picture*{ \a:@Picture{ShowFont}}\begingroup   \HObey
         % Variants of Knuth's macros
         \postdisplaypenalty=-10000 \global\tmp:cnt=0 #1
         \tabskip0.06\hsize  |<definitions for ShowFont|>%
         \halign to\hsize\bgroup  |<halign for ShowFont|>%
         \egroup
      \EndHObey  \endgroup  \EndPicture}}
   |<showfont + unicode|>
\fi
>>>

\<showfont + unicode\><<<
\csname newread\endcsname\in:strm
\def\Uii:{\expandafter\Uii:o\in:buf xxxxxxxxx;}
\def\Uii:o#1x#2#3#4xxxx;{#2#3}
\catcode`\@=6
\catcode`\#=12
\def\Uiv:{\expandafter\Uiv:o\in:buf '&#xxxxxxxxx;}
\def\Uiv:o@1'&#x@2@3@4@5@6xxxx;{@2@3@4@5}
\catcode`\@=11
\catcode`\#=6

\def\:gobbleM#1->{}
\def\Uni:symbols{\ifnum \char:n<256
  \HCode{\Hnewline<tr><td>}\char:n{}\HCode{</td>}
  \bgroup \catcode`\#=12 \catcode`\\=12 
      \catcode`\%=12 \catcode`\{=12 \catcode`\}=12
      \catcode`\_=12 \catcode`\^=12 \catcode`\~=12
%     \ifeof\in:strm \else
        \read\in:strm to\in:buf
        \ifeof\in:strm  \gHAssign\char:n=256 \else
           \def\:temp{\par}
           \ifx\in:buf\:temp\else
              \edef\:tempa{\Uiv:}\def\:temp{xxxx}
              \ifx \:temp\:tempa \let\:tempa=\:gobble
              \else              \let\:tempa=\empty\fi
             \HCode{<td>}
              \:tempa{\Picture{http://charts.unicode.org/Unicode.charts%
                                    /Small.Glyphs/\Uii:/U\Uiv:.gif}}           
                    \HCode{</td><td>}
              \:tempa{\Picture{http://www.w3.org/TR/PR-math/chap6/glyphs/%
                                    \Uii:/U\Uiv:.gif}}           
              \HCode{</td><td>}{\font:nm\char\char:n}
              \HCode{</td><td>}{\font:nm \Picture+{}\char
                                 \char:n\EndPicture}
              \HCode{</td><td class="htf">}\:tempa\Uiv:
                 \:tempa\:gobble{\tt\expandafter\:gobbleM\meaning\in:buf}
              \HCode{</td>}
     \fi\fi%\fi
   \egroup
   \HCode{</tr>}
   \HAdvance\char:n by 1 \expandafter\Uni:symbols\fi} 
\def\ShowFontU#1#2{%
   \font\font:nm=#2
   \openin\in:strm=#1\relax 
   \ifeof\in:strm  \immediate\write16{.........can't  open #1}\else
     \read\in:strm to\in:buf\relax
     \HAssign\char:n=0 \HCode{<table class="unicodes" border="1"><tr>
        <td>char<br\xml:empty>number</td>
        <td>unicode<br\xml:empty>org</td>
        <td>ams<br\xml:empty>org</td>
        <td>htf +<br\xml:empty>browser</td>
        <td>actual<br\xml:empty>(la)tex<br\xml:empty>symbol</td>
        <td>htf<br\xml:empty>entry</td>
        </tr>}
        \Uni:symbols
     \HCode{</table>}
     \Css{.unicodes{border:solid 1px;}}
     \Css{.unicodes td{text-align:center;}}
     \Css{.unicodes td.htf{text-align:left;}}
   \fi
   \closein\in:strm}      
>>>


\<definitions for ShowFont\><<<
\def\:{\setbox0=\hbox{\char\tmp:cnt}%
  \ifdim\ht0>7.5pt\reposition
  \else\ifdim\dp0>2.5pt\reposition\fi\fi
  \box0\global\advance\tmp:cnt by1 }%
>>>

\<definitions for ShowFont\><<<
\def\cr:line{\cr  \noalign{\nointerlineskip}
  \multispan{17}\hrulefill&
  \cr \noalign{\nointerlineskip}}%
\def\reposition{\setbox0=\hbox{$\vcenter{\kern2pt\box0\kern2pt}$}}%
\def\chartLine##1{\hbox to 13.8pt{\hfil\sevenrm ##1 }}%
>>>

\<definitions for ShowFont\><<<
\HAssign\:tempc|=0
\def\:tempd{\chartLine\:tempc
   \vrule   &\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\cr:line
   \noalign{\nointerlineskip}%
   \gHAdvance\:tempc by 8 \ifnum \:tempc<256  \expandafter\:tempd \fi}%
>>>

\<halign for ShowFont\><<<
|<chartstrut|>##\tabskip\z@ plus10pt& &\hfil##\hfil&\vrule##\cr
\lower6.5pt\null
\chartLine{}\vrule   &\sevenrm 0&&\sevenrm 1&&\sevenrm
   2&&\sevenrm 3&&\sevenrm 4&&\sevenrm 5&&\sevenrm 6&&\sevenrm 7&\cr:line
\:tempd \cr
>>>

\<chartstrut\><<<
\lower4.5pt\vbox to14pt{}%
>>>


\<HObey for ShowFont\><<<
\def\HObey{\SaveEverypar \par \ht:everypar{}%
   {\parindent|=\z@ \leftskip|=\z@ \leavevmode   
    \HCode{ <table \Hnewline \:zbsp{HObey}
          width="100\%"><tr class="HObey"><td\Hnewline 
      class="HObey"><pre class="HObey">}\par}}
\def\EndHObey{\HCode{</pre>}\IgnoreIndent 
    \end:TTT \RecallEverypar}
>>>



%%%%%%%%%%%%%%%%%%%%
\SubSection{showfonts}
%%%%%%%%%%%%%%%%%%%%

\<showfonts.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% showfonts.4ht                         |version %
% Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
|<TeX4ht copyright|>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% Compile this style file and check the log file for
% instructions on how to use it.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
   \newcount\i
   \def\cont{\ifnum \i<256 \expandafter\next \fi }
   \def\showfonts{\vfill\break
      \def\row{\tt \the\i}\let\ttl=\empty \i=0
      \addcol}
   \def\addcol#1{\if !#1!%
        \def\next{\row  \cr \global\advance\i by 1 \cont }
       \i=0  \ifx \HCode\UnDef \expandafter\halign
             \else \expandafter\TeXhalign \fi 
             {&##\quad\cr\ttl\cr\cont  \cr}
       \par \hrule\par
     \else
       \edef\ttl{\ttl&#1}%
       \expandafter\font \csname x\the\i\endcsname=#1
       \expandafter\let\csname row\the\i\endcsname=\row
       \edef\row{%
         \expandafter\noexpand\csname row\the\i\endcsname
         &   \csname x\the\i\endcsname \char\i}
       \advance\i by 1 \expandafter\addcol
     \fi
   }
\ifx \section\undefined
   \immediate\write16{-----------------------------------------------}
   \immediate\write16{|| This style file provides the command}
   \immediate\write16{||      \noexpand\showfonts {font1} ... {fontN} {}}
   \immediate\write16{|| for exhibiting fonts.}
   \immediate\write16{|| }
   \immediate\write16{|| Example:}
   \immediate\write16{|| \noexpand\documentclass{article}}
   \immediate\write16{||    \noexpand\input showfonts.4ht}
   \immediate\write16{|| \noexpand\begin{document}}
   \immediate\write16{||    \noexpand\showfonts {cmr10}{cmtt10} {}}
   \immediate\write16{|| \noexpand\end{document}}
   \immediate\write16{-----------------------------------------------}
   \def\next{%
     \csname bye\endcsname
     \documentclass {article}
     \begin {document}
     \end {document}
   }
   \expandafter\next
\fi   
>>>







%%%%%%%%%%%%%%%%%%
\Section{Frames}
%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%
\SubSection{Frames}
%%%%%%%%%%%%%%%%%%%%

\<frames\><<<
\def\HorFrames{\def\:tempa{cols}\:Frames}
\def\VerFrames{\def\:tempa{rows}\:Frames}
\Odef\:Frames[#1]#2{%
   \PushStack\Frm:Stc{</frameset>}%
   \HCode{<frameset\Hnewline \:tempa="#2" #1>}}
\def\NoFrames{%
   \PopStack\Frm:Stc\:temp
   \PushStack\Frm:Stc{</body></noframes></frameset>}
   \HCode{<noframes><body>}}
\def\EndFrames{\PopStack\Frm:Stc\:tempc \HCode{\:tempc}}
\Odef\Frame[#1]#2{{\def\HREF:{ src=}\def\tag:A{frame}%
                   \def\empty:lnk{ /}\Link[#1]{#2}{}}}
>>>


Frames may be external or embedded. The embeded don't need alternative
for browsers that don't recognize them.

\<framesNO\><<<
\def\p:Frames{\csname |<live|>\file:id\endcsname 
   \xdef:cs{|<live|>\file:id}{|<noframes noexpand|>|</HCode NOFRAMES|>}%
   \let\:Frames|=\sb:Frames  \sb:Frames  }
\let\:Frames|=\p:Frames
\Odef\sb:Frames[#1]#2{\HCode{<frameset\Hnewline \:tempa="#2" #1>}}
>>>

FrameSet can get the onLoad attribute.

\<initiate frames\><<<
\let\:Frames|=\p:Frames
>>>



The \''\noexpand' below is for getting the same definition
as \`'\def\:temp{|</HCode NOFRAMES|>}' above.

\<noframes noexpand\><<<
\noexpand >>>




\</HCode NOFRAMES\><<<
\HCode{<noframes>}%
>>>

\<framesNO\><<<
\def\end:frames{\b:BODY\noexpand\HCode{\expandafter
   \ifx \csname |<live|>\file:id\endcsname\:temp
         </noframes></frameset>
   \fi}\b:HTML}
>>>



\SubSection{Image Maps}







A broweser that recognizes image maps ignores \`'<A>' tags on images
that point to maps.

\SubSection{In General}

\<image maps\><<<
\Odef\Ar:a[#1]#2{{\def\tag:A{area}\Link[#1 ]{#2}{}\EndLink}}
>>>>


\<NewHaddr fix\><<<
\def\:temp##1-{##1-imap}%
\edef\:tempA{\expandafter\:temp\:tempA}%
>>>


\<image maps\><<<
\Odef\Map[#1]#2#3{%
   \def\:tempd{\Map:[#1]{#2}{#3}}%
   \rm:attr{#1}\ifx \:tempB\empty  |<IMG from /Map|>\fi  \:tempd}

\def\in:mp#1=#2=#3==#4|<par del|>#5{\IMG:LINK{#1}{#4#5}{#2}{#3}}
\def\rm:attr#1{\edef\:tempB{\noexpand\rm:atr#1 |<par del|>}\:tempB}
\def\rm:atr#1 #2|<par del|>{\def\:tempB{#1}}

\Odef\Map:[#1]#2#3{%
   \NewHaddr\:tempA    |<NewHaddr fix|>%
   \NewHaddr\alt:map  
   |<IMG from /Map.../EndMap|>%
   \HCode{<map\Hnewline name="\GetHname\:tempA" id="imap-\:tempA">}%
   \def\EndMap{%
      \HPage[\alt:map]{}{\let\set:mp|=\st:mp \:Map}\EndHPage{}%
      \HCode{</map>}%
      \let\u:map|=\empty}}

\let\set:mp|=\relax
\def\st:mp#1#2#3{\def\:temp{#1#2}\ifx \:temp\empty  \else
      [\Link[#1]{#2}{}#3\EndLink]
   \fi }
>>>


\<IMG from /Map.../EndMap\><<<
\def\:temp{#3}\ifx \:temp\:empty\else 
   \rm:attr{#1}%
   \Tag{|<auto tag|>|<map tag|>#3}{\alt:map=\:tempA=#2==\:tempB}\fi
\edef\:tempB{\noexpand\IMG:LINK{\noexpand\alt:map}{#1}}\:tempB
   \:tempA{#2}\let\:Map|=\empty
>>>


\<IMG from /Map\><<<
\expand:after{\let\:tempc|=}\csname
                   cw:|<auto tag|>|<map tag|>#2\endcsname
\ifx\:tempc\relax\else
   \edef\:tempd{\noexpand\in:mp\:tempc|<par del|>{#1}}%
   \def\:temp{#3}\ifx \:temp\empty\else 
      \Tag{|<auto tag|>|<map tag|>#3}{\:tempc}%
\fi \fi 
>>>


\<image maps\><<<
\def\IMG:LINK#1#2#3#4{\Link[\RefFile{#1}]{}{}%
   {\def\tag:A{img}\def\HREF:{src=}\def\empty:lnk{/}%
    \Link[#2 alt="textual map"  usemap="\GetHref#3"]{#4}{}}\EndLink}
>>>




\<auto tag\><<<
)>>>


%\SubSection{Shapes}

\<image maps\><<<
\def\RectArea(#1){\bgroup\def\:tempa{\M:nMx#1,}\def\:tempb{rect}\Are:}
\def\CircleArea(#1){\bgroup\def\:tempa{#1}\def\:tempb{circle}\Are:}
\def\PolyArea(#1){\bgroup\def\:tempa{#1}\def\:tempb{poly}\Are:}
\def\M:nMx#1,#2,#3,#4,{\M:n{#1}{#3},%
                       \M:n{#2}{#4},\M:x{#1}{#3},\M:x{#2}{#4}}
>>>

\<image maps\><<<
\Odef\Are:[#1]#2#3{%
   \xdef\:Map{\:Map\set:mp{#1}{#2}{#3}}%
   \Ar:a[#1\Hnewline shape="\:tempb"\Hnewline
         coords="\:tempa"\Hnewline alt="#3"]{#2}\egroup}
>>>



\SubSection{For /Draw}




%\SubSection{Making the request}

\<image maps\><<<
\def\M:n#1#2{\ifnum #1<#2 #1\else #2\fi}
\def\M:x#1#2{\ifnum #1<#2 #2\else #1\fi}
>>>





\SubSection{JavaScript}




The following provide for
\`'\javascript{...}' and \`'\JavaScript ...\EndJavascript'
Commands.


\<javascript\><<<
\ScriptCommand{\JavaScript}{\vbox\bgroup \linepenalty|=1000 \NoFonts
  \Configure{HVerbatim+}{\z@}{\nobreak\space}%
  \A:JavaScript }{\B:JavaScript \EndNoFonts
  \ht:special{t4ht@(}\egroup  \ht:special{t4ht@)}}
\NewConfigure{JavaScript}[2]{\def\A:JavaScript{\ht:everypar{}#1}%
   \def\B:JavaScript{#2}}
>>>


\<javascript\><<<
\def\javascript#1{\b:jv#1\e:jv}
\def\b:jv{\begingroup \vrb:tt   
   \leftskip|=\z@  \parindent|=\z@
   \Configure{HVerbatim}{}{}{}{}\Configure{HVerbatim+}{\z@}{ }%
   \NoFonts \A:JavaScript \ht:special{t4ht@@}}
\def\e:jv{\ht:special{t4ht@@}%
   \B:JavaScript\EndNoFonts\endgroup}
>>>




The typewriter font is needed to prevent \TeX{} from performing ?gator (e.g., fi into one character).

\<java\><<<
\Odef\Applet[#1]#2{\Appl:[#1]#2,,,|<par del|>}
\def\Appl:[#1]#2,#3,#4,#5|<par del|>{%
  \def\:temp{#3}\def\LastApplet{#4}%
  \HCode{<applet code="#2.class" 
    \ifx \:temp\empty \else width="#3" \fi
    \ifx \LastApplet\empty \else HEIGHT="#4" \fi #1\Hnewline >}%
  \xdef\LastApplet{#2}\Applet:Needs{#2}}
\def\EndApplet{\HCode{</applet>}}

\def\AppletInfo{\def\Applet:Needs##1}
\AppletInfo{\Needs-{needs #1.class}}
>>>




\SubSection{?}


\<non-html sty Verbatim\><<<
\def\Verb:sp{\phantom{x}}
\let\Verb:boln|=\empty
\let\Verb:eoln|=\empty
\Configure{VerbatimEnv}
   {\medskip \parskip|=0pt}
   {\smallskip }
\let\vrb:tt|=\tt
>>>

%\SubSection{In Line Verbatim}

\<inline verbatim\><<<
|<common inline verbatim|>
\ifHtml  |<html inline verbatim|>
\fi
>>>


\<common inline verbatim\><<<
\def\Verb{\bgroup  \no:catcodes0{255}{12}\catcode`\ = 10
   \catcode`\^^M = 10 \catcode`\^^I = 10  \leavevmode \:ctgs}
>>>


\<html inline verbatim\><<<
\def\:ctgs#1{\def\:eat##1#1{{\vrb:tt 
   ##1}\egroup}\:eat }
>>>



\Section{Indexes}


\<th4 indexes\><<<
\:CheckOption{index} \if:Option
   |<indexes|>                                             
\fi
>>>




An entry takes the form \`'\--#1/#2/#3/'.  The first parameter \`'#1'
is the major entry, the second parameter \`'#2' is the secodary entry,
and the third parameter \`'#3' is a range entry (empty, the character
\`'<', or the character \`'>').

The current approach is a variant of the definition in section 17.8 of
Writing with TeX. It uses a direct approach in which the full entries
and subentries are recorded at each location, and so eliminating the
need for the \''<tag>'. It also eliminates the format entry, but one
can  always merge this entry into the range entry by employing an
appropriate encoding scheme.



\<indexes\><<<
\let\mi:nus=\-
\def\-{\futurelet\:temp\:idxentry}
\def\:idxentry{\ifx \:temp- \expandafter\:addidx
   \else\expandafter\mi:nus\fi}
\def\:addidx-#1/#2/#3/{{\def\:ii{#2}%
   |<html index target|>%
   \ifx\:ii\empty 
      \edef\:temp{\write\:idx{\string\--{#1}{ }{#3}%
        {|<html index source|>}\relax}}%
   \else 
      \edef\:temp{\write\:idx{\string\--{#1}{#2}{#3}%
        {|<html index source|>}\relax}}%
   \fi  \:temp}}
>>>



The relax at the end of each line is a `comment' for eliminating the
spaces at the end of the lines.

\<indexes\><<<
\csname newwrite\endcsname\:idx
\openout\:idx=\jobname.idx
>>>

\SubSection{Listing}

Entries are collected into \`'\jobname.idx', processed externally, and
loaded from \`'\jobnmae.xdi'.  We load an index with a command of the
form \`'\Index'

\<indexes\><<<
\def\Index{%
  \def\--{\IndexEntry}%
  \openin15=\jobname.xdi
  \ifeof15      \write\:idx{ \pageno=\the\pageno}
  \else 
     {\a:index \input \jobname.xdi \b:index }
  \fi}
>>>

\<indexes\><<<
\def\IndexEntry#1#2#3#4{%
   \gdef\:temp{#1}\let\:tempa|=\empty
   \ifx \:temp\prev:A  \gdef\:temp{#2}\ifx \:temp\prev:B
      \let\:tempa|=\relax
   \fi\fi
   \ifx \:tempa\relax ,\else
      \gdef\:temp{#1}\ifx \:temp\prev:A \else  \c:index #1\d:index\fi
      \def\:temp{#2}\ifx \:temp\space 
      \else   \hfill\break    \e:index#2\f:index\fi
   \fi
   \g:index #4\h:index
   \gdef\prev:A{#1}\gdef\prev:B{#2}%
}
\NewConfigure{index}{8}
>>>

\SubSection{Fonts}



 The fonts \`'\indextt', \`'\indexrm' are used in indexes, and they
are introduced with the command \''\IndexFonts'.


\<indexes\><<<
\ifx  \IndexFonts\:UnDef
   \def\IndexFonts{%
     \setbox\strutbox=\hbox{\vrule height8.0pt depth3.0pt width0pt}
     \font\ninerm=cmr9  \font\ninebf=cmbx9   \font\ninesl=cmsl9
     \font\nineit=cmti9 \font\ninett=cmtt9   \font\ninei =cmmi9
     \font\ninesy=cmsy9 \font\nineex=cmex10
     \textfont0=\ninerm \textfont1=\ninei    \textfont2=\ninesy
     \textfont3=\nineex \scriptfont3=\nineex \scriptscriptfont3=\nineex
     \textfont\bffam=\ninebf  \textfont\slfam=\ninesl
     \textfont\itfam=\ninei   \textfont\ttfam=\ninett
     \def\rm{\fam=0     \ninerm}%
     \def\bf{\fam=\bffam\ninebf}%
     \def\sl{\fam=\slfam\ninesl}%
     \def\it{\fam=\itfam\nineit}%
     \def\tt{\fam=\ttfam\ninett}%         
     \def\cal{\fam=2}%
     \def\mit{\fam=1}%
     \skewchar\ninei   =127    \skewchar\ninesy   =46    \rm
     \baselineskip=11pt       }
\fi
>>>


\SubSection{Hypertext Tags}


\<html index target\><<<
\csname a:--\endcsname
>>>


\<html index source\><<<
\csname b:--\endcsname
>>>


\<indexes\><<<
\NewConfigure{--}{2}
\Configure{--}
  {\html:addr \Link-{}{|<idx htag|>\last:haddr}\EndLink}
  {\string\csname\space :gobble\string\endcsname{\html:lbl}%
    \string\Link[\FileName]{|<idx htag|>\last:haddr}{}\folio
    \string\EndLink 
  }
>>>


The \`'\string\csname :gobble\string\endcsname{\html:lbl}%' is for 
preserving source-ordering when identical key are present. We can't 
put \''\:gobble' explicitly because `:' is loaded with cat code 12.

\<idx htag\><<<
index>>>




\Section{Not html to be connected}


\<non-html blocks for divs\><<<
\def\:StartSec#1#2#3{%
   |<BeforeEvery hook|>%
   \expandafter\ifx \csname a:#1\endcsname\relax  \else
      \csname a:#1\endcsname{#3}%
   \fi
   \:Ttle{#1}{#2}{\csname #1:ttl\endcsname{#3}}%
   \expandafter\ifx \csname b:#1\endcsname\relax  \else
      \csname b:#1\endcsname{#3}%
   \fi
   |<Every hook|>%
}
\let\html:addr|=\empty
\let\protect:wrtoc|=\empty
\let\html:tocsec |=\empty
\let\html:sectoc|=\empty
>>>



\<not-html blocks for divs\><<<
\def\html:sectoc#1{|<typeset the not-html sec title|>}
\def\html:tocsec#1{#1}
>>>



\<typeset the not-html sec title\><<<
\csname InsertTitle\endcsname{#1}%
>>>



\<not-html blocks for divs\><<<
\expandafter\let\csname c:TocAt*:\endcsname|=\:gobbleII
\let\c:TocAt:|=\:gobbleII
\let\a:dTocAt|=\empty
\let\b:dTocAt|=\empty
\let\a:TocAt|=\empty
\let\b:TocAt|=\empty
>>>


   |<not-html local env|> 
     |<not-html TeX4ht local env|>    

\<not-html TeX4ht local env\><<<
\let\begin:Verb|=\empty
\let\Verb:boln|=\empty
\let\end:Verb|=\empty
>>>



\<non-html inline verbatim\><<<
\def\:ctgs#1{\def\:eat##1#1{{\vrb:tt ##1}\egroup}\:eat}
>>>

\<not-html local env\><<<
\let\HObey|=\empty
\let\EndHObey|=\empty
>>>


   |<not-html gif|> 

\<not-html gif\><<<
\def\:img{%
   \ifx       *\:temp     \def\:temp##1{\:img}%
   \else \ifx +\:temp     \def\:temp##1{\:img}%
   \else \ifx [\:temp     \def\:temp[##1]{\:img}%
   \else                  \let\:temp\:gobble
   \fi \fi \fi  \:temp}
>>>


\<not-html gif\><<<
\let\:Gif|=\:gobble
\def\:GifText[#1]{\:gobble}
\let\P:ctureCount|=\relax
\let\Gif|=\:gobble
\let\EndPicture|=\empty
\def\im:g[#1]#2{}
>>>

 |<not-html debug|>    
    |<not-html tocs|>  
    |<def not-html /TableOfContents|>  

\<def not-html /TableOfContents\><<<
\def\:TableOfContents[#1]{{%
   \def\TocCount{0}%
   |<interpretation for entries|>%
   \def\:Ttle##1##2##3{}%
   \parindent|=\z@   \catcode`\@|=11 \catcode`\:|=11  
   \csname :BeforeTOC\endcsname
   \input \jobname.4ct    \csname :BotTOC\endcsname
   \bigskip    \csname :AfterTOC\endcsname  }} 
>>>



|<not html Configure's|>   






\Section{Sectioning}

% \def\TeX{TeX}

\<TeX4ht divs\><<<
|<TeX4ht (like)ch and app|>
|<TeX4ht (like)sec|>
|<TeX4ht subsec|>
|<TeX4ht parts|>
>>>




\<html TeX4ht divs\><<<
|<html TeX4ht subsec|>
|<html TeX4ht parts|>
>>>



\SubSection{Chapter, LikeChapter, Appendix}

In its default setting, \TeX{} contributes an indentation of size
\''\parindent' to each paragraph. The following code is introduced for
the removal of the indentation that is first encountered after  the 
switch
\''\:removeindent' is set to be true. (also in boo: condition=>switch
+ not if...)

\<TeX4ht divs\><<<
\ht:everypar{\if:nopar  \hskip -\parindent 
               \ShowPar   \fi}>>>









\<TeX4ht (like)ch and app\><<<
\Def:Section\Chapter{\theChapterCounter}{#1} 
\Def:Section\LikeChapter{\theChapterCounter}{#1}
\Def:Section\Appendix{\theChapterCounter}{#1}
>>>

%\SubSection{Prefix to Title}


\<TeX4ht (like)ch and app\><<<
\NewConfigure{Chapter}[4]{%
  \Configure:Sec {Chapter}{#3}%
     {#4|<addr for Tag and Ref of Ch and App|>}%
     {|<modify ch counter|>#1}{#2}}
\NewConfigure{Appendix}[4]{%
  \Configure:Sec {Appendix}{#3}%
     {#4|<addr for Tag and Ref of Ch and App|>}%
     {|<modify app counter|>#1}{#2}}
\NewConfigure{LikeChapter}[4]{%
  \Configure:Sec {LikeChapter}{#3}%
     {#4|<addr for Tag and Ref of Ch and App|>}%
     {|<modify like ch counter|>#1}{#2}}
>>>


\<non-html TeX4ht (like)ch and app\><<<
\Configure{Chapter}{\:chprefix{#1}}{}{}{}
\Configure{Appendix}{\:chprefix{#1}}{}{}{}
\Configure{LikeChapter}{\:chprefix{#1}}{}{}{}
\def\:chprefix#1{%
   \global\:chapterstrue  
   \bgroup
      \def\InsertTitle{\uppercase}%
      \ShowIndent    \ChapterFonts    \leavevmode   
      {|<headline and footline from ch|>}%
      \vskip20mm    \rightskip|=\z@ plus 0.7\hsize
      \ChapterFonts\bf
      |<typeset ch/like/app num|>%
}
>>>

%\SubSection{Postfix to Title}





\<non-html TeX4ht (like)ch and app\><<<
\def\b:Chapter#1{\bigskip\vskip10mm
   \egroup \IgnorePar
}
\let\b:LikeChapter|=\b:Chapter
\let\b:Appendix|=\b:Chapter
>>>





The command \''\leavevmode' introduces a blank line before the
introduction of the vertical space. The command is needed because
\TeX{} removes the vertical spaces that appear at the top of the
HPages.


  The value of \''\rightskip' is
adjusted to allow for ragged margin on the right, and so to decrease
the probability of getting hyphenated words in the title.
Moreover,
the
paragraph that  the title makes  must be completed before leaving
the braced  group, because the values that
\''\baselineskip' and \''\righskip' hold at the end of the paragraph are
the ones that count. A task that is achieved here with
 \''\bigskip'.














%\SubSection{Fonts}

\<TeX4ht (like)ch and app\><<<
\ifx\ChapterFonts\:UnDef
   \font\:ChFont=cmbx10 scaled \magstep5

   \def\ChapterFonts{\let\bf|=\:ChFont
       \baselineskip|=29.85pt}
\fi
>>>

The command  \''\magstep'$\,i\/$ increases the size of the characters by a
factor of $(1.2)^i$. On the other hand,
 the normal distance between base lines is 12pt.
 Hence, the motivation for increasing this distance to 29.85pt
\hbox{(${}=\hbox{12}\cdot\hbox{(1.2)}^5$pt)}.



%\SubSection{Counters}



\''\ChapterCounter' is 0 for \''\LikeChapter', positive for \''\Chapter',
and negative for \''\Appendix'.  
To allow for the appearance of the title commands within groups, the changes
to variables \''\ChapterCounter' and \''\SectionCounter' are made
global.


\<TeX4ht (like)ch and app\><<<
\gHAssign\ChapterCounter|=0 

\def\theChapterCounter{%
   \ifnum       \ChapterCounter>0 \ChapterCounter
   \else \ifnum \ChapterCounter<0 \:Alph{-\ChapterCounter}\fi\fi}
>>>

 

\<modify ch counter\><<<
\ifnum \ChapterCounter<1           \gdef\ChapterCounter{1}%
                        \else \gHAdvance\ChapterCounter |by 1 \fi
\ifnum \pageno<0 \global\pageno|=1 \fi
|<Ch subcounters|>%
>>>


\<modify app counter\><<<
\ifnum \pageno<0 \global\pageno|=1 \fi
\ifnum \ChapterCounter<0       \gHAdvance\ChapterCounter |by -1
                         \else \gdef\ChapterCounter{-1}\fi
|<Ch subcounters|>%
>>>

\<modify like ch counter\><<<
\gHAssign\ChapterCounter|=0 
|<Ch subcounters|>%
>>>


\<Ch subcounters\><<<
   \gHAssign\SectionCounter|=0 
>>>



Do we want the following public? If so then also \`'\alph'.

\<TeX4ht (like)ch and app\><<<
\def\:Alph#1{\ifcase  #1\or
   A\or B\or C\or D\or E\or F\or G\or H\or I\or J\or
   K\or L\or M\or N\or O\or P\or Q\or R\or S\or T\or
   U\or V\or W\or X\or Y\or Z\else    \fi}
>>>


\<typeset ch/like/app num\><<<
   \ifnum \ChapterCounter=0  \def\uppercase##1{##1}%
   \else  \noindent
      \ifnum \ChapterCounter>0 \theChapter
      \else                    \theAppendix \fi
      \vskip10mm
   \fi
   \noindent
>>>











%\SubSection{Hooks}

\<non-html TeX4ht (like)ch and app\><<<
\BeforeEveryChapter{\:clearpage}
\BeforeEveryLikeChapter{\:clearpage}
\BeforeEveryAppendix{\:clearpage}
>>>





\SubSection{Sections and Like Sections}


\<TeX4ht (like)sec\><<<
\Def:Section\Section{\theSectionCounter}{#1} 
\Def:Section\LikeSection{}{#1}
>>>




% \SubSection{Prefix to Title}


The titles of the sections are typesetted as regular  paragraphs with the left
margins adjusted to make a space for the level numbers.

\<non-html TeX4ht (like)sec\><<<
\Configure{Section}{}{}{}{\par \egroup\IgnorePar\medskip\IgnorePar}
\def\a:Section#1{\:SctnPrfx{#1}1}
\def\a:LikeSection#1{\:SctnPrfx{#1}0}
\let\b:LikeSection|=\b:Section

\def\:SctnPrfx#1#2{%
   \bgroup
      \:bigskip      
      \ShowPar
      \SectionFonts
      \bf  \rightskip \z@ plus 0.5\hsize  
      \ifnum #2=1 |<Section number|>%
      \else \parindent|=\z@ \leavevmode   \fi
      {|<headline from section|>}%
}
>>>

\<Section number\><<<
\gHAdvance\SectionCounter |by 1
\def\:temp{\theSection \hskip 0.7em }%
\setbox0|=\hbox{\:temp}%
\advance \leftskip |by \wd0 
\parindent -\wd0   \:temp
>>>

\<TeX4ht (like)sec\><<<
\def\theSection{\theSectionCounter}
>>>


% \SubSection{Postfix to Title}



The \''\par' is inserted  before the \''\nobreak' to provide for a
vertical mode before the latter command is inserted. The motivation
for the latter command is to prohibit a HPage break immediately after the
title. 



% \SubSection{Fonts}

\<TeX4ht (like)sec\><<<
\ifx \SectionFonts\:UnDef
   \font\:SecBF=cmbx10 scaled \magstep3
   \font\:SecTT=cmtt10 scaled \magstep3

   \def\SectionFonts{\let\tt|=\:SecTT
      \let\bf|=\:SecBF  \baselineskip|=20.74pt}
\fi
>>>

% \SubSection{Counters}

\<TeX4ht (like)sec\><<<
\gHAssign\SectionCounter|=0 

\def\theSectionCounter{%
   \ifnum \ChapterCounter=0 \else \theChapterCounter.\fi
   \SectionCounter  }
>>>


% \Section{SubSections}




\<TeX4ht subsec\><<<
\Def:Section\SubSection{}{#1} 
>>>



% \SubSection{Prefix and Postfix to Title}


\<non-html TeX4ht subsec????\><<<
\def\a:subsection#1{
   \bgroup
      \:bigskip \ShowPar
      \rightskip=\z@ plus 0.5\hsize  
      \leavevmode   \SubSectionFonts\bf 
}
>>>





\<non-html TeX4ht subsec\><<<
\Configure{SubSection}{}{}{}{\par \egroup \nobreak \medskip
   \IgnorePar   \ignorespaces}
\def\a:SubSection#1{\bgroup
   \:bigskip \:noparfalse \noindent
   \rightskip=\z@ plus 0.5\hsize
   \SubSectionFonts\bf }
>>>



% \SubSection{Fonts}

\<TeX4ht subsec\><<<
\ifx\SubSectionFonts\:UnDef
   \font\:SubSecFont=cmbx10 scaled \magstep2
   \def\SubSectionFonts{\let\bf|=\:SubSecFont \baselineskip|=17.28pt}
\fi
>>>


\SubSection{Parts}





\<TeX4ht parts\><<<
\Def:Section\Part{}{#1} 
>>>


% \SubSection{Prefix to Title}


\<non-html TeX4ht parts\><<<
\Configure{Part}{}{}{%
   \bgroup
      \:clearpage \:HPageBeforePart       \ChapterFonts \bf
      \headline={\hfil}%
      \footline={\hfil}%
      \baselineskip|=1.3\baselineskip
      \leftskip|=\z@ plus 0.5\hsize    \rightskip|=\leftskip
      \leavevmode\vfill  \leavevmode\break  
      \def\InsertTitle{\uppercase}%
}{%
      \vfill \vfill \vfill \vfill    
      \leavevmode\break   \:HPageAfterPart  \newpage      \IgnorePar
   \egroup      \ignorespaces
}
>>>







\<TeX4ht parts\><<<
\def\OddPartHPage{%
   \def\:HPageBeforePart{\ifodd \pageno \else \leavevmode\ \newpage\fi}%
   \def\:HPageAfterPart{\newpage\leavevmode\ }}
\def\:NoOddChapterHPage{\def\:HPageBeforePart{}\def\:HPageAfterPart{}}
\:NoOddChapterHPage
>>>





 \SubSection{Headers and Footers}

\<non-html TeX4ht divs\><<<
\headline={\:HeaderNumFont   \botmark
   \ifodd\pageno  \:rightheader \else \:leftheader \fi    }
\footline={\:HeaderNumFont \hfil  \:footer \hfil}
\gdef\:leftheader{\hfil}
\gdef\:rightheader{\hfil}
\gdef\:footer{\folio}
\let\::uppercase|=\uppercase
\def\:uppercase#1{{\:HeaderTitleFont \::uppercase{#1}}}
>>>



% \SubSection{From Chapters}

We don't know under what condition \''\mark' and \''\topinsert' will
expand.


\<headline and footline from ch\><<<
\:HeaderFonts   
\gdef\:ChHeader{\noexpand\folio\hfil \:uppercase{#1}}%
\xdef\:StrtChNo{\the\pageno}%
\xdef\:leftheader{\noexpand\ifnum \:StrtChNo=\pageno\hfil
            \noexpand\else\:ChHeader\noexpand\fi}% 
\xdef\:footer{\noexpand\ifnum \:StrtChNo=\pageno\folio
            \noexpand\fi}%
\xdef\:rightheader{\noexpand\ifnum \:StrtChNo=\pageno \hfil
            \noexpand\else \:uppercase{#1}\hfil\noexpand\folio
            \noexpand\fi}% 
\mark{}%
>>>

First mark for current HPage. The second is for the following HPages,
until we get a section header.

The empty \''\mark' ensures that the ones from a sections will not
change the definition of \''\:rightheader' in first HPage of the
chapter (when \''\firtmark' is the choice) and that nothing will
propogate from previous HPages.


The \''\write', and \''\mark'(?), commands introduce whatsis so we want
them in horizontal mode to avoid extra spaces. Also, for correct HPage
numbers,  and for correct timing of headers, we want the \''\:toc' and
\''\mark' to be inserted after we get to horizontal mode.


% \SubSection{From Sections}

\<headline from section\><<<
\:HeaderFonts
\if:chapters \mark{%
   \gdef\noexpand\:rightheader{%
      \noexpand\ifnum \:StrtChNo=\pageno \hfil \noexpand\else
         \ifnum \SectionCounter>0 
            \:uppercase{\theSectionCounter}\space\space \fi
         \:uppercase{#1}\hfil\noexpand\folio
      \noexpand\fi}%
  }%
\fi
>>>

  We also have to take into consideration that
sections present with no chapters.  Hence, the following definition,
and in the above \''\:rightheader' is defined before \''\:leftheader'.

\<headers and footers\><<<
\gdef\:ChHeader{\:rightheader}>>>  


% \SubSection{Fonts}

\`'\:HeaderFonts{cmr8}{cmr10}'---first font to sections and chapters
fonts, and seconf font for HPage numbers. 

We  want \`'\:HeaderNumFont' and \`'\:HeaderTitleFont' to be hard 
wired to a specific font because otherwise fonts taht are in effect
when the HPages  are submitted will take effect (\''\rm', for instance,
is not a font).

\<non-html TeX4ht divs\><<<
\ifx  \:HeaderNumFont\:UnDef
   \font\eightrm=cmr8
   \font\eighttt=cmtt8
   \def\HeaderFonts#1#2#3{%
      \let\:HeaderNumFont|=#1
      \let\:HeaderTitleFont|=#2
      \def\:HeaderFonts{#3}}
   \HeaderFonts\tenrm\eightrm{\def\tt{\eighttt}}
\fi
>>>


\SubSection{Logical Cross-References for  TeX4ht}


\TagSec{dvtg}

\<non-html TeX4ht divs\><<<
\def\TagCh#1{\Tag{#1|<Ch tag|>}{\theChapterCounter}}
\def\RefCh#1{Chapter\ \Ref{#1|<Ch tag|>}}
\def\TagApp#1{\Tag{#1|<Ap tag|>}{\theChapterCounter}}
\def\RefApp#1{Appendix\ \Ref{#1|<Ap tag|>}}
\def\TagSec#1{\Tag{#1|<Sec tag|>}{\theSectionCounter}}
\def\RefSec#1{Section\ \Ref{#1|<Sec tag|>}}
>>>





\<html TeX4ht divs\><<<
\def\TagCh#1{\Tag{#1|<Ch tag|>}{\theChapterCounter}\Tag
                                               {#1|<hCh tag|>}{\:curch}}
\def\RefCh#1{\Link{\LikeRef{#1|<hCh tag|>}}{}Chapter\ \Ref
                                               {#1|<Ch tag|>}\EndLink}
\def\TagApp#1{\Tag{#1|<Ap tag|>}{\theChapterCounter}\Tag
                                               {#1|<hAp tag|>}{\:curch}}
\def\RefApp#1{\Link{\LikeRef{#1|<hAp tag|>}}{}Appendix\ \Ref
                                               {#1|<Ap tag|>}\EndLink}
\def\TagSec#1{\Tag{#1|<Sec tag|>}{\theSectionCounter}\Tag
                                               {#1|<hSec tag|>}{\:cursec}}
\def\RefSec#1{\Link{\LikeRef{#1|<hSec tag|>}}{}Section\ \Ref
                                               {#1|<Sec tag|>}\EndLink}
>>>




\<addr for Tag and Ref of Ch and App\><<<
\xdef\:curch{|<section html addr|>}%
>>>
  











\<html TeX4ht divs\><<<
\def\TagPage#1{%
   \Link{}{page#1}\EndLink\Tag{#1}{}}
\def\RefPage#1{\Link{page#1}{}\Ref{#1}\EndLink}
>>>

\<non-html TeX4ht divs\><<<
\def\TagPage#1{\Tag{#1}{}}
\def\RefPage{\Ref}
>>>




%\SubSection{Standard}

\<Ch tag\><<<
(C >>>



\<Ap tag\><<<
(A >>>


\<Sec tag\><<<
(S >>>




\<hAp tag\><<<
(a >>>


\<hCh tag\><<<
(c >>>


\<hSec tag\><<<
(s >>>


\Section{Tables of Contents}



\SubSection{Invoked Tables of Contents}

A table is communicated from one compilation to another through an
auxiliary file.

\<TeX4ht tocs\><<<
\def\TableOfContents{\futurelet\:temp\:TOC}
\def\:TOC{\ifx [\:temp \expandafter\:TableOfContents
          \else \:TableOfContents[Part,Chapter,LikeChapter,Appendix,%
                                  Section,LikeSection]\fi}
>>>


\<config plain utilities\><<<
\NewConfigure{TableOfContents}{5}
>>>




% \SubSection{Interpretation for the Entries}

\<html TeX4ht tocs\><<<
\def\tocPart#1#2#3{\IgnorePar\HCode{<div 
    align="center">}#2\HCode{</div>}\IgnoreIndent}%
\def\tocChapter#1#2#3{%
   |<indentations from Chapter|>%
   \par\ignorespaces #1 #2\par }
\def\tocLikeChapter{\tocChapter}
\def\tocAppendix{\tocChapter}
\def\tocSection#1#2#3{%
   |<indentations from Section|>%
   \par\tocSection:idnt \ignorespaces #1 #2\par}%
\def\tocLikeSection{\tocSection}
\def\tocSubSection#1#2#3{\par\csname tocSubSection:idnt\endcsname
   \ignorespaces #1 #2\par}  
>>>

A self-modifying definition like
\`'\def\tocChapter{...
   \def\tocChapter##1##2##3{\par\ignorespaces ##1 ##2\par}%
   \tocChapter   }'
can be harmful when \''\TocAt' commands are used.

\<indentations from Chapter\><<<
\ifx \tocSubSection:idnt\:UnDef
   \def\tocSection:idnt{\ }%
   \def\tocSubSection:idnt{\ \ }%
\fi
>>>

\<indentations from Section\><<<
\ifx \tocSubSection:idnt\:UnDef
   \let\tocSection:idnt|=\empty
   \def\tocSubSection:idnt{\ }%
\else 
   \ifx \SubSection:idnt\:UnDef   |% warning?|%
       \let\tocSection:idnt|=\empty
       \def\tocSubSection:idnt{\ }%
   \fi
\fi
>>>


\<non-html TeX4ht tocs\><<<
\def\tocPart#1#2#3{\sl \medskip \hfil #2\par\nobreak}%
\def\tocChapter#1#2#3{\medskip  \:ChapNum{#1}#2\hfill
                                \:pagenum{#3}\penalty1000}
\let\tocLikeChapter|=\tocChapter
\let\tocAppendix|=\tocChapter
\def\tocSection#1#2#3{%
   \:ChapNum{\relax}%
   \:SectNum{#1}#2\TocDotfill\:pagenum{#3}}
\let\tocLikeSection|=\tocSection
\def\tocSubSection#1#2#3{%
   \phantom{xxxx}%
   \:ChapNum{\relax}\:SectNum{\relax}$\bullet$ 
   #2\TocDotfill\:pagenum{#3}}
\def\:BeforeTOC{{\let\TocLikeChapter|=\empty \LikeChapter{Contents}}}
>>>


A \`'\nobreak=\penalty10000' can be a problem for chapters, because it
may cause too much stretching of spaces when there are no sections in
between. A \`'\penalty1000' seems to be good enough to avoid HPage
breaks when sections are close enough.





\<non-html TeX4ht tocs\><<<
\def\TocDotfill{\leaders\hbox to 1em{\hfil.\hfil}\hfill}
>>>


The prefix \''\leaders\hbox to
1em{\hfil.\hfil}' of \''\hfill' asks the command \''\hfill' to
 fill the void with multiple copies of the content of the
horizontal box (instead of just with  white space).  





\<non-html TeX4ht tocs\><<<
\def\:ChapNum#1{\bf\leavevmode
   \def\:test{#1}%
   \ifx \:test\empty \def\uppercase{}\else
      \hbox to 1.7em{#1\hfil}%
   \fi}%
\def\:SectNum#1{\rm
   \def\:test{#1}%
   \ifx \:test\empty \else
      \hbox to 2.5em{#1\hfil}%
   \fi}%
\def\:pagenum#1{\hbox to 1.7em{\hfil #1}\par}
>>>





\<html tocsNO\><<<
\def\:ChapNum#1{\leavevmode
   \def\:test{#1}%
   \ifx \:test\empty \def\uppercase{}\else
      {#1\space}%
   \fi}%
\def\:SectNum#1{\rm
   \def\:test{#1}%
   \ifx \:test\empty \else
      {#1\space}%
   \fi}%
\def\:pagenum#1{}%
>>>


\Section{Lists}




\SubSection{Non Html TeX4ht}


% \SubSection{Starting}

\<non-html TeX4ht lists\><<<
\def\List#1{%
   \def\:tempa##1##2{%
      \ifx\:tempA\:tempB \def\:tempb{\L:st{##1}}\fi \def\:tempB{##2}}%
   \def\:tempb{\L:st{#1}}\def\:tempA{#1}\def\:tempB{ord}%
   \:tempa\:ord1%
   \:tempa{\:ord}{a}%
   \:tempa{\:alph}{A}%
   \:tempa{\:Alph}{i}%
   \:tempa{\:roman}{I}%
   \:tempa{\:Roman}{disc}%
   \:tempa{$\bullet$}{circle}%
   \:tempa{$\circle$}{square}%
   \:tempa{\vrule  depth \z@ height 1ex width 1ex}{}%
   \:tempa{\:lbl}{}%
   \:tempb }

\def\L:st#1{\par \nobreak
   {\advance \medskipamount |by -\parskip \:medskip}%
   \:noparfalse
   \Begin:Block{List}%
      |<non-html List items|>%
      |<lbls for items|>%
      \advance \leftskip |by 1.5em
      \parindent|=0em
      |<items of List|>%
}
>>>


The interparagraph space that \''\parskip' contributes is introduced
when a new paragraph (i.e., horizontal mode) is entered. Within a list
we don't want  the first item to introduce such vertical space
in addition to the one introduced by the
head of the list.
Hence, we before the first item, \''\parskip'  give 0 cotribution.
Also, we want the space around the list (together with parskip) to equal medskip.


\`'\par\:bigskip' instead of just \''\:bigskip' allows a \''\nobreak' before the end of the lis.
e.g., \''\def\LineIndent{\EveryItem={\hskip-0.75em}}'



% \SubSection{Ending}

\<non-html TeX4ht lists\><<<
\def\EndList{\par
   \End:Block{List}%
   {\advance\medskipamount |by -\parskip \:medskip}}
>>>


% \SubSection{Items}

\<items of List\><<<
\HAssign\ListCounter|=0
\def\item{%
   \par \leavevmode      \parskip|=\:ListParSkip
   \Advance:\ListCounter |by 1
   \the\EveryItem}%
>>>


\<TeX4ht lists\><<<
\expandafter\csname newtoks\endcsname\EveryItem
>>>

\<TeX4ht lists\><<<
\def\ListParSkip{\def\:ListParSkip}
\ifHtml
  \ListParSkip{\HtmlPar}
\fi
>>>



\<non-html TeX4ht lists\><<<
\expandafter\csname newskip\endcsname\ListParSkip
\def\:ListParSkip{\ListParSkip}
\ListParSkip|=4.5pt plus 1.5pt minus 1.5pt
>>>

% \SubSection{Labels}


\<items of List\><<<
\def\:temp{#1}\def\:tempa{\:lbl}\ifx   \:temp\:tempa
       \EveryItem={\hskip-1.5em\:ListItem}%
\else  \EveryItem={|<Alph|>%
                   \llap{#1\hskip 0.5em}}\fi
>>>


\<lbls for items\><<<
\lbl:tm
>>>



\<TeX4ht lists\><<<
\def\lbl:tm{%
   \def\:ord{\a:Item\ListCounter\b:Item}%
   \def\:roman{\a:Item\romannumeral\ListCounter\b:Item}%
   \def\:alph{{\Advance: \ListCounter |by 96
               \a:Item \char\ListCounter\b:Item}}%
   \def\:Roman{\a:Item\uppercase{\romannumeral\ListCounter}\b:Item}%
   \def\:Alph{{\Advance: \ListCounter |by 64
               \a:Item \char\ListCounter\b:Item}}%
}
\def\:lbl#1{\a:Item#1\b:Item}
>>>

\<general tex-sty configure utilities\><<<
\long\def\c:Item:#1#2{\c:def\a:Item{#1}\c:def\b:Item{#2}}
>>>



\<non-html TeX4ht lists\><<<
\def\:ListItem#1{\:lbl{#1}\hskip 0.5em\ignorespaces}
>>>


A global  \''\Configure{Item}' is not that good of an idea when nested
lists are present.


\<non-html List items\><<<
\Configure{Item}{}{.}%
>>>








In its default setting, \`'\:lbl' has the meaning of identity+period.



% \SubSection{Named Groups}

\<general tex-sty configure utilities\><<<
\def\Begin:Block#1{\begingroup \def\:EndBlock{#1}}

\def\End:Block#1{%
   \expandafter\ifx \csname :EndBlock\endcsname\relax
      \:warning{Block #1 is already closed}%
   \else
      \def\:test{#1}%
      \ifx \:test\:EndBlock \endgroup
      \else
      \:warning{End environment #1 within
               environment \:EndBlock?}%
   \fi\fi}>>>






\SubSection{Html TeX4ht}

\<html TeX4ht lists\><<<
\def\List#1{\begingroup  {\hfil\break\IgnorePar}%
   \HAssign\ListCounter|=0 
   |<set html list type|>%
   |<lbls for items|>%
}
>>>




\<set html list type\><<<
\let\:temp|=\empty \def\:tempA{#1}%
                                              \def\:tempB{ord}%
\ifx\:tempA\:tempB \else \let\:temp|=\:tempA  \def\:tempB{1}\fi
\ifx\:tempA\:tempB \else                      \def\:tempB{a}\fi
\ifx\:tempA\:tempB \else                      \def\:tempB{A}\fi
\ifx\:tempA\:tempB \else                      \def\:tempB{i}\fi
\ifx\:tempA\:tempB \else                      \def\:tempB{I}\fi
\let\item|=\:LIitem
\ifx       \:tempA\:tempB |<enumerated list|>%
                          \let\a:List|=\c:OList
\else                                        \def\:tempB{}%
   \ifx    \:tempA\:tempB |<def list|>%
   \else                                     \def\:tempB{button}%
      \ifx \:tempA\:tempB |<button list|>%
      \else               |<marked list|>%
                          \let\a:List|=\c:UList
\fi\fi\fi
>>>

% \SubSection{Enumerated and Marked Lists}

\<enumerated list\><<<
{\a:OList}%
\def\EndList{\b:OList\endgroup }%
>>>

The \`'hbox' is for preserving vr mode. The grouping is
for preserving \`'ignorepar'.

\<marked list\><<<
\a:UList \def\EndList{\b:UList\endgroup }%
>>>



\<html TeX4ht lists\><<<
\NewConfigure{OList}{3}
\NewConfigure{UList}{3}
\NewConfigure{DList}{4}
>>>

\<html TeX4ht lists\><<<
\let\:UL:|=\empty
\def\:LIitem{%
   {\parindent=0pt\leavevmode}\:noparfalse    \ht:everypar{\Li:Par}%
    \Advance:\ListCounter |by 1  \a:List
}
>>>

% \SubSection{Labeled (=Definition) Lists}



\<def list\><<<
\a:DList \let\item|=\:DLitem \let\End:dd|=\empty
\def\EndList{\b:DList\endgroup }%
>>>


Lynx doesn't like  \`'\leavemode' alone because vertical mode produces
\`'<DD><DT>' and the empty body of \`'<DD>' is not handled nicely
there. Hence, the \`'{\ht:everypar{\HCode{<P>}}\leavevmode}'.


\<html TeX4ht lists\><<<
\def\:DLitem#1{%
   \Advance:\ListCounter |by  1
   \c:DList #1\d:DList    \ht:everypar{\Li:Par}%
}
>>>





\<set html list type\><<<
\let\Li:Par|=\:ListParSkip
\ht:everypar{\if:nopar \else \HtmlPar\fi}%
>>>






\SubSection{Button Lists}

\Verbatim
|
+----+
     |
+----+
| HPage - 1
+----+
     |
+----+
| HPage - 2
+----+
     |
+----+
| HPage - 3
+----+
     |
+----+
|
\EndVerbatim



\<button list\><<<
\a:buttonList
\let\Item|=\It:em
\edef\but:file{\RefFileNumber\FileNumber}%
\ifx \but:file\empty  \edef\but:file{\j:bname tmp.\:html}\fi
\def\ALL:file##1.##2|<par del|>{\def\ALL:file{##1-}}%
\NewFileName\all:file \expandafter\ALL:file\all:file.|<par del|>% 
\HPage<\all:file>{}\IgnorePar
\let\item|=\B:item
\def\EndList{%
   \ifnum \ListCounter>1 \l:Bd{#1}\fi
   \EndHPage{}%
   \b:buttonList \endgroup  }%
>>>


Set browser-title for the above HPage?
% was
% \SaveEverypar \FileStream[ ]
% \EndFileStream\all:file  \RecallEverypar

% \SubSection{item}

For simple HPage: \`'\item{...}...'.

\<html TeX4ht lists\><<<
\def\B:item#1{%
   \ifnum \ListCounter>0 \l:Bd{#1}\fi
   \Advance:\ListCounter |by 1
   \FileStream\but:file 
      \Recall:Link\bt:fl  \Recall:HPage\hpg:fl \Recall:HPageTag\hptg:fl
   \L:Ba{#1}\Link[\all:file]{\ALL:file
                             \ListCounter}{\ALL:file\ListCounter}%
   \L:Bb{#1}\EndLink
   \L:Bc{#1}\FileStream\all:file 
      \Save:Link\bt:fl    \Save:HPage\hpg:fl   \Save:HPageTag\hptg:fl
   \l:Ba{#1}\Link[\but:file]{\ALL:file
                             \ListCounter}{\ALL:file\ListCounter}%
   \l:Bb{#1}\EndLink         
   \l:Bc{#1}\HtmlEnv}
>>>


% \SubSection{Item}

For sensitive code: \`'\Item...\ContItem...'.


\<html TeX4ht lists\><<<
\def\It:em{\bgroup  \csname no:catcodes\endcsname0{255}{12}%
                    \catcode`\^^I=13\relax\:Itm}
\bgroup
   \global\let\:grp|=\egroup  
   \def\:temp{%
      \csname no:catcodes\endcsname0{255}{12}
      \catcode`\/|=0 \catcode`\{|=1 \catcode`\}|=2  \catcode`\#|=6
      \catcode`\:|=11 \catcode`\g|=11 \catcode`\r|=11 \catcode`\p|=11 
      \gdef\:Itm }
\:temp#1\ContItem{/:grp/g:rp{#1}}/:grp

                                          \catcode`\^^I=13
\def\g:rp#1{%
   \immediate\openout15=\jobname.tmp
    {\newlinechar`\^^M \def^^I{\space\space}%
     \immediate\write15{\string\ignorespaces\space#1}}%
   \immediate\closeout15
   \B:item{\input \jobname.tmp}}
                                          \catcode`\^^I=10
>>>

% \SubSection{Configure}

Style for HPages.


\<html TeX4ht lists\><<<
\NewConfigure{buttonList}[5]{\def\a:buttonList{#1}%
   \def\b:buttonList{#2}%
   \def\L:Ba##1{#3}\def\L:Bb##1{#5}\def\L:Bc##1{#4}}
>>> 

\`'\Configure{buttonList}
{before-external-list}
{after-external-list}
{before-external-anchor}
{after-external-anchor}
{external-anchor}'.

\<html TeX4ht lists\><<<
\NewConfigure{buttonList+}[4]{%
    \def\l:Ba##1{#1}\def\l:Bb##1{#4}\def\l:Bc##1{#2}\def\l:Bd##1{#3}}
>>>

\`'\Configure{buttonList+}{before-internal-anchor}
{after-internal-anchor}
{internal-anchor}'.

The {before-item},
{after-item}, and
{anchor}, get the item content \''#1' for a parameter.



\Section{Html Tables}




We need  the \''\HTable{...}' version for handling
TeX tables and for not modifying \`'&' with other
catcode or replacement command. Otherwise, \''\HTable...\EndHtable' 
are better because that don't ask for expandable stuff.



\<HTable\><<<
\def\HTable{%
   \let\:TR|=\empty
   \let\TABLE:|=\empty
   \futurelet\:temp\T:ABLE}
>>>






Defining the \''\HTable' in terms of \''\halign' is problematic
for a few reasons.

\List{1}
\item
Paragraph breaks are treated as space characters within \''\halign'.
Defining\''\par' to equal \''\the\ht:everypar' causes multiple calls to
\''\ht:everypar'.

\item Don't know how to get the \''</TABLE>' in place.

\item  Well, so far I 
\ifHtml[\HPage{got}\Verbatim
\Odef\HTable[#1]{\futurelet\:temp\:HTable}
\def\:HTable{\ifx \:temp\bgroup 
   \def\:temp##1{\H:Table##1\EndHTable}\else
   \let\:temp=\H:Table  \fi   \:temp}

\def\H:Table{\begingroup  
   \a:HTable\special{t4ht=<TABLE \T:HTable:>}%
   \let\sv:Col=\HCol \HAssign\HCol = 0
   \let\sv:Row=\HRow \HAssign\HRow = 0
   \TeXhalign\bgroup  
   \ifnum \HCol>0\special{t4ht=</TR>}\fi\:HtblR
   \:Hentry##\End:Hentry&&\:Hentry ##\End:Hentry\cr}

\def\EndHTable{\cr\egroup 
   \End:HtblR \ht:special{t4ht=</TABLE>}\b:HTable
   \global\let\HCol=\sv:Col
   \global\let\HRow=\sv:Row
   \endgroup}




\def\:HtblR{\gHAdvance\HRow by 1
   \ht:special{t4ht=<tr \R:HTable:>}}
\def\End:HtblR{\special{t4ht=</tr>}}
\Odef\:Hentry[#1]{\gHAdvance\HCol by 1
   \ht:special{t4ht=<td \D:HTable:>}\bgroup  }
\def\End:Hentry{\egroup\special{t4ht=</td>}}

\def\c:HTable:#1#2#3#4#5{\c:def\a:HTable{#1}\c:def\b:HTable{#2}%
   \c:def\T:HTable:{#3}\c:def\R:HTable:{#4}\c:def\D:HTable:{#5}}
\Configure{HTable}{}{}{}{}{}

\EndVerbatim\EndHPage{}]\fi


\item What about paragraph breaks in independent HTable?  Are we loosing them 
as is the case in the following example.

\ifHtml[\HPage{??}\Verbatim


\documentclass{book}

\input DraTex.sty      \input AlDraTex.sty

\input tex4ht.sty

\Preamble{html,next,HTable,sections-,fonts}

\input ProTex.sty
\AlProTex{llo,<<<>>>,`,NoShow}

\def\Example{\begingroup 
\Contribute{HTable}{border="0" cellpadding="0"
   cellspacing="0" width="100\%"}
   \HTable^/\Code\xxxx{}<<<}
\def\EndExample{{\ShowOn \advance\leftskip by -3em
   \let\extra=\empty  \let\extraB=\empty \ShowCode-\xxxx}
   \def\@##1@{##1}   \OutputCode[tmp]\xxxx 
   \&~\&[/BGCOLOR="\#FFFFCC"] 
\ht:everypar{\HtmlPar}\input xxxx.tmp  \CR \EndHTable
   \endgroup
   \let\extra=\empty   \let\extraB=\empty \let\comments=\empty}
\Contribute{HTable}{WIDTH="100\%"}

% \HPage{+}\ShowFile{xxxx.tmp}\EndHPage{}\CR

\Define\Color(3){{
   \Text(--\special{ps:~#1~#2~#3~setrgbcolor}--)}}
\def\@#1@{\HCode{<FONT COLOR="\#0000FF"><STRONG>}%
   #1\HCode{</STRONG></FONT>}}

\ShowOff

\HShowCode{}{}{}{\HCode{</A>...<A>}}{}



\NewSection\Slide{$\bullet$~#2 }
\Configure{Slide}{\IgnorePar\HCode{<h2>}}
   {\HCode{</h2>}\IgnoreIndent}{}
\CutAt{Slide,part}

\NewSection\likeslide{}
\cOnfigure{likeslide}{\IgnorePar\HCode{<!--}}
   {\IgnorePar\HCode{-->}}{}
\CutAt{likeslide,Slide}


\Configure{crosslinks}{[}{] }{next}{prev}{}{}{}{}

\Configure{crosslinks+}{}{[\Link[\RefFile
      {toc}]{}{}toc\EndLink]\par\ShowPar}
  {\par\ShowPar}{[\Link[\RefFile{toc}]{}{}toc\EndLink]}

\begin{document}

\EndPreamble


%---------------------- start here -------------------------


% \DrawOff

\HCode{<DIV ALIGN="CENTER">}
\part{A Demonstration of TeX4ht}

Eitan M. Gurari\HCode{<BR>}Ohio State Univ

The 18th Annual Meeting of the\HCode{<BR>}
             TeX Users Group\HCode{<P>}
              July 28 - August 1, 1997\HCode{<BR>}
             San Francisco, California 
\HCode{</DIV>}

\HCode{<BR>}\HCode{<BR>}\HCode{<BR>}

Note: The following slides refer to LaTeX.  However, the demonstration
applies also to other TeX-based styles.


{\tt http://www.cse.ohio-state.edu/\HCode{<BR>} \string~gurari/tug97/}

\NextNewFileName{\jobname-toc.html}

\likeslide{}


                  \TagFile{toc}
\tableofcontents[Slide]




\Slide{TeX4ht as a Converter}


\Code\semilatex{}<<<
\def\documentclass#1{}
\let\oldbegin=\begin
\def\begin#1{\def\tempa{#1}\def\tempb{document}\ifx \tempa\tempb
  \else \def\temp{\oldbegin{#1}}\expandafter\temp \fi}
\let\oldend=\end
\def\end#1{\def\tempa{#1}\def\tempb{document}\ifx \tempa\tempb
  \else \def\temp{\oldend{#1}}\expandafter\temp \fi}
\def\input#1\EndPreamble{\ShowPar}
>>>

\Code\extra{}<<<
`semilatex
>>>

\Example
`extra\documentclass
        {article}
   
\title{Psalms}
\author{131:1}
   
`@\input tex4ht.sty@
`@\Preamble{html}@
\begin{document}  
`@\EndPreamble@
       \maketitle   

My heart is not 
haughty, nor mine 
eyes lofty: 

neither do I 
exercise myself in 
great matters, or 
in things too high
for me.
    \end{document}
>>> \EndExample

\end{document}

\EndVerbatim\EndHPage{}]\fi

Also, do we have consistent behavior between TeX and LaTeX here?
\EndList




\SubSection{Character Options after /HTable}

\<HTable\><<<
\def\T:ABLE{%
   \ifx \bgroup\:temp  \let\:temp|=\HT:ble
   \else  \ifx [\:temp \let\:temp|=\HT:ble
          \else |<character options for TABLE|>%
   \fi \fi                 \:temp}

\def\TA:BLE#1{%
   \let\:tempb|=\:TR   \al:gn\:TR#1%
   \ifx \:tempb\:TR \expand:after{\HT:ble#1}%
   \else  \expand:after{\futurelet\:temp\T:ABLE}\fi
}
>>>

We stay above for all the characters before the caption.


% \SubSection{Options for TABLE}

\<character options for TABLE\><<<
\let\:tempb|=\TA:BLE
\ifx B\:temp  \edef\TABLE:{\HTable:B \TABLE:}%
              \def\:tempb##1{\futurelet\:temp\T:ABLE}%              
\fi
\HTable:brdr P{cellpadding}%
\HTable:brdr S{cellspacing}%
\let\:temp|=\:tempb
>>>

\<HTable\><<<
\def\HTable:brdr#1#2{\ifx #1\:temp
      \def\:tempb##1{\afterassignment\:tempa\tmp:cnt|=}%
      \def\:tempa{%
         \edef\TABLE:{#2="\the\tmp:cnt" \TABLE:}%
         \futurelet\:temp\T:ABLE }%
   \fi}
>>>

\<HTable\><<<
\def\arg:HTable#1#2{%
   \def\:temp{#1}\ifx \:temp\empty \else
      \expandafter\def\csname HTable:\string#1\endcsname{#2}%
      \expandafter\arg:HTable
   \fi
}
\NewConfigure{HTable+}[2]{\arg:HTable{#1}{#2}}
>>>


% \SubSection{Option on Entries}

The options are inserted into the entries.

\<HTable\><<<
\def\al:gn#1#2{%
   \add:TD#1<#2{\csname HTable:<\endcsname }%
   \add:TD#1>#2{\csname HTable:>\endcsname }%
   \add:TD#1-#2{\csname HTable:-\endcsname }%
   \add:TD#1^#2{\csname HTable:\string^\endcsname }%
   \add:TD#1||#2{\csname HTable:||\endcsname }%
   \add:TD#1_#2{\csname HTable:\string_\endcsname }%
   \add:TD#1=#2{\csname HTable:=\endcsname  }%
}
\def\add:TD#1#2#3#4{\chardef\:temp|=`#2
                    \chardef\:tempa|=`#3
                    \ifnum \:temp=\:tempa\edef#1{#1\space #4}\fi}
\let\:TR|=\empty
>>>

The above is superior to \`'\def\add:TD#1#2#3#4{\ifx
#2#3\edef#1{#1\space #4}\fi}' because it is indepndent of category
codes and \`'_' and \`'^', for instance, may change their meaning.

\SubSection{Open Table}


\<HTable\><<<
\def\HT:ble{\bgroup  \let\sv:row|=\HRow  \let\sv:col|=\HCol
   \gHAssign\HRow|=1 \gHAssign\HCol|=0 
   \htbl: }
>>>


\<HTable\><<<
\def\htbl:{%
   \let\GetInt|=\Get:Int
   \let\GetArg|=\Get:Arg    \a:HTable
   |<script at start of tables|>%
   \c:HTable\hfil\break   
   \ht:everypar{}\futurelet\:temp\tbl:bd }
\NewConfigure{HTable}{6}
>>>


\<HTable\><<<
\def\EndHTable{%
   \end:cell  \d:HTable   \b:HTable
   \global\let\HRow|=\sv:row  \global\let\HCol|=\sv:col  \egroup
   |<nullify script|>}
>>>




% \SubSection{Type of Table?}

\<HTable\><<<
\def\tbl:bd{\ifx \:temp\bgroup  \let\tbl:typ|=\tbl:bdy
   \else    \ifx /\:temp        \def\tbl:typ##1{\env:tbl}%
   \else  \let\tbl:typ|=\env:tbl
   \fi \fi \tbl:typ }
\long\def\tbl:bdy#1{%
   \def\hfil{\ifx \EndPicture\:UnDef \space \else\:hfil\fi}%
   \def\hfill{\ifx \EndPicture\:UnDef \space \else\:hfill\fi}%
   \expandafter\let\csname cr\endcsname|=\:cr
   \:HTable#1&\EndH:Table }
\let\:hfil|=\hfil
\let\:hfill|=\hfill
>>>


Without the restructuring of the hfil's TeX4ht gets cofused
and looses spaces between words. 

\SubSection{Enviromental Tables}

\<HTable\><<<
\def\env:tbl{\def\&{\end:cell \TD:cell }\TD:cell }
\def\CR{\end:cell
   \gHAdvance\HRow |by 1  \gHAssign\HCol|=0
   \d:HTable\c:HTable\hfil\break  \TD:cell }                
>>>

\SubSection{Braced Tables}

Extract the cells recursively.

\<HTable\><<<
\long\def\:HTable#1&#2\EndH:Table{%
   \def\:htbend{#2}%
   \insert:TD#1\tok:nmath
   \def\:temp{#2}\ifx\:temp\empty \EndHTable
   \else  \expand:after{\end:cell
                        \:HTable#2\EndH:Table}\fi }
\def\tok:nmath{\empty}
\def\end:cell{\:EndHTableScript   \f:HTable}
>>>



% \SubSection{Get Cell after /cr}

\<HTable\><<<
\def\:cr{\ifx \EndPicture\:UnDef \expandafter\:cR
          \else                  \expandafter\:c:r\fi}
\expandafter\let\csname :c:r\endcsname|=\cr
\long\def\:cR#1{\relax
   \ifx\:htbend\empty
      \def\:temp{#1}%
      \ifx\:temp\NoArg \else \expandafter\mpty:cr\fi
   \else                      \mpty:cr
   \fi        #1}%

\def\mpty:cr{%
   \expand:after{\end:cell  \gHAdvance\HRow |by 1  \gHAssign\HCol|=0
   \d:HTable\c:HTable \insert:TD}}
>>>


We need global increases in Col and Row for cases like
\`'\HTableScript{$}{$}'.

\SubSection{Retrieve the Local Options for a Cell}


% \SubSection{Find Options in Environmental Tables}

\<HTable\><<<
\def\TD:cell{\gHAdvance\HCol |by 1   \futurelet\:temp\TD:cll }
\def\TD:cll{%
   \ifx [\:temp  \let\:temp|=\T:D 
   \else  \expandafter\ifx\space\:temp 
      \expand:after{\def\:temp}\space{\futurelet\:temp\TD:cll}\else  
      \tbl:ch
   \fi \fi \:temp}
>>>

\<HTable\><<<
\catcode`\^=13  \catcode`\_=13
\def\tbl:ch{{\def^{\string^}\def_{\string_}%
       \xdef\:temp{\noexpand\T:D[\:HTbleAtt]}}}
\catcode`\^=7  \catcode`\_=8
>>>

% \SubSection{Find Options in Braced Tables}

\<HTable\><<<
\def\insert:TD{\futurelet\:tempc\TD:}

\def\TD:{%
   \ifx \par\:tempc \def\:temp\par{\insert:TD}\go:out\:temp\fi
   \expandafter\ifx \space\:tempc
          \expand:after{\def\:temp}\space{\insert:TD}%
                                \go:out\:temp      \fi
   \ifx \EndH:Table\:tempc     \go:out\empty\fi
   \gHAdvance\HCol |by 1    \chk:tblop   \tbl:ch \go:out\:temp\empty
   \:out}

\def\chk:tblop{\ifx [\:tempc \go:out\T:D  \fi}
>>>







We want the rectangles `[...' at halign tables to be
part of the entries.

\<no check for [...] in HTable\><<<
\let\chk:tblop|=\empty
>>>


% \SubSection{Get the Options}

\<HTable\><<<
\def\T:D[{\def\TD:typ{td}\let\TD:more|=\empty \scan:TD}
\def\scan:TD#1{%
   \ifx ]#1\e:HTable
      \go:out\:HTableScript  \fi
   \ifx /#1\def\:temp##1]{\edef\TD:more{\TD:more\space##1}\scan:TD]}%
          \go:out\:temp  \fi
   \ifx H#1\def\TD:typ{th}\go:out\scan:TD\fi
   \ifx R#1\SP:N{rowspan}\fi
   \ifx C#1\SP:N{colspan}\fi
   \al:gn\TD:more#1%
   \go:out\scan:TD\empty\:out   }

\def\SP:N#1{%
   \def\:temp{\edef\TD:more{ #1="\the\tmp:cnt"\TD:more
                 \Hnewline}\scan:TD}%
   \def\:tempa##1{\afterassignment\:temp \tmp:cnt|=##1}%
   \go:out\:tempa}
>>>


\SubSection{Script}

\<script at start of tables\><<<
\let\:EndHTableScript|=\:EndHTblScript
\let\:HTableScript|=\:HTblScript
\let\:HTbleAtt|=\:HTblAtt
|<nullify script|>%
>>>

\<nullify script\><<<
\let\:EndHTblScript|=\empty
\let\:HTblScript|=\empty
\let\:HTblAtt|=\empty
>>>

\<HTable\><<<
\def\HTableScript{\futurelet\:temp\tblScrpt:}
\def\tblScrpt:{\ifx [\:temp  \expandafter\:tblScrpt
               \else  \expand:after{\:tblScrpt[]}\fi }
\long\def\:tblScrpt[#1]#2#3{%
    \def\:HTblAtt{#1}%
    \def\:HTblScript{#2\go:out\empty|<par del|>\:out}%
    \def\:EndHTblScript{#3}}
|<nullify script|>
>>>




\<HTable\><<<
\def\go:out#1{\expand:after{\g:out#1}}
\long\def\g:out#1#2\:out{#1}
>>>


\SubSection{Scanning of Cells}

\<HTable\><<<
\long\def\Get:Int#1#2|<par del|>\:out{%
   \def\:next{%
      \edef\:next{\the\tmp:cnt\space}%
      \HAssign#1|=\:next #2|<par del|>\:out}%
   \afterassignment\:next
   \tmp:cnt }
>>>


\<HTable\><<<
\def\DefGetArg#1#2#3{\def\:temp{#3}%
   \ifx \:temp\NoArg  \D:fGetArg{#1}{#2}#3#3\else
                       \D:fGetArg{#1}{#2}{#3}{}\fi 
}
\def\D:fGetArg#1#2#3#4{%
   \expand:after{\long\def}\csname 
        Get:Arg:#1:#2\endcsname##1##2!*?: \:out{%
      \def\:next####1#3{\def##1{####1}%
                        |<no token?|>#4##2!*?: \:out}%
      \:next }}

\DefGetArg{}{}{}
>>>



\`'\DefGetArg{}{1}\tok:nmath' tages the full entry, but it is
problematic for a tail entry in a row.


Use

\<HTable\><<<
\def\stgt:arg#1#2{%
  \expand:after{\let\:tempa=|}\csname Get:Arg:#1:#2\endcsname
  \ifx \:tempa\relax \else \let\:temp|=\:tempa \fi }
\def\Get:Arg{%
  \let\:temp|=\Get:Arg::\stgt:arg{}\HCol \stgt:arg\HRow{}%
  \stgt:arg\HRow\Col \:temp}
>>>



\<no token?\><<<
\ifx \tbl:typ\tbl:bdy  \else
   \ifx    ##1\&\let##1|=\NoArg\fi
   \ifx ##1\CR  \let##1|=\NoArg\fi
\fi
>>>

\<HTable\><<<
\def\NoArg{\tok:nmath}
>>>












%%%%%%%%%%%%%%%
\Section{footmisc}
%%%%%%%%%%%%%%%%%


\<footmisc.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% footmisc.4ht                          |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\Hinput{footmisc}
\endinput
>>>        \AddFile{9}{footmisc}






%%%%%%%%%%%%%%%
\Section{Other}
%%%%%%%%%%%%%%%%%



\SubSection{Local Drawing Environment}


\<draw sty\><<<
\:CheckOption{draw}     \if:Option 
   |<local draw env|>
\fi
>>>


\<local draw env\><<<
\NewConfigure{Fig}{2}
\Odef\Fig[#1]{\bgroup
   \ifx  \EndPicture\:Undef  
      \ifx  \EndFig\:Undef  
         \def\EndFig{\b:Fig\egroup}%
         \def\AltFig{#1}\a:Fig
      \else  \let\EndFig|=\egroup \fi
   \else  \let\EndFig|=\egroup \fi
   \HAssign\y::=0
   \def\Text##1"##2"{\raise \y:: pt \hbox to 0pt{##2\hss}\ignorespaces}%
   \def\Line{\afterassignment\Ln:A\tmp:cnta}%
   \def\Move{\afterassignment\Mv:A\tmp:cnta}\ignorespaces}

\def\Ln:A{\afterassignment\Ln:B\tmp:cntb}
\def\Ln:B{\bgroup \leavevmode  
  |<diagonal line|>%
   \egroup \Mv:B  }

\def\Ln:C{\ifnum \I::<\J::
   \vrule depth \z@ height \z@ width \tmp:dim 
   \raise \tmp:dima \hbox{\vrule height 0.5pt depth 0.5pt  width 1pt}%
   \vrule depth \z@ height \z@ width -\tmp:dim
   \vrule depth \z@ height \z@ width -1.0pt
   \advance\tmp:dim by  \C::
   \advance\tmp:dima by  \D::
   \Advance:\I:: by  1
   \expandafter\Ln:C  \fi  }

\def\Mv:A{\afterassignment\Mv:B\tmp:cntb}
\def\Mv:B{\leavevmode 
   \vrule depth \z@ height \z@ width \tmp:cnta pt
   \Advance:\y:: by \tmp:cntb     \ignorespaces  }

\csname newcount\endcsname\tmp:cnta
\csname newcount\endcsname\tmp:cntb
\csname newdimen\endcsname\tmp:dima
>>>


\<diagonal line\><<<
\HAssign\I::=\ifnum \tmp:cnta<0 -\fi \tmp:cnta
\HAssign\J::=\ifnum \tmp:cntb<0 -\fi \tmp:cntb
\ifnum \I::>\J:: \HAssign\J::=\I:: \fi \relax
\ifnum \J::>0
   \tmp:dim=\tmp:cnta pt  
   \ifnum \tmp:cnta<0  
       \tmp:dim|=-\tmp:dim
       \vrule depth \z@ height \z@ width \tmp:cnta pt
       \HAdvance\y:: by \tmp:cntb    \tmp:cntb|=-\tmp:cntb
   \fi
   \divide\tmp:dim by \J::  \edef\C::{\the\tmp:dim}%
   \tmp:dima=\tmp:cntb pt  \divide\tmp:dima by \J::  
   \edef\D::{\the\tmp:dima}%
   \tmp:dima|= \y:: pt 
   \HAssign\I::|=-1  \tmp:dim|=\z@  \Ln:C 
   \ifnum \tmp:cnta>0  \else
      \vrule depth \z@ height \z@ width -\tmp:cnta pt
\fi\fi
>>>






\SubSection{PostScript}



\<postscript draw\><<<
\ifHtml
   \:CheckOption{postscript}  \if:Option  
      |<postscript|>
      |<special|>
   \fi 
\fi
>>>


\<postscript\><<<
\expandafter\def\csname i:0\endcsname{0}
\expandafter\def\csname i:1\endcsname{1}
\expandafter\def\csname i:2\endcsname{2}
\expandafter\def\csname i:3\endcsname{3}
\expandafter\def\csname i:4\endcsname{4}
\expandafter\def\csname i:5\endcsname{5}
\expandafter\def\csname i:6\endcsname{6}
\expandafter\def\csname i:7\endcsname{7}
\expandafter\def\csname i:8\endcsname{8}
\expandafter\def\csname i:9\endcsname{9}
\def\i:A{10}  \let\i:a|=\i:A
\def\i:B{11}  \let\i:b|=\i:B
\def\i:C{12}  \let\i:c|=\i:C
\def\i:D{13}  \let\i:d|=\i:D
\def\i:E{14}  \let\i:e|=\i:E
\def\i:F{15}  \let\i:f|=\i:F

\def\Hex:Frac#1#2{\tmp:cnt|=\csname i:#1\endcsname
   \multiply\tmp:cnt by 16
   \advance\tmp:cnt\csname i:#2\endcsname
   \multiply\tmp:cnt by 100
   \divide\tmp:cnt by 255 
   \edef\:temp{\ifnum \tmp:cnt>99 1.0\else 0.\the\tmp:cnt\fi}}

\def\df:clr#1#2#3#4#5#6#7{\Hex:Frac#2#3\let#1|=\:temp
   \Hex:Frac#4#5\edef#1{ #1 \:temp}%
   \Hex:Frac#6#7\edef#1{#1 \:temp\space setrgbcolor }}

\def\DefPsColor#1#2{\df:clr#1#2}
|<delay postscript|>%
>>>

\<delay postscript\><<<
\let\PsCode|=\relax
>>>






\<special\><<<
\ifx \PsCodeSpecial\:UnDef \def\PsCodeSpecial{ps:}\fi
>>>


% \SubSection{Karked Locations}

\<postscript\><<<
\def\MarkPsLoc(#1){%
  \PsCode{ currentpoint
   /Psy#1  exch  def 
   /PsX#1  exch  def 
}}
\def\RecallPsLoc(#1){ PsX#1  Psy#1 }
>>>








\SubSection{Math}


%\SubSection{LaTeX-Oriented Commands}

\<tex-sty configure utilities\><<<
|<latex,sty math del|>
>>>




\SubSection{Marginal Notes}


\<html sty of TeX4ht\><<<
\def\Margin{\HCode{<table \Hnewline
      align="right"><tr><td \Hnewline>}}
\def\EndMargin{\HCode{</td></tr></table>}}
>>>

Remove the above!!!!!!


\SubSection{Multi-Columns}


\''\HColumns[contribute-TABLE,contribute-TD]{i}'; Given count of
column in \''\HCol'


\<html sty of TeX4ht\><<<
\def\add:col{\Advance:\:cols |by -1 \HAdvance\HCol |by 1\relax
   \ifnum \:cols>0   
      \c:Cols \vsplit0 to \tmp:dim  \d:Cols  \expandafter\add:col 
   \fi}
>>>

\<html sty of TeX4ht\><<<
\NewConfigure{Columns}{4}
\def\c:Cols{\edef\sv:dim{\the\tmp:dim}\c:Columns}
\def\d:Cols{\d:Columns \tmp:dim|=\sv:dim }
\def\ColMag#1{\tmp:dim |= #1\tmp:dim}
>>>


\<html sty of TeX4ht\><<<
\def\Columns#1{%
   \a:Columns
   \HAssign\:cols|=#1  \setbox0=\vbox\bgroup
   \divide\hsize |by #1  }
\def\EndColumns{\egroup   \HAssign\HCol|=0
  \tmp:dim|=\ht0  \advance\tmp:dim |by \dp0  \divide\tmp:dim |by \:cols
  \add:col \c:Cols \box0 \d:Cols \b:Columns}
>>>


\<non-html sty of TeX4ht\><<<
\let\Columns|=\:gobble
\let\EndColumns|=\empty
>>>

\SubSection{Other}

\<non-html sty of TeX4ht\><<<
\def\:bigskip{%
 \ifvmode
   \ifdim \lastskip<\bigskipamount 
   \vskip -\lastskip \bigskip \fi
 \else \bigskip\fi}

\def\:medskip{%
 \ifvmode
   \ifdim \lastskip<\medskipamount 
   \vskip -\lastskip \medskip \fi
 \else \medskip\fi}

\def\:smallskip{%
 \ifvmode
   \ifdim \lastskip<\smallskipamount 
   \vskip -\lastskip \smallskip \fi
 \else \smallskip \fi}
>>>



%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{OpenOffice}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Writer}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\Link[http://www.hj-gym.dk/\string
         ~hj/writer2latex/]{}{}writer2latex\EndLink


\<writer.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% writer.4ht                            |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<writer configs|>
\Hinput{writer}
\endinput
>>>        \AddFile{9}{writer}

\<writer configs\><<<
\let\wl:begin=\begin
\def\begin#1{%
  \wl:env#1style//%
  \wl:begin{#1}}
\def\wl:env#1style#2//{\relax\if!#1!\wl:styleenv#2//\fi}%
\def\wl:styleenv#1style#2//{%
  \expandafter\ifx\csname before:begin style#1\endcsname\relax
     \config:wlenv{style#1}%
     \global\expandafter\let
        \csname before:begin style#1\expandafter\endcsname
        \csname before:begin style#1\endcsname
     \expandafter\append:def\csname style#1\endcsname{\wl:css{style#1}}%
  \fi }
\def\wl:css#1{%
  \expandafter\ifx\csname css:#1\endcsname\relax
     \global\expandafter\let\csname css:#1\endcsname\def
     \config:wlcss{#1}%
  \fi
}
\NewConfigure{WriterEnv}[2]{%
   \def\config:wlenv##1{#1}%
   \def\config:wlcss##1{#2}%
}
\Configure{WriterEnv}{}{}
>>>

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{mdwtools}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{mdwlist}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\<mdwlist.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% mdwlist.4ht                           |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<mdwlist hooks|>
\Hinput{mdwlist}
\endinput
>>>        \AddFile{9}{mdwlist}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{sverb}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\<sverb.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% sverb.4ht                             |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<sverb hooks|>
\Hinput{sverb}
\endinput
>>>        \AddFile{9}{sverb}

\<sverb hooks\><<<
\def\sv@demosmp{\par\a:demo \raggedright \vbox\bgroup}
\def\sv@demoemp{\par\unpenalty\unskip \egroup\b:demo}
\NewConfigure{demo}{2}
>>>



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{syntax}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\<syntax.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% syntax.4ht                            |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<syntax hooks|>
\Hinput{syntax}
\endinput
>>>        \AddFile{9}{syntax}




%%%%%%%%%%%%%%%%%%%%%
\Part{Latex and TeX}
%%%%%%%%%%%%%%%%%%%%%%



\Chapter{Configurations for Section Heads}



\<config plain utilities\><<<

>>>

























\Chapter{Symbol Decorations}



\Section{Non-Math}

\<text symbols\><<<
\def\AA{{\Protect\:AA}}
\def\aa{{\Protect\:aa}}
\def\:AA{%
   \ifx \EndPicture\:UnDef  \a:AA\else
     \leavevmode\setbox0\hbox{h}\dimen@\ht0\advance\dimen@-1ex%
     \rlap{\raise.67\dimen@\hbox{\char'27}}A\fi}
\def\:aa{%
   \ifx \EndPicture\:UnDef  \HChar{229}\else \accent23a\fi }
\NewConfigure{AA}{1}
\Configure{AA}{\HChar{197}}
>>>

\<text symbolsNO\><<<
\def\vdots{\Picture+{ \a:@Picture{vdots}}
   \vbox{\baselineskip4\p@ \lineskiplimit\z@
    \kern6\p@\hbox{.}\hbox{.}\hbox{.}}\EndPicture}
>>>





\Section{Math symbols}


% 


\<latex math symbols\><<<
\def\ProtectedMathSymbol#1#2{%
   \def\:temp{{\math:sym#1{#2}}}%
   \expandafter\HLet\csname #2 \endcsname\:temp
   \NewConfigure{#2}{1}\Configure{#2}{\csname o:#2 :\endcsname}}
>>>

\<latex math symbols\><<<
\def\EncMathSymbol#1#2#3{%
   \NewConfigure{#2}{1}%
   \edef\:tempc{#3\expandafter\string\csname #2\endcsname}%
   \def\:temp{{\math:sym#1{#2}}}%
   \expandafter\HLet  \csname \:tempc\endcsname\:temp
   \edef\:temp{\noexpand\Configure{#2}{\expandafter\noexpand
       \csname \:tempc\endcsname}}\:temp
}
\EncMathSymbol\mathop{l}{OT1}
\EncMathSymbol\mathop{L}{OT1}
>>>

\<latex math symbols\><<<
\MathSymbol\mathop{mathellipsis}  
>>>



\<plain math symbols\><<<
\MathSymbol\mathop{ldots}
\MathSymbol\mathop{l}
\MathSymbol\mathop{longleftarrow}
\MathSymbol\mathop{longrightarrow}
\MathSymbol\mathop{L}
\MathSymbol\mathrel{buildrelover}
>>>



% \def\ifno:mathchar#1#2{%
%    \def\:tempb##1"##2///{##1}%
%    \edef\:tempa{\expandafter\:tempb\meaning#1"///}%
%    \edef\:tempc{\string\mathchar}%
%    \ifx \:tempa\:tempc \else #2\fi
%}
%\ifno:mathchar


\<fontmath + plain classes\><<<
\MathSymbol\mathop{angle}
\MathSymbol\mathop{cong}
\MathSymbol\mathop{vdots}
\MathSymbol\mathrel{Longleftrightarrow}
\MathSymbol\mathrel{Longrightarrow}
\MathSymbol\mathrel{bowtie}
\MathSymbol\mathrel{cdots}
\MathSymbol\mathrel{ddots}
\MathSymbol\mathrel{doteq}
\MathSymbol\mathrel{hookleftarrow}
\MathSymbol\mathrel{hookrightarrow}
\MathSymbol\mathrel{leftrightharpoons}
\MathSymbol\mathrel{longleftrightarrow}
\MathSymbol\mathrel{longmapsto}
\MathSymbol\mathrel{mapsto}
\MathSymbol\mathrel{models}
\MathSymbol\mathrel{neq} \let\ne|=\neq   \def\c:ne:{\Configure{neq}}
\MathSymbol\mathrel{notin}
\MathSymbol\mathrel{rightleftharpoons}
>>>

\<config fontmath.ltx shared\><<<
\ProtectedMathSymbol\mathop{longleftarrow}
\ProtectedMathSymbol\mathop{longrightarrow}
>>>



\<amsmath.sty and amstex.sty\><<<
\MathSymbol\mathop{dotsc}
\MathSymbol\mathop{dotso}
\MathSymbol\mathrel{longleftarrow}
\MathSymbol\mathrel{longrightarrow}
>>>

\<amsmath.sty\><<<
\MathSymbol\mathrel{@cdots}
\MathSymbol\mathop{doteq}  
   \def\n:doteq:{\expandafter\:same \math:sym\mathop{doteq}\nolimits}
\HLet\dotsb@=\@cdots  
\HLet\intdots@=\@cdots
\HRestore\cdots
>>>

% \HLet\dotsb=\cdots     
% \HLet\dotsm=\dotsb

\<amsmath.sty\><<<
\MathSymbol\mathop{iint}  
   \def\n:iint:{\expandafter\:same \math:sym\mathop{iint}\nolimits}
\MathSymbol\mathop{iiint}  
   \def\n:iiint:{\expandafter\:same \math:sym\mathop{iiint}\nolimits}
\MathSymbol\mathop{iiiint}  
   \def\n:iiiint:{\expandafter\:same \math:sym\mathop{iiiint}\nolimits}
\MathSymbol\mathop{idotsint}  
   \def\n:idotsint:{\expandafter\:same \math:sym\mathop{idotsint}\nolimits}
>>>

\<config fontmath\><<<
\MathSymbol\mathop{int}  
   \def\n:int:{\expandafter\:same \math:sym\mathop{int}\nolimits}
>>>




Where
\`'\def\rightleftharpoons{\m:CondPicture{\mathrel{\mathpalette\rlh@{}}}{}}'
came in for the first time. It is in amstex but not in latex or tex.



\Section{MkHalign-Based Symbols}





We had a definition like \`'\def\overbrace#1{{\m:CondPicture{%
      \mathop{\vbox{\m@th\ialign{##\crcr\noalign{\kern3\p@}
      \downbracefill\crcr\noalign{\kern3\p@\nointerlineskip}
      $\hfil\displaystyle{#1}\hfil$\crcr}}}\limits}{}}}'
which should have something like
\`'' but it
seems like there is no need for it anymore.
Similarly for \`'\underbrace', \''\overrightarrow', 
\''\overleftarrow', and \''\angle'.





\<over/under fontmath\><<<
\def\:tempc#1{\a:overrightarrow
   \o:overrightarrow:{#1}\b:overrightarrow}
\HLet\overrightarrow|=\:tempc
\NewConfigure{overrightarrow}{2}
\def\:tempc#1{\a:overleftarrow
   \o:overleftarrow:{#1}\b:overleftarrow}
\HLet\overleftarrow|=\:tempc
\NewConfigure{overleftarrow}{2}
>>>

\<plain math\><<<
\def\:tempc#1{\a:overrightarrow
   \o:overrightarrow:{#1}\b:overrightarrow}
\HLet\overrightarrow|=\:tempc
\NewConfigure{overrightarrow}{2}
\def\:tempc#1{\a:overleftarrow
   \o:overleftarrow:{#1}\b:overleftarrow}
\HLet\overleftarrow|=\:tempc
\NewConfigure{overleftarrow}{2}
>>>




\<amsmath.sty\><<<
\def\:tempc#1{\a:underrightarrow
   \o:underrightarrow:{#1}\b:underrightarrow}
\HLet\underrightarrow|=\:tempc
\NewConfigure{underrightarrow}{2}
\def\:tempc#1{\a:underleftarrow
   \o:underleftarrow:{#1}\b:underleftarrow}
\HLet\underleftarrow|=\:tempc
\NewConfigure{underleftarrow}{2}
>>>

\<amsmath.sty\><<<
\def\:tempc#1{\a:overleftrightarrow
   \o:overleftrightarrow:{#1}\b:overleftrightarrow}
\HLet\overleftrightarrow|=\:tempc
\NewConfigure{overleftrightarrow}{2}
\def\:tempc#1{\a:underleftrightarrow
   \o:underleftrightarrow:{#1}\b:underleftrightarrow}
\HLet\underleftrightarrow|=\:tempc
\NewConfigure{underleftrightarrow}{2}
>>>









\<plain, fontmath, amstex\><<<
\def\:temp#1{\a:overbrace \mathop{\hbox{\b:overbrace
   $\o:overbrace:{#1}$\c:overbrace}}\limits}
\HLet\overbrace|=\:temp
\NewConfigure{overbrace}{3}
\def\:temp#1{\a:underbrace \mathop{\hbox{$\b:underbrace
   \o:underbrace:{#1}\c:underbrace$}}\limits}
\HLet\underbrace|=\:temp
\NewConfigure{underbrace}{3}
>>>







\Section{New Accents}





For non-pictorial accents \''\c', \''\b', and \''\d', we want just the
accented part.  The default definitions provide an alternative options.
In the last two cases, the  \''\accent' command uses faked access
number.  

\<revised accent definitions\><<<
\def\:temp#1{{\accent24 #1}}
\let\c:accent|=\c   \HLet\c:accent|=\:temp   \let\c|=\c:accent
>>>

\<revised latex accent definitions\><<<
\def\:temp#1{{\edef\next{\the\font}\rmfamily\accent0 \next#1}}
\let\b:accent|=\b   \HLet\b:accent|=\:temp   \let\b|=\b:accent
\def\:temp#1{{\edef\next{\the\font}\rmfamily\accent1 \next#1}}
\let\d:accent|=\d   \HLet\d:accent|=\:temp   \let\d|=\d:accent
>>>


\<revised plain accent definitions\><<<
\def\:temp#1{{\edef\next{\the\font}\rm\accent0 \next#1}}
\let\b:accent|=\b   \HLet\b:accent|=\:temp   \let\b|=\b:accent
\def\:temp#1{{\edef\next{\the\font}\rm\accent1 \next#1}}
\let\d:accent|=\d   \HLet\d:accent|=\:temp   \let\d|=\d:accent
>>>


The last two faked fonts, similar to the definition of \''\t' in
plain.tex. There, however, we have \''\the\textfont1' instead of
\''\rm' and \''\rmfamily', which doesn't work in LaTeX for some
reasons (what are the reasons?).









\Section{Accents through `accents' Configurations}



When \''\hat{foo}' is encountered, a search is made for an \`'??-i'
that equals  \`'foo' in the given accent table. If found, do-found is
executed; otherwise, do-not-found is executed. The do-found can reference the
??-out through \`'#1'. The do-not-found can reference the 
old definition of \`'\hat' through \`'#1' and the foo through \`'#2'.



\<accents\><<<
\NewConfigure{accents}[2]{\def\a:accents##1##2{#1}%
   \def\b:accents##1##2##3{#2}}
>>>

\List{*}
\item \`'\HChar{...}' sends forward a character to the next printable
char (can be refined to specific characters).  That is, it uses the
character of the command, with the decoration of the character that
follows.
\item \`'\special{t4ht@+...}' sends forward a string to the next printable
chr
\EndList



The space in the definition of \`'\check:sc' is to deal with caese
like \`'cmcsc10 at 14.4pt'.


\<temp patch for accents on small capsPRE-CSS\><<<
\def\check:sc#1 #2|<par del|>{\Check:sc#1}
\def\Check:sc#1#2#3#4#5#6#7#8#9*{%
  \gdef\Check:sc##1##2##3##4##5##6##7##8##9*{%
   {\if #1##1\if #2##2\if ##3#3\if ##4#4\if ##5#5\if ##6#6\if ##7#7%
    \if ##8#8\aftergroup\sc:reg:ac\else \sc:digits#8##8|<par del|>\fi
    \else \sc:digits#7##7#8##8|<par del|>\fi 
    \else \sc:digits#6##6#7##7#8##8|<par del|>\fi
    \fi\fi\fi\fi\fi}}}
{\scshape\expandafter\expandafter\expandafter\check:sc
     \expandafter\fontname\expandafter\font \space |<par del|>xxxxxxxx*}
\def\get:sc{\expandafter\expandafter\expandafter\check:sc
     \expandafter\fontname\expandafter\font \space |<par del|>xxxxxxxx*}
\def\sc:reg:ac#1#2#3{\nxt:srch
   {#3}aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVxXyYzZ\i I\j J%
   {}{}//{#1}{#2}}
\def\nxt:srch#1#2{\if #1#2\expandafter\:found
   \else\expandafter\not:found\fi{#1}}
\def\:found#1#2#3//#4#5{\a:textscaccent#4{#5}{#2}\b:textscaccent}
\def\not:found#1#2#3{\if !#3!\expandafter\endnot:found
  \else\expandafter\nxt:srch\fi{#1}{#3}}
\def\endnot:found#1#2//#3#4{#3{#4}{#1}}
|<sc digits|>
\let\acp:csv=\acp:c
\def\acp:c#1#2{\get:sc\acp:csv{#1}{#2}}
\NewConfigure{textscaccent}{2}
>>>

The checking for digits is needed for cases like \`'eccc1000' vesrus
\`'eccc1200'. Eg.g,

\Verbatim
\documentclass{article}
  \usepackage[T1]{fontenc}
\begin{document}
  \textsc{Po\'e}  \Large \textsc{Po\'e}
\end{document}
\EndVerbatim

\<sc digits\><<<
\def\sc:digits#1#2|<par del|>{%
   \sc:dig{0}{#1}{#2}%
   \sc:dig{1}{#1}{#2}%
   \sc:dig{2}{#1}{#2}%
   \sc:dig{3}{#1}{#2}%
   \sc:dig{4}{#1}{#2}%
   \sc:dig{5}{#1}{#2}%
   \sc:dig{6}{#1}{#2}%
   \sc:dig{7}{#1}{#2}%
   \sc:dig{8}{#1}{#2}%
   \sc:dig{9}{#1}{#2}}
\def\sc:dig#1#2#3{%
   \if #1#2\if !#3!\aftergroup\sc:reg:ac \expandafter\no:sc
           \else                     \expandafter\sc:digits\fi
           #3|<par del|>%
   \fi }
\def\no:sc#1|<par del|>{}
>>>


The second operands must be a single parameter macro.  The previous to
the last field must be empty, and the last one is not used.  







The following put characters over each other and indirectly takes care
of \''\b', \''\d', and \`'\ooalign'.



\<plain,ltplain obeylines,oalign\><<<
\def\:temp#1{\leavevmode\a:oalign\o:oalign:{#1}\b:oalign}
\HLet\oalign|=\:temp
\NewConfigure{oalign}{2}
>>>




\Section{Math Classes  to Symbols}

\SubSection{Type 5: Math Close}


\SubSection{Type 1: Op}

Can come in characters
\`'\mathchardef\coprod="1360
\mathchardef\bigvee="1357
\mathchardef\bigwedge="1356
\mathchardef\biguplus="1355
\mathchardef\bigcap="1354
\mathchardef\bigcup="1353
\mathchardef\intop="1352 \def\int{\intop\nolimits}
\mathchardef\prod="1351
\mathchardef\sum="1350
\mathchardef\bigotimes="134E
\mathchardef\bigoplus="134C
\mathchardef\bigodot="134A
\mathchardef\ointop="1348 \def\oint{\ointop\nolimits}
\mathchardef\bigsqcup="1346
\mathchardef\smallint="1273'
or as functions   \''\mathop{\rm log}',....



In plain.tex, the \''\limits' and \''\nolimits' are used only after
\''\mathop'.
Without the following we get a complain from \`'$\arctan (2)$'
about \''\nolimits' not following the operator immediately
in \`'fonts' mode. This is so because the definition
\`'\arctan ->\mathop {\rm arctan}\nolimits ' gets output
of code from \''\rm'.

\<html math and non-math symbols???\><<<
\def\:temp{\nopic:gobble\o:nolimits:}
\HLet\nolimits|=\:temp
\def\:temp{\nopic:gobble\o:limits:}
\HLet\limits|=\:temp
>>>




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{Other}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


Type 6 is for punctuation (\''\mathpunc', in LaTeX), and type 7 is
``variable ord''.

\`'latex.ltx:\def\pmod#1{\allowbreak\mkern18mu({\operator@font mod}\,\,#1)}       ' ???



%%%%%%%%%%%%%
\Section{Soul}
%%%%%%%%%%%%%

\<soul.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% soul.4ht                              |version %
% Copyright (C) |CopyYear.2005.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<soul hooks|>
\Hinput{soul}
\endinput
>>>        \AddFile{9}{soul}

\<soul hooks\><<<
\expandafter\long\expandafter\def\csname textcaps \endcsname#1{\a:textcaps 
   #1\b:textcaps}
\expandafter\long\expandafter\def\csname texthl \endcsname#1{\a:texthl
   \SOUL@hlcolor{#1}\b:texthl}
\expandafter\long\expandafter\def\csname textso \endcsname#1{\a:textso 
   #1\b:textso}
\expandafter\long\expandafter\def\csname textst \endcsname#1{\a:textst 
   \SOUL@stcolor{#1}\b:textst}
\expandafter\long\expandafter\def\csname textul \endcsname#1{\a:textul 
   \SOUL@ulcolor{#1}\b:textul}
\NewConfigure{textcaps}{2}
\NewConfigure{texthl}{2}
\NewConfigure{textso}{2}
\NewConfigure{textst}{2}
\NewConfigure{textul}{2}
>>>


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Underline and Overline}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\''\ovrline' and \''\undeline' are not macros so they
can't be redefined with \''\pend:defI'.




\<plain math\><<<
\def\:temp#1{\relax \ifvmode\leavevmode\fi
   \a:underline\hbox{$#1$}\b:underline}
\HLet\underline|=\:temp
\NewConfigure{underline}{2}
>>>

Some environments call \Verb+\@@underline+ directly, so we want this
macro also to be defined directly. However, this macro always appears
within math mode, so deine also \Verb+\underline+ directly.



\<latex math\><<<
\def\underline#1{%
  \relax
  \ifmmode\o:@@underline:{#1}%
  \else  $\o:@@underline:{\hbox{#1}}\m@th$\relax\fi}
\def\:tempc#1{\relax\ifvmode\leavevmode\fi
   \a:underline \o:@@underline:{#1}\b:underline}
\HLet\@@underline|=\:tempc
\def\:tempc#1{\relax\ifvmode\leavevmode\fi
   \a:underline \o:underline:{#1}\b:underline}
\HLet\underline|=\:tempc
\NewConfigure{underline}{2}
>>>

\<plain,latex math\><<<
\def\:temp#1{\relax\ifvmode\leavevmode\fi
   \a:overline\hbox{$|<empty base for sub/sup|>#1$}\b:overline}
\HLet\overline|=\:temp
\NewConfigure{overline}{2}
>>>


\<empty base for sub/sup\><<<
{\HCode{}}>>>


\Section{Space Characters}



We have the definition \`'\def~{\penalty \@M \ }' in TeX,
and in LaTeX it is also defined through \`'\ '.
The relax is to avoid end-of-line for the control character.


\<config latex.ltx shared\><<<
\let\sp:c|=\  |<latex,plain sp|>
>>>

\<config plain shared\><<<
\let\sp:c|=\space |<latex,plain sp|>%
>>>

\<latex,plain sp\><<<
\def\ {\relax\ifx \EndPicture\:UnDef \a:sp
             \else \sp:c\fi}
\NewConfigure{ }[1]{\def\:temp{#1}%
   \ifx \:temp\empty \let\a:sp|=\sp:c\else\def\a:sp{#1}\fi}
\def\:nbsp{\leavevmode\special{t4ht@+\string&{35}x00A0;}x} 
\Configure{ }{\:nbsp}
>>>

% \leavevmode\ht:special{t4ht@+\string&nbsp;}x

Had \`'\let\sp:c|=\ \relax', but manual of TeXproject didn't accept
it.




















%%%%%%%%%%%
\Part{TeX Formats}
%%%%%%%%%%



%%%%%%%%%%%
\Chapter{Plain}
%%%%%%%%%%

%%%%%%%%%%%%%%%
\Section{Outline}
%%%%%%%%%%%%%%%


\<plain.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% plain.4ht                             |version %
% Copyright (C) |CopyYear.1997.      Eitan M. Gurari          %
|<TeX4ht copyright|>
|<exit if already loaded|>
|<record ams definitions|>
|<elements for divs|>
|<tex divisions|>
|<fontmath + plain classes|>
|<plain, amsmath, amstex|>
|<elements for lists|>
|<html lists|>
|<html tex divs|>
|<plain vfootnote|>
|<html tex settabs|>
|<html tex halign|>
|<plain,ltplain obeylines,oalign|>
|<html local env|>
|<more html tex|> 
|<html tex env|>
|<html tex floats|>
|<html TeX4ht local env|>
\:CheckOption{new-accents}     \if:Option 
    |<revised accent definitions|>
    |<revised plain accent definitions|>
    |<new accents|>
\else
    |<accents|>
\fi
|<text symbols|>
|<shared plain,eplain|>
|<config plain utilities|>
|<plain,latex utilities|>
|<config plain shared|>
|<config plain-latex shared|>
|<plain,latex bordermatrix|>
|<displaylines|>
|<plain,latex math symbols|>        
|<plain math symbols|>
|<plain math|>
|<plain halign-based math|>
|<plain,latex math|>
|<html plain|> 
|<html plain+|>             |%keep last in html mode|%
\Hinput{plain}
\endinput
>>>        \AddFile{5}{plain}







\<html plain\><<<
\footline={\hfil}   \headline={\hfil}  
>>>

\<eplain config\><<<
\footline={\hfil}   \headline={\hfil}  
|<date utility|>
>>>



\<plain,latex utilities\><<<
|<date utility|>
>>>


\<date utility\><<<
\tmp:cnt|=\time  \divide\tmp:cnt |by 60
\edef\:temp{\the\tmp:cnt}
\multiply\tmp:cnt |by -60 \advance\tmp:cnt |by \time
\edef\:today{\the\year-\ifnum \month<10 0\fi
  \the\month-\ifnum \day<10 0\fi\the\day 
   \space\ifnum \:temp<10 0\fi \:temp 
   :\ifnum \tmp:cnt<10 0\fi\the\tmp:cnt :00}
>>>


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Tables}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%




\SubSection{TeX: Eqalign}






\<plain eqalign pattern\><<<
$\displaystyle{#}$&$\displaystyle{{}#}$%
>>>


\<plain halign-based math\><<<
\def\:tempc#1{\tx:halign{eqalign}{#1}}
\HLet\eqalign|=\:tempc
                                 \catcode`\#|=13 \catcode`\!|=6
\def\reg:eqalign!1{\null\vcenter{\m@th
  \Mk:ialign:egroup
  {|<plain eqalign pattern|>}{eqalign}{!1}#{}}}  
                                 \catcode`\#=6 \catcode`\!=12
\NewConfigure{eqalign}{6}
>>>


\<plain halign-based math\><<<
\def\Mk:ialign:egroup#1#2#3#4#5{%
%    \csname a:#2\endcsname
     \ifx \EndPicture\:UnDef        
        |<SaveMkHalignConfig|>#5\RecallTeXcr
        \MkHalign#4{#1}#3\crcr\EndMkHalign
        \RecallMkHalignConfig 
     \else
        \csname o:#2:\endcsname{#3}%
     \fi
%   \csname b:#2\endcsname
}
>>>

Test:
\Verbatim
\csname tex4ht\endcsname

$\eqalign{
1111&2222\cr
}$
\bye
\EndVerbatim


\SubSection{TeX: eqalignno}





\<plain eqalignno pattern\><<<
$\@lign\displaystyle{#}$%
&$\@lign\displaystyle{{}#}$%
&\hbox{$\@lign#$}%
>>>


\<plain halign-based math\><<<
\def\:tempc#1{\tx:halign{eqalignno}{#1}}
\HLet\eqalignno|=\:tempc
                                 \catcode`\#|=13 \catcode`\!|=6
\def\reg:eqalignno!1{\Mk:ialign:egroup
   {|<plain eqalignno pattern|>}{eqalignno}{!1}#{}}
                                 \catcode`\#=6 \catcode`\!=12
\NewConfigure{eqalignno}{6}
\def\:eqalignno:{\Configure{noalign}{}{}}
>>>


\SubSection{TeX: leqalignno}


\<plain halign-based math\><<<
\def\:tempc#1{\tx:halign{leqalignno}{#1}}
\HLet\leqalignno|=\:tempc
                                 \catcode`\#|=13 \catcode`\!|=6
\def\reg:leqalignno!1{\Mk:ialign:egroup
  {|<plain eqalignno pattern|>}{leqalignno}{!1}#{}}
                                 \catcode`\#=6 \catcode`\!=12
\NewConfigure{leqalignno}{6}
>>>




\SubSection{Tabbing}


LaTeX disables: \`'\tabs', \`'\tabsdone', \''settabs', \''\+',
\''\tabset', \''\cleartabs', and \''\settabs'.



No need for \`'\:CheckOption{settabs-} \if:Option \else ....\fi'
because we can use \`'\Configure{settabs}{}{}{}{}{}'.




The following is from plain TeX.


The following is for \`'\outer\def\+{\settabs}'.



\<html tex settabs\><<<
\def\gt:tab{\def\:temp##1.##2//{##1}\tmp:dim|=\m:tab\wd\z@}
|<set a settabs element|>
|<set a settabs row|>
>>>



\<config plain utilities\><<<
\def\E:tabalign#1{\def\e:tabalgn{\ifx \EndPicture\:UnDef #1\fi}}
\def\c:settabs:{\c:def\:tempa{settabs}\futurelet\:temp\:tblgn}
>>>







\<html tex settabs\><<<
\pend:def\settabs{\e:tabalgn}
>>>

The \''\leavevmode' below save from paragraph breaks
between lines.

\`'\Configure{settabs}[dec const]' for table magnified by
the given decimal constant.  
\`'\Configure{settabs}{at-settabs}{at \+}{at \cr}{before elem}{after elem}'
for user-defined configuration.  The \`'at-settabs' is useful for
tables \`'\settabs..\+..\cr\+..\cr...' that are defined within 
dedicated groups.




\<set a settabs element\><<<
\def\t@bb@x{\if@cr\egroup |<last col; no dim|>%
  \else\hss\egroup  |<col dim|>%
      \global\setbox\tabsyet\hbox{\unhbox\tabsyet
      \global\setbox\@ne\lastbox}% 
    \ifvoid\@ne\global\setbox\@ne\hbox to\wd\z@{}%
    \else\setbox\z@\hbox to\wd\@ne{\unhbox\z@}\fi
    \global\setbox\tabsdone\hbox{\box\@ne\unhbox\tabsdone}\fi
  \ifx \EndPicture\:UnDef \c:tabalgn \fi \box\z@ 
  \ifx \EndPicture\:UnDef \d:tabalgn \fi}
>>>

\<col dim\><<<
\edef\TabWidth{\expandafter\:temp\the\tmp:dim//}%
>>>

\<last col; no dim\><<<
\let\TabWidth|=\empty
>>>


\<set a settabs row\><<<
\def\m@ketabbox{\begingroup  
  \global\setbox\tabsyet\copy\tabs
  \global\setbox\tabsdone\null
  \def\cr{\@crtrue\crcr\egroup\egroup
    \ifus@  \ifx \EndPicture\:UnDef \a:tabalgn \fi
        \unvbox\z@\lastbox
        \ifx \EndPicture\:UnDef \b:tabalgn \fi
    \fi\endgroup
    \setbox\tabs\hbox{\unhbox\tabsyet\unhbox\tabsdone}}%
  \setbox\z@\vbox\bgroup\@crfalse  
  |<ialign|>\bgroup&\t@bbox##\t@bb@x\crcr}
>>>





 

\Verbatim
\ifx \us@false\:UnDef
   \def\:tempa{\expandafter\let\csname ifus@\endcsname|=}
   \expandafter\:tempa\csname iftrue\endcsname
\fi
\EndVerbatim


\''\ialign' stands for initialized \''\halign'.

\<ialign\><<<
\everycr{}\tabskip\z@skip\TeXhalign
>>>




\Section{Discrete Structures}





\SubSection{Sections and Proclaims}


\<config plain shared\><<<
\expandafter\let\csname  beginsection\endcsname\relax
\NewSection\beginsection{}{}
\let\begin:section\beginsection
\expand:after{\csname outer\endcsname\def}\csname
     beginsection\endcsname#1\par{\smallskip
  \message{#1}\begin:section{#1}\smallskip\noindent}
>>>

\<config plain shared\><<<
\edef\:temp{\let\noexpand\o:proclaim:|=\expandafter\noexpand
   \csname proclaim\endcsname}\:temp
\expandafter\def\csname proclaim\endcsname#1. #2\par{\medbreak
  \a:proclaim\noindent{\bf#1.\enspace}\b:proclaim  
  {\sl#2\par}\c:proclaim\medskip}
\NewConfigure{proclaim}{3}
>>>





%%%%%%%%%%%%%%%%%%%%%%%
\SubSection{Items}
%%%%%%%%%%%%%%%%%%%%%%

\<plain+ env\><<<
\def\textindent#1{\indent \ifx \EndPicture\:UnDef \expandafter\hbox
   \else\expandafter\llap\fi {{#1\enspace}}\ignorespaces}
>>>

Extra braces for fonts.

% \SubSection{item}



\<plain+ env\><<<
\def\:temp#1{\:ilist \let\:ilist|=\empty  
   \def\EnditemList{\end:ilist \let\EnditemList|=\empty}%
   \a:item {#1}\b:item}
\HLet\item|=\:temp
\long\def\c:item:#1#2#3#4{
   \let\EnditemList|=\empty
   \c:def\:ilist{#1}
   \c:def\end:ilist{#2\c:def\:iilist{#1}}
   \c:def\a:item{#3}
   \c:def\b:item{#4}}
>>>






If the second parameter is not empty, it is up to the user to 
introduce \''\EnditemList'.




\SubSection{itemitem}




\<plain+ itemitem list\><<<
\def\:temp#1{\:iilist \let\:iilist|=\empty  
   \def\EnditemitemList{\end:iilist \let\EnditemitemList|=\empty}%
   \a:iitem {#1}\b:iitem}
\HLet\itemitem|=\:temp
\long\def\c:itemitem:#1#2#3#4{
   \let\EnditemitemList|=\empty
   \c:def\:iilist{#1}%
   \c:def\end:iilist{#2\c:def\:iilist{#1}}
   \c:def\a:iitem{#3}
   \c:def\b:iitem{#4}}
>>>

   



If the second parameter is not empty, it is up to the user to 
introduce \''\EnditemitemList'.

%%%%%%%%%%%%%%%%%%%%%
\SubSection{/Line}
%%%%%%%%%%%%%%%%%%%%%

Why \''\centerline' are defined also for latex and non-sty env,
but \''\line' not.

Check \''\a:leftline' and \''\b:leftline' before making any change in \''\line'.

\<plain+ env\><<<
\pend:def\line{\ifx \EndPicture\:UnDef \hbox{\ht:everypar{}\a:line}\fi}
>>>


The \`'\hbox' on the group is required for preserving vertical modes.


\<config plain utilities\><<<
\NewConfigure{line}{1}
>>>




\SubSection{Centerline, Leftline, Rightline}

The original for the following is
\`'\def\centerline#1{\line{\hss#1\hss}}'. We replace the
\''\line' with \''\hbox', because the earlier produces
html code of itself, and surrounding horizontal space from its
definition as \''\hbox to \hsize'.  Similarly is the case for
\''\leftline' and  \''\rightline'.

\<html tex env\><<<
\pend:defI\centerline{\pic:gobble\cnt:a}
\append:defI\centerline{\pic:gobble\cnt:b}
\pend:defI\leftline{\pic:gobble\lft:a}
\append:defI\leftline{\pic:gobble\lft:b}
\pend:defI\rightline{\pic:gobble\a:rightline}
\append:defI\rightline{\pic:gobble\b:rightline}
>>>




In the \`'sty' mode we have the following configuration. Otherwise,
the configuration is empty.

\<config plain utilities\><<<
\NewConfigure{centerline}[2]{\c:def
   \cnt:a{\a:leftline{#1}}\c:def\cnt:b{\b:leftline{#2}}}
\NewConfigure{leftline}[2]{\c:def
   \lft:a{\a:leftline{#1}}\c:def\lft:b{\b:leftline{#2}}}
\NewConfigure{rightline}[2]{\c:def
   \a:rightline{\a:leftline{#1}}\c:def\b:rightline{\b:leftline{#2}}}
\long\def\a:leftline#1{{\ht:everypar{}#1}\expandafter\hbox\:gobble}
\long\def\b:leftline#1{{\ht:everypar{}#1}}
>>>

















\Section{Other}

\<more html tex\><<<
      \let\makeheadline|=\empty
      \let\makefootline|=\empty

>>>







\SubSection{Plain +}




\<html plain+\><<<
\:CheckOption{plain-} \if:Option \else
   \Log:Note{for reduced implementation, 
       use the command line option `plain-'}
   |<plain+ env|> 
   |<plain+ itemitem list|>
\fi
>>>




\SubSection{Narrower}

\<plain+ env\><<<
\pend:def\narrower{\ifx \EndPicture\:UnDef 
    \aftergroup\b:narrower \a:narrower \fi}
>>>

\<config plain utilities\><<<
\NewConfigure{narrower}{2}
>>>




%%%%%%%%%%%%%%%%%%
\Section{manmac}
%%%%%%%%%%%%%%%%%%

\<manmac.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% manmac.4ht                            |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<manmac hooks|>
  |<manmac chapter|>
  |<manmac demo|>
  |<manmac config|>
\Hinput{manmac}
\endinput
>>>

 \AddFile{9}{manmac}

\<manmac config\><<<
\def\specialhat{\ifmmode\def\next{\sp}\else\let\next=\beginxref\fi\next} 
{\catcode`\^=\active \global\let ^=\specialhat }
>>>


\<manmac hooks\><<<
\proofmodefalse

\let\setcornerrules\empty

\let\o:exercise:=\exercise
\let\exercise\:UnDef

\def\exercise{\a:exercise \csname o:exercise:\endcsname\b:exercise}
\NewConfigure{exercise}{2}
\pend:def\copytoblankline{\begingroup\aftergroup\par\:gobble}

\def\checkequals#1#2{}

\append:def\beginlines{\everypar{\strut\HtmlPar}}

\outer\def\begindisplay{\o:obeylines:\startdisplay}
{\catcode`\#=13
 \catcode`\@=6
 \catcode`\^=7
  \o:obeylines:\gdef\startdisplay@1
  {\catcode`\^^M=5@1\bgroup %
   \Configure{MkHalign}%
      {\csname a:manmac-display\endcsname}%
      {\csname b:manmac-display\endcsname}%
      {\csname c:manmac-display\endcsname}%
      {\csname d:manmac-display\endcsname}%
      {\csname e:manmac-display\endcsname}%
      {\csname f:manmac-display\endcsname}%
   \let\par\endgraf %
   \MkHalign#{\indent#\hfil&&\qquad#\hfil}}}
\outer\def\enddisplay{\crcr\EndMkHalign\egroup}
\NewConfigure{manmac-display}{6}

\outer\def\begintt{\a:ttenv
  \bgroup\let\par=\endgraf \ttverbatim \parskip=\z@
  \catcode`\||=0 \rightskip-5pc \ttfinish}
{\catcode`\^=7 
 \catcode`\||=0 ||catcode`||\=\other %
  ||o:obeylines: % end of line is active
  ||gdef||ttfinish#1^^M#2\endtt{#1||vbox{#2}||endgroup||egroup ||b:ttenv}}

\NewConfigure{ttenv}{2}
>>>



\<manmac hooks\><<<
\pend:def\d@nger{\medbreak\a:danger\:gobble}
\append:def\d@nger{\aftergroup\b:danger}
\pend:def\dd@nger{\medbreak\a:ddanger\:gobble}
\append:def\dd@nger{\aftergroup\b:ddanger}
\NewConfigure{danger}{2}
\NewConfigure{ddanger}{2}
>>>

\<manmac chapter\><<<
\def\:tempc#1 #2#3. #4\par{\vfill\break
   \ifodd\pageno \advancepageno\fi
   \let\SV:halign\halign
   \let\halign\TeXhalign
   \let\title:page\def
   \bb:chapter \global\let\bb:chapter=\b:chapter \a:chapter  \c:chapter
       \o:beginchapter:{#1} {#2}{#3}. {#4}\par
   \d:chapter
   \let\halign\SV:halign
}
\HLet\beginchapter\:tempc
>>>

\<manmac chapter\><<<
\expandafter\let\expandafter\:endchapter\csname endchapter\endcsname
\expandafter\def\csname endchapter\endcsname{%
   \let\title:page\:UnDef
   \bb:chapter \global\let\bb:chapter=\empty \csname :endchapter\endcsname
   \everypar{\sl\HtmlPar}}
\pend:def\at:docend{\bb:chapter}
\let\bb:chapter=\empty
\NewConfigure{chapter}{4}
>>>

\<manmac chapter\><<<
\pend:def\titlepage{%
   \ifx \title:page\def \else
      \let\title:page\:UnDef
      \bb:chapter \a:titlepage
      \global\let\bb:chapter=\b:titlepage 
   \fi
}
\NewConfigure{titlepage}{2}
>>>


\<manmac hooks\><<<
\catcode`\!6
\catcode`\#13
\def\:tempc!1!2{% !1=width, !2=text
  \vtop{%
    \Configure{MkHalign}\a:sampleglue\b:sampleglue\c:sampleglue %
                       \d:sampleglue\e:sampleglue\f:sampleglue
    \MkHalign#{\hfil#}!2\cr\EndMkHalign}}
\HLet\sampleglue\:tempc
\catcode`\!12
\catcode`\#6
\NewConfigure{sampleglue}{6}
>>>


\<\><<<
\expandafter\let\expandafter\:beginmathdemo\csname beginmathdemo\endcsname
\expandafter\def\csname beginmathdemo\endcsname{\bgroup 
   \expandafter\everydisplay\expandafter{\expandafter
       \everydisplay\expandafter{\the\everydisplay}}%
   \csname :beginmathdemo\endcsname
}

\expandafter\let\expandafter\:endmathdemo\csname endmathdemo\endcsname
\expandafter\def\csname endmathdemo\endcsname{%
   \csname :endmathdemo\endcsname\egroup}
>>>


\<manmac demo\><<<
\catcode`\#=13
  |<manmac math demo|>
\catcode`\#=6
\expandafter\def\csname endmathdemo\endcsname{\EndMkHalign\egroup}
>>>

\<manmac math demo\><<<
\expandafter\def\csname beginmathdemo\endcsname{\par\bgroup
  \Configure{MkHalign}\a:mathdemo\b:mathdemo\c:mathdemo
                      \d:mathdemo\e:mathdemo\f:mathdemo
  \MkHalign#{#\hfil&$#$\hfil}}
\NewConfigure{mathdemo}{6}
>>>

\<manmac math demo\><<<
\outer\def\begindisplaymathdemo {\par\bgroup
  \Configure{MkHalign}\a:displaymathdemo
                      \b:displaymathdemo
                      \c:displaymathdemo
                      \d:displaymathdemo
                      \e:displaymathdemo
                      \f:displaymathdemo
  \MkHalign#{\indent\hbox to 160pt{#\hfil}&$\displaystyle{#}$\hfil}}
\NewConfigure{displaymathdemo}{6}
>>>

\<manmac math demo\><<<
\outer\def\beginlongmathdemo{\par\bgroup
  \Configure{MkHalign}\a:longmathdemo
                      \b:longmathdemo
                      \c:longmathdemo
                      \d:longmathdemo
                      \e:longmathdemo
                      \f:longmathdemo
  \MkHalign#{\indent\hbox to 210pt{#\hfil}&$#$\hfil}}
\NewConfigure{longmathdemo}{6}
>>>

\<manmac math demo\><<<
\outer\def\beginlongdisplaymathdemo {\par\bgroup
  \Configure{MkHalign}\a:longdisplaymathdemo
                      \b:longdisplaymathdemo
                      \c:longdisplaymathdemo
                      \d:longdisplaymathdemo
                      \e:longdisplaymathdemo
                      \f:longdisplaymathdemo
  \MkHalign#{\indent\hbox to 210pt{#\hfil}&$\displaystyle{#}$\hfil}}
\NewConfigure{longdisplaymathdemo}{6}
>>>


%%%%%%%%%%%%%%%%%%
\Chapter{mex}
%%%%%%%%%%%%%%%%%%


\<mex.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% mex.4ht                               |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{mex}
\endinput
>>>

 \AddFile{8}{mex}








%%%%%%%%%%%%%%%%%%
\Chapter{eplain}
%%%%%%%%%%%%%%%%%%


\<eplain.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% eplain.4ht                            |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<shared plain,eplain|>
  |<eplain hooks|>
  |<eplain listing|>
  |<eplain bbl|>
  |<eplain toc|>
  |<eplain index|>
  |<eplain dates|>
  |<eplain vfootnote|>
  |<eplain lists|>
  |<eplain cols|>
  |<eplain config|>
\Hinput{eplain}
\endinput
>>>

 \AddFile{7}{eplain}


\<eplain bbl\><<<
\def\@citedef#1#2{\expandafter\gdef\csname
   \@citelabel{#1}\endcsname{\a:cite\Link{#1}{}#2\EndLink\b:cite}}
\NewConfigure{cite}{2}
\def\biblabelprint#1{%
   \noindent
   \hbox to \biblabelwidth{%
      \biblabelprecontents
      \a:bibitem
         \bgroup
            \def\csname##1##2##3{##2}%
            \edef\:temp{\noexpand\Link{}{#1}}%
         \expandafter\egroup \:temp
      \biblabelcontents{#1}%
         \EndLink
      \b:bibitem
      \biblabelpostcontents
   }%
   \kern\biblabelextraspace
}%
\NewConfigure{bibitem}{2}
>>>


\<eplain bbl\><<<
\def\:tempc{%
   \let\:bblhook\bblhook
   \append:def\bblhook{\expandafter\everypar
                       \expandafter{\the\everypar \HtmlPar}}%
   \a:bibliography \o:@readbblfile: \b:bibliography
   \let\bblhook\:bblhook}
\HLet\@readbblfile=\:tempc
\NewConfigure{bibliography}{2}
>>>


\<eplain hooks\><<<
\pend:def\flushleft{\a:flushleft}
\append:def\flushleft{\pend:def\@eoljustifyaction{\c:flushleft}}
\pend:def\@endflushleft{\b:flushleft}
\NewConfigure{flushleft}{3}
\pend:def\flushright{\a:flushright}
\append:def\flushright{\pend:def\@eoljustifyaction{\c:flushright}}
\pend:def\@endflushright{\b:flushright}
\NewConfigure{flushright}{3}
\pend:def\center{\a:center}
\append:def\center{\pend:def\@eoljustifyaction{\c:center}}
\pend:def\@endcenter{\b:center}
\NewConfigure{center}{3}
>>>


\<eplain cols\><<<
\catcode`\:=12
\def\makecolumns#1/#2: {\par \begingroup
   \@columndepth = #1
   \advance\@columndepth by #2
   \advance\@columndepth by -1
   \divide \@columndepth by #2
   \@linestogoincolumn = \@columndepth
   \@linestogo = #1
   \currentcolumn = 1
   \def\@endcolumnactions{%
      \ifnum \@linestogo<2
         \the\crtok \egroup
         \csname b:makecolumns\endcsname \endgroup \par 
      \else
         \global\advance\@linestogo by -1
         \ifnum\@linestogoincolumn<2
            \global\advance\currentcolumn by 1
            \global\@linestogoincolumn = \@columndepth
            \expandafter\gdef\csname :makecolumn\endcsname{\csname
               c:makecolumns\endcsname
               \expandafter\global\expandafter\let
                  \csname :makecolumn\endcsname\empty}\the\crtok
         \else
            &\global\advance\@linestogoincolumn by -1
         \fi
      \fi
   }%
   \makeactive\^^M
   \letreturn \@endcolumnactions
   \@columnwidth = \hsize
     \advance\@columnwidth by -\parindent
     \divide\@columnwidth by #2
   \penalty\abovecolumnspenalty
   \noindent \csname a:makecolumns\endcsname
   \valign\bgroup
     &\hbox to \@columnwidth{\strut \hsize = \@columnwidth 
           \csname d:makecolumns\endcsname 
           ##\csname e:makecolumns\endcsname
           \csname :makecolumn\endcsname \hfil}\cr
}
\catcode`\:=11
\let\:makecolumn=\empty
\NewConfigure{makecolumns}{5}
>>>


\<eplain cols\><<<
\def\@columns#1{\def\NumColumns{#1}\a:columns\singlecolumn 
   \ifx \@ndcolumns\relax \let\@ndcolumns=\empty \fi
   \append:def\@ndcolumns{\b:columns}}
\NewConfigure{columns}{2}
>>>


\<eplain index\><<<
\pend:defII\@idxwrite{%
  \csname if@\@idxprefix indexfileopened\endcsname \else
    \expandafter\immediate\openout\csname @\@idxprefix indexfile\endcsname =
      \indexfilebasename.\@idxprefix dx
    \expandafter\global\csname @\@idxprefix indexfileopenedtrue\endcsname
  \fi
  \warn:idx{\jobname}\html:addr
  \hbox{\Link-{}{|<haddr prefix|>\last:haddr}\EndLink}{}%
  \edef\:temp{\write\expandafter\noexpand\csname
     @\@idxprefix indexfile\endcsname{\string \beforeentry{\RefFileNumber
     \FileNumber}{|<haddr prefix|>\last:haddr}{}}}\:temp
}
|<theindex warning|>
\ind:defs
>>>


\<eplain hooks\><<<
\def\:tempc#1#2#3{%
   \html:addr
   \o:definexref:{#1}{\Protect
      \Link{xref\last:haddr}{}#2\Protect\EndLink}{#3}%
   \Link{}{xref\last:haddr}\EndLink
}
\HLet\definexref\:tempc
>>>


\<eplain lists\><<<
\NewConfigure{li}{2}
\def\@finli{%
  \a:li 
  \ifnum\itemnumber=1 \else \interitemskip \fi
  \printitem
  \b:li 
  \ifx\@optionalarg\empty \else
    \expandafter\writeitemxref\expandafter{\@optionalarg}%
  \fi
  \advance\itemnumber by 1
  \advance\itemletter by 1
  \advance\itemromannumeral by 1
  \ignorespaces
}
\NewConfigure{numberedlist}{4}
\append:def\numberedlist{\a:numberedlist
  \Configure{li}{\c:numberedlist}{\d:numberedlist}}
\pend:def\endnumberedlist{\b:numberedlist}
\NewConfigure{orderedlist}{4}
\append:def\orderedlist{\a:orderedlist
  \Configure{li}{\c:orderedlist}{\d:orderedlist}}
\pend:def\endorderedlist{\b:orderedlist}
\NewConfigure{unorderedlist}{4}
\append:def\unorderedlist{\a:unorderedlist
  \Configure{li}{\c:unorderedlist}{\d:unorderedlist}}
\pend:def\endunorderedlist{\b:unorderedlist}
>>>

\<eplain listing\><<<
\def\listing#1{\par \begingroup 
   \a:listing
    \@setuplisting  \setuplistinghook
    \input #1 \b:listing
   \endgroup
}%
\append:def\linenumberedlisting{%
   \everypar = {\advance\lineno by 1 \HtmlPar \printlistinglineno}}
\NewConfigure{listing}{2}
>>>



\<eplain toc\><<<
\pend:defI\readcontentsfile{\a:contents}
\append:defI\readcontentsfile{\b:contents}
\NewConfigure{contents}{2}
>>>

\<eplain toc\><<<
\def\tocchapterentry#1#2{\line{\bf 
   \a:tocchapterentry #1\b:tocchapterentry #2\c:tocchapterentry}}%
\def\tocsectionentry#1#2{\line{\sl 
   \a:tocsectionentry #1\b:tocsectionentry #2\c:tocsectionentry}}%
\def\tocsubsectionentry#1#2{\line{\rm 
   \a:tocsubsectionentry #1\b:tocsubsectionentry
                         #2\c:tocsubsectionentry}}%
\NewConfigure{tocchapterentry}{3}
\NewConfigure{tocsectionentry}{3}
\NewConfigure{tocsubsectionentry}{3}
>>>

\<eplain toc\><<<
\HAssign\toc:N=0
\def\:tempc#1#2#3#4{%
  \def\:temp##1{%
    \o:writenumberedcontentsentry:{#1}{#2}%
      {\Link{toc-##1}{}#3\EndLink}{#4}}%
  \expandafter\:temp\expandafter{\toc:N}%
  \Link{}{toc-\toc:N}\EndLink \gHAdvance\toc:N by 1
}
\HLet\writenumberedcontentsentry=\:tempc
>>>

\<eplain dates\><<<
\let\:tempc\monthname
\pend:def\:tempc{\a:monthname}
\append:def\:tempc{\b:monthname}
\HLet\monthname\:tempc
\let\:tempc\fullmonthname
\pend:def\:tempc{\a:monthname}
\append:def\:tempc{\b:monthname}
\HLet\fullmonthname\:tempc
\NewConfigure{monthname}{2}
\let\:tempc\timestring
\pend:def\:tempc{\a:timestring}
\append:def\:tempc{\b:timestring}
\HLet\timestring\:tempc
\NewConfigure{timestring}{2}
\let\:tempc\timestamp
\pend:def\:tempc{\a:timestamp}
\append:def\:tempc{\b:timestamp}
\HLet\timestamp\:tempc
\NewConfigure{timestamp}{2}
\let\:tempc\today
\pend:def\:tempc{\a:today}
\append:def\:tempc{\b:today}
\HLet\today\:tempc
\NewConfigure{today}{2}
>>>



%%%%%%%%%%%%%%%%%%
\Chapter{ConTeXt}
%%%%%%%%%%%%%%%%%%

\Link[http://www.pragma-ade.nl/]{}{}home\EndLink{}
(\Link[http://www.pragma-ade.nl/general/manuals/mp-cb-en.pdf]{}{}manual\EndLink),
\Link[http://www.berenddeboer.net/tex/LaTeX2ConTeXt.pdf]{}{}LaTeX in proper ConTeXt\EndLink,
\Link[http://www.tug.org/ftp/texlive/Contents/live/texmf/doc/context-omega/context-help.html]{}{}fonts\EndLink


\Link[http://dictionaries.travlang.com/DutchEnglish/]{}{}Dutch dictionary\EndLink

\<context.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% context.4ht                           |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<context with special chars|>
\catcode`\!=11
\catcode`\?=11
  |<utilities for context|>
  |<context page-txt|>
  |<context core-sec|>
  |<context core-sys|>
  |<context core-spa|>
  |<context core-lst|>
  |<context core-itm|>
  |<context core-des|>
  |<context core-ver|>
  |<context core-flt|>
  |<context core-fig|>
  |<context core-mat|>
  |<context thrd-tab, core-tab|>
  |<context core-tbl|>
  |<context core-reg|>
  |<context core-log|>
  |<context core-ref|>
  |<context hooks|>
\catcode`\!=12
\catcode`\?=12
\Hinput{context}
\endinput
>>>

 \AddFile{7}{context}

\<m-tex4ht.tex\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% m-tex4ht.tex                          |version %
% Copyright (C) |CopyYear.2004.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\input tex4ht.sty
\appendtoks
   \Preamble{\env{opt-arg},,xhtml}\EndPreamble
\to \everystarttext
\endinput
>>>




\<context hooks\><<<
\tmp:cnt\normaltime  \divide\tmp:cnt  60 
\edef\:temp{\the\tmp:cnt} 
\multiply\tmp:cnt  -60 \advance\tmp:cnt  \normaltime 
\edef\:today{\the\normalyear-\ifnum \normalmonth<10 0\fi 
  \the\normalmonth-\ifnum \normalday<10 0\fi\the\normalday 
   \space\ifnum \:temp<10 0\fi \:temp 
   :\ifnum \tmp:cnt<10 0\fi\the\tmp:cnt :00} 
>>>

\<context page-txt\><<<
\headertextcontent={}
\footertextcontent={}
>>>


%%%%%%%%%%%%%%%%%%
\Section{Sectioning}
%%%%%%%%%%%%%%%%%%


\<context chapter name\><<<
\v!hoofdstuk 
>>>

\<context section name\><<<
\v!paragraaf 
>>>

\<context subsection name\><<<
\v!sub \v!paragraaf 
>>>

\<context subsubsection name\><<<
\v!sub \v!sub \v!paragraaf
>>>

\<context subsubsubsection name\><<<
\v!sub \v!sub \v!sub \v!paragraaf
>>>

\<context subsubsubsubsection name\><<<
\v!sub \v!sub \v!sub \v!sub \v!paragraaf 
>>>


\<context core-sec\><<<
\let\:doplaatskopnummertekst=\doplaatskopnummertekst
\def\doplaatskopnummertekst#1#2#3#4#5{%
   \expandafter\ifx \csname teskt:#1\endcsname\relax
      \plaatskop:warning{#1}%
   \else
      |<gobble context sectioning head|>%
   \fi
   \:doplaatskopnummertekst{#1}{#2}{#3}{#4}{#5}%
   \expandafter\ifx \csname teskt:#1\endcsname\relax \else
      |<recover context sectioning head|>%
   \fi
}
>>>



\<gobble context sectioning head\><<<
\expandafter\let\expandafter\:tekstcommando 
                      \csname \??ko #1\c!tekstcommando\endcsname
\expandafter\let\csname \??ko #1\c!tekstcommando
              \expandafter\endcsname \csname teskt:#1\endcsname  
>>>

\<recover context sectioning head\><<<
\expandafter\let\csname \??ko #1\c!tekstcommando\endcsname
                                                 \:tekstcommando 
>>>


\<gobble context sectioning head\><<<
\expandafter\let\expandafter\:nummercommando 
                      \csname \??ko #1\c!nummercommando\endcsname
\expandafter\let\csname \??ko #1\c!nummercommando\endcsname
                                                 \:gobble
>>>

\<recover context sectioning head\><<<
\expandafter\let\csname \??ko #1\c!nummercommando\endcsname
                                                 \:nummercommando 
>>>


\<gobble context sectioning head\><<<
\ifdisplaysectionhead
    \def\if:displaysectionhead{\displaysectionheadtrue}%
    \displaysectionheadfalse
\else
    \def\if:displaysectionhead{\displaysectionheadfalse}%
\fi
>>>

\<recover context sectioning head\><<<
\if:displaysectionhead
>>>

\<context core-sec\><<<
\def\plaatskop:warning#1{\expandafter 
   \ifx \csname warn:#1\endcsname\relax
      \:warning{Unconfigured `#1'}%
      \expandafter\let\csname warn:#1\endcsname=\def
   \fi }
>>>


\<context core-sec\><<<
\def\:tmp#1{%
  \let\:tempb=#1%
  \Def:Section#1{\finalsectionnumber}{##1}%
  \expandafter\let
     \csname teskt:\expandafter\:gobble\string #1\endcsname=#1%
  \let#1=\:tempb}
\def\:tempd#1{\edef\:temp{#1}%
  \expandafter\:tmp\csname \:temp\endcsname}
\:tempd{|<context chapter name|>}
\:tempd{|<context section name|>}
\:tempd{|<context subsection name|>}
\:tempd{|<context subsubsection name|>}
\:tempd{|<context subsubsubsection name|>}
\:tempd{|<context subsubsubsubsection name|>}
>>>

\<context core-sec ????\><<<
\let\:tempb=\part
\Def:Section\part{\finalsectionnumber}{#1}
\let\teskt:part=\part
\let\part=\:tempb
>>>

The following is for mark-less (number-less) sectioning commands.


\<context core-sec\><<<
\def\:tempc#1#2#3#4{%
\ifverhoognummer
  \ifplaatskop
     \ifkopnummer \else 
         \expandafter\ifx
            \csname teskt:\v!sub \v!paragraaf\endcsname\relax 
            \:warning{Sectioning \expandafter\string 
                    \csname \v!sub \v!paragraaf\endcsname ?}%
         \else
            \let\sv:endheadplacement\endheadplacement
            \def\endheadplacement##1##2{%
               \global\let\endheadplacement\sv:endheadplacement
               \setbox0=\hbox{}\endheadplacement{#1}{#4}%
               \def\finalsectionnumber{}%
               \csname teskt:\v!sub \v!paragraaf\endcsname{#3}%
            }%
\fi\fi\fi\fi
\o:doplaatskoptekst:{#1}{#2}{#3}{#4}%
}
\HLet\doplaatskoptekst\:tempc
>>>




%%%%%%%%%%%%%
\Section{Table of Contents}
%%%%%%%%%%%%%

Requested through \Verb+\completecontent+ and \Verb+\placecontent+.


\<context core-lst\><<<
\let\:doplaatssamengesteldelijst\doplaatssamengesteldelijst
\def\doplaatssamengesteldelijst[#1][#2]{%
   \ifx #1\v!inhoud
      \expand:after{\TableOfContents[|<context default toc entries|>]}%
   \else 
      \expand:after{\:doplaatssamengesteldelijst[#1][#2]}%
   \fi
}             
\NewConfigure{placecontent}[5]{%
   \def\a:tableofcontents{#1}%
   \def\b:tableofcontents{#2}%
   \def\c:tableofcontents{#3}%
   \def\d:tableofcontents{#4}%
   \def\e:tableofcontents{#5}}
\Configure{placecontent}{}{}{}{}{}
>>>

\<context default toc entries\><<<
part,chapter,section,subsection,subsubsection,%
subsubsubsection,subsubsubsubsection%
>>>


\<context core-lst\><<<
\def\dovolledigesamengesteldelijst[#1][#2]{%
   \expandafter\ifx
       \csname a:\expandafter\:gobble\string#1:head\endcsname
       \relax
       \expandafter\let
          \csname a:\expandafter\:gobble\string#1:head\endcsname
          \empty
       \:warning{No configuration for 
                       `#1' (\expandafter\:gobble\string#1) head}%
   \fi
   \csname a:\expandafter\:gobble\string#1:head\endcsname
   \expanded{\systemsuppliedtitle[#1]{\noexpand\headtext{#1}}}% 
   \csname b:\expandafter\:gobble\string#1:head\endcsname
   \doplaatssamengesteldelijst[#1][#2]}
>>>


\<context core-lst\><<<
\NewConfigure{contenthead}[2]{%
   \def\a:v!inhoud:head{#1}\def\b:v!inhoud:head{#2}}
\Configure{contenthead}{}{}
>>>


\<context list element\><<<
\edef\cur:Name{\cur:Name -li}%
\verify:config\cur:Name{listelement}%  |%lijstelement|%
\csname a:\cur:Name\endcsname        
\def\:tempc{\o:@@nostopattributes: \csname b:\cur:Name\endcsname}%
\HLet\@@nostopattributes\:tempc
\def\:tempc{\o:@@dostopattributes: \csname b:\cur:Name\endcsname}%
\HLet\@@dostopattributes\:tempc
>>>


\<context core-lst\><<<
\NewConfigure{listelement}{2}
>>>
%%%%%%%%%%%%%
\Section{Index}
%%%%%%%%%%%%%

\<context core-reg\><<<
\def\:tempc[#1]#2#3{%
   \o:doprocesspageregister:[#1]{#2}{#3}%
   \def\:temp{\v!index}\ifx \:temp\currentregister
      \a:index
   \fi
}
\HLet\doprocesspageregister\:tempc
\NewConfigure{index}{1}
>>>

\<context core-reg\><<<
\NewConfigure{index-env}{2}
\expandafter\pend:def\csname 
    \??id\v!index\c!voor\endcsname{\everypar{\HtmlPar}}
\expandafter\append:def\csname 
    \??id\v!index\c!na\endcsname{\everypar{\HtmlPar}}
\expandafter\pend:defI\csname
    \??id\v!index\c!commando\endcsname{\a:indexchar}
\expandafter\append:defI\csname \??id\v!index\c!commando\endcsname{\b:indexchar}
\NewConfigure{indexchar}{2}
>>>

\<context core-reg\><<<
\def\:tempc#1#2#3#4{%
   \def\:temp{#1}\def\:tempa{\s!ind}\ifx \:temp\:tempa
      \a:indexpage\o:gotonextinternal:{#1}{#2}{#3}{#4}%
   \else
      \o:gotonextinternal:{#1}{#2}{#3}{#4}%
   \fi
}
\HLet\gotonextinternal\:tempc
\def\c:indexpage:{\def\a:indexpage##1##2##3##4##5}
>>>

%%%%%%%%%%%%%
\Section{Floats}
%%%%%%%%%%%%%

\<context core-flt\><<<
\def\:tempc[#1]{%
   \expandafter\ifx \csname c:#1:\endcsname\relax
      |<add contex float configuration|>%
   \fi
   \csname a:#1\endcsname
   |<save everyinsidefloat|>%
   \expandafter\everyinsidefloat\expandafter{%
      \the\everyinsidefloat 
      \restore:every \aftergroup\restore:every
      \expandafter \aftergroup\csname b:#1\endcsname
      |<EndP at end of float box|>%
   }%
   \o:dodocomplexplaatsblok:[#1]}
\HLet\dodocomplexplaatsblok=\:tempc
\NewConfigure{plaatsblok}{2}
>>>


\<save everyinsidefloat\><<<
\expandafter\tmp:toks\expandafter{\the\everyinsidefloat}%
\def\restore:every{\expandafter\everyinsidefloat
   \expandafter{\the\tmp:toks}}%
>>>

\<EndP at end of float box\><<<
\everyvbox{\everyvbox{}\bgroup \aftergroup\EndP\aftergroup\egroup}%
\def\:tempc##1##2{%
   \let\dowithnextboxcontent\o:dowithnextboxcontent:
   \dowithnextboxcontent{##1}{\everyvbox{}##2}%
}%
\HLet\dowithnextboxcontent\:tempc
>>>

\<add contex float configuration\><<<
\:warning{adding \string\NewConfigure{#1}{2} initialized to
     \string\Configure{plaatsblok}}%
\NewConfigure{#1}{2}
\global\expandafter\let\csname c:#1:\expandafter\endcsname
                                     \csname c:#1:\endcsname
\expandafter\gdef\csname a:#1\endcsname{\a:plaatsblok}%
\expandafter\gdef\csname b:#1\endcsname{\b:plaatsblok}%
>>>



\<context core-flt\><<<
\def\:tempc#1#2#3#4{%
   \o:putcompletecaption:{#1}%
       {\a:caption#2\b:caption}%
       {\c:caption#3\d:caption}{#4}}
\HLet\putcompletecaption\:tempc
\NewConfigure{caption}{4}
>>>




%%%%%%%%%%%%%
\Section{Figures}
%%%%%%%%%%%%%

\<context core-fig\><<<
\def\dodoplaceexternalfigure[#1][#2][#3][#4][#5][#6]{%
  \doifsomething{#3}%
     {\bgroup
      \def\textunderscore{_}% brrr, temp hack
      \calculateexternalfigure[#1][#2][#3][#4][#5][#6]%
      \calculateexternalscreenfigure[#1][#2][#3][#4][#5][#6]%
      \a:externalfigure{#3}%
      \egroup}}
\NewConfigure{externalfigure}{1}
>>>

Toc of figures:

\<context core-fig\><<<
\NewConfigure{figure-li}[4]{%
   \expandafter\def\csname a:figure-li\endcsname{%
      #1%
      \def\:tempc####1####2{#2\o:limitatedlistentry:{####1}{####2}#3}%
      \HLet\limitatedlistentry\:tempc
    }%
    \expandafter\def\csname b:figure-li\endcsname{#4}%
}
\Configure{figure-li}{}{}{}{}
\NewConfigure{title-ko}{2} 
>>>

Captions:

\<context core-fig\><<<
\NewConfigure{-@@kjfigure}{2}
>>>



%%%%%%%%%%%%%
\Section{Item Groups}
%%%%%%%%%%%%%


\<context core-itm\><<<
\def\:tempc[#1][#2]{\o:redostartitemgroup:[#1][#2]%
   \verify:config{\currentitemgroup-group}{itemgroup}%
   \csname a:\currentitemgroup-group\endcsname}
\HLet\redostartitemgroup=\:tempc
\pend:def\stopitemgroup{%
   \csname b:\currentitemgroup-group\endcsname}
\NewConfigure{itemgroup}{2}
>>>

\<context core-itm\><<<
\pend:def\dolistitem{\HLet\noindent\item:noindent}
\append:def\dolistitem{%   
   \csname b:|<itemize group type|>-item\endcsname}
\def\item:noindent#1\strutdepth{#1\strutdepth
   \let\noindent\o:noindent:
   \verify:config{|<itemize group type|>-item}%
                 {|<itemize type|>-listitem}%
   \csname a:|<itemize group type|>-item\endcsname}%
\NewConfigure{head-listitem}{2}
\NewConfigure{symbol-listitem}{2}
\NewConfigure{other-listitem}{2}
>>>

\<itemize type\><<<
\ifheaditem     head\else
\ifsymbolitem symbol\else
              other\fi\fi
>>>

\<itemize group type\><<<
\currentitemgroup -|<itemize type|>%
>>>

%%%%%%%%%%%%%
\Section{Verbatim}
%%%%%%%%%%%%%


\<context core-ver\><<<
\pend:defI\dostarttyping{\a:typing}
\append:defI\initializetyping{%
   \aftergroup\b:typing
   \def\obeyedspace {\d:typing}%
   \def\obeyedline{}%
   \Configure{HtmlPar}{\c:typing}{\c:typing}{}{}%
}
\NewConfigure{typing}{4}
>>>


The configurations fail to recognize empty lines. Why??


\Verbatim
\def\obeyedline{\HCode{<br />}}   
\def\obeyedspace{\HCode{\string&}\HChar{-35}\HCode{x00A0;}}
\EndVerbatim



%%%%%%%%%%%%%
\Section{Tables}
%%%%%%%%%%%%%



\Verbatim
[c]   \cc:table \c:tableCell ##\d:tableCell \tabskip \LeftTabskip & 
[g-|] \g:tableCell \hfil \startglobalTABLEcolor \vrule \!thWidth 4\!taLTU 
       ##\hfil \s topglobalTABLEcolor 
       \tabskip 8.81241pt plus 1.5fil minus 4.4062pt\relax \d:tabl eCell & 
[a-R] \hfil \a:tableCell \raggedleft ##\b:tableCell \empty & 
[g-|] \g:tableCell \hf il \startglobalTABLEcolor 
      \vrule \!thWidth 4\!taLTU ##\hfil 
      \stopglobalTABLEcol or \relax \h:tableCell & 
[a-R] \hfil \a:tableCell \raggedleft ##\b:tableCell \empty & 
[g-|] \g:tableCell \hfil \startglobalTABLEcolor 
      \vrule \!thWidth 4\!taLTU ##\hfil \s topglobalTABLEcolor \relax 
      \h:tableCell & 
[a-L] \empty \a:tableCell \raggedright ##\f :tableCell \hfil & 
[g-|] \g:tableCell \hfil \startglobalTABLEcolor \vrule 
      \!thWidth 4 \!taLTU ##\hfil \stopglobalTABLEcolor \relax \h:tableCell & 
[a-P] \hfil \a:tableCell  \BeginTableParBox {1.25in}##\EndTableParBox 
      \b:tableCell \hfil & 
[g-|] \g:tableCell \ hfil \startglobalTABLEcolor \vrule 
      \!thWidth 4\!taLTU ##\hfil 
      \stopglobalTABLEc olor \relax 
      \h:tableCell \tabskip \RightTabskip & 
[e]   \e:tableCell ##\f:tableCell \ tabskip 0pt \cr 

a: cell-1
c: cell-2
e: cell-3
g: cell-4
\EndVerbatim

THe c-cells seem to be ignored




\<context with special chars\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\putVBorder{\expandafter\put:VBorder\VBorder</>!*?: }
\def\put:VBorder#1</#2>#3!*?: {\def\:temp{#2}\ifx\:temp\empty
     \HCode{\VBorder}%
     \def\:temp{#1}\ifx\:temp\empty \else\HCode{</colgroup>}\fi
     \HCode{<colgroup><col/></colgroup>}%
  \else  \def\:temp{\put:VBorder#3!*?: }\expandafter\:temp\fi
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>>>


currentTABLEcolumn,
maxTABLEcolumn


\<context thrd-tab, core-tab\><<<
\gdef\cc:table{\c:table}

\NewConfigure{tableCell}{5}
\def\showbaselines
  {\testrulewidth\defaulttestrulewidth
   \EveryPar{\HtmlPar\ruledbaseline}}

\NewConfigure{table}{6}
\def\:tempc{%
   \ifnum \!taColumnNumber>0
       \expandafter\!taDataColumnTemplate\expandafter
          {\expandafter\a:tableCell
           \the\!taDataColumnTemplate\x:tableCell}%
\expandafter\let\expandafter\:temp
                     \csname preamble-\the\!taColumnNumber\endcsname
       \expandafter\expandafter\expandafter\!taDataColumnTemplate
       \expandafter\expandafter\expandafter
          {\expandafter\:temp
           \the\!taDataColumnTemplate\x:tableCell}%
\expandafter\let\csname preamble-\the\!taColumnNumber\endcsname\:UnDef
   \fi
   \o:!tfAdjoinPriorColumn:
}
\HLet\!tfAdjoinPriorColumn=\:tempc

\def\!ttDoHalign
  {\baselineskip \zeropoint
   \lineskiplimit\zeropoint
   \lineskip     \zeropoint
   \tabskip      \zeropoint
   \HRestore\noalign
   \a:table
   \TeXhalign \the\!taTableSpread \bgroup
   \span\the\!taPreamble }

\def\finishTABLE
  {\chuckTABLEautorow
   \unskip\dd:table\crcr
   \egroup \b:table \expandafter\:gobble
   \EndTable
   \global\intablefalse
   \egroup}

\def\finishTABLErow
  {\dd:table\crcr
   \TABLEnoalign
     {\nobreak
      \setTABLEaction\TABLEunknown
      \setTABLEerror\TABLEunknown
      \globalletempty\checkTABLEautorow
      \globalletempty\chuckTABLEautorow
      \global\currentTABLEcolumn\zerocount}}


\def\endofTABLEline[#1][#2->#3]#4#5%
  {\ifx#2#3\else
     \writestatus\m!TABLE{\string#2\space changed into \string#3}%
   \fi
   \iftracetables
     \bgroup
     \tttf\space
     \ifnum\TABLEerror=\TABLEunknown
       \ifx#2#3\else\string#2->\fi
     \else
       ->%
     \fi
     \color[#1]{\string#3}%
     \ifsplittables\space\the\TABLEmaxheight/\the\TABLEheight\fi
     \ifx\TABLEgraylineerror\empty
       \space\TABLEgraylinestatus
     \else
       \space\TABLEgraylineerror
     \fi
     \egroup
   \else\ifx\TABLEgraylineerror\empty \else   \fi\fi
   \globalletempty\TABLEgraylinestatus
   \globalletempty\TABLEgraylineerror
   \expandafter\normalTABLElineformat#4#5\dd:table\crcr 
   \TABLEnoalign{\nobreak\global\setTABLEactiontrue}}



\def\!ttDoZero#1{\dd:table\cr}

\def\!ttDoPlus#1#2#3{% #1 eats the +
  \AugmentedTableStrut{#2}{#3}%
  \dd:table\cr}

% DO STANDARD: Insert standard table strut
\def\!ttDoStandard{%
  \StandardTableStrut
  \dd:table\cr}


\def\!tfFinishFormat{%
  \ifnum \TracingFormats>0
    \!thMessage{%
      \space \space r: \the\!taOldRuleColumnTemplate
        \tabskip \the\RightTabskip}%
    \!thMessage{%
      \space *c: ##\tabskip 0pt}
  \fi
  \ifnum \!taColumnNumber<2
    \!thError{%
      \ifnum \!taColumnNumber=0
        No
      \else
        Only 1
      \fi
      "||"}%
      {\!thReadErrorMsg\!tfTooFewBarsA
       ^^J\!thReadErrorMsg\!tfTooFewBarsB
       ^^J\!thReadErrorMsg\!tkFixIt}%
  \fi
  \!thToksEdef\!taPreamble={%
    \noexpand\cc:table \noexpand
    \b:tableCell ####\noexpand\x:tableCell\tabskip\LeftTabskip
    &
    \the\!taPreamble \tabskip\RightTabskip
    &
    \noexpand\c:tableCell ####\noexpand\x:tableCell
                                       \tabskip 0pt \noexpand\cr}%
  \ifnum \TracingFormats>1
    \!thMessage{Preamble=\the\!taPreamble}
  \fi
  \ifnum \TracingFormats>2
    \!thMessage{Row Of Widths="\!tfRowOfWidths"}
  \fi
  \!taBeginFormatfalse % Intercepts "||", tabskips, and "."
  \catcode`\||=13
  \catcode`\"=13
  \!ttDoHalign}




\def\!tfSetVrule
  {\!thToksEdef\!taRuleColumnTemplate=
      {\noexpand\d:tableCell
       \noexpand\hfil
       \noexpand\startglobalTABLEcolor % added
       \noexpand\vrule
       \noexpand\!thWidth
       \ifnum\!tgCode=\plusone
         \ifx\!tgValue\empty
           \the\LineThicknessFactor
         \else
           \!tgValue
         \fi
         \!taLTU
       \else
         \!tgValue
       \fi
       ####%
       \noexpand\hfil
       \noexpand\stopglobalTABLEcolor % added
       \the\!taRuleColumnTemplate
       \relax \noexpand\x:tableCell
   }%
  \!tfAdjoinPriorColumn}


\NewConfigure{VBorder}{4}

\HAssign\NewGroup=0
\HAssign\Next:TableNo=0
\HAssign\ar:cnt=0


\let\:mALIGN\empty \let\hT:D\empty

\pend:defI\ReadFormatKeys{%
   \expandafter\ifx\csname preamble-\the\!taColumnNumber\endcsname\relax
   \expandafter\def\csname preamble-\the\!taColumnNumber\endcsname{%
        \let\:mALIGN\empty \def\hT:D{\csname \string ##1:T:D\endcsname}}%
   \fi
   \:FormatKey
}

\let\:FormatKey=\empty
\NewConfigure{FormatKey}[2]{%
   \def\:temp{#1#2}\ifx \:temp\empty  \let\:FormatKey=\empty
   \else
      \append:def\:FormatKey{\def\:tempa{#1}\ifx \:temp\:tempa
         #2%
      \fi }%
   \fi
}

\Configure{FormatKey}{l}{\add:ar<}
\Configure{FormatKey}{r}{\add:ar>}
\Configure{FormatKey}{c}{\add:ar-}
\Configure{FormatKey}{p}{\d:VBorder}
\Configure{FormatKey}{||}{\b:VBorder}
\pend:def\BeginFormat{\add:ar-}

\let\HAlign=\empty
\def\add:ar#1{\HAdvance\ar:cnt by 1
   \def\ch:class{#1}%
   \c:VBorder
   \edef\HAlign{\HAlign 0 \ar:cnt\space #1 }}

\def\!ttDoZero#1{\dd:table\cr}
\def\!ttDoPlus#1#2#3{% 
  \AugmentedTableStrut{#2}{#3}%
  \dd:table \cr}
\def\!ttDoStandard{%
  \StandardTableStrut
  \dd:table \cr}

\def\normalTABLElongrule{\a:TABLElongrule}
\NewConfigure{TABLElongrule}{1}

\def\simpleTableHL{\a:TableHL}
\NewConfigure{TableHL}{1}
>>>



%%%%%%%%%%%%%
\Section{Tabs}
%%%%%%%%%%%%%

\<context core-tbl\><<<
\expandafter\def\csname \e!start\v!tabulate\endcsname{%
    \csname a:\v!tabulate\endcsname \bgroup
         \expandafter\aftergroup\csname b:\v!tabulate\endcsname
           \HRestore\noalign \let\halign\TeXhalign
            \dodoubleempty\donormalstarttabulate}
\NewConfigure{\v!tabulate}{2}
>>>




%%%%%%%%%%%%%
\Section{Math}
%%%%%%%%%%%%%

\<context core-mat\><<<
\let\normalreqno\eqno
\let\normalleqno\leqno
>>>



\'+(#1,#2)=outer(ref,sub) (#3,#4)=inner(ref,sub)+

\<context core-mat\><<<
\def\:tempc#1#2#3#4{%
   \a:formulenummer
      \o:dododoformulenummer:{#1}{#2}{#3}{#4}%
   \b:formulenummer}
\HLet\dododoformulenummer\:tempc

\NewConfigure{formulenummer}{2}
\Configure{formulenummer}
    {\HCode{<span class="formulenummer">}}
    {\HCode{</span>}}
\Css{.formulenummer {width:20\%; float:right;}}
>>>



\<context core-mat\><<<
\pend:def\startdisplaymath{\a:displaymath}
\append:def\stopdisplaymath{\b:displaymath}
\NewConfigure{displaymath}{2}
\Configure{displaymath}
   {\ifvmode \IgnorePar\fi \EndP \HCode{<div class="displaymath">}}
   {\ifvmode \IgnorePar\fi \EndP \HCode{</div>}}
\Css{div.displaymath {text-align:center;}}
>>>




%%%%%%%%%%%%%
\Section{Spacing}
%%%%%%%%%%%%%

\<context core-spa\><<<
\def\:tempc[#1]{%
   \o:complexstartsmaller:[#1]%
   \a:narrower\bgroup\aftergroup\b:narrower\aftergroup\egroup}
\HLet\complexstartsmaller\:tempc
\NewConfigure{narrower}{2}
>>>


\<context core-spa\><<<
\def\:tempc#1#2{%
   \ifx #1\hss
     \ifx #2\hss\a:midaligned \bgroup \aftergroup \b:midaligned
     \else      \a:rightaligned \bgroup \aftergroup \b:rightaligned
     \fi
   \else        \a:leftaligned \bgroup \aftergroup \b:leftaligned
   \fi
   \let\:temp\bgroup \def\bgroup{\let\bgroup=\:temp}%
   \o:doalignline:{#1}{#2}}
\HLet\doalignline\:tempc
\NewConfigure{midaligned}{2}
\NewConfigure{leftaligned}{2}
\NewConfigure{rightaligned}{2}
>>>

\<context core-spa\><<<
\def\:tempc#1{%
   \def\last:Attributes{#1}%
   \ifx \last:Attributes\empty
   \else
      |<do at start attributes|>%
      \let\last:Attributes=\empty
   \fi
   \o:dostartattributes:{#1}
  }
\HLet\dostartattributes\:tempc
>>>


\<do at start attributes\><<<
\get:curName\??be          \ifx \cur:Name\empty 
   \get:curName\??li       \ifx \cur:Name\empty 
      \get:curName\??ly    \ifx \cur:Name\empty 
         \get:curName\??ko \ifx \cur:Name\empty 
            |<another context env|>%
         \else
            |<context sec title env|>%
         \fi
      \else
         |<context layout env|>%
      \fi
   \else
      |<context list element|>%
   \fi
\else
   |<start stop env|>%
\fi
>>>


\<context core-sys\><<<
\NewConfigure{layout}{2}
>>>

\<context layout env\><<<
\edef\cur:Name{\cur:Name -ly}%
\verify:config\cur:Name{layout}% 
\csname a:\cur:Name\endcsname        
\def\:tempc{\o:@@nostopattributes: \csname b:\cur:Name\endcsname}%
\HLet\@@nostopattributes\:tempc
\def\:tempc{\o:@@dostopattributes: \csname b:\cur:Name\endcsname}%
\HLet\@@dostopattributes\:tempc
>>>


\<context core-sys\><<<
\NewConfigure{sectie}{2}
>>>

\<context sec title env\><<<
\edef\cur:Name{\cur:Name -ko}%
\verify:config\cur:Name{sectie}% 
\csname a:\cur:Name\endcsname        
\def\:tempc{\o:@@nostopattributes: \csname b:\cur:Name\endcsname}%
\HLet\@@nostopattributes\:tempc
\def\:tempc{\o:@@dostopattributes: \csname b:\cur:Name\endcsname}%
\HLet\@@dostopattributes\:tempc
>>>


\<context core-sys\><<<
\NewConfigure{context-attr}{2}
>>>





\<another context env\><<<
\edef\cur:Name{\cur:Name -\last:Attributes}%
\verify:config\cur:Name{context-attr}% 
\csname a:\cur:Name\endcsname        
\def\:tempc{\o:@@nostopattributes: \csname b:\cur:Name\endcsname}%
\HLet\@@nostopattributes\:tempc
\def\:tempc{\o:@@dostopattributes: \csname b:\cur:Name\endcsname}%
\HLet\@@dostopattributes\:tempc
>>>


\<context core-spa\><<<
\def\:tempc[#1]{%
   \o:dostartopelkaar:[#1]%
   \verify:config{\currentregister-env}{null-default-env}%
   \csname a:\currentregister-env\endcsname
}
\HLet\dostartopelkaar\:tempc
\pend:def\stopopelkaar{%
   \csname b:\currentregister-env\endcsname
}
>>>

%%%%%%%%%%%%%
\Section{System Macros}
%%%%%%%%%%%%%

\<context core-sys\><<<
\NewConfigure{startstop}{2}
>>>

\<start stop env\><<<
\verify:config\cur:Name{startstop}%
\csname a:\cur:Name\endcsname        
\def\:tempc{\o:@@nostopattributes: \csname b:\cur:Name\endcsname}%
\HLet\@@nostopattributes\:tempc
\def\:tempc{\o:@@dostopattributes: \csname b:\cur:Name\endcsname}%
\HLet\@@dostopattributes\:tempc
>>>








\<utilities for context\><<<
\def\get:curName#1{%
   \ifx \last:Attributes\empty
      \let\cur:Name\empty
   \else
      \bgroup
         \let#1=\empty 
         \edef\:temp{\def\noexpand\:temp{\last:Attributes}}%
         \expandafter
      \egroup\:temp
      \edef\:tempa{\last:Attributes}%
      \edef\cur:Name{\ifx\:temp\:tempa\else\:temp\fi}%
   \fi }
\let\last:Attributes=\empty
>>>

\<utilities for context\><<<
\def\verify:config#1#2{%
   \expandafter\ifx \csname c:#1:\endcsname\relax
      \expandafter\ifx \csname c:#2:\endcsname\relax
        \:warning{adding null \string\NewConfigure{#1}{2}}%
        \expandafter\def\csname c:#1:\endcsname##1##2{}%
      \else
        \:warning{adding \string\NewConfigure{#1}{2} 
                to equal \string\Configure{#2}{...}{...}}%
        \edef\:temp{\noexpand\NewConfigure{#1}[2]{%
           \gdef\expandafter\noexpand\csname
                    a:#1\endcsname{\expandafter
                                \noexpand\csname a:#2\endcsname}%
           \gdef\expandafter\noexpand\csname
                    b:#1\endcsname{\expandafter
                                \noexpand\csname b:#2\endcsname}%
        }}\:temp
        \Configure{#1}{}{}%
        \global\expandafter\let \csname c:#1:\expandafter
                       \endcsname \csname c:#1:\endcsname
      \fi
   \fi
}
>>>

\<utilities for context\><<<
\def\verify:configIII#1#2{%
   \expandafter\ifx \csname c:#1:\endcsname\relax
      \expandafter\ifx \csname c:#2:\endcsname\relax
        \:warning{adding null \string\NewConfigure{#1}{3}}%
        \expandafter\def\csname c:#1:\endcsname##1##2##3{}%
      \else
        \:warning{adding \string\NewConfigure{#1}{3} 
                to equal \string\Configure{#2}{...}{...}{...}}%
        \edef\:temp{\noexpand\NewConfigure{#1}[3]{%
           \gdef\expandafter\noexpand\csname
                    a:#1\endcsname{\expandafter
                                \noexpand\csname a:#2\endcsname}%
           \gdef\expandafter\noexpand\csname
                    b:#1\endcsname{\expandafter
                                \noexpand\csname b:#2\endcsname}%
           \gdef\expandafter\noexpand\csname
                    c:#1\endcsname{\expandafter
                                \noexpand\csname c:#2\endcsname}%
        }}\:temp
        \Configure{#1}{}{}{}%
        \global\expandafter\let \csname c:#1:\expandafter
                       \endcsname \csname c:#1:\endcsname
      \fi
   \fi
}
>>>


\<utilities for context\><<<
\def\verify:configIV#1#2{%
   \expandafter\ifx \csname c:#1:\endcsname\relax
      \expandafter\ifx \csname c:#2:\endcsname\relax
        \:warning{adding null \string\NewConfigure{#1}{4}}%
        \expandafter\def\csname c:#1:\endcsname##1##2##3##4{}%
      \else
        \:warning{adding \string\NewConfigure{#1}{4} 
                to equal \string\Configure{#2}{...}{...}{...}{...}}%
        \edef\:temp{\noexpand\NewConfigure{#1}[4]{%
           \gdef\expandafter\noexpand\csname
                    a:#1\endcsname{\expandafter
                                \noexpand\csname a:#2\endcsname}%
           \gdef\expandafter\noexpand\csname
                    b:#1\endcsname{\expandafter
                                \noexpand\csname b:#2\endcsname}%
           \gdef\expandafter\noexpand\csname
                    c:#1\endcsname{\expandafter
                                \noexpand\csname c:#2\endcsname}%
           \gdef\expandafter\noexpand\csname
                    d:#1\endcsname{\expandafter
                                \noexpand\csname d:#2\endcsname}%
        }}\:temp
        \Configure{#1}{}{}{}{}%
        \global\expandafter\let \csname c:#1:\expandafter
                       \endcsname \csname c:#1:\endcsname
      \fi
   \fi
}
>>>


%%%%%%%%%%%%%
\Section{Descriptions}
%%%%%%%%%%%%%

\<context core-des\><<<
\def\normal@@definitiewoord#1[#2]#3#4{%
   \verify:config{#1-des}{description-word}%
   \csname a:#1-des\endcsname \doattributes
     {\??dd#1}\c!kopletter\c!kopkleur
     {\getvalue{\??dd#1\c!commando}{#4}}%
   \csname b:#1-des\endcsname \rawreference\s!def{#2}{#3}}
\NewConfigure{description-word}{2}
>>>





\<context core-des\><<<
\def\@@somedefinitie#1[#2]#3{%
  \dowithpar 
     {\bgroup
         \verify:configIII{#1-item}{description-item}%
         \csname a:#1-item\endcsname 
         \executedoordefinitie{#1}[#2]{#3}\csname 
                            b:#1-item\endcsname }%
     {\csname c:#1-item\endcsname \@@stopdefinitie{#1}}}
\def\@@startsomedefinitie#1[#2]#3{%
   \bgroup 
      \verify:configIII{#1-item}{description-item}%
      \csname a:#1-item\endcsname
      \BeforePar{%
         \executedoordefinitie{#1}[#2]{#3}\csname 
                               b:#1-item\endcsname}\bgroup
                                       \expandafter\aftergroup
             \csname c:#1-item\endcsname\aftergroup\egroup
   \GotoPar}
\NewConfigure{description-item}{3}
>>>


%%%%%%%%%%%%%
\Section{Cross Referencing}
%%%%%%%%%%%%%

\<context core-ref\><<<
\NewConfigure{-@@ur}{2}
>>>

%%%%%%%%%%%%%
\Section{Logos}
%%%%%%%%%%%%%

\<context core-log\><<<
\def\:tempc{ConTeXt}
\HLet\ConTeXt\:tempc
>>>





%%%%%%%%%%%%%%%%%%
\Part{Xhtml}
%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%
\Section{Xhtml}
%%%%%%%%%%%%%%%%%%




\<configure 4ht\><<<
\ConfigureHinput>>>

\<end configure 4ht\><<<

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput\empty\empty\empty\empty\empty\empty                  %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%>>>










%%%%%%%%%%%%%%%%%%%
\SubSection{amsopn}
%%%%%%%%%%%%%%%%%%%

\<amsopn.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% amsopn.4ht                            |version %
% Copyright (C) |CopyYear.1997.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<amsopn hooks|>
\Hinput{amsopn}
\endinput
>>>        \AddFile{5}{amsopn}


\<amsopn hooks\><<<
\expandafter\pend:defIII\csname qopname \endcsname{\a:qopname}
\NewConfigure{qopname}{1}
>>>


%%%%%%%%%%%%%%%%%%%%%
\Section{Languages and encodings}
%%%%%%%%%%%%%%%%%%%%%%

Latex  records current encoding in \`'\cf@encoding'.




\<cp850.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% cp850.4ht                          |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<cp850 config|>
\Hinput{cp850}
\endinput
>>>                        \AddFile{9}{cp850}

\<cp850 config\><<<
\expand:after{\long\def}\csname
     ?\string\textdegree\endcsname{\ensuremath {{\sp\circ }}}
\long\def\mathonesuperior{{\sp1}} 
\long\def\maththreesuperior{{\sp3}} 
\long\def\mathtwosuperior{{\sp2}} 
>>>







\<cp852.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% cp852.4ht                          |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<cp852 config|>
\Hinput{cp852}
\endinput
>>>                        \AddFile{9}{cp852}

\<cp852 config\><<<
\expand:after{\long\def}\csname
     ?\string\textdegree\endcsname{\ensuremath {{\sp\circ }}}
>>>


\<cp862.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% cp862.4ht                          |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<cp862 config|>
\Hinput{cp862}
\endinput
>>>                        \AddFile{9}{cp862}

\<cp862 config\><<<
\expand:after{\long\def}\csname
     ?\string\textdegree\endcsname{\ensuremath {{\sp\circ }}}
\long\def\mathtwosuperior{{\sp2}} 
\long\def\mathordmasculine{{\sp o}} 
\long\def\mathordfeminine{{\sp a}} 
>>>



\<cp1250.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% cp1250.4ht                         |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<cp1250 config|>
\Hinput{cp1250}
\endinput
>>>                        \AddFile{9}{cp1250}

\<cp1250 config\><<<
\expand:after{\long\def}\csname
     ?\string\textdegree\endcsname{\ensuremath {{\sp\circ }}}
>>>


\<cp1252.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% cp1252.4ht                         |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<cp1252 config|>
\Hinput{cp1252}
\endinput
>>>                        \AddFile{9}{cp1252}

\<cp1252 config\><<<
\expand:after{\long\def}\csname
     ?\string\textdegree\endcsname{\ensuremath {{\sp\circ }}}
\long\def\mathtwosuperior{{\sp2}} 
\long\def\mathordmasculine{{\sp o}} 
\long\def\mathordfeminine{{\sp a}} 
>>>

\<cp437.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% cp437.4ht                          |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<cp437 config|>
\Hinput{cp437}
\endinput
>>>                        \AddFile{9}{cp437}

\<cp437 config\><<<
\expand:after{\long\def}\csname
     ?\string\textdegree\endcsname{\ensuremath {{\sp\circ }}}
\long\def\mathtwosuperior{{\sp2}} 
\long\def\mathnsuperior{{\sp n}} 
>>>




\<cp437de.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% cp437de.4ht                        |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<cp437de config|>
\Hinput{cp437de}
\endinput
>>>                        \AddFile{9}{cp437de}

\<cp437de config\><<<
\expand:after{\long\def}\csname
     ?\string\textdegree\endcsname{\ensuremath {{\sp\circ }}}
\long\def\mathtwosuperior{{\sp2}} 
\long\def\mathnsuperior{{\sp n}} 
>>>


\<cp865.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% cp865.4ht                          |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
|<cp865 config|>
\Hinput{cp865}
\endinput
>>>                        \AddFile{9}{cp865}

\<cp865 config\><<<
\expand:after{\long\def}\csname
     ?\string\textdegree\endcsname{\ensuremath {{\sp\circ }}}
\long\def\mathtwosuperior{{\sp2}} 
\long\def\mathnsuperior{{\sp n}} 
>>>





\<norsk.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% norsk.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{norsk}
\endinput
>>>                        \AddFile{9}{norsk}




\<polish.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% polish.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{polish}
\endinput
>>>                        \AddFile{9}{polish}



\<polski.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% polski.4ht                          |version %
% Copyright (C) |CopyYear.2002.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<load ot4enc if needed|>
\Hinput{polski}
\endinput
>>>                        \AddFile{9}{polski}


\<load ot4enc if needed\><<<
\def\:temp{OT4}\ifx \:temp\encodingdefault
      \def\:tempa#1#2{%
         \def\:tempb##1{%
           \def\:temp####1##1####2//{\def\:temp{####2}}%
           \expandafter\:temp\@filelist##1//%
         }
         \edef\:temp{\noexpand\:tempb{%
            \expandafter\expandafter\expandafter
              \:gobble\expandafter\string \csname #1\endcsname
              .#2}}%
         \:temp}
   \:tempa{ot4enc}{def}
   \ifx \:temp\empty
     \:tempa{ot4cmr}{fd}         
      \ifx \:temp\empty \else
         \input ot4enc.4ht
      \fi
   \fi
\fi
>>>





\<portuges.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% portuges.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{portuges}
\endinput
>>>                        \AddFile{9}{portuges}




\<romanian.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% romanian.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{romanian}
\endinput
>>>                        \AddFile{9}{romanian}




\<russianb.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% russianb.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{russianb}
\endinput
>>>                        \AddFile{9}{russianb}




\<scottish.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% scottish.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{scottish}
\endinput
>>>                        \AddFile{9}{scottish}




\<slovak.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% slovak.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{slovak}
\endinput
>>>                        \AddFile{9}{slovak}




\<slovene.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% slovene.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{slovene}
\endinput
>>>                        \AddFile{9}{slovene}




\<spanish.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% spanish.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<spanish defs|>
\Hinput{spanish}
\endinput
>>>                        \AddFile{9}{spanish}



The followings are needed to componsate for the extra \''\relax\space' in
\''\def\protect##1{\string\protect\string##1\relax\space}'.

\<spanish defsNO\><<<
\Configure{writetoc}
   {\def\:writetoc{\protect\@umlaut}\ifx \"\:writetoc
       \def\"{\string\"}%
    \fi
    \def\:writetoc{\protect\@tilde}\ifx \~\:writetoc
       \def\~{\string\~}%
    \fi
    \def\:writetoc{\protect\@acute}\ifx \'\:writetoc
       \def\'{\string\'}%
    \fi
   }
\bgroup
\catcode`\"=13
\def\:temp{\Configure{writetoc}{\add:protect"\add:protect\>}}
\expandafter\egroup \:temp
>>>



\<spanish defs\><<< 
\def\spanish:shorthand#1{\leavevmode \hbox{\csname a:spanish"#1\endcsname}}
\def\:temp{\spanish:shorthand o}
\expandafter\HLet\csname spanish@sh@\string"@o@\endcsname=\:temp
\def\:temp{\spanish:shorthand a}
\expandafter\HLet\csname spanish@sh@\string"@a@\endcsname=\:temp
\NewConfigure{spanish"a}{1}
\NewConfigure{spanish"o}{1}
>>>






\<spanish defs\><<< 
\pend:defIII\es@accent{%
    \expandafter\:text@composite@x
    \csname OT1\string##1\endcsname##3\@empty}
\def\:text@composite@x#1#2{%
   \expandafter\ifx \csname \string#1-\string#2\endcsname\relax
      \expandafter\ifx \csname \string#1- :\endcsname\relax
          \expandafter\expandafter\expandafter\:gobble
      \else
          \expandafter\expandafter
          \expandafter\expandafter
          \expandafter\expandafter
          \csname \string#1- :\endcsname
      \fi
   \else \expandafter\:gobble
   \fi
   {#2}%
   }
\def\chk:acc#1#2#3{%
   \if !#2!\expandafter\:gobbleIII \else
       \if \string#1\string#2%
          \a:es@accents#3\b:es@accents
          \expandafter\expandafter\expandafter\gob:accc
       \else
          \expandafter\expandafter\expandafter\chk:acc
       \fi
   \fi
   {#1}%
}
\def\gob:accc#1{\gob:acc}
\def\gob:acc#1#2{\if !#2!\expandafter\gobe:acc
   \else \expandafter\gob:acc\fi 
}
\ifes@LaTeXe 
   \def\gobe:acc#1\@text@composite#2\@text@composite#3{}
\else 
   \let\gobe:acc=\:gobble
\fi
\NewConfigure{es@accent}[2]{\expandafter
   \def\csname #1- :\endcsname##1{\chk:acc{##1}#2{}{}}}
\NewConfigure{es@accents}{2}
>>>






\<swedish.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% swedish.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{swedish}
\endinput
>>>                        \AddFile{9}{swedish}




\<turkish.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% turkish.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{turkish}
\endinput
>>>                        \AddFile{9}{turkish}




\<ukraineb.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% ukraineb.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{ukraineb}
\endinput
>>>                        \AddFile{9}{ukraineb}




\<usorbian.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% usorbian.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{usorbian}
\endinput
>>>                        \AddFile{9}{usorbian}




\<welsh.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% welsh.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{welsh}
\endinput
>>>                        \AddFile{9}{welsh}





\<hebrew.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% hebrew.4ht                            |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>
  |<hebrew ldf|>
\Hinput{hebrew}
\endinput
>>>                        \AddFile{9}{hebrew}


\<hebrew ldf\><<< 
\def\hebdate#1#2#3{%
  \a:moreR\beginR\a:moreL\beginL\number#1\endL\b:moreL\ \bet\hebmonth{#2}
         \a:moreL\beginL\number#3\endL\b:moreL\endR\b:moreR}
\def\@@hebrew#1{\a:moreR\beginR{{\tohebrew#1}}\b:moreR\endR}
>>>





\<austrian.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% austrian.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{austrian}
\endinput
>>>                        \AddFile{9}{austrian}





\<catalan.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% catalan.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{catalan}
\endinput
>>>                        \AddFile{9}{catalan}




\<croatian.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% croatian.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{croatian}
\endinput
>>>                        \AddFile{9}{croatian}




\<czech.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% czech.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{czech}
\endinput
>>>                        \AddFile{9}{czech}




\<danish.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% danish.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{danish}
\endinput
>>>                        \AddFile{9}{danish}




\<dutch.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% dutch.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{dutch}
\endinput
>>>                        \AddFile{9}{dutch}





\<english.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% english.4ht                        |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{english}
\endinput
>>>                        \AddFile{9}{english}




\<esperant.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% esperant.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{esperant}
\endinput
>>>                        \AddFile{9}{esperant}




\<estonian.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% estonian.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{estonian}
\endinput
>>>                        \AddFile{9}{estonian}




\<finnish.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% finnish.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{finnish}
\endinput
>>>                        \AddFile{9}{finnish}




\<francais.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% francais.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{francais}
\endinput
>>>                        \AddFile{9}{francais}




\<galician.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% galician.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{galician}
\endinput
>>>                        \AddFile{9}{galician}




\<germanb.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% germanb.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{germanb}
\endinput
>>>                        \AddFile{9}{germanb}

\<config germanbNO\><<<
\bgroup
\catcode`\"=13
\def\:temp{\Configure{writetoc}{\add:protect"}}
\expandafter\egroup \:temp
>>>


\<greek.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% greek.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Configure{AtBeginDocument}
  {\immediate\write\@mainaux{\catcode`\string\^=7}} {}

\Hinput{greek}
\endinput
>>>                        \AddFile{9}{greek}

grrek.sty sends \`'\catcode`^^9f\active' into the aux file.
Hence the change of \`'^' into catcode 7. The aux file is
loaded within group, so the above changes are local.


\<ngermanb.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% ngermanb.4ht                          |version %
% Copyright (C) |CopyYear.2000.       Eitan M. Gurari         %
|<TeX4ht copyright|>

\Hinput{ngermanb}
\endinput
>>>                        \AddFile{9}{ngermanb}








\Section{Exams}


\<exam.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% exam.4ht                                  |version %
% Copyright (C) |CopyYear.2001.       Eitan M. Gurari         %
|<TeX4ht copyright|>
\ifx \ps@examheadings\:unDef 
   |<start skip|>
\fi
\:temp
   |<hook Meer exam|>
   \Hinput{exam}
|<end skip|>
\ifx \@checkqueslevel\:unDef 
   |<start skip|>
\fi
\:temp
   |<hook Hirschhorn' exam|>
   \Hinput{exam}
|<end skip|>
\ifx \@OneKeyHook\:unDef 
   |<start skip|>
\fi
\:temp
   |<hook Alexanders' exam|>
   \Hinput{exam}
|<end skip|>
\endinput
>>>                        
\AddFile{9}{exam}


\<start skip\><<<
\bgroup
   \catcode`\%=12
   \def\:temp{\catcode`\\=9 \catcode`\#=9 \:tempa}
   \long\def\:tempa#1%%%%%%%%%%%%%%%%%%%end:skip{\egroup}
\else
   \let\:temp\empty
>>>

\<end skip\><<<
%%%%%%%%%%%%%%%%%%%end:skip
>>>



\SubSection{Philip Hirschhorn}


\Link[http://www-math.mit.edu/\string ~psh/]{}{}home\EndLink{}
(\Link[http://ctan.tug.org/tex-archive/macros/latex/contrib/supported/exam/]{}{}ctan\EndLink)


\<hook Hirschhorn' exam\><<<
\let\exam:questions=\questions
\def\questions{%
   \let\exam:list=\list 
   \def\list{\let\list=\exam:list\begin{list}}%
   \exam:questions  }
\pend:def\endquestions{%
   \let\exam:list=\endlist 
   \def\endlist{\let\endlist=\exam:list \end{list}}}
\let\exam:parts=\parts
\def\parts{%
   \let\exam:list=\list 
   \def\list{\let\list=\exam:list\begin{list}}%
   \exam:parts  }
\pend:def\endparts{%
   \let\exam:list=\endlist 
   \def\endlist{\let\endlist=\exam:list \end{list}}}
\let\exam:subparts=\subparts
\def\subparts{%
   \let\exam:list=\list 
   \def\list{\let\list=\exam:list\begin{list}}%
   \exam:subparts  }
\pend:def\endsubparts{%
   \let\exam:list=\endlist 
   \def\endlist{\let\endlist=\exam:list \end{list}}}
>>>


\<hook Hirschhorn' exam\><<<
\long\def\uplevel#1{\par\a:uplevel{#1}\b:uplevel\par}
\long\def\fullwidth#1{\par\a:fullwidth{#1}\b:fullwidth\par}
\NewConfigure{uplevel}{2}
\NewConfigure{fullwidth}{2}
>>>


\<hook Hirschhorn' exam\><<<
\def\@setpoints{%
  \if@placepoints
    \if@pointsinmargin
            \a:setpoints(\@points\@marginpointname)\b:setpoints            
    \else
            \a:setpoints(\@points\@pointname)\b:setpoints
    \fi
    \@placepointsfalse
  \fi
}
\NewConfigure{setpoints}{2}
>>>




\SubSection{Hans van der Meer's class}

\Link[http://www.tex.ac.uk/tex-archive/macros/latex/contrib/supported/exams/]{}{}Hans van der Meer's class\EndLink





\<hook Meer exam\><<<
\pend:defI\scorebox{\a:scorebox}
\append:defI\scorebox{\b:scorebox}
\NewConfigure{scorebox}{2}
>>>



\SubSection{<Alexanders' Exam}

\Link[http://ctan.tug.org/tex-archive/macros/latex/contrib/supported/examdesign/]{}{}Alexanders' exam\EndLink


\<hook Alexanders' exam\><<<
|<alex hook utilities|>
|<hooks for section types|>
\pend:def\@enddocumenthook{{\tt \tmp:cnt=1 \seed:hooks }}
>>>

\<alex hook utilities\><<<
\def\seed:hooks{%
  \ifnum \tmp:cnt>\c@section \else 
     |<trace exam data|>%     
     |<type-oriented hooks|>
     \advance\tmp:cnt by 1
     \expandafter\seed:hooks 
  \fi  
}
>>>


\<type-oriented hooks\><<<
\expandafter\ifx\csname type@sec\romannumeral\tmp:cnt\endcsname
      \@shortanswer
  |<hooks for shortanswer|>
\fi
\expandafter\ifx\csname type@sec\romannumeral\tmp:cnt \endcsname\@fixed
  |<hooks for fixed|>
\fi
\expandafter\ifx\csname type@sec\romannumeral\tmp:cnt \endcsname\@fillin
  |<hooks for fillin|>
\fi
\expandafter\ifx\csname type@sec\romannumeral\tmp:cnt \endcsname\@fillinstar
  |<hooks for fillinstar|>
\fi
\expandafter\ifx\csname type@sec\romannumeral\tmp:cnt \endcsname\@MC
  |<hooks for MC|>
\fi
\expandafter\ifx\csname type@sec\romannumeral\tmp:cnt \endcsname\@MCstar
  |<hooks for MCstar|>
\fi
\expandafter\ifx\csname type@sec\romannumeral\tmp:cnt \endcsname
     \@shortanswerstar
  |<hooks for shortanswerstar|>
\fi
\expandafter\ifx\csname type@sec\romannumeral\tmp:cnt \endcsname
     \@truefalse
  |<hooks for truefalse|>
\fi
\expandafter\ifx\csname type@sec\romannumeral\tmp:cnt \endcsname
     \@truefalsestar
  |<hooks for truefalsestar|>
\fi
\expandafter\ifx\csname type@sec\romannumeral\tmp:cnt \endcsname\@fixedstar
  |<hooks for fixedstar|>
\fi
>>>




\<hooks for shortanswer\><<<
\def\:temp{|<redef blank|>}%
|<hooks for answers|>%
|<hooks for section heads|>% 
|<hooks on instruction preamble|>%
>>>



\<hooks for shortanswerstar\><<<
|<cond head and inst hooks|>% 
>>>

% \def\:temp{|<redef blank|>}%
% |<hooks for answers|>%




\<hooks for fixed\><<<
\def\:temp{|<redef blank|>}%
|<hooks for answers|>%
|<hooks for section heads|>% 
|<hooks on instruction preamble|>%
>>>



\<hooks for fixedstar\><<<
\def\:temp{|<redef blank|>}%
|<hooks for answers|>%
|<cond head and inst hooks|>%
>>>



\<hooks for fillin\><<<
\def\:temp{|<redef blank|>}%
|<hooks for answers|>%
|<hooks for section heads|>% 
|<hooks on instruction preamble|>%
>>>

\<hooks for fillinstar\><<<
\def\:temp{|<redef blank|>}%
|<hooks for answers|>%
|<cond head and inst hooks|>%
>>>


\<hooks for MC\><<<
\def\:temp{|<reconfigure multiplechoice|>}%
|<hooks for answers|>%
|<hooks for section heads|>% 
|<hooks on instruction preamble|>%
>>>


MC stands for multi-choice

\<hooks for MCstar\><<<
\def\:temp{|<reconfigure multiplechoice|>}%
|<hooks for answers|>%
|<cond head and inst hooks|>%
>>>


\<hooks for truefalse\><<<
\def\:temp{|<redef truefalse answer|>}%
|<hooks for answers|>%
|<hooks for section heads|>%
|<hooks on instruction preamble|>%
>>>




\<hooks for truefalsestar\><<<
\def\:temp{|<redef truefalse answer|>}%
|<hooks for answers|>%
|<cond head and inst hooks|>%
>>>

\<cond head and inst hooks\><<<
\expandafter\ifx
   \csname head@sec\romannumeral\tmp:cnt \endcsname\relax \else
   |<hooks for section heads|>%
\fi
\expandafter\ifx
   \csname inst@sec\romannumeral\tmp:cnt \endcsname\relax \else
   |<hooks on instruction preamble|>%
\fi
>>>



\<hooks for section heads\><<<
\expandafter\pend:def\csname sec\romannumeral\tmp:cnt @fixed\endcsname{%
  \gdef\beforesectsep{0pt \a:sectiontitle
     \global\let\beforesectsep\sv:beforesectsep}%
  \gdef\aftersectsep{0pt \b:sectiontitle
     \global\let\aftersectsep\sv:aftersectsep}% 
}%
\global\expandafter
  \let\csname sec\romannumeral\tmp:cnt @fixed\expandafter\endcsname
     \csname sec\romannumeral\tmp:cnt @fixed\endcsname
>>>


\<hook Alexanders' exam\><<<
\NewConfigure{sectiontitle}{2}
>>>




\<alex hook utilities\><<<
\let\sv:beforesectsep\beforesectsep
\let\sv:aftersectsep\aftersectsep
>>>


\<hooks on instruction preamble\><<<
\expandafter\pend:def
    \csname inst@sec\romannumeral\tmp:cnt\endcsname{\a:instructions}%
\expandafter\append:def
    \csname inst@sec\romannumeral\tmp:cnt\endcsname{\b:instructions\par}%
\global\expandafter\let
    \csname inst@sec\romannumeral\tmp:cnt \expandafter\endcsname
    \csname inst@sec\romannumeral\tmp:cnt\endcsname
>>>




\<hooks for answers\><<<
\global  \csname qlist@scr@sec\romannumeral\tmp:cnt 
  \expandafter\expandafter\expandafter
     \endcsname
  \expandafter\expandafter\expandafter{\expandafter\:temp
     \the\csname qlist@scr@sec\romannumeral\tmp:cnt \endcsname}
>>>

\<redef blank\><<<
\ifx \blank\:UnDef 
  \:warning{tex4ht encountered a problem
      with \csname type@sec\current@section\endcsname}
\else
\ifanswer
   \ifcblanks
      \def\blank####1{\a:answer ####1\b:answer}%
   \fi
   \ifpblanks
      \def\blank####1{\a:answer ####1\b:answer}%
   \fi
\else
   \ifcblanks
      \pend:defI\blank{\a:question}
      \append:defI\blank{\b:question}
   \fi
   \ifpblanks
      \pend:defI\blank{\a:question}
      \append:defI\blank{\b:question}
   \fi
\fi \fi
>>>


\<redef truefalse answer\><<<
  \pend:defI\@separator{\def\@tfitem{%
    \ifanswer
       \item[\a:answer
           \csname tf@sol\current@question\endcsname\b:answer]%
    \else
       \item
    \fi}}%
>>>


\<hook Alexanders' exam\><<<
\NewConfigure{answer}{2}
\NewConfigure{question}{2}
>>>




\<hook Alexanders' exam\><<<
\pend:defI\MCfont{\a:MCfont}
\append:defI\MCfont{\b:MCfont}
\NewConfigure{MCfont}{2}
>>>

\<hook Alexanders' exam\><<< 
\Configure{MCfont}
 {\HCode{<span class="MCfont">}}    {\HCode{</span>}}
\Css{dt .MCfont {text-decoration:underline;}}
>>>


\<reconfigure multiplechoice\><<<
\boxfalse
>>>>




\<hook Alexanders' exam\><<<
\NewConfigure{instructions}{2}
>>>



\<trace exam data\><<<
\section:data
>>>

\<alex hook utilities\><<<
\def\section:data{
\par[\the\tmp:cnt]
\par [qlist@sec\romannumeral\tmp:cnt]  
   \expandafter\meaning\csname qlist@sec\romannumeral\tmp:cnt\endcsname :
   \expandafter \edef\expandafter \:temp\expandafter {\expandafter
      \the\csname qlist@sec\romannumeral\tmp:cnt\endcsname}
   \meaning\:temp
\par [qlist@scr@sec\romannumeral\tmp:cnt] 
   \expandafter\meaning\csname qlist@scr@sec\romannumeral\tmp:cnt\endcsname :
   \expandafter \edef\expandafter \:temp\expandafter {\expandafter
      \the\csname qlist@scr@sec\romannumeral\tmp:cnt\endcsname}
   \meaning\:temp
\par [inst@sec\romannumeral\tmp:cnt] 
   \expandafter\meaning\csname inst@sec\romannumeral\tmp:cnt\endcsname
\par [head@sec\romannumeral\tmp:cnt]
   \expandafter\meaning\csname head@sec\romannumeral\tmp:cnt\endcsname
\par [type@sec\romannumeral\tmp:cnt] 
   \expandafter\meaning\csname type@sec\romannumeral\tmp:cnt\endcsname
\par [sec\romannumeral\tmp:cnt @fixed]  
   \expandafter\meaning\csname sec\romannumeral\tmp:cnt @fixed\endcsname
\par ****************************************\par
}
\let\section:data=\empty
>>>






\<hook Alexanders' exam\><<<
\pend:def\@examtopmatter{\bgroup
   \pend:def\namedata{\let\hrulefill=\empty \a:namedata}%
   \append:def\namedata{\b:namedata}%
   \pend:def\classdata{\a:classdata}%
   \append:def\classdata{\b:classdata}%
   \let\examtop=\empty  \let\endexamtop=\empty
   \begin{examtop}}
\append:def\@examtopmatter{%
    \end{examtop} \egroup\bigskip}
\NewConfigure{classdata}{2}
\NewConfigure{namedata}{2}
>>>



\<hook Alexanders' exam\><<<
\pend:def\@keytopmatter{\bgroup
   \let\keytop=\empty  \let\endkeytop=\empty
   \begin{keytop}}
\append:def\@keytopmatter{%
    \end{keytop} \egroup\bigskip}
>>>




\<hook Alexanders' exam\><<<
\append:def\frontmatter@wrap@up{%
  \ifx\@frontmattertext\relax  \else
     \pend:def\@frontmattertext{\a:frontmatter}
     \append:def\@frontmattertext{\b:frontmatter}
  \fi
}
\NewConfigure{frontmatter} {2}
>>>













\AddFile{9}{mktex4ht}


\Part{The Templet mktex4ht.4ht}

\bgroup
\immediate\openout15=mktex4ht.cnf
\def\AddFile#1#2{\immediate\write15{\string\AddFile{#1}{#2}}}
\ConfigFiles
\immediate\closeout15
\egroup

\openin15=th4.4ht
\ifeof15 
   \<mktex4ht.4ht\><<<
   \write16{**********************************}
   \write16{*** recompile 'tex tex4ht-4ht' ***}
   \write16{**********************************}
   >>>
   \OutFiles
   \write16{****************************************************}
   \write16{*** compile the file again with 'tex tex4ht-4ht' ***}
   \write16{****************************************************}
   \csname bye\endcsname
\fi

\input cond4ht.4ht


%-------------------------------------------------------
\let\OPO=\OutputCodE
\def\OutputCodE\<#1\>{%
   \openin15=\HOME/#1
   \ifeof15    \Needs{"ln -s #1 \HOME/#1"} 
        \immediate\write16{"cd \HOME; ln -s \SOURCE/#1 . ; cd \SOURCE"} \fi
   \closein15
   \OPO\<#1\>}

\OutFiles


\OutputCodE\<m-tex4ht.tex\>
\OutputCodE\<usepackage.4ht\>
\OutputCodE\<showfonts.4ht\>
\OutputCodE\<idxmake.4ht\>
\OutputCodE\<bibtex.4ht\>
\bye











