Skip to content

ref link no longer works with revtex #284

@daviehh

Description

@daviehh

Referencing equations/figures seems broken since the last update. Example:

\documentclass[aps,pra,twocolumn,superscriptaddress]{revtex4-2}
\usepackage{amsmath}

\usepackage{graphicx}

\usepackage[colorlinks=true,linkcolor=blue,urlcolor=black,citecolor=blue]{hyperref}

\begin{document}

\section{some section}

Here's an equation
\begin{align}
    x \label{eqn}
\end{align}

\begin{figure}
    \centering
    \includegraphics[width=.3\textwidth]{example-image-a}
    \caption{Fig example}\label{fig}
\end{figure}

Testing equation with Eq.~\eqref{eqn}.

Testing figure with Fig.~\ref{fig}.

\end{document}

The file compiles with warning Suppressing link with empty target. for the \ref/\eqref, and the resulting text is not linked/clickable. Also reproducible with the documentclass revtex4-1. Given revtex4-1 has not been updated for years, maybe it's due to recent changes in hyperref? The documentclass article does not seem affected. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions