\documentclass{article}
\usepackage[automake=immediate,symbols,nogroupskip,style=index]{glossaries}
\makeglossaries
\newglossaryentry{parent}{name={\ensuremath{x_i}}, description={this is an entry}}
\newglossaryentry{child1}{name={\ensuremath{x_1}}, parent={parent}, description={this is an entry}}
\newglossaryentry{child2}{name={\ensuremath{x_2}}, parent={parent}, description={this is an entry}}
\begin{document}
I have an indexed parent abbreviation \gls{parent} on the first page.
\clearpage
I have two children \gls{child1} and \gls{child2} on the second page.
\printglossaries
\end{document}
我得到了一个看起来像的词汇表
我想让其余文本保持当前状态,并且在字典中只有一行,其中包含父级的描述以及父级和其所有子级的出现,即
xi 这是一个条目。1,2