\ConfigureEnv{verbatim}
{\ifinner\else \vfill\break\fi
\IgnorePar\EndP\HCode{<p rend="verbatim">}\EndNoFonts}
{\NoFonts \ht:special{t4ht=</p>}\ShowPar\par}
{} {}
\ConfigureEnv{verbatim*}
{\ifinner\else \vfill\break\fi
\IgnorePar\EndP\HCode{<p rend="verbatim-star">}\EndNoFonts}
{\NoFonts \HCode{</note><p>}\ShowPar\par}
{} {}
\Configure{verbatim}{\:nbsp}{\a:sp}
-_-_-
\ConfigureEnv{flushleft}
{\IgnorePar\EndP\HCode{<div type="flushleft">}%
\gHAdvance\P:level by 1 }
{\IgnorePar\EndP\gHAdvance\P:level by -1 \HCode{</div>}}
{}{}
\ConfigureEnv{flushright}
{\IgnorePar\EndP\HCode{<div type="flushright">}%
\gHAdvance\P:level by 1 }
{\IgnorePar\EndP\gHAdvance\P:level by -1 \HCode{</div>}}
{}{}
\ConfigureList{flushleft}
{}{}
{} {\par\ShowPar}
\ConfigureList{flushright}
{}{}
{} {\par\ShowPar}
-_-_-
\ConfigureEnv{abstract}
{\IgnorePar\EndP\HCode{<div type="abstract">}%
\gHAdvance\P:level by 1 }
{\IgnorePar\EndP\gHAdvance\P:level by -1 \HCode{</div>}}
{\HCode{<head>}}
{\HCode{</head>}}
-_-_-
\Configure{HtmlPar}
{\EndP\HCode{<!--l. \the\inputlineno-->%
\ifnum\P:level=0 <div type="p">\fi
<p>}\gHAdvance\P:level by 1 }
{\EndP\HCode{<!--l. \the\inputlineno-->%
\ifnum\P:level=0 <div type="p">\fi
<p>}\gHAdvance\P:level by 1 }
{\gHAdvance\P:level by -1 \HCode{</p>\ifnum\P:level=0 </div>\fi }}
{\gHAdvance\P:level by -1 \HCode{</p>\ifnum\P:level=0 </div>\fi }}
-_-_-
\Configure{newline}{\HCode{<!--br/-->}}
-_-_-
\Configure{newline}
{\ifmtext \HCode{</mtext><mtext class="newline">}%
\else \HCode{<!--br role="newline" /-->}\fi}
-_-_-
\ConfigureEnv{minipage}
{\IgnorePar\EndP\HCode{<note rend="minipage">}}
{\IgnorePar\EndP\HCode{</note>}\ShowPar}
{}{}
\Configure{newtheorem}
{\IgnorePar\EndP\HCode{<note rend="newtheorem"><title>}}
{\HCode{</title>}\ShowPar\par}
{\IgnorePar\EndP\HCode{</note>}\ShowPar\par}
-_-_-
\Configure{proof}
{\IgnorePar\EndP\HCode{<note rend="proof"><title>}}
{\HCode{</title>}\ShowPar\par}
{\IgnorePar\EndP\HCode{</note>}\ShowPar\par}
-_-_-
\Configure{Link}{ref}{ target=}{ id=}{\empty}
-_-_-
\Decl{<!NOTATION URL SYSTEM "" >}
\Configure{url}{%
\urlLink[xr-ent\ent:cnt]{}{}#1\EndurlLink
\Decl{<!ENTITY xr-ent\ent:cnt\space SYSTEM "#1" NDATA URL>}%
\gHAdvance\ent:cnt by 1
}
\LinkCommand\urlLink{xref,doc}
-_-_-
xr-ent has to be a notation-type entity to fit with TEI’s demand of
‘doc ENTITY #IMPLIED’. For instance,
<!NOTATION URL SYSTEM "">
<!ENTITY xr-ent0 SYSTEM
"http://wwwinfo.cern.ch/asdoc/geant/geantall.html" NDATA URL>
\def\:tempc#1{%
\Configure{graphics*}
{#1}
{\HCode{<figure entity="fg-ent\ent:cnt"
width="\the\Gin@req@width"
height="\the\Gin@req@height" />}%
\Decl{<!ENTITY fg-ent\ent:cnt\space SYSTEM
"\csname Gin@base\endcsname" NDATA #1>}%
\gHAdvance\ent:cnt by 1
}}
<.graphics types.> -_-_-
\def\:tempc#1{%
\Decl{<!NOTATION #1 SYSTEM "" >}
\Configure{graphics*}
{#1}
{\HCode{<figure entity="fg-ent\ent:cnt" />%
<!--width="\the\Gin@req@width"
height="\the\Gin@req@height"-->}%
\Decl{<!ENTITY fg-ent\ent:cnt\space SYSTEM
"\csname Gin@base\endcsname.#1" NDATA #1>}%
\gHAdvance\ent:cnt by 1
}}
<.graphics types.> -_-_-
\:tempc{eps}
\:tempc{jpg}
\:tempc{pdf}
\:tempc{png}
\:tempc{tif}
\:tempc{gif}
-_-_-
\Configure{mathit}{\ifmathml\else \HCode{<hi rend="it">}\fi}
{\ifmathml\else \HCode{</hi>}\fi}
\Configure{mathbf}{\ifmathml\else \HCode{<hi rend="bf">}\fi}
{\ifmathml\else \HCode{</hi>}\fi}
\Configure{mathtt}{\ifmathml\else \HCode{<hi rend="tt">}\fi}
{\ifmathml\else \HCode{</hi>}\fi}
\Configure{mathsf}{\ifmathml\else \HCode{<hi rend="sf">}\fi}
{\ifmathml\else \HCode{</hi>}\fi}
\Configure{mathrm}{\ifmathml\else \HCode{<hi rend="rm">}\fi}
{\ifmathml\else \HCode{</hi>}\fi}
-_-_-
\leavevmode\SaveEndP\bgroup
\Configure{HtmlPar}
{\HCode{<!--br role="newline" /-->}}
{\HCode{<!--br role="newline" /-->}}
{}{}%
-_-_-