词汇表错误,*4col 样式

词汇表错误,*4col 样式

我想打印出一个带有符号的命名法(即变量-定义-符号形式)。以下是 MWE

\documentclass[11pt,onecolumn,draft,a4paper]{book} 
\usepackage{longtable}
\usepackage{makeidx}
\usepackage[acronym, toc, section, shortcuts, nopostdot, nogroupskip]{glossaries} 
\usepackage{glossary-long}
\newglossary[slg]{symbols}{syi}{syg}{Nomenclature}
\newglossary[ilg]{indices}{iyi}{iyg}{List of indices}
\makeglossaries

\newacronym{ECD}{ECD}{equivalent circuit diagram}
\newacronym{RES}{RES}{renewable energy source}
\newglossaryentry{Rx1}
{
  name={\ensuremath{R_{x1}}},
  description={Equivalent series resistance},
  symbol={\ensuremath{\Ohm}},
  sort=Rx1, type=symbols
}
\newglossaryentry{ref}
{
  name={*},
  description={Indicates reference value},
  sort=ref, type=indices
}

\begin{document}
\glsaddall        
\printglossary[type=\acronymtype, style=long, title=List of Abbreviations and Acronyms]
\vspace{40pt}  
\printglossary[type=symbols, style=long4col, title=Nomenclature]
\vspace{40pt}  
\printglossary[type=indices, style=long, title=List of indices]
\end{document}

错误是:

! Undefined control sequence.
<argument> \Ohm
l.5 ...etentrycounter[]{page}\glsnumberformat{1}}}
%
The control sequence at the end of the top line
of your error message was never \def'ed... BLA-BLA-BLA

它只出现在 4cols 样式中,我需要其中一种样式来打印出符号列。我也完全不明白这个错误。顺便说一句,它不会出现在 *3col 样式中。

答案1

正如@NicolaTalbot 上面提到的,\Ohm 不是符号。我需要改用 symbol={\ensuremath{\Omega}}。抱歉,昨天晚上我实在太累了,没注意到这一点。但可能还是有人会犯同样的愚蠢错误,所以我保留这个问题(并关闭它)。

相关内容