
Code: Select all
hyperfootnotes = true
Code: Select all
\footnotemark[1]
\footnotetext[1]{nnn}
Code: Select all
hyperfootnotes = true
Code: Select all
\footnotemark[1]
\footnotetext[1]{nnn}
NEW: TikZ book now 40% off at Amazon.com for a short time.
I have put the hyperref at the last of the preamble but it doesn't work...localghost wrote:Remember the first point of my list.
Yes, thanks a lot! I have tested with the nasty example. It works! But it doesn't applicable for my report because I use the \footnotemark inside a table. What I did is like following and anything wrong?Stefan_K wrote:Hi,
have a look at the hyperref README file, the footnote support is explained near its end, further it provides a compilable example demonstrating hyperlinks even with \footnotemark and \footnotetext.
Stefan
Code: Select all
\makeatletter
\begin{center}
\setlength{\floatsep}{10pt plus 3pt minus 2pt}
\begin{tabular}{c||p{4.2cm}|p{4.2cm}|p{4.2cm}}
\toprule
N &aaa &bbb &ccc \footnotemark \let\saved@Href@A\Hy@footnote@currentHref \\
\midrule
N &111 &222 \footnotemark \let\saved@Href@B\Hy@footnote@currentHref &333
\bottomrule
\end{tabular}
\tabcaption{\small\bf\it Table}
\label{table:Table1}
\end{center}
\addtocounter{footnote}{-2}%
\let\Hy@footnote@currentHref\saved@Href@A
\footnotetext[1]{Test1}
\addtocounter{footnote}{1}%
\let\Hy@footnote@currentHref\saved@Href@B
\footnotetext[2]{Test2}
Code: Select all
\documentclass{article}
\usepackage{hyperref}
\begin{document}
\makeatletter
A%
\footnotemark
\let\saved@Href@A\Hy@footnote@currentHref
% remember link name
B%
\footnotemark
\let\saved@Href@B\Hy@footnote@currentHref
b%
\addtocounter{footnote}{-1}%
\addtocounter{Hfootnote}{-1}% generate the same anchor
\footnotemark
C%
\footnotemark
\let\saved@Href@C\Hy@footnote@currentHref
\addtocounter{footnote}{-2}%
\let\Hy@footnote@currentHref\saved@Href@A
\footnotetext{AAAA}%
\addtocounter{footnote}{1}%
\let\Hy@footnote@currentHref\saved@Href@B
\footnotetext{BBBBB}%
\addtocounter{footnote}{1}%
\let\Hy@footnote@currentHref\saved@Href@C
\footnotetext{CCCC}%
\end{document}
The \let commands need to be \global to take effect out of the group where they lie and \footnotetext has an optional argument.ggyyree wrote: What I did is like following and anything wrong?
[/color]Code: Select all
\begin{center} ...................... N &aaa &bbb &ccc \footnotemark \let\saved@Href@A\Hy@footnote@currentHref \\ ..................... N &111 &222 \footnotemark \let\saved@Href@B\Hy@footnote@currentHref &333 ..................... \end{center} ..................... \footnotetext[1]{Test1} ..................... \footnotetext[2]{Test2}
Code: Select all
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{alphalph}
\usepackage{booktabs}
\usepackage{hyperref}
\makeatletter
\newcommand{\Footnotemark}{\footnotemark%
\expandafter\global\expandafter\let\csname saved@Href@\alphalph{\value{footnote}}\endcsname%
\Hy@footnote@currentHref}
\newcommand{\Footnotetext}[1]{%
\expandafter\let\expandafter\Hy@footnote@currentHref\csname saved@Href@\alphalph{\value{footnote}}\endcsname%
\footnotetext{#1}}
\makeatother
\begin{document}
\setcounter{footnote}{35}
Text before the table\footnote{A usual footnote.}. The number of the first footnote is \thefootnote.
\begin{center}
\setlength{\floatsep}{10pt plus 3pt minus 2pt}
\begin{tabular}{c||p{4.2cm}|p{4.2cm}|p{4.2cm}}
\toprule
N &aaa &bbb &ccc\Footnotemark \\
\midrule
N &111 &222\Footnotemark &333\Footnotemark \\
\bottomrule
\end{tabular}
\end{center}
\addtocounter{footnote}{-2}\Footnotetext{First footnote in the table}
\stepcounter{footnote}\Footnotetext{Second footnote}
\stepcounter{footnote}\Footnotetext{Third footnote}
Text after the table\Footnotemark\Footnotetext{Footnote done with
\texttt{\textbackslash Footnotemark} and \texttt{\textbackslash Footnotetext}.}
Text after the table\footnote{Other usual footnote.}.
\end{document}
Code: Select all
\begin{center}
N &aaa &bbb &ccc \footnotemark[1]\\
N &111 \footnotemark[1] &222 \footnotemark[2] &333
\end{center}
\footnotetext[1]{Test1}
\footnotetext[2]{Test2}
Juanjo wrote:The \let commands need to be \global to take effect out of the group where they lie and \footnotetext has an optional argument.ggyyree wrote: What I did is like following and anything wrong?
[/color]Code: Select all
\begin{center} ...................... N &aaa &bbb &ccc \footnotemark \let\saved@Href@A\Hy@footnote@currentHref \\ ..................... N &111 &222 \footnotemark \let\saved@Href@B\Hy@footnote@currentHref &333 ..................... \end{center} ..................... \footnotetext[1]{Test1} ..................... \footnotetext[2]{Test2}
The following code defines and exemplifies the commands \Footnotemark and \Footnotetext to automatize tasks. You can always use them instead of \footnotemark and \footnotetext, except when the optional argument of these commands is required. Instead of having to manually define \saved@Href@A, \saved@Href@B, \saved@Href@C, etc., \Footnotemark defines \saved@Href@<aa>, where <aa> stands for an alphabetic version of the footnote counter. For preventing the case of more that 27 footnotes, this is done with the \alphalph command defined in the alphalph package. If you never have a large number of footnotes, the code can be slightly simplified.Code: Select all
\documentclass{article} \usepackage[T1]{fontenc} \usepackage{alphalph} \usepackage{booktabs} \usepackage{hyperref} \makeatletter \newcommand{\Footnotemark}{\footnotemark% \expandafter\global\expandafter\let\csname saved@Href@\alphalph{\value{footnote}}\endcsname% \Hy@footnote@currentHref} \newcommand{\Footnotetext}[1]{% \expandafter\let\expandafter\Hy@footnote@currentHref\csname saved@Href@\alphalph{\value{footnote}}\endcsname% \footnotetext{#1}} \makeatother \begin{document} \setcounter{footnote}{35} Text before the table\footnote{A usual footnote.}. The number of the first footnote is \thefootnote. \begin{center} \setlength{\floatsep}{10pt plus 3pt minus 2pt} \begin{tabular}{c||p{4.2cm}|p{4.2cm}|p{4.2cm}} \toprule N &aaa &bbb &ccc\Footnotemark \\ \midrule N &111 &222\Footnotemark &333\Footnotemark \\ \bottomrule \end{tabular} \end{center} \addtocounter{footnote}{-2}\Footnotetext{First footnote in the table} \stepcounter{footnote}\Footnotetext{Second footnote} \stepcounter{footnote}\Footnotetext{Third footnote} Text after the table\Footnotemark\Footnotetext{Footnote done with \texttt{\textbackslash Footnotemark} and \texttt{\textbackslash Footnotetext}.} Text after the table\footnote{Other usual footnote.}. \end{document}
Code: Select all
\color{red}\Footnotemark\color{black}
NEW: TikZ book now 40% off at Amazon.com for a short time.