我最近偶然发现了一本多卷书,其中的每一卷实际上都以“部分”的名称命名(第一部分和二,以保证完整性)。我想将其引用为一本多卷书。虽然这通常很容易用@mvbook
及其朋友来实现,但这种结果通常会导致每卷都被称为卷。有没有办法告诉biblatex
这些,而且只有这些,才被称为部分?“只有这些”这个评论很重要,因为我还有其他条目确实被称为卷。我还想知道解决方案是否取决于特定的书目风格,或者是否有一个通用的解决方案。
或者,有没有更好的方法来做到这一点? 是否应该这样做?
MWEB(采用当前biblatex
方法并期望得到的结果thebibliography
):
\documentclass{article}
\usepackage{biblatex}
\begin{filecontents}{\jobname.bib}
@book{rudolph2013DifferentialGeometryMathematical,
title = {Differential Geometry and Mathematical Physics},
author = {Rudolph, Gerd and Schmidt, Matthias},
date = {2013/2017},
series = {Theoretical and Mathematical Physics},
publisher = {Springer},
location = {Dordrecht},
langid = {english},
volumes = {2},
related = {rudolph2013ManifoldsLieGroups,rudolph2017FibreBundlesTopology},
relatedtype = {multivolume}
}
@book{rudolph2013ManifoldsLieGroups,
title = {Manifolds, {{Lie}} Groups and {{Hamiltonian}} Systems},
author = {Rudolph, Gerd and Schmidt, Matthias},
date = {2013},
series = {Theoretical and Mathematical Physics},
volume = {1},
publisher = {Springer},
location = {Dordrecht},
doi = {10.1007/978-94-007-5345-7},
langid = {english}
}
@book{rudolph2017FibreBundlesTopology,
title = {Fibre Bundles, Topology and Gauge Fields},
author = {Rudolph, Gerd and Schmidt, Matthias},
date = {2017},
series = {Theoretical and Mathematical Physics},
volume = {2},
publisher = {Springer},
location = {Dordrecht},
doi = {10.1007/978-94-024-0959-8},
langid = {english}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\pagestyle{empty}
\begin{document}
\nocite{*}
\printbibliography
\begin{thebibliography}{99}
%
\bibitem{rudolph2013DifferentialGeometryMathematical}
Gerd Rudolph and Matthias Schmidt. \emph{Differential Geometry and
Mathematical Physics}. 2 parts. Theoretical and Mathematical Physics.
Dordrecht: Springer, 2013–2017.
Part 1: \emph{Manifolds, {{Lie}} Groups and {{Hamiltonian}}
Systems}. 2013.
Part 2: \emph{Fibre Bundles, Topology and Gauge Fields}. 2017.
%
\bibitem{rudolph2017FibreBundlesTopology}
Gerd Rudolph and Matthias Schmidt. \emph{Fibre Bundles, Topology
and Gauge Fields}. Part 2. Theoretical and Mathematical Physics.
Dordrecht: Springer, 2017. \textsc{doi}: 10.1007/978-94-024-0959-8.
%
\bibitem{rudolph2013ManifoldsLieGroups}
Gerd Rudolph and Matthias Schmidt. \emph{Manifolds, {{Lie}} Groups
and {{Hamiltonian}} Systems}. Part 1. Theoretical and Mathematical
Physics. Dordrecht: Springer, 2013. \textsc{doi}:
10.1007/978-94-007-5345-7.
\end{thebibliography}
\end{document}
目前结果:
期望结果:
答案1
见下文。此解决方案向数据模型添加“部分”并更改条目.bib
。您可以保留它们原样,并使用源映射更改volumes->parts
选定volume->part
条目。
\documentclass{article}
% Add "parts" to the datamodel as it's not in there by default
\begin{filecontents}[force]{\jobname.dbx}
\DeclareDatamodelFields[type=field, datatype=literal]{%
parts}
\DeclareDatamodelEntryfields{%
parts}
\end{filecontents}
\begin{filecontents}[force]{\jobname.bib}
@book{rudolph2013DifferentialGeometryMathematical,
title = {Differential Geometry and Mathematical Physics},
author = {Rudolph, Gerd and Schmidt, Matthias},
date = {2013/2017},
series = {Theoretical and Mathematical Physics},
publisher = {Springer},
location = {Dordrecht},
langid = {english},
parts = {2},
related = {rudolph2013ManifoldsLieGroups,rudolph2017FibreBundlesTopology},
relatedtype = {multivolume}
}
@book{rudolph2013ManifoldsLieGroups,
title = {Manifolds, {{Lie}} Groups and {{Hamiltonian}} Systems},
author = {Rudolph, Gerd and Schmidt, Matthias},
date = {2013},
series = {Theoretical and Mathematical Physics},
part = {1},
publisher = {Springer},
location = {Dordrecht},
doi = {10.1007/978-94-007-5345-7},
langid = {english}
}
@book{rudolph2017FibreBundlesTopology,
title = {Fibre Bundles, Topology and Gauge Fields},
author = {Rudolph, Gerd and Schmidt, Matthias},
date = {2017},
series = {Theoretical and Mathematical Physics},
part = {2},
publisher = {Springer},
location = {Dordrecht},
doi = {10.1007/978-94-024-0959-8},
langid = {english}
}
\end{filecontents}
\usepackage[datamodel=\jobname]{biblatex}
\addbibresource{\jobname.bib}
\NewBibliographyString{parts}
\DefineBibliographyStrings{english}{%
parts = {Parts}}
\DeclareFieldFormat{part}{\bibstring{part}~#1}
\DeclareFieldFormat{parts}{#1~\bibstring{parts}}
\DeclareBibliographyDriver{book}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others/translator+others}%
\setunit{\printdelim{nametitledelim}}\newblock
\usebibmacro{maintitle+title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\printfield{edition}%
\newunit
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\iffieldundef{volumes}{\printfield{parts}}{\printfield{volumes}}%
\newunit\newblock
\usebibmacro{series+number}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{publisher+location+date}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit
\printfield{pagetotal}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
另一种无需修改驱动程序即可完成此操作的方法如下,这里我们向数据添加一个自定义字段,.bib
以告知volume/volumes
字段格式我们想要的是零件而不是体积。您可以在格式代码中相当明显地修改它,以条件化您想要的条目中的任何数据。
\documentclass{article}
% Add "parts" to the datamodel as it's not in there by default
\begin{filecontents}[force]{\jobname.dbx}
\DeclareDatamodelFields[type=field, datatype=literal]{%
parts}
\DeclareDatamodelEntryfields{%
parts}
\end{filecontents}
\begin{filecontents}[force]{\jobname.bib}
@book{rudolph2013DifferentialGeometryMathematical,
usera = {parts},
title = {Differential Geometry and Mathematical Physics},
author = {Rudolph, Gerd and Schmidt, Matthias},
date = {2013/2017},
series = {Theoretical and Mathematical Physics},
publisher = {Springer},
location = {Dordrecht},
langid = {english},
volumes = {2},
related = {rudolph2013ManifoldsLieGroups,rudolph2017FibreBundlesTopology},
relatedtype = {multivolume}
}
@book{rudolph2013ManifoldsLieGroups,
usera = {parts},
title = {Manifolds, {{Lie}} Groups and {{Hamiltonian}} Systems},
author = {Rudolph, Gerd and Schmidt, Matthias},
date = {2013},
series = {Theoretical and Mathematical Physics},
volume = {1},
publisher = {Springer},
location = {Dordrecht},
doi = {10.1007/978-94-007-5345-7},
langid = {english}
}
@book{rudolph2017FibreBundlesTopology,
usera = {parts},
title = {Fibre Bundles, Topology and Gauge Fields},
author = {Rudolph, Gerd and Schmidt, Matthias},
date = {2017},
series = {Theoretical and Mathematical Physics},
volume = {2},
publisher = {Springer},
location = {Dordrecht},
doi = {10.1007/978-94-024-0959-8},
langid = {english}
}
\end{filecontents}
\usepackage[datamodel=\jobname]{biblatex}
\addbibresource{\jobname.bib}
\NewBibliographyString{parts}
\DefineBibliographyStrings{english}{%
parts = {Parts}}
\DeclareFieldFormat{volumes}{\iffieldequalstr{usera}{parts}{#1~\bibstring{parts}}{#1~\bibstring{volumes}}}
\DeclareFieldFormat{volume}{\iffieldequalstr{usera}{parts}{\bibstring{part}~#1}{\bibstring{volume}~#1}}
\begin{document}
\nocite{*}
\printbibliography
\end{document}