词汇表-额外样式(文本和首字母缩略词列表)

词汇表-额外样式(文本和首字母缩略词列表)

当我将缩写词添加\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}

相关内容