\ifnum\the\catcode`\%=14\else\expandafter\edef\csname
  \string:RestoreCatcodes\endcsname{\catcode`\%\the
  \catcode`\%}\catcode`\%14\fi
% tex4ht.sty (2025-02-27-12:30), generated from tex4ht-sty.tex
% Copyright 2009-2025 TeX Users Group
% Copyright 1996-2009 Eitan M. Gurari
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any
% later version. The latest version of this license is in
%   https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions
% of LaTeX version 2005/12/01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
% The Current Maintainer of this work
% is the TeX4ht Project <https://tug.org/tex4ht>.
%
% If you modify this program, changing the
% version identification would be appreciated.
\immediate\write-1{version 2025-02-27-12:30}


\ifx  \Preamble\UnDef  \else
   % fix for LaTeX hook system, \AtBeginDocument is not available at this moment
   \let\origatbegindocument\AtBeginDocument
   \def\AtBeginDocument#1{\AddToHook{begindocument/end}{#1}}
   \csname expand:after\endcsname{\csname
       BeforeTeXIVht\endcsname\let\BeforeTeXIVht\UnDef}
   \let\AtBeginDocument\origatbegindocument

\fi

% we used to disable new LaTeX's tagging support,
% because it clashed with TeX4ht and caused fatal errors
% we fixed the fatal errors, so it should be possible to
% fix other issues as well. The upside will be that we
% should be able to coordinate the projects and reuse some code.
% https://github.com/michal-h21/make4ht/issues/145
% \ifdefined\DocumentMetadata
%   \def\DocumentMetadata#1{\def\:DocumentMetadata{#1}}
% \fi

\def\writesixteen#1{\immediate\write99999{#1}}
\expandafter\edef\csname :RestoreCatcodes\endcsname{%
   \expandafter\ifx \csname :RestoreCatcodes\endcsname\relax\else
      \csname :RestoreCatcodes\endcsname \fi
   \ifnum \the\catcode`\ =10 \else
      \catcode`\noexpand\ =\the\catcode`\ \fi
   \ifnum \the\catcode`<=12 \else
      \catcode`\noexpand <\the\catcode`<\fi
   \ifnum \the\catcode`>=12 \else
      \catcode`\noexpand >\the\catcode`>\fi
   \ifnum \the\catcode`\?=12 \else
      \catcode`\noexpand \?\the\catcode`\?\fi
   \ifnum \the\catcode`+=12 \else
      \catcode`\noexpand +\the\catcode`+\fi
   \ifnum \the\catcode`*=12 \else
      \catcode`\noexpand *\the\catcode`*\fi
   \ifnum \the\catcode`;=12 \else
      \catcode`\noexpand ;\the\catcode`;\fi
   \ifnum \the\catcode`~=13 \else
      \catcode`\noexpand ~\the\catcode`~\fi
   \ifnum \the\catcode`$=3 \else
      \catcode`\noexpand $\the\catcode`$\fi
   \ifnum \the\catcode`&=4 \else
      \catcode`\noexpand &\the\catcode`&\fi
   \ifnum \the\catcode`\#=6 \else
      \catcode`\noexpand \#\the\catcode`\#\fi
   \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
   \ifnum \the\catcode`^=13
   \let\expandafter\noexpand
                     \csname x:SUPOff\endcsname\noexpand\empty
   \let\expandafter\noexpand
                     \csname x:SUPOn\endcsname\noexpand\empty
   \catcode`\noexpand ^\the\catcode`^\fi
\ifnum \the\catcode`_=13
   \let\expandafter\noexpand
                     \csname x:SUBOff\endcsname\noexpand\empty
   \let\expandafter\noexpand
                     \csname x:SUBOn\endcsname\noexpand\empty
   \catcode`\noexpand _\the\catcode`_\fi
%
   \let\expandafter\noexpand\csname :RestoreCatcodes\endcsname
                                   \noexpand\UnDefcS}
\catcode`~13  \catcode`$3   \catcode`&4  \catcode`\#6
\catcode`\:11 \catcode`\@11 \catcode`;12 \catcode`\ 10
\catcode`\<12 \catcode`\>12 \catcode`+12 \catcode`*12
\catcode`\?12
\def\SUPOn{}
\def\SUBOn{}
\edef\SUPOff{%
   \catcode`\noexpand ^\the\catcode`^\relax
}
\edef\SUBOff{%
   \catcode`\noexpand _\the\catcode`_\relax
}
\bgroup
   \catcode`\^13   \global\let\sys:sp^
   \catcode`\_13   \global\let\sys:sb_
\egroup

\catcode`\^7 \catcode`\|=12  \catcode`"12

    \def\:temp{\csname newif\endcsname}
    \def\:tempa#1{%
       \expandafter\ifx \csname #1\endcsname\relax
          \expandafter\:temp   \csname #1\endcsname
       \fi}
\:tempa{if:Option}
\:tempa{if:latex}
\:tempa{if:removeindent}
\:tempa{if:nopar}
\ifx \Htmltrue\:UnDef
   \def\:temp{\csname newif\endcsname}
   \expandafter\:temp \csname ifHtml\endcsname  \Htmlfalse
\fi

    \def\:tempa#1{%
       \expandafter\ifx \csname #1\endcsname\relax
          \expandafter\:temp   \csname #1\endcsname
          \expandafter\expandafter\expandafter\expandafter\expandafter
             \def\expandafter\expandafter\expandafter
             \rmv:ifs\expandafter{\rmv:ifs
             \expandafter\let \csname #1\endcsname  \:UnDef}
       \fi}
    \let\rmv:ifs\empty


\expandafter\ifx \csname @latex@error\endcsname\relax
    \:latexfalse  \tracingstats1
\else
   \if:latex\else \ifx \@currname\empty
   \def\:temp{\ifx \HCode\:UnDef
   \:warning{Missing \string\Preamble...\string\EndPreamble?}\fi}
\edef\:tempa{%
  \noexpand\expandafter
  \noexpand\expandafter
  \noexpand\expandafter
  \noexpand            \def
  \noexpand\expandafter
  \noexpand\expandafter
  \noexpand\expandafter
  \expandafter\noexpand\csname enddocument\endcsname
  \noexpand\expandafter
  \noexpand\expandafter
  \noexpand\expandafter
                      {\noexpand        \expandafter
                       \noexpand        \:temp
           \expandafter\noexpand \csname enddocument\endcsname
                      }%
}  \:tempa

\else
   \ProvidesPackage{tex4ht}
\let\config:file\empty
\def\load:cfg{\def\load:cfg{\let\config:opt\CurrentOption
   \def\load:cfg{\edef\config:opt{\config:opt,\CurrentOption}}%
}%
%
   \def\:temp{\expandafter\cfg:fl\CurrentOption.!*?: }%
   \def\:tempa{html}\ifx \:tempa\CurrentOption \let\:temp\load:cfg \fi
   \def\:tempa{xhtml}\ifx \:tempa\CurrentOption \let\:temp\load:cfg \fi
   \def\:tempa{htm}\ifx \:tempa\CurrentOption \let\:temp\load:cfg \fi
   \def\:tempa{htm3}\ifx \:tempa\CurrentOption \let\:temp\load:cfg \fi
   \def\:tempa{htm4}\ifx \:tempa\CurrentOption \let\:temp\load:cfg \fi
   \def\:tempa{htm5}\ifx \:tempa\CurrentOption \let\:temp\load:cfg \fi
   \:temp
}
\def\cfg:fl#1.#2!*?: {\edef\:tempa{#2}\edef\config:file{%
   \CurrentOption \ifx \:tempa\empty  .cfg\fi}}

\DeclareOption*{\load:cfg}
\ProcessOptions
\let\o:document\document
\def\document{%
   \let\ht:empty\:UnDef
\def\:temp{}\ifx \:temp\empty \else
  \gdef\:temp{}\ifx \:temp\empty \else
     \:warning{Redefined \string\empty?}
     \global\let\ht:empty\empty \gdef\empty{}%
\fi\fi
%
   \ifdefined\AddToHook%
      \def\document{\endgroup\o:document}%
      % use new LaTeX hook system to execute \Configure{AtBeginDocument}
      \AddToHook{begindocument/before}[tex4ht]{\csname a:AtBeginDocument\endcsname}
      \AddToHook{begindocument/end}[tex4ht]{\csname b:AtBeginDocument\endcsname}
   \else%
      %\expandafter\let\csname enddocument\endcsname\empty
      %\end{document}%
      %\let\document\o:document
      \let\:begindocumenthook\@begindocumenthook
\def\@begindocumenthook{\csname a:AtBeginDocument\endcsname
\:begindocumenthook \csname b:AtBeginDocument\endcsname }%
%
      \let\document\o:document%
   \fi%
   \let\:latex@error\@latex@error
   \def\@latex@error##1{\:latex@error{##1 in `\config:file'}}%
   \csname recall:sub\endcsname
\csname recall:sup\endcsname
%
\ifx \config:file\empty
   \def\:temp{\ifx \config:opt\:UnDef
   \edef\config:opt{\ifx \config:file\empty html\fi}\fi
\expandafter\Preamble\expandafter{\config:opt
   }\csname begin\endcsname{document}\EndPreamble
}%
\else
   \def\:temp{\input \config:file\relax
}%
\fi \:temp
%
   \let\@latex@error\:latex@error
}

