[tex4ht] imakeidx index question

"Jürgen Hubert" jhubert at gmx.de
Sun Jan 26 08:48:42 CET 2020

Hello Michal,

> I should update make4ht in distributions soon, I've fixed lot of bugs
> since the last release. Meanwhile, you can try this updated version of
> mybuild.mk4:
> ------------------------
> if mode=="index" then
> Make:htlatex {}
> Make:htlatex {} -- run htlatex againg to get correct links in index
> Make:xindy {idxfile="place.idx", indfile="place.ind"}
> Make:xindy {idxfile="topic.idx", indfile="topic.ind"}
> Make:htlatex {}
> Make:htlatex {}
> elseif mode=="draft" then
> Make:htlatex {}
> else
> Make:htlatex {}
> Make:htlatex {}
> Make:htlatex {}
> end
> ------------------------
> It passes explicit names of the generated .ind files.

It does do that. Unfortunately, while both .ind files exist, the index entries have a value of "0" instead of the proper subsubsection...


But maybe we should wait until the updated package becomes available before we try to solve this - it's probably not the best use of your time to try and come up with temporary fixes for an issue that isn't all that urgent right now.   ;)

On a somewhat linked note, the previous version of mybuild.mk4 had some xindy-related code you recommended to me:


Make:add("xindy", function(par)
  par.idxfile = par.idxfile or par.input .. ".idx"
  local modules = par.modules or {par.input}
  local t = {}
  for k,v in ipairs(modules) do
    t[#t+1] = "-M ".. v
  par.moduleopt = table.concat(t, " ")
  local xindy_call = "xindy -L ${language} -C ${encoding} ${moduleopt}
${idxfile}" % par
  return os.execute(xindy_call)
end, { language = "english", encoding = "utf8"})

While it is not necessary for compiling the epub file, pdflatex doesn't work without it (and I need to compile PDFs as well from the base .tex files). Is it okay if I just leave it in (it's not included in these test files right now), or does it interfere with the epub compiling process?

Best regards,

- Jürgen

More information about the tex4ht mailing list.