I've been given a template & sty
doc with this code which gives a nicer footnote layout than the default:
\usepackage[hang, flushmargin,splitrule,multiple]{footmisc}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@makefntext}{
\ifFN@hangfoot
\bgroup
}{
\ifFN@hangfoot
\bgroup\def\@makefnmark{
\rlap{\normalfont\@thefnmark.}
}
}{}{}
\patchcmd{\@makefntext}{
\ifdim\footnotemargin>\z@
\hb@xt@ \footnotemargin{\hss\@makefnmark}
}{
\ifdim\footnotemargin>\z@
\hb@xt@ \footnotemargin{\@makefnmark\hss}
}{}{}
\makeatother
\setlength{\footnotemargin}{1.25em} % Between marker and text
\setlength{\skip\footins}{1\baselineskip} % Between main text and note rule
\setlength{\footnotesep}{\skip\footins} % Between footnotes [= previous]
\renewcommand{\hangfootparskip}{0pt}
\renewcommand{\hangfootparindent}{1em}
But, using footmisc
breaks† hyperref
's support for inline footnote markers.
MWE - uncomment the comment
environment to see the desired footnote layout style, comment it to see the default with working links to footnotes:
\documentclass{article}
\usepackage{verbatim} % to allow commenting code section
% hyperref options as per my uni's thesis class
\usepackage[pdfpagemode={UseOutlines},bookmarks=true,bookmarksopen=true,
bookmarksopenlevel=0,bookmarksnumbered=true,hypertexnames=true, plainpages=false,
colorlinks,linkcolor={blue},citecolor={green},urlcolor={red},
pdfstartview={FitV},unicode,breaklinks=true,pdfpagelabels]{hyperref}
%\begin{comment}
\usepackage[hang, flushmargin,splitrule,multiple]{footmisc}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@makefntext}{
\ifFN@hangfoot
\bgroup
}{
\ifFN@hangfoot
\bgroup\def\@makefnmark{
\rlap{\normalfont\@thefnmark.}
}
}{}{}
\patchcmd{\@makefntext}{
\ifdim\footnotemargin>\z@
\hb@xt@ \footnotemargin{\hss\@makefnmark}
}{
\ifdim\footnotemargin>\z@
\hb@xt@ \footnotemargin{\@makefnmark\hss}
}{}{}
\makeatother
\setlength{\footnotemargin}{1.25em} % Between marker and text
\setlength{\skip\footins}{1\baselineskip} % Between main text and note rule
\setlength{\footnotesep}{\skip\footins} % Between footnotes [= previous]
\renewcommand{\hangfootparskip}{0pt}
\renewcommand{\hangfootparindent}{1em}
%\end{comment}
\begin{document}
Lorem ipsum dolor\footnote{A note} sit amet, consectetur adipiscing elit. Nam posuere risus\footnote{Another note} risus, et lobortis nunc egestas eu.
\end{document}
Is there a way to achieve the better footnote layout, without using footmisc
or adding anything else that breaks hypertextual functions?
Indeed is there a way to give the footnotes a link back to their inline anchor.
So looking forward to the day we stop using legacy (paper) formats for digital native documents. Especially ironic when writing about hypertext. Until then, LaTeX it is.
† FWIW, etoolbox
seems to be used elsewhere (class code I didn't write!) but doesn't break hyperref's hypertext.