## LaTeX forum ⇒ General ⇒ How can we make hyperlinks for footnote?

LaTeX specific issues not fitting into one of the other forums of this category.
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

### Re: How can we make hyperlinks for footnote?

ggyyree wrote:how to change the color of the footmark now please?

Load hyperref with suitable options. For example,
\usepackage[colorlinks,linkcolor=blue]{hyperref}

ggyyree wrote: I also met a problem that two footmarks need to be referred to the same footnote. How to do that please?
This can be solved, to my knowledge, if the two footmarks come one right after another. For example, to get

you could write
Text\footnote{Blah blah}. More text\footnote{Blah blah blah}. And even more text\SameFootnotemark.

where \SameFootnotemark is the command given by
\newcommand{\SameFootnotemark}{\addtocounter{footnote}{-1}\addtocounter{Hfootnote}{-1}\footnotemark}

Add this definition to the preamble. What I'm unable to get is something like

Do you see the difference? The last footmark is not equal to the preceding one, but the first one.

This kind of matters are hard. In fact, when reading the very complex code of hyperref, one realizes that \footnote, \footnotemark and \footnotetext are redefined without optional arguments.

Finally, to get the last table you mentioned, write
\begin{center}    \begin{tabular}{cccc}       N &aaa &bbb &ccc\Footnotemark\\       N &111\SameFootnotemark &222\Footnotemark &333    \end{tabular}\end{center}\addtocounter{footnote}{-1}\Footnotetext{Test1}\stepcounter{footnote}\Footnotetext{Test2}
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.

ggyyree
Posts: 21
Joined: Mon Sep 15, 2008 6:32 pm
Great work! Thanks a lot!!!

Juanjo wrote:
ggyyree wrote:how to change the color of the footmark now please?

Load hyperref with suitable options. For example,
\usepackage[colorlinks,linkcolor=blue]{hyperref}

ggyyree wrote: I also met a problem that two footmarks need to be referred to the same footnote. How to do that please?
This can be solved, to my knowledge, if the two footmarks come one right after another. For example, to get

you could write
Text\footnote{Blah blah}. More text\footnote{Blah blah blah}. And even more text\SameFootnotemark.

where \SameFootnotemark is the command given by
\newcommand{\SameFootnotemark}{\addtocounter{footnote}{-1}\addtocounter{Hfootnote}{-1}\footnotemark}

Add this definition to the preamble. What I'm unable to get is something like

Do you see the difference? The last footmark is not equal to the preceding one, but the first one.

This kind of matters are hard. In fact, when reading the very complex code of hyperref, one realizes that \footnote, \footnotemark and \footnotetext are redefined without optional arguments.

Finally, to get the last table you mentioned, write
\begin{center}    \begin{tabular}{cccc}       N &aaa &bbb &ccc\Footnotemark\\       N &111\SameFootnotemark &222\Footnotemark &333    \end{tabular}\end{center}\addtocounter{footnote}{-1}\Footnotetext{Test1}\stepcounter{footnote}\Footnotetext{Test2}

abdullahkhilji
Posts: 1
Joined: Tue Nov 19, 2019 4:07 pm
All footnotes package must be declared after loading hyperref, for the hyperlinks to work same goes for bigfoot.
When using tabularx alongwith with hyperref, load tabularx after hyperref.
I would suggest loading tabularx alongwith hyperref initially to avoid conflicts as hyperref needs to be applied throughout.