LaTeX forum ⇒ 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.
jpferreira
Posts: 2
Joined: Mon Oct 04, 2021 4:08 pm

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

Postby jpferreira » Mon Oct 04, 2021 4:16 pm

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:

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

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

Postby Ijon Tichy » Mon Oct 04, 2021 4:44 pm

If it is an anchor problem, maybe an explicit anchor using \phantomsection can help:
\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}

jpferreira
Posts: 2
Joined: Mon Oct 04, 2021 4:08 pm

Postby jpferreira » Mon Oct 04, 2021 4:55 pm

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: 559
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Mon Oct 04, 2021 5:15 pm

Hint: For everything related to hyperlinks see the hyperref manual


Return to “General”

Who is online

Users browsing this forum: No registered users and 9 guests