删除附录前的标点符号

删除附录前的标点符号

如何删除“附录”字段前的标点符号?这是我的 MWE:

\documentclass{scrbook}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}

\usepackage[autostyle=true,german=quotes]{csquotes}
\usepackage[style=sbl,citepages=separate,backend=biber,sblfootnotes=false,ibidpage=true,ibidtracker=true,idemtracker=true,pagetracker=spread,sorting=nyvt,url=false,isbn=false,doi=false,clearlang=false,uniquename=false]{biblatex} 
\DeclareFieldFormat{addendum}{\mkbibparens{#1}}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{Prost,
 title = {Probe},
editor = {Prost, G.},
address = {Leipzig},
year = {1962},
endyear = {1964},
volumes = {4},
edition = {2},
addendum = {ND: München und Leipzig 2001},
}



\end{filecontents*}
\addbibresource{\jobname.bib}




\begin{document}
Test.\footnote{\cite[Vgl.][1]{Prost}.}
\printbibliography
\end{document}

在此处输入图片描述

我希望有:

Prost,G.,Hrsg。探测。 2. 奥夫拉4 旅。莱比锡,1962–1964 年(ND:慕尼黑和莱比锡 2001)。

答案1

\documentclass{scrbook}
\usepackage[ngerman]{babel}

\usepackage[autostyle=true,german=quotes]{csquotes}
\usepackage[style=sbl,citepages=separate,backend=biber,sblfootnotes=false,ibidpage=true,ibidtracker=true,idemtracker=true,pagetracker=spread,sorting=nyvt,url=false,isbn=false,doi=false,clearlang=false,uniquename=false]{biblatex} 

\usepackage{regexpatch}
\makeatletter
\xpatchcmd{\blx@imc@printfield}{\blx@imc@iffieldundef}{%
  \def\tempa{#2}%
  \def\tempb{addendum}%
  \ifx\tempa\tempb\setunit{\addspace}\fi% Just a space before the addendum
  \blx@imc@iffieldundef}{}{}
\makeatother

\DeclareFieldFormat{addendum}{\mkbibparens{#1}}% The addendum should be in parentheses

\begin{filecontents*}[overwrite]{\jobname.bib}
@book{Prost,
title = {Probe},
editor = {Prost, G.},
address = {Leipzig},
year = {1962},
endyear = {1964},
volumes = {4},
edition = {2},
addendum = {ND: München und Leipzig 2001},
}
\end{filecontents*}

\addbibresource{\jobname.bib}

\begin{document}

\nocite{*}
\printbibliography

\end{document}

在此处输入图片描述

相关内容