我想使用 \超级富钙铁矿用于在 biblatex 中将编号引用格式化为脚注,然后使用\usepackage[para,bottom]{footmisc}
效果很好
直到我包含了hyperref
-package,它会弄乱字距,并在正文和脚注之间添加额外的空间(如果有更多带有超链接的引用,额外的空间就会变得很重要)。
是否有任何解决方法hyperref
?
以下是 MWE:
\documentclass{article}
\usepackage{lipsum}
\usepackage{hyperref}
\usepackage[style=numeric-comp,firstinits=true]{biblatex}
\usepackage[para,bottom,hang]{footmisc}
\bibliography{biblatex-examples}
% ------------------- superfullcite ----- %
\makeatletter
\ExecuteBibliographyOptions{citetracker,sorting=none}
\DeclareCiteCommand{\notefullcite}[\mkbibbrackets]
{\usebibmacro{cite:init}%
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{notefullcite}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}%
\usebibmacro{postnote}}
\newbibmacro*{notefullcite}{%
\ifciteseen
{}
{\footnotetext[\thefield{labelnumber}]{%
\usedriver{}{\thefield{entrytype}}.}}}
\DeclareCiteCommand{\superfullcite}[\cbx@superscript]%
{\usebibmacro{cite:init}%
\let\multicitedelim=\supercitedelim
\iffieldundef{prenote}
{}
{\BibliographyWarning{Ignoring prenote argument}}%
\iffieldundef{postnote}
{}
{\BibliographyWarning{Ignoring postnote argument}}}
{\usebibmacro{citeindex}%
\usebibmacro{superfullcite}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}}
\newbibmacro*{superfullcite}{%
\ifciteseen
{}
{\xappto\cbx@citehook{%
\noexpand\footnotetext[\thefield{labelnumber}]{%
\fullcite{\thefield{entrykey}}.}}}}
\newrobustcmd{\cbx@superscript}[1]{%
\mkbibsuperscript{#1}%
\cbx@citehook
\global\let\cbx@citehook=\empty}
\let\cbx@citehook=\empty
\makeatother
% ------------------------
\addbibresource{references.bib}
\begin{document}
\lipsum[1]\superfullcite{kastenholz}
\lipsum[2]\superfullcite{companion,sigfridsson}
\lipsum[3]\superfullcite{augustine} \lipsum[4-6]
\end{document}
答案1
通常hyperref
应该是序言中最后一个要加载的包。(有几个记录在案的例外情况,例如cleverref
必须在之后加载hyperref
,有关更多信息,请参阅哪些包应该在 hyperref 之后加载而不是之前加载?。
只需更改加载顺序即可hyperref
稍后加载。
\documentclass{article}
\usepackage[style=numeric-comp,firstinits=true]{biblatex}
\usepackage[para,bottom,hang]{footmisc}
\usepackage{hyperref}
\usepackage{lipsum}
% ------------------- superfullcite ----- %
\makeatletter
\ExecuteBibliographyOptions{citetracker,sorting=none}
\DeclareCiteCommand{\notefullcite}[\mkbibbrackets]
{\usebibmacro{cite:init}%
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{notefullcite}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}%
\usebibmacro{postnote}}
\newbibmacro*{notefullcite}{%
\ifciteseen
{}
{\footnotetext[\thefield{labelnumber}]{%
\usedriver{}{\thefield{entrytype}}.}}}
\DeclareCiteCommand{\superfullcite}[\cbx@superscript]%
{\usebibmacro{cite:init}%
\let\multicitedelim=\supercitedelim
\iffieldundef{prenote}
{}
{\BibliographyWarning{Ignoring prenote argument}}%
\iffieldundef{postnote}
{}
{\BibliographyWarning{Ignoring postnote argument}}}
{\usebibmacro{citeindex}%
\usebibmacro{superfullcite}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}}
\newbibmacro*{superfullcite}{%
\ifciteseen
{}
{\xappto\cbx@citehook{%
\noexpand\footnotetext[\thefield{labelnumber}]{%
\fullcite{\thefield{entrykey}}.}}}}
\newrobustcmd{\cbx@superscript}[1]{%
\mkbibsuperscript{#1}%
\cbx@citehook
\global\let\cbx@citehook=\empty}
\let\cbx@citehook=\empty
\makeatother
% ------------------------
\addbibresource{biblatex-examples.bib}
\begin{document}
\lipsum[1]\superfullcite{kastenholz}
\lipsum[2]\superfullcite{companion,sigfridsson}
\lipsum[3]\superfullcite{augustine} \lipsum[4-6]
\end{document}