As a followup to htlatex, garamond fonts, and nulled "ff" and "fi" strings on getting ligatures working correctly with tex4ebook, I've managed to get ligatures to not be replaces with nulls, thanks to @michal.h21. The next problem is that I find that ligatures are inconsistent across devices. Viewing the html in Firefox (on Linux) and Aldiko (on Android), the ligatures are correct. But in Calibre (on Linux) there are individual letters instead of ligatures. The same goes for the epub converted to mobi and loaded in Kindle on Android or a Kindle Touch. According to what I find with Google, Kindles are indeed capable of generating ligatures.

So... How much of this is on tex4ebook, tex4ht, et al; and how much of this is on how the ebook reader is implemented?

1 Answer 1


The ligatures are decomposed to individual letters by default in tex4ebook, because is is better for accessibility and the support on all devices is not universal. It is up to the reading device then to render text and display it ligatured. You can use font which contains ligatures, as in this post. But I am not sure about Kindle's support for custom fonts, I am also sure that lot of Epub readers don't support that.

You can also suppress the ligature decomposition using -cunihtf option for tex4ht:

 tex4ebook -c config.file filename.tex "" "-cunihtf"

A sample html generated with this option:

<!--l. 39--><p class="noindent" >a string of text<br 
class="newline" />a &#xFB01;ne string of text<br 
class="newline" />a de&#xFB01;nition of an e&#xFB03;cient and &#xFB01;ne string of text<br 
class="newline" />&#xFB01;nally, the problem is solved!<br 
class="newline" />
  • -cunihtf does not work for me. tex4ebook complains about unrecognized parameter: n. Aug 25, 2019 at 1:02
  • @TorstenBronger you are right, this is a bug in tex4ebook. you can try to add a space before the argument, like " -cunihtf"
    – michal.h21
    Aug 25, 2019 at 9:54
  • Thank you but this seems to make trouble in conjunction with --xetex (wrong DVI file ending seems to be assumed). Aug 25, 2019 at 11:47
  • @TorstenBronger ah, another bug. both should be fixed in the development versions of tex4ebook and make4ht now. as a temporary workaround, you can try "-cunihtf -.xdv"
    – michal.h21
    Aug 25, 2019 at 16:58

You must log in to answer this question.

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