LaTeX forum ⇒ GeneralHow can we make hyperlinks for footnote?

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

Re: How can we make hyperlinks for footnote?

Postby Juanjo » Mon Oct 27, 2008 9:40 pm

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

Load hyperref with suitable options. For example,
  1. \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

Image

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

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

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

Image

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
  1. \begin{center}
  2. \begin{tabular}{cccc}
  3. N &aaa &bbb &ccc\Footnotemark\\
  4. N &111\SameFootnotemark &222\Footnotemark &333
  5. \end{tabular}
  6. \end{center}
  7. \addtocounter{footnote}{-1}\Footnotetext{Test1}
  8. \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

Postby ggyyree » Tue Oct 28, 2008 4:48 pm

Great work! Thanks a lot!!! :ugeek:

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

Load hyperref with suitable options. For example,
  1. \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

Image

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

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

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

Image

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
  1. \begin{center}
  2. \begin{tabular}{cccc}
  3. N &aaa &bbb &ccc\Footnotemark\\
  4. N &111\SameFootnotemark &222\Footnotemark &333
  5. \end{tabular}
  6. \end{center}
  7. \addtocounter{footnote}{-1}\Footnotetext{Test1}
  8. \stepcounter{footnote}\Footnotetext{Test2}

abdullahkhilji
Posts: 1
Joined: Tue Nov 19, 2019 4:07 pm

Postby abdullahkhilji » Tue Nov 19, 2019 4:10 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.


Return to “General”

Who is online

Users browsing this forum: No registered users and 9 guests