\citet 即使使用 natbib 包也无法工作

\citet 即使使用 natbib 包也无法工作

我正在尝试使用\citet命令但出现此错误:

Package natbib Error: Bibliography not compatible with author-year citations.
(natbib)                Press <return> to continue in numerical citation style.
See the natbib package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                            
l.385 ...and\NAT@force@numbers{}\NAT@force@numbers                    
Check the bibliography entries for non-compliant syntax,
or select author-year BibTeX style, e.g. plainnat

我在网上找到一些解决方案,建议更改文档样式或文档类型。不幸的是,我无法应用此类解决方案,因为我遵循特定的模板。

这是我的代码:

\documentclass[11pt,a4paper,twoside,openright,notitlepage]{report}

\usepackage{subfiles}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{soul}
\usepackage{xcolor}   %May be necessary if you want to color links
\usepackage{hyperref}
\hypersetup{
    colorlinks=true, %set true if you want colored links
    linktoc=all,     %set to all if you want both sections and subsections linked
    linkcolor=blue,  %choose some color if you want links to stand out
    citecolor=blue,
    filecolor=blue,
    linkcolor=blue,
    urlcolor=blue,
}

\usepackage{booktabs}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{natbib} %citep
\usepackage{enumitem}
\usepackage{multirow}
\usepackage{textgreek}

\pagestyle{plain}
%ruotare le scritte nelle tabelle es. \rot{60}{\textit{Stylistic}} 
\def\rot{\rotatebox}
\hypersetup{linktocpage}
\renewcommand{\thesection}{\thechapter.\number\numexpr\value{section}\relax}
\renewcommand{\thesubsection}{\thesection.\number\numexpr\value{subsection}\relax}
\renewcommand{\thesubsubsection}{\thesubsection.\number\numexpr\value{subsubsection}\relax}
\setcounter{secnumdepth}{3}
\setcounter{chapter}{0}% Not using chapters, but they're used in the counters





\begin{document}
\setcode{utf8}

\pagenumbering{gobble}
\titleUPV

\input{chapters/abstract}



\pagenumbering{roman}
\listoffigures
\listoftables
\pagebreak
\tableofcontents
\thispagestyle{empty}
\pagebreak
\pagenumbering{arabic}



\chapter{Introduction}
\input{chapters/chapter1}



\part{chapter2 title}
    \chapter{chapter2}
    % \input{chapters/chapter2}

%\clearpage
\newpage
\pagenumbering{roman}

\bibliographystyle{myplain}
\bibliography{main}

\end{document}

相关内容