Latex/Miktex:未定义的引用

Mar*_*nne 6 latex miktex bibtex

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

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

我希望你们中的一位能够帮助我!\n干杯!

\n\n
@article{Irungu2019,\nabstract = {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\xe2\x80\x93120 \xc2\xb0C), die diameter (2\xe2\x80\x934 mm), and feed pre-conditioning time (50\xe2\x80\x93150 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 \xc2\xb0C 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.},\nauthor = {Irungu, Francis Gichuho and Mutungi, Christopher and Faraj, Abdul and Affognon, Hippolyte and Ekesi, Sunday and Nakimbugwe, Dorothy and Fiaboe, Komi K.M.},\ndoi = {10.1111/jfpe.12980},\nfile = {:L$\\backslash$:/Marjanne/ScientificArticles/Irungu2019.pdf:pdf},\nissn = {17454530},\njournal = {Journal of Food Process Engineering},\nnumber = {2},\npages = {1--12},\ntitle = {{Optimization of extruder cooking conditions for the manufacture of fish feeds using response surface methodology}},\nvolume = {42},\nyear = {2019}\n}\n
Run Code Online (Sandbox Code Playgroud)\n\n
\\documentclass[10pt,a4paper]{article}\n\\usepackage{etoolbox}\n\\usepackage{mathpazo}\n\\renewcommand{\\sfdefault}{lmss}\n\\renewcommand{\\ttdefault}{lmtt}\n\\usepackage{geometry}\n\\usepackage[usenames,dvipsnames]{xcolor}\n% \\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2.5cm,rmargin=2.5cm}\n\\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2.5cm,rmargin=2.5cm}\n\\usepackage[margin=10pt,font=small,labelfont=bf,labelsep=colon]{caption}\n\\usepackage{amstext}\n%% \\usepackage{esint}\n\\usepackage[english]{babel}\n\\usepackage{eurosym}\n\\usepackage{booktabs}\n\\usepackage[parfill]{parskip}\n\\usepackage[round]{natbib}\n%\\usepackage{caption}\n\\usepackage{pdfpages}\n\\usepackage[figuresright]{rotating}\n\\usepackage{longtable}\n\\usepackage[version=4]{mhchem}\n\\usepackage{todonotes}\n\\usepackage{hyperref}\n\\usepackage{subfig}\n\\usepackage{array}\n\\usepackage{float}\n\\usepackage{lipsum}\n\\usepackage{lastpage}\n\\usetikzlibrary{patterns}\n\\usetikzlibrary{shapes.geometric}\n\\usepackage{textcomp}\n\n\n\\begin{document}\n\n\n\\title[Title of Document]\n\n\\begin{document}\n\n\\begin{titlepage}\n\\maketitle\n\\end{titlepage}\n\n\\section {Introduction}\nIntroduction is written here, but not relevant for this question.\n\n\n\\section {Background} \nHere I write some text and refer to an article of Draganovic from 2013 \\citep{Draganovic2013}. \\\\\nIn another section, I would like to refer to Irungu from 2019 \\citep{Irungu2019}.\\\\\nCurrent 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.\n\n\\section {Rest of the document}\n\nDoesn't pose any significant errors.\n\n \\bibliographystyle{plainnat}\n \\bibliography{C://Users/Marjanne/Documents/April8/library}\n\n\n\n\n\\end{document}\n
Run Code Online (Sandbox Code Playgroud)\n

Edd*_*age 4

我对这个 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