词汇表不会显示(无论我怎么尝试)

词汇表不会显示(无论我怎么尝试)

于是发生了最奇怪的事情。我设置了一个模板,它运行得很好。几天后,我重新加载文档,一切都是白色的。不知何故,我的词汇表不会显示(无论我怎么尝试)。我试图将所有内容减少到最低限度,但仍然得到没有词汇表的 PDF。它不应该这样工作,但我无论如何也找不到它这样做的原因。

我有两个文件,一个包含词汇表条目,另一个应该显示所有这些条目。

\documentclass[a4paper,11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[nonumberlist,acronym,toc,style=altlist]{glossaries}

\include{Glossar}

\begin{document}
\thispagestyle{empty}
Some text

\printglossary
\glsaddallunused
\end{document}

词汇表中还有如下条目:

\makeglossaries

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

\longnewglossaryentry{fishage}
{name={Fish Age}}
{%
A common name for the Devonian geologic period
spanning from the end of the Silurian Period to
the beginning of the Carboniferous Period.
This age was known for its remarkable variety of
fish species.
}

我以为代码再简单不过了,但还是没找到错误。请帮帮我。

答案1

尝试此设置:放入\makeglossaries你的序言,然后使用加载词汇表列表\loadglsentries{<file name>}

然后编译两次 + 运行 makeglossaries.exe + 再次编译即可出现列表。

A

\documentclass[a4paper,11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[nonumberlist,acronym,toc,style=altlist]{glossaries}

\makeglossaries % in the main document

\loadglsentries{gloss_list} % load glossaries

\begin{document}
    \thispagestyle{empty}
    Some text
    
    \printglossary
    \glsaddallunused
\end{document}

gloss_list.tex

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

\longnewglossaryentry{fishage}
{name={Fish Age}}
{%
    A common name for the Devonian geologic period
    spanning from the end of the Silurian Period to
    the beginning of the Carboniferous Period.
    This age was known for its remarkable variety of
    fish species.
}

相关内容