我以前使用由 Mendeley 生成的 Latex 中的 bibtex 文件进行引用时没有遇到任何问题。现在,突然当我想引用我之前没有引用过的参考文献时,我收到警告“第 XX 页上的引用未定义”。当我想引用我之前在文档中引用过的参考文献时,它可以正常工作...我不知道出了什么问题?我还使用 Mendeley 更新了 bibtex 文件并再次启动了 Latex,但这没有帮助。
因此我的 .bib 文件如下所示
@article{Meyer2016,
author = {Meyer, Thomas},
doi = {10.3390/microorganisms4030025},
file = {:C$\backslash$:/Users/thais/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Meyer - 2016 - Diagnostic Procedures to Detect Chlamydia trachomatis Infections.pdf:pdf},
keywords = {amplification tests,cervicitis,chlamydia trachomatis,enzyme immunoassay,line assay,lymphogranuloma,non gonococcal urethritis,pelvic inflammatory disease,rapid diagnostic test},
title = {{Diagnostic Procedures to Detect Chlamydia trachomatis Infections}},
year = {2016}
}
我的主文档如下所示:
\documentclass[a4,11pt,english,twoside,openany]{book}
% online:
%\documentclass[a4,11pt,dutch,oneside,openany]{book}
\pdfoptionpdfminorversion=5
% over the course of making multiple documents, I have acquired a fairly long list of packages that I am using/loading. Probably not all of them are necessary for most documents. You can comment-out useless packages with %.
%% PACKAGES FOR LANGUAGE STUFF %%
\usepackage[latin1,utf8]{inputenc} % The package translates various standard and other input encodings into a 'LaTeX internal language'. Allows you to type certain characters directly (eg. é, ©, £, ß, ...)
\usepackage[english]{babel} % Controls hyphenation. Use this when you use another language than English
\input{hyphenation.tex} % This file should be in the same folder as your main .tex document. You can add hyphenations here in case the default is not included or wrong. Primarily useful for non-Enlish docs
%% PACKAGES FOR LAYOUT AND WRITING%%
\usepackage{hyperref} % For hyperlinks in the PDF
\usepackage[times]{quotchap} % Decorative chapter headings. A package for creating decorative chapter headings with quotations
\usepackage[sumlimits]{amsmath} % AMS mathematical facilities for LaTeX
\usepackage{amsthm} % Typesetting theorems (AMS style)
\usepackage[vlined,ruled]{algorithm2e} % Algorithm2e is an environment for writing algorithms
\usepackage{verbatim} % write latex code in your pdf
\usepackage{float} % Controls floats
\usepackage[a4paper,verbose, centering,reversemp]{geometry} % Adjust page dimensions
\usepackage{fancyhdr} % Extensive control of page headers and footers
\usepackage{times} % Select Adobe Times Roman (or equivalent) as default font
\usepackage{wrapfig} % Allows figures or tables to have text wrapped around them.
\usepackage{floatflt} % Wrap text around floats
\usepackage[round]{natbib} % om author-year citation te maken
\usepackage{xcolor} % Driver-independent color extensions for LaTeX
\usepackage{multicol} % Multicol defines a multicols environment which typesets text in multiple columns
\usepackage{graphicx} % steering the \importgraphics command
%\usepackage[version=3]{mhchem} % The mhchem package provides commands for typesetting chemical molecular formulae and equations.
\usepackage{enumitem} % provides user control over the layout of the three basic list environments: enumerate, itemize and description
\usepackage[nottoc,numbib]{tocbibind} % add bibliography to toc
\usepackage[calcwidth,newparttoc]{titlesec} % A package providing an interface to sectioning commands for selection from various title styles
\usepackage[osf]{mathpazo} % 'o'ld 's'tyle 'f'igures are used in the manual, but you can leave this away, of course.
\usepackage{siunitx}
\usepackage{isotope} %isotope benoemen \isotope[18]{O}
\usepackage{newtxtext,newtxmath,amsmath} %for perthousand sign
\usepackage{amsmath} %label equations
\usepackage{nomencl} %forabbrevations
\makenomenclature
\usepackage{glossaries}
\makeglossaries
\usepackage{incgraph,tikz}
\usepackage{afterpage}
\usepackage{pdfpages}
\usepackage[table,xcdraw]{xcolor}
%refer to multiple figures:
%\usepackage[colorlinks]{hyperref}
\usepackage[nameinlink]{cleveref}
\Crefname{figure}{Fig.}{Figs.}
\newcommand\crefrangeconjunction{--}
%abbreviations
\newlist{abbrv}{itemize}{1}
\setlist[abbrv,1]{label=,labelwidth=1in,align=parleft,itemsep=0.1\baselineskip,leftmargin=!}
%% PACKAGES FOR TABLES %%
\usepackage{booktabs,tabularx} % fancy, scientific-looking tables
\newcolumntype{Y}{>{\centering\arraybackslash}X} % own definitions for columns in tables
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} % own definitions for columns in tables
\usepackage{multirow} % Create tabular cells spanning multiple rows
\usepackage{hhline} % The command \hhline produces a line like \hline, or a double line like \hline\hline, except for its interaction with vertical lines.
\usepackage{caption} %font={small},labelfont={bf},center
\captionsetup{justification=raggedright,singlelinecheck=false,textfont={small},textfont=it,labelfont={bf,it}} % define the settings of your captioning of figures and tables
\usepackage{lscape} % landscape for tables etc.
\usepackage{longtable}
\usepackage{pdflscape}
\usepackage{graphicx}
%% OTHER PACKAGES
\usepackage{datetime} % for the date/time of today on the version timestamp
\usepackage{pdfpages} % if you want to insert pdf in your document
\usepackage{gensymb} %om graden bolletje te kunnen doen
\usepackage{amssymb,listings,color,textcomp,marvosym,flafter,longtable,subcaption,amsfonts,rotating}
\usepackage{array,pstricks,listings}
\definecolor{chaptergray}{rgb}{0.85,0.85,0.85}
\parskip=\medskipamount
\DeclareGraphicsExtensions{jpg,png}
\input{page_layout_definition} % This command will load the page_layout_definition file, which defines the general layout for this document. Credits for this fi
% In the preamble, you can also define your own extra commands:
%---------------------------------------------------------------------------
% Short version commando to introduce figures.
%---------------------------------------------------------------------------
%\mijnfiguur[H]{width=5cm}{bestandsnaam}{Het bijschrift bij deze figuur}{label}
\newcommand{\mijnfiguur}[5][ht]{ % Het eerste argument is standaar `ht'.
\begin{figure}[#1] % Beginnen van de figure omgeving
\begin{center} % Beginnen van de center omgeving
\includegraphics[#2]{#3} % Het eigenlijk invoegen van de figuur (2: opties, 3: bestandsnaam)
\end{center}
\caption{#4} % Het bijschrift (argument 4) en het label (argument 5)
\label{#5}
\end{figure}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% now everything is set to start writing. Let's begin the document:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\selectlanguage{english} %kies hier je taal
\lstset{language=Matlab,commentstyle=, framexleftmargin=5mm,belowcaptionskip=5mm,
frame=single,basicstyle={\ttfamily\small},
stringstyle=\small,commentstyle=\textcolor[rgb]{0.53,0.53,0.53},
backgroundcolor=\color[rgb]{0.93,0.93,0.93},showspaces=false,framexleftmargin=-2pt,showstringspaces=false,upquote=true}
\frontmatter
\includepdf[pages=-]{Voorblad.pdf}
\thispagestyle{empty} % insert your title page called 'Titelpagina.tex'
\newpage\mbox{}\newpage
\inputencoding{latin1}
\include{Copyright} % insert your copyright called 'Copyright.tex'
\newpage\mbox{}\newpage
\inputencoding{utf8}
\include{Voorwoord}
\tableofcontents
%\listoffigures
%\listoftables
%\newpage\mbox{}\newpage
\include{Abbreviations}
\include{Abstract}
\include{Samenvatting}
\include{Introduction}
\mainmatter % Here you can insert blocks of text, chapters, etc....
\include{Chapter1}
\frontmatter
\include{Objectives}
\include{Corona}
\mainmatter
\include{Chapter2}
\include{Chapter3}
\include{Chapter4}
% \include{chapter6}
% \include{chapter7}
% \include{chapter8}
\let\secfnt\undefined
\newfont{\secfnt}{ptmb8t at 9pt}
\bibliographystyle{abbrvnat}
\bibliography{library}
\include{Appendix}
´%\begin{figure} [ht]
% \begin{center}
% \includegraphics[width=\linewidth]{Figuren/lianen2.pdf}
% \end{center}
% \caption{Fitting of the \texorpdfstring{g\textsubscript{s}}{gs}-VPD data of liana leaves %with a linear (yellow), logarithmic (blue) and exponential (green) regression.}
% \label{fig:lianen2}
%\end{figure}
\end{document}
这就是我在文中引用的方式:(第 1 章)
The technique that is used for detection is determined by the type of samples that are available \citep{Sachse2009}. The methodologies and techniques that are currently used for the diagnosis of chlamydial infections will be discussed below \citep{Meyer2016}.
出现的不是引用,而是一个问号……
我希望有人能帮助我!