[tex4ht] index with tex4ht
Michal Hoftich
michal.h21 at gmail.com
Sun Jan 31 22:59:28 CET 2021
Dear Tomáš,
That answer is quite old, I am afraid. Indexing support is now built in
in make4ht. See this answer:
https://tex.stackexchange.com/a/543759/2891
I can compile your file using the following .mk4 file:
Make:htlatex {}
Make:xindy {language="czech"}
Make:htlatex {}
Xindy has built in Czech support, so it sorts index correctly.
Best regards,
Michal
> I am trying to make use of index. While the procedure seems to be
>rather straightforward (I created *.mk4 according to https://tex.stackexchange.com/questions/284577/tex4ht-problem-with-index-compilation),
>the index only works well with latin-1 character encoding. When using
>utf-8, I only got strange characters in the output.
>
>With the debug mode I found the sequence that is called by make4ht:
>
>htlatex muj_index.tex; tex '\def\filename{{muj_index}{idx}{4dx}{ind}}
>\input idxmake.4ht'; makeindex -o muj_index.ind muj_index.4dx;
>htlatex muj_index.tex ; .....
>
>I found that the first-created index file (muj_index.idx) is still ok
>(coded in utf-8), but the others (*.4dx, *.ind) are already corrupted.
>So, I translated the idx-file to TeX sequence with (cstocs utf8 tex
>....) and ran the remaining machinery of make4ht. This approach gave
>me correct character encoding in the Index in the HTML, but the
>sorting is bad.... Maybe I could sort the ind file manually in the
>end, I did not try yet....
>
>So, can someone advice me an appropriate approach of using index with
>tex4ht, please? A small example is attached.
>
>Thanks a lot for any hint.
>
More information about the tex4ht
mailing list.