
Der Code
\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}
ergibt den Index:
Wie kann ich den Abstand (z. B. 5 pt, 10 pt, 12 pt usw.) zwischen AA und AAB bzw. zwischen AAB und AAC im Voraus festlegen?
Antwort1
Definieren Sie neu \@idxitem
, um etwas vertikalen Raum hinzuzufügen.
\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}