First is the desired pdflatex output: And second is the actual output: These outputs were generated from the following code without (top output) or with (bottom output) inclusion of the hyperref package.
Code: Select all
\documentclass[10pt]{article}
% comment the below line to resolve the footnote numbering problem
\usepackage[colorlinks=true,urlcolor=red,hyperfootnotes=false]{hyperref}
% solution proposed by Werner (begin)
\usepackage{letltxmacro}
\newcounter{fnmarkcntr}\newcounter{fntextcntr}
\makeatletter
\renewcommand{\footnotemark}{%
\@ifnextchar[\@xfootnotemark
{\stepcounter{fnmarkcntr}%
\refstepcounter{footnote}\label{footnotemark\thefnmarkcntr}%
\protected@xdef\@thefnmark{\thefootnote}%
\@footnotemark}}
\makeatother
\LetLtxMacro{\oldfootnotetext}{\footnotetext}
\renewcommand{\footnotetext}[1]{%
\stepcounter{fntextcntr}%
\oldfootnotetext[\ref{footnotemark\thefntextcntr}]{#1}
}
% solution proposed by Werner (end)
\begin{document}
This text has a footnote\footnote%
{Which contains a sub-footnote\footnotemark}
\footnotetext{This footnote should be labeled `2'}
\end{document}