<div dir="ltr"><div class="gmail_default" style="color:#3366ff">Hi Hans,</div><div class="gmail_default" style="color:#3366ff">Could you please send a minimal working example with the problem and the command line used to generate the html file.</div><div class="gmail_default" style="color:#3366ff"><br></div><div class="gmail_default" style="color:#3366ff">Jagath</div><div class="gmail_extra"><br><div class="gmail_quote">On 4 January 2016 at 22:08, Hans Georg Schaathun <span dir="ltr"><<a href="mailto:georg+tex@schaathun.net" target="_blank">georg+tex@schaathun.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I am struggling to find a good way to typeset source code<br>
with tex4ht.  In my opinion the <code> tag should be used<br>
in HTML, for the benefit of screen readers and search engines<br>
which might need the semantics.<br>
<br>
I am used to using both lstlisting (listings package), verbatim,<br>
and code (texpower package).  Texpower does not seem to be supported<br>
by tex4ht at all.  verbatim is ok, except that I should like to<br>
reconfigure it to use the <code> tag.  lstlisting is brilliant for<br>
source code, except for the <code> tag.  For pseudo-code I also<br>
have the problem that tex4ht does not grok maths within lstlisting.<br>
It causes an unclosed tags.<br>
<br>
Has anyone found a way cleanly to produce <code> elements with tex4ht?<br>
All my attempts either produce an excess of tags which mess up<br>
the spacing, or they make tex strip linebreaks before it gets<br>
to tex4ht.  I do not understand all the low-level TeX code in the<br>
listings.4ht style, and I would really hope I don't have to ...<br>
<br>
Preferably, I should like to specify a custom class name for the<br>
purpose of CSS configuration, but it is obviously possible to tailor<br>
the CSS style to a non-custom class name if I have to.<br>
<br>
Secondly, is there a good fix to make tex4ht accept maths within<br>
lstlisting?<br>
<br>
Thanks a lot for any pointers,<br>
<span class="HOEnZb"><font color="#888888">--<br>
:-- Hans Georg<br>
</font></span></blockquote></div><br></div></div>