
私は、glossaries
頭字語やその他のいくつかのリストを追跡するために を使用しています。しかし、 を使用して\acf
完全な頭字語を印刷したい状況に遭遇しました。また、後続のコマンドでは説明が繰り返されるべきではありません\ac
。デフォルトでは、\acf
最初に を使用すると、 の最初の出現で、\ac
Test Acronym (TA) などの頭字語全体が再び印刷されます。
具体的には、description
いくつかの用語を紹介するリストを作成し、完全な頭字語がラベルに含まれていることを確認したいと思っています。
\documentclass{scrreprt}
\usepackage[xindy, shortcuts]{glossaries}
\newacronym{TA}{TA}{Test Acronym}
\makeglossaries
\begin{document}
\printglossary[type=\acronymtype]
\begin{description}
\item[\acf{TA}] This is an explanation of the item…
The first use flag should be set after this!
But it does!, and will display Test Acronym (TA) again… Which is not intended!
\end{description}
When using \ac{TA} here like this, it should not reproduce the entire entry again.
\printglossary
\end{document}
したがって、最初の使用フラグを手動で設定/強制するにはどうすればいいですか、またはこの問題を回避できますか?
答え1
パッケージ glossaries は、すべてのエントリに対してブール フラグを定義します。呼び出すと、\ac
ブール フラグが true に設定されます。つまり、次回はエントリが使用されたことがわかります。
このフラグを手動で設定するには、パッケージにコマンドが用意されています\glsunset
。
ドキュメントの 105 ページ (glossaries-user.pdf) にコマンドの説明があります。
およびそれらの大文字の変形を使用する場合
\gls,
\glspl
、用語集エントリをすでに使用している場合でも、最初のキーで指定された値を使用する必要がある場合があります。逆に、用語集エントリを使用していない場合でも、テキスト キーで指定された値を使用する必要がある場合があります。前者は、次のコマンドのいずれかによって実現できます。...
後者は、次のコマンドのいずれかによって実現できます。
\glsunset{⟨label⟩}
あなたの例に関連して、次のことを行ってください:
\documentclass{scrreprt}
\usepackage[xindy, shortcuts]{glossaries}
\newacronym{TA}{TA}{Test Acronym}
\makeglossaries
\begin{document}
\printglossary[type=\acronymtype]
\begin{description}
\item[\acf{TA}\glsunset{TA}] This is an explanation of the item…
The first use flag should be set after this!
But it does!, and will display Test Acronym (TA) again… Which is not intended!
\end{description}
When using \ac{TA} here like this, it should not reproduce the entire entry again.
\printglossary
\end{document}