%
% kevin.cfg
%
% Custom configuration file for running Kevin's documents.
% The invocation shall be:
%
% htlatex <file> kevin.cfg
%
%

\makeatletter
\catcode`\:=11

\Preamble{xhtml,info}

\begin{document}

\EndPreamble

 \let\savecolor\color
 \NewConfigure{color}[2]{\def\a@color{#1}\def\b@color{#2}}
 \def\@@tmp#1{\a@color#1\b@color\savecolor{#1}\aftergroup\endspan}
 \let\color\@@tmp
 \def\endspan{\Tg</span>}
 \Configure{color}{\HCode{<span style="color:}}{\HCode{">}}

\ConfigureEnv{lstlisting}
   {\let\color\savecolor
    \ifvmode \IgnorePar\fi \EndP
    \gHAdvance\listingN by 1
    \HCode{<!--l. \the\inputlineno-->}%
    \gdef\start:LstLn{\HCode{<div class="lstlisting" id="listing-\listingN">}%
      \gdef\start:LstLn{\leavevmode\special{t4ht@+\string&{35}x00A0{59}}x%
    \HCode{<br />}}}
    \bgroup
       \Configure{listings}
         {{\everypar{}\leavevmode}}
         {{\everypar{}\leavevmode}}
         {\start:LstLn \HCode{<span class="label">}}
         {\HCode{</span>}}%
   }
   {\egroup
    \ifvmode \IgnorePar\fi \EndP \HCode{</div>}\par}
   {}{}


\Css{div.lstlisting{font-family: monospace;
    white-space: nowrap; margin-top:0.5em;
    margin-bottom:0.5em; 
    color: green ;
    background-color: black;}} 

\catcode`\:=12
\makeatother

\endinput

%
% End of file 'kevin.cfg'
% 
