NB: biber
is needed to (fully) enjoy the following code.
To let BibLaTeX
deal with online and print ISBNs, we need register the fields in a datamodel file, the easiest way is to create a <style>.dbx
in the working directory.
\ProvidesFile{authortitle.dbx}
\DeclareDatamodelFields[type=field,datatype=literal]{isbnonline}
\DeclareDatamodelFields[type=field,datatype=literal]{isbnprint}
\DeclareDatamodelEntryfields{isbnonline,isbnprint}
Now biber
and BibLaTeX
know the field, we need to get BibLaTeX
to print it in a nice format
\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
We just patch the bibliography drivers to also print our online and print ISBN.
With the following command patching a driver (that includes \printfield{isbn}
) is as easy as \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}}%
}
The full 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}
produces
This problem is due to biblatex-apa
's (apa.bbx
's) apaauthor
name format; you might want to notify the author of this small bug.
The string and others
in the author list sets ifmorenames
to true. apaauthor
checks for this case whenever a name is printed, not just at the very end of the list; consequently it prints the andothers
string ("et al.") after each name.
The fix is to add the following lines to your preamble.
\DeclareNameFormat{apaauthor}{%
\ifthenelse{\value{listcount}=\maxprtauth\AND\value{listcount}<\value{listtotal}}
{\addcomma\addspace\ldots\addspace}
{\ifthenelse{\value{listcount}>\maxprtauth\AND\value{listcount}<\value{listtotal}}
{}
{\ifthenelse{\iffieldequalstr{doubtfulauthor}{true}}
{\mkbibbrackets{\usebibmacro{name:apa:last-first}{#1}{#3}{#4}{#5}{#7}?}}
{\usebibmacro{name:apa:last-first}{#1}{#3}{#4}{#5}{#7}}}}%
\ifthenelse{\value{listcount}=\value{listtotal}}% this test is new
{\ifmorenames{\andothersdelim\bibstring{andothers}}{}}{}}
The MWE
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@Article{boker2011,
Author = {Boker, S. and Neale, M. and Maes, H. and Wilde, M. and
Spiegel, M. and Brick, T. and Spies, J. and Estabrook,
R. and Kenny, S. and Bates, T. and others},
Title = {Open{M}x: {A}n open source extended structural
equation modeling framework},
Journal = {Psychometrika},
Volume = {76},
Number = {2},
Pages = {306--317},
year = 2011
}
\documentclass{apa6}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=apa,maxnames=999,sortcites=true,sorting=nyt,apabackref=true,backend=biber]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\DeclareNameFormat{apaauthor}{%
\ifthenelse{\value{listcount}=\maxprtauth\AND\value{listcount}<\value{listtotal}}
{\addcomma\addspace\ldots\addspace}
{\ifthenelse{\value{listcount}>\maxprtauth\AND\value{listcount}<\value{listtotal}}
{}
{\ifthenelse{\iffieldequalstr{doubtfulauthor}{true}}
{\mkbibbrackets{\usebibmacro{name:apa:last-first}{#1}{#3}{#4}{#5}{#7}?}}
{\usebibmacro{name:apa:last-first}{#1}{#3}{#4}{#5}{#7}}}}%
\ifthenelse{\value{listcount}=\value{listtotal}}
{\ifmorenames{\andothersdelim\bibstring{andothers}}{}}{}}
\shorttitle{IFA}
\begin{document}
OpenMx \parencite{boker2011,aksin,wilde,murray}
\printbibliography
\end{document}
then yields
Update 2013-10: This has been corrected in biblatex-apa
version 6.4 according to a comment below the question from user PLK.
Best Answer
You can clear the field conditionally for selected type(s):
A complete example