I'm trying to make an ebook, on windows 7 sp1, with both italian and cyrillic (and chinese in future).

Minimum example with LuaTeX, Version 1.12.0 (MiKTeX 20.11):

\setmainfont{Dejavu Serif}
\setmonofont{Courier New}




Compiling with lualatex.exe works fine:

Compiling with lualatex.exe works fine:

but it does not with:

C:\PATH>tex4ebook.exe -l .\file.tex "html5,charset=utf-8" " -cunihtf -utf8"

that gives:

Bad result in ebook

The problem is already there in the html file.

I have also tried the command without the options, i.e. C:\PATH>tex4ebook.exe -l .\file.tex.

The same apply with pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 20.11), C:\PATH>tex4ebook.exe .\file.tex and:


This example misses the cyrillic hen compiled with lualatex, but does not solve the accents problem either:

Worst problem

Thanks a lot.

  • I started there with no success. Nov 25, 2020 at 23:27
  • What TeX distribution do you use? I can compile your first example using TL 2020.
    – michal.h21
    Nov 25, 2020 at 23:29
  • The second example works when you switch T1 and T2A encodings: \usepackage[T2A,T1]{fontenc}
    – michal.h21
    Nov 25, 2020 at 23:31
  • 1
    I tried your starting example and converted it in a current, up-to-date miktex with tex4ebook -l -t ebook.tex. This worked without problem. A current Calibre shows all the accented chars, and the html file is ok too. Can you put your output files somewhere for inspection? Nov 26, 2020 at 8:21
  • 1
    I can confirm that the Epub file you shared has a wrong encoding, but I cannot reproduce it with your TeX file when I compile it using tex4ebook -l LaProfeziaRotschild.tex. Maybe you have an older version of TeX4ht, tex4ebook or LuaXML somewhere in your local TEXMF tree?
    – michal.h21
    Nov 26, 2020 at 14:33

1 Answer 1


I solved updating in MikTex console like in the following:

A few updates

Nothing very old, but something needed a repair. I don't know what the exact problem was.

Not the answer you're looking for? Browse other questions tagged .