我不知道为什么此 MWE 中的参考书目条目中的 DATE 和 URLDATE 后面缺少句号。任何指导和解决方案都非常感谢!
\RequirePackage[l2tabu, orthodox]{nag}
\RequirePackage[hyphens]{url}
\documentclass[a4paper,twoside,nobib,nohyper]{tufte-book}
\usepackage[colorlinks=true,citecolor=blue,hyperindex=true,linkcolor=blue,urlcolor=teal]{hyperref}
\usepackage{xpatch}
\usepackage[
style=verbose,
autocite=footnote,
sorting=nty,
citecounter=true,
citetracker=true,
backref=true,
backend=biber
]{biblatex}
\setlength\bibitemsep{0.5\baselineskip}
\addbibresource{HSFSS-BIBLATEX.bib}
\renewbibmacro*{doi+eprint+url}{%
\iftoggle{bbx:doi}
{\printfield{doi}}
{}%
\newunit\newblock
\iftoggle{bbx:eprint}
{\usebibmacro{eprint}}
{}%
\setunit{\addspace}\newblock
\iftoggle{bbx:url}
{\usebibmacro{url+urldate}}
{}}
\usepackage{xparse}
\makeatletter
\xpatchcmd{\@footnotetext}%
{\color@begingroup}
{\color@begingroup\toggletrue{blx@footnote}}
{}
{}
\makeatother
%
\DeclareCiteCommand{\sidecitehelper}[\bibfootnotewrapper]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{\multicitedelim}
{\usebibmacro{cite:postnote}}
%
\ExplSyntaxOn
\NewDocumentCommand\sidecite{D<>{}O{}om}{%
\iftoggle{blx@footnote}
{\cs_set_protected_nopar:Npn \__sct_wrapper:nn ##1 ##2 {\mkbibparens{##2}}}
{\cs_set_protected_nopar:Npn \__sct_wrapper:nn ##1 ##2 {\sidenote[][##1]{##2}}}
{\IfNoValueTF{#3}
{\__sct_wrapper:nn{#1}{\sidecitehelper[#2]{#4}}}
{\__sct_wrapper:nn{#1}{\sidecitehelper[#2][#3]{#4}}}}
}
\ExplSyntaxOff
%
\makeatletter
\long\def\@caption#1[#2]#3{%
\expandafter\ifx\csname if@capstart\expandafter\endcsname
\csname iftrue\endcsname
\global\let\@currentHref\hc@currentHref
\else
\hyper@makecurrent{\@captype}%
\fi
\@ifundefined{NR@gettitle}{%
\def\@currentlabelname{#2}%
}{%
\NR@gettitle{#2}%
}%
\par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
}%
\begingroup
\toggletrue{blx@footnote}%
\@parboxrestore
\if@minipage
\@setminipage
\fi
\@tufte@caption@font\@tufte@caption@justification%
\expandafter\ifx\csname if@capstart\expandafter\endcsname
\csname iftrue\endcsname
\global\@capstartfalse
%\@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}%
\noindent\csname fnum@#1\endcsname: \ignorespaces#3%
\else
%\@makecaption{\csname fnum@#1\endcsname}{%
\noindent\csname fnum@#1\endcsname:
\ignorespaces
\ifHy@nesting
\expandafter\hyper@@anchor\expandafter{\@currentHref}{#3}%
\else
\Hy@raisedlink{%
\expandafter\hyper@@anchor\expandafter{%
\@currentHref
}{\relax}%
}%
#3%
\fi
%}%
\fi
\par
\endgroup
}
%
\renewcommand\@footnotetext[2][0pt]{%
\marginpar{%
\hbox{}\vspace*{#1}%
\def\baselinestretch {\setspace@singlespace}%
\reset@font\footnotesize%
\@tufte@margin@par% use parindent and parskip settings for marginal text
\vspace*{-1\baselineskip}\noindent%
\protected@edef\@currentlabel{%
\csname p@footnote\endcsname\@thefnmark%
}%
\color@begingroup%
\toggletrue{blx@footnote}%
\@makefntext{%
\ignorespaces#2%
}%
\color@endgroup%
}%
}%
\makeatother
%
\makeatletter
\AtBeginDocument{%
\patchcmd\@floatboxreset
{\boolfalse{citetracker}%
\boolfalse{pagetracker}}
{}
{}
{\blx@err@patch{float}}}
\makeatother
%
\renewbibmacro*{pageref}
{%
\iflistundef{pageref}
{\printtext{(\autocap{n}o citation in the text.)}}
{
\printtext{\autocap{c}ited \arabic{citecounter} time\ifnumgreater{\value{citecounter}}{1}{s}{}}%
\setunit{\addspace}
\ifnumgreater{\value{pageref}}{1}
{\bibstring{backrefpages}\ppspace}
{\bibstring{backrefpage}\ppspace}%
\printlist[pageref][-\value{listtotal}]{pageref}
}
}
\DefineBibliographyStrings{english}{
backrefpage = {on page},
backrefpages = {on pages},
}
\begin{document}
In this scenario the potato acts like a pesticide, killing the Colorado potato beetle.\sidecite<0.7in>[][]{BtPotato}
\printbibheading
\printbibliography[type=online,heading=subbibliography,title={Internet Sources}]
\end{document}
.BIB 文件:
@online{BtPotato,
author = {contributors SourceWatch},
title = {{"Colorado Potato Beetle Resistant Bt Potato"}\textit{ SourceWatch}},
date = {2012},
url = {https://www.sourcewatch.org/index.php?title=Colorado_Potato_Beetle_Resistant_Bt_Potato&oldid=583413},
urldate = {2022-08-22}
}
答案1
在
\renewbibmacro*{doi+eprint+url}{%
\iftoggle{bbx:doi}
{\printfield{doi}}
{}%
\newunit\newblock
\iftoggle{bbx:eprint}
{\usebibmacro{eprint}}
{}%
\setunit{\addspace}\newblock
\iftoggle{bbx:url}
{\usebibmacro{url+urldate}}
{}}
URL 块前面\setunit{\addspace}\newblock
的 强制在 URL 前显示一个空格。要恢复正常的单位分隔符(在您的例子中为句点),请改用\newunit\newblock
。
\renewbibmacro*{doi+eprint+url}{%
\iftoggle{bbx:doi}
{\printfield{doi}}
{}%
\newunit\newblock
\iftoggle{bbx:eprint}
{\usebibmacro{eprint}}
{}%
\newunit\newblock
\iftoggle{bbx:url}
{\usebibmacro{url+urldate}}
{}}
“在...上引用了 x 次”块之前的空间由其\bibpagerefpunct
默认设置控制\addspace
(因为biblatex
的默认设置在括号中有此块),您可以尝试
\renewcommand*{\bibpagerefpunct}{\addperiod\space}