3.9 Loose Ends

<..latex environments..>
 \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}
-_-_-

<..latex environments..>+
 \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}
-_-_-

<..article,report..>
 \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>}}
-_-_-

<..tex4ht paragraphs..>
 \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 }}
-_-_-

<..latex etc..>+
 \Configure{newline}{\HCode{<!--br/-->}}
-_-_-

<..configure tei-mml latex..>
 \Configure{newline}
   {\ifmtext \HCode{</mtext><mtext class="newline">}%
    \else \HCode{<!--br role="newline" /-->}\fi}
-_-_-

<..latex etc..>+
 \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}
-_-_-

<..ams art,proc,book..>+
 \ifx \deferred@thm@head\:UnDef\else
    <.shared ams thm/cls.>
 \fi
-_-_-

<..configure tei amsthm..>
 <.shared ams thm/cls.>
-_-_-

<..shared ams thm/cls..>
 \Configure{proof}
    {\IgnorePar\EndP\HCode{<note rend="proof"><title>}}
    {\HCode{</title>}\ShowPar\par}
    {\IgnorePar\EndP\HCode{</note>}\ShowPar\par}
-_-_-

<..tex4ht cross-linking..>
 \Configure{Link}{ref}{ target=}{ id=}{\empty}
-_-_-

<..configure tei url..>
 \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>

<..configure tei-mmltei graphics..>
 \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.>
-_-_-

<..configure tei graphics..>
 \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.>
-_-_-

<..graphics types..>
 \:tempc{eps}
 \:tempc{jpg}
 \:tempc{pdf}
 \:tempc{png}
 \:tempc{tif}
 \:tempc{gif}
-_-_-

<..configure tei fontmath..>
 \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}
-_-_-

<..configure tei fontmath..>+
 \Configure{textbf}{\ifmathml\else
                      <.par within font.>\HCode{<hi rend="bf">}\fi}
                   {\ifmathml\else
                     \HCode{</hi>}<.end par within font.>\fi}
 \Configure{textit}{\ifmathml\else
                      <.par within font.>\HCode{<hi rend="it">}\fi}
                   {\ifmathml\else
                     \HCode{</hi>}<.end par within font.>\fi}
 \Configure{textrm}{\ifmathml\else
                      <.par within font.>\HCode{<hi rend="rm">}\fi}
                   {\ifmathml\else
                     \HCode{</hi>}<.end par within font.>\fi}
 \Configure{textup}{\ifmathml\else
                      <.par within font.>\HCode{<hi rend="up">}\fi}
                   {\ifmathml\else
                     \HCode{</hi>}<.end par within font.>\fi}
 \Configure{textsc}{\ifmathml\else
                      <.par within font.>\HCode{<hi rend="sc">}\fi}
                   {\ifmathml\else
                     \HCode{</hi>}<.end par within font.>\fi}
 \Configure{textsf}{\ifmathml\else
                      <.par within font.>\HCode{<hi rend="sf">}\fi}
                   {\ifmathml\else
                     \HCode{</hi>}<.end par within font.>\fi}
 \Configure{textsl}{\ifmathml\else
                      <.par within font.>\HCode{<hi rend="sl">}\fi}
                   {\ifmathml\else
                     \HCode{</hi>}<.end par within font.>\fi}
 \Configure{texttt}{\ifmathml\else
                      <.par within font.>\HCode{<hi rend="tt">}\fi}
                   {\ifmathml\else
                     \HCode{</hi>}<.end par within font.>\fi}
 \Configure{emph}{\ifmathml\else
                      <.par within font.>\HCode{<emph>}\fi}
                   {\ifmathml\else
                     \HCode{</emph>}<.end par within font.>\fi}
-_-_-

<..par within font..>
 \leavevmode\SaveEndP\bgroup
 \Configure{HtmlPar}
    {\HCode{<!--br role="newline" /-->}}
    {\HCode{<!--br role="newline" /-->}}
    {}{}%
-_-_-

<..end par within font..>
 \egroup \RecallEndP
-_-_-