THIS IS NOT A DUPLICATE OF THE FOLLOWING ANSWERS!
I am writing an index using imakeidx package and I require of additional level into index: I tried to implement or use the solutions into the above linked answers but they do not work strangely so that I thought to put a specific question where I ask a solution pointing out the following items:
- I have to compile with XelaTeX or LualaTeX since I uploaded fontspec package;
- I use TeXstudio;
- I tried to switch to texindy executable without successful;
- I require the index must be divided (as into a dictionary) into "alphabetical" sections ordered by usual lexicographic (alphabetical) order.
So I tried to use the code below which use markup command but it does not work since it does not print the following nested sequence.
\index{Animal! Mammals! Primates! Humans}
Could someone help me, please?
MY ATTEMPT
\documentclass[10pt]{report}
\usepackage{imakeidx}
\usepackage{filecontents}
\begin{filecontents*}{index_style.ist}
headings_flag 1
(markup-locref :open "\hyperpage{" :close "}")
(markup-index :open "~n\begin{theindex}~n"
:close "~n\end{theindex}~n"
:tree
)
(markup-indexentry :open "~n \def\tedLevel{0} \item " :depth 0)
(markup-indexentry :open "~n \def\tedLevel{1} \subitem " :depth 1)
(markup-indexentry :open "~n \def\tedLevel{2} \subsubitem " :depth 2)
(markup-indexentry :open "~n \def\tedLevel{3} \subsubsubitem " :depth 3)
heading_prefix "\n\\large\\bfseries
\\normalfont\\noindent\\textbf{"heading_suffix "}\\par\\nopagebreak\n"
item_0 "\n \\item \\normalsize "
delim_0 " \\dotfill "
delim_1 " \\dotfill "
delim_2 " \\dotfill "
\end{filecontents*}
\makeatletter
\providecommand{\subsubsubitem}{@idxitem\hspace*{40\p@}}
\makeatother
\makeindex[title = Analytical index, columns = 2, columnseprule = true, options = -s index_style.ist, intoc = true]
\begin{document}
This is a Texts.
\index{Animal}
\index{Animal!Mammals}
\index{Animal!Mammals!Primates}
\index{Animal!Mammals!Primates!Humans}
\printindex
\end{document}
N.B.
If you need, here you can see my complete preamble.