
Код
\documentclass{book}
\usepackage{imakeidx}
\let\cleardoublepage\clearpage
\makeindex
\usepackage[itemlayout=singlepar]{idxlayout}
\begin{document}
\LARGE
This is the first paragraph.\index{AA! first}\index{AA! second}\index{AA! third}
This is the second paragraph.\index{AAB! an entry}
This is the third paragraph.\index{AAC! another entry}
\idxlayout{columns=1}
\printindex
\end{document}
создает индекс:
Как я могу заранее указать разрыв (например, 5pt, 10pt, 12pt и т. д.) между AA и AAB; между AAB и AAC?
решение1
Переопределите \@idxitem
, чтобы добавить немного вертикального пространства.
\documentclass{book}
\usepackage{imakeidx}
\usepackage[itemlayout=singlepar]{idxlayout}
\makeindex
\makeatletter
\renewcommand{\@idxitem}{\par\addvspace{\medskipamount}\hangindent40\p@}
\makeatother
\begin{document}
This is the first paragraph.\index{AA! first}\index{AA! second}\index{AA! third}
This is the second paragraph.\index{AAB! an entry}
This is the third paragraph.\index{AAC! another entry}
\idxlayout{columns=1}
\printindex
\end{document}