TeX - LaTeX Asked by TeX Apprentice on October 22, 2020
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
letlettergrouptextbf
usepackage{filecontents}
begin{document}
begin{filecontents*}{mal-style.xdy}
(markup-index :open "begin{theindex}~n"
:close "~n~nend{theindex}~n"
:tree)
(markup-indexentry :open "~nitem " :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 paragraphldots
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.
I was finally able to get the right combination with:
documentclass{article}
usepackage[xindy]{imakeidx}
makeindex[name=std, title=Remissivo]
makeindex[name=not, title=Notações]
letlettergrouptextbf
begin{document}
My first paragraphldots
index[std]{premier niveau}
index[std]{niveau!1@premier}
index[std]{niveau!2@deuxième}
index[std]{niveau!1@premier!1@premier}
index[std]{niveau!1@premier!2@deuxième}
index[std]{étrangères}
index[std]{Ça va}
index[std]{À quelle}
index[not]{premier niveau}
index[not]{niveau!1@premier}
index[not]{niveau!2@deuxième}
index[not]{niveau!1@premier!1@premier}
index[not]{niveau!1@premier!2@deuxième}
index[not]{étrangères}
index[not]{Ça va}
index[not]{À quelle}
printindex[std]
printindex[not]
end{document}
and using the module:
(markup-index :open "begin{theindex}~n"
:close "~n~nend{theindex}~n"
:tree)
(markup-indexentry :open "~nitem " :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 ", ")
with the sequence of commands:
xelatex file
texindy -C utf8 -L french -M mal-style std.idx
texindy -C utf8 -L french -M mal-style not.idx
xelatex file
Answered by TeX Apprentice on October 22, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP