biblatex (verbose-trad2) - 抑制编辑器名称后的逗号

biblatex (verbose-trad2) - 抑制编辑器名称后的逗号

在此处输入图片描述

当引用合集或论文集并在参考书目中列出时,如何删除编辑姓名后的逗号?

问题与以下内容相同:

BibLaTeX:删除编辑者姓名后的逗号

删除 biblatex 中编辑器名称后的逗号

biblatex-verbose:编辑器后的逗号而不是句号

不幸的是,所提出的解决方案对我来说都不起作用。


平均能量损失

\documentclass[11pt, twoside, openany]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} 
\usepackage[italian]{babel}
\usepackage[autostyle,italian=guillemets]{csquotes}
\usepackage{xpatch}
\usepackage[style=verbose-trad2,
            useprefix=true,                 
            citepages=omit,                 
            backend=biber,  
            ibidpage=true,
        ]{biblatex} 
\usepackage{biblatex-opcit-booktitle}

\defbibheading{sc-comp}[\bibname]{%
  \chapter*{#1}\markboth{#1}{}%
  \addcontentsline{toc}{chapter}{\bibname}%
}

\ExecuteBibliographyOptions{giveninits=false, dashed=false, dateabbrev=false}
\DeclareNameAlias{sortname}{family-given}
\NewBibliographyString{ibidemloccit,ibidemnoloccit}
\DefineBibliographyStrings{italian}{%
  bibliography   = {Bibliografia},
  editor         = {a cura di},
  editors        = {a cura di},
  idem           = {\textsc{Id}},
  ibidemloccit   = {\mkbibemph{\autocap{i}bid\adddot}},
  ibidemnoloccit = {Ivi},
}

\renewbibmacro*{cite:full}{%
  \usebibmacro{cite:full:citepages}%
  \global\toggletrue{cbx:fullcite}%
  \printtext[bibhypertarget]{%
    \usedriver
      {\toggletrue{abx@bool@giveninits}%
       \DeclareNameAlias{sortname}{default}}
      {\thefield{entrytype}}}%
  \usebibmacro{shorthandintro}}

\renewbibmacro*{publisher+location+date}{%
  \iflistundef{publisher}
    {\setunit*{\addcomma\space}}
    {\setunit*{\addcolon\space}}%
  \printlist{publisher}%
  \setunit*{\addcomma\space}%
  \printlist{location}%
  \setunit*{\addspace}%
  \usebibmacro{date}%
  \printfield{edition}%
  \newunit}

\DeclareFieldFormat{edition}{%
  \ifinteger{#1}
    {\textsuperscript{#1}}
    {#1\isdot\setunit{\addcomma\space}}}

\newcommand{\replaceedition}[1]{%
  \xpatchbibdriver{#1}
    {\printfield{edition}%
     \newunit}
    {}%
    {}
    {\typeout{failed to patch driver #1}}%
}
\replaceedition{book}
\replaceedition{collection}
\replaceedition{inbook}
\replaceedition{incollection}
\replaceedition{manual}

\renewbibmacro*{date}{%
  \printdate
  \iffieldundef{origyear}{%
  }{%
    \setunit*{\addspace}%
    \printtext[parens]{ed. or. \printorigdate}%
  }%
}

\DeclareDelimFormat{finalnamedelim}{%
  \addspace\addcomma\space}

%volumi riviste
\renewbibmacro*{volume+number+eid}{%
 \setunit*{\addcomma\space}% 
  \printfield{volume}%
 %invece di \setunit*{\adddot}% 
  \setunit*{\addslash}% 
  \printfield{number}%
}

\renewcommand*{\revsdnamepunct}{}
\renewcommand*{\intitlepunct}{\space}
\renewcommand*{\newunitpunct}{\addcomma\space}
\renewcommand*{\mkbibcompletename}{\textsc}
\newbibmacro*{in:}{%
  \ifentrytype{article}
    {}
    {\bibstring{in}%
     \printunit{\intitlepunct}}}

\DeclareFieldFormat{journaltitle}{\enquote{#1\isdot}}
\DeclareFieldFormat[article]{title}{\textit{#1}}
\DeclareFieldFormat[article]{volume}{\textsc{#1}}
\DeclareFieldFormat[incollection]{title}{\textit{#1}}
\DeclareFieldFormat[inproceedings]{title}{\textit{#1}}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}

\xpatchbibmacro{author}
  {\printnames{author}}
  {\iffootnote
     {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
       {\usebibmacro{cite:idem}}
       {\printnames{author}}}
     {\printnames{author}}}
  {}{}
\xpatchbibmacro{bbx:editor}
  {\printnames{editor}}
  {\iffootnote
     {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
        {\usebibmacro{cite:idem}}
        {\printnames{editor}}}
     {\printnames{editor}}}
  {}{}
\xpatchbibmacro{bbx:translator}
  {\printnames{translator}}
  {\iffootnote
     {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
        {\usebibmacro{cite:idem}}
        {\printnames{translator}}}
     {\printnames{translator}}}
  {}{}

\renewbibmacro*{cite:ibid}{%
  \printtext{%
    \bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{%
      \ifloccit
        {\bibstring[\mkibid]{ibidemloccit}%
         \global\toggletrue{cbx:loccit}}
        {\bibstring[\mkibid]{ibidemnoloccit}}}}}

\begin{filecontents}{\jobname.bib}
@proceedings{granitoschiavino,
editor        = {Granito, Eugenia and Schiavino, Mariateresa and Foscari, Giuseppe},
title         = {Il Principato Citeriore tra \emph{Ancien Régime} e conquista francese: il mutamento di una realtà periferica del Regno di Napoli}, 
note        = {Atti del convegno (Salerno, 14-16 maggio 1991)},
date          = {1993},
location      = {Salerno},
}
@collection{delorenzo,
editor        = {De Lorenzo, Renata},
title         = {L'organizzazione dello Stato al tramonto dell'Antico Regime},
date          = {1990},
location      = {Napoli},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\begin{document}
\cite{delorenzo}. Text\footcite{granitoschiavino}
\printbibliography[heading=sc-comp]
\end{document}

答案1

biblatex使用当前版本的

\DeclareDelimFormat{editortypedelim}{\addspace}

删除逗号(另请参阅删除 biblatex 中编辑器名称后的逗号您链接的)。

但我认为我们在你之前的一个问题中已经确定,你使用的是一个非常过时的版本biblatexbiblatex (verbose-trad2) - 引文中的首字母和参考书目中的全名),因此如果上述代码不起作用,那么您很遗憾需要直接修改相关的 bibmacros。

\makeatletter
\renewbibmacro*{bbx:editor}[1]{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\printnames{editor}%
        \setunit{\addspace}%
        \usebibmacro{bbx:savehash}}%
     \usebibmacro{#1}%
     \clearname{editor}}
    {\global\undef\bbx@lasthash}}
\makeatother

我本来预计在这种情况下BibLaTeX:删除编辑者姓名后的逗号也应该可以工作,但也许还有其他事情发生。

它使用在 Overleaf 上运行的一些较旧的 TeX Live 实例测试了这种方法,并且它在那里有效。(一般来说,当您使用过时的系统时,这里的人们很难用您正在运行的确切软件包版本测试他们的建议。这里的许多人都有一个相当新的系统,所以代码通常用它测试。)

相关内容