![词汇表-额外样式(文本和首字母缩略词列表)](https://linux22.com/image/436243/%E8%AF%8D%E6%B1%87%E8%A1%A8-%E9%A2%9D%E5%A4%96%E6%A0%B7%E5%BC%8F%EF%BC%88%E6%96%87%E6%9C%AC%E5%92%8C%E9%A6%96%E5%AD%97%E6%AF%8D%E7%BC%A9%E7%95%A5%E8%AF%8D%E5%88%97%E8%A1%A8%EF%BC%89.png)
当我将缩写词添加\setabbreviationstyle[acronym]{long-short}
到文档中时,这些缩写词不会显示为“计算机辅助设计 (CAD)”,而只是显示为“CAD”。此外,还会显示以下警告:
Abbreviation style has been switched (glossaries) for category `acronym', (glossaries) but there have already been entries (glossaries) defined for this category. Unwanted (glossaries) side-effects may result
并且,是否有可能让“首字母缩略词列表”将长版本列在一起,以便每个长条目的首字母都在垂直行上?
梅威瑟:
\documentclass{scrreprt}
\usepackage[acronym]{glossaries-extra}
\newacronym{ac:cad}{CAD}{Computer Aided Design}
\newacronym{ac:cax}{CAx}{Computer Aided x}
\setabbreviationstyle[acronym]{long-short}
\makeglossaries
\begin{document}
\gls{ac:cad} \gls{ac:cad} \gls{ac:cax} \gls{ac:cax}
\printglossary[type=\acronymtype]
\end{document}
答案1
通过对 MWE 进行以下更改,一切确实顺利进行:
\documentclass{scrreprt}
\usepackage[acronym]{glossaries-extra}
\makeglossaries % put makeglossaries first
\setabbreviationstyle[acronym]{long-short} % put serabbreviationstyle second
\newacronym{ac:cad}{CAD}{Computer Aided Design}
\newacronym{ac:cax}{CAx}{Computer Aided x}
%\setabbreviationstyle[acronym]{long-short}
%\makeglossaries
\begin{document}
\gls{ac:cad} \gls{ac:cad} \gls{ac:cax} \gls{ac:cax}
\printglossary[style=super, type=\acronymtype] % added style "super"
\end{document}