![当符号列表位于外部文件中时,\nomname 未定义](https://linux22.com/image/336585/%E5%BD%93%E7%AC%A6%E5%8F%B7%E5%88%97%E8%A1%A8%E4%BD%8D%E4%BA%8E%E5%A4%96%E9%83%A8%E6%96%87%E4%BB%B6%E4%B8%AD%E6%97%B6%EF%BC%8C%5Cnomname%20%E6%9C%AA%E5%AE%9A%E4%B9%89.png)
我想使用该包在外部文件中创建符号列表nomencl
。我的文件如下所示listOfSymbols.tex
:
\renewcommand{\nomname}{List of Symbols}
\nomenclature{$v$}{volume fraction}
\nomenclature{$\nu$}{kinematic viscosity}
\nomenclature{$f$}{focal length}
\nomenclature{$h$}{Planck's constant}
\nomenclature{$c$}{speed of light}
\printnomenclature
主文档中的相关部分如下所示:
\documentclass{scrbook}
% Create nomenclatures.
\usepackage[acronyms]{glossaries}
\makeglossaries
\glsaddall
\begin{document}
\include{listOfSymbols}
\end{document}
但是,当我在 Texmaker 中编译它时,出现以下错误:! LaTeX Error: \nomname undefined.
有人能告诉我我做错了什么吗?我是 LaTeX 新手。
答案1
命令\nomname
、\nomenclature{}{}
和\printnomenclature
在包 中定义nomencl
。因此,您应该使用:
\usepackage{nomencl}
代替
\usepackage[acronyms]{glossaries}
在序言中。