词汇表未显示

词汇表未显示

我正在尝试创建一个包含词汇表和参考书目的简单文档。我基本上合并了两个在线示例(我对 Latex 完全陌生)。首先,我创建了词汇表,一切运行正常。然后,当我添加参考书目时,我的词汇表消失了。知道为什么以及如何修复它吗?我正在 Overleaf 中工作,此代码没有出现任何错误。

\documentclass[12pt]{article}
    \usepackage[utf8x]{inputenc}
    \usepackage[round]{natbib}
    \usepackage[T1]{fontenc}
    % glossary
    \usepackage[xindy]{glossaries} 
    \input{glossary}
    \makeglossaries

\title{LaTeX Bibliography Example: The natbib Package}
\author{writeLaTeX}

\begin{document}
\maketitle

Here are some natbib examples. You can cite examples using the citation key \citep{TM83} in your .bib file. (On writeLaTeX, you can access the .bib file via the Project menu.) There are commands for in-text citations, like \citet{GMP81}. And you can pass an option to specify additional details, such as a page or chapter number, as an option \citep[p. 130]{Ful83}.

\printglossaries

% To change the title from References to Bibliography:
\newpage
\renewcommand\refname{Bibliography}
\bibliographystyle{unsrtnat} % or try abbrvnat or unsrtnat
\bibliography{example} % refers to example.bib

\end{document}

相关内容