biblatex 中文本引用注释的分隔符

biblatex 中文本引用注释的分隔符

在问题中Biblatex:对于非数字的引用,没有 \postnotedelim,我学会了如何在引用不包含数字时删除后注分隔符,方法是将其添加到序言中:

\renewcommand{\postnotedelim}{\iffieldnums{postnote}{\addcolon}{\addspace}}

但是,这也删除了常规引用和“评论”样式引用(例如“NN pc”)之间的分隔符(参见使用 biblatex 为文本引用添加自定义信息)。

问题是,我如何确保“常规”引用和“注释”之间的分隔符与用于分隔“常规”引用的字符(逗号、分号)相同?

\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\DeclareFieldFormat{postnote}{#1}
\renewcommand{\multicitedelim}{\addcomma\space}
\renewcommand{\postnotedelim}{\iffieldnums{postnote}{\addcolon}{\addspace}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{lennon1972,
    AUTHOR = "John Lennon",
    TITLE = "Who did what in the Beatles",
    YEAR = "1972"}
@book{starkey1994,
    AUTHOR = "Richard Starkey",
    TITLE = "I'm the drummer",
    YEAR = "1994"}
@ONLINE{archiveZ,
    TITLE = "Archive Z",
    SHORTHAND = "Archive Z",
    URL = "http://www.archivez.com",
    URLDATE = "2013-03-22"}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
I know from books and people I have talked to that George Harrison
played the guitar in the Beatles \parencites(Paul McCartney p.c.)
[48]{lennon1972}[103]{starkey1994}[no. 58]{archiveZ}
\end{document}

在此处输入图片描述

引用最好是这样的:

(列侬 1972:48,斯塔基 1994:103,档案 Z 号 58,保罗·麦卡特尼 pc)

答案1

新的解决方案根据明确的要求。

您应该自定义multipostnote在结束文本之前添加适当的标点符号,而不会影响实际引用的各个后注:

\DeclareFieldFormat{multipostnote}{\addcomma\addspace #1}

示例输出

\documentclass{article}

\usepackage[style=authoryear]{biblatex}

\DeclareFieldFormat{postnote}{#1}
\renewcommand{\postnotedelim}{\iffieldnums{postnote}{\addcolon}{\addspace}}
\DeclareFieldFormat{multipostnote}{\addcomma\addspace #1}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{lennon1972,
    AUTHOR = "John Lennon",
    TITLE = "Who did what in the Beatles",
    YEAR = "1972"}
@book{starkey1994,
    AUTHOR = "Richard Starkey",
    TITLE = "I'm the drummer",
    YEAR = "1994"}
@ONLINE{archiveZ,
    TITLE = "Archive Z",
    SHORTHAND = "Archive Z",
    URL = "http://www.archivez.com",
    URLDATE = "2013-03-22"}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
I know from books and people I have talked to that George Harrison
played the guitar in the Beatles \parencites(Paul McCartney
p.c.)[48]{lennon1972}[103]{starkey1994}.

I know from books and people I have talked to that George Harrison
played the guitar in the Beatles \parencites(Paul McCartney
p.c.)[48]{lennon1972}{starkey1994}.


I know from books and people I have talked to that George Harrison
played the guitar in the Beatles \parencites(Paul McCartney p.c.)
[48]{lennon1972}[103]{starkey1994}[no. 58]{archiveZ}
\end{document}

相关内容