0

LaTeX (Overleaf) says that references eq1 and eq:2 are undefined, but they're apparently ok.

What Am I missing here? MWE is provided. Thanks!

\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{test@test.com}

\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}

Mico
  • 506,678

1 Answers1

0

Looks like you are throwing too much in ... This reduced code works:

%\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{test@test.com}

\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}

Result: Result

Looks like there is some unwanted interaction. To locate the problems, I suggest repeating, what I did: strategic "deletion", i.e. commenting-out, of packages.

MS-SPO
  • 11,519
  • Nice! This works, but I need to find a workaround, because I've been using Bibtex as default! Thanks! – Hugo Christ Sep 02 '21 at 18:13
  • Do you mean for %\addbibresource{references.bib} ? Well, it couldn't compile in my place, obviously ;-) – MS-SPO Sep 02 '21 at 20:07