# Unable to reference sections in supplemental document

SOLUTION: It turns out it was a documentclass problem. By removing prl from \documentclass[reprint,aps,prl,superscriptaddress,notitlepage]{revtex4-2} it fixed my problem.

I'm having a problem where I can refer to figures/equations/tables, etc. but not sections in my supplemental document. For the supplement, I want to add in an "S" prefix before everything, so I've redefined them at the beginning. However, this doesn't seem to be working for the sections, and I don't know why. I've created a minimal working example below.

The problem likely lies in that the sections themselves do not have numbers, however I don't see anywhere that would explicitly turn them off here for any reason.

\documentclass[reprint,aps,prl,superscriptaddress,notitlepage]{revtex4-2}

\usepackage{lipsum}

\newcommand\startsupplement{%
\setcounter{table}{0}
\renewcommand{\thetable}{S\arabic{table}}
\setcounter{figure}{0}
\renewcommand{\thefigure}{S\arabic{figure}}
\setcounter{equation}{0}
\renewcommand{\theequation}{S\arabic{equation}}
\setcounter{section}{0}
\renewcommand{\thesection}{S\arabic{section}}
}

\begin{document}

\title{\textbf{\fontfamily{phv}\selectfont
Supplemental Material: \\ My Supplement Name}}
\author{Me}
\affiliation{Department of Physics}

\maketitle
\startsupplement

\section{First Section}
\label{sec:section1}

Referring to Section~\ref{sec:section1} \\
Referring to Section~\ref{sec:section2} \\

\thesection

$$\label{eq:linear} y = mx + b$$

$$\label{eq:exponential} y = y_0 + e^{ax}$$

Referring to Eqn.~\ref{eq:linear} \\
Referring to Eqn.~\ref{eq:exponential} \\

\lipsum[1]

\section{Second Section}
\label{sec:section2}

Referring to Section~\ref{sec:section1} \\
Referring to Section~\ref{sec:section2} \\

Referring to Eqn.~\ref{eq:linear} \\
Referring to Eqn.~\ref{eq:exponential} \\

\lipsum[2]

\end{document}

• Ok thanks, good to know, I've updated Aug 27, 2020 at 17:14
• your sections don't have numbers, so what do you expect to get with \ref{sec:section1}? Aug 27, 2020 at 17:15
• I guess that is part of/the main issue as well. I am unsure why they do not have numbers. Any ideas? I've updated question to be more clear. Aug 27, 2020 at 17:17
• well it is the design choice of the class/journals. Aug 27, 2020 at 17:18
• I see, I got rid of the "prl" part of the document class and it works, thanks! Aug 27, 2020 at 17:21