GeneralHow to set a footnote mark to the title footnote on REVTex

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
jpferreira
Posts: 2
Joined: Mon Oct 04, 2021 4:08 pm

How to set a footnote mark to the title footnote on REVTex

Post by jpferreira »

Hi there,


I am writing this post in hope to find a solution to an issue I've been facing with REVTex which I haven't been able to find a solution for.
What I'm trying to achieve is to have two footnote marks leading to the same footnote, where one of the footnotes is generated using the \homepage[]{} macro on the title.

The minimal working example of a solution I've tried so far, that was the one recommended by countless places on the internet, is as follows:

Code: Select all

\documentclass[%
reprint,
nofootinbib,
amsmath,amssymb,
aps,
]{revtex4-2}

\usepackage{hyperref}  % Add hypertext capabilities
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    filecolor=magenta,
    urlcolor=cyan,
}

\begin{document}

\title{Title}

% footnote(s) to article title
\homepage[\label{lb:homepage}Website: ]{https://example.org}

\author{Author}

\date{\today}

\maketitle

sample text

\clearpage

sample text2 and reference: \autoref{lb:homepage}

\end{document}
However, instead of linking directly to the footnote, this new footnote mark, written in the document text, will actually link to the title.

Although I'm not quite sure that this is a problem with REVTex itself, I haven't been able to find a solution so far, and the fact that I saw this in several places should mean that this works.

Thanks in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

How to set a footnote mark to the title footnote on REVTex

Post by Ijon Tichy »

If it is an anchor problem, maybe an explicit anchor using \phantomsection can help:

Code: Select all

\documentclass[%
reprint,
nofootinbib,
amsmath,amssymb,
aps,
]{revtex4-2}

\usepackage{hyperref}  % Add hypertext capabilities
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    filecolor=magenta,
    urlcolor=cyan,
}

\begin{document}

\title{Title}

% footnote(s) to article title
\homepage[Website:\phantomsection\label{lb:homepage} ]{https://example.org}

\author{Author}

\date{\today}

\maketitle

sample text

\clearpage

sample text2 and reference: Footnote \ref{lb:homepage} on \autopageref{lb:homepage}

\end{document}
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
jpferreira
Posts: 2
Joined: Mon Oct 04, 2021 4:08 pm

How to set a footnote mark to the title footnote on REVTex

Post by jpferreira »

It works! I didn't knew what \phantomsection was, thanks for the help, I feel silly for not figuring out such a simple command that would fix this issue.
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

How to set a footnote mark to the title footnote on REVTex

Post by Ijon Tichy »

Hint: For everything related to hyperlinks see the hyperref manual
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
Post Reply