我定义了以下缩写词:
%% ACRONYM CONFIG
\usepackage[xindy,nonumberlist,nomain,acronym,nopostdot,toc=false]{glossaries}
\renewcommand*{\glsclearpage}{} % remove the unwanted blank page
\usepackage{glossary-mcols} % two column
\renewcommand*{\glspostdescription}{} % no dots
\makeglossaries
\glsaddall
\newacronym{I2C}{I\textsuperscript{2}C}{Inter-Integrated Circuit}
\newacronym{I2S}{I\textsuperscript{2}S}{Inter-IC Sound}
makeglossaries thesis
打印以下错误:
WARNING: Would replace complete index key by empty string, ignoring
#<ordrule-regexp: '\\[a-zA-Z@]+ *' => '' :again NIL :only-at-start NIL>
**Warning:**
Sort key required for entries only containing command names.
Attempting to determine which entries have problem sort keys.
Parsing 'thesis.acn'
2 problematic entries found:
Label: 'I2C'. Sort value : 'I2C'
(Try adding sort={I2C} to the definition.)
Label: 'I2S'. Sort value : 'I2S'
(Try adding sort={I2S} to the definition.)
这sort={I2S}
部分内容看起来就像您在词汇表条目中使用的内容,但我有首字母缩略词。我应该把它放在哪里?
我尝试了以下操作,但没有任何效果:
\newacronym[sort={I2C}]{I2C}{I\textsuperscript{2}C}{Inter-Integrated Circuit}
\newacronym[sort={I2S}]{I2S}{I\textsuperscript{2}S}{Inter-IC Sound}
答案1
好吧,这很奇怪,但解决方案是删除 .acn、.acr 和 .xdy 文件,重新运行 pdflatex,重新运行 makeglossaries(现在没问题),然后再次运行 pdflatex
我不明白发生了什么,但是现在它可以起作用了。
看起来这是正确的:
\newacronym[sort={I2C}]{I2C}{I\textsuperscript{2}C}{Inter-Integrated Circuit}
\newacronym[sort={I2S}]{I2S}{I\textsuperscript{2}S}{Inter-IC Sound}