【问题标题】:Latex/Miktex: Undefined citationsLatex/Miktex:未定义的引用
【发布时间】:2020-04-08 08:26:13
【问题描述】:

我正在为我的工作编写一个乳胶脚本,但在获取 PDF 中的参考资料时遇到了无限麻烦。我的代码如下所示,我在 RStudio 上使用 MikTex 2.9。一些可能相关的背景信息:

  • 我正在使用 Mendeley 作为我的参考文献,我已正确设置(看起来)以启用 bibtex 同步
  • .bib 文件对我来说似乎并不奇怪(Irungu 在下面添加)
  • 我使用的脚本与我的同事完全相同(除了引用我的文章的路径不同),他们在将其编译成 pdf 时没有任何问题。
  • 关于引用的错误是: 引文 Draganovic2013 第 1 页未定义输入行 xx 第 1 页的引文 Irungu2019 在输入行 xx 上未定义 有未定义的引用

我希望你们中的一个能够帮助我! 干杯!

@article{Irungu2019,
abstract = {A composite blend consisting of sunflower cake, maize germ, wheat bran, fresh water shrimps and cassava flour was extruded using a single-screw extruder to produce expanded fish feed pellets. The effects of temperature (80–120 °C), die diameter (2–4 mm), and feed pre-conditioning time (50–150 s; steam 400 kPa) on properties of the pellets (expansion ratio, bulk density, floatability, durability, water absorption, water solubility, water stability, and in-vitro protein digestibility) were investigated using response surface methodology. Regression equations describing the effect of each variable on the product responses were obtained. The pellets extruded using a factor combination of 120 °C extruder barrel temperature, 2 mm die diameter, and 100 s of feed pre-conditioning time gave most desirable pellet floatability (100{\%}), durability index (99{\%}), expansion ratio (2.64), water absorption index (4.12), water solubility index (9.31), water stability (87{\%}), bulk density (479 g/L), and in vitro protein digestibility (69.97{\%}) with a composite desirability of 0.88. Practical applications: Extrusion is a modern feed processing method whose use is fast gaining popularity among small feed processors in developing countries. However, extrusion is a process that involves many parameters that need to be optimized for desirable end properties. These findings guide fish feed manufacturers on the optimum conditions for single screw extruders for production of feeds with desirable properties especially for the fish types that are top feeders. In addition, the results offer important insights on how temperature, die diameter, and feed pre-conditioning, may be manipulated to influence properties of extruded aquafeed when using simple low-cost small-scale extruders.},
author = {Irungu, Francis Gichuho and Mutungi, Christopher and Faraj, Abdul and Affognon, Hippolyte and Ekesi, Sunday and Nakimbugwe, Dorothy and Fiaboe, Komi K.M.},
doi = {10.1111/jfpe.12980},
file = {:L$\backslash$:/Marjanne/ScientificArticles/Irungu2019.pdf:pdf},
issn = {17454530},
journal = {Journal of Food Process Engineering},
number = {2},
pages = {1--12},
title = {{Optimization of extruder cooking conditions for the manufacture of fish feeds using response surface methodology}},
volume = {42},
year = {2019}
}
\documentclass[10pt,a4paper]{article}
\usepackage{etoolbox}
\usepackage{mathpazo}
\renewcommand{\sfdefault}{lmss}
\renewcommand{\ttdefault}{lmtt}
\usepackage{geometry}
\usepackage[usenames,dvipsnames]{xcolor}
% \geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2.5cm,rmargin=2.5cm}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2.5cm,rmargin=2.5cm}
\usepackage[margin=10pt,font=small,labelfont=bf,labelsep=colon]{caption}
\usepackage{amstext}
%% \usepackage{esint}
\usepackage[english]{babel}
\usepackage{eurosym}
\usepackage{booktabs}
\usepackage[parfill]{parskip}
\usepackage[round]{natbib}
%\usepackage{caption}
\usepackage{pdfpages}
\usepackage[figuresright]{rotating}
\usepackage{longtable}
\usepackage[version=4]{mhchem}
\usepackage{todonotes}
\usepackage{hyperref}
\usepackage{subfig}
\usepackage{array}
\usepackage{float}
\usepackage{lipsum}
\usepackage{lastpage}
\usetikzlibrary{patterns}
\usetikzlibrary{shapes.geometric}
\usepackage{textcomp}


