如何為同一定義建立多個術語表條目?

如何為同一定義建立多個術語表條目?

當我有許多描述相同的術語時,如何將它們整齊地放入術語表中?理想情況下,類似:

\newglossaryentry{digest, hash, hash code} {
name=digest, description={The output of a hash function).}
}

生產

   消化,散列或者哈希碼哈希函數的輸出。

這就是我正在尋找的東西,但我似乎無法在任何地方找到它。

答案1

我將以通常的方式定義一個條目(例如摘要),然後\gls{digest}在替代條目的描述欄位中使用。看glossaries手冊第 8 節了解詳情。

\documentclass{article}

\usepackage[nonumberlist]{glossaries}
\makeglossaries

\newglossaryentry{digest}{name={digest (\textmd{also} hash, hash code)},%
    text=digest,description={The output of a hash function}}

\newglossaryentry{hash}
    {name=hash,description={\emph{See} \gls{digest}}}

\newglossaryentry{hash code}
    {name={hash code},description={\emph{See} \gls{digest}}}

\begin{document}

\null\vfill% just for the example

Some text about \gls{digest}.

Some text about \gls{hash}.

Some text about \gls{hash code}.

\printglossaries

\end{document}

在此輸入影像描述

相關內容