命名法有问题?

命名法有问题?

我正在尝试使用该nomencl软件包。我正在遵循此处提供的出色指南:

http://www.cs.brown.edu/system/software/latex/doc/nomencl.pdf

然而,尽管文档构建没有错误,我却无法让最基本的示例运行。这是基本示例:

\documentclass{article}
\usepackage{nomencl}
\makenomenclature
\begin{document}
\section*{Main equations}
\begin{equation}
a=\frac{N}{A}
\end{equation}%
\nomenclature{$a$}{The number of angels per unit area}%
\nomenclature{$N$}{The number of angels per needle point}%
\nomenclature{$A$}{The area of the needle point}%
The equation $\sigma = m a$%
\nomenclature{$\sigma$}{The total mass of angels per unit area}%
\nomenclature{$m$}{The mass of one angel}
follows easily.
\printnomenclature
\end{document}

当我创建此文档(使用 Texmaker 和 MikTex 2.9)时,我得到了一个包含方程式和文本的页面。没有显示任何错误或警告,它甚至创建了一个包含正确信息的“.nlo”文件。但没有命名法。

有人能想到我错过了什么或者应该尝试什么吗?

答案1

您发布的原始代码似乎也能正常工作,如果您运行pdflatex,然后makeindex,然后pdflatex再次运行。我已将您的示例复制并粘贴到名为 的文件中n.tex。然后,我做了

pdflatex n.tex
makeindex n.nlo -s nomencl.ist -o n.nls
pdflatex n.tex

而且它似乎有效。

您可能还想查看更新版本的文档(来自 CTAN 的文档): CTAN 上的软件包页面文档,链接自 CTAN

答案2

在 Windows 中,您应该在命令提示符中运行以下命令:

makeindex <filename>.glo  -s  nomencl.ist  -o <filename>.gls

(我认为.glo.gls可以代替.nlo.nls)。

要打开命令提示符,请转到Start Menu,键入cmd然后输入。使用cd <path>转到您的工作文件夹并键入命令。

为了使事情变得简单,我建议将nomencl.ist文件保存在工作文件夹中,以便makeindex命令可以找到它。

答案3

去:

  • 选项,
  • 配置 TeXmaker,

然后在 makeindex 框中添加

%.nlo -s 命名规范.ist -o %.els

到框中已有内容的末尾,以空格分隔。

我在 Windows 8.1 下使用 TeXmaker,这对我很有用,希望它有帮助。

答案4

Adrian 的答案对我有用,但设置不同。选项 > 配置 TeXmaker > 在 makeindex 框中:

makeindex %.idx %.nlo -s nomencl.ist -o %.nls

相关内容