\begin{document}


\title[Title of Document]

\begin{document}

\begin{titlepage}
\maketitle
\end{titlepage}

\section {Introduction}
Introduction is written here, but not relevant for this question.


\section {Background} 
Here I write some text and refer to an article of Draganovic from 2013 \citep{Draganovic2013}. \\
In another section, I would like to refer to Irungu from 2019 \citep{Irungu2019}.\\
Current project will investigate the possibilities to re-evaluate Sustainable Fiber Technology's Wheat Straw Co-Product, by using it as a (partial) replacement of wheat gluten and/or starch in aquafeed. Being relatively high in lignin (20 - 40\% based on 30 - 50\% solids), the product is a potential excellent binder.

\section {Rest of the document}

Doesn't pose any significant errors.

 \bibliographystyle{plainnat}
 \bibliography{C://Users/Marjanne/Documents/April8/library}




\end{document}

【问题讨论】:

  • 我投票结束这个问题,因为它属于 tex.stackexchange.com

标签: latex bibtex miktex


【解决方案1】:

我对这个 LaTeX 代码没有任何问题(即使我使用的是 Mac):无论如何,您的代码中存在一些问题:

  • 标题为\title[Title of Document] 而不是\title{Title of Document}
  • 有2个\begin{document}:不知道是不是你这里复制代码的时候打错了

您确定 .bib 文件的路径正确吗?我建议只写\bibliography{library} 并将library.bib 文件放在您正在处理的tex 文件的同一目录中。

此外,请查看https://tex.stackexchange.com/,了解有关 Tex、LaTeX 的问题。

编辑:确保您使用

编译您的 tex 文件
  • pdflatex(或latex
  • bibtex
  • pdflatex(或latex
  • pdflatex(或latex

【讨论】:

  • 您好 Eddymage,感谢您的回复!其他人(例如您和我的同事)能够运行脚本确实很奇怪,而我却无法运行其中包含参考/库的任何内容...按照您的建议,我更改了标题部分并删除了开始的错字文档,但它仍然没有工作......您更改路径的建议也没有:(如果我的 MikTex 的配置可能有错误,您有任何线索吗?谢谢!
  • 亲爱的@Marjanne,您是否使用 PdfLatex -> BibLatex -> PdfLatex -> PdfLatex 进行编译?我的意思是,你必须用 pdflatex 编译你的文本文件,然后你必须运行 biblatex,然后再次运行 pdflatex,两次。
  • 嗨@Eddymage,再次感谢!我以前看过你提出的解决方案,但老实说,我不知道如何在 Rstudio 中使用 MikTex 开始这个序列......我有编译 PDF 选项,我也可以为我的 tex 文件运行它,但我很困惑如何运行 BibLatex。你有什么想法吗?
  • 其实我不使用 Rstudio,但我发现了这个,也许它可以帮助:support.rstudio.com/hc/en-us/articles/…。我的建议是使用另一个编辑器来编译 tex 文件(例如 TexMaker)。你的同事也用 Rstudio 编译tex 文件吗?
  • 不幸的是(在这种情况下对我来说),他们确实使用 RStudio...奇怪的是他们可以运行我的脚本(就像你一样)并运行他们自己的脚本,但我不是能够运行其中包含引用的任何脚本,也不是其中一个可以毫无问题地运行...
【解决方案2】:

首先运行 pdflatex "file" -interaction=nonstopmode 然后 比伯“文件” 然后再一次 pdflatex“文件”-interaction=nonstopmode

应该有效

【讨论】:

  • OP 没有使用 biblatex。您的工作流程不适用于传统的 bibtex 文档。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-08-23
  • 1970-01-01
  • 2020-04-02
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多