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

2016-06-07 Thread Michal Hoftich
> I don't get it.  If fancyvrb itself doesn't insert any indentation by
> default (xleftmargin default is zero, I gather), shouldn't tex4ht follow
> suit?  Maybe Eitan was looking at the fancyvrb manual, which does mostly
> use "two spaces".  Hmm.
>

I can't really see a reason for explicit spaces. They are inserted
also in configurations for ODT and HTML-speech. I will post a patch at
the bug tracker.

Best,
Michal


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

2016-06-06 Thread Karl Berry
Hi Deimi,

Great sleuthing.

Verbatim from fancyrb, which does have a tex4ht configuration.
The fifth parameter of "\Configure{fancyvrb}" is set to two spaces.

I don't get it.  If fancyvrb itself doesn't insert any indentation by
default (xleftmargin default is zero, I gather), shouldn't tex4ht follow
suit?  Maybe Eitan was looking at the fancyvrb manual, which does mostly
use "two spaces".  Hmm.

Thanks,
Karl



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

2016-06-05 Thread Deimantas Galcius

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:

\Preamble{}
\catcode`\:=11\relax
\Configure{fancyvrb}
   {\IgnorePar \EndP \gHAdvance\fancyvrbNo by 1
\gHAssign\fancyvrb:cnt0
\HCode{}}
   {\EndP\HCode{}}
   {\gHAdvance\fancyvrb:cnt by 1
\ifnum \fancyvrb:cnt>1
\HCode{}\fi} {}
   %{\ \ } % the culprit - explicit two spaces
   {}
   {}
\catcode`\:=12\relax
\begin{document}
\EndPreamble


regards,

-- 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:

clearall;closeall;

Michal






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

2016-05-29 Thread Karl Berry
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



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

2016-05-24 Thread Nasser M. Abbasi

Found a big problem with tex4ht adding extra space at start
of each listing line in HTML, which does not happen
with the normal listings package. Here is the question on this

http://tex.stackexchange.com/questions/311284/how-to-remove-extra-space-added-by-tex4ht-to-minted-listing-at-start-of-each-lin

If some tex4ht expert can shed a light on this, it will be great.

This looks like a version issue of different installation of something
since it works for others. I am on Linux mint 64 bit using TL 2015.
Python is 2.7.6. pygmentize is version 2.1.3

uname -a
Linux me-VirtualBox 3.16.0-38-generic #52~14.04.1-Ubuntu
SMP Fri May 8 09:43:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

The above problem makes using this package not possible.

I do not know if this is a tex4ht bug or some of
python version issue or the minted related software such
as Pygments.

here is the MWE, from the above link:

--
\documentclass[11pt]{article}%ext
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage{minted}
\usepackage{upquote} %to fix string quotes
\setlength\parindent{0pt}
\begin{document}

\begin{minted}[linenos=false,fontfamily=tt,frame=leftline,
  showspaces=false,stripall=true,xleftmargin=0pt]{matlab}
clear all; close all;
t   = 0:0.05:50;
s   = tf('s');
sys = 1/(s^2+0.2*s+1);
\end{minted}
\end{document}
---

compile with

make4ht foo.tex "--shell-escape"

I get an extra space in HTML added.  (non-breaking space)
at start of each listing line.

Could someone please try this and see if they also get the extra space?

--Nasser