[tex4ht] issue with tex4ht and minted package, extra space added

Deimantas Galcius deimi at vtex.lt
Mon Jun 6 07:55:14 CEST 2016

minted environment is a wrapper for Verbatim from fancyrb, which does have a tex4ht configuration.
The fifth parameter of "\Configure{fancyvrb}" is set to two spaces. You can change it of course.

The config file:

    {\IgnorePar \EndP \gHAdvance\fancyvrbNo by 1
     \HCode{<div class="fancyvrb" id="fancyvrb\fancyvrbNo">}}
    {\gHAdvance\fancyvrb:cnt by 1
     \ifnum \fancyvrb:cnt>1
     \HCode{<br class="fancyvrb" />}\fi} {}
    %{\ \ } % the culprit - explicit two spaces


-- deimi

On 06/01/2016 10:53 AM, Michal Hoftich wrote:
>> If you get rid of the spaces after the }'s in that temp file, do the
>> "extra" spaces in the tex4ht output go away?  -k
> The spaces at beginning of the line remains. We can get somewhat
> interesting result with a following .cfg file:
> \Preamble{xhtml}
> \ConfigureEnv{Verbatim}{\NoFonts}{\EndNoFonts}{}{}
> \Css{div.fancyvrb{font-family:monospace;}}
> \begin{document}
> \EndPreamble
> and without conversion to Unicode:
> <a id="x1-7r1"></a>&#x00A0;&#x00A0;clear&#x00A0;all;&#x00A0;close&#x00A0;all;<br
> class="fancyvrb" />
> Michal

More information about the tex4ht mailing list