I am trying to create a Marathi ebook using the packages Polyglossia an tex4ebook. Following is the MWE I prepared following the instructions from @michal.h21 (which were given to produce the MWE that had merely the text and they worked well, thanks to Michal):
\documentclass{article}
%Setting Marathi as main language and Shobhika as main font using package Polyglossia.
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage[numerals=devanagari]{marathi}
\setmainfont[Script=Devanagari, Mapping=devanagarinumerals]{Shobhika}
\newfontfamily\marathifont[Script=Devanagari, Mapping=devanagarinumerals]{Shobhika}
%Index detail
\usepackage{imakeidx}
\makeindex[name=Art,title={लेखांची सूची},intoc]
\makeindex[intoc]
\begin{document}
\author{रोहित दिलीप होळकर}
\title{मराठी ई-पुस्तक}
\maketitle
\tableofcontents
\section{ई-बुक}
टेक्-४-ई-बुक पॅकेज वापरून मराठी इ-पुस्तके बनवणे.
\section{सूचीकरीता लिखाण}
मी टेक्-४-ई-बुक पॅकेज \index[Art]{पुस्तक! ई-पुस्तक} वापरून पुस्तक\index{पुस्तक} बनवण्याचा प्रयत्न करीत आहे.
\printindex
\printindex[Art]
\end{document}
% Local Variables:
% TeX-engine: xetex
% End:
This produces a desired output when XeLaTeX is used--- the default index is title "सूची" and the other one "लेखांची सूची". If Hyperref is used, hyperlinks are produced. However, this does not work perfectly when tex4ebook -x "tex-file" is used. Following five are the issues:
- Devanagari ligatures do not work for the author-name in
\maketitlecommand, see the image below:
- When I use Pandoc to prepare ebooks, table of contents is created in the left top corner close to the book icon. That does not happen with tex4book. I find the toc that pandoc creates more useful for ebooks. Compare the following screenshot (of the ebook prepared using Pandoc) with the one in 1 above:
Moreover, the intocparameter for\makeindexdoes not make the indexes appear in the toc. - As per my knowledge, the preamble I have written is sufficient to use Devanagari numerals in the document if (Xe)LaTeX is used. However, tex4ebook uses Arabic numerals for sections as well as page-numbers. See the screenshot below and the next point:

- XeLaTeX titles the index as "सूची" for language Marathi. The other index which I have made using package
imakeidxcomes appropriately title when XeLaTeX is used. However, tex4ebooks does not title any of the indexes at all. See the screenshot:
- Finally, tex4ebook did not create hyperlinks even after using package
hyperref.
I am not used to TeX or developmental issues but I use LaTeX decently. Following this discussion that Michal sent me, I created imakeidx.4ht file in the directory /usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/. (It may sound stupid, however,) I also tried replacing contents of idxmake.4ht by the one discussed in the answer of above discussion. However, it did not work out.
An answer, with possibly, step-by-step instructions, and some explanation will be useful. A general explanation of using imakeidx with Polyglossia for non-latin script shall be welcome! Thanks in advance!
Note: \setmainlanguage{marathi} might not work; in that case use sanskrit or hindi as the language, and ignore the index names that could appear in English. FYI, I am using MacTeX 2018.





tex4ebookandtex4ht, so it will take more time than I expected. – michal.h21 May 04 '18 at 11:33tex4htfor Unicode support in the preamble. It fixes the issue with missing labels for table of contents and similar. The update should be available in TL in few days. – michal.h21 May 08 '18 at 11:17