4

I've to print an index of name. My code is the following one:

\usepackage{imakeidx}
\indexsetup{othercode=\footnotesize}
\makeindex[intoc=true,title=Indice dei nomi,columnsep=25pt]

However, when pages are a lot and the entry for a name request more than one line, I'd like to have a narrower indentation. I mean the result has to be NOT

    Smith, John, 1, 3, 5, 7, 9, 11,
                       16, 18, 29,
                       33, 42

BUT

Smith, John, 1, 3, 5, 7, 9, 11,
             16, 18, 29, 33, 42

How is it possible to reduce that indentation? thanx

user41063
  • 1,967
  • This is a rather question concerning the index style, not imakeidx. See idxlayout package for example. –  Jan 17 '15 at 19:54
  • Already tried, but unfortunately it seems not compatible with bidi, which I use. The .tex file compiles fine, but adding something as \usepackage[hangindent=1em]{idxlayout} I obtain: ! Package bidi Error: Oops! you have loaded package ragged2e after bidi package. Please load package ragged2e before bidi package, and then try to run xelatex on your document again. I'll try to produce a MWE – user41063 Jan 17 '15 at 19:58
  • The index item indent is controlled (at least in article.cls by the command \@idxitem –  Jan 17 '15 at 20:07

1 Answers1

4

The \@idxitem and \subitem, \subsubitem commands control the indentation of the index entries relative to the left margin.

The \subitem and \subsubitem commands use \@idxitem to indent further on.

The correct value depends on the OP's preferences.

\documentclass{article}

\usepackage{blindtext}

\usepackage{forloop}
\usepackage{imakeidx}
\indexsetup{othercode=\footnotesize}
\makeindex[intoc=true,title=Indice dei nomi,columnsep=25pt]




\begin{document}


\newcounter{loopcounter}

\forloop{loopcounter}{1}{\value{loopcounter} < 40}{%
\blindtext
\clearpage
\blindtext
\index{Brontosaurs}
\clearpage
}%
\makeatletter
\renewcommand{\@idxitem}{\par\hangindent 10\p@}
\makeatother
\printindex
\end{document}

enter image description here