I would like to build an a few Indices for a document that contain names in several languages. I understand from reading around that the way to go is imakeidx
and to use texindy
for the processing...since previous packages have problems with multiple indices and even ordering on foreign languages.
I got most of it working, except for one issue -- placing dots (ellipsis) between the end of the words and the page numbers.
I first tried man texindy
on a version 2.5.1 that comes with TL'20. That sends the reader to "The LaTeX Companion (2nd ed.)" of some 15 years ago ... so I got that. But that sends one to the web-site xindy.org and even after that I can't get a good hold on how to do this simple task -- fill the spaces between the end of the line and the page number with dots as in:
fruit ........ 7
apple .....11
banana ....13
I have been able to work it out all the way to:
\documentclass{article}
\usepackage{makeidx}
\makeindex
\let\lettergroup\textbf
\usepackage{filecontents}
\begin{document}
\begin{filecontents*}{mal-style.xdy}
(markup-index :open "\begin{theindex}~n"
:close "~n~n\end{theindex}~n"
:tree)
(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 ", ")
\end{filecontents*}
\index{premier niveau}
\index{niveau!1@premier}
\index{niveau!2@deuxième}
\index{niveau!1@premier!1@premier}
\index{niveau!1@premier!2@deuxième}
\index{étrangères}
\index{Ça va}
\index{À quelle}
\printindex
My first paragraph\ldots
\end{document}
which is a simplification of the code by @Mailipivo here texindy equivalence to makeindex settings.
It uses makeidx
and works fine and uses the Module to produce the dots unde xindy
, but I have not been able to move it to imakeidx
so I can use it for multiple indexes.
tocloft
package in the past for the index. And it seems to me the right choice if you want to add leading dots from the chapters to the pages. See this question (which yours is a duplicate of in my opinion): Changing the TOC style of an Article document-classxindy
are controlled by modules using the package language.. got nothing to do withtocloft
which is something I do not want to use in this project.makeidx
style that uses the dots and the equivalent intexindy
.. but I can't still make the relation in between the two due to the sorely missingxindy
documentation.