![缩写文本中的命令 - makeglossaries 错误](https://linux22.com/image/375842/%E7%BC%A9%E5%86%99%E6%96%87%E6%9C%AC%E4%B8%AD%E7%9A%84%E5%91%BD%E4%BB%A4%20-%20makeglossaries%20%E9%94%99%E8%AF%AF.png)
我定义了以下缩写词:
%% 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}