The leading names in the current author
/editor
could be compared with the previous bibliography entry's author
/editor
using internal lists from etoolbox
. These lists can be built up with \indexnames
.
Some counters and tracking of the last entry's gender
field help ensure that the names are properly delimited and use of the appropriate idem
bibliography string.
For simplicity I've assumed no truncation of author
/editor
. It is possible to permit truncation. However the resulting style would be rather ambiguous; recurrent andothers
read identically, but could refer to different authors/editors.
The solution could definitely be made more efficient, probably with the use of a routine that drops a specified number of elements from the end of a given list. It could also make smarter use of information available in the gender
field, either from entries before just the last one or from the current entry.
\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=authortitle,% Based on this style
maxbibnames=99,% Solution assumes no truncation
backend=biber,% Needed if using hash field
sorting=nyt,
abbreviate=false]{biblatex}
\newcounter{bbx:idemcount}
\newcounter{bbx:namecount}
\newbibmacro*{bbx:printlist}[1]{%
\global\csundef{bbx:namelist}%
\global\csundef{bbx:checklist}%
\setcounter{bbx:namecount}{0}%
\indexnames[bbx:checklist]{#1}%
\ifcsequal{bbx:checklist}{bbx:idemlist}
{\ifnumequal{\value{bbx:namecount}-\value{bbx:idemcount}}{1}
{\let\finalandcomma=\empty}
{}%
\printnames[idem:first-last]{#1}}
{\printnames{#1}}}
\DeclareIndexNameFormat{bbx:checklist}{%
\addtocounter{bbx:namecount}{1}%
\listcsxadd{bbx:namelist}{\thefield{hash}}% Or #4 #5 #1 might be sufficient
\ifnumgreater{\value{listcount}}{\value{bbx:idemcount}}
{}
{\listcsxadd{bbx:checklist}{\thefield{hash}}}}
% authortitle uses sortname format - i.e. last-first/first-last
% Use \biblstring \bibxlstring for long idem, irrespective of
% the abbreviate option setting
\DeclareNameFormat{idem:first-last}{%
\ifnumequal{\value{listcount}}{1}
{\ifboolexpr{ test {\ifbibxstring{idem\csuse{bbx:idemgender}}}
and test {\ifcsdef{bbx:idemgender}} }
{\bibstring[\mkbibbold]{idem\csuse{bbx:idemgender}}}
{\ifnumgreater{\value{bbx:idemcount}}{1}
{\bibstring[\mkbibbold]{idempn}}
{\bibstring[\mkbibbold]{idemsn}}}}
{\ifnumgreater{\value{listcount}}{\value{bbx:idemcount}}
{\iffirstinits
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}}
{}}}
\newbibmacro*{bbx:savelist}{%
\savefieldcs{gender}{bbx:idemgender}%
\setcounter{bbx:idemcount}{\value{bbx:namecount}}%
\csxdef{bbx:idemlist}{\csuse{bbx:namelist}}}
\renewbibmacro*{author}{%
\ifboolexpr{ test {\ifuseauthor}
and not test {\ifnameundef{author}} }
{\usebibmacro{bbx:printlist}{author}%
\setunit{\addcomma\space}%
\usebibmacro{bbx:savelist}%
\usebibmacro{authorstrg}}
{\global\csundef{bbx:idemlist}%
\setcounter{bbx:idemcount}{0}}}
\renewbibmacro*{bbx:editor}[1]{%
\ifboolexpr{ test {\ifuseeditor}
and not test {\ifnameundef{editor}} }
{\usebibmacro{bbx:printlist}{editor}%
\setunit{\addcomma\space}%
\usebibmacro{bbx:savelist}%
\usebibmacro{#1}%
\clearname{editor}}
{\global\csundef{bbx:idemlist}%
\setcounter{bbx:idemcount}{0}}}
\renewbibmacro*{bbx:translator}[1]{%
\ifboolexpr{ test {\ifusetranslator}
and not test {\ifnameundef{translator}} }
{\usebibmacro{bbx:printlist}{translator}%
\setunit{\addcomma\space}%
\usebibmacro{bbx:savelist}%
\usebibmacro{#1}%
\clearname{translator}}
{\global\csundef{bbx:idemlist}%
\setcounter{bbx:idemcount}{0}}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@BOOK{book1,
author = {Buchautor, Emma-Louise},
gender = {sf},
title = {First Title},
date = {2001}}
@BOOK{book2,
author = {Buchautor, Emma-Louise},
title = {Same female author},
date = {2002}}
@BOOK{book3,
author = {Buchautor, Emma-Louise and van Helsing, Sarah},
gender = {pf},
title = {Same first author whose gender is unspecified},
date = {2003}}
@BOOK{book4,
author = {Buchautor, Emma-Louise and van Helsing, Sarah and Knuth, Donald E.},
gender = {pp},
title = {Same first and second female authors},
date = {2004}}
@BOOK{book5,
editor = {Buchautor, Emma-Louise and van Helsing, Sarah and Knuth, Donald E. and Cicero, Marcus Tullius},
gender = {pp},
title = {Same leading names of mixed genders},
date = {2005}}
@BOOK{book6,
editor = {van Helsing, Abraham},
title = {Different name},
date = {2006}}
@BOOK{book7,
author = {van Helsing, Abraham},
gender = {sm},
translator = {van Helsing, Abraham},
title = {Same male name},
date = {2007}}
@BOOK{book8,
editor = {van Helsing, Abraham and Jackson, Tom},
gender = {pm},
translator = {Cicero, Marcus Tullius},
title = {Same first male author},
date = {2008}}
@BOOK{book9,
author = {van Helsing, Abraham and Jackson, Tom},
title = {Same male names},
date = {2009}}
@BOOK{book10,
author = {van Helsing, Abraham and Jackson, Tom},
gender = {pm},
title = {Same authors of unspecified gender},
date = {2010}}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
For comparison here is the same bibliography generated with no changes to the authortitle
bibliography macros:
Yes, it would. :-) Namely, the shortauthor
field:
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{biblatextest.bib}
@book{long,
author={{Very long long long long author}},
shortauthor={Shortauthor},
year={2011},
title={Title},
publisher={Publisher},
}
\end{filecontents}
% \bibliography{biblatextest}% Syntax for version <= 1.1b
\addbibresource{biblatextest.bib}% Syntax for version >= 1.2
\begin{document}
Some text \autocite{long}.
\printbibliography
\end{document}
Best Answer
Here how I finally managed to do it, using code from the
Biblatex-dw
styles. I added in thecbx
:Where
first-last-upshape
is the format to be used in notes, with full first name the first time, and only initials the others. I then, in thebbx
, defined two macros, inspired from thehistorische-zeitschrift
style, to be applied in the full note (et al. only after ten names) and short notes (et al. after three names), each time specifying that idem/eadem/etc. should be used for the same author in two following references :Here is what it looks like :
In following references :
In a further reference :