![更改同一作者的作品之间的引用分隔符(biblatex)](https://linux22.com/image/279033/%E6%9B%B4%E6%94%B9%E5%90%8C%E4%B8%80%E4%BD%9C%E8%80%85%E7%9A%84%E4%BD%9C%E5%93%81%E4%B9%8B%E9%97%B4%E7%9A%84%E5%BC%95%E7%94%A8%E5%88%86%E9%9A%94%E7%AC%A6%EF%BC%88biblatex%EF%BC%89.png)
biblatex
我可以使用 更改多个引文之间的分隔符\multicitedelim
,但这仅适用于不同作者的引文。但是,当我有同一作者的多个引文时,它似乎每次都会打印一个逗号。如下例所示,如果您使用其他符号(例如分号;
作为引文分隔符,逗号作为页面分隔符),这可能会非常令人困惑。
如何将同一作者的引用之间的分隔符设置为与不同作者之间的分隔符相同?
\documentclass{article}
\usepackage[style=authoryear, citestyle=authoryear-comp]{biblatex}
\DeclareFieldFormat{postnote}{#1}
\renewcommand{\postnotedelim}{\addcolon\addspace}
\renewcommand{\multicitedelim}{\addsemicolon\space}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@BOOK{lennon1971,
AUTHOR = "John Lennon",
TITLE = "My really long book on my life",
YEAR = "1971",
LOCATION = "Liverpool",
PUBLISHER = "Penny Lane Press"}
@BOOK{lennon1973,
AUTHOR = "John Lennon",
TITLE = "Music -- why I make it",
YEAR = "1973",
LOCATION = "London",
PUBLISHER = "Johnny Smith"}
@BOOK{mccartney1979,
AUTHOR = "Paul McCartney",
TITLE = "Penny Lane is still in my ears",
YEAR = "1979",
LOCATION = "New York",
PUBLISHER = "Peter Alden"}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cites[282, 1967]{lennon1971}{lennon1973}{mccartney1979}
\printbibliography
\end{document}
答案1
biblatex
提供了大量的分隔符,其中包括(定义来自biblatex.def
)
\newcommand*{\multicitedelim}{\addsemicolon\space}
\newcommand*{\compcitedelim}{\addcomma\space}
\newcommand*{\supercitedelim}{\addcomma}
你想要的可能是\renewcommand{\compcitedelim}{\multicitedelim}
。
平均能量损失
\documentclass{article}
\usepackage[style=authoryear-comp]{biblatex}
\DeclareFieldFormat{postnote}{#1}
\renewcommand{\postnotedelim}{\addcolon\addspace}
\renewcommand{\multicitedelim}{\addsemicolon\space}
\renewcommand{\compcitedelim}{\multicitedelim}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@BOOK{lennon1971,
AUTHOR = "John Lennon",
TITLE = "My really long book on my life",
YEAR = "1971",
LOCATION = "Liverpool",
PUBLISHER = "Penny Lane Press"}
@BOOK{lennon1973,
AUTHOR = "John Lennon",
TITLE = "Music -- why I make it",
YEAR = "1973",
LOCATION = "London",
PUBLISHER = "Johnny Smith"}
@BOOK{mccartney1979,
AUTHOR = "Paul McCartney",
TITLE = "Penny Lane is still in my ears",
YEAR = "1979",
LOCATION = "New York",
PUBLISHER = "Peter Alden"}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cites[282, 1967]{lennon1971}{lennon1973}{mccartney1979}
\printbibliography
\end{document}
产量