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

Nasser M. Abbasi nma at 12000.org
Mon May 30 03:02:31 CEST 2016


On 5/29/2016 6:46 PM, Karl Berry wrote:
>     Found a big problem with tex4ht adding extra space at start
>     of each listing line in HTML,
>
> It's easy to believe that an extra space is being created somewhere
> along the line.  Especially since there is no minted.4ht, and minted.sty
> necessarily has to play games with the ~ character.
>
> Unfortunately I cannot run the document, since I get (after installing
> the python-pygments package on my CentOS 6 system):
>
>   *** Error while highlighting:
>   ClassNotFound: filter 'tokenmerge' not found
>      (file "/usr/lib/python2.6/site-packages/pygments/filters/__init__.py", line 47, in get_filter_by_name)
>
> And so the output is entirely empty.  I don't know where that "filter"
> is supposed to come from.  Some web searches didn't turn up anything
> obvious.  Sorry ... I submitted the bug report to the tracker.  -k
>
>

I had better luck installing it using pip, vs. installing
it from the Linux own package system. I do not know if this
is what you did or not, but I used this command:

sudo pip install --upgrade pygments

This gave me the latest version.  Pygments version 2.1.3. Before,
when I installed pygments using Linux mint

    apt-get install  pygments

I got a much older version.

One issue with minted for Latex, is that one must install a
separate software (in this case Pygments) to use it.  I do not
like to use packages from TL that still needed an additional
installations by user to make them work, since this can lead
to problems. It would be much better if everything needed to run
this package comes pre-installed with TL.  This might not be
possible for this package, I do not know.  But in theory,
it is better to have everything be self contained in TL
once installed.

Any way, I am back to using listings package. At least it works
with tex4ht, with no additional installation of anything :)

thank you,
--Nasser



More information about the tex4ht mailing list