您好,我在格式化 biblatex 书目时遇到了麻烦。我想按作者分组,将作品按照年份排列在作者姓名下方的单独段落中。到目前为止一切顺利。但我不知道如何删除第一年前面的点和接下来每一年之前的空白行。
\DeclareNameFormat{labelname}{\textsc{#1}}
\AtBeginBibliography{\renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}}
\renewcommand*{\labelnamepunct}{\par}
\renewcommand*{\labelnamepunct}{\space}
\xpretobibmacro{date+extrayear}{\par}{}{}
\DeclareFieldFormat[inbook,article,inproceedings,incollection]{citetitle}{#1}
\DeclareFieldFormat[inbook,article,inproceedings,incollection]{title}{#1}
% Commas as separators
\renewcommand*{\newunitpunct}{\addcomma\space}
% Comma before date; date not in parentheses
\renewbibmacro*{issue+date}{%
\setunit*{\addcomma\space}% NEW
% \printtext[parens]{% DELETED
\iffieldundef{issue}
{\usebibmacro{date}}
{\printfield{issue}%
\setunit*{\addspace}%
% \usebibmacro{date}}}% DELETED
\usebibmacro{date}}% NEW
\newunit}
% Issue/date macros removed after journal number
\renewbibmacro*{journal+issuetitle}{%
\usebibmacro{journal}%
\setunit*{\addspace}%
\iffieldundef{series}
{}
{\newunit
\printfield{series}%
\setunit{\addspace}}%
\usebibmacro{volume+number+eid}%
% \setunit{\addspace}% DELETED
% \usebibmacro{issue+date}% DELETED
% \setunit{\addcolon\space}% DELETED
% \usebibmacro{issue}% DELETED
\newunit}
% "In:" removed for articles; issue/date macros added after note+pages macro
\DeclareBibliographyDriver{article}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/translator+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{bytranslator+others}%
\newunit\newblock
\printfield{version}%
\newunit\newblock
% \usebibmacro{in:}% DELETED
\usebibmacro{journal+issuetitle}%
\newunit
\usebibmacro{byeditor+others}%
\newunit
\usebibmacro{note+pages}%
\setunit{\addspace}% NEW
\usebibmacro{issue+date}% NEW
\setunit{\addcolon\space}% NEW
\usebibmacro{issue}% NEW
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{issn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
\xpatchbibdriver{inbook}
{\usebibmacro{in:}%
\usebibmacro{bybookauthor}%
\newunit\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}}
{\usebibmacro{in:}%
\usebibmacro{bybookauthor}%
\newunit\newblock
\usebibmacro{byeditor:in}%
\newunit\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}}
{}{}
\xpatchbibdriver{incollection}
{\usebibmacro{in:}%
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}}
{\usebibmacro{in:}%
\usebibmacro{byeditor:in}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor}}
{}{}
\xpatchbibdriver{inproceedings}
{\usebibmacro{in:}%
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{event+venue+date}%
\newunit\newblock
\usebibmacro{byeditor+others}}
{\usebibmacro{in:}%
\usebibmacro{byeditor:in}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{event+venue+date}%
\newunit\newblock
\usebibmacro{byeditor+others}}
{}{}
\newbibmacro*{byeditor:in}{%
\ifnameundef{editor}
{}
{\printnames[editorin]{editor}%
\addspace\bibsentence%
\mkbibparens{\usebibmacro{editorstrg}}%
\clearname{editor}%
\printunit{\addcomma\space}}}
\DeclareNameAlias{editorin}{first-last}
\setlength{\bibhang}{20pt}
\renewcommand*\bibnamedash{}
\DeclareFieldFormat[inbook,article,inproceedings,incollection]{volume}{#1}
\DeclareFieldFormat[inbook,article,inproceedings,incollection]{number}{#1}