我在 Linux 18.04 上使用 TexMaker,但项目的引用存在问题。我的项目位于不同的文件夹中,所有包都列在序言中。我在 JabRef 中编写了 bib 文件,并将其保存在名为 tsample.bib 的目录中。
当我编译 main.tex 文件时,PDF 中出现一个空的参考文献部分,文中引用了 [?,p.]
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[nottoc]{tocbibind}
\usepackage[square,numbers]{natbib}
\bibliographystyle{abbrvnat}
\title{Bibliography: \texttt{natbib} package}
\author{Minimal Working Example}
\begin{document}
\maketitle
\tableofcontents
\section{First Section}
This document is an example of \texttt{natbib} package. Three items are cited: \textit{The \LaTeX\ Companion} book \cite{latexcompanion}, the Einstein journal paper \citet{einstein}, and the Donald Knuth's website \cite{knuthwebsite}. The \LaTeX\ related items are \cite{latexcompanion,knuthwebsite}.
\medskip
%Imports the bibliography file "sample.bib"
\bibliography{sample}
\end{document}