LaTeX(Overleaf)说引用 eq1 和 eq:2 未定义,但它们显然是正常的。
我这里遗漏了什么?提供了 MWE。谢谢!
\documentclass[twocolumn,book,showpacs,%
nofootinbib,aps,superscriptaddress,%
eqsecnum,prd,notitlepage,showkeys,10pt]{revtex4-1}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{dcolumn}
\usepackage{hyperref}
\usepackage{biblatex}
\usepackage[utf8]{inputenc}
\usepackage{dirtytalk}
\usepackage{chngcntr}
\usepackage[bottom]{footmisc}
\addbibresource{references.bib}
\usepackage{fancyhdr}
\renewcommand\headrulewidth{0pt}
\pagestyle{fancy}
\fancyhead[RE,RO]{}
\fancyhead[LE,LO]{}
\begin{document}
\title{Test}
\author{Test}
\affiliation{[email protected]}
\begin{abstract}
In this work...
\end{abstract}
\maketitle
\section{Introduction}
As stated in \eqref{eq1}:
\begin{equation}
a+b \label{eq1}
\end{equation}
Equation \eqref{eq:2} states that
\begin{equation}
\label{eq:2}
b + c = x
\end{equation}
\end{document}
答案1
看起来你投入了太多东西......这个简化的代码有效:
%\documentclass[twocolumn,book,showpacs, nofootinbib,aps,superscriptaddress, eqsecnum,prd,notitlepage,showkeys,10pt]{revtex4-1}
\documentclass[10pt]{article}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{dcolumn}
\usepackage{hyperref}
\usepackage{biblatex}
\usepackage[utf8]{inputenc}
%\usepackage{dirtytalk}
%\usepackage{chngcntr}
%\usepackage[bottom]{footmisc}
%\addbibresource{references.bib}
\usepackage{fancyhdr}
\renewcommand\headrulewidth{0pt}
\pagestyle{fancy}
\fancyhead[RE,RO]{}
\fancyhead[LE,LO]{}
\begin{document}
\title{Test}
\author{Test}
%\affiliation{[email protected]}
\begin{abstract}
In this work...
\end{abstract}
\maketitle
\section{Introduction}
As stated in \eqref{eq1}:
\begin{equation}
a+b \label{eq1}
\end{equation}
Equation \eqref{eq:2} states that
\begin{equation}
\label{eq:2}
b + c = x
\end{equation}
\end{document}
看起来有一些不必要的交互。为了找出问题,我建议重复我所做的:策略性地“删除”,即注释掉软件包。