I'm currently using makeindex to generate an index and was advised by @egreg to use xindy instead to properly manage accents in French. However, I can't find how to reproduce my current settings:

\makeindex[title={Index th\'ematique},intoc,options=-r -s thematique.ist,columns=2]

I then use \themeindex in my text.

thematique.ist contains:

% Dotfill style
headings_flag 1
heading_prefix "\\hfill\{\\dayheadfont\\large\\textbf- "
heading_suffix " -\}\\hfill\\nopagebreak\\vspace\{0.5\\baselineskip\}"
delim_0 "\\dotfill "
delim_1 "\\dotfill "
delim_2 "\\dotfill "
item_0 "\n \\item\\raggedright "
item_1 "\n \\subitem\\raggedleft "

How can I achieve the same with xindy?

  • 1
    This requires going deeply in the manual of Xindy. If it existed. :( – egreg Jun 11 '13 at 21:12
  • Is xindy that old? And if it is old and good, why don't people use it more? – raphink Jun 11 '13 at 21:13
  • It's a rather old project, but it lacks documentation. And still has a few problems, unfortunately, in UTF-8 support. – egreg Jun 11 '13 at 21:14

It was quite difficult to accomplish this task without a full MWE or a preview of index at hand. I tried that anyway and this is an example of an index with French words. I run these commands:

lualatex mal-xindy-style.tex
xindy -M texindy -C utf8 -L french -M mal-makeindex-style mal-xindy-style.idx
lualatex mal-xindy-style.tex

If we change \usepackage{luatextra} to inputenc (for pdflatex) or to fontspec (for xelatex), this example will be displaying letters with diacritics in those formats.

%! lualatex mal-xindy-style.tex
\usepackage{luatextra} % Use inputenc with pdflatex or fontspec with xelatex to achieve proper displaying of letters with diacritics.
\usepackage[hyperindex=false, colorlinks]{hyperref}
\makeindex %[title={Index th\'ematique}, intoc, options=-r -s thematique.ist,columns=2]
\font\dayheadfont=cmr10 %at 12pt
  \centering\begingroup\dayheadfont\large\bfseries-- }
\def\myheadingend{ --\endgroup\nopagebreak\vspace{0.5\baselineskip}\par\raggedright}

% An original file for makeindex...
% Dotfill style
headings_flag 1
heading_prefix "\\myheadingstart "
heading_suffix " \\myheadingend "
delim_0 "\\dotfill "
delim_1 "\\dotfill "
delim_2 "\\dotfill "
item_0 "\n \\item\\raggedright "
item_1 "\n \\subitem\\raggedleft "

% A style file for xindy...
(markup-index :open  "\begin{theindex}~n"
    :close "~n~n\end{theindex}~n"

(markup-letter-group :open-head "~n\mallettergroup{" :close-head "}%")
(markup-letter-group-list :sep "~n~n\indexspace~n")

(markup-indexentry :open "~n\item " :close "" :depth 0)
(markup-indexentry :open "~n  \subitem " :close "" :depth 1)
(markup-indexentry :open "~n    \subsubitem " :close "" :depth 2)
(markup-locclass-list :open "\dotfill " :sep ", " :close "")
(markup-locref-list   :sep ", ")

(define-attributes (("malindex")) )
(markup-locref :attr "malindex" :open "\malindex{" :close "}")
(markup-locref :attr "hyperpage" :open "\hyperpage{" :close "}")
(markup-locref :attr "default" :open "\hyperpage{" :close "}")

\index{premier niveau}
\index{Ça va}
\index{À quelle}

% I wish not to have page number in index.
\def\indexname{Index thématique}%
My first paragraph\ldots


  • I believe you when you say this took some figuring! I'm even linking and commenting in my source code (not that it wouldn't be obvious this snippet was above my head). The only adjustment and possible contribution was that since I'm using imakeidx and texindy, I cleaned up the things to remember at compile time by moving the language arguments into the xdy file itself (in my case (require "lang/turkish/utf8-lang.xdy") and used makeindex[options=-M filename.xdy]. Compiling is then simplified to just running lualatex. Thanks for working out this snippet! – Caleb May 10 '14 at 7:32
  • @Caleb It's good to hear it's working for you after some adjustments! – Malipivo May 10 '14 at 8:07
  • Could something have changed over the last few years? When I run the second command I get the error message: xindy: input file mal-xindy-style.idx does not exist at /usr/local/texlive/2020/bin/x86_64-linux/xindy line 547. under TeXLive'20 – TeX Apprentice Oct 18 '20 at 3:45
  • @TeXApprentice: It works fine for me. Just had to replace -C UTF8 by -C urtf8. Did you name the tex file as mal-xindy-style.tex? – Sergei Golovan Oct 18 '20 at 6:49
  • 1
    @Malipivo, the command should use lowercase -C utf8. Would you edit your answer? – TeX Apprentice Oct 18 '20 at 20:39

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.