\usepackage{polyglossia}
\setmainlanguage{esperanto}
I traced the problem to makeindex, which accepts only Latin-1 8-bit encoding. So I found out about xindy and its Latex wrapper texindy, and tried:
- ---------------------
$ texindy -L esperanto filename.idx
Opening logfile "/dev/null" (done)
Reading indexstyle...
Loading module "/tmp/7rb6Yof7sM"...
Loading module "lang/esperanto/latin3-lang.xdy"...
Loading module "lang/esperanto/latin3.xdy"...
Finished loading module "lang/esperanto/latin3.xdy".
Finished loading module "lang/esperanto/latin3-lang.xdy".
Loading module "tex/inputenc/latin.xdy"...
Error in line 4:
;; Generated from latin?.xdy
Binary
ERROR: EVAL: variable BINARY has no value
- --------------------
I don't understand the error messages.
It looks as if texindy is expecting Latin-3 rather than utf-8. (Latin-3 is the 8-bit encoding for Esperanto and Turkish).
I found this example (https://tex.stackexchange.com/questions/25623/how-to-use-xindy-with-xetex-luatex):
xindy -M texindy -C utf8 -L german-duden filename.idx
So I tried it for Esperanto and got:
- ----------------------
$ xindy -M texindy -C utf8 -L esperanto *.idx
Opening logfile "/dev/null" (done)
Reading indexstyle...
Loading module "/tmp/FxGCZvtV39"...
Loading module "lang/esperanto/utf8-lang.xdy"...
Loading module "lang/esperanto/utf8.xdy"...
Finished loading module "lang/esperanto/utf8.xdy".
Finished loading module "lang/esperanto/utf8-lang.xdy".
Loading module "texindy.xdy"...
Loading module "numeric-sort.xdy"...
Finished loading module "numeric-sort.xdy".
Loading module "latex.xdy"...
Loading module "tex.xdy"...
Finished loading module "tex.xdy".
Finished loading module "latex.xdy".
Loading module "latex-loc-fmts.xdy"...
Finished loading module "latex-loc-fmts.xdy".
Loading module "makeindex.xdy"...
Finished loading module "makeindex.xdy".
Loading module "latin-lettergroups.xdy"...
Finished loading module "latin-lettergroups.xdy".
Finished loading module "texindy.xdy".
Finished loading module "/tmp/FxGCZvtV39".
Finished reading indexstyle.
Finalizing indexstyle... (done)
Reading raw-index "/tmp/x51eOsF6o4"...
WARNING: unknown cross-reference-class `hyperindexformat'! (ignored)
WARNING: unknown cross-reference-class `hyperindexformat'! (ignored)
ERROR: CHAR: index 0 should be less than the length of the string
- ---------------------
I don't understand the warnings and the error message. I checked with my compilation in TexStudio and nothing had changed in the index.
I checked my declarations and compared with those in stackexchange:
- --------------------
\ifPDFTeX
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
% 2024-10-25 Added above line
\usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
\usepackage{unicode-math} % this also loads fontspec
\defaultfontfeatures{Scale=MatchLowercase}
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
\usepackage{makeidx}\makeindex
- ----------------------
I'm not sure about '\ifPDFTeX' – I couldn't see any reference to pdftex in the headers.
I'm using Xelex in TexStudio under Ubuntu.
I've tried following http://www.xindy.org/documentation.html , where it states "Documentation is one of our big problems in this project. If you are willing to give us a hand here, you're more than welcome". Perhaps that is a clue to my problem! There are too many subtleties I don't understand at this stage.
Any help would be appreciated!
Many thanks.
Ian