我对参考书目有一些疑问。对于我想要的几乎所有更改,我都找到了解决方案,但这两个问题除外:
1:我想将名字后的分隔符改为:“Panzer, Paul; Mustermann, Max”而不是“Panzer, Paul, Mustermann, Max”。
2:我怎样才能将“&”改为“;”(但只在参考书目中而不是在引文中!)
非常感谢 :-)
这是我使用的代码:
\documentclass[a4paper,11pt,DIV=calc, titlepage]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{filecontents}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[style=authoryear-ibid,natbib=true, maxbibnames=9,maxcitenames=2,uniquelist=false, backend=biber]{biblatex}
\renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}
\DefineBibliographyStrings{ngerman}{
andothers = {{et\,al\adddot}},
}
\renewcommand{\finalnamedelim}[0]{\addspace\&\addspace}
\DeclareNameAlias{sortname}{last-first}
\DeclareNameAlias{default}{last-first}
\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{citetitle}{#1} %Anführungszeichen um Titel entfernen
\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{title}{#1}
\addbibresource{literature.bib}
\begin{filecontents}{literature.bib}
@Article{Pa2015,
Title = {The Test},
Author = {Paul Panzer and Max Mustermann and Bananen Baum},
Journaltitle = {bla bla},
Year = {2015},
Owner = {Me},
Timestamp = {2014.08.14}
}
\end{filecontents}
\begin{document}
test \parencite{Pa2015}\\
\printbibliography
It should look like this:\\
\textsc{Panzer}, Paul; \textsc{Mustermann}, Max; \textsc{Baum}, Bananen (2015). The test. In: \textit{bla bla.}\\
\end{document}
答案1
对于你的第一个问题,你想改变multinamedelim
,在你的情况下可能
\DeclareDelimFormat{multinamedelim}{\addsemicolon\space}
在这个例子中,这没有什么区别,但我想说
\DeclareDelimFormat[bib]{multinamedelim}{\addsemicolon\space}
仅在参考书目中更改分隔符,并让引用保留逗号。
对于第二项,你想要
\DeclareDelimFormat{finalnamedelim}{\addspace\&\space}
在引用中得到“&”和
\DeclareDelimAlias[bib]{finalnamedelim}{multinamedelim}
在参考书目中改回“;”。
平均能量损失
\documentclass[a4paper,11pt,DIV=calc, titlepage]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[autostyle, german=quotes]{csquotes}
\usepackage[
backend=biber,
style=authoryear-ibid,
maxbibnames=9,maxcitenames=2,
uniquelist=false,
natbib=true,
]{biblatex}
\DefineBibliographyStrings{ngerman}{
andothers = {et\,al\adddot},
}
\DeclareNameAlias{default}{family-given}
\DeclareNameAlias{sortname}{default}
\renewcommand*{\mkbibnamefamily}{\textsc}
\DeclareDelimFormat[bib]{multinamedelim}{\addsemicolon\space}
\DeclareDelimFormat{finalnamedelim}{\addspace\&\space}
\DeclareDelimAlias[bib]{finalnamedelim}{multinamedelim}
\DeclareFieldFormat[
article,inbook,incollection,inproceedings,
patent,thesis,unpublished
]{citetitle}{#1}
\DeclareFieldFormat[
article,inbook,incollection,inproceedings,
patent,thesis,unpublished
]{title}{#1}
\begin{filecontents}{\jobname.bib}
@Article{Pa2015,
Title = {The Test},
Author = {Paul Panzer and Max Mustermann and Bananen Baum},
Journaltitle = {bla bla},
Year = {2015},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\begin{document}
test \autocite{Pa2015}
\autocite{sigfridsson}
\printbibliography
It should look like this:
\textsc{Panzer}, Paul; \textsc{Mustermann}, Max; \textsc{Baum}, Bananen (2015).
The test. In: \textit{bla bla.}
\end{document}
笔记此答案已更新为使用上下文敏感的分隔符。如果您使用的是旧版本,biblatex
并且命令不可用,请查看编辑历史记录。