[tex4ht] [SOLVED] Spurious line break (<br />) with \lstinputlisting

Denis Bitouzé dbitouze at wanadoo.fr
Sun Sep 9 12:15:09 CEST 2012


Le dimanche 09/09/12 à 11h25,
Denis Bitouzé <dbitouze at wanadoo.fr> a écrit :

> Any help would be strongly welcome :)

OK, I'll managed after having a look at html4.4ht and adding in
the local .cfg file:

\Configure{lstinputlisting}
   {\ifvmode \IgnorePar\fi \EndP
    \HCode{<!--l. \the\inputlineno-->}%
    \HCode{<div class="lstinputlisting">}%
    \bgroup \tt %\special{t4ht@(}%
       \Configure{listings}
         {{\everypar{}\leavevmode}}
         {{\everypar{}\leavevmode}}
         {\leavevmode\special{t4ht at +\string&{35}x00A0{59}}x%
             \HCode{<span class="label">}}
         {\HCode{</span>}}%
   }
   {%\special{t4ht@)}
    \egroup
    \ifvmode \IgnorePar\fi \EndP  \HCode{</div>}\par}

where, in comparison to the original \Configure{lstinputlisting}:,
"<br />" is removed from:

\HCode{<br /><span class="label">}

Maybe this configuration will lead to side effects but, if not, I would
strongly suggest to adopt it for future TeX4ht release.
-- 
Denis



More information about the tex4ht mailing list