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?


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" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.