我希望仅在第一次使用命令时使用不同的缩写形式\gls
。例如,请考虑以下文档:
\documentclass{article}
\usepackage{glossaries-extra}
\setabbreviationstyle{short-long}
\newabbreviation{cots}{COTS}{COTS, do inglês, \textit{Commercial Off-the-Shelf}}
\begin{document}
First use: \gls{cots}
Second use: \gls{cots}.
\end{document}
先感谢您。
PS:缩写形式仍为“COTS”很重要,因为它应该以这种方式出现在缩写列表中。
答案1
用此代码。
\documentclass{article}
%\setabbreviationstyle{short-long}
\usepackage[nopostdot,nogroupskip,nonumberlist]{glossaries-extra}
%\newabbreviation{cots}{COTS}{COTS, do inglês, \textit{Commercial Off-the-Shelf}}
\newglossaryentry{cots}{
name={COTS},
description={do inglês, \textit{Commercial Off-the-Shelf}},
first={componentes de prateleira (COTS, do inglês, \textit{Commercial Off-the-Shelf})},
text={COTS},
}
\makeglossaries
\begin{document}
First use: \gls{cots}
Second use: \gls{cots}.
\glsaddall
\printglossary
\end{document}