我希望我的书目中有一个录音制品/唱片类别。重要的字段包括:(author
艺术家)、、、date
(title
标签publisher
)、[某些字段](用于标签编号)、number
(例如,用于 CD 盒中的编号)。所需的输出类似于:
吉列尔斯,埃米尔(1985/1996)。贝多芬:奏鸣曲 3--5。收录于:贝多芬钢琴全集。CD/LP 编号 8。德意志留声机公司,453 221-2。
根据 papageno 的回答,我的代码现在如下:
%\renewbibmacro*{series}{\printseries}
\DeclareBibliographyDriver{audio}{
\usebibmacro{bibindex}
\usebibmacro{author}
%\space\mkbibparens{\printfield{year}}
\setunit{\labelnamepunct}\newblock
\usebibmacro{title}
\setunit{\labelnamepunct}\newblock
\printfield{series}
\newblock%\setunit{\addcomma\space}%
\mkbibparens{\thefield{type}~\printfield{number}}
\newunit
\printlist{publisher}
\newblock\setunit{\addcomma\space}
\printfield{userd}\space
\usebibmacro{finentry}
}
\DeclareFieldFormat[audio]{number}{~nr~#1}
我的参赛作品如下:
@audio{emil1996,
entrysubtype = "book",
author = {Giels, Emil},
year = {1985-1996},
title = {Beethoven: 29 Sonaten Gilels},
series = {Allihopa sonaterna},
publisher = {Deutsche Grammophon},
userd = {453 221-2},
type = {CD/LP},
number = {8}
}
这几乎完成了。但是它在系列单元前没有“In:”,后面也没有标点符号。我也不希望 CD/LP 编号周围有括号)现在显示为:
吉列尔斯,埃米尔(1985/1996)。贝多芬:奏鸣曲 3-5。贝多芬钢琴作品全集。 (CD/LP 编号 8)。德意志留声机公司,453 221-2。
原文应为:
吉列尔斯,埃米尔(1985/1996)。贝多芬:奏鸣曲 3-5。收录于:贝多芬钢琴作品全集。 CD/LP 编号 8。德意志留声机公司,453 221-2。
编辑:但是,如果没有系列字段,代码就会失败。有人有防水解决方案吗?
答案1
在 biblatex 中,存在一个具有 Historian 风格的音乐录音条目类型。因此,您可以在 @audio 类型中进行一些安排,或者创建一个新的类型,如下所示:
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=authoryear, sorting=nty, babel=hyphen, mincrossrefs=1, usetranslator=true]{biblatex}
\DeclareBibliographyDriver{recording}{
\usebibmacro{bibindex}
\usebibmacro{author}
\labelnamepunct
%\newblock
%\printfield{year} %only with other style than authoryear
%\labelnamepunct
\newblock
\printfield{title}
\labelnamepunct
\newblock
\iffieldundef{series}{}{\printfield{series}}%if true (no entry): nothing, if false: print the field
\labelnamepunct
\newblock
\iffieldundef{number}{}{\printfield{type}~\printfield{number}}
\labelnamepunct
\newblock
\printlist{publisher}
\newblock\setunit{\addcomma\space}
\printfield{userd}
\usebibmacro{finentry}
}
\DeclareFieldFormat[recording]{year}{\mkbibparens{#1}}
\DeclareFieldFormat[recording]{number}{~nr.~#1}
\DeclareFieldFormat[recording]{series}{In:~#1}
\DeclareFieldFormat[recording]{title}{\emph{#1}}
\bibliography{test_music.bib}
\title{An example of a personalised entry type @recording}
\begin{document}
\maketitle
\noindent
A recording reference with series: \cite{emil1996}.\\
A recording reference without series and no cd number: \cite{mutter2002}.\\
A recording reference with series left empty: \cite{souchon2012}.
\printbibliography
\end{document}
.bib 文件:
@recording{emil1996,
author = {Giels, Emil},
year = {1985-1996},
title = {Beethoven: 29 Sonaten Gilels},
series = {Allihopa sonaterna},
publisher = {Deutsche Grammophon},
userd = {453 221-2},
type = {CD/LP},
number = {8}
}
@recording{mutter2002,
author = {Mutter, Anne-Sophie},
year = {2002},
title = {Beethoven: Violin Concerto - Romances},
publisher = {Deutsche Grammophon},
userd = {471 379-2},
type = {CD},
}
@recording{souchon2012,
author = {Souchon, Alain},
year = {2012},
title = {A cause d'elles},
publisher = {EMI},
series = {},
userd = {50999 73066422}
}