使用词汇表自定义索引中“参见......”部分的位置?

使用词汇表自定义索引中“参见......”部分的位置?

当我使用该glossaries包生成索引时,see条目的一部分会出现在页码后面的条目末尾。以下是 MWE:

\documentclass{article}

\usepackage{glossaries}
\usepackage{glossary-mcols}
\setglossarystyle{mcolindex}
\makeglossaries

\newglossaryentry{term}{name={technical term}, description=\nopostdesc,
  see={term2}}
\newglossaryentry{term2}{name={another term}, description=\nopostdesc}

\begin{document}
First occurrance of \gls{term}, second occurrance of \gls{term}.
First occurance of \gls{term2}.

\newpage

Third occurance of \gls{term}.

\newpage

More \glspl{term}.

\newpage

Even more \glspl{term}.

\printglossary

\end{document}

生成结果:

technical term    1-4, see another
        term

但我想得到:

technical term    1-4
     see another term

这可能实现吗?

答案1

您可以重新定义\glsseeformat,以便它转到新行

\renewcommand\glsseeformat[3][\seename]{%
  \\*% non breaking new line
  \emph{#1} \glsseelist{#2}%
}

完整示例:

\documentclass{article}

\usepackage{glossaries}
\usepackage{glossary-mcols}
\setglossarystyle{mcolindex}
\makeglossaries
\newglossaryentry{term}{name={technical term}, description=\nopostdesc,
  see={term2}}
\newglossaryentry{term2}{name={another term}, description=\nopostdesc}

\renewcommand\glsseeformat[3][\seename]{%
  \\*% non breaking new line
  \emph{#1} \glsseelist{#2}%
}
\begin{document}
First occurrance of \gls{term}, second occurrance of \gls{term}.
First occurance of \gls{term2}.

\newpage

Third occurance of \gls{term}.

\newpage

More \glspl{term}.

\newpage

Even more \glspl{term}.

\printglossary

\end{document}

在此处输入图片描述

相关内容