[翻译] [LaTeX] There were undefined references

142 篇文章 4 订阅
53 篇文章 2 订阅

原  文:There were undefined references
译  者:Xovee
翻译时间:2020年6月2日

There were undefined references

当你使用命令 \ref{...},但是 LaTeX 找不到对应的标签的时候,这个错误就会出现。出错有以下三种可能:

  • \label{...} 中你可能打错了字
  • \ref{...} 中你可能打错了字
  • 你可能忘记了添加标签 label

下面展示了一个例子:

\section{introduction}\label{introduction}
A typo when referencing the introduction would be \ref{intorduction}.

Another error is referencing a label which has never been defined such as \ref{section1}

这三种错误的报错方式如下:

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

为了避免这个错误,我们在使用 \ref{...} 命令的时候,必须要确保对应的 \label{...} 是存在的,并且这两个命令的参数是一致的。

If you are using LaTeX and you encounter the error message "There were undefined references" when compiling your document, it means that you have cited a reference in your text that LaTeX does not recognize. Here are some possible reasons for this error and how to fix them: 1. You have not included the necessary bibliography file in your document. To fix this, make sure that you have included the correct bibliography file in your LaTeX document using the "\bibliography" command. For example: ``` \bibliography{mybibfile} ``` 2. You have misspelled the citation key or reference label. Check that you have spelled the citation key or reference label correctly in both the text and the bibliography file. 3. You have not included the citation key or reference label in the bibliography file. Make sure that you have included all the necessary citation keys or reference labels in the bibliography file. 4. You have not compiled your document with BibTeX or Biber. BibTeX or Biber is a separate program that processes your bibliography file and generates the necessary references for your document. To fix this, make sure that you have run BibTeX or Biber after compiling your LaTeX document. For example: ``` pdflatex mydocument.tex bibtex mydocument pdflatex mydocument.tex pdflatex mydocument.tex ``` Make sure to run BibTeX or Biber after the first compilation of your document, so that it can generate the necessary references for subsequent compilations. By following these steps, you should be able to fix the "There were undefined references" error in your LaTeX document.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值