footmisc なしの脚注スタイル (ハイパーリファレンスの競合)

footmisc なしの脚注スタイル (ハイパーリファレンスの競合)

styデフォルトよりも優れた脚注レイアウトを提供する次のコードを含むテンプレートとドキュメントが提供されました。

\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}

ただし、footmiscbreaks†を使用するとhyperref、インライン脚注マーカーがサポートされます。

MWE -comment環境のコメントを解除すると、必要な脚注レイアウト スタイルが表示されます。コメントすると、脚注へのリンクが機能するデフォルトが表示されます。

\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}

footmiscハイパーテキスト機能を損なうものを使用したり追加したりせずに、より優れた脚注レイアウトを実現する方法はありますか?

確かに、脚注にインライン アンカーへのリンクを戻す方法はあります。

ということで、デジタルネイティブ ドキュメントに従来の (紙の) 形式を使用しなくなる日が来るのを楽しみにしています。特にハイパーテキストについて書く場合は皮肉なことです。それまでは、LaTeX を使用します。

† FWIW、etoolbox他の場所でも使用されているようですが (私が書いたクラス コードではありません)、hyperref のハイパーテキストは壊れません。

答え1

hyperref にチャンスを与えてください。コードを挿入できるように後でロードします。

\documentclass{article}

\usepackage{verbatim} % to allow commenting code section

%\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}
% 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{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}

関連情報