如何将标题下的所有索引条目水平划分为段落

如何将标题下的所有索引条目水平划分为段落

考虑一下代码

\documentclass{article}
\usepackage{imakeidx}
\makeindex
\usepackage{idxlayout}
\usepackage{xcolor}

\begin{document}
\Large

Some words.\index{Heading@\textbf{Heading}! 1. This is the first index entry.}
\newpage Some more words.\index{Heading@\textbf{Heading}! 2. This is the second index entry.}
\newpage Some more words.\index{Heading@\textbf{Heading}! 3. This is the third index entry.}\index{Heading@\textbf{Heading}! 4. This is the fourth index entry.}
\newpage Some more words.\index{Heading@\textbf{Heading}! 5. This is the fifth index entry; Moreover, I would like all of these five entries to appear within a single paragraph under the heading with the same indentation as displayed.}
\idxlayout{columns=1}
\printindex
\end{document}

生成索引:

在此处输入图片描述

问题:我怎样才能将给定标题下的所有索引条目水平列为段落,而不是像图中所示那样垂直列出?我用 编译代码lualatex

谢谢。

答案1

这是你想要的吗?

A

使用\usepackage[itemlayout= singlepar]{idxlayout}

相关内容