下列书通过两个不同的 isbn 号引用:在线 isbn 和印刷 isbn。有没有办法用 biblatex 反映这一点?
@BOOK{AcaryBrogliato201011,
title={Numerical Methods for Nonsmooth Dynamical Systems: Applications in Mechanics and Electronics (Lecture Notes in Applied and Computational Mechanics)},
author={Vincent Acary and Bernard Brogliato},
publisher={Springer},
date={2010},
month={11},
edition={Softcover reprint of hardcover 1st ed. 2008},
isbn_online={9783540753926},
isbn_print={9783642094644},
url={http://amazon.de/o/ASIN/3642094643/},
price={EUR 245,03},
totalpages={548},
timestamp={2013.04.25},
}
答案1
注意:biber
需要(充分)享受以下代码。
为了BibLaTeX
处理在线和打印 ISBN,我们需要在数据模型文件中注册字段,最简单的方法是<style>.dbx
在工作目录中创建一个。
\ProvidesFile{authortitle.dbx}
\DeclareDatamodelFields[type=field,datatype=literal]{isbnonline}
\DeclareDatamodelFields[type=field,datatype=literal]{isbnprint}
\DeclareDatamodelEntryfields{isbnonline,isbnprint}
现在biber
知道BibLaTeX
了字段,我们需要以BibLaTeX
一种良好的格式打印它
\DeclareFieldFormat{isbnonline}{\mkbibacro{ISBN}~(online)\addcolon\space #1}% we need some format ..
\DeclareFieldFormat{isbnprint}{\mkbibacro{ISBN}~(print)\addcolon\space #1}% ... just stole it from standard ISBN
我们只需修补参考书目驱动程序,即可打印我们的在线和印刷 ISBN。使用以下命令修补驱动程序(包括\printfield{isbn}
)非常简单\patchmoreisbn{book}
。
\newcommand*{\patchmoreisbn}[1]{% let all drivers include the isbn
\xpatchbibdriver{#1}%
{\printfield{isbn}}
{\printfield{isbn}%
\newunit\newblock
\printfield{isbnprint}%
\newunit\newblock
\printfield{isbnonline}}%
{\typeout{patching #1 to include more ISBNs succeded}}%
{\typeout{patching #1 to include more ISBNs failed}}%
}
完整的 MWE
\documentclass[ngerman, a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{xpatch}% to patch the editor macros
\usepackage[style=authortitle, backend=biber]{biblatex}
\addbibresource{\jobname.bib}
\begin{filecontents}{authortitle.dbx}
\ProvidesFile{authortitle.dbx}
\DeclareDatamodelFields[type=field,datatype=literal]{isbnonline}
\DeclareDatamodelFields[type=field,datatype=literal]{isbnprint}
\DeclareDatamodelEntryfields{isbnonline,isbnprint}
\end{filecontents}
\begin{filecontents}{\jobname.bib}
@book{AcaryBrogliato201011,
title = {Numerical Methods for Nonsmooth Dynamical Systems},
subtitle = {Applications in Mechanics and Electronics},
titleaddon = {Lecture Notes in Applied and Computational Mechanics},
author = {Vincent Acary and Bernard Brogliato},
publisher = {Springer},
date = {2010},
month = {11},
edition = {1},
isbnonline = {978-3-540-75392-6},
isbnprint = {978-3-642-09464-4},
}
@book{Heuser:Analysis1,
author = {Harro Heuser},
title = {Lehrbuch der Analysis Teil 1},
edition = {17., aktualisierte},
date = {2009},
gender = {sm},
isbn = {978-3-8384-0777-9},
publisher = {Vieweg+Teubner},
location = {Wiesbaden},
}
\end{filecontents}
\DeclareFieldFormat{isbnonline}{\mkbibacro{ISBN}~(online)\addcolon\space #1}% we need some format ..
\DeclareFieldFormat{isbnprint}{\mkbibacro{ISBN}~(print)\addcolon\space #1}% ... just stole it from standard ISBNa
\newcommand*{\patchmoreisbn}[1]{% let all drivers include the isbn
\xpatchbibdriver{#1}%
{\printfield{isbn}}
{\printfield{isbn}%
\newunit\newblock
\printfield{isbnprint}%
\newunit\newblock
\printfield{isbnonline}}%
{\typeout{patching #1 to include more ISBNs succeded}}%
{\typeout{patching #1 to include more ISBNs failed}}%
}
% patch all drivers
\patchmoreisbn{article}
\patchmoreisbn{book}
\patchmoreisbn{collection}
\patchmoreisbn{inbook}
\patchmoreisbn{incollection}
\patchmoreisbn{inproceedings}
\patchmoreisbn{manual}
\patchmoreisbn{periodical}
\patchmoreisbn{proceedings}
\patchmoreisbn{report}
\patchmoreisbn{thesis}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
生产