[tex4ht] Image processing error: max_count exceeded error from make4ht

Nasser M. Abbasi nma at 12000.org
Thu Dec 31 13:04:10 CET 2015


Hello;

I am building a large latex file with lots of images included
using includegraphics. Over 500 svg images.

I am getting these errors from make4ht on this one latex file:

-----------------------------------------
......
Make4ht: dvisvgm -v1 -n -c 1.15,1.15 -p 1- index.idv
DVI error: undefined font number 35
Make4ht: tex4ht  -cunihtf -utf8 index can be executed only 1x
Make4ht: t4ht  -p index.dvi can be executed only 1x
Parse LG
mv index-002.svg in2x.svg
mv index-004.svg in3x.svg
mv index-005.svg in4x.svg
mv index-006.svg in5x.svg
.......
mv index-115.svg in100x.svg
mv index-116.svg in101x.svg
Image processing error: max_count exceeded
Image processing error: max_count exceeded
Image processing error: max_count exceeded
....
Image processing error: max_count exceeded
Image processing error: max_count exceeded
parse_lg process file: index.htm
outdir:
parse_lg process file: index.css
outdir:
---------------------------------------------

The error comes from main.mk that I am using. Here is the full
listing of main.mk4:

---------------------------
Make:add("dvisvgm","dvisvgm -v1 -n -c 1.15,1.15 -p 1- ${input}.idv")
Make:htlatex {packages = "\\RequirePackage[dvipdfmx]{graphicx}"}
local max_count = 5
local image_format = "${input}-${zeroes}${page}.${ext}"
local oneimage_format = "${input}.${ext}"


local function file_exists(fn)
   local f = io.open(fn,"r")
   if f ==  nil then return false else f:close() return true end
end

local function locate_file(par,ext, count)
   local count = count or 0
   par.ext = ext
   local zeroes = string.rep("0",count)
   par.zeroes = zeroes
   if count > max_count then
		local one = oneimage_format % par
		if file_exists(one) then
			return one
		else
		  return false, "max_count exceeded"
		end
	end
   local fn = image_format % par
   if file_exists(fn) then
     return fn
   else
     return locate_file(par, ext, count+1)
   end
end

Make:htlatex{}
Make:htlatex{}
Make:htlatex{}
Make:tex4ht{}
Make:t4ht{}

Make:dvisvgm{}
Make:image("svg$",function(arg)
    arg.input = arg.source:gsub(".idv$","")
    local fn,msg = locate_file(arg, "svg")
    if not fn then
      print("Image processing error: "..msg)
    else
      arg.filename = fn
      local cmd = "mv ${filename} ${output}" % arg
      print(cmd)
      os.execute(cmd)
    end
  end
)
----------------------------------------

I've changed the hardcoded number in the above file
from 5 to 10, but that did not help. Still get same error.

I am build the latex file using the same command I've always used:

make4ht --lua -u -c ~/nma.cfg -e ~/main.mk4 filename.tex "htm,3,pic-align,notoc*"

Question is:  How to fix this error? Do I need to change
something in main.mk4?

ps. I am also getting

     DVI error: undefined font number 35

which I never saw before. But this is I do not think it is related
to this max_count exceeded error. I think problem with dvisvgm.

If I do not find what is causing this DVI error, will send separate
email on it. I did not  want to mix the issues in one email.

TL 2015, fresh update.

thanks,
--Nasser







More information about the tex4ht mailing list