Latex:\printglossaries在 Mac 上无法工作?

3
我希望实现一个简单的词汇表。我有以下例子:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{glossaries}

\makeglossaries

\newglossaryentry{latex}
{
    name=latex,
    description={Is a mark up language specially suited 
    for scientific documents}
}

\newglossaryentry{maths}
{
    name=mathematics,
    description={Mathematics is what mathematicians do}
}

\title{How to create a glossary}
\author{ }
\date{ }

\begin{document}
\maketitle

The \Gls{latex} typesetting markup language is specially suitable 
for documents that include \gls{maths}. 

\clearpage

\printglossaries

\end{document}

我在Mac上使用TexPad。但是\printglossaries命令不起作用,我没有收到错误信息,也没有打印出词汇表。有人知道为什么吗?

这是我得到的.pdf文件:GlossariesTest.pdf


2
你可以在https://tex.stackexchange.com上尝试这个。在帖子中确保明确说明“不起作用”的具体情况。链接到PDF文件是可以的,但简单地说明发生了什么以及你期望的结果会更清晰和更快速。 - Robert
你是如何编译你的文档的?你发出了哪些命令序列? - Werner
1个回答

3
这个最简单的例子在我这里成功运行:

\documentclass{article}
\usepackage{glossaries}
\makenoidxglossaries
\newglossaryentry{latex}{
    name=latex,
    description={is a mark up language specially}
}
\begin{document}
The \Gls{latex} typesetting markup language.
\printnoidxglossaries
\end{document}

请注意,我使用了\makenoidxglossaries\printnoidxglossaries而不是\makeglossaries\printglossaries。如果我正确阅读了《Glossaries Beginner's Guide》第17页上的表1,您需要运行makeglossariesxindy或类似的命令才能使用您使用的这些命令。
使用这个输入:
\documentclass{article}
\usepackage{glossaries}
\makeglossaries
\newglossaryentry{latex}{
    name=latex,
    description={is a mark up language specially}
}
\begin{document}
The \Gls{latex} typesetting markup language.
\printglossaries
\end{document}

我需要运行pdflatex test.tex,然后运行makeglossaries test,再运行另一个pdflatex test.tex才能打印词汇表。


@JoeChampions 你具体尝试了什么,发生了什么事情,以及你本来期望发生什么?如果你想让我们帮助你,你需要比“不起作用”更具体。 - Robert
\printglossaries 不起作用。我无法在 .pdf 文件中看到词汇表。 - JoeChampions
@JoeChampions 对我来说没问题。你一定做错了什么。 - Robert

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接