我确信我的参考是正确的,但我收到错误包 natbib 警告引用未定义

我确信我的参考是正确的,但我收到错误包 natbib 警告引用未定义

这是该部分,无效的引用是 EDEL。

\chapter{Literature Review} 
 
\section{Humpback Whale Biomimicry}

... \cite{Edel1978} ... \cite{Li2020} ...

这是在参考书目文件中条目的定义方式:

@article{Edel1978,
   author = {R. K. Edel and H. E. Winn},
   doi = {10.1007/BF00397155},
   issn = {0025-3162},
   issue = {3},
   journal = {Marine Biology},
   pages = {279-287},
   title = {Observations on underwater locomotion and flipper 
      movement of the humpback whale Megaptera novaeangliae},
   volume = {48},
   year = {1978},
}

答案1

显示的代码中没有错误,我在每个阶段都显示了终端输出(从您的代码片段中制作出可用示例之后)


dd978.tex

\documentclass{book}
\usepackage{natbib}

\begin{document}
\chapter{Literature Review} 
 
\section{Humpback Whale Biomimicry}

... \cite{Edel1978}  ...

\bibliographystyle{plainnat}
\bibliography{xbib}
\end{document}

参考书目

@article{Edel1978,
   author = {R. K. Edel and H. E. Winn},
   doi = {10.1007/BF00397155},
   issn = {0025-3162},
   issue = {3},
   journal = {Marine Biology},
   pages = {279-287},
   title = {Observations on underwater locomotion and flipper 
      movement of the humpback whale Megaptera novaeangliae},
   volume = {48},
   year = {1978},
}

pdflatex dd978

Package natbib Warning: Citation `Edel1978' on page 1 undefined on input line 9
.

No file dd978.bbl.

Package natbib Warning: There were undefined citations.

bibtex dd978

This is BibTeX, Version 0.99d (TeX Live 2023)
The top-level auxiliary file: dd978.aux
The style file: plainnat.bst
Database file #1: xbib.bib

pdflatex dd978

Package natbib Warning: Citation `Edel1978' on page 1 undefined on input line 9
.

(./dd978.bbl [1{/usr/local/texlive/2023/texmf-var/fonts/map/pdftex/updmap/pdfte
x.map}] [2])

Package natbib Warning: There were undefined citations.

[3] (./dd978.aux

Package natbib Warning: Citation(s) may have changed.
(natbib)                Rerun to get citations correct.

pdflatex dd978

Output written on dd978.pdf (3 pages, 57128 bytes).
Transcript written on dd978.log.

在此处输入图片描述

答案2

你说你想根据 APA6 或 APA7 指南来格式化书目条目。因此,我建议你不是使用natbib引文管理包。

要获得符合 APA6 指南的格式,请使用引文管理包(如果您希望使用和,apacite则带有选项)和参考书目样式。(要获得符合 APA7 指南的格式,您需要切换到 biblatex/biber。)natbibapa\citet\citepapacite

并且,请务必再运行 LaTeX、BibTeX 和 LaTeX 两次,以便完全传播任何更改。

在此处输入图片描述

\documentclass{article} % or {book}

\begin{filecontents}[overwrite]{xbib.bib}
@article{Edel1978,
   author = {R. K. Edel and H. E. Winn},
   doi = {10.1007/BF00397155},
   issn = {0025-3162},
   issue = {3},
   journal = {Marine Biology},
   pages = {279--287},
   title = {Observations on underwater locomotion and flipper 
      movement of the humpback whale {Megaptera} novaeangliae},
   volume = {48},
   year = {1978},
}
\end{filecontents}

\usepackage[natbibapa]{apacite}
\bibliographystyle{apacite}

\usepackage{xurl}
\usepackage[colorlinks,allcolors=blue]{hyperref} % optional
\hyphenation{novae-angliae mega-ptera}

\begin{document}
 
\section{Humpback whale biomimicry}

\dots\ \citet{Edel1978} \dots

\bibliography{xbib}
\end{document}

相关内容