natbib 未使用 Overleaf 显示 myref.bib 书目页面

natbib 未使用 Overleaf 显示 myref.bib 书目页面

我正在处理一份复杂的论文文档,但我无法让我的参考页面显示任何内容。我正在 Overleaf 中进行编译。我也尝试过使用 biblatex,但没有成功。该项目是从此示例中复制而来,更改了相当多的内容,并且它使用了 biblatex(无法工作): https://www.overleaf.com/project/6255ab59c467eb2d8239750f

我的 main.tex 显示在这里:

\documentclass[a4paper,12pt,oneside]{uitmthesis}
\input{settings}
\begin{document}
\maketitle
\frontmatter
\theconfirmation
\input{frontmatter/frontAuthorsDeclaration}
\input{frontmatter/frontAbstract}
\input{frontmatter/frontAcknowledgement}

\tableofcontents
{%% Adding word 'Table' before each entry in list of tables
    \let\oldnumberline\numberline%
    \renewcommand{\numberline}{\tablename~\oldnumberline}%
    \listoftables%
}
{%% Adding word 'Figure' before each entry in list of figures
    \let\oldnumberline\numberline%
    \renewcommand{\numberline}{\figurename~\oldnumberline}%
    \listoffigures%
}
\input{frontmatter/listofsymbols}
\input{frontmatter/listofabbreviations}
\input{frontmatter/listofnomenclatures}

\mainmatter
\input{mainmatter/chapIntro}
\input{mainmatter/chapLiterature}
\input{mainmatter/chapMethodology}
\input{mainmatter/chapResults}
\input{mainmatter/chapConclusion}

\bibliography{myref}

\begin{appendix}
\appendixpage

% Remove Appendices from ToC. Important: Do not enable.
\addtocontents{toc}{\setcounter{tocdepth}{-1}}

\input{appendices/appData}
\end{appendix}
\end{document}

我的 settings.tex 在这里(任何注释 %me 的内容都是我对项目所做的添加):

\usepackage{lipsum}

\usepackage{multirow} % me
\usepackage{tabularx}  % me
\usepackage[table]{xcolor} % me

%% Mathematics related
\usepackage{amsmath,amsfonts,amssymb,amsthm}

\usepackage{pgfplots} % me
\pgfplotsset{width=10cm,compat=1.9} % me

\usepackage{tikz} % me
\usepackage[demo]{graphicx} % me
\usepackage{capt-of} % me
\usepackage{tabu} % me
\usepackage[dvipsnames]{xcolor} % me

%% Images
% define images locations.
\graphicspath{{mainmatter/images/},{appendices/images/}}
\usepackage{subcaption}

\usepackage{csquotes}

\usepackage[english]{babel} % me
\usepackage[square,numbers]{natbib} % me
\bibliographystyle{abbrvnat} % me


\usepackage{memhfixc} % add memhfixc to use hyperref package
\usepackage[bookmarksnumbered,bookmarksdepth=4,hidelinks,bookmarks=true,bookmarksopen=true]{hyperref}
\usepackage[numbered]{bookmark}

%==================================================================%
% Theorem, corollary, lemma, remark, definition, example, solution %
%==================================================================%
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{corollary}{Corollary}[theorem]
\newtheorem{lemma}[theorem]{Lemma}
%\theoremstyle{remark}
\newtheorem{remark}{Remark}[chapter]
\theoremstyle{definition}\newtheorem{definition}{Definition}[section]
\newtheorem{example}{Example}[chapter]
%% Solution environment
% from https://tex.stackexchange.com/a/19948/2405
\newenvironment{solution}{%
    \let\oldqedsymbol=\qedsymbol%
    \def\@addpunct##1{}%
    \renewcommand{\qedsymbol}{$\blacktriangleleft$}%
    \begin{proof}[\bfseries\upshape Solution]}%
    {\end{proof}%
    \renewcommand{\qedsymbol}{\oldqedsymbol}}
            
%====================================%
% Settings. Please edit accordingly. %
%====================================%
\title{title}
\author{MJ}
\date{June 2022}
\datesubmit{date submited} % viva date for postgraduate / submission date for FYP
\supervisor{Prof.}
\university{University}

\reportType{Thesis} % for postgraduate by research

\degreeAcronym{Honors BSc}

%% Programme
\programmeCode{CS952}\programme{Honors Bachelor of Science}\programmeT{Computer Science}

\gender{male}

%% MISC
\studentid{XXX}
\faculty{Faculty of Computer and Electrical Engineering}

%============================%
% PDF metadata with hyperref %
%============================%
\makeatletter
\hypersetup{
    pdfinfo={
        Title={\@title},
        Author={\@author},
    }
}
\makeatother

这是我的 myref.bib 文件,它与 main.tex 位于根目录中:

@article{einstein,
    author =       "Albert Einstein",
    title =        "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
        [{On} the electrodynamics of moving bodies]",
    journal =      "Annalen der Physik",
    volume =       "322",
    number =       "10",
    pages =        "891--921",
    year =         "1905",
    DOI =          "http://dx.doi.org/10.1002/andp.19053221004"
}

@book{latexcompanion,
    author    = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
    title     = "The \LaTeX\ Companion",
    year      = "1993",
    publisher = "Addison-Wesley",
    address   = "Reading, Massachusetts"
}

@misc{knuthwebsite,
    author    = "Donald Knuth",
    title     = "Knuth: Computers and Typesetting",
    url       = "http://www-cs-faculty.stanford.edu/\~{}uno/abcde.html"
}

当我编译时,没有明显的错误,参考文献页面只显示标题“参考文献”,因此它至少尝试编译并加载参考文献页面,但未能成功。

我认为该项目的任何其他信息都不相关,但如果您想在 Overleaf 上查看整个项目,我可以直接向您发送链接。

我认为这可能是包依赖或冲突问题,但我不确定。我在上面添加了链接的示例与参考资料配合得很好,但我可能编辑了很多东西,以至于项目不再能正确编译我的参考资料页面,我不确定。任何帮助都非常感谢!

相关内容