<..html latex local env..>
\bgroup
\catcode‘\-=13
\catcode‘\(=1 \catcode‘\)=2 \catcode‘\/=0
\catcode‘\{=12 \catcode‘\}=12 \catcode‘\\=12
/gdef/ScriptEnv#1(%
/expandafter/let/csname :#1:/endcsname=/empty
/edef/:temp(/def/expandafter/noexpand/csname a:#1/endcsname
####1/expandafter/noexpand/csname end/endcsname{#1}%
(####1/noexpand/:EndVerbatim/noexpand/end(#1)))/:temp
% /expandafter/def/csname
% b:#1/endcsname##1\end{#1}(##1/:EndVerbatim/end(#1))%
/expandafter/def/csname
b:#1/endcsname(/bgroup /catcode‘/-=13
/def/:temp####1\end{#1}(/egroup
/def-(/string-/relax)%
####1/:EndVerbatim%
/expandafter/def/csname end#1/endcsname()%
/end(#1))%
/:temp)%
/edef/:temp(/noexpand/DefScript:
/expandafter/noexpand/csname #1/endcsname
(/expandafter/noexpand/csname a:#1/endcsname)%
(/expandafter/noexpand/csname b:#1/endcsname))/:temp
)
/egroup
-_-_-
The following is for ‘\verb’.
<..html latex local env..>+
\let\:sverb=\@sverb
\def\@sverb#1{\a:verb \pend:def\verb@egroup{\b:verb}%
\:sverb#1}
-_-_-
A ‘\aftergroup\b:verb’ is no good above because it is preceded by a \aftergroup for an embedded \obeylines commands which can produce, for instance, ‘<NOBR><CODE>strong</NOBR></CODE>’.
The ‘\HChar{160}=\:nbsp’ is required in empty lines by Netscape. Tex4ht also loses empty lines, byt it can survive with the weaker insertion of ‘\special{t4ht=<!---->}’.
<..html latex local env..>+
\let\:temp=\@verbatim
\HLet\@verbatim=\:temp
\pend:def\@verbatim{%
\Configure{obeylines}{\let\ =\v:ch}{}{\v:par}}
-_-_-
<..config latex.ltx utilities..>+
\NewConfigure{verbatim}[2]{\c:def\v:par{#1}\c:def\v:ch{#2}}
\def\c:verb:#1#2{\c:def\a:verb{#1}\c:def\b:verb{#2}}
-_-_-
The \SaveEverypar...\RecallEverypar needs to be well parenthesized here with those in the embeded lists. The indirection through \end:saveeverypar is because the \endverbatim can be for a start of a \verbatim from another lib (e.g., verbatim.sty).
The configuration of the verbatim environment is on the loop, not the begin-end, to eliminate extra lines in the content.
‘\ConfigureEnv{verbatim}{}{}{\env:verb}{\endenv:verb}’ fails in verbatim.sty. The same is true whn nested within another ‘\begin{..}...\end{..}’ block. This is so because only the external-most list entries are [recognized].
The verbatim environmrnt is typeset in \trivlist environment that intreduces paragraph break in the first line through \def\:D:T{<P>}. To eliminate the spaces that precede we introduce the parindent=0.
<..leading line in /verbatim..>
\parindent=\z@
-_-_-