I want to get htlatex to put some text into my HTML file verbatim. The problem is that it keeps redo-ing my spacing. So, for example, I use a cf.cfg like this.
\Preamble{html}
\ConfigureEnv{tawny}
{\IgnorePar\EndP\HCode{<pre><code class="clojure">}\EndNoFonts}
{\NoFonts \HCode{</code></pre>}}{}{}
\begin{document}
\EndPreamble
And a document like this...
\documentclass{article}
\newenvironment{tawny}%
{}%
{}%
\begin{document}
\begin{tawny}
(defclass Pizza
:super Thing)
\end{tawny}
\end{document}
which produces this piece of html (and the rest!)
<pre><code class="clojure"> (defclass Pizza :super Thing)
</code></pre>
while what I want is:
<pre><code class="clojure">
(defclass Pizza
:super Thing)
</code></pre>
with indentation and spacing preserved
So, the pre tag has been defeated because htlatex has re-ordered things. I tried using alltt -- so redefinign tawny in the example above.
\newenvironment{tawny}%
{\begin{alltt}}%
{\end{alltt}}%
And htlatex puts in nbsp and br tags which don't really make sense in a pre tag.
<pre><code class="clojure"><div class="alltt">
<!--l. 11--><p class="noindent" ><div class="obeylines-v">
(defclass Pizza
<br />  :super Thing)
</div>
</div>
</code></pre>
I've tried the documentation, and looking through the source, but cannot see where this behaviour comes from nor if it is configurable!