\fi
\fi
   \:latextrue
   \ifx \:providesfile \:UnDef
      \let\:providesfile\@providesfile
      \def\@providesfile#1{%
         \expandafter\ifx\csname @filelist\endcsname\relax
               \let\@providesfile\:providesfile
         \else \xdef\@filelist{\@filelist,#1}%
         \fi
         \:providesfile{#1}%
      }
   \fi
\fi

\ifx  \Preamble\UnDef
    \ifx \PLATFORM\:UnDef \else
        \message{ [\PLATFORM] }\let\PLATFORM\:UnDef\fi
    \def\Configure#1{%
  \expandafter\ifx \csname c:#1:\endcsname\relax
     \:warning{\string\Configure{#1}?}
  \fi
  \csname c:#1:\endcsname}
\let\c:def\def
\let\d:def\def
\def\NewConfigure#1{\def\:tempa{#1}\futurelet\:temp\Nw:cnf}
\def\Nw:cnf{\ifx [\:temp \edef\:tempa{\noexpand\N:wCnfga{\:tempa}}\else
   \edef\:tempa{\noexpand\N:wCnfgb{\:tempa}}\fi \:tempa}
\def\N:wCnfga#1[#2]{%
  \edef\:temp{\long\def\expandafter
    \noexpand\csname c:#1:\endcsname####1%
    \ifnum #2>1 ####2\fi    \ifnum #2>2 ####3\fi
    \ifnum #2>3 ####4\fi    \ifnum #2>4 ####5\fi
    \ifnum #2>5 ####6\fi    \ifnum #2>6 ####7\fi
    \ifnum #2>7 ####8\fi    \ifnum #2>8 ####9\fi
}\:temp }
\def\N:wCnfgb#1#2{%
  \edef\:temp{\long\def\expandafter
    \noexpand\csname c:#1:\endcsname####1%
    \ifnum #2>1 ####2\fi    \ifnum #2>2 ####3\fi
    \ifnum #2>3 ####4\fi    \ifnum #2>4 ####5\fi
    \ifnum #2>5 ####6\fi    \ifnum #2>6 ####7\fi
    \ifnum #2>7 ####8\fi    \ifnum #2>8 ####9\fi
{\New:Conf{\aNew:Conf#1}{####1}%
      \ifnum #2>1 \New:Conf{\bNew:Conf#1}{####2}\fi
      \ifnum #2>2 \New:Conf{\cNew:Conf#1}{####3}\fi
      \ifnum #2>3 \New:Conf{\dNew:Conf#1}{####4}\fi
      \ifnum #2>4 \New:Conf{\eNew:Conf#1}{####5}\fi
      \ifnum #2>5 \New:Conf{\fNew:Conf#1}{####6}\fi
      \ifnum #2>6 \New:Conf{\gNew:Conf#1}{####7}\fi
      \ifnum #2>7 \New:Conf{\hNew:Conf#1}{####8}\fi
      \ifnum #2>8 \New:Conf{\iNew:Conf#1}{####9}\fi
     }}\:temp}
\def\New:Conf#1{\noexpand\c:def
   \expandafter\noexpand\csname#1\endcsname}%
\def\c:NewConfigure:#1#2#3#4#5#6#7#8#9{%
   \def\aNew:Conf{#1}\def\bNew:Conf{#2}\def\cNew:Conf{#3}%
   \def\dNew:Conf{#4}\def\eNew:Conf{#5}\def\fNew:Conf{#6}%
   \def\gNew:Conf{#7}\def\hNew:Conf{#8}\def\iNew:Conf{#9}}
\Configure{NewConfigure}{a:}{b:}{c:}{d:}{e:}{f:}{g:}{h:}{i:}%

\long\def\ConfigureToc#1#2#3#4#5{%
   \expandafter\def\csname toc#1\endcsname##1##2##3{#5}%
   \def\:temp{#4}\ifx \:temp\empty \else
   \expandafter\pend:defIII\csname toc#1\endcsname{#4####3}%
\fi
\def\:temp{#3}\ifx \:temp\empty \else
   \expandafter\pend:defIII\csname toc#1\endcsname{#3####2}%
\fi
\def\:temp{#2}\ifx \:temp\empty \else
   \expandafter\pend:defIII\csname toc#1\endcsname{#2####1}%
\fi
%
}

\long\def\concat:config#1#2{\def\:temp{#2}%
   \ifx \:temp\empty  \let#1\empty
   \else \ifx #1\relax  \let#1\empty\fi
       \append:def#1{#2}\fi
}
\def\:prolog#1#2,#3!*?: {%
   \if ,#2,\else
      \edef\:tempc{\if*#2\fi}%
      \ifx \:tempc\empty
         \expandafter\append:def
            \csname a:#1\endcsname{\csname a:#2\endcsname}%
         \expandafter\ifx \csname c:#2:\endcsname\relax
            \NewConfigure{#2}{1}%
         \fi
      \else
         \expand:after{\pro:log{#1}}\expandafter{\:tempc}%
   \fi\fi
   \if ,#3,\else \expand:after{\:prolog{#1}#3!*?: }\fi
}
\def\pro:log#1#2{%
   \expandafter\append:def
       \csname a:#1\endcsname{\csname a:#2\endcsname}%
   \expandafter\ifx \csname c:#2:\endcsname\relax
       \NewConfigure{#2}[1]{\expandafter
            \concat:config\csname a:#2\endcsname{##1}}%
       \expandafter\let\csname a:#2\endcsname\relax
   \fi
}
\def\seq:config#1#2{%
   \expandafter\let\csname a:#1\endcsname=\empty
   \:prolog {#1}#2,!*?: }

\NewConfigure{AtBeginDocument}[2]{%
   \def\:temp{#1#2}\ifx \:temp\empty
     \concat:config\a:AtBeginDocument{}
     \concat:config\b:AtBeginDocument{}%
   \else
     \concat:config\a:AtBeginDocument{#1\relax}%
     \concat:config\b:AtBeginDocument{#2\relax}%
   \fi
   \global\let\a:AtBeginDocument=\a:AtBeginDocument
   \global\let\b:AtBeginDocument=\b:AtBeginDocument
}
\Configure{AtBeginDocument}{}{}
\NewConfigure{Css}[1]{\def\aa:Css{#1}}

\catcode`\#=12   \def\#{#}   \catcode`\#=6
\NewConfigure{special}[1]{\def\ht:special{#1}}
\Configure{special}{\special
}
\long\def\expand:after#1{\def\e:tmp{#1}\expandafter\e:tmp}
\def\Log:Note#1{%
   \immediate\write-1{--------------------------------------}%
   \immediate\write-1{--- Note --- #1}%
   \immediate\write-1{--------------------------------------}%
}
\NewConfigure{CutAt-filename}[1]{%
   \expandafter\def\csname a:CutAt-filename\endcsname##1##2{#1}}
\Configure{CutAt-filename}{}
\long\def\append:def#1#2{%
   \long\def\:temp{\long\def#1}%
   \expandafter\expandafter\expandafter\:temp\expandafter{#1#2}}
\long\def\pend:def#1#2{%
   \long\def\:temp{#2}%
   \long\def\:tempa{\long\def#1}%
   \expandafter\expandafter\expandafter\expandafter
       \expandafter\expandafter\expandafter\:tempa
   \expandafter\expandafter\expandafter{\expandafter\:temp #1}}
\long\def\pend:defI#1#2{%
   \long\def\:tempa{\long\def#1####1}%
   \ex:pend{#2}{\expandafter\:temp #1{##1}}}
\long\def\ex:pend#1{\long\def\:temp{#1}%
  \expandafter\expandafter\expandafter\expandafter
       \expandafter\expandafter\expandafter\:tempa
   \expandafter\expandafter\expandafter}
\long\def\append:defI#1#2{%
   \long\def\:temp{\long\def#1####1}%
   \expandafter\expandafter\expandafter\:temp\expandafter{#1{##1}#2}}
\long\def\pend:defII#1#2{%
   \long\def\:tempa{\long\def#1####1####2}%
   \ex:pend{#2}{\expandafter\:temp #1{##1}{##2}}}
\long\def\append:defII#1#2{%
   \long\def\:temp{\long\def#1####1####2}%
   \expandafter\expandafter\expandafter\:temp\expandafter{#1{##1}{##2}#2}}
\long\def\pend:defIII#1#2{%
   \long\def\:tempa{\long\def#1####1####2####3}%
   \ex:pend{#2}{\expandafter\:temp #1{##1}{##2}{##3}}}
\long\def\append:defIII#1#2{%
   \long\def\:temp{\long\def#1####1####2####3}%
   \expandafter\expandafter\expandafter
      \:temp\expandafter{#1{##1}{##2}{##3}#2}}

    \NewConfigure{ProTex}[1]{\def\a:ProTex{#1}}
\ifx \Log:Needs\:UnDef \else
   \:warning{Again `\noexpand\input tex4ht.sty'?}\fi
\def\:warning#1{\writesixteen{l.\the\inputlineno\space
            --- TeX4ht warning --- #1 ---}}
\ifx \:ShowCode\:UnDeF \else
   \:warning{tex4ht.sty loaded after ProTeX?}
\fi
  
\def\set:Preamble#1,#2!*?: {%
   \def\:temp{#1}\ifx \:temp\empty \else
      \:CheckOption{#1}\if:Option \else
          \ifx \Preamble\empty \def\Preamble{#1}%
          \else                \append:def\Preamble{,#1}%
   \fi \fi \fi
   \def\:temp{#2}\ifx \:temp\empty \let\set:Preamble\:UnDef
   \else  \expand:after{\set:Preamble#2!*?: }\fi
}
\def\xtrct:hin#1,{\def\:temp{#1}\ifx \:temp\empty
   \def\xtrct:hin##1!*?: {\let\xtrct:hin\:UnDef}\else
      \def\:tempa##1.4ht##2!*?: {%
         \def\:temp{\Hinclude[*]{##1.4ht}}\def\:tempa{##2}}%
      \expandafter\:tempa\:temp .4ht!*?: %
      \ifx \:tempa\empty \else \:temp   \fi
   \fi  \xtrct:hin}
\def\Use:N{0}
\let\:USE\empty
\def\:Use#1{\:USe #1,,\HAdvance\Use:N  1 }
\def\:USe#1,{\def\:temp{#1}\ifx\:temp\empty
     \edef\:temp{\noexpand\append:def\noexpand\:USE{\let\expandafter
      \noexpand\csname Use:\Use:N\endcsname\noexpand\:UnDef}}\:temp
   \else
     \edef\:temp{\noexpand\append:def\noexpand\:USE{\expandafter
      \noexpand\csname Use:\Use:N\endcsname}}\:temp
   \append:def\:USE{{#1}}%
   \expandafter\:USe\fi}
\def\:Hinclude{%
   \def\Hinclude{\afterassignment\:Use
      \expandafter\def\csname Use:\Use:N\endcsname ####1}%
   \def\:Hinclude{\ifx \:USE \empty
       \let\Hinclude\:UnDef
       \let\:Hinclude\:UnDef
       \let\:Use\:UnDef
       \let\:USe\:UnDef
       \let\:USE\:UnDef
     \else
      \pend:def\:USE{\let\:USE\empty}%
      \expand:after{\:USE \:Hinclude}\fi}%
}

\def\:Preamble{\ifx \:next[%
  \def\Preamble[##1]##2{\egroup
    \def\:CheckOption####1{\def\:temp{####1}%
   \:Optionfalse
   \expandafter\:ScanOptions\Preamble,,//}
\def\:ScanOptions####1,####2//{\def\:next{####1}%
   \ifx        \:next\empty
   \else \ifx  \:temp\:next   \:Optiontrue   \let\:next\relax
   \else \def\:next{\:ScanOptions####2//}%
   \fi  \fi  \:next }
%
\ifHtml  \Htmlfalse
     \def\Preamble{html,##2}\else \def\Preamble{##2}\fi
\ifx \config:opt\:UnDef
   \let\:temp\Preamble
\else
   \expandafter\expandafter\expandafter\def
   \expandafter\expandafter\expandafter\:temp
   \expandafter\expandafter\expandafter{%
   \expandafter\config:opt\expandafter,\Preamble}%
\fi
\let\Preamble\empty
\expandafter\set:Preamble\:temp,!*?: %
%
\def\:temp####1.4ht####2!*?: {\def\:temp{####2}%
  \ifx \:temp\empty
    \def\:temp{th4}\ifx \:temp\Preamble \else
      \ht:special{t4ht@[}%
      \input tex4ht.4ht   \ht:special{t4ht@]}%
  \fi \fi}%
\expandafter\:temp\Preamble.4ht!*?: %
\expandafter\xtrct:hin\Preamble,,!*?: %
\:Hinclude
%
%
\input ##1
    }
  \else
  \def\Preamble##1{\egroup \def\:CheckOption####1{\def\:temp{####1}%
   \:Optionfalse
   \expandafter\:ScanOptions\Preamble,,//}
\def\:ScanOptions####1,####2//{\def\:next{####1}%
   \ifx        \:next\empty
   \else \ifx  \:temp\:next   \:Optiontrue   \let\:next\relax
   \else \def\:next{\:ScanOptions####2//}%
   \fi  \fi  \:next }
%
\ifHtml  \Htmlfalse
     \def\Preamble{html,##1}\else \def\Preamble{##1}\fi
\ifx \config:opt\:UnDef
   \let\:temp\Preamble
\else
   \expandafter\expandafter\expandafter\def
   \expandafter\expandafter\expandafter\:temp
   \expandafter\expandafter\expandafter{%
   \expandafter\config:opt\expandafter,\Preamble}%
\fi
\let\Preamble\empty
\expandafter\set:Preamble\:temp,!*?: %
%
\def\:temp####1.4ht####2!*?: {\def\:temp{####2}%
  \ifx \:temp\empty
    \def\:temp{th4}\ifx \:temp\Preamble \else
      \ht:special{t4ht@[}%
      \input tex4ht.4ht   \ht:special{t4ht@]}%
  \fi \fi}%
\expandafter\:temp\Preamble.4ht!*?: %
\expandafter\xtrct:hin\Preamble,,!*?: %
\:Hinclude
%
%
%
                  \input tex4ht.sty }
  \fi        \let\:Preamble\:UnDef     \Preamble  }
\def\Preamble{\bgroup  \catcode`\@12   \catcode`\_8  \catcode`\^7
  \futurelet\:next\:Preamble}
\def\EndPreamble{\b:Preamble \global\let\missing:endpream\empty
  \csname Lv \file:id\endcsname \B:DY}
\def\B:DY{\def\HtmlPar{\HtmlPar:Off{%
   \if:nopar \ShowPar \ShowIndent
      \ifx \skip:Par\empty\else \hskip -\parindent \skip:Par\fi
   \else
     \if:removeindent \ShowIndent \hskip -\parindent \a:Par
     \else
        \ifdim \parindent>\z@ \hskip -\parindent \fi
        \html:par
        \ifdim \parindent>\z@ \hskip  \parindent \fi
   \fi\fi \relax
}}%
%
  \HtmlEnv \IgnorePar \IgnoreIndent {\ht:everypar{}\leavevmode}\a:BODY
  \csname a:@BODY\endcsname}
\def\missing:endpream{\:warning{Missing \string\EndPreamble}}
\NewConfigure{@HTML}[1]{\concat:config\a:@HTML{#1}}
\let\a:@HTML\empty
\NewConfigure{PROLOG}[1]{\seq:config{PROLOG}{#1}}

\let\:Hincl\empty
\def\Hinclude[#1]#2{\xdef\:Hincl{\:Hincl{#1}{#2}}}
\NewConfigure{ext}[1]{%
   \def\:temp##1ext=##2,##3!*?: {%
      \if !##2!\edef\:html{#1}%
      \else \edef\:html{##2}\fi}%
   \expandafter\:temp\Preamble ,ext=,!*?: 
}
\Configure{ext}{html}
\def\c:HtmlPar:#1#2#3#4{%
   \def\:temp{#3}\ifx \:temp\empty \c:def\a:Par{#1}\else
     \c:def\a:Par{#1\Next:EndP{#3}}\fi
   \def\:temp{#4}\ifx \:temp\empty \c:def\html:par{#2}\else
     \c:def\html:par{#2\Next:EndP{#4}}\fi
}
\def\EndP{\Protect\par:end}
\let\par:end\empty
\def\Next:EndP{\Protect\next:endp}
\def\next:endp#1{\gdef\par:end{#1\global\let\par:end\empty}}
\def\SaveHtmlPar{\PushMacro\a:Par \PushMacro\html:par}
\def\RecallHtmlPar{\PopMacro\a:Par \PopMacro\html:par}
\def\gl:let{\global\let}
\def\EndP:cnt{0}
\def\SaveEndP{%
   \expandafter\gl:let\csname \EndP:cnt :sv\endcsname \par:end
   \gl:let\par:end\empty
   \gHAdvance \EndP:cnt  1 }
\def\RecallEndP{%
   \ifnum \EndP:cnt>0
     \gHAdvance \EndP:cnt  -1
     \expand:after{\gl:let\par:end}\csname\EndP:cnt :sv\endcsname
   \else
     \:warning{extra \string\RecallEndP}
   \fi}
\NewConfigure{HTML}[2]{\c:def\a:HTML{#1}\c:def\b:HTML{#2}}
\NewConfigure{HEAD}[2]{\c:def\a:HEAD{#1}\c:def\b:HEAD{#2}}
\NewConfigure{BODY}[2]{\c:def\a:BODY{#1}%
   \c:def\b:BODY{\csname a:@/BODY\endcsname#2}}
\NewConfigure{TITLE}[2]{\c:def\a:TITLE{#1}\c:def\b:TITLE{#2}}
\NewConfigure{TITLE+}[1]{\c:def\c:TITLE{#1}}
\NewConfigure{@TITLE}[1]{\concat:config\:TITLE:{#1}}
\NewConfigure{@HEAD}[1]{\concat:config\a:@HEAD{#1}}
\let\a:@HEAD\relax
\NewConfigure{@BODY}[1]{\concat:config\a:@BODY{#1}}
\let\a:@BODY\relax
\NewConfigure{@/BODY}[1]{\expandafter
   \concat:config\csname a:@/BODY\endcsname{#1}}
\expandafter\let\csname a:@/BODY\endcsname\relax

    \if:latex
   \expandafter\def\csname opt@hyperref.sty\endcsname{tex4ht}

   \ifx \config:opt\:UnDef \else
  \append:def\:RestoreCatcodes{\early:sub\early:sup}
\let\:IfFileExists\IfFileExists

% I am not sure why we used this declaration. It is from the original
% TeX4ht sources, so it probably had some reason. The problem is that it
% inserts extra tokens after \:IfFileExists, and if some package uses
% something like \IfFileExists{foo.sty}{\@firstoftwo}{\@secondoftwo}{aa}{bb},
% then it fails. I've found this issue with the Standalone class.
% See https://tex.stackexchange.com/a/638965/2891 for example where it fails.
% \long\def\IfFileExists#1#2#3{%
%    \csname recall:sub\endcsname
%    \csname recall:sup\endcsname
%    \expandafter\let\csname #1:sub\endcsname=\early:sub
%    \expandafter\let\csname #1:sup\endcsname=\early:sup
%    \let\early:sub=\relax     \let\recall:sub\relax
%    \let\early:sup=\relax     \let\recall:sup\relax
%    \:IfFileExists{#1}{#2}{#3}%
%    \expandafter\let\expandafter\early:sub\csname #1:sub\endcsname
%    \expandafter\let\expandafter\early:sup\csname #1:sup\endcsname
%    \early:sub \early:sup
% }
\ifx \o:document\:UnDef
   \pend:def\Preamble{%
     \csname recall:sub\endcsname
     \csname recall:sup\endcsname}
\fi
\def\:CheckOption#1{\def\:temp{#1}%
   \:Optionfalse
   \expandafter\:ScanOptions\config:opt,,//}
\def\:ScanOptions#1,#2//{\def\:next{#1}%
   \ifx        \:next\empty
   \else \ifx  \:temp\:next   \:Optiontrue   \let\:next\relax
   \else \def\:next{\:ScanOptions#2//}%
   \fi  \fi  \:next }
\let\early:sub=\empty
\:CheckOption{early_} \if:Option
   \:CheckOption{no_} \if:Option  \else
      \:CheckOption{_13} \if:Option
           \def\early:sub{%
               \xdef\recall:sub{%
                  \mathcode`\noexpand\_=\the\mathcode`\_
                  \catcode`\noexpand\_=\the\catcode`\_
               }
              \mathcode`\_="8000 \catcode`\_=13
          }
      \else
           \def\early:sub{%
               \xdef\recall:sub{%
                  \mathcode`\noexpand\_=\the\mathcode`\_
                  \catcode`\noexpand\_=\the\catcode`\_
   % \writesixteen{.....sub \the\catcode`\_}%
               }%
              \mathcode`\_="8000 \catcode`\_=12
   % \writesixteen{.....sub 12}
          }
      \fi
   \fi
\else
   \Log:Note{for \string_ at preamble,
          use the command line option `early\string_'}%
\fi
\let\early:sup=\empty
\:CheckOption{early^} \if:Option
   \:CheckOption{no^} \if:Option \else
      \:CheckOption{^13} \if:Option
           \def\early:sup{%
               \xdef\recall:sup{%
                  \mathcode`\noexpand\^=\the\mathcode`\^
                  \catcode`\noexpand\^=\the\catcode`\^
               }
              \mathcode`\^="8000 \catcode`\^=13
          }
      \else
           \def\early:sup{%
               \xdef\recall:sup{%
                  \mathcode`\noexpand\^=\the\mathcode`\^
                  \catcode`\noexpand\^=\the\catcode`\^
   % \writesixteen{.....sup \the\catcode`\^}%
               }%
              \mathcode`\^="8000 \catcode`\^=12
   % \writesixteen{.....sup 12}%
          }
      \fi
   \fi
\else
   \Log:Note{for \string^ at preamble,
          use the command line option `early\string^'}%
\fi

\let\:CheckOption\:UnDef

\fi

\fi
\def\:dontusepackage#1{%
  \typeout{tex4ht warning: package #1 was prevented from loading}
  \@namedef{ver@#1.sty}{9999/12/31}%
  \@namedef{opt@#1.sty}{\:currentoptions}
}

\ifx\XeTeXversion\@undefined\else
\ifx\xeuniuseblock\@undefined
\input tuenc-xetex-input.4ht
\fi\fi

\def\:AtEndOfPackage{\expandafter\g@addto@macro\csname pkg:end:hook:\@currname.sty\endcsname}
\def\init:package:hooks#1{\expandafter\def\csname pkg:end:hook:#1\endcsname{}}
\def\package:hooks#1{\csname pkg:end:hook:#1\endcsname}
\let\:onefilewithoptions\@onefilewithoptions
\def\@onefilewithoptions#1[#2][#3]#4{%
\init:package:hooks{#1.#4}%
   \let\:temp\@reset@ptions
   \def\@reset@ptions{%
      \let\@reset@ptions\:temp
      \edef\TivhTcats{%
   \catcode`:=\the\catcode`:%
   \catcode`@=\the\catcode`@}%
\catcode`\:=11 \catcode`\@=11
\a:usepackage%
      \a:usepackage:lthooks{#1}{#4}
      \TivhTcats
}%
      \def\:currentoptions{#2}
\:onefilewithoptions#1[#2][#3]{#4}\package:hooks{#1.#4}}
\def\a:usepackage{\input usepackage.4ht }
\NewConfigure{PackageHooks}[2]{\expandafter\def\csname package:hooks:#1\endcsname{\input #2}}
\def\a:usepackage:lthooks#1#2{%
  \expandafter\ifcsname package:hooks:#1.#2\endcsname
  \csname package:hooks:#1.#2\endcsname
  \fi
}


    \expandafter\ifx \csname tex4ht\endcsname\relax
       \let\:temp\empty
    \else
       \def\:tempc#1#2.#3!*?: {\edef\:tempa{#3}\edef\:temp{%
   #1\ifx \:tempa\empty  .cfg\fi}}
\def\config:opt#1,#2!*?: {\def\:temp{#1}\ifx \:temp\empty
   \else \ifx \:tempc\empty
         \def\:tempc{#1}%
      \else
         \append:def\:tempc{,#1}
   \fi\fi
   \def\:temp{#2}\ifx \:temp\empty
   \else \def\:temp{\config:opt #2!*?: }\fi
   \:temp}

\def\:temp#1,#2!*?: {%
   \def\:temp{\:tempc{#1}#1.!*?: }%
   \def\:tempb{#1}\ifx   \:tempb\empty  \let\:temp\relax \fi
   \def\:tempa{html}\ifx \:tempa\:tempb \let\:temp\relax \fi
   \def\:tempa{xhtml}\ifx\:tempa\:tempb \let\:temp\relax \fi
   \def\:tempa{htm}\ifx  \:tempa\:tempb \let\:temp\relax \fi
   \def\:tempa{htm3}\ifx \:tempa\:tempb \let\:temp\relax \fi
   \def\:tempa{htm4}\ifx \:tempa\:tempb \let\:temp\relax \fi
   \def\:tempa{htm5}\ifx \:tempa\:tempb \let\:temp\relax \fi
   \ifx \:temp\relax
   \let\:tempd\:temp
   \let\:tempc\empty \config:opt #1,#2,!*?: %
\else     \:temp
   \let\:tempd\:temp
   \let\:tempc\empty \config:opt #2,!*?: %
\fi
\let\config:opt\:tempc
\let\:temp\:tempd
%
}

\expandafter\expandafter\expandafter
   \:temp\csname tex4ht\endcsname !*?: %
\ifx \:temp\relax
   \ifx \config:opt\:UnDef
   \edef\config:opt{\ifx \config:file\empty html\fi}\fi
\def\:temp{\expandafter\expandafter\expandafter
   \Preamble\expandafter{\config:opt}\EndPreamble}

   \if:latex \let\:temp\empty \fi
\else
   \if:latex
      \let\config:file\:temp  \let\:temp\empty
   \else
      \edef\:temp{\noexpand\input \:temp\space}
\fi \fi

    \fi
    \let\:tempc\:temp
    \ifx \config:opt\:UnDef \else
   \ifx\tmp:toks\:UnDeF    \csname newtoks\endcsname\tmp:toks\fi
   \def\:temp{\def\ifOption##1}
   \expandafter\expandafter\expandafter\:temp
        \expandafter{\config:opt,,//\if:Option
   \def\:temp{\the\tmp:toks
   \def\:temp{\tmp:toks={}}%
   \afterassignment\:temp \tmp:toks=}%
\afterassignment\:temp
\else \def\:temp{%
   \def\:temp{\the\tmp:toks}%
   \afterassignment\:temp \tmp:toks=}%
\afterassignment\:temp
\fi  \tmp:toks=}
   \pend:defI\ifOption{\def\:temp{##1}\:Optionfalse\:ScanOptions}
\fi

    \pend:def\:tempc{\:RestoreCatcodes }
    \append:def\:tempc{\endinput}
    \let\:temp\:tempc
    \expandafter\:temp
\fi
\def\:tempa#1#2#3#4!*?: {#1#2#3}
\:CheckOption{htm}     \if:Option
   \edef\:html{\expandafter\:tempa\:html\empty\empty!*?: }
   \def\:temp#1#2#3!*?: {\def\j:bname{#1\ifx ?#2\else #2\fi}}
\expandafter\:temp \jobname ?!*?: 

\else \:CheckOption{htm5}     \if:Option
   \edef\:html{\expandafter\:tempa\:html\empty\empty!*?: }
   \def\:temp#1#2#3#4#5#6!*?: {\def\j:bname{#1\ifx ?#2\else
   #2\ifx ?#3\else #3\ifx ?#4\else #4\ifx ?#5\else #5\fi\fi\fi\fi}}
\expandafter\:temp \jobname ????!*?: 

\else \:CheckOption{htm4}     \if:Option
   \edef\:html{\expandafter\:tempa\:html\empty\empty!*?: }
   \def\:temp#1#2#3#4#5!*?: {\def\j:bname{#1\ifx ?#2\else
   #2\ifx ?#3\else #3\ifx ?#4\else #4\fi\fi\fi}}
\expandafter\:temp \jobname ???!*?: 

\else \:CheckOption{htm3}     \if:Option
   \edef\:html{\expandafter\:tempa\:html\empty\empty!*?: }
   \def\:temp#1#2#3#4!*?: {\def\j:bname{#1\ifx ?#2\else
   #2\ifx ?#3\else #3\fi\fi}}
\expandafter\:temp \jobname ??!*?: 

\else   \:CheckOption{xhtml} \if:Option
   \let\j:bname\jobname
\else   \:CheckOption{html}
   \if:Option  \let\j:bname\jobname \fi
\fi \fi \fi \fi \fi
\if:Option
   
   \def\html:rightskip{\rightskip\z@ plus 0.5\hsize  minus0.5\hsize }
\def\HtmlEnv{%
   \html:rightskip  \frenchspacing        
\let\nonfrenchspacing\relax
\spaceskip\z@        
\xspaceskip\z@       
\linepenalty0        
\adjdemerits0        
\pretolerance10000   
\hyphenpenalty10000  
\exhyphenpenalty10000
\clubpenalty0        
\widowpenalty0       
\interlinepenalty50  
\displaywidowpenalty0
\predisplaypenalty-10
\postdisplaypenalty1000
\abovedisplayskip30pt plus 10pt
\belowdisplayskip\abovedisplayskip
\abovedisplayshortskip\abovedisplayskip
\belowdisplayshortskip\abovedisplayskip
%
   \def\magnification{%
      \def\:temp{\:warning{Insert \string\magnification
                           =\the\tmp:cnt\space before tex4ht}}%
      \afterassignment\:temp\tmp:cnt}%
   \ht:everypar{\HtmlPar}}
\let\HtmlPar\empty
\edef\:temp{%
   \output={\noexpand\SaveEverypar \noexpand\ht:everypar{}\the\output
         \noexpand\RecallEverypar}}
\:temp

\edef\:temp{\meaning\everypar}
\edef\:tempa{\string\everypar}
\ifx \:temp\:tempa
   \let\ht:everypar\everypar
\else
   % LaTeX kernel will patch \everypar in future releases,
   % so this test will always fail. We should define \ht:everypar
   % anyway, paragraph handling would fail otherwise
   \let\ht:everypar\everypar
   \:warning{nonprimitive \string\everypar}
\fi
\edef\NoHtmlEnv{%
   \sfcode `\noexpand\noexpand\noexpand\.3000  
   \sfcode `\noexpand\noexpand\noexpand\?3000
   \sfcode `\noexpand\noexpand\noexpand\!3000
   \sfcode `\noexpand\noexpand\noexpand\:2000
   \sfcode `\noexpand\noexpand\noexpand\;1500
   \sfcode `\noexpand\noexpand\noexpand\,1250
   \rightskip\the\rightskip
   \spaceskip\the\spaceskip
   \xspaceskip\the\xspaceskip
   \linepenalty\the\linepenalty
   \adjdemerits\the\adjdemerits
   \pretolerance\the\pretolerance
   \hyphenpenalty\the\hyphenpenalty
   \exhyphenpenalty\the\exhyphenpenalty
   \clubpenalty\the\clubpenalty
   \widowpenalty\the\widowpenalty
   \interlinepenalty\the\interlinepenalty
   \displaywidowpenalty\the\displaywidowpenalty
   \predisplaypenalty\the\predisplaypenalty
   \postdisplaypenalty\the\postdisplaypenalty
   \abovedisplayskip\the\abovedisplayskip
   \belowdisplayskip\the\belowdisplayskip
   \abovedisplayshortskip\the\abovedisplayshortskip
   \belowdisplayshortskip\the\belowdisplayshortskip
   \noexpand\ht:everypar{\noexpand\the\noexpand\ht:everypar}}

   \ifx \html:par\:UnDef \let\html:par\empty \fi

   \ifx\html:addr\:UnDeF
   \writesixteen{--- needs --- tex4ht \jobname\space ---}%
\ifx\tmp:cnt\:UnDeF    \csname newcount\endcsname\tmp:cnt \fi
\def\g:advance#1{\bgroup \def\:temp{#1}%
                 \tmp:cnt=#1\afterassignment\:gplus \advance\tmp:cnt}
\def\:gplus{\expandafter\xdef\:temp{\the\tmp:cnt}\egroup}
\def\html:lbl{1}
\def\html:addr{\xdef\last:haddr{\file:id-\html:lbl}%
     \g:advance\html:lbl by 1\relax }
\ifx  \file:id\:UnDef
   \gdef\file:id{1}
   \global\let\maxfile:id=\file:id
\fi
\hbadness=10000      \vbadness=10000
\:CheckOption{fussy}  \if:Option  \else
   \hfuzz=99in          \vfuzz=\hfuzz
\fi
\hyphenpenalty=1000  \exhyphenpenalty=1000
\def\html:rightskip{\rightskip = 0pt plus 0.5\hsize  minus0.5\hsize }
\html:rightskip
\ifx \ht:special\:UnDef
   \let\ht:special=\special
\fi
\def\HCode#1{\ifx \EndPicture\:UnDef
   \relax\ifvmode\leavevmode\fi\ht:special{t4ht=#1}\fi}
\let\:HCode=\HCode
\let\Hbrakets\empty
\def\NewLineChar{\bgroup \catcode`\^=7 \:NewLineChar}
\def\:NewLineChar#1{\egroup \def\:newlnch{ #1}}
\NewLineChar{^^J}
\def\::HRef[#1]{\get:attr{#1}\::hRef\:::HRef}
\def\::HRefTag[#1]{\get:attr{#1}\::hRefTag\:::HRefTag}
\def\get:attr#1{\edef\:attr{\noexpand\get:atr #1 !*?: }\:attr}
\def\get:atr#1 #2!*?: #3#4{\def\:attr{\space#2}%
   \def\:te:mpa{#1}\ifx \:te:mpa\empty \let\:te:mpa#4\else
   \def\:te:mpa{#3[#1]}\fi \:te:mpa}
\def\H:Tag#1#2{\:TagHTag{#2}\HCode{\Hbrakets<\tag:A\:newlnch
   \NAME:"#2"\empty:lnk>}}
\def\::hRef[#1]#2{%
   \HCode{\Hbrakets<\tag:A\:newlnch \if\relax#1#2\relax \NOHREF:{}\else
             \HREF:"#1\if\relax#1\relax \else\:sharp #2\fi"\fi
           \:attr \empty:lnk>}}
\def\:::HRef#1{%
   \HCode{\Hbrakets<\tag:A\:newlnch \if\relax#1\relax \NOHREF:{}\else
               \HREF:"\get:hfile{#1}\:sharp #1"\fi \:attr \empty:lnk>}}
\def\::hRefTag[#1]#2#3{%
   \if\relax#3\relax\else\:TagHTag{#3}\fi
   \HCode{\Hbrakets<\tag:A\:newlnch \if\relax#1#2\relax \NOHREF:{#3}\else
                 \HREF:"#1\if\relax#2\relax \else\:sharp #2\fi"\fi
               \if\relax#3\relax\else\space \NAME:"#3"\fi
             \:attr \empty:lnk>}}
\def\:::HRefTag#1#2{%
   \if\relax#2\relax\else\:TagHTag{#2}\fi
   \HCode{\Hbrakets<\tag:A\:newlnch \if\relax#1\relax \NOHREF:{#2}%
                 \else\HREF:"\get:hfile{#1}\:sharp #1"\fi
               \if\relax#2\relax\else\space  \NAME:"#2"\fi
             \:attr \empty:lnk>}}
\let\empty:lnk=\empty
\def\NOHREF#1{\space}
\def\:TagHTag#1{\ifx -\let:val\else \Tag{)Q\aXrefFile #1}{\file:id}\fi}
\def\get:href{\expandafter\get::href}
\def\get::href#1-#2-{\ifnum #1=\file:id\space         \else
      \:LikeRef{)F\aXrefFile #1\empty F-}\fi
   \:sharp \make:addr{#2}}
\def\get:htag{\expandafter\get::htag}
\def\get::htag#1-#2-{\make:addr{#2}}
\ifx \aXrefFile\:UnDef \let\aXrefFile=\empty \fi

\def\get:hfile#1{%
   \expandafter\ifx\csname
                cw:)Q\aXrefFile #1\endcsname\relax
      \get@hfile{#1}%
   \else
      \expandafter\expandafter\expandafter\get::hfile
          \csname  cw:)Q\aXrefFile #1\endcsname,//%
   \fi  }
\def\get::hfile#1,#2//{%
   \ifnum \file:id=0#1  \else
       \expandafter\ifx
   \csname  cw:)F\aXrefFile #1%
                 \empty F-\endcsname\relax \else
      \:LikeRef{)F\aXrefFile #1\empty F-}%
\fi %
   \fi }
\ifx\get@hfile\:Undef \let\get@hfile=\:gobble \fi
      \let\html:src=\empty
\catcode`\#=12   \def\:sharp{#}   \catcode`\#=6

   \Htmltrue
\fi

\fi
                  
\def\EndLink{\ifx \empty:lnk\empty \HCode{\Hbrakets</\tag:A>}\fi}
\def\:HRef{\ifx [\:temp \expandafter\::HRef
           \else \expandafter\:::HRef \fi }
\def\HT:tag{\ifx -\let:val   \expandafter\H:Tag
            \else            \expandafter\HTa:g\fi }
\def\HTa:g{\H:Tag-}
\def\Link{\let\:attr\empty \futurelet\let:val\HRefT:ag}
\def\HRefT:ag{\ifx -\let:val \expandafter\H:RefTag
              \else          \expandafter\HRefTa:g\fi   }
\def\HRefTa:g{\H:RefTag-}
\def\H:RefTag#1{\futurelet\:temp\:HRefTag}
\def\:HRefTag{\ifx [\:temp \expandafter\::HRefTag
              \else \expandafter\:::HRefTag \fi }

\def\HLet#1{%
   \expandafter\ifx
      \csname o:\expandafter\:gobble\string#1:\endcsname\relax
      \expandafter\let
   \csname o:\expandafter\:gobble\string#1:\endcsname#1%
%
   \fi
   \edef#1{\noexpand\ifx \noexpand\EndPicture\noexpand\:UnDef
   \noexpand\expandafter \expandafter\noexpand
      \csname n:\expandafter\:gobble\string#1:\endcsname
   \noexpand\else \noexpand\expandafter \expandafter\noexpand
      \csname o:\expandafter\:gobble\string#1:\endcsname
 \noexpand\fi}%
%
   \expandafter\let
   \csname n:\expandafter\:gobble\string#1:\endcsname}
\def\HRestore#1{\relax
   \expandafter\ifx
      \csname o:\expandafter\:gobble\string#1:\endcsname\relax
        \:warning{\string\HRestore\noexpand#1?}%
   \else
      \expand:after{\let#1}\csname o:\expandafter
          \:gobble\string#1:\endcsname
   \fi}%
          \immediate\openout15=\jobname.tmp
\bgroup \escapechar=`\\
   \immediate\write15{\def\string\Jobname{\jobname}}
\egroup
\immediate\closeout15
\input \jobname.tmp

\def\get:input#1{%
   \openin15=#1
   \ifeof15  \closein15  \:warning{No file #1}%
   \else     \closein15  \expand:after{\input #1 }%
   \fi}
\def\if:notempty#1#2{%
   \def\:temp{#1}\ifx \:temp\empty \else \expand:after{#2}\fi }
\def\IgnorePar{\ifx \EndPicture\:UnDef \Protect\gl:nopartrue \fi}
\def\ShowPar{\ifx \EndPicture\:UnDef \Protect\gl:noparfalse \fi}
\def\IgnoreIndent{\ifx \EndPicture\:UnDef
   \Protect\gl:removeindenttrue \fi}
\def\ShowIndent{\ifx \EndPicture\:UnDef
   \Protect\gl:removeindentfalse \fi}
\def\gl:nopartrue{\global\:nopartrue}
\def\gl:noparfalse{\global\:noparfalse}
\def\gl:removeindenttrue{\global\:removeindenttrue}
\def\gl:removeindentfalse{\global\:removeindentfalse}
\def\HtmlParOff{\global\let\HtmlPar:Off\:gobble}
\def\HtmlParOn{\gdef\HtmlPar:Off##1{##1}}
\HtmlParOn
\def\SaveEverypar{%
   \expandafter\ifx\csname ht:everypar\endcsname\relax
      \expand:after{\expandafter\gdef\csname \n:list L\endcsname }%
           \expandafter{\expandafter\everypar
                        \expandafter{\the\everypar}}%
   \else
      \expand:after{\expandafter\gdef\csname \n:list L\endcsname }%
           \expandafter{\expandafter\ht:everypar
                        \expandafter{\the\ht:everypar}}%
   \fi
   \expandafter\xdef\csname \n:list X\endcsname{%
      \if:removeindent  \global\noexpand\:removeindenttrue
      \else             \global\noexpand\:removeindentfalse \fi
      \if:nopar         \global\noexpand\:nopartrue
      \else             \global\noexpand\:noparfalse \fi}%
   \HtmlEnv     \csname \n:list X\endcsname
                \csname \n:list L\endcsname
   \gHAdvance\n:list   1
}
\def\RecallEverypar{\ifnum \n:list<1
      \:warning{\noexpand\RecallEverypar without \noexpand\SaveEverypar}%
   \else
      \HtmlEnv
      \gHAdvance\n:list  -1
      \csname \n:list X\endcsname
      \csname \n:list L\endcsname
   \fi
}
\def\n:list{0}
\def\ifTag#1#2#3{\expandafter\ifx
   \csname  cw:#1\endcsname \relax #3\else #2\fi}
\catcode`\%12 \def\prcnt:ch{%} \catcode`\%14
\ifx \clearpage\:UnDef  \def\:clearpage{\vfil\penalty-20000}
\else
  \let\real:par\par  \def\eq:par{\par\real:par}
  \def\:clearpage{\expandafter\ifx\eq:par\clearpage\fi}
\fi

\ifx \folio\:UnDef
   \def\folio{\ifx \pageno\:UnDef \z@ \else
      \ifnum \pageno <0 \romannumeral -\pageno
      \else             \the           \pageno \fi\fi}
\fi
\def\cond:cs#1#2{%
   \expandafter\ifx  \csname #1\endcsname\relax  \else
      \csname #1\endcsname{#2}%
   \fi
}
\def\do:list#1,#2,{%
   \def\:temp{#2}\ifx \:temp\empty  \expandafter\stop:do
   \else   #1{#2}\fi
   \do:list#1,}
\def\stop:do#1!*?: {}
\def\BI:gbl{\ifx [\:temp \expandafter\bi:gbl\else
                        \expand:after{\bi:gbl[]}\fi}
\def\bi:gbl[#1]#2{}
\ifx \newpage\:UnDef
\def\newpage{\vfil\penalty-10000 }
\fi
\ifx\tmp:toks\:UnDeF    \csname newtoks\endcsname\tmp:toks\fi
\ifx\tmp:cnt\:UnDeF    \csname newcount\endcsname\tmp:cnt\fi
\def\Advance:{\ip:op\advance\:Advance}
\def\Multiply:{\ip:op\multiply\:Advance}
\def\Divide:{\ip:op\divide\:Advance}
\def\gHAdvance{\ip:op\advance\g:Advance}
\def\gHMultiply{\ip:op\multiply\g:Advance}
\def\gHDivide{\ip:op\divide\g:Advance}
\def\DefOp#1#2{
   \ifx #1\:UnDef
      \expandafter \ifx  \csname #2:\endcsname\relax
            \:warning{\string\DefOp...\string{#2\string}?}%
      \else \expand:after{\let#1}\csname #2:\endcsname
      \fi
   \else \:warning{\string\DefOp\string#1\string{#2\string}
                 can't redefine \string#1}%
   \fi
}
\DefOp\HAdvance{Advance}
\DefOp\HMultiply{Multiply}
\DefOp\HDivide{Divide}
\def\ip:op#1#2{\let\mth:op#1\let\adv:c#2\adv:}

\def\adv:#1{\def\:var{#1}\futurelet\:temp\Advanc:}
\def\Advanc:{\ifx [\:temp \expandafter\Advanc:e
              \else \expand:after{\expandafter\adv:c\:var}\fi}
\def\Advanc:e[#1]{\expandafter\adv:c\csname
                  \expandafter\string\:var[#1]\endcsname}

\def\g:Advance#1{\bgroup \def\:temp{#1}%
                 \tmp:cnt#1\afterassignment\:gplus \mth:op\tmp:cnt}
\def\:gplus{\expandafter\xdef\:temp{\the\tmp:cnt}\egroup}
\def\:Advance#1{\bgroup \def\:temp{#1}%
                \tmp:cnt#1\afterassignment\:aplus \mth:op\tmp:cnt}
\def\:aplus{\xdef\:temp{\def\expandafter\noexpand\:temp{\the\tmp:cnt}}%
            \egroup \:temp}
\def\HAssign{\:ssg\edef}
\def\gHAssign{\:ssg\xdef}

\def\:ssg#1#2{\let\d:fn#1\def\:var{#2}\futurelet\:temp\:Assgn}
\def\:Assgn{%
   \ifx [\:temp
         \expandafter\d:fn\:var[##1]{%
              \noexpand\csname  \expandafter
                                  \string\:var[##1]\noexpand\endcsname}%
         \expandafter\assg:m
   \else \afterassignment\assg:v \expandafter \tmp:cnt \fi }

\def\assg:v{\expandafter\d:fn\:var{\the\tmp:cnt}}
\def\assg:m[#1]{%
   \def\:temp{\expandafter\d:fn
      \csname \expandafter\string\:var[#1]\endcsname{\the\tmp:cnt}}%
   \afterassignment\:temp  \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  1  \expandafter\no::catcodes
      \fi }%
   \no::catcodes }
\HAssign\def:cnt=0
\def\Odef#1{\gHAdvance\def:cnt  1
   \edef#1{\noexpand\with:op
             \expandafter\noexpand\csname \def:cnt \string#1\endcsname }%
  \expandafter\gdef\csname\def:cnt\string#1\endcsname}
\def\with:op#1{\let\n:xt#1\futurelet\:temp\wth:opt}
\def\wth:opt{\ifx [\:temp
   \expandafter\n:xt\else \expand:after{\n:xt[]}\fi}
\def\Log:Needs#1{{\escapechar=`\\\immediate\write-1{\:Neds{#1}}}}
\def\g:delete#1{%
   \expandafter\expandafter\expandafter\global
      \expandafter\let\csname #1\endcsname\:UnDef
}
\def\xdef:cs#1{\expandafter\xdef \csname #1\endcsname}%
\def\:csname{\expandafter\noexpand\csname}
\long\def\:gobble#1{}
\long\def\:gobbleII#1#2{}
\long\def\:gobbleIII#1#2#3{}
\long\def\:gobbleIV#1#2#3#4{}
\long\def\:gobbleV#1#2#3#4#5{}
\long\def\:gobbleVI#1#2#3#4#5#6{}
\long\def\:gobbleVIII#1#2#3#4#5#6#7#8{}

\ifHtml \csname newskip\endcsname\tmp:dim
\def\exit:ifnot#1{%
   \edef\:temp{\def\noexpand\:temp####1,\:Hin,####2..//{%
      \noexpand\if !####2!\noexpand\else
      \noexpand\expandafter\noexpand\:gobble\noexpand\fi
      }\noexpand\:temp,#1,\:Hin,..//}\:temp\endinput }
   \catcode`\@0
   \catcode`\\12
@def@ConfigureHinput{%
   @def@:temp##1{%
      @def@:temp{##1}@ifx@:temp@:Hin @else @:tempb @fi }%
   @def@:tempb{@fi@bgroup @no:catcodes0{255}{12}%
      @no:catcodes{101}{101}{11}%
      @no:catcodes{109}{109}{11}%
      @no:catcodes{112}{112}{11}%
      @no:catcodes{116}{116}{11}%
      @no:catcodes{121}{121}{11}%
      @:tempa}
   @def@:tempa##1\empty\empty\empty\empty\empty\empty{@egroup}%
   @:temp
}
   @catcode`@\=0
   \catcode`\@=11
\let\:noindent\noindent
\def\noindent{\ifx \EndPicture\:UnDef
     \ifvmode  \IgnoreIndent\leavevmode\fi
   \else \:noindent \fi}
\let\skip:Par\empty
\catcode`\%12 \def\%{%} \catcode`\%14
\def\hidden:anchor{}
\def\sv:btns#1{\ifx #1\space\global\let#1\empty \fi  \PushStack\prv:fl#1}
\def\ro:nd#1#2{%
   \gHAdvance#1  #2
   \gHDivide#1  #2
   \gHMultiply#1  #2 }
\def\fx:pt#1#2#3!*?: {%
   \expandafter\ifx \csname big:#1:#2\endcsname\relax
         \expandafter\gHAssign\csname big:#1:#2\endcsname  0  \fi
   \expandafter\gHAdvance\csname big:#1:#2\endcsname  1
   \edef\big:fn{#1#2\csname big:#1:#2\endcsname}}
\def\Hnewline{\:newlnch}
\def\Needs{\bgroup\catcode`\"=12 \cat:Needs}
\def\cat:Needs#1{\def\:temp{-}\def\:tempa{#1}\ifx \:temp\:tempa
   \aftergroup\Log:Needs \else \ht:special{t4ht+@\:Needs{#1}}\fi
   \egroup}
\def\LinkCommand#1#2{\L:Com#1#2,,,,,,!*?: {#1}}
\let\:Link\Link
\def\L:Com#1#2,#3,#4,#5,#6,#7,#8!*?: #9{\def\:tempe{#7}%
   \def\:tempa{#2}\def\:tempb{#3}\def\:tempc{#4}\def\:tempd{#6}%
   \expandafter\edef\csname
           End\expandafter\:gobble\string #9\endcsname{%
      \ifx\:tempd\empty \noexpand\HCode
         {\Hbrakets</\ifx\:tempa\empty \tag:A\else#2\fi>}\fi }%
   \edef\:temp{%
      \noexpand\Odef\noexpand#1[####1]####2####3{{%
         \def\noexpand\tag:A{\ifx\:tempa\empty\tag:A\else#2\fi}%
         \def\noexpand\HREF:{ \ifx\:tempb\empty\HREF:\else#3=\fi}%
         \def\noexpand\NAME:{ \ifx\:tempc\empty\NAME:\else#4=\fi}%
         \def\noexpand\empty:lnk{\ifx\:tempd\empty\else#6\fi}%
         \def\noexpand\:sharp{\ifx\:tempe\empty\:sharp\else#7\fi}%
         \noexpand\M:link[####1 #5]{####2}{####3}}}}\:temp
   \expandafter\let\csname \string#1 :\endcsname#1
\def#1{\bgroup\LD:Link{#1}\futurelet#1\M:link}
%
  }
\def\LD:Link#1{%
   \def\M:link{\ifx -#1\egroup \def\M:link{\:Link-}\expandafter\gob:lnk
               \else   \egroup \let\M:link\:Link \fi
     \csname \string#1 :\endcsname }}
\def\gob:lnk#1-{#1}
\ifx\tmp:dim\:UnDeF    \csname newdimen\endcsname\tmp:dim\fi
\def\pr:tc{\relax}
\let\prOteCt\relax
\def\Protect{%
   \let\prOteCt\pr:tc
   \ifx \prOteCt\pr:tc    \let\prOteCt\relax
   \else \noexpand\Protect\expandafter\noexpand\fi
}
\def\:unexpand:protect{\noexpand\protect\noexpand}
\def\:restore:protect{\let\protect\orig:protect}
\def\protected:edef{%
  \let\:orig:protect\protect%
  \let\protect\:unexpand:protect%
  \afterassignment\:restore:protect%
  \edef%
}

\def\NewHaddr#1{\html:addr \let#1\last:haddr}
\def\GetHref#1{\expandafter\get:href#1-}
\def\GetHname#1{\expandafter\get:htag#1-}
\ifx \make:addr\:UnDeF
   \def\make:addr#1{#1} \fi
\def\FileNumber{\file:id}
\def\c:XrefFile:#1{\def\aXrefFile{#1}}
 \fi
\:CheckOption{hshow} \if:Option
   \def\hshow#1{\writesixteen
     {..#1.......\expandafter\meaning\csname #1\endcsname}}
   \def\ShowConfigure#1{%
   \edef\:tempb{\expandafter \meaning\csname c:#1:\endcsname}%
   \expandafter\par:N  \:tempb////%
   \writesixteen{\string\Configure{#1}}%
   {\show:Arg{1}{a:#1}%
   \show:Arg{2}{b:#1}%
   \show:Arg{3}{c:#1}%
   \show:Arg{4}{d:#1}%
   \show:Arg{5}{e:#1}%
   \show:Arg{6}{f:#1}%
   \show:Arg{7}{g:#1}%
   \show:Arg{8}{h:#1}%
   \show:Arg{9}{i:#1}}%
}
\edef\:temp{\def\noexpand
  \par:N##1\string :##2->##3////{\noexpand\par:NN?##2//}}
\:temp
\def\par:NN#1#2//{\def\:tempb{#2}\ifx\:tempb\empty
  \def\:tempb{#1}\else \def\:tempb{\par:NN#2//}\expandafter\:tempb\fi}
\def\show:Arg#1#2{%
   \ifnum \:tempb=#1 \let\show:Arg=\:gobbleII \fi
   \expandafter\let\expandafter\:temp \csname #2\endcsname
   \writesixteen{ {\ifx \:temp\relax ???\else
      \expandafter\:gobbleM \meaning \:temp\fi}}}
\def\:gobbleM#1->{}

\fi
\ifx \xml:empty\:UnDef
   \edef\Preamble{\Preamble}
   \:CheckOption{xhtml}
   \if:Option \else \:CheckOption{xml}\fi
   \if:Option
      \def\xml:empty{ /}
      \long\def\:xhtml#1{#1}
   \else
      \Log:Note{for XML code, use the command line option
                `xml' or `xhtml'}%

      \let\:xhtml\:gobble
      \let\xml:empty\empty
\fi \fi
\NewConfigure{afterSUB}[2]{\expandafter
   \def \csname \meaning#1sb\endcsname{#2}}
\NewConfigure{putSUB}[1]{\def\a:putSUB{#1}}
\NewConfigure{putSUP}[1]{\def\a:putSUP{#1}}
\:CheckOption{no^} \if:Option \else
   \:CheckOption{^13} \if:Option \catcode`\^13
   \else \catcode`\^12 \fi
      \Configure{afterSUB}^{\SUB:SUP}
   \catcode`\^7
\fi
\def\PushStack#1#2{%
   \ifx #1\:UnDef \global\let#1\empty\fi
   {\let\Picture\relax \xdef#1{{#2}{#1}}}}
\def\PopStack#1#2{%
   \ifx #1\empty    \:warning{empty \string\PopStack\string#1\string#2?}%
                    \global\let#2\empty
   \else  \def\:temp{\:recall#1#2}\expandafter\:temp#1\fi}
\def\:recall#1#2#3#4{\gdef#1{#4}\gdef#2{#3}}
\def\PushMacro#1{%
   \expandafter\ifx \csname c:\string#1\endcsname\relax
      \expandafter\gHAssign \csname c:\string#1\endcsname  0
   \fi
   \HAssign\:temp  \csname c:\string#1\endcsname
   \let\:tempa#1%
   \ifx \:tempa\:UnDef  \let\:tempa\like:unDef\fi
   \global\expandafter\let\csname \:temp\string#1\endcsname  \:tempa
   \expandafter\gHAdvance \csname c:\string#1\endcsname  1 }
\def\PopMacro#1{%
   \expandafter\gHAdvance \csname c:\string#1\endcsname  -1
   \HAssign\:temp  \csname c:\string#1\endcsname\relax
   \ifnum \:temp < 0
      \expandafter\gHAssign \csname c:\string#1\endcsname  0
      \:warning{ignored \string\PopCs\string#1 on empty stack}%
   \else
      \expand:after{\let#1}\csname \:temp\string#1\endcsname
      \ifx #1\like:unDef  \let#1\:UnDef\fi
   \fi
   }
\def\like:unDef{\:UnDef\:CS}
\def\PushConfigure#1{\def\cf:name{#1}\expandafter
   \expandafter\expandafter\Push:Configure\expandafter
   \meaning\csname c:#1:\endcsname!*?: }
\def\PopConfigure#1{\def\cf:name{#1}\expandafter
   \expandafter\expandafter\Pop:Configure\expandafter
   \meaning\csname c:#1:\endcsname!*?: }
\def\do:undef#1->#2!*?: {%
   \if :#2:\:warning{\string\PushConfigure{\cf:name}?}\fi
}
\catcode`\@=6
\catcode`\#=12
\def\Push:Configure@1!*?: {%
   \do:undef@1->!*?: %
   \do:para@1#1!*?: \push:config
   \do:parb@1#2!*?: \push:config
   \do:parc@1#3!*?: \push:config
   \do:pard@1#4!*?: \push:config
   \do:pare@1#5!*?: \push:config
   \do:parf@1#6!*?: \push:config
   \do:parg@1#7!*?: \push:config
   \do:parh@1#8!*?: \push:config
   \do:pari@1#9!*?: \push:config
}
\def\Pop:Configure@1!*?: {%
   \do:pari@1#9!*?: \pop:config
   \do:parh@1#8!*?: \pop:config
   \do:parg@1#7!*?: \pop:config
   \do:parf@1#6!*?: \pop:config
   \do:pare@1#5!*?: \pop:config
   \do:pard@1#4!*?: \pop:config
   \do:parc@1#3!*?: \pop:config
   \do:parb@1#2!*?: \pop:config
   \do:para@1#1!*?: \pop:config
}
\def\do:para@1#1@2!*?: @3{@3{a}{@2}}
\def\do:parb@1#2@2!*?: @3{@3{b}{@2}}
\def\do:parc@1#3@2!*?: @3{@3{c}{@2}}
\def\do:pard@1#4@2!*?: @3{@3{d}{@2}}
\def\do:pare@1#5@2!*?: @3{@3{e}{@2}}
\def\do:parf@1#6@2!*?: @3{@3{f}{@2}}
\def\do:parg@1#7@2!*?: @3{@3{g}{@2}}
\def\do:parh@1#8@2!*?: @3{@3{h}{@2}}
\def\do:pari@1#9@2!*?: @3{@3{i}{@2}}
\catcode`\@=11
\catcode`\#=6
\def\push:config#1#2{%
   \if :#2:\else
      \expandafter\expandafter\expandafter\ifx \expandafter
              \csname \csname#1New:Conf\endcsname\cf:name\endcsname\relax
         \:warning{\string\PushConfigure{\cf:name} Failed}%
      \else
         \expandafter\expandafter\expandafter\PushMacro \expandafter
             \csname \csname#1New:Conf\endcsname\cf:name\endcsname
      \fi
   \fi }
\def\pop:config#1#2{%
   \if :#2:\else
      \expandafter\expandafter\expandafter\ifx \expandafter
           \csname \csname#1New:Conf\endcsname\cf:name\endcsname\relax \else
         \expandafter\expandafter\expandafter\PopMacro \expandafter
             \csname \csname#1New:Conf\endcsname\cf:name\endcsname
      \fi
   \fi }

\def\XRef#1{\expandafter\ifx
                 \csname  cw:#1\endcsname \relax \:NoTag{#1}%
           \else \csname  cw:#1\endcsname    \fi}
\def\LikeRef#1{\expandafter\ifx
                 \csname  cw:#1\endcsname \relax \space%
          \else  \csname  cw:#1\endcsname    \fi}
\def\:LikeRef#1{\csname   cw:#1\endcsname}
\let\:SUPOff\empty \let\:SUBOff\empty
\def\Tag#1#2{\begingroup   \:SUPOff  \:SUBOff \a:xref \escapechar=`\\%
   \edef\:head{\string\:CrossWord{#1}{#2}}%
   \expandafter \expandafter \expandafter
   \:writeref\expandafter{\:head{\folio}\prcnt:ch}%
\endgroup}
\NewConfigure{xref}{1}
\def\:writeref{\write\:refout}%
\def\load:ref#1{%
   \edef\re:call{\catcode`\noexpand\:\the\catcode`\: }%
\catcode`\:11
\let\sv:crs\:CrossWord
\def\:CrossWord{\bgroup
   \no:catcodes{128}{255}{12}%
   \catcode`\:12  \catcode`\@11
   \catcode`\^^M11    \:CrsWrd}%
\def\:CrsWrd##1##2##3{\egroup \sv:crs{##1}{##2}{##3}}%
%
   \get:input{#1}%
   \re:call   \let\:CrossWord\sv:crs  }
\def\:CrossWord#1#2#3{\Cross:Word{}{#1}{#2}{#3}}
\def\Cross:Word#1#2#3#4{%
   \def\:temp{#3}\tmp:toks{#3}%
   \expandafter\edef\csname  cw:\cw:format{#1#2}\endcsname{%
      \expandafter\ifx\csname  cw:\cw:format{#1#2}\endcsname\relax
      \else \csname  cw:\cw:format{#1#2}\endcsname ,  \fi
      \ifx \:temp\empty #4\else  \the\tmp:toks\fi}}
\def\cw:format#1{#1}%

\ifx \:refout\:UnDef
   \openin15=\jobname.xref
\ifeof15  \def\:NoTag#1{\hbox{$???$}}
\else     \def\:NoTag#1{\hbox{$???$}
              \:warning{\string\XRef\string{\string#1\string}?}}
  \ifx \:::HRefTag\:UnDef\else
  \pend:defII\:::HRefTag{%
    \if \relax##1\relax\else
      \expandafter\ifx\csname cw:)Q\aXrefFile ##1\endcsname\relax
         \:warning{\string\Link{##1}?}\csname a:?Link\endcsname
    \fi\fi }
\fi

\fi
\closein15

   \load:ref{\jobname.xref}
   \csname newwrite\endcsname\:refout
   \if:latex \expandafter\immediate\fi
\openout\:refout=\jobname.xref
\fi
\def\LoadRef{\futurelet\:tempa\:LoadRef}
\def\:LoadRef{{%
   \if \bgroup\:tempa
      \aftergroup\loadr:ef
   \else
      \aftergroup\Load:Ref    \if -\:tempa \else
                                  \aftergroup-\fi
   \fi
}}
\def\Load:Ref#1{\futurelet\:tempb\LoadRef:}
\def\LoadRef:{{%
   \aftergroup\:loadref    \ifx [\:tempb \else
                              \aftergroup[\aftergroup]\fi}}
\def\:loadref[#1]{%
   \let\sv:cros\:CrossWord
   \edef\:tempd{#1}\ifx \:tempd\empty \let\:tempb N\fi
   \futurelet\:tempc\l:oadref }
\def\l:oadref{%
   {\aftergroup\lo:adref \if +\:tempc \else \aftergroup+\fi  }}
\def\lo:adref#1#2#3{%
   \def\cw:format##1{#3}%
   \edef\:temp{#2}\expandafter \get:ext\:temp .!*?: %
   \ifx \:temp\empty
         \set:CrossWord#2.!*?: {\:tempd}\load:ref{#2.xref}%
   \else \set:CrossWord#2!*?: {\:tempd}\load:ref{#2}\fi
   \let\:CrossWord\sv:cros }
\def\get:ext#1.#2!*?: {\def\:temp{#2}}
\def\loadr:ef#1{\let\:tempc=x \let\:tempd\empty \lo:adref{}{#1}{##1}}
\def\set:CrossWord#1!*?: #2{%
   \edef\:temp{\noexpand\:setCrossWord#1!*?: {#2}}\:temp}
\def\:setCrossWord#1.#2!*?: #3{%
   \ifx [\:tempb
      \def\:CrossWord##1##2##3{%
         \cond:CrossWord##1#3!*?: {##1}{##2}{##3}}%
      \def\:tail#3##1#3{##1}%
      \if +\:tempc   \if -\:tempa
   \def\cond:CrossWord##1#3##2!*?: ##3##4##5{%
      \def\:temp{##1}\ifx \:temp\empty
         \Cross:Word{#1::}%
                    {\:tail##3#3}{##4}{##5}\fi   }%
\else
   \def\cond:CrossWord##1#3##2!*?: ##3##4##5{%
      \def\:temp{##1}\ifx \:temp\empty
         \Cross:Word{#1::}{##3}{##4}{##5}\fi   }%
\fi
%
      \else         \if -\:tempa
   \def\cond:CrossWord##1#3##2!*?: ##3##4##5{%
      \def\:temp{##1}\ifx \:temp\empty
         \Cross:Word{}{\:tail##3#3}{##4}{##5}\fi  }%
\else
   \def\cond:CrossWord##1#3##2!*?: ##3##4##5{%
      \def\:temp{##1}\ifx \:temp\empty
         \Cross:Word{}{##3}{##4}{##5}\fi  }%
\fi
\fi
   \else
      \if +\:tempc   \def\:CrossWord{\Cross:Word{#1::}}%
\fi
   \fi              
}

\ifHtml  \catcode`\:=12

\def\get@hfile#1{\get@hfil@ #1:::://}

\def\get@hfil@#1::#2::#3//{%
   \expandafter\ifx \csname
       cw:#1::)Q\aXrefFile #2\endcsname \relax \else
      \expandafter\expandafter\expandafter\get@@hfile
          \csname  cw:#1::)Q\aXrefFile #2\endcsname,//{#1}%
   \fi}
\def\get@@hfile#1,#2//#3{%
    \expandafter\ifx
       \csname  cw:#3::)F\aXrefFile #1%
               \empty F-\endcsname \relax
    \else
       \csname  cw:#3::)F\aXrefFile #1%
               \empty F-\endcsname
       \expandafter  \expandafter  \expandafter  \expandafter
       \expandafter  \expandafter  \expandafter  \remove@fn
    \fi }

\def\remove@fn#1#2::{#1}

\catcode`\:=11

\fi
\NewConfigure{?Link}{1}

\ifHtml
   \def\:temp{\def\ifOption##1}
\expandafter\expandafter\expandafter\:temp
   \expandafter{\Preamble,,//\if:Option
   \def\:temp{\the\tmp:toks
   \def\:temp{\tmp:toks={}}%
   \afterassignment\:temp \tmp:toks=}%
\afterassignment\:temp
\else \def\:temp{%
   \def\:temp{\the\tmp:toks}%
   \afterassignment\:temp \tmp:toks=}%
\afterassignment\:temp
\fi  \tmp:toks=}
\pend:defI\ifOption{\def\:temp{##1}\:Optionfalse\:ScanOptions}
\let\:Hin\empty
\def\Hinput#1{\PushStack\:Hinputs\:Hin \def\:Hin{#1}%
   \expandafter\:Hinput\:Hincl{}{}\PopStack\:Hinputs\:Hin}
\def\:Hinput#1#2{\def\:temp{#2}\ifx \:temp\empty \else
     \let\:temp\empty   \def\:tempa{*}\def\:tempb{#1}%
     \ifx \:tempa\:tempb \def\:temp{\input #2}%
     \else \ifx \:Hin\:tempb  \def\:temp{\input #2}%
     \else \def\:tempb{#1.4ht}\ifx \:Hin\:tempb \def\:temp{\input #2}%
     \fi\fi\fi
   \expand:after{\:temp
     \Configure{NewConfigure}{a:}{b:}{c:}{d:}{e:}{f:}{g:}{h:}{i:}%
\:Hinput}\fi}

   \Hinput{Preamble}  \ht:special{t4ht.\:html}
   \def\ScriptCommand{\begingroup \catcode`\\12
   \:DefScript}
\def\:DefScript#1{\endgroup \Def:Script#1!*?: }
\def\Def:Script#1#2!*?: {%
   \expandafter\let\csname :#2:\endcsname\empty
   \edef\:temp{\long\def\expandafter\noexpand\csname a:#2\endcsname
                 ####1\expandafter\noexpand\csname End#2\endcsname
                 {####1\noexpand\:EndVerbatim}}\:temp
   \long\expandafter\def\csname
       b:#2\endcsname##1#1End#2{##1\:EndVerbatim}%
   \edef\:temp{\noexpand\DefScript:
      \expandafter\noexpand\csname #2\endcsname
      {\expandafter\noexpand\csname a:#2\endcsname}%
      {\expandafter\noexpand\csname b:#2\endcsname}}\:temp
}
\def\DefScript:#1#2#3#4#5{\def#1{\call:script{#2}{#3}{#4}{#5}}}
\def\call:script#1#2#3#4{\begingroup \vrb:tt
   \leftskip\z@  \parindent\z@
   \Configure{HVerbatim}{\empty}{\empty}%
                        {\special{t4ht=}\empty}{\empty}%
   \Configure{HVerbatim+}{\z@}{\hbox{ }}%
   #3\ht:special{t4ht@@}%
   \let\Verb:atim#1\let\Ver:batim#2%
   \def\:EndVerbatim{\ht:special{t4ht@@}%
   #4\endgroup\ignorespaces}\Verb:env}
\def\a:rootfont:{-}
\:CheckOption{fonts+} \if:Option \def\a:rootfont:{+}
\else
   \Log:Note{for marking of the base font,
       use the command line option `fonts+'}%
\fi

   \def\InsertTagStart#1#2{%
  \edef\local:properties{\ifx\relax#2\relax\else\space#2\fi}
  \HCode{<\get:tag{#1}\get:block:properties{#1}\local:properties>}%
}
\def\InsertTagEnd#1{\HCode{</\get:tag{#1}>}}

\long\def\InlineElementStart#1#2{\InsertTagStart{#1}{#2}}
\long\def\InlineElementEnd#1{\InsertTagEnd{#1}}

\long\def\BlockElementStart#1#2{\ifvmode\IgnorePar\fi\EndP\InsertTagStart{#1}{#2}}
\long\def\BlockElementEnd#1{\ifvmode\IgnorePar\fi\EndP\InsertTagEnd{#1}}

% define default values for a new logical block
\def\NewLogicalBlock#1{%
  \SetTag{#1}{span}%
  \expandafter\def\csname #1:properties\endcsname{}
}

\def\SetTag#1#2{\expandafter\xdef\csname #1:tagname\endcsname{#2}}
\def\get:tag#1{\expandafter\expandafter\csname #1:tagname\endcsname}

\def\SetBlockProperty#1#2#3{%
  \expandafter\ifcsname #1:property:#2\endcsname\else%
  \expandafter\edef\csname #1:properties\endcsname{\csname #1:properties\endcsname\space\csname #1:property:#2\endcsname }
  \fi%
  \expandafter\def\csname #1:property:#2\endcsname{#2="#3"}
}

\def\get:block:properties#1{%
\expandafter\csname #1:properties\endcsname%
}

\:CheckOption{verify} \if:Option
   \let\:chk:trc\:gobble

\else  \:CheckOption{verify+} \if:Option
   \def\:chk:trc#1{%
   \writesixteen{\the\inputlineno\space(\:ChkLevel) #1}}

\fi \fi
\if:Option
    \HAssign\:ChkLevel0
\let\:CurrentChk\empty
\PushStack\:CHK\empty
\def\VerifyOpen#1{\Protect\trace:chk#1 !*?: }
\def\trace:chk#1 #2!*?: {%
   \gHAdvance\:ChkLevel  1 \:chk:trc{Open......#1}%
   \expandafter\ifx \csname #1Level:\endcsname\relax
      \expandafter\gHAssign\csname #1Level:\endcsname0
   \fi
   \expandafter\gHAdvance\csname #1Level:\endcsname  1
   \PushStack\:CHK{#1}%
   \expandafter\ifx \csname \:CurrentChk +#1\endcsname\relax
      \expandafter\gdef  \csname \:CurrentChk +#1\endcsname{}%
         \writesixteen{\the\inputlineno.
            --- warning --- \:CurrentChk\space --> #1 ?}%
   \fi
   \xdef\:CurrentChk{#1}%
}
\def\VerifyClose#1{\Protect\trace:endchk#1 !*?: }
\def\trace:endchk#1 #2!*?: {%
   \:chk:trc{Close......#1}%
   \expandafter\ifx \csname #1Level:\endcsname\relax
      \writesixteen{\the\inputlineno.
         --- warning --- </#1> witout <#1>}%
      \expandafter\gHAssign\csname #1Level:\endcsname0
   \else
      \expandafter\gHAdvance\csname #1Level:\endcsname  -1
      \gHAdvance\:ChkLevel  -1
      \PopStack\:CHK\:temp
      \edef\:tempa{#1}%
      \ifx \:temp\:tempa
         \PopStack\:CHK\:CurrentChk
         \PushStack\:CHK\:CurrentChk
     \else
         \writesixteen{\the\inputlineno.
            --- warning --- </\:temp> instead of </#1>}%
      \fi
   \fi
}
\def\VerifyEmpty#1{\Protect\trace:emptychk#1 !*?: }
\def\trace:emptychk#1 #2!*?: {%
   \:chk:trc{Empty......#1}%
   \expandafter \ifx \csname \:CurrentChk +#1\endcsname\relax
      \expandafter\gdef  \csname \:CurrentChk +#1\endcsname{}%
         \writesixteen{\the\inputlineno.
         --- warning --- \:CurrentChk\space --> #1 ?}%
   \fi
}
\begingroup
   \catcode`\^7
   \gdef\Verify{\bgroup \catcode`\ 9 \catcode`\^^M9 \:dtd}
\endgroup
\def\:dtd#1\EndVerify{\egroup\dtd:rule#1,-->,}
\def\dtd:rule#1-->#2,{\def\:temp{#1#2}\ifx \:temp\empty\else
     \expandafter\gdef  \csname #1+#2\endcsname{}%
  \expandafter\dtd:rule
  \fi}

\else
   \let\VerifyOpen\:gobble
   \let\VerifyClose\:gobble
   \let\VerifyEmpty\:gobble
   \long\def\Verify#1\EndVerify{}
   \def\trace:chk#1 #2!*?: {}
\fi
\def\Goto:Configure{\long\def
   \Goto:Configure##1\:Configure{\let\Goto:Configure
              \:UnDef}\expandafter\Goto:Configure}
\:CheckOption{hooks++} \if:Option
      \pend:defI\Configure{\tmp:cnt0
      \long\def\c:def####1####2{\advance\tmp:cnt 1
        \edef\:tempb{\expandafter \meaning\csname c:##1:\endcsname}%
\expandafter\par:N  \:tempb////%

        \def####1{####2}%
        \edef\:temp{\noexpand\pend:def\noexpand####1{\noexpand\ifx
           \noexpand\EndPicture\noexpand\:UnDef \hbox{\noexpand\a:trc
           ##1\the\tmp:cnt :\:tempb\noexpand\b:trc}\noexpand\fi}}\:temp
        \edef\:temp{\noexpand\append:def\noexpand####1{\noexpand\ifx
           \noexpand\EndPicture\noexpand\:UnDef\hbox{\noexpand\c:trc
           ##1\the\tmp:cnt :\:tempb\noexpand\d:trc}\noexpand\fi}}\:temp
   }}

   \def\edit:p#1#2{\let#2\empty \:gobble}%
\else \:CheckOption{hooks+}  \if:Option
       \def\trc:wrt{\writesixteen}
    \else \:CheckOption{hooks}  \if:Option
       \let\trc:wrt\:gobble
    \fi\fi
 \if:Option
   \pend:defI\Configure{\tmp:cnt0
   \long\def\c:def####1####2{\advance\tmp:cnt 1
     \edef\:tempb{\expandafter \meaning\csname c:##1:\endcsname}%
\expandafter\par:N  \:tempb////%

     \def####1{####2}%
     \ifx ####1\empty
        \edef\:temp{\noexpand\pend:def\noexpand####1{\hbox{\noexpand
          \a:trc ##1\the\tmp:cnt :\:tempb\noexpand\b:trc}}}\:temp
        \edef\:temp{\noexpand\append:def\noexpand####1{\hbox{\noexpand
          \c:trc ##1\the\tmp:cnt :\:tempb\noexpand\d:trc}}}\:temp
     \else
        \trc:wrt{...##1\the\tmp:cnt....\meaning####1}%
     \fi
}}
\long\def\ConfigureToc#1#2#3#4#5{%
   \expandafter\def\csname toc#1\endcsname##1##2##3{#5}%
   \edit:p\def\:temp{#2#3#4#5}\ifx \:temp\empty
      \expandafter\pend:defIII\csname toc#1\endcsname{\hbox
        {\a:trc Toc(#1)1\b:trc}####1\hbox{\a:trc Toc(#1)2\b:trc}####2\hbox
        {\a:trc Toc(#1)3\b:trc}####3\hbox{\a:trc Toc(#1)4\b:trc}}%
   \else
     \def\:temp{#4}\ifx \:temp\empty \else
   \expandafter\pend:defIII\csname toc#1\endcsname{#4####3}%
\fi
\def\:temp{#3}\ifx \:temp\empty \else
   \expandafter\pend:defIII\csname toc#1\endcsname{#3####2}%
\fi
\def\:temp{#2}\ifx \:temp\empty \else
   \expandafter\pend:defIII\csname toc#1\endcsname{#2####1}%
\fi
%
   \fi
}

   \let\edit:p\empty
\fi \fi
\if:Option
   \edef\:tempb{\def\noexpand
   \par:N##1\string :##2->##3////{\noexpand\par:NN?##2//}}
\:tempb
\def\par:NN#1#2//{\def\:tempb{#2}\ifx\:tempb\empty
   \def\:tempb{#1}\else \def\:tempb{\par:NN#2//}\expandafter\:tempb\fi}

   \NewConfigure{hooks}[4]{\def\a:trc{#1}\def\b:trc{#2}%
      \def\c:trc{#3}\def\d:trc{#4}%
      \ifx \a:trc\empty \def\a:trc##1\b:trc{\b:trc}\fi
      \ifx \c:trc\empty \def\c:trc##1\d:trc{\d:trc}\fi
   }
   \def\d:def{\advance\tmp:cnt 1\def}
   \Configure{hooks}{}{}{}{}
\else
   \let\c:hooks:\:gobbleIV
   
\fi
\def\Tg<#1>{%
   \expandafter\ifx
      \csname\try:tagend <#1</!*?: \endcsname\is:empty
      \:tagend#1!*?: \else
   \expandafter\ifx
      \csname\try:tagempty #1>/>!*?: \endcsname\is:empty
      \:tag{#1}\else  \:tagempty #1>\fi\fi}
\def\try:tagend#1</#2!*?: {#1is:empty}
\def\try:tagempty#1/>#2!*?: {#2is:empty}
\def\is:empty{\empty\empty}
\:CheckOption{edit} \if:Option
  % \def\tg<#1>{\c:edit#1\d:edit}
\def\TG<#1>{\a:edit#1\b:edit}

  \def\tag:of#1 #2!*?: {#1}
\def\mn:s{-}
\def\:tag#1{\VerifyOpen{#1}\expandafter\ifx
   \csname A:\tag:of#1 !*?: \endcsname\mn:s\else
     \csname A:\tag:of#1 !*?: \endcsname
     \hbox{\a:edit\HCode{#1}\b:edit}%
   \fi \csname B:\tag:of#1 !*?: \endcsname
  }
\def\:tagend#1#2!*?: {\VerifyClose{#2}\expandafter\ifx
   \csname A:/\tag:of#2 !*?: \endcsname\mn:s\else
     \csname A:/\tag:of#2 !*?: \endcsname
     \hbox{\a:edit\HCode{/#2}\b:edit}%
   \fi \csname B:/\tag:of#2 !*?: \endcsname
  }
\def\:tagempty#1/>{\VerifyEmpty{#1}\expandafter\ifx
   \csname A:\tag:of#1 !*?: /\endcsname\mn:s\else
     \csname A:\tag:of#1 !*?: /\endcsname
     \hbox{\a:edit\HCode{#1/}\b:edit}%
   \fi \csname B:\tag:of#1 !*?: /\endcsname
  }
\expandafter\def\csname c:<:\endcsname#1>{\edef\:temp{#1}\:gat}
\long\def\:gat#1#2{\expandafter
   \def\csname A:\:temp\endcsname{#1}%
   \expandafter\def\csname B:\:temp\endcsname{#2}}
\NewConfigure{edit}{4}

\else
  % \def\tg<#1>{<#1>}
\def\TG<#1>{\HCode{<#1>}}

  \:CheckOption{verify}\if:Option\else \:CheckOption{verify+}\fi
  \if:Option
     \def\:tag#1{\VerifyOpen{#1}\hbox{\HCode{<#1>}}}
\def\:tagend#1#2!*?: {\VerifyClose{#2}\hbox{\HCode{</#2>}}}
\def\:tagempty#1/>{\VerifyEmpty{#1}\hbox{\HCode{<#1/>}}}
\expandafter\def\csname c:<:\endcsname#1>{\:gobbleII}

  \else
     \def\:tag#1{\hbox{\HCode{<#1>}}}
\def\:tagend#1#2!*?: {\hbox{\HCode{</#2>}}}
\def\:tagempty#1/>{\hbox{\HCode{<#1/>}}}
\expandafter\def\csname c:<:\endcsname#1>{\:gobbleII}

  \fi
\fi

\NewConfigure{Preamble}{2}
\NewConfigure{CutAtTITLE+}[1]{\def\a:CutAtTITLE{#1}}
\NewConfigure{HPageTITLE+}[1]{\def\a:HPageTITLE{#1}}
\NewConfigure{crosslinks}[8]{%
   \def\default:bts##1##2{%
      \let\sv:cond:bt\cond:bt
%
      \def\:temp{##1}\ifx \:temp\empty
         \ifx\a:crsbt\empty\ifx \aa:crsbt\empty \let\cond:bt\:gobbleIII
\fi\fi
         \a:crsbt
      \else
         \ifx\b:crsbt\empty\ifx \bb:crsbt\empty \let\cond:bt\:gobbleIII
\fi\fi
         \b:crsbt
      \fi
      \def\CLB:next{\expandafter\cond:bt\next:bt{}{#3}}%
      \ifx \prevCut\empty
   \def\:temp{\prevCut}\ifx \:temp\prev:bt
      \Recall:HPageTag\HP:file  \Save:HPageTag\HP:file
      \def\:temp{#4}\ifx \:temp\empty \else
         \def\CLB:prevup{%
            \def\:temp{#4}#1\Link[\RefFile{)B\HP:file}]{}{}#4\EndLink #2}%
      \fi
      \def\:temp{#5}\ifx \:temp\empty \else
         \def\CLB:prevtailup{%
               \def\:temp{#5}#1\Link[\RefFile{)B\HP:file}]{tail\Jobname
                                                }{}#5\EndLink #2}%
      \fi
      \long\def\:tempb####1####2{\gdef\root:next{%
  \def\:temp{####2}\edef\HP:file{\RefFileNumber\file:id}%
  \ifx \:temp\HP:file
      \global\let\root:next\empty
      \def\:temp{#3}\ifx \:temp\empty
         \Link{}{tail\Jobname}\EndLink
      \else
         \expandafter\ifx \csname a:next+\endcsname\relax #1\else
            \csname a:next+\endcsname \fi
         \expandafter\ifx \csname a:next\endcsname\relax
                \def\:next{#3}%
         \else  \let\:next\a:next \fi
         \ifx \:next\empty
            \Link{}{tail\Jobname}\EndLink
         \else
            \Link[####1]{}{tail\Jobname}\:next\EndLink
         \fi
         \expandafter\ifx \csname b:next+\endcsname\relax #2\else
         \csname b:next+\endcsname \fi
   \fi \fi}}%
\edef\:temp{\noexpand\:tempb
   {\RefFileNumber\file:id}{\RefFile{)B\HP:file}}}%
\:temp
%
\fi \fi
%
      \def\CLB:prev{\expandafter\cond:bt\prev:bt{}{#4}}%
      \def\CLB:prevtail{\expandafter\cond:bt\prev:bt{tail\prev:bt}{#5}}%
      \def\:temp{##2}%
\ifx \:temp\empty
   \def\:temp{#6}%
   \ifx \:temp\empty \else
       \def\CLB:tail{\def\:temp{#6}#1\Link[\RefFileNumber\file:id]{}{}#6\EndLink #2}\fi
\else
   \def\:temp{#7}%
   \ifx \:temp\empty \else
       \def\CLB:front{\def\:temp{#7}#1\Link{##2\RefFileNumber\file:id}{}#7\EndLink #2}\fi
\fi
%
      \def\:temp{#8}\ifx \:temp\empty \else
         \ifx \cond:bt\:gobbleIII
         \else \def\CLB:up{\def\:temp{#8}#1\ExitHPage{#8}#2}\fi\fi
      \CLB:menu
%
      \let\cond:bt\sv:cond:bt
%
      \def\:temp{##1}\ifx \:temp\empty \aa:crsbt\else \bb:crsbt\fi
      \def\:temp{##1}\ifx \:temp\empty  \else
   \ifx\yes:tail\def
      \Link{}{##1\RefFileNumber\file:id}\EndLink
\fi \fi
}%
   \def\cond:bt##1##2##3{%
   \expandafter\ifx\csname a:cond:bt\endcsname \relax
      \ifx ##1\empty \else
         \def\:temp{##3}\ifx \:temp\empty \else
                #1\Link[##1]{##2}{}##3\EndLink #2%
      \fi \fi
   \else
      \ifx ##1\empty
         \def\:temp{next}\ifx \:temp\cur:bt \else
   \ifx \c:next:\:gobbleII \else \let\:temp=\empty \fi
\fi
\ifx \:temp\empty \else
   \ifx \a:cond:bt\empty  \ifx \b:cond:bt\empty  #1\else
                                         \a:cond:bt\fi
   \else                                 \a:cond:bt\fi
   ##3%
   \ifx \a:cond:bt\empty  \ifx \b:cond:bt\empty  #2\else
                                         \b:cond:bt\fi
   \else                                 \b:cond:bt\fi
\fi
%
      \else
         \def\:temp{##3}\ifx \:temp\empty \else
                #1\Link[##1]{##2}{}##3\EndLink #2%
      \fi \fi
   \fi
}%
%
}
\NewConfigure{crosslinks+}[4]{%
   \def\a:crsbt{#1}\def\aa:crsbt{#2}\def\b:crsbt{#3}\def\bb:crsbt{#4}}
\NewConfigure{crosslinks-}[2]{%
   \def\a:cond:bt{#1}\def\b:cond:bt{#2}}
\expandafter\def\csname c:crosslinks*:\endcsname{%
   \let\CLB:menu\empty \CLB:menuitem }
\def\CLB:menuitem#1{%
   \def\:tempa{#1}\ifx \:tempa\empty \else
      \append:def\CLB:menu{\csname a:crosslinks:#1\endcsname
                     \def\cur:bt{#1}\csname CLB:#1\endcsname
      }%
      \def\:temp{prev}\ifx \:temp\:tempa
         \append:def\CLB:menu{\csname a:crosslinks:prev\endcsname
                              \csname CLB:prevup\endcsname
         }%
      \else
         \def\:temp{prevtail}\ifx \:temp\:tempa
            \append:def\CLB:menu{%
               \csname a:crosslinks:prev\endcsname
               \ifx\a:crsbt\empty\else \let\yes:tail\def\fi
\ifx\aa:crsbt\empty\else \let\yes:tail\def\fi
\ifx\b:crsbt\empty\else \let\yes:tail\def\fi
\ifx\bb:crsbt\empty\else \let\yes:tail\def\fi
%
               \csname CLB:prevtailup\endcsname
         }%
      \fi \fi
      \expandafter\CLB:menuitem
   \fi
}
\Configure{crosslinks*}
   {next}
   {prev}
   {prevtail}
   {tail} {front}
   {up}
   {}
\NewConfigure{crosslinks:next}{1}
\NewConfigure{crosslinks:prev}{1}
\NewConfigure{crosslinks:prevtail}{1}
\NewConfigure{crosslinks:tail}{1}
\NewConfigure{crosslinks:front}{1}
\NewConfigure{crosslinks:up}{1}
\NewConfigure{next}[1]{\def\a:next{#1}}
\NewConfigure{next+}[2]{%
    \expandafter\def\csname a:next+\endcsname{#1}%
    \expandafter\def\csname b:next+\endcsname{#2}}
\NewConfigure{writetoc}[1]{\concat:config\a:writetoc{#1}}
\let\a:writetoc\empty
\NewConfigure{TocAt*}[2]{%
    \c:def\a:dTocAt{#1}\c:def\b:dTocAt{#2}}
\NewConfigure{TocAt}[2]{%
    \c:def\a:TocAt{#1}\c:def\b:TocAt{#2}}
\Configure{TocAt*}{}{}
\Configure{TocAt}{}{}
\def\halignTD{\ifx \:mALIGN\empty \hT:D \else \:mALIGN \fi}
\def\halignTB#1{
   \expandafter\ifx \csname :#1:\endcsname\relax
      \:warning{Missing \string\Configure{halignTB<>}{#1}}%
   \else
      \global\expandafter\let\expandafter\:MkHalign:
      \csname :#1:\endcsname \a:halignTB \expandafter\expandafter
      \expandafter\halign:TB \csname :#1:\endcsname!*?: \b:halignTB
   \fi }
\NewConfigure{halignTB}{2}
\NewConfigure{halignTB<>}[2]{%
   \expandafter\def\csname :#1:\endcsname{#2}}
\Configure{halignTB<>}{MkHalign}{<>}%

\NewConfigure{MkHalign}[6]{%
   \def\T:halign{\PushMacro\:MkHalign:\Configure{halignTB<>}{MkHalign}{<>}%
#1}%
   \def\t:halign{#2\PopMacro\:MkHalign:
                 \global\let\:MkHalign:\:MkHalign:}%
   \def\R:halign{\TT:halign \gHAdvance\HRow  1 \gHAssign\HCol1
      #3}%
   \def\r:halign{\end:omit#4}%
   \def\D:halign{\:nopartrue
      \gHAdvance\dH:cnt by 1
\edef\:tempa{\global\let\expandafter\noexpand\csname xc\dH:cnt\endcsname
       \expandafter\noexpand\csname dH\MkHalign:d\endcsname}%
\:tempa
\expandafter\xdef\csname \dH:cnt :tempa\endcsname{%
   \global\let \expandafter\noexpand\csname dH\MkHalign:d\endcsname
       \expandafter\noexpand\csname xc\dH:cnt\endcsname}%
%
      \gHAdvance\MS:count  -1
\ifnum \MS:count > 0  \else
   \end:omit  \relax:shrp     \derive:TD
   \HAssign\:MULTISPAN1  \let\:mALIGN\empty
   \expandafter\add:span\old:span \gHAssign\MS:count\:MULTISPAN
   \relax #5%
\fi
\xdef\Step:Col{\ifx \HMultispan\:UnDef 1 \else \HMultispan\fi}%
%
      \ifnum\MS:count=\ifx \:MULTISPAN\:UnDef \MS:count
                      \else                  \:MULTISPAN\fi
         \expandafter\gdef\csname dH\MkHalign:d\endcsname
            {\ifnum \MS:count<2 #6\relax
 \gHAdvance\HCol  \Step:Col\relax \fi
}\fi}%
   \def\d:halign{\csname dH\ifnum \MkHalign:d<1 1\else \MkHalign:d\fi
                 \endcsname \csname \dH:cnt :tempa\endcsname
\gHAdvance\dH:cnt by -1
}}
\Configure{MkHalign}{}{}{}{}{}{}
\HAssign\dH:cnt0
\NewConfigure{halignTD}[2]{\c:def\TD:CLASS{#1}%
   \c:def\EndTD:CLASS{#2}\scan:halignTD}
\def\scan:halignTD#1{\def\:temp{#1}\ifx \:temp\empty\else
    \expandafter \sc:halignTD\fi{#1}}
\def\sc:halignTD#1#2{\expandafter\def\csname
   \string#1:T:D\endcsname{#2}\scan:halignTD}
\NewConfigure{halignTR}[1]{\def\halignTR{#1}}
\Configure{halignTR}{}
\def\halignTBL{\expandafter\ifx \csname v:TBL\endcsname\relax
   \else \expandafter\ifx \csname \v:TBL :T:BL\endcsname\relax\else
       \csname \v:TBL :T:BL\endcsname
   \fi\fi}
\NewConfigure{halignTBL}[1]{\scan:halignTBL{#1}}
\def\scan:halignTBL#1{\def\:temp{#1}\ifx \:temp\empty\else
    \expandafter \sc:halignTBL\fi{#1}}
\def\sc:halignTBL#1#2{\expandafter\def\csname
   \string#1:T:BL\endcsname{#2}\scan:halignTBL}
\NewConfigure{halign}[6]{\c:def\hlg:a{#1}%
   \c:def\hlg:b{#2}\c:def\hlg:c{#3}\c:def\hlg:d{#4}%
   \c:def\hlg:e{#5}\c:def\hlg:f{#6}}
\NewConfigure{pic-halign}[1]{\def\pic:hlng{#1}}
\NewConfigure{tt}[1]{\let\vrb:tt#1}
\let\vrb:tt\tt
\NewConfigure{HVerbatim}[4]{\c:def\bef:Verb{#1\Verb:eoln}%
   \c:def\aft:Verb{\ht:everypar{}#2}%
   \c:def\Verb:eoln{#3}\c:def\Verb:boln{#4}}
\NewConfigure{HVerbatim+}[2]{\d:def\Verb:Left{#1}%
   \def\Verb:sp{#2}}
\NewConfigure{Picture-alt}{1}
\Configure{Picture-alt}{}
\NewConfigure{PictureAlt}{2}
\NewConfigure{PictureAttr}[1]{\def\a:PictureAttr##1{#1}}
\Configure{PictureAlt} {\NoFonts} {\EndNoFonts}
\Configure{PictureAttr} {\HCode{\Hnewline #1}}
\NewConfigure{IMG}{5}
\NewConfigure{Picture}[1]{\def\PictExt{#1}}
\Configure{Picture}{.png}
\NewConfigure{Picture+}{2}
\NewConfigure{Picture*}{2}
\expandafter\def\csname c:string-encoder:\endcsname#1{%
   \expandafter\def\csname c:#1:\endcsname{%
      \csname #1:String\endcsname
      \expandafter\let\csname #1:String\endcsname=\empty
      \expandafter\let\expandafter\Char:dic
                             \csname #1Char:dic\endcsname
      \cnf:transString}
   \expandafter\def\csname #1\endcsname##1##2!*?: {%
      \if !##1!\expandafter\gob:par
      \else
         \expandafter\ifx \csname \string##1:#1EnCoDe\endcsname\relax
            \string ##1\else
            \csname \string##1:#1EnCoDe\endcsname
         \fi
         \if !##2!\expandafter\expandafter\expandafter\gob:par
         \else
             \expandafter\expandafter\expandafter
             \expandafter\expandafter\expandafter
                    \csname #1\endcsname
         \fi
       \fi
       ##2!*?: %
   }
   \expandafter\def\csname #1Char:dic\endcsname##1##2{%
      \def\:temp{##1}\ifx \:temp\empty \egroup
      \else  \egroup
          \expandafter\append:def\csname #1:String\endcsname
               {\expandafter\let
                        \csname \string##1:#1EnCoDe\endcsname=\:UnDef}%
          \expandafter\def\csname \string##1:#1EnCoDe\endcsname{##2}%
          \expandafter \cnf:transString
      \fi
   }
}
\def\cnf:transString{\bgroup
   \catcode`\%=12
   \catcode`\~=12
   \catcode`\$=12
   \catcode`\&=12
   \catcode`\#=12
   \catcode`\^=12
   \catcode`\_=12
   \catcode`\?=12 \Char:dic }
\def\gob:par#1!*?: {}
\def\c:Needs:{\def\:Needs##1}
\expandafter\def\csname c:Needs-:\endcsname{\def\:Neds##1}

\NewConfigure{HtmlPar*}[2]{%
   \def\:temp{#2}\ifx \:temp\empty \c:def\skip:Par{#1}\else
     \c:def\skip:Par{#1\Next:EndP{#2}}\fi}
\NewConfigure{ExitHPage}{3}
\NewConfigure{UndefinedSec}[1]{%
   \ifx \ltx:like\:UnDef  \let\ltx:like\empty \let\ltx:nolike\empty \fi
   \append:def\ltx:like{\expandafter\let\csname #1\endcsname\empty}%
   \append:def\ltx:nolike{\expandafter\let\csname #1\endcsname\:UnDef}%
}
\NewConfigure{+CutAt}[3]{%
  \expandafter\def\csname Before#1Button\endcsname##1{#2}%
  \expandafter\def\csname After#1Button\endcsname##1{#3}}
\NewConfigure{NoSection}{2}
\NewConfigure{toTocLink}[2]{\def\scp:Link{#1}\def\scp:EndLink{#2}}
\Configure{toTocLink}{\Title:Link}{\EndLink}
\NewConfigure{TocLink}[1]{\def\a:TocLink##1##2##3##4{#1}}
\NewConfigure{PauseMkHalign}{4}
\NewConfigure{MiniHalign}{6}
\NewConfigure{noalign-}[2]{\c:def\a:noalign{#1}\c:def\b:noalign{#1}}
\:CheckOption{no-halign} \if:Option \else
    \NewConfigure{noalign}{2}
\fi
\NewConfigure{Canvas}[3]{}
\NewConfigure{PictureAlt*+}{2}
\NewConfigure{PictureAttr*+}[1]{%
   \expandafter\def\csname a:PictureAttr*+\endcsname##1{#1}%
}
\Configure{PictureAttr*+}{\ht:special{t4ht=#1}}
\NewConfigure{PictureAlt*+[]}{2}
\NewConfigure{PictureAttr*+[]}[1]{%
   \expandafter\def\csname a:PictureAttr*+[]\endcsname##1{#1}%
}
\Configure{PictureAlt*+[]} {\NoFonts} {\EndNoFonts}
\Configure{PictureAttr*+[]} {\ht:special{t4ht=#1}}
\def\HChar#1{{\leavevmode 
\ht:special{t4ht@#1}\ifnum #1>-1 \a:HChar\fi}}
\NewConfigure{HChar}{1}
\Configure{HChar}{x}
\NewConfigure{@Picture}[1]{\def\a:@Picture{#1}}
\let\a:@Picture\:gobble
\NewConfigure{RULE}[5]{\ht:special{t4ht@\%\%R#1#2#1#3}
  \ht:special{t4ht@\%\%r#1#4#1#5}}
\NewConfigure{GROUP}[5]{\ht:special{t4ht@\%\%P#1#2#1#3}
  \ht:special{t4ht@\%\%p#1#4#1#5}}
\NewConfigure{CHAR}[5]{\ht:special{t4ht@\%\%C#1#2#1#3}
  \ht:special{t4ht@\%\%c#1#4#1#5}}
\NewConfigure{HSPACE}[3]{\ht:special{t4ht@\%\%H#1#2#1#3}}
\NewConfigure{VSPACE}[3]{\ht:special{t4ht@\%\%V#1#2#1#3}}
\let\send:special=\:gobble
\NewConfigure{Send:GROUP}[2]{\send:special{t4ht\string~<#1#2}}
\NewConfigure{Send:EndGROUP}[2]{\send:special{t4ht\string~>#1#2}}
\NewConfigure{Send:BACK}[1]{\send:special{t4ht\string~<*#1}}
\def\:temp{\a:moveright \o:moveright:}
\HLet\moveright\:temp
\NewConfigure{moveright}{1}

\NewConfigure{htf}[9]{{%
  \tmp:cnt#1 \ifnum \tmp:cnt>255  \:warning{Code larger than
              255 in \string\Configure{htf}}\else
  \ht:special{t4ht;|\ifnum \tmp:cnt<10 00\else
    \ifnum \tmp:cnt<100 0\fi\fi
    \the\tmp:cnt#2#3#2#4#2#5#2#6#2#7#2#8#2#9#2\the\tmp:cnt}%
  \fi}}
\def\NoFonts{\ht:special{t4ht;8}}
\def\EndNoFonts{\ht:special{t4ht;9}}
\NewConfigure{FontCss}[2]{\def\a:FontCss:{#1}\def\a:FontCssPlus:{#2}}
\NewConfigure{htf-css}[2]{{%
   \def\:temp##1!*?: {\def\:tempa{##1}}%
   \afterassignment\:temp\tmp:cnt0#1!*?: %
   \def\:temp{\Configure{Needs}}%
   \ifx  \:tempa\empty
       \expandafter\:temp\expandafter{\a:FontCss:}\Needs{("#1"): #2}%
   \else
       \expandafter\:temp\expandafter{\a:FontCssPlus:}\Needs{#1 #2}%
   \fi}}
\NewConfigure{htf-attr}[2]{{%
   \Configure{Needs}{##1}%
   \Needs{Font\string_css\string_base: #1Font\string_css\string_mag: #2}}}

\:CheckOption{new-accents}     \if:Option
   \def\:temp{\leavevmode\ifx \d:mathaccent\empty
    \else \ht:special{t4ht\string~>1\d:mathaccent}\fi
    \ht:special{t4ht*\string^m}\o:mathaccent:}
\HLet\mathaccent\:temp
\def\:temp{\leavevmode\ht:special{t4ht*\string^t}\o:accent:}
\HLet\accent\:temp
\NewConfigure{accent}[6]{\ht:special{t4ht*\string^t#1#2#1#3#1#4#1#5#1#6}}
\NewConfigure{mathaccent}[6]{\ht:special{t4ht#1\string
  ^m#1#2#1#3#1#4#1#5#1}\edef\d:mathaccent{#6}}
\let\d:mathaccent\empty
\NewConfigure{accented}[6]{\ht:special
     {t4ht*\string^a#1#2#1#3#1#4#1#5#1#6}}
\NewConfigure{accenting}[3]{\ht:special{t4ht*\string^i#1#2#1#3#1#1}}
\NewConfigure{HAccent}[1]{\pic:Accent#1}
\def\pic:Accent#1#2#3#4{\edef\:tempb##1{{\expandafter\:gobble\string#1}}%
   \pend:defI\:tempb{\choose:accent{####1}#2\relax!*?: }%
   \append:defI\:tempb{{#3}{#4}}%
   \expandafter\let\csname \string#1:\endcsname\:tempb
   \edef\:tempb{\noexpand\Protect\noexpand\acc:nm{\string#1}}%
   \HLet#1\:tempb}
\def\acc:nm#1{\csname \string#1:\endcsname}
\def\choose:accent#1{\def\:accented{#1}\cs:accent}
\def\realx:par{\relax}
\def\cs:accent#1{\def\:tempa{#1}%
   \ifx \:tempa\realx:par \expandafter\pic:accent
   \else
       \ifx \:tempa\:accented
            \expandafter\expandafter\expandafter\nopic:accent
       \else \expandafter\expandafter\expandafter\cs:accent\fi
   \fi}
\def\pic:accent#1!*?: #2#3#4{%
   #3\nopic:accent!*?: {#2}{}{}#4}
\def\nopic:accent#1!*?: #2#3#4{\expandafter\expandafter
   \csname o:#2:\endcsname\expandafter{\:accented}}

\else
   \NewConfigure{accent}[5]{%
   \expandafter\ifx \csname x:\string#2\endcsname\relax
      \expandafter\edef
         \csname x:\string#2\endcsname{\accent:cnt}%
      \expandafter\let\csname t:\accent:cnt\endcsname#1%
\expandafter\let\csname m:\accent:cnt\endcsname#2%
%
      \edef\:temp{\ifx \accent:def\:UnDef \noexpand\def \else
     \noexpand\accent:def \fi
   \noexpand\:temp{\noexpand\ac:pc{\accent:cnt}}%
   \noexpand\HLet\noexpand#1\noexpand\:temp
   \noexpand\pend:defI
  \noexpand\:accnts{\noexpand\ifnum ########1=\accent:cnt
  \noexpand\expandafter \noexpand\acpc:
  \expandafter\noexpand\csname\accent:cnt :ac\endcsname
  \noexpand\expandafter \noexpand\end:accent \noexpand\fi}%
}%
\:temp
\def\:temp{#1}\def\:tempa{#2}\ifx \:temp\:tempa \else \HLet#2#1\fi
%
      \Advance:\accent:cnt by 1
   \fi
   \edef\:tempa{\csname x:\string#2\endcsname}%
   \def\:temp{#3}\ifx \:temp\empty \else
  \expandafter\def\csname \:tempa :ac\endcsname{#3}
\fi
\long\def\:temp##1##2{#4#5}\ifx \:temp\:gobbleII \else
  \expandafter\def\csname C:\:tempa\endcsname##1{#4}%
  \expandafter\def\csname MT:\:tempa\endcsname##1##2{#5}%
\fi
%
   }
\def\accent:cnt{0}
\def\end:accent#1\empty{}
\def\:accnts#1{}

   \def\ac:pc{\Protect\csname acp:c\endcsname}
\def\acp:c#1#2{{\def\acn:no{#1}\def\:temp{#2}\ifx \:temp\empty
      \ac:nt{}%
%
   \else %\let\@tabacckludge\:tabacckludge
%
      \def\ac:pc{\ac:nt{#2}}\a:cpc{#1}\fi }}
\def\ac:nt{\csname \ifmmode m\else t\fi :\acn:no\endcsname}
\def\Ac:nt{\edef\:temp{\ifx \EndPicture\:UnDef
      \def\noexpand\ac:pc{\noexpand\Protect \noexpand\acp:c}%
      \expandafter\noexpand \csname MT:\acn:no\endcsname
  \fi
  \expandafter\noexpand
  \csname\ifmmode m\else t\fi :\acn:no\endcsname}\:temp
}
\def\a:cpc#1{%
  \ifx \EndPicture\:UnDef
     \def\AC:PC{{\let\AC:PC\ACP:C  \let\ac:nt\Ac:nt \ac:pc}%
%
     }%
     \:accnts{#1}\empty
  \else   \ac:pc  \fi  }
\def\acpc:#1#2{%
   \def\:tempa{#1}\ifx \:tempa\empty
      \ifx \:temp\empty
   \def\:tempa{#2}\ifx \:tempa\empty  \AC:PC
   \else \csname \ifmmode m\else t\fi :\acn:no\endcsname{#2}%
\fi
\else \AC:PC \fi
%
   \else \ifx \:tempa\:temp  \let\AC:PC\empty
             \csname C:\acn:no\endcsname{#2}%
\fi
         \expandafter\acpc:
   \fi}

\fi


\def\:halign:{<>}
\:CheckOption{base}
\if:Option  \else
      \NewConfigure{$}[3]{%
      \def\a:mth{\bgroup#1}\def\b:mth{#2\egroup}%
      \def\c:mth{{\csname HCode\endcsname{}}%
#3}%
      \everymath{\ifx \EndPicture\:UnDef
          $\a:mth\everymath{}\everydisplay{}$%
                 \aftergroup\b:mth \c:mth \fi}}
   \NewConfigure{$$}[3]{%
      \def\a:display{\bgroup#1}%
      \def\b:display{#2\egroup}%
      \def\c:display{#3}%
      \everydisplay{\ifx \EndPicture\:UnDef
           $$\a:display\everymath{}\everydisplay{}$$%
                 \aftergroup\b:display \c:display\fi}}

\def\PicDisplay{\pic:gobble\env:PD
   \def\:temp{$$}\pic:cond\Pic:math\:temp}
\def\EndPicDisplay{\end:condpic\pic:gobble\endenv:PD}
\def\Pic:math{\hfil\break
   \expand:after{\Picture*}\alt:Mth{ \c:Math}}
\def\PicMath{\leavevmode\pic:gobble\env:PM\hbox\bgroup
   \everymath{}\everydisplay{}\pic:cond\pic:math$}
\def\EndPicMath{\end:condpic\egroup\pic:gobble\endenv:PM}
\def\pic:math{\expand:after{\Picture+}\alt:mth{ \c:math}}
\NewConfigure{PicDisplay}[4]{\def\alt:Mth{#3}%
   \ifx \alt:Mth\empty\else \def\alt:Mth{[#3]}\fi\def\c:Math{#4}%
   \c:def\env:PD{#1}\c:def\endenv:PD{#2}}
\NewConfigure{PicMath}[4]{\def\alt:mth{#3}%
   \ifx \alt:mth\empty\else \def\alt:mth{[#3]}\fi\def\c:math{#4}%
   \c:def\env:PM{#1}\c:def\endenv:PM{#2}}
\def\DviMath{\a:DviMath\leavevmode \MathClass \ht:special{t4ht@(}\vbox
   \bgroup{\expandafter\ifx\csname ht:everypar\endcsname\relax
                \expandafter\everypar
           \else \expandafter\ht:everypar\fi{}\leavevmode\ht:special{t4ht@)}}%
       \relpenalty=10000
       \binoppenalty=10000
 \DviSend}
\def\EndDviMath{\EndDviSend \ht:special{t4ht@(}\egroup\ht:special{t4ht@)}%
\EndMathClass \b:DviMath}
\NewConfigure{DviMath}{2}
\def\PMath{\bgroup\Canvas \x:SUBOff  \x:SUPOff
   \let\Picture\empty \everymath{}\everydisplay{}}
\def\EndPMath{\EndCanvas\egroup}
\:CheckOption{PMath} \if:Option
   \def\:Pmath{$\PMath$\aftergroup\EndPMath}
   \def\:Pdisp{$$\PMath$$\aftergroup\EndPMath}
   \everymath{\:Pmath}
   \everydisplay{\:Pdisp}
\fi

   \let\s:b\sb
\let\:sbb\sb                 
\def\sb{\m:op\:sbb{SUB}}
\catcode`\_8
\:CheckOption{no_} \if:Option
   \let\s:b\:UndFi
   \let\x:SUBOff\empty  \let\x:SUBOn\empty

   \let\SUBOff\empty  \let\SUBOn\empty

   \def\no:restore{\let\no:restore\:UnDef}
\else
   \Log:Note{for non active \string_,
       use the command line option `no\string_'}%
   \ifx \sys:sb\:UnDef \def\:tempaa{_}
\else               \def\:tempaa{\noexpand\sys:sb}\fi

   \ifx \sys:sb\:UnDef \def\:tempa#1{\append:def\SUBOff{\let#1_}}
\else               \def\:tempa#1{\append:def\SUBOff{\def#1{%
  \ifmmode \expandafter\s:b \else \expandafter\sys:sb \fi
}%
}}\fi

   \catcode`\_13
      \if:Option
   \def\S:b{\m:op\s:b{SUB}}
\else
   \def\S:b#1{\def\SuB:{#1}\futurelet\:temp\sub:sup}
   \def\blank:space{
   }
   \def\sub:sup{\expandafter
      \ifx \blank:space\:temp \expandafter\sub:supA
       \else   \expandafter\after:sub\fi}
   \expandafter\def
      \expandafter\sub:supA\blank:space{\futurelet\:temp\sub:sup}
   \def\after:sub{\futurelet\:temp\choose:sub}
\def\choose:sub{\expandafter
   \ifx \csname \meaning\:temp sb\endcsname\relax
       \expandafter \a:putSUB
   \else
       \expandafter\expandafter\csname \meaning\:temp sb\endcsname
   \fi
}

   \def\a:putSUB{\sub:I \SuB:}
   \def\sub:I{\m:op\s:b{SUB}}
\fi

      \def\x:SUBOff{\let_\s:b}
      \def\pr:sb{\ifx \EndPicture\:UnDef
                     \expandafter\Protect\expandafter\S:b
                 \else \expandafter\s:b \fi}
      \edef\:SUBOff{\def\noexpand_{\:tempaa}}

      \:tempa_

      \def\x:SUBOn{\def_{\ifmmode \expandafter\pr:sb
                 \else    \expandafter\sys:sb\fi}\let\sb=_%
}
\x:SUBOn

      \def\SUBOn{\catcode`\_8
   \def_{\ifmmode \expandafter\pr:sb
         \else    \expandafter\sys:sb\fi}}
\SUBOn

   \catcode`\_8
   \:CheckOption{_13} \if:Option
      \def\no:restore{\let\no:restore\:UnDef
                \mathcode`\_"8000 \catcode`\_13 }
      \append:def\SUBOn{\mathcode`\_"8000 \catcode`\_13 \let\sb=_%
}
   \else
      \Log:Note{for \string_ of catcode 13,
          use the command line option `\string_13'}
      \def\no:restore{\let\no:restore\:UnDef
                \mathcode`\_"8000 \catcode`\_12 }
      \append:def\SUBOn{\mathcode`\_"8000 \catcode`\_12 \let\sb=_%
}
   \fi
   \bgroup
      \SUBOn  \def\:temp{\let\sb=_%
}
   \expandafter \egroup \:temp
\fi
\let\s:p\sp
\let\:spp\sp
\def\sp{\m:op\:spp{SUP}}
\catcode`\^7
\NewConfigure{\string^\string^}[2]{%
   \def\:tempa##1>{}\def\:temp{#1}\:warning{\string
       \Configure{\string\string\string ^\string\string
       \string^}{\expandafter\:tempa\meaning \:temp}{...}
       ignored; option \string^13 is not on}}

\:CheckOption{no^} \if:Option
   \let\s:p\:UndFi
   \let\x:SUPOff\empty  \let\x:SUPOn\empty

   \let\SUPOff\empty \let\SUPOn\empty

\else
   \Log:Note{for non active \string^,
       use the command line option `no\string^'}%
   \ifx \sys:sp\:UnDef \def\:tempbb{^}
\else               \def\:tempbb{\noexpand\sys:sp}\fi
%
   \ifx \sys:sp\:UnDef \def\:tempb#1{\append:def\SUPOff{\let#1^}}
\else               \def\:tempb#1{\append:def\SUPOff{\def#1{%
  \ifmmode \expandafter\s:p \else \expandafter\sys:sp \fi
}%
}}\fi
%
   \catcode`\^13
      \if:Option
   \def\S:p{\m:op\s:p{SUP}}
\else
   \def\S:p#1{\def\SuP:{#1}\futurelet\:temp\sup:sub}
   \:CheckOption{^13} \if:Option \catcode`\_13
   \else \catcode`\_12\fi
   \def\blank:space{
   }
   \def\sup:sub{\expandafter
      \ifx \blank:space\:temp \expandafter\sup:subA
       \else   \expandafter\sup:subB\fi}
   \expandafter\def
      \expandafter\sup:subA\blank:space{\futurelet\:temp\sup:sub}
   \def\sup:subB{\ifx _\:temp \expandafter\SUP:SUB
      \else \expandafter\a:putSUP \fi }
   \catcode`\_8
   \def\a:putSUP{\sup:I \SuP:}
   \def\sup:I{\m:op\s:p{SUP}}
\fi

      \def\x:SUPOff{\let^\s:p }
      \def\pr:sp{\ifx \EndPicture\:UnDef
                     \expandafter\Protect\expandafter\S:p
                 \else \expandafter\s:p \fi}
      \edef\:SUPOff{\def\noexpand^{\:tempbb}}

      \:tempb^

      \def\x:SUPOn{\def^{\ifmmode \expandafter\pr:sp
                 \else    \expandafter\sys:sp\fi}\let\sp=^%
}
\x:SUPOn

      \def\SUPOn{%
   \def^{\ifmmode \expandafter\pr:sp
         \else    \expandafter\sys:sp\fi}}
\SUPOn

      \def\:sUp{%
   \let\:sUp^%
   \def^{\futurelet\:temp\next:hat}
   \def\next:hat{\ifx ^\:temp \expandafter\:dblhat\else
      \expandafter\:sUp\fi}%
}

   \catcode`\^7
   \:CheckOption{^13} \if:Option
      \:sUp
\def\:dblhat#1#2{\def\:temp{#2}%
   \def\:tempc{\def\:tempa####1>{}\:warning{\string^\string
       ^\expandafter\:tempa\meaning\:temp? \string\Configure{\string
       \string\string ^\string\string\string^}{\expandafter\:tempa
       \meaning \:temp}{...} or use option no\string^}}%
   \ext:chr \:tempc}
\let\ext:chr\empty
\NewConfigure{\string^\string^}[2]{%
   \NewConfigure{\string^\string^}{2}%
   \append:def\ext:chr{\def\:tempa{#1}\ifx \:temp\:tempa
      \def\:tempc{#2}\fi}}

      \append:def\no:restore{\mathcode`\^"8000 \catcode`\^13 }
      \append:def\SUPOn{\mathcode`\^"8000 \catcode`\^13 \let\sp=^%
}
   \else
      \Log:Note{for \string^ of catcode 13,
          use the command line option `\string^13'}%
      \append:def\no:restore{\mathcode`\^"8000 \catcode`\^12 }
      \append:def\SUPOn{\mathcode`\^"8000 \catcode`\^12 \let\sp=^%
}
   \fi
   \bgroup
      \SUPOn  \def\:temp{\let\sp=^%
}
   \expandafter \egroup \:temp
\fi
\def\m:op{\ifx \EndPicture\:UnDef  \expandafter\:mop
          \else                    \expandafter\:m:p\fi}
\def\:mop{\relax\ifmmode \expandafter \mo:p \else \expandafter\mop:\fi}
\def\mo:p#1#2#3{{\csname a:#2\endcsname
   #1{#3}\csname b:#2\endcsname}}
\def\mop:#1#2#3{#1}
\def\:m:p#1#2{#1}
\NewConfigure{SUB}{2}
\NewConfigure{SUP}{2}
\:CheckOption{no^} \if:Option \else \:CheckOption{no_}\fi
\if:Option
   \NewConfigure{SUBSUP}[3]{}
   \NewConfigure{SUPSUB}[3]{}
   \NewConfigure{SUB/SUP}[6]{}
\else
   \def\SUP:SUB#1#2{\let\chs:sbsp\:gobble\def\SuB:{#2}\SUBSUP:}
   \def\SUB:SUP#1#2{\def\chs:sbsp##1##2{##1}\def\SuP:{#2}\SUBSUP:}
   \let\SUBSUP:\empty
   \NewConfigure{SUBSUP}[3]{%
      \def\:temp{#1#2#3}\ifx \:temp\empty
        \def\SUBSUP:{\sub:I\SuB:\sup:I\SuP:}%
      \else   \def\SUBSUP:{#1\s:b{\SuB:}#2\s:p{\SuP:}#3}\fi}
   \NewConfigure{SUPSUB}[3]{%
      \def\:temp{#1#2#3}\ifx \:temp\empty
        \def\SUBSUP:{\sup:I\SuP:\sub:I\SuB:}%
      \else   \def\SUBSUP:{#1\s:p{\SuP:}#2\s:b{\SuB:}#3}\fi}
   \NewConfigure{SUB/SUP}[6]{%
      \def\:temp{#1#2#3#4#5#6}\ifx \:temp\empty
        \def\SUBSUP:{\sub:I\SuB:\sup:I\SuP:}%
      \else   \def\SUBSUP:{\chs:sbsp
                 {#1\s:b{\SuB:}#2\s:p{\SuP:}#3}%
                 {#4\s:p{\SuP:}#5\s:b{\SuB:}#6}}\fi}
\fi

   \def\MathClass{\ht:special{t4ht\string^}}
\let\EndMathClass\MathClass
\def\PauseMathClass{\ht:special{t4ht\string^-}}
\def\EndPauseMathClass{\ht:special{t4ht\string^+}}
\catcode`\^=7
\NewConfigure{MathClass}[5]{\NoFonts \ht:special{t4ht@[}%
   \def\:temp{#2}\ifx \:temp\empty \else
      \ht:special{t4ht\string^#1#2#3#2#4}\fi
   \def\:temp{#5}\ifx \:temp\empty \else
      \bgroup \everypar{}\everymath{}\everydisplay{}%
      \hbox{${\ht:special{t4ht\string^#1}%
         {#5}^{{#5}^{#5}}\ht:special{t4ht\string^}}$}%
      \vbox{$${\ht:special
         {t4ht\string^#1}{#5}^{{#5}^{#5}}\ht:special{t4ht\string^}}$$}\egroup
   \fi
   {\everypar{}\noindent}%
   \ht:special{t4ht@]}\EndNoFonts
}
\NewConfigure{MathDelimiters}[2]{\NoFonts \ht:special{t4ht@[}%
  \bgroup \everypar{}\everymath{}\everydisplay{}%
  \hbox{${\ht:special
                     {t4ht\string^4}#1\ht:special{t4ht\string^5}#2%
    \ht:special{t4ht\string^4}{}^{#1}\ht:special{t4ht\string^5}{}^{#2}%
    \ht:special{t4ht\string^4}{}^{{}^{#1}}\ht:special
                                         {t4ht\string^5}{}^{{}^{#2}}%
    \ht:special{t4ht\string^}}$}%
  \vbox{$${\ht:special
                     {t4ht\string^4}#1\ht:special{t4ht\string^5}#2%
    \ht:special{t4ht\string^4}{}^{#1}\ht:special{t4ht\string^5}{}^{#2}%
    \ht:special{t4ht\string^4}{}^{{}^{#1}}\ht:special
                                         {t4ht\string^5}{}^{{}^{#2}}%
    \ht:special{t4ht\string^}}$$}%
    {\everypar{}\noindent}%
    \ht:special{t4ht@]}\egroup
  \EndNoFonts}
\catcode`\^=12
\HAssign\New:MathClass7
\catcode`\/=0
\catcode`\\=12
/def/NewMathClass#1{/relax
  /expandafter/ifx /csname /expandafter/:gobble/string#1/endcsname/relax
    /gHAdvance/New:MathClass by 1/relax
    /ifnum /New:MathClass>78
       /:warning{Too many math classes}
    /else
       /HAssign#1/New:MathClass /def/:tempc{#1}/:NewMC
       0123456789:;<=>?%
       @ABCDEFGHIJKLMNO%
       PQRSTUVWXYZ[\]{/string^}{/string_}%
       `abcdefghijklmno%
       pqrstuvwxyz{/string{}|{/string}}{/string~}!*?: %
    /fi
  /else
     /:warning{/string#1 is already defined}
  /fi}
/catcode`/\=0
\catcode`\/=12
\def\:NewMC#1{%
   \ifnum \:tempc=0 \expandafter\xdef\:tempc{#1}\expandafter\stop:do
   \else
      \expandafter\HAdvance\:tempc  -1\relax
      \expandafter\:NewMC
   \fi
}
\NewConfigure{nolimits}[1]{\def\:temp{#1}\ifx \:temp\empty
   \let\nolimits\o:nolimits: \else
   \def\:temp{\o:nolimits:\futurelet\:temp\:nolimits}%
   \def\:nolimits{\ifx \:temp\limits \else
                  \ifx \:temp\nolimits \else #1\fi\fi}%
   \HLet\nolimits\:temp \fi}
\let\o:nolimits:\nolimits
\NewConfigure{limits}[1]{\def\:temp{#1}\ifx \:temp\empty
   \let\limits\o:limits: \else
   \def\:limits{\ifx \:temp\nolimits \else#1\fi}%
   \def\:temp{\o:limits:\:l:mits}%
   \HLet\limits\:temp \fi}
\let\o:limits:\limits

\def\::limits{\expandafter\ifx \blank:spc\:temp
     \afterassignment\:l:mits \tmp:cnt0%
  \else
     \ifx \limits\:temp\else
        \expandafter\expandafter\expandafter\:limits
     \fi
  \fi}
\def\:l:mits{\futurelet\:temp\::limits}
\catcode`\ =13\relax\def\blank:spc{\let\blank:spc= }\blank:spc%
\catcode`\ =10\relax
\NewConfigure{displaylimits}[1]{\def\:temp{#1}\ifx \:temp\empty
   \let\displaylimits\o:displaylimits: \else
   \def\:displaylimits{\ifx \:temp\nolimits \else
           \ifx \:temp\limits \else  #1\fi\fi}%
   \def\:temp{\o:displaylimits:\display:l:mits}%
   \HLet\displaylimits\:temp \fi}
\let\o:displaylimits:\displaylimits
\def\::displaylimits{\expandafter\ifx \blank:spc\:temp
     \afterassignment\display:l:mits \tmp:cnt0%
  \else\expandafter\:displaylimits \fi}
\def\display:l:mits{\futurelet\:temp\::displaylimits}

   \def\:temp{\a:mathord \o:mathord:}      \HLet\mathord\:temp
\let\a:mathord\empty
\def\:temp{\a:mathop \o:mathop:}        \HLet\mathop\:temp
\let\a:mathop\empty
\def\:temp{\a:mathbin \o:mathbin:}      \HLet\mathbin\:temp
\let\a:mathbin\empty
\def\:temp{\a:mathrel \o:mathrel:}      \HLet\mathrel\:temp
\let\a:mathrel\empty
\def\:temp{\a:mathopen \o:mathopen:}    \HLet\mathopen\:temp
\let\a:mathopen\empty
\def\:temp{\a:mathclose \o:mathclose:}  \HLet\mathclose\:temp
\let\a:mathclose\empty
\def\:temp{\a:mathpunct \o:mathpunct:}  \HLet\mathpunct\:temp
\let\a:mathpunct\empty
\NewConfigure{FormulaClass}[4]{%
   \def\:temp{#2}%
   \expandafter\edef\csname a:\ifcase #1 mathord\or mathop\or
      mathbin\or mathrel\or mathopen\or mathclose\else
      mathpunc\fi\endcsname{\noexpand\ht:special
      {t4ht\string^\ifx\:temp\empty#1)\else )#2#3#2#4\fi}}}
\NewConfigure{FormulaClass*}[4]{%
   \def\:temp{#2}%
   \expandafter\edef\csname a:\ifcase #1 mathord\or mathop\or
      mathbin\or mathrel\or mathopen\or mathclose\else
      mathpunc\fi\endcsname{\ht:special
      {t4ht\string^\ifx\:temp\empty#1(\else (#2#3#2#4\fi}}}
\NewConfigure{mathord}[4]{\Configure{FormulaClass}{0}{#1}{#2}{#3}%
   \pend:def\a:mathord{#4}}
\NewConfigure{mathop}[4]{\Configure{FormulaClass}{1}{#1}{#2}{#3}%
   \pend:def\a:mathop{#4}}
\NewConfigure{mathbin}[4]{\Configure{FormulaClass}{2}{#1}{#2}{#3}%
   \pend:def\a:mathbin{#4}}
\NewConfigure{mathrel}[4]{\Configure{FormulaClass}{3}{#1}{#2}{#3}%
   \pend:def\a:mathrel{#4}}
\NewConfigure{mathopen}[4]{\Configure{FormulaClass}{4}{#1}{#2}{#3}%
   \pend:def\a:mathopen{#4}}
\NewConfigure{mathclose}[4]{\Configure{FormulaClass}{5}{#1}{#2}{#3}%
   \pend:def\a:mathclose{#4}}
\NewConfigure{mathpunct}[4]{\Configure{FormulaClass}{6}{#1}{#2}{#3}%
   \pend:def\a:mathpunct{#4}}
\NewConfigure{mathord*}[4]{\Configure{FormulaClass*}{0}{#1}{#2}{#3}%
   \pend:def\a:mathord{#4}}
\NewConfigure{mathop*}[4]{\Configure{FormulaClass*}{1}{#1}{#2}{#3}%
   \pend:def\a:mathop{#4}}
\NewConfigure{mathbin*}[4]{\Configure{FormulaClass*}{2}{#1}{#2}{#3}%
   \pend:def\a:mathbin{#4}}
\NewConfigure{mathrel*}[4]{\Configure{FormulaClass*}{3}{#1}{#2}{#3}%
   \pend:def\a:mathrel{#4}}
\NewConfigure{mathopen*}[4]{\Configure{FormulaClass*}{4}{#1}{#2}{#3}%
   \pend:def\a:mathopen{#4}}
\NewConfigure{mathclose*}[4]{\Configure{FormulaClass*}{5}{#1}{#2}{#3}%
   \pend:def\a:mathclose{#4}}
\NewConfigure{mathpunct*}[4]{\Configure{FormulaClass*}{6}{#1}{#2}{#3}%
   \pend:def\a:mathpunct{#4}}

   \def\MathSymbol{\futurelet\:temp\:::MathSymbol}
\def\:::MathSymbol{\if +\:temp
   \expandafter\:MathSymbol \else
   \expandafter\::MathSymbol \fi
}
\def\::MathSymbol#1#2{%
   \def\:tempb##1"##2///{##1}%
   \edef\:tempa{\expandafter\expandafter\expandafter\:tempb
       \expandafter\meaning\csname#2\endcsname"///}%
   \edef\:tempc{\string\mathchar}%
   \ifx \:tempa\:tempc
      \NewConfigure{#2}{1}\Configure{#2}{\csname o:#2:\endcsname}%
   \else
      \:MathSymbol{}{#1}{#2}%
   \fi
}
\def\:MathSymbol#1#2#3{%
   \def\:temp{{\math:sym#2{#3}}}%
   \expandafter\HLet\csname #3\endcsname\:temp
   \NewConfigure{#3}{1}\Configure{#3}{\csname o:#3:\endcsname}%
}
\def\math:sym#1#2{{\relax\ifmmode \expandafter#1\fi
   {\csname a:#2\endcsname}}}
\def\:temp#1{\a:left{#1}\o:left:#1\b:left{#1}}
\HLet\left\:temp
\def\:temp#1{\a:right{#1}\o:right:#1\b:right{#1}}
\HLet\right\:temp
\NewConfigure{left}[2]{\def\a:left##1{#1}\def\b:left##1{#2}}
\NewConfigure{right}[2]{\def\a:right##1{#1}\def\b:right##1{#2}}
\Configure{left}{}{}
\Configure{right}{}{}
\def\:tempc{\pic:gobble\a:over \o:over: \pic:gobble\b:over}
\HLet\over\:tempc
\NewConfigure{over}{2}
\def\:tempc{\pic:gobble\a:atop \o:atop: \pic:gobble\b:atop}
\HLet\atop\:tempc
\NewConfigure{atop}{2}
\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
\NewConfigure{above}{2}
\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}
\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}
\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}
\def\:temp{\pic:gobble\a:radical\o:radical:}
\HLet\radical\:temp
\NewConfigure{radical}{1}
\def\:temp#1#2#3#4{\a:mathchoice
   \o:mathchoice:{#1}{#2}{#3}{#4}\b:mathchoice }
\HLet\mathchoice\:temp
\NewConfigure{mathchoice}{2}
\def\:temp{\o:eqno:\a:eqno}
\HLet\eqno\:temp
\def\:temp{\o:leqno:\a:leqno}
\HLet\leqno\:temp
\NewConfigure{eqno}{1}
\NewConfigure{leqno}{1}

\fi

\edef\:temp{\string\special}
\edef\:tempa{\meaning\special}
\ifx \:temp\:tempa \else
   \def\:temp{\special
}
   \ifx \:temp\ht:special
     \:warning{Redefined \string\special. Might
                need \string\Configure{special}{<system-special>}}
\fi\fi
\NewConfigure{Link}[4]{%
   \def\empty:lnk{#4}\ifx\empty:lnk\empty\else \def\:sharp{#4}\fi
   \let\empty:lnk\empty     \def\tag:A{#1}%
   \def\HREF:{#2}\def\NAME:{#3}}
\Configure{Link}{}{}{}{}
\let\NOHREF:\:gobble

   \Hinput{tex4ht}
   \def\at:docend{\missing:endpream
\ifnum \HPageDepth> 0 \EndHPage[1]{}\fi
\Close:UntilEnd
%
%
\HAssign\op:fl\maxfile:id\space  \close:files
\root:next
\ifx \nsrt:chlnks\:UnDef
\else \nsrt:chlnks{tail}{}{BackChild}\fi
%
{\b:BODY \b:HTML}%
%
\global\let\at:docend=\empty}
\expand:after{\let\o:end}\csname end\endcsname
\expandafter\def\csname end\endcsname{\HtmlEnv
   \at:docend
   \csname export:hook\endcsname   \csname o:end\endcsname}

\fi
\long\def\NewSection#1#2{%
   \Def:Section#1{#2}{##1}%
   \edef\:temp{\expandafter\:gobble\string#1}%
   \Configure:Sec\:temp{}{}{}{}%
   \ConfigureToc{\expandafter\:gobble\string#1}{\empty}{\empty}{}{}}
\def\Def:Section#1{%
   \edef\:tempc{{\expandafter\:gobble \string#1}}%
   \edef\:temp{\long\def\expandafter\noexpand \csname
    c:\expandafter\:gobble \string#1:\endcsname
      ####1####2####3####4{\noexpand
      \Configure:Sec\:tempc{####3}{####4}{####1}{####2}}%
   \noexpand\NewConfigure{CutAt\expandafter\:gobble \string#1}2%
   \noexpand\NewConfigure{+CutAt\expandafter\:gobble \string#1}2%
   }\:temp  \expandafter\Configure\:tempc{\empty}{}{\empty}{}%
%
   \futurelet\:temp\ch:NewSec}
\def\ch:NewSec{\if *\:temp\let\if:toc\:gobble\expandafter\op:NewSec
               \else  \let\if:toc\empty  \expand:after{\op:NewSec+}\fi}
\def\op:NewSec#1{\expandafter\:NewSec\:tempc}
\def\:Every#1{%
   \expandafter\edef\csname Every#1\endcsname{%
      \def\expandafter\noexpand \csname :Every#1\endcsname####1}%
   \expandafter\edef\csname BeforeEvery#1\endcsname{%
      \def\expandafter\noexpand\csname :BeforeEvery#1\endcsname####1}%
}
%
\def\:NewSec#1#2{%
   \NewConfigure{end#1}[1]{\expandafter
   \def\csname a:end#1\endcsname{##1}}%
\Configure{end#1}{}
%
   \expandafter\def\csname #1\endcsname{%
      \expand:after{\let\if:toc}\csname if:#1toc\endcsname
      \:StartSec{#1}{#2}}%
   \expandafter\def\csname c:#1TITLE+:\endcsname{%
   \expandafter\def\csname a:#1TITLE\endcsname####1}%
%
   \expandafter\let\csname if:#1toc\endcsname\if:toc
   \:Every{#1}%
\csname Every#1\endcsname{%
   \expandafter\ifx\csname Toc:#1\endcsname \relax\else
       \a:TocAt  \csname Toc:#1\endcsname \b:TocAt
   \fi
   \ignorespaces}%
%
   \expandafter\def\csname #1:ttl\endcsname##1}
\def\:Ttle#1#2#3{%
   \html:addr
   \Get:SecAnchor{#1}{#2}{#3}%
%
   {\escapechar=`\\%
\protect:wrtoc
\csname Modify#1ToToc\endcsname
\protected:edef\:writetoc{\csname if:toc\endcsname{\the\:tokwrite
   {\string\doTocEntry
    \string\toc \expandafter\ifx\csname toToc:#1\endcsname\relax #1\else
       \csname toToc:#1\endcsname\fi
       {#2}{\html:tocsec{\ifx \TocTitle\:UnDef #3\else
       \TocTitle\fi}}{\the\:tokpage}\relax}}}%
\:writetoc   \global\let\TocTitle\:UnDef
}%
   {\csname #1:Href-\endcsname
%
\no:lbl:idx \csname Modify#1Title\endcsname
\html:sectoc{#3}%
}%
}
\gHAssign\TitleCount0   \global\let\mu:span\TitleCount
\NewConfigure{toToc}[2]{%
   \if !#2!\expandafter\let\csname toToc:#1\endcsname\:UnDef
   \else \if !#1!%
        \expandafter\let\csname IF:#2toc\expandafter\endcsname
             \csname if:#2toc\endcsname
        \expandafter\let\csname if:#2toc\endcsname\:gobble
   \else \edef\:temp{\string @}\edef\:tempa{\string#1}%
   \ifx \:temp\:tempa
         \expandafter\let\csname if:#2toc\endcsname\empty
   \else \edef\:temp{\string ?}%
   \ifx \:temp\:tempa
        \expandafter\let\csname if:#2toc\expandafter\endcsname
             \csname IF:#2toc\endcsname
   \else
     \expandafter\def\csname toToc:#1\endcsname{#2}%
   \fi\fi\fi\fi}
\ifx \:tokwrite\:UnDef
   \csname newtoks\endcsname\:tokwrite
\fi
\ifx \:tokpage\:UnDef
   \csname newtoks\endcsname\:tokpage
\fi
\:tokpage={\folio}
\:tokwrite{\write\:tocout}
\def\Get:SecAnchor#1#2#3{}

\long\def\Configure:Sec#1#2#3#4#5{%
  \expandafter\ifx\csname c:#1\endcsname\relax \let\:tempa\relax \else
  \def\:tempa{#4#5}\fi  \ifx\:tempa\empty \else
     \expandafter\c:def\csname c:#1\endcsname{#4}%
\expandafter\c:def\csname d:#1\endcsname{#5}%
\fi
  \expandafter\ifx\csname a:#1\endcsname\relax \let\:tempa\relax \else
  \def\:tempa{#2#3}\fi  \ifx\:tempa\empty \else
     \expandafter\def\csname a:#1\endcsname##1{#2}%
     \expandafter\def\csname b:#1\endcsname##1{#3}%
  \fi
}

\ifHtml  \def\noct:Close:Until{%
   \let\:tempA\sec:typ  \let\found:\empty
   \let\:tempd\:Sections    \noct:Check:Until
   \ifx \:tempb\sec:typ \expandafter\Do:Close  \fi
   \let\sec:typ\:tempA
}
\def\noct:Check:Until{%
   \ifx \:tempd\empty  \ifx \found:\empty  \let\:tempb\empty
\else  \let\:tempb\found: \let\sec:typ\found:\fi
\else
      \PopStack\:tempd\:tempb
      \edef\:tempe{\:tempb,%
   \expandafter\ifx \csname a:end\:tempb\endcsname\relax \else
     \csname a:end\:tempb\endcsname \fi,,}%
\expandafter\mod:typ\:tempe!*?: %
%
      \ifx \:tempb\sec:typ \else
         \expandafter\expandafter\expandafter\noct:Check:Until
   \fi\fi }
\def\mod:typ#1,#2!*?: {%
   \def\:temp{#1}\ifx \:temp\empty\else
      \edef\:temp{\expandafter\expandafter\expandafter
         \:gobble\expandafter\string \csname #1\endcsname}%
      \ifx \sec:typ\:temp
           \let\found:\:tempb  \let\:temp\empty
      \else \def\:temp{\mod:typ#2!*?: }\fi
   \fi \:temp
}
\def\Close:Until{%
   \let\:tempd\:Sections    \Check:Until
   \ifx \:tempb\sec:typ \expandafter\Do:Close  \fi
}
\def\Check:Until{
   \ifx \:tempd\empty  \let\:tempb\empty \else
        \PopStack\:tempd\:tempb
       \ifx \:tempb\sec:typ \else
      \expandafter\expandafter\expandafter\Check:Until
   \fi\fi }
\PushStack\:Sections{}%
\PopStack\:Sections\:temp
\def\Do:Close{%
   \PopStack\:Sections\:tempb
   \ifx \sec:typ\:tempb \else
      \csname d:\:tempb\endcsname
      \expandafter\Do:Close
   \fi
}
\def\Close:UntilEnd{%
   \ifx \:Sections\empty  \let\:tempb\empty
   \else  \PopStack\:Sections\:tempb  \fi
   \ifx \:tempb\empty \else
      \csname d:\:tempb\endcsname
      \expandafter\Close:UntilEnd
   \fi
}
\def\:StartSec#1#2#3{%
   \def\title:chs##1##2{##2}%
   \def\sec:typ{#1}%
   \a:dTocAt  \csname TocAt*\endcsname   \b:dTocAt
\expand:after{\global\let}\csname TocAt*\endcsname\empty
%
   \a:NoSection
   \ro:nd\html:lbl{1000}%
%
   \expandafter
   \let\expandafter\TitleMark\csname #1HMark\endcsname
%
\expandafter\ifx  \csname Cut:#1\endcsname\relax
  \def\:tempa{#1}\noct:Close:Until
\ifx \:tempb \empty \else
   \csname d:\ifx \found:\empty #1\else \found:\fi\endcsname \fi
\gHAdvance
   \TitleCount  1 \global\let\mu:span\TitleCount
\expandafter\expandafter\expandafter\global \expandafter
                         \let\csname #1:Count\endcsname\TitleCount
\csname c:#1\endcsname
%
\else
   \Configure{CutAt#1}{\gHAdvance
   \TitleCount  1 \global\let\mu:span\TitleCount
\expandafter\expandafter\expandafter\global \expandafter
                         \let\csname #1:Count\endcsname\TitleCount
\csname c:#1\endcsname
      }{\def\sec:typ{#1}\Close:Until \csname d:#1\endcsname}%
%
   \expandafter\ifx \csname a:\sec:typ TITLE\endcsname\relax\else
   \expandafter\let\expandafter\a:CutAtTITLE
             \csname a:\sec:typ TITLE\endcsname\fi
%
   \csname Cut:#1\endcsname{#3}%
\fi
\global\let\sec:lvl\HPageDepth
\PushStack\:Sections{#1}%
%
%
   \expandafter\ifx \csname :BeforeEvery#1\endcsname\relax \else
   \csname :BeforeEvery#1\endcsname{#3}%
\fi
%
   \expandafter\ifx \csname a:#1\endcsname\relax  \else
      \csname a:#1\endcsname{#3}%
   \fi
   \b:NoSection \:Ttle{#1}{#2}{\csname #1:ttl\endcsname{#3}}%
   \a:NoSection
   \expandafter\ifx \csname b:#1\endcsname\relax   \else
      \csname b:#1\endcsname{#3}%
   \fi
   \expandafter\ifx \csname :Every#1\endcsname\relax \else
   \csname :Every#1\endcsname{#3}%
\fi
%
   \csname a:AfterTitle\endcsname   \b:NoSection
   \def\title:chs##1##2{##1}%
}
\def\title:chs#1#2{#1}
\def\protect:wrtoc{%
   \let\:newlnch\space
\PictureOff
   \def\%{\string\%}\a:writetoc}
\def\html:sectoc#1{\csname if:toc\endcsname{%
   \xdef\CurSecHaddr{\ifx \:SecAnchor\:UnDef
   QQ1-\file:id-\TitleCount
\else \:SecAnchor \fi  }%
   \edef\:attr{\noexpand\scp:Link{%
     \ifTag{)Q\aXrefFile QQ2-\file:id-\TitleCount }%
            {QQ2-\file:id-\TitleCount }%
            {\ifx \:SecAnchor\:UnDef
   QQ1-\file:id-\TitleCount
\else \:SecAnchor \fi  }%
     }}%
   \:attr{\ifx \:SecAnchor\:UnDef
   QQ1-\file:id-\TitleCount
\else \:SecAnchor \fi  }}%
   \ifx \EndTitle:Link\:gobble \if:toc{\scp:EndLink}\fi
   \csname a:InsertTitle\endcsname
\csname InsertTitle\endcsname{#1}%
\EndTitle:Link{\if:toc{\scp:EndLink}}}
\def\html:tocsec#1{\string\csname\space a:TocLink\string\endcsname
   {\FileNumber
   }{\ifx \:SecAnchor\:UnDef
   QQ1-\file:id-\TitleCount
\else \:SecAnchor \fi  }{QQ2-\file:id-\TitleCount }{#1}}
\let\CurSecHaddr\empty
\:CheckOption{sections+}\if:Option
     \def\Title:Link{\Link}
     \def\EndTitle:Link#1{#1}
\else
     \def\Title:Link#1{\Link{}}
     \let\EndTitle:Link\:gobble
   \Log:Note{for back links to toc,
       use the command line option `sections+'}%
\fi
\def\NoLink#1{\expandafter
  \gdef\csname #1:Href-\endcsname{\let\EndTitle:Link\:gobble}}%
\HAssign\sec:lvl0

   \:CheckOption{hooks+}  \if:Option
      \else \:CheckOption{hooks} \fi
   \if:Option  \long\def\Configure:Sec#1#2#3#4#5{%
  \expandafter\ifx\csname c:#1\endcsname\relax \let\:tempa\relax \else
  \def\:tempa{#4#5}\fi  \ifx\:tempa\empty \else
     \expandafter\c:def\csname c:#1\endcsname{#4}%
\expandafter\c:def\csname d:#1\endcsname{#5}%
\fi
  \expandafter\ifx\csname a:#1\endcsname\relax \let\:tempa\relax \else
  \def\:tempa{#2#3}\fi  \ifx\:tempa\empty \else
       \def\:tempa{#2}\ifx \:tempa\empty
     \expandafter\def\csname a:#1\endcsname
         ##1{\hbox{\a:trc #13:4\b:trc}#2\hbox{\c:trc #14:4\d:trc}}%
  \else
     \expandafter\def\csname a:#1\endcsname##1{#2}%
  \fi
  \def\:tempa{#3}\ifx \:tempa\empty
     \expandafter\def\csname b:#1\endcsname
         ##1{\hbox{\a:trc #13:4\b:trc}#3\hbox{\c:trc #14:4\d:trc}}%
  \else
     \expandafter\def\csname b:#1\endcsname##1{#3}%
\fi
\fi
}
\fi
\fi
\def\ConfigureMark#1#2{\long\expandafter
   \def\csname #1HMark\endcsname{#2}}
\let\no:lbl:idx\empty
\let\toc:lbl:idx\empty


\ifx \FileStream\:UnDef \else
   \errmessage{--- TeX4ht error ---
       \noexpand\FileStream is defined outside of TeX4ht}\endinput
\fi
\def\FileStream{\IgnorePar
   \let\:tempb
-\futurelet\:temp\F:le}
\def\F:le{\if +\:temp \let\:tempb
+\expandafter\Fl:e
   \else \expand:after{\Fl:e-}\fi}
\def\Fl:e#1{\futurelet\:temp\::File}
\def\::File{\ifx [\:temp \expandafter\:File
            \else  \expand:after{\:File[]}\fi }
\def\:File[#1]#2{}

\ifHtml \def\:File[#1]#2{%
   \no:pic\edef\file:name{#2}\yes:pic
   \expandafter\ifx\csname
           FN \file:name\endcsname\relax
                \ht:special{t4ht>\file:name}%
\immediate\write-1{--- file \file:name\space ---}%
%
\gHAdvance\maxfile:id  1
\global\let\file:id\maxfile:id
\Tag{)F\aXrefFile \file:id
   \empty F-}{\file:name}%
\expandafter\xdef\csname
    FN \file:name\endcsname{\file:id}%
\no:pic
\edef\:temp{\noexpand\yes:pic \def\noexpand\:temp{#1}}\:temp
\begingroup
  \def\gobble:font##1##2{##2}%
\:TITLE:
\:HPageTITLE:
  \no:pic
  \edef\:tempa{\noexpand\yes:pic \def\noexpand\:tempa{#1}}\:tempa
  \xdef\:temp{\cut:TTL{\noexpand\Configure{TITLE+}{\a:HPageTITLE{\ifx
   \:temp\empty \file:name\else \:tempa\fi}}}}%
\endgroup \:temp
%
\ht:special{t4ht@[}{\ht:everypar{}\leavevmode}\ht:special{t4ht@]}%
%
\a:PROLOG \a:HTML \a:HEAD
\ifx +\:tempb
%
   %
   \xdef:cs{Lv \file:id}{\noexpand\a:TITLE
      \bgroup \noexpand\:TITLE: \noexpand\c:TITLE \egroup
%
      \noexpand\b:TITLE\noexpand\a:@HEAD\noexpand\b:HEAD}%
\else
   \xdef:cs{Lv \file:id}{}%
      \a:TITLE\bgroup \:TITLE: \c:TITLE \egroup
\b:TITLE \a:@HEAD\b:HEAD\B:DY
\fi
%
   \else        \xdef\file:id{\csname
             FN \file:name\endcsname}%
\ht:special{t4ht>\ifnum \file:id>\bs:fileid\space \file:name\fi }%
%
   \fi}
\HAssign\bs:fileid  1
\def\EndFileStream#1{%
   \expandafter\ifx
            \csname  FN #1\endcsname\relax
      \:warning{\string\EndFileStream{#1}?}%
   \else
      \ifnum\csname  FN #1\endcsname=\bs:fileid
         \:warning{\string\EndFileStream{\jobname .\:html}?}%
      \else \expandafter\ifnum  \csname  FN #1\endcsname > \bs:fileid
%
         {\let\inputlineno\tmp:cnt \tmp:cnt1   \root:next }%
{\b:BODY \b:HTML}%
%
\ht:special{t4ht<#1}%
\g:delete{\empty  FN #1}%
%
\expandafter\expandafter\expandafter\global \expandafter
                     \let\csname  Lv \file:id\endcsname\:UnDef
\global\let\file:id\maxfile:id
\find:fileid
%
   \fi\fi\fi }
\def\find:fileid{%
  \expandafter\ifx \csname  Lv \file:id\endcsname \relax
      \gHAdvance\file:id  -1  \expandafter\find:fileid
  \fi
}
\def\TagFile#1{%
   \expandafter\ifx \csname
          cw:)F\aXrefFile \file:id \empty F-%
\endcsname \relax \else
      \Tag{#1(L }{\LikeRef{)F\aXrefFile \file:id \empty F-%
}}%
   \fi
}
\def\RefFile#1{\LikeRef{#1(L }}
\def\FileName{\LikeRef
   {)F\aXrefFile \file:id \empty F-}}
\def\RefFileNumber#1{%
   \expandafter\ifx  \csname
          cw:)F\aXrefFile #1%
                  \empty F-\endcsname\relax
   \else
      \:LikeRef{)F\aXrefFile #1\empty F-}%
   \fi  }
\xdef:cs{\empty  FN \jobname .\:html}{\file:id}
\xdef:cs{\empty  FN }{\file:id}
\Tag{)F\aXrefFile \file:id
                \empty F-}{\jobname .\:html}
\bgroup
  \let\special\relax
%
  \xdef:cs{Lv \file:id}{\noexpand\a:TITLE
     \bgroup \noexpand\:TITLE: \noexpand\c:TITLE \egroup
%
     \noexpand\b:TITLE \noexpand\a:@HEAD\noexpand\b:HEAD}%
\egroup
\def\close:files{%
   \ifnum \op:fl<\bs:fileid \else
      \def\:warning##1{}%
      \EndFileStream{\RefFileNumber\op:fl}%
      \Advance:\op:fl  -1
      \expandafter\close:files
   \fi}
  \fi

\:CheckOption{next}     \if:Option   \else
   \let\c:next:\:gobbleII
\fi

\ifHtml  \def\HPage{\strt:bt\ch:HPage}
\def\ch:HPage{%
   \ifx -\:temp \expandafter\m:HPage
   \else \expand:after{\ifx [\:temp \expandafter\op:HPage
                       \else        \expandafter\:HPage   \fi}%
   \fi}
\def\strt:bt#1{%
   \def\:bgtr<##1>{\expand:after{\bt:fn##1.}\:html!*?: %
%
      \ifx #1\ch:bbtf \else \PushStack\:btid{##1}\fi
%
      \futurelet\:temp#1}%
   \futurelet\:temp\ch:btgr}
\def\ch:btgr{\ifx  <\:temp  \expandafter\:bgtr
             \else          \expand:after{\:bgtr<>}\fi}%
\def\HP:Link{\Link[\HP:file
   \a:LinkHPage]{}{\HP:file}\global\let\a:LinkHPage\empty}
\NewConfigure{LinkHPage}[1]{\def\a:LinkHPage{ #1}}
\let\a:LinkHPage=\empty
\def\op:HPage[#1]#2{%
   %\chk:hpfl
%
   \:hookI{BeforeHPageButton}{}{#2}%
   \hpg:wrn{#1}{#2}\HPage    \TagFile{)B\:temp}%
                             \Save:HPageTag\:temp
                             \Save:HPage{#2}%
   \NewFileName\HP:file   \Save:Link\HP:file
   \if:notempty{#2}{\HP:Link#2\EndLink}%
   \:hookI{AfterHPageButton}{}{#2}%
   \:btfile{#2}%
   \:buttrc\HPage{[#1]{#2}}%
   \PushStack\:afterbt{x}%
   \edef\:temp{#1}\ifx \:temp\empty \no:pic
       \edef\:temp{\noexpand\yes:pic
           \def\noexpand\:temp{#2}}\:temp \fi
%
   \TagFile{\:temp}}
\def\:HPage#1{%
   %\chk:hpfl
%
  \:hookI{BeforeHPageButton}{}{#1}%
   \NewFileName\HP:file   \Save:Link\HP:file  \Save:Temp\HP:file
                      \TagFile{)B\HP:file}%
                             \Save:HPageTag\HP:file
                             \Save:HPage{#1}%
   \def\:temp{#1}\ifx \:temp\empty
   \else \HP:Link#1\EndLink
   \fi
   \:hookI{AfterHPageButton}{}{#1}%
   \:btfile{#1}%
   \:buttrc\HPage{{#1}}%
   \PushStack\:afterbt{x}%
   \Recall:Temp\:tempa    \TagFile{\:tempa}}
\def\hpg:wrn#1#2#3{%
   \edef\:temp{#1}\ifx \:temp\empty \no:pic
       \edef\:temp{\noexpand\yes:pic
           \def\noexpand\:temp{#2}}\:temp \fi
%
   \ifx \:temp\empty \:warning{\string#3[]{}?}\fi}
\def\Save:Temp{\PushStack\sv:Temp}
\def\Recall:Temp{\PopStack\sv:Temp}
\def\m:HPage#1{\futurelet\:temp\ch:mbut}
\def\ch:mbut{\ifx [\:temp \expandafter\op:mbut
             \else        \expandafter\:mbut   \fi}
\def\op:mbut[#1]{%
   %\chk:hpfl
%
  \:hookI{BeforeHPageButton}{}{}%
   \edef\:temp{#1}%
   \ifx \:temp\empty \:warning{\string\HPage-[]?}\fi
                      \TagFile{)B\:temp}%
                             \Save:HPageTag\:temp
                             \Save:HPage{}%
   \NewFileName\HP:file   \Save:Link\HP:file
   \HP:Link%
   \def\ContHPage{\:ContHPage{x}{#1}}}
\def\:mbut{%
   %\chk:hpfl
%
    \:hookI{BeforeHPageButton}{}{}%
   \NewFileName\HP:file   \Save:Link\HP:file
                      \TagFile{)B\HP:file}%
                             \Save:HPageTag\HP:file
                             \Save:HPage{}%
   \HP:Link%
   \def\ContHPage{\:ContHPage{x}{\HP:file}}}
\def\:ContHPage#1#2{\EndLink
   \Recall:Link\HP:file  \Save:Link\HP:file
   \:hookI{AfterHPageButton}{}{}%
   \:btfile{}%
   \:buttrc\HPage{...\string\ContHPage}%
   \PushStack\:afterbt{#1}%
   \TagFile{#2}}
\def\:hookI#1#2#3{%
   \expandafter\ifx \csname #1\endcsname\relax  #2\else
      \csname #1\endcsname{#3}\fi
}
\def\NewFileName#1{%
   \HAssign#1\maxfile:id
   \Advance:#1  1
   \ifx \:NxtNwFN\:Undef
      \edef#1{\j:bname \ifx \big:fn\:UnDef#1%
                    \else \big:fn\fi  .\:html}%
   \else  \let#1\:NxtNwFN  \global\let\:NxtNwFN\:UnDef  \fi
   \global\let\big:fn\:UnDef
}
\def\NextFile#1{\xdef\:NxtNwFN{#1}}
\def\:btfile#1{%
   \SaveEverypar \FileStream[#1]{\HP:file}  \IgnorePar
   \gHAdvance\HPageDepth  1
   \AtEndHPage{\csname HPageFooter\endcsname}%
   \:hookI{HPageHeader}{}{#1}%
}
\def\HPageButton{\strt:bt\ch:bbtf}
\def\ch:bbtf{\ifx -\:temp \expandafter\op:bbft
             \else \expandafter\:bbtf \fi}
\def\:bbtf[#1]#2{%
   \:hookI{BeforeHPageButton}{}{#2}%
   \hpg:wrn{#1}{#2}\HPageButton
   \TagFile{)B\:temp}%
   \edef\HP:file{\RefFile\:temp}%
   \def\:temp{#2}\ifx \:temp\empty
   \else  \HP:Link#2\EndLink  \fi
   \:hookI{AfterHPageButton}{}{#2}%
   \csname AfterHPage\endcsname  }

\def\op:bbft#1[#2]{%
   \:hookI{BeforeHPageButton}{}{}%
   \edef\:temp{#2}%
   \ifx \:temp\empty \:warning{\string\HPageButton-[]?}\fi
   \TagFile{)B\:temp}%
   \edef\HP:file{\RefFile\:temp}%
   \HP:Link%
   \def\ContHPage{\EndLink
      \:hookI{AfterHPageButton}{}{}%
      \csname AfterHPage\endcsname  }}
\def\BeginHPage{\futurelet\:temp\ch:bbbt}
\def\ch:bbbt{%
   %\chk:hpfl
%
   \NewFileName\HP:file   \Save:Link\HP:file
   \ifx -\:temp  \expandafter\op:bbbt
   \else         \expandafter\:bbbt   \fi}
\def\:bbbt[#1]#2{%
   \PushStack\:btid{#1}%                      
   \:btfile{#2}%
   \:buttrc\BeginHPage{[#1]{#2}}%
   \PushStack\:afterbt\empty
   \hpg:wrn{#1}{#2}\BeginHPage    \Save:HPageTag\:temp
   \Save:HPage{#2}%
   \TagFile{\:temp}}
\def\op:bbbt#1[#2]{%
   \PushStack\:btid{#2}%                     
   \:hookI{AfterHPageButton}{}{}%
   \:btfile{}%
   \:buttrc\BeginHPage{[#2]}%
   \PushStack\:afterbt\empty    \edef\:temp{#2}%
   \ifx \:temp\empty \:warning{\string\BeginHPage-[]?}\fi
   \Save:HPageTag\:temp   \Save:HPage{}%
   \TagFile{\:temp}}
\def\EndHPage{\futurelet\:temp\chEnd:HPage}
\def\chEnd:HPage{\ifx  [\:temp  \expandafter\opEnd:HPage
              \else          \expandafter\End:HPage   \fi}
\def\opEnd:HPage[#1]{%
   \ifnum  #1>\HPageDepth\space
      \:warning{\string\EndHPage[#1]?}%
      \let\:temp\:gobble
   \else \ifnum  #1<\HPageDepth\space
      \def\:temp{\:EndHPage\EndHPage[#1]{}}%
   \else \let\:temp\End:HPage \fi \fi
   \:temp }

\def\End:HPage#1{%
   \ifnum \HPageDepth<1 \:warning{\string\EndHPage{#1}?}\let\:temp\:gobble
   \else  \ifinner\else\:clearpage\fi   \PopStack\:btid\:tempa
      \def\:tempb{#1}\ifx  \:tempb\empty\let\:temp\:EndHPage
      \else  \ifx  \:tempb\:tempa       \let\:temp\:EndHPage
      \else  \Recall:HPageTag\:tempa
             \Save:HPageTag\:tempa
             \ifx  \:tempb\:tempa       \let\:temp\:EndHPage
      \else                    \def\:temp{\:EndHPage\End:HPage{#1}}%
   \fi\fi\fi\fi
   \:temp }

\def\:EndHPage{%
   \csname EndHPage\HPageDepth \endcsname
   \global\expandafter\let\csname EndHPage\HPageDepth\endcsname\:UnDef
   \Recall:Link\HP:file   \Recall:Link\:tempd   \Save:Link\:tempd
   \Recall:HPage\:tempb
   \Recall:HPageTag\:tempc
   \:buttrc\EndHPage{{\:tempb}}%
   \EndFileStream{\HP:file}%
   %\Recall:FileHPg\:tempd
%
   \FileStream{\:tempd}%
   \RecallEverypar  \gHAdvance\HPageDepth  -1
   \PopStack\:afterbt\:temp
   \ifx \:temp\empty \else \csname AfterHPage\endcsname \fi }
\def\AtEndHPage{%
   \expandafter\gdef\csname EndHPage\HPageDepth\endcsname}
\HAssign\HPageDepth0
\PushStack\:btid{}
\def\Save:FileHPg{\PushStack\HPage:FlHg}
\def\Recall:FileHPg{\PopStack\HPage:FlHg}
\def\chk:hpfl{\Save:FileHPg\FileName \:FlHpg}
\def\No:FlHpg{{\Recall:Link\HP:file  \Save:Link\HP:file
   \edef\HP:file{\HP:file}\edef\FileName{\FileName}%
   \edef\HP:file{\expandafter\string\csname \HP:file\endcsname}%
   \edef\FileName{\expandafter\string\csname \FileName\endcsname}%
   \ifx \HP:file\FileName \else
      \:warning{HPage in a non-HPage file
                          `\expandafter\:gobble\FileName'}%
   \fi}}
\def\HPageInFile{\global\let\:FlHpg\empty}
\def\NoHPageInFile{\global\let\:FlHpg\No:FlHpg}
\NoHPageInFile
\expand:after{\def\bt:fn##1.}\:html#2!*?: {%
   \def\:temp{#2}\ifx \:temp\empty
   \else \NextFile{#1.\:html}\fi }
\Odef\ExitHPage[#1]#2{%
   \Recall:HPageTag\HP:file  \Save:HPageTag\HP:file
   \Link[\RefFile{)B\HP:file}]{\RefFile{\HP:file}}{#1}%
      \def\:temp{#2}\ifx \:temp\empty
         \Recall:HPage\:temp  \Save:HPage\:temp
         \ifx \:temp\empty \a:ExitHPage
         \else \b:ExitHPage \:temp \c:ExitHPage \fi
      \else #2\fi
   \EndLink
}
\def\RefHPage{\RefFile}
\def\Save:Link{\PushStack\HPageFiles}
\def\Recall:Link{\PopStack\HPageFiles}
\Save:Link{\jobname.\:html}
\def\Save:HPage{\PushStack\HPageAnchors}
\def\Recall:HPage{\PopStack\HPageAnchors}
\def\Save:HPageTag{\PushStack\HPage:Tags}
\def\Recall:HPageTag{\PopStack\HPage:Tags}
\def\CutAt#1{%
  \if           +\:firstch#1 //\:CutAt#1,//\else
  \if -\:firstch#1 //\:CutAt#1,//\else
                               \:CutAt=#1,//\fi\fi
}
\def\PauseCutAt#1{%
   \expandafter\ifx\csname Cut:#1\endcsname\relax\else
      \expandafter\ifx  \csname NoCut:#1\endcsname\relax
          \expand:after{\expandafter\let\csname NoCut:#1\endcsname=}%
             \csname Cut:#1\endcsname
      \fi
      \expandafter\let\csname OToc:#1\expandafter\endcsname\csname Toc:#1\endcsname
\expandafter\let\csname Toc:#1\endcsname=\relax
\expandafter\let\csname Cut:#1\endcsname=\null
\expandafter\def\csname Cut:#1\endcsname{%
   \gHAdvance \TitleCount  1
   \null \:gobble
}%
%
    \fi  }
\def\ContCutAt#1{%
   \expandafter\ifx  \csname NoCut:#1\endcsname\relax\else
       \expand:after{\expandafter\let\csname Cut:#1\endcsname=}%
          \csname NoCut:#1\endcsname
      \expandafter\let\csname Toc:#1\expandafter\endcsname\csname OToc:#1\endcsname
   \fi}
\def\:CutAt#1#2,#3//{%
   \csname ltx:like\endcsname
   \expandafter\ifx  \csname #2\endcsname \relax
      \:warning{\string\CutAt\space at undefined
                    `\expandafter\string\csname#2\endcsname'}%
   \fi
   \csname ltx:nolike\endcsname
   \expandafter\ifx \csname #2:\endcsname\relax
   \expand:after{\expandafter\let \csname #2:\endcsname }%
                                  \csname #2\endcsname
\else \:warning{Again \string\CutAt{#2}?}%
\fi
\expandafter\def \csname #2\endcsname{%
   \csname UnCut:#2\endcsname
   \csname #2:\endcsname}%
%
   \:UnCutAt#2,#3,//%
%
   \expandafter\edef \csname Cut:#2\endcsname##1{%
     \noexpand\cut:at{#2}{##1}#1}%
%
}
\def\:UnCutAt#1,#2,#3//{%
   \def\:temp{#2}\ifx \:temp\empty \else
      \def\:tempa{#1}\ifx \:tempa\:temp  \else
         \expandafter\ifx \csname#2:#1\endcsname\relax
            \expand:after{\expandafter\let \csname #2:#1\endcsname }%
                                      \csname #2\endcsname
\expandafter\def \csname #2\endcsname{%
   \csname UnCut:#1\endcsname
   \csname #2:#1\endcsname}%
%
         \else \:warning{#2 already assumed in \string\CutAt{#1,...}}\fi
      \fi
      \def\:temp{\:UnCutAt#1,#3//}%
      \expandafter\:temp
   \fi
}
\def\cut:at#1#2#3{{%
   \def\BeforeHPageButton{\if #3+%
   \def\:temp{\:hookI{Before#1Button}{\csname a:+CutAt#1\endcsname}}%
                              \expandafter\:temp\fi}%
\edef\prev:File{\ifnum \sec:lvl>\HPageDepth\space
                               \RefFileNumber\lastsec:id \fi}%
\def\AfterHPageButton{\if #3+%
   \def\:temp{\:hookI{After#1Button}{\csname b:+CutAt#1\endcsname}}%
                             \expandafter\:temp\fi}%
\def\HPageHeader##1{%
   \ct:btn
\gHAdvance\C:tAtN  1
\Tag{fileidcut \file:id}{\C:tAtN}%
\TagFile{cutfile \C:tAtN}%
%
   \xdef\nextCutAt{\RefFile{)N \file:id}}%
   \global\let\prevCutAt\prev:File
   \sv:btns\nextCutAt
\sv:btns\prevCutAt
%
   \PushStack\prv:fl{#3}\csname a:CutAt#1\endcsname
   \ifx\a:crsbt\empty
      \ifx\aa:crsbt\empty\else
         \:hookI{Front#1}{\default:bts{}{tail}}{##1}%
      \fi
   \else
      \:hookI{Front#1}{\default:bts{}{tail}}{##1}%
   \fi
}%
\csname a:CutAt-filename\endcsname{#1}{#2}%
%
   \fx:pt #1xxx!*?: %
%
   \if #3+\HPage<#1>{#2}%
   \else
      \if #3-\else
   \let\cut:TTL\:gobble
   \begingroup
     \csname no:fonts\endcsname\def\gobble:font##1##2{##2}%
\:TITLE:
\:CutAtTITLE:
     \xdef\:temp{\noexpand\Configure{TITLE+}{\a:CutAtTITLE{#2}}}%
   \endgroup \:temp
\fi
%
      \HPage<#1>{}\fi
   \ifx \prevCutAt\empty  \else \TagFile{)N \lastsec:id}\fi
   \AtEndHPage{\ct:btn
\UnCut:{#1}}%
   \expandafter\xdef\csname UnCut:#1\endcsname{%
                                 \noexpand\EndHPage[\HPageDepth]{}}%
}}
\HAssign\lastsec:id0
\def\cut:TTL#1{#1}
\let\:TITLE:\empty
\let\:CutAtTITLE:\empty
\let\:HPageTITLE:\empty
\def\UnCut:#1{%
   \global\expandafter\let\csname TocAt*\endcsname\empty
%
   \global\expandafter\let\csname UnCut:#1\endcsname\:UnDef
   \xdef\lastsec:id{\file:id}%
   \PopStack\prv:fl\:temp
   \bgroup
      \ifx\b:crsbt\empty
         \ifx\bb:crsbt\empty\else
            \:hookI{Back#1}{\default:bts{tail}{}}{}%
         \fi
      \else
         \:hookI{Back#1}{\default:bts{tail}{}}{}%
      \fi
      \csname b:CutAt#1\endcsname \let\after:endfl\EndFileStream
      \def\EndFileStream##1{\after:endfl{##1}\egroup
                      \PopStack\:afterbt\:temp
\ifx\:temp\empty\else\:hookI{After#1}{}{}\fi
\PushStack\:afterbt{}%
%
                      \PopStack\prv:fl\prevCutAt
\PopStack\prv:fl\nextCutAt
\ifx \prv:fl\empty
      \let\prevCutAt\:UndDef
      \let\nextCutAt\:UndDef
\else
      \PopStack\prv:fl\:tempb
      \PopStack\prv:fl\prevCutAt
      \PopStack\prv:fl\nextCutAt
   \PushStack\prv:fl\nextCutAt
   \PushStack\prv:fl\prevCutAt
   \PushStack\prv:fl\:tempb
\fi
%
   }}
\let\prevCutAt\empty
\:CheckOption{next}     \if:Option
   \def\next:bt{\nextCut}
   \def\prev:bt{\prevCut}
\else
   \Log:Note{for linear crosslinks of pages,
       use the command line option `next'}%
   \def\next:bt{\nextCutAt}
   \def\prev:bt{\prevCutAt}
\fi
\HAssign\C:tAtN  0
\def\ct:btn{{%
  \HAssign\C:tAtN  0\LikeRef{fileidcut \file:id}%
  \Advance:\C:tAtN  -1
  \xdef\prevCut{\RefFile{cutfile \C:tAtN}}%
  \ifx \prevCut\space \global\let\prevCut\empty \fi
  \Advance:\C:tAtN   2
  \xdef\nextCut{\RefFile{cutfile \C:tAtN}}%
  \ifx \nextCut\space \global\let\nextCut\empty \fi
}}
\let\root:next\empty
\def\CutGroup#1{\Cut:Group#1,,!*?: }
\def\Cut:Group#1,{%
   \expandafter\ifx \csname #1\endcsname\relax
      \expandafter\let\csname #1\endcsname\:gobble\fi
   \def\HP:file{#1}%
   \do:list \cut:gr,}

       \def\cut: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####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 }

\fi

\def\ParentOf{\gHAdvance\TitleCount  1
   \global\let\mu:span\TitleCount \futurelet\:temp\:mprt}
\def\ChildOf{\futurelet\:temp\:xprt}

\:CheckOption{family} \if:Option
   \def\:mprt{\fm:call\:Imprt}

\def\:Imprt[#1]#2#3{%
   \def\:temp{#2}\ifx \:temp\Jobname
                    \:warning{#2 \string\ParentOf\space#2?}\fi
   \Needs-{child `#2'}%
   \LoadRef[#2-\Jobname]{#3}{##1}%
   \imp:var{#2}fstf:id,#1!*?: %
   \Tag{\Jobname-#2-up}{\RefFileNumber\FileNumber}%
\Tag{\Jobname-#2-prev}{\childFile}%
\xdef\childFile{\LikeRef{#2-\Jobname-down}}%
\ifx \cld:n\:UnDef  \else  \Tag{\cld:n}{\childFile}\fi
\xdef\cld:n{\Jobname-#2-next}%
%
   \the\:tokwrite{\string\doTocEntry
                          \string\tocParentOf{#2}{}{}\relax}}

\HAssign\fstf:id0
\def\:xprt{\fm:call\:Exprt}

\def\:Exprt[#1]#2#3{%
   \ifnum \maxfile:id>1
       \:warning{\string\ChildOf{#2} not at root file}\fi
   \Needs-{parent `#2'}%
   \ld:flxrf{#3}{QQ}%
   \LoadRef[#2-\Jobname]{#3}{##1}%
   \xp:var{#2}fstf:id,#1!*?: %
   \closeout\:refout
\openout\:refout\jobname.xref     \:clearpage
\gHAdvance\fstf:id  100000
%
\gHAssign\maxfile:id  \fstf:id
\gHAssign\bs:fileid  \maxfile:id
\global\let\file:id\maxfile:id
\Tag{)F\aXrefFile \file:id \empty F-}%
                                                {\jobname.\:html}%
\expandafter\xdef\csname
    FN \jobname.\:html\endcsname{\file:id}%
\xdef:cs{Lv \file:id}{}%
%
   \def\export:hook{\exprt:tag{#2}fstf:id,#1!*?: }%
   \Tag{\Jobname-#2-down}{\RefFileNumber\FileNumber}%
\ch:lnk\parentFile{#2}{up}%
\ch:lnk\prevChildFile{#2}{prev}%
\ch:lnk\nextChildFile{#2}{next}%
\global\let\nsrt:chlnks\nsrt:cldnks
\nsrt:chlnks{}{tail}{FrontChild}%
%
   \gdef\:Export[##1]##2{\:warning{\string\ChildOf
               \string{##2\string}\space ignored (not 1st)}}%
}
\def\rmv:ext#1.#2!*?: {#1}

\def\fm:call#1{\ifx [\:temp \expand:after{\fm:cll#1}\else
                            \expand:after{\fm:cll#1[]}\fi}
\def\fm:cll#1[#2]#3{\edef\:temp{\noexpand\noexpand\noexpand
   #1[#2]{\noexpand\rmv:ext#3.!*?: }{#3}}%
   \edef\:temp{\:temp}\:temp}
\let\childFile\space
\def\ch:lnk#1#2#3{%
   \xdef#1{\LikeRef{#2-\Jobname-#3}}%
   \ifx #1\space \let#1\empty\fi}
\def\nsrt:cldnks#1#2#3{{%
   \let\prevCutAt\prevChildFile
   \let\nextCutAt\nextChildFile
   \def\ExitHPage##1{\Link[\parentFile]{}{}##1\EndLink}
   \:hookI{#3}{\default:bts{#1}{#2}}{}}}
\def\imp:var#1#2,#3!*?: {%
   \gt:ops{#2}%
   \Tag{\Jobname-#1-#2}{\:tempd\csname #2\endcsname}%
   \edef\:tempc{0\LikeRef{#1-\Jobname-#2}}%
   \expand:after{\expandafter\:tempb\csname
                                       #2\endcsname  }\:tempc%
   \if:notempty{#3}{\imp:var{#1}#3,!*?: }}
\def\xp:var#1#2,#3!*?: {%
   \gt:ops{#2}%
   \edef\:tempc{0\LikeRef{#1-\Jobname-#2}}%
   \expandafter\:tempa\csname #2\endcsname\:tempc
   \expandafter\HAssign\csname :#2:\endcsname\:tempc
   \if:notempty{#3}{\xp:var{#1}#3,!*?: }}
\def\exprt:tag#1#2,#3!*?: {%
   \tmp:cnt  \csname #2\endcsname
   \advance\tmp:cnt  -\csname :#2:\endcsname
   \Tag{\Jobname-#1-#2}{\the\tmp:cnt}%
   \if:notempty{#3}{\exprt:tag{#1}#3,!*?: }}

   \def\gt:vi#1#2#3#4#5#6#7!*?: {#1#2#3#4#5#6}
\def\gt:vr#1#2{\edef#1{\expandafter
   \gt:vi\meaning#2 .......!*?: }}
\gt:vr\c:unt\tmp:cnt
\def\chk:vr#1#2{\expand:after{\gt:vr\:temp#2 #1\:temp\c:unt}}

\def\gt:ops#1{%
   \expand:after{\chk:vr\ifx}\csname#1\endcsname  \let\:tempd\the
            \let\:tempa\empty   \let\:tempb\advance
  \else                             \let\:tempd\empty
            \let\:tempa\HAssign  \let\:tempb\Advance:
  \fi }

\else
   \let\:mprt\BI:gbl
\Odef\ChildOf[#1]#2{\:warning{\string\ChildOf{#2}
   without \string\Preamble{...,family,...}}}
\let\:xprt\BI:gbl

\fi
\def\tocParentOf#1{{%
   \def\:temp{#1}\ifx \:temp\Jobname
      \:warning{#1 \string\ParentOf\space#1?}
   \else  \expand:after{\ld:flxrf{#1}{QQ}\get:input{#1.4tc}}\fi}}
\def\ld:flxrf#1#2{%
   \let\:CrsWd\Cross:Word
   \def\Cross:Word##1##2{%
      \expandafter\let\csname  cw:##2\endcsname\:UnDef
      \:CrsWd{##1}{##2}}%
   \LoadRef[)F\aXrefFile ]{#1}{##1}%
   \LoadRef[)Q\aXrefFile #2]{#1}{##1}%
   \let\Cross:Word\:CrsWd
}


\openin15=\jobname.4tc
\ifeof15  \closein15
   \def\:TableOfContents[#1]{\writesixteen{No file \jobname.4tc}}
   \ifx \TableOfContents\:UnDef
   \def\TableOfContents{\futurelet\:temp\:TOC}
   \def\:TOC{\ifx [\:temp \expandafter\:TableOfContents\fi}
\fi

\else
   \ifHtml  \ifx \TableOfContents\:UnDef
   \def\TableOfContents{\futurelet\:temp\:TOC}
   \def\:TOC{\ifx [\:temp \expandafter\:TableOfContents\fi}
\fi

\def\:TableOfContents[#1]{\SaveEverypar{%
   \def\TocCount{0}%
   \:tocPreamble#1,,%
\let\doTocEntry\:doTocEntry
\def\contentsline##1##2##3{##2}%
\no:lbl:idx
%
   \def\InsertTitle##1##2##3{}%
   \hsize4.5in  \rightskip  \z@ minus 1in  \linepenalty1000
   \catcode`\#12  \catcode`\@11   \catcode`\:11
   \Configure{HtmlPar}{\ifx \e:tableofcontents\:UnDef
      \csname e:TableOfContents\endcsname
\else \e:tableofcontents \fi
}{\ifx \d:tableofcontents\:UnDef \csname d:TableOfContents\endcsname
\else \d:tableofcontents \fi
}{}{}%
\everypar{\HtmlPar}%
   \ifx \a:tableofcontents\:UnDef \csname a:TableOfContents\endcsname
\else \a:tableofcontents \fi
\input \jobname.4ct
   {\ht:everypar{}\leavevmode}\ifx \b:tableofcontents\:UnDef
      \csname b:TableOfContents\endcsname
\else \b:tableofcontents \fi
%
   \par  }\RecallEverypar \ifx \c:tableofcontents\:UnDef
   \csname c:TableOfContents\endcsname
\else \c:tableofcontents \fi
}

   \fi
   \begingroup
  \catcode`^7
  \def\:copytoc{%
   \ifeof15   \else
      \read15 to \:temp
      {\escapechar=`\\\immediate\write15{\:temp}}%
      \expandafter\:copytoc
   \fi}
   \ifHtml \catcode`\#12\relax \fi
  \def\:next{\catcode\tmp:cnt12
    \ifnum \tmp:cnt=0
       \def\:next{%
          \catcode`\^^M5
          \immediate\openout15=\jobname.4ct     \:copytoc
          \immediate\closeout15
          \endgroup \closein15
       }%
    \fi
    \advance\tmp:cnt  -1 \:next
  }
  \tmp:cnt255   \:next

\fi
\def\:doTocEntry#1#2#3#4{%
   \Advance:\TocCount  1
   \expandafter\ifx \csname \string#1 \endcsname \relax \else
     #1{#2}{#3}{#4}\fi
}
\def\:tocPreamble#1,{%
  \def\:temp{#1}\ifx \:temp\empty     \else
     \edef\:temp{\expandafter\string\csname toc#1 \endcsname}%
     \expandafter\expandafter\expandafter\let
        \expandafter\csname\:temp\endcsname\empty
     \expandafter\:tocPreamble\fi}
\ifx \:tocout\:UnDef
   \csname newwrite\endcsname\:tocout
\fi
\def\:temp{%
\if:latex \expandafter\immediate\fi
\openout\:tocout\jobname.4tc
   {\escapechar=`\\\if:latex \expandafter\immediate\fi
\write
   \:tocout{\string\expandafter\string\ifx
   \noexpand\csname doTocEntry\string\endcsname\relax
      \string\expandafter\string\endinput
   \string\fi}%
   \message{(\jobname.4tc)}% enable tracking of the .4tc file by latexmk
}%
}
\:temp
\def\TocAt#1{%
   \def\:next##1{\:TocAt##1,//}%
   \def\:tempa{#1}\def\:temp{-}\ifx \:tempa\:temp  \let\:temp-%
   \else \def\:temp{*}\ifx \:tempa\:temp           \let\:temp*%
   \else    \def\:next{\:TocAt#1,//}%
   \fi \fi  \:next }
\def\:TocAt#1,#2//{%
   \ifx -\:temp \else \ifx *\:temp
           \expandafter\edef\csname Toc:#1\endcsname{%
   \gdef\expandafter\noexpand\csname TocAt*\endcsname{%
      \noexpand \csname Toc#1\noexpand\endcsname }}%
%
   \else   \expandafter\edef\csname Toc:#1\endcsname{%
    \noexpand\csname Toc#1\noexpand\endcsname }%
\fi \fi
   \def\:temp{#2}\ifx  \:temp\empty
      \expandafter\let\csname Toc#1\endcsname\:UnDef
   \else \let\:include\empty
\::TocAt#1,/#1,#2,,//%
\edef\:include{\expandafter\:removecomma\:include}%
\expandafter\edef\csname Toc#1\endcsname{{%
   \let\noexpand\TitleCount\expandafter\noexpand
                                \csname #1:Count\endcsname
   \noexpand\:assgtoc\:include,//{#1}%
   \:tocs[\:include]}}%
\fi }
\def\:tocs{\noexpand\TableOfContents}
\def\:removecomma#1{}
\def\:assgtoc#1,#2//#3{%
   \expand:after{\expandafter\let\csname toc#1\endcsname }%
                                 \csname #3::toc#1\endcsname
   \if:notempty{#2}{\:assgtoc#2//{#3}}}
\def\::TocAt#1,#2,#3//{\def\:temp{#2}%
   \ifx  \:temp\empty \else
      \if /\:firstch#2 //%
               \edef\:include{\:include,\:temp}%
\expandafter\def\csname #1::toc\:temp\endcsname##1##2##3{%
   \ifnum \TitleCount<\TocCount
       \Advance:\TocCount  -100000   \endinput
   \fi}%
%
      \else    \edef\:include{\:include,#2}%
\expand:after{\expandafter\let\csname svtoc::#2\endcsname}%
                                     \csname toc#2\endcsname
\expandafter\edef\csname #1::toc#2\endcsname##1##2##3{%
   \noexpand\ifnum  \noexpand\TitleCount<\noexpand\TocCount
                                                        \noexpand\space
      \expandafter\noexpand \csname svtoc::#2\endcsname{##1}{##2}{##3}%
   \noexpand\fi}%
\fi
      \expand:after{\::TocAt#1,#3//}%
   \fi
}
\def\:firstch#1#2 //{#1\def\:temp{#2}}

\ifHtml
   \let\TeXhalign\halign
\def\RecallTeXcr{\iffalse{\fi
   \expand:after{\let\cr}\csname 0cr\endcsname
   \expand:after{\let\crcr}\csname 0crcr\endcsname
   \iffalse}\fi}
\expandafter\let\csname 0cr\endcsname\cr
\expandafter\let\csname 0crcr\endcsname\crcr
\def\TeXhalign:cr{%
   \ifx \EndPicture\:UnDef \else \iffalse{\fi
      \expandafter\let\expandafter\cr\csname \MkHalign:d cr\endcsname
      \expandafter\let\expandafter\crcr\csname \MkHalign:d crcr\endcsname
   \iffalse}\fi \fi  \TeXhalign}

\def\MkHalign#1#2{%
  \iffalse{\fi   \let\sv:new:row\new:row
  \def\relax:shrp{\let#1\relax}%
  \def\new:halign{\TeXhalign \bgroup}%
  \add:halign#2&!*?: \cr
  \let#1\:shrp  \global\let\new:row\R:halign
\Advance:\MkHalign:d  1
\expandafter\let\csname \MkHalign:d cr\endcsname\cr
\expandafter\let\csname \MkHalign:d crcr\endcsname\crcr
\edef\cr{\noexpand\rR:halign
   \expandafter\noexpand \csname \MkHalign:d cr\endcsname}%
\edef\crcr{\noexpand\rR:halign
   \expandafter\noexpand \csname \MkHalign:d crcr\endcsname}%
\let\omit\om:t \def\TT:halign{\T:halign \global\let\TT:halign\empty}%
\let\sv:end:omit\end:omit  \let\end:omit\empty
\let\ms:count\MS:count \HAssign\MS:count0
\let\lgn:r\HRow \let\lgn:c\HCol  \HAssign\HRow0
\def\span{\xdef\new:span{\new:span\HRow.\HCol;}\:span}%
\let\sv:new:span\new:span  \let\new:span\empty
\gHAdvance\Halgn:cnt  1 \edef\halign:id{\Halgn:cnt}%
\edef\old:span{\LikeRef{)M\halign:id x\mu:span}}%
\ifx \old:span\space \def\old:span{;}\fi
%
  \iffalse}\fi      \begingroup
\ifmmode  \def\end:m{$$\egroup}\vtop\bgroup$$\else
\let \end:m\empty\fi
%
  \a:PauseMkHalign \new:halign\ext:cr}
\def\EndMkHalign{\egroup
   \d:PauseMkHalign \end:m\endgroup
%
   \iffalse{\fi \expand:after{\let\cr}\csname \MkHalign:d cr\endcsname
\expand:after{\let\crcr}\csname \MkHalign:d crcr\endcsname
\let\omit\:omit
{\ht:everypar{}\r:halign}\t:halign
\Advance:\MkHalign:d  -1
\Tag{)M\halign:id x\mu:span}{\new:span;}%
\global\let\new:span\sv:new:span
\iffalse{\fi \let\span\:span \iffalse}\fi
\global\let\HRow\lgn:r   \global\let\HCol\lgn:c
\global\let\MS:count\ms:count
\global\let\new:row\sv:new:row
\global\let\end:omit\sv:end:omit
\relax:shrp \iffalse}\fi }
\def\PauseMkHalign#1{\cr\egroup
   \hbox{\r:halign \global\let\new:row\R:halign}\b:PauseMkHalign
   #1\c:PauseMkHalign\new:halign\ext:cr}
                            \catcode`\#13 \catcode`\@6
\def\MiniHalign{\begingroup  \catcode`\#13 \let#\relax
   \:MHalign}
\def\:MHalign@1\cr{\endgroup  \SaveMkHalignConfig
   \Configure{MkHalign}{\a:MiniHalign}{\b:MiniHalign}\c:MiniHalign
   \d:MiniHalign{\e:MiniHalign\RecallMkHalignConfig}\f:MiniHalign
   \MkHalign#{@1}}
                             \catcode`\#6 \catcode`\@11
\def\EndMiniHalign{\EndMkHalign  \RecallMkHalignConfig }
\def\add:halign#1&#2\cr{%
   \def\:temp{#2}\def\:tempb{!*?: }%
   \ifx \:temp\:tempb
      \append:def\new:halign{\b:halign#1\c:halign}%
   \else
      \def\:temp{#1}\ifx\:temp\empty \append:def\new:halign{&}%
      \else  \append:def\new:halign{\b:halign#1\c:halign&}\fi
      \add:halign#2\cr
   \fi}
\def\rR:halign{\gdef\new:row{\r:halign \R:halign}}
\HAssign\MkHalign:d  0
\def\b:halign{\BB:halign \bgroup}
\def\c:halign{\egroup\d:halign}
\def\BB:halign{\expand:after{\global\let\new:row\empty }\new:row
   \D:halign}
\def\SaveMkHalignConfig{\let\sT:halign\T:halign
   \let\st:halign\t:halign
   \let\sR:halign\R:halign
   \let\sr:halign\r:halign
   \let\sD:halign\D:halign
   \let\sd:halign\d:halign}
\def\RecallMkHalignConfig{\let\T:halign\sT:halign
   \let\t:halign\st:halign
   \let\R:halign\sR:halign
   \let\r:halign\sr:halign
   \let\D:halign\sD:halign
   \let\d:halign\sd:halign}
\let\:omit\omit
\def\om:t{\:omit \BB:halign
   \gdef\end:omit{\gdef\end:omit{}\d:halign}}
\let\end:omit\empty
\let\ext:cr\cr  \let\ext:crcr\crcr
\let\:span\span
\def\add:span#1;{\def\:tempa{#1}\edef\:temp{\HRow .\HCol}%
   \ifx \:temp\:tempa \Advance:\:MULTISPAN  1 \fi
   \ifx \:tempa\empty \let\HMultispan\:MULTISPAN
   \else
      \let\:temp\relax
\def\:temp##1.{\def\:temp####1!*?: {\def\:temp{####1}}%
   \afterassignment\:temp\tmp:cnt}%
\expandafter\expandafter\expandafter\:temp\expandafter\:tempa!*?: %
\edef\:tempb{\HRow.\HCol\:temp}\ifx\:tempa\:tempb
   \expandafter\ifx \csname \expandafter\string\:temp :T:D\endcsname\relax
   \else \edef\:mALIGN{\expandafter\noexpand
          \csname \expandafter\string\:temp :T:D\endcsname}%
\fi\fi
%
      \expandafter\add:span
   \fi }
\HAssign\Halgn:cnt0
\def\derive:TD{%
   \bgroup \no:actv
       \xdef\:temp{\noexpand\expandafter\noexpand\:temp
               \noexpand\halign:TD\:MkHalign: -0 0 1 !*?: }%
   \egroup
   \let\hT:D\:temp
   \def\:temp##1 ##2 ##3 {\ifnum -1=##1##2##3 \else
      \ifnum \HRow=##1 \ifnum \HCol=##2 \:TDcode ##3\fi\fi
\ifnum \HRow=##1 \ifnum    0=##2 \:TDcode ##3\fi\fi
\ifnum     0=##1 \ifnum \HCol=##2 \:TDcode ##3\fi\fi
\ifnum     0=##1 \ifnum    0=##2 \:TDcode ##3\fi\fi
 \expandafter\:temp \fi}%
   \def\:tempa##1\empty{}%
   \edef\hT:D{\hT:D}}
\def\:TDcode#1{\expandafter
   \ifx \csname \string#1:T:D\endcsname\relax \else
     \csname \string#1:T:D\endcsname \expandafter\:tempa \fi
\expandafter#1\empty
\EndTD:CLASS}
                             \catcode`\_=13  \catcode`\^=13
\pend:defI\:TDcode{\TD:CLASS}%
\let\:temp\relax \let\:tempa\relax
\edef\no:actv{\let\noexpand\noexpand\noexpand^\:temp
   \let\noexpand\noexpand\noexpand_\:tempa}
                              \catcode`\_=8  \catcode`\^=7
\def\:temp{^}  \def\:tempa{_}
\edef\no:actv{\no:actv}
\def\halign:TB#1<>#2!*?: {#1}
\def\halign:TD#1<>#2!*?: {#2}

\:CheckOption{no-halign} \if:Option \else
   \def\h:halign{\ifx \EndPicture\:Undef
                \let\to:dim\empty  \expandafter\:halign
            \else                    \expandafter\TeXhalign:cr\fi}
\:CheckOption{base}  \if:Option  \else
    \def\:temp{\Protect\h:halign}
    \HLet\halign\:temp
\fi
\let\r:lax\relax
\def\r:relax{\r:lax}
\let\rl:x\relax
\def\:halign{%
   \let\rl:x\r:relax
   \ifx \rl:x\r:relax  \expandafter\nodim:hlgn: 
   \else               \expandafter\TeXhalign:cr   
   \fi
}
\def\nodim:hlgn:{\futurelet\:temp\hl:gn}
\def\hl:gn{\ifx   \:temp\bgroup      \let\:tempa\hlg:n
   \else \def\:tempa##1{\append:def\to:dim{##1}\nodim:hlgn:}\fi
   \:tempa}
                              \catcode`\#13  \catcode`\~6
\def\hlg:n{\begingroup  \catcode`\#13 \let#\relax \hal:gn}%

\long\def\hal:gn~1{\p:lgn~1#!*?: %
   \ifx \:temp\empty
       \expandafter\chs:halgn\string ~1!*?: %
\:tempb{%
   \csname a:embedded-halign\endcsname
      \ifmmode
        \vbox{\Rc:sharp
$$\TeXhalign:cr \to:dim{~1}$$}%
      \else \vbox{\Rc:sharp
\TeXhalign:cr \to:dim{~1}}\fi
      \:nopartrue
   \csname b:embedded-halign\endcsname
 }%
\let\:temp\endgroup
\:tempb!*?: %
\:tempb\:temp{\endgroup
   \:warning{\noexpand\halign translated into linear text}%
%
   \HRestore\noalign  \TeXhalign:cr~1}\:tempa!*?: %
%
   \else \def\:temp{\endgroup\:hlign{~1}}\fi   \:temp}
\long\def\p:lgn~1#~2!*?: {\def\:temp{~2}}

                              \catcode`\#6  \catcode`\~13
\long\def\:hlign#1{%
    \def\:temp{#1}\def\:tempa{\bgroup}\ifx \:temp\:tempa
       \endgroup  \:warning{\noexpand\halign translated into linear text}%
%
         \expand:after{\HRestore\noalign \TeXhalign:cr\bgroup}%
    \else \let\tabskip\tmp:dim    \let\hrulefill\empty
\let\hidewidth\empty
\expand:after{\h:align#1\cr!*?: #1!*?: }%
%
    \fi}
\NewConfigure{embedded-halign}{2}
\Configure{embedded-halign}
    {\expand:after{\Picture+}\pic:hlng{ \a:@Picture{pic-halign}}}
    {\EndPicture}
\catcode`\#=13
\def\Rc:sharp{\let#=\sv:sharp}
\catcode`\#=6
\def\:temp{\let\sv:sharp=##}\:temp
\def\chs:halgn#1{\def\:temp{#1}%
   \def\:tempa##1##2##3##4##5{\def\:tempa{##1}\def\:tempb{##2}%
      \def\:tempc{##3}\def\:tempd{##4}\def\:tempe{##5}}%
   \expandafter\:tempa\string\bgro
   \ifx \:temp\:tempa \expand:after{\expandafter\try:b\string}%
   \else              \expandafter\brc:halign \fi}
\def\try:b{\try:ch\:tempb\try:g}
\def\try:g{\try:ch\:tempc\try:r}
\def\try:r{\try:ch\:tempd\try:o}
\def\try:o#1{\def\:temp{#1}%
   \ifx \:temp\:tempe \def\:tempb{\let\:tempb\def\:tempa
}%
   \else  \let\:temp\empty
          \def\:tempb{\let\:tempb\:tempa
}\fi
   \long\def\:tempa##1!*?: {}%
\:tempa}
\def\try:ch#1#2#3{\def\:temp{#3}%
   \ifx \:temp#1 \expand:after{\expandafter#2\string}%
   \else              \expandafter\brc:halign \fi}
\def\brc:halign{%
   \let\:temp\empty   \def\:tempb{\let\:tempb\:tempa
}%
   \long\def\:tempa##1!*?: {}%
\:tempa}
\catcode`\#13 \catcode`\@6
\long\def\h:align@1\cr@2!*?: {\def\:temp{@2}\ifx \:temp\empty
   \expandafter\h:alignII \else \crcr:align@1\crcr!*?: \fi}
\def\crcr:align@1\crcr@2!*?: {\def\:temp{@2}\ifx \:temp\empty
   \expandafter\expandafter\expandafter\h:alignI \else
   \expandafter\expandafter\expandafter\h:alignII \fi}
\long\def\h:alignI@1\cr@2!*?: {%
   \SaveMkHalignConfig \Configure{MkHalign}{\hlg:a}{\hlg:b}
   \hlg:c\hlg:d{\hlg:e\RecallMkHalignConfig}\hlg:f
%
   \MkHalign#{@1}@2\EndMkHalign \RecallMkHalignConfig}
\def\h:alignII@1\crcr{\h:alignI@1\cr}
\catcode`\#6 \catcode`\@11
\HAssign\noalign:N0
\def\:tempc#1{\gHAdvance\noalign:N by 1
   \ifnum \noalign:N>100
      \global\let\noalign\o:noalign:
      \:warning{TeX4ht can't handle
                  \string\everycr{...\string\noalign...}}%
   \fi
%
   \vtop{\IgnorePar\a:noalign\vtop{\IgnorePar#1}\b:noalign}\cr
   \global\tmp:toks\everycr \global\everycr{}\cr
   \o:noalign:{\global\everycr\tmp:toks \gHAssign\noalign:N0 }%
 }
\HLet\noalign\:tempc



\fi

\def\:temp{\let\:shrp##} \:temp

\fi

\ifHtml \def\Canvas{\ht:special{t4ht"}}
\let\EndCanvas\Canvas
\def\:img{%
   \ifx       *\:temp  \let\:temp\i:mgif \let\:next\:GIf
   \else \ifx +\:temp  \let\:temp\i:mgif \let\:next\:Gif
   \else \ifx [\:temp  \let\:temp\im:g
   \else               \def\:temp{\im:g[{\csname
                                        a:Picture-alt\endcsname}]}%
   \fi \fi \fi  \:temp}
\def\xim:g[#1]#2{{\cond:pic{%
   \def\gif:nm{\edef\gif:nm}\gif:name{#2}%
   \expandafter\get:ext\gif:nm.!*?: %
   \edef\PictureFile{\gif:nm\ifx\:temp\empty \PictExt\fi}%
   \Needs-\PictureFile \ht:special{t4ht@-}%
   \a:IMG\ht:special{t4ht=\PictureFile}\b:IMG
   \a:PictureAlt{#1}\b:PictureAlt \d:IMG
   \a:PictureAttr{\at:IMG}\e:IMG}}\After:Picture}
\def\noim:g[#1]#2{}
\let\im:g\xim:g
\def\strt:gf#1#2{#2%
   \csname a:PictureAlt*+\endcsname
   \let\sv:sp\sp
   \let\sv:sb\sb
   \ifx \s:p\:UnDef \else \let\sp\s:p \fi
   \ifx \s:b\:UnDef \else \let\sb\s:b \fi
   \if #1!\ht:special{t4ht!\:AltPicture:}%
          \global\let\:AltPicture:\empty  \fi 
   \ht:special{t4ht|}%
   \ht:special{t4ht++\PictureFile}%
   \iprt:special
}
\def\nd:gf#1#2{%
   \let\ht:special\tex:special
   \ht:special{t4ht+}%
   \if #1!\ht:special{t4ht!}\fi    
   \let\sp\sv:sp
   \let\sb\sv:sb
   \ht:special{t4ht|}%
   \csname b:PictureAlt*+\endcsname
   \ifx #2\relax \else \csname a:PictureAttr*+\endcsname{#2}\e:IMG\fi
}
\def\img:alt{\ht:special{t4ht@-}%
   \a:IMG\ht:special{t4ht=\PictureFile}\b:IMG}
\def\:Gif#1{\cond:pic{%
   \gif:name{#1}\csname a:Picture+\endcsname
   \strt:gf!\img:alt
   \def\EndPicture{\nd:gf!{\c:IMG\Pic:Img}%
      \let\EndPicture\:UnDef \csname b:Picture+\endcsname
      \After:Picture}}}
\def\:GIf#1{\cond:pic{\ifvmode\vfill\break\else
      \ht:special{t4ht@[}\hfill\break.\ht:special{t4ht@]}\fi
   \gif:name{#1}\csname a:Picture*\endcsname
   \strt:gf!\img:alt
      \ifmmode \expandafter\vcenter\else \expandafter\vtop\fi
        \bgroup   \let\EndPicture\:EndGIf  \NoHtmlEnv }}
\def\:EndGIf{%
        \egroup \nd:gf!{\c:IMG \Pic:Img}\csname b:Picture*\endcsname
        \After:Picture}
\def\After:Picture{\After:EndPicture
   \global\let\After:EndPicture\empty}
\let\After:EndPicture\empty
\def\AfterPicture#1{\append:def\After:EndPicture{#1}%
   \global\let\After:EndPicture\After:EndPicture}
\def\iprt:special{%
   \def\ht:special##1{\tex:special{t4ht+##1}}}
\let\tex:special\ht:special
\def\x:GifText[#1]#2{\cond:pic{%
   \ifx \:next\:GIf
      \def\gif:box{\vtop\bgroup \NoHtmlEnv \let\gif:box\egroup}%
   \else  \let\gif:box\empty  \fi
   \gif:name{#2}%
   \img:alt  \def\:temp{#1}%
   \ifx \:temp\empty \else
       \csname a:PictureAlt*+[]\endcsname
           {#1}\csname b:PictureAlt*+[]\endcsname\fi
   \ht:special{t4ht>\jobname.tmp}%                    
   \strt:gf-\empty  \gif:box
   \def\EndPicture{%
     \gif:box  \nd:gf-\relax  \ht:special{t4ht<\jobname.tmp}%
     \csname a:PictureAttr*+[]\endcsname{\c:IMG\Pic:Img}\e:IMG
     \After:Picture}%
}}
\let\:GifText\x:GifText
\def\no:GifText[#1]{\:gobble}
\ifx \:DraCatCodes\:UnDef
   \def\Pic:Img{\at:IMG}

\fi
\def\gif:name#1{\edef\at:IMG{\noexpand\get:gfnm#1 !*?: }\at:IMG}
\def\get:gfnm#1 #2!*?: {\def\at:IMG{#2}%
   \ifx \at:IMG\empty\else
      \expandafter\aT:IMG\at:IMG!*?: %
   \fi
   \gif:nm{#1}}
\def\aT:IMG#1 !*?: {\def\at:IMG{#1}}
\def\NextPictureFile{\def\Next:PictureFile}
\NextPictureFile{}
\def\gif:nm#1{%
   \gHAdvance\P:ctureCount  1
   \xdef\PictureFile{#1}\ifx  \PictureFile\empty
      \xdef\PictureFile{\Next:PictureFile}\fi
   \global\let\Next:PictureFile\empty
   \ifx  \PictureFile\empty
      \bgroup  \Advance:\P:ctureCount  -\Pic:Cnt
      \xdef\PictureFile{\j:bname\P:ctureCount
                        x\Pic:Dm\PictExt}%
      \egroup
   \else
      \expandafter\get:ext\PictureFile.!*?: %
      \ifx\:temp\empty \xdef\PictureFile{\PictureFile\PictExt}\fi
   \fi
   \immediate\write-1{l. \the\inputlineno\space Writing
                 \jobname.idv[\P:ctureCount] (\PictureFile)}%
   }%
\def\SavePicture#1{\def\:tempa{#1}\SaveP:cture}
\Odef\SaveP:cture[#1]{%
   \edef\:tempb{\noexpand\Odef\expandafter\noexpand\:tempa[####1]{{%
      \let\noexpand\Log:Needs\noexpand\:gobble
      \noexpand\Picture[\HCode{#1}]{\PictureFile\space####1}}}}%
   \:tempb \expand:after{\global\expandafter\let\:tempa}\:tempa }
\def\NewPictureDomain#1{%
   \global\let\Pic:Cnt\P:ctureCount
   \def\Pic:Dm{#1} \ifx \Pic:Dm\empty
      \xdef\Pic:Dm{\P:c:Dm}%
      \gHAdvance\P:c:Dm    1
   \fi }
\HAssign\P:c:Dm  0
\let\Pic:Dm\empty
\HAssign\Pic:Cnt1
\HAssign\P:ctureCount0
\let\:AltPicture:\empty        
\def\pic:gobble{\ifx \EndPicture\:UnDef \else \expandafter\:gobble\fi}
\def\pic:gobbleII{\ifx \EndPicture\:UnDef \else \expandafter\:gobbleII\fi}
\def\nopic:gobble#1{\ifx \EndPicture\:UnDef \else #1\fi}
\def\pic:cond#1#2{%
   \ifx\EndPicture\:UnDef \def\end:condpic{\EndPicture}\expandafter#1%
   \else                  \let\end:condpic\empty  \expandafter#2%
   \fi }
\def\cond:pic#1{%
   \ifx \EndPicture\:UnDef #1\else
      \let\E:pic\EndPicture \PushMacro\E:pic
      \def\EndPicture{\PopMacro\E:pic \let\EndPicture\E:pic}\fi}
\def\PictureOff{%
   \expandafter\let\csname Pic:\Pic:On\endcsname\EndPicture
   \ifx \EndPicture\:UnDef   \let\EndPicture\empty \fi
   \let\im:g\noim:g
\let\:GifText\no:GifText
%
   \Advance:\Pic:On  1 }
\def\PictureOn{%
   \ifnum \Pic:On>0
     \Advance:\Pic:On  -1
     \ifnum \Pic:On=0  \let\im:g\xim:g
\let\:GifText\x:GifText
%
     \fi
     \expand:after{\let\EndPicture}\csname Pic:\Pic:On\endcsname
     \ifx \EndPicture\relax \let\EndPicture\:UnDef\fi
   \else
     \:warning{\string\PictureOn\space without \string\PictureOff}%
   \fi }
\HAssign\Pic:On  0
\def\:temp#1{\ifx \EndPicture\:Undef
      \relax\ifmmode\hbox{$#1$}\else \hbox{#1}\fi
   \else \o:smash:{#1}\fi}
\HLet\smash\:temp

\fi
\def\P:ct{\leavevmode  \futurelet\:temp\:img}
\let\Picture\P:ct
\def\yes:pic{\PictureOn}
\def\no:pic{\PictureOff}
\def\i:mgif#1{\futurelet\:temp\:gif}

\def\:gif{%
   \ifx \:temp[\expandafter\:GifText
   \else       \expandafter\:next       \fi }



\def\hyphenation#1{}

\def\at:startdoc{%
    \let\:startdoc\:UnDef    \let\at:startdoc\:UnDef
    \edef\NoHtmlEnv{\NoHtmlEnv}%
\append:def\NoHtmlEnv{\SUBOff \SUPOff}\HtmlEnv
%
    \a:Preamble
    \a:PROLOG \a:HTML \a:HEAD
%
\ht:special{t4ht>\jobname.tmp}{\everyhbox{}\hbox
   {x\ht:special{t4ht;\a:rootfont:}x}}%
\ht:special{t4ht<\jobname.tmp}%
}
\def\:startdoc{%
    \at:startdoc
    \edef\:temp{\pageno\the\pageno}%
    {\let\HCode\:gobble \par\newpage}\:temp}
  
\ifHtml
   \def\HTrace#1{\csname #1:T\endcsname}
\def\EndHTrace#1{\csname #1:t\endcsname}
\def\RULE:T{\ht:special{t4ht@\%R}}  \def\RULE:t{\ht:special{t4ht@\%r}}
\def\GROUP:T{\ht:special{t4ht@\%P}}  \def\GROUP:t{\ht:special{t4ht@\%p}}
\def\CHAR:T{\ht:special{t4ht@\%C}}  \def\CHAR:t{\ht:special{t4ht@\%c}}
\def\HSPACE:T{\ht:special{t4ht@\%H}}  \def\HSPACE:t{\ht:special{t4ht@\%h}}
\def\VSPACE:T{\ht:special{t4ht@\%V}}  \def\VSPACE:t{\ht:special{t4ht@\%v}}

\def\Send#1{\Configure{Send:#1}}
\def\DviSend{\let\send:special\ht:special
   \ht:special{t4ht\string~}\EndPauseBACK\ht:special{t4ht\string~}%
   \ht:special{t4ht\string~}}
\def\EndDviSend{\send:special{t4ht\string~}%
   \send:special{t4ht\string~}\PauseBACK\send:special{t4ht\string~}%
   \let\send:special\:gobble}
\def\PauseBACK{\send:special{t4ht\string~<(}}
\def\EndPauseBACK{\send:special{t4ht\string~<)}}
\def\HideBACK{\send:special{t4ht\string~<[}}
\def\EndHideBACK{\send:special{t4ht\string~<]}}
\def\MiniBACK{\send:special{t4ht\string~<-}}
\def\EndMiniBACK{\send:special{t4ht\string~<+}}


   
\fi

\ifHtml  
\fi
\def\V:rbatim{\begingroup \begin:Verb \Verb:env }
\def\:EndVerbatim{\end:Verb \endgroup }
\def\Verb:env{\no:catcodes0{64}{12}\no:catcodes{65}{90}{11}%
   \no:catcodes{91}{96}{12}\no:catcodes{97}{122}{11}%
   \no:catcodes{123}{255}{12}%
   \catcode`\^^M13    \catcode`\ 13    \catcode`\^^I13
   \:Verbatim      \::Verbatim }%
\def\::Verbatim{\futurelet\:temp\V:erbatim}
\def\V:erbatim{%
   \ifx -\:temp  \expandafter\Ve:rbatim
   \else  \let\start:verb\Ver:batim  \expandafter\Ver:sp \fi }
\def\Ver:sp{%
   \ifx \ver:sp\:temp  \expandafter\Ver:assg
   \else         \expandafter\Ver:ln \fi }
\def\Ver:ln{%
   \ifx \ver:ln\:temp  \expandafter\Ver:assg
   \else         \expandafter\start:verb \fi }
\def\Ver:assg{\afterassignment\start:verb\let\:temp}
{
\catcode`\/0
/catcode`/\12
/gdef/Ve:rbatim#1#2{/catcode`#20
   /ifx  #2\/let/start:verb/Verb:atim
   /else    /let/start:verb/Ver:batim /fi
   /futurelet/:temp/Ver:sp}
}

{
\catcode`\^^I13  \catcode`\/0   \catcode`\\12
/catcode`/.10  /catcode`/^^M13      /catcode`/ 13%
/gdef/:Verbatim{%
.../def^^M{/ht:everypar{/Verb:eoln}/Verb:boln/par/leavevmode}%
.../def {/Verb:sp}%
.../let/ver:sp %
.../let/ver:ln^^M%
.../def^^I{/leavevmode  }}}

{
\xdef\Verb:atim#1\EndVerbatim{\noexpand\vrb:tt
   \leavevmode#1\noexpand\:EndVerbatim}
\catcode`\/0   /catcode`/\12
/xdef/Ver:batim#1\EndVerbatim{/noexpand/vrb:tt
   /leavevmode#1/noexpand/:EndVerbatim}
}

\NewConfigure{VerbatimEnv}[2]{\def\begin:Verb{#1}\def\end:Verb{#2}}
\Configure{VerbatimEnv}
   {\par  \edef\leftsk:p{\hskip\Verb:Left}%
    \leftskip\z@ \parindent\z@ \ht:everypar{\verb:config}}
   {\aft:Verb\par}
\def\verb:config{\bef:Verb\csname leftsk:p\endcsname
   \def\verb:config{\Verb:boln \def\Verb:eoln{\leavevmode\par}\leftsk:p}}

                    
\ifx\beginL\@undefined \else
   \ifHtml
      \def\:temp{\o:beginL:\a:Lregion}
\HLet\beginL=\:temp
\def\:temp{\b:Lregion\o:endL:}
\HLet\endL=\:temp
\NewConfigure{Lregion}{2}
\def\:temp{\o:beginR:\a:Rregion}
\HLet\beginR=\:temp
\def\:temp{\b:Rregion\o:endR:}
\HLet\endR=\:temp
\NewConfigure{Rregion}{2}

      \Hinput{etex4ht}
\fi\fi
\ifHtml      \def\:tempa{\:Hinclude}
\else
    \:CheckOption{th4}\if:Option  \def\:tempa{\input th4.4ht}
    \else  \let\:tempa\empty \fi
\fi
\:CheckOption{core} \if:Option  \let\:tempa\empty \fi
\:CheckOption{base} \if:Option  \let\:tempa\empty \fi
\:tempa

\:CheckOption{debug}
\if:Option \def\HTraceHPageOn{%
   \def\:buttrc##1##2{\no:pic  \writesixteen{%
       l.\the\inputlineno -[\HPageDepth]- \string##1##2}\yes:pic
   }}
\def\HTraceHPageOff{\def\:buttrc##1##2{}}
\HTraceHPageOn

\else      \def\:buttrc#1#2{}
\let\HTraceHPageOn\empty
\let\HTraceHPageOff\empty
 \fi

\ifHtml \else \let\EndPreamble\empty \fi

\ifHtml \:startdoc
%\let\:shipout\shipout
%\def\shipout{\vfil\break\let\shipout\:shipout \shipout}
 \fi   

\ifx \Hinput\:UnDef \else
  \Hinput{tex4ht2}
  \ifx \a:ProTex\:UnDef
\else \input ProTex.4ht \fi

\fi
\def\:usersty#1,#2!*?: {\def\:temp{#1}%
   \ifx \:temp\empty \else
      \expandafter\ifx \csname #1\endcsname\relax
         \expandafter\let \csname #1\endcsname=\empty
         \input #1
      \fi
      \def\:temp{#2}\expandafter\:temp
   \fi}
\edef\TeXivht{\expandafter\ifx \csname TeXivht\endcsname\relax
  \else \noexpand\:usersty\TeXivht,!*?: \fi
  \let\noexpand\TeXivht\noexpand\:UnDef
  \let\noexpand\:usersty\noexpand\:UnDef  }


\rmv:ifs  \let\rmv:ifs\:UnDef
\:RestoreCatcodes    \TeXivht
\endinput
 
