Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
288 lines (266 sloc) 7.03 KB
% $Id: maldini.bbx,v 0.1 2011/09/28 brad $
\ProvidesFile{maldini.bbx}
[\abx@bbxid $Id: maldini.bbx,v 0.1 2011/09/28 biblatex bradweslake $]
\RequireBibliographyStyle{standard}
\ExecuteBibliographyOptions{labelyear,sorting=nyt,pagetracker}
\DeclareFieldFormat{shorthandwidth}{#1}
\setlength{\bibitemsep}{0pt}
\DeclareFieldFormat{title}{\mkbibemph{#1\addcomma}}
\renewbibmacro*{in:}{%
\bibstring{in}
}
\DefineBibliographyStrings{english}{%
pages = {pp\adddot},
page = {p\adddot},
volume = {Vol\adddot},
number = {No\adddot}
}
\renewbibmacro*{issue+date}{%
\iffieldundef{issue}
{\iffieldundef{month}
{\printfield{year}}
{\iffieldundef{day}
{\printfield{month}%
\setunit{\addspace}%
\printfield{year}}
{\printtext{\bibdate}}}}
{\printfield{issue}%
\setunit{\addspace}%
\printfield{year}}%
\newunit}
\renewbibmacro*{journal+issuetitle}{%
\usebibmacro{journal}%
\setunit*{\addspace}
\newunit
\newblock%
\iffieldundef{series}
{}
{\newunit
\printfield{series}%
\setunit{\addspace}}%
\setunit*{\addcomma\addspace}%
\iffieldundef{volume}
{}
{\bibstring{volume}
\addspace
\printfield{volume}%
}
\setunit*{\addcomma\space}%
\iffieldundef{number}
{}
{\bibstring{number}
\printfield{number}%
}%
\setunit{\addcomma\space}
\printfield{eid}%
\usebibmacro{issue+date}%
\newunit\newblock
\usebibmacro{issue}%
\newunit}
\renewbibmacro*{byeditor+others}{%
\ifnameundef{editor}
{}
{\def\@tempa{byeditor}%
\@tempswafalse
\ifnamesequal{editor}{translator}
{\edef\@tempa{\@tempa tr}%
\@tempswatrue
\clearname{translator}}
{}%
\ifnamesequal{editor}{commentator}
{\edef\@tempa{\@tempa co}%
\@tempswatrue
\clearname{commentator}}
{\ifnamesequal{editor}{annotator}
{\edef\@tempa{\@tempa an}%
\@tempswatrue
\clearname{annotator}}
{}}%
\ifnamesequal{editor}{introduction}
{\edef\@tempa{\@tempa in}%
\@tempswatrue
\clearname{introduction}}
{\ifnamesequal{editor}{foreword}
{\edef\@tempa{\@tempa fo}%
\@tempswatrue
\clearname{foreword}}
{\ifnamesequal{editor}{afterword}
{\edef\@tempa{\@tempa af}%
\@tempswatrue
\clearname{afterword}}
{}}}%
\if@tempswa
\bibstring{\@tempa}\space
\printnames[byeditor]{editor}%
\else
\usebibmacro{byeditor}%
\fi
\clearname{editor}%
\newunit}%
\usebibmacro{bytranslator+others}}
\DeclareBibliographyDriver{article}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{title}%
\addcomma
\printlist{language}%
\usebibmacro{byauthor}%
\usebibmacro{byeditor+others}%
\printfield{version}%
\usebibmacro{in:}%
\usebibmacro{journal+issuetitle}%
\setunit{\bibpagespunct}%
\printfield{pages}
\newunit\newblock
\printfield{note}%
\printfield{issn}%
\newunit\newblock
\printfield{doi}%
\newunit\newblock
\usebibmacro{eprint}
\newunit\newblock
\usebibmacro{url+urldate}%
\newunit\newblock
\printfield{addendum}%
\newunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{incollection}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{title}%
\addcomma
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{in:}%
\usebibmacro{maintitle+booktitle}%
\setunit{\addcomma\space}
\usebibmacro{byeditor+others}%
\newunit\newblock
\printfield{edition}%
\newunit
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\printfield{volumes}%
\setunit{\addcomma\space}
\usebibmacro{series+number}%
\setunit{\addcomma\space}
\usebibmacro{publisher+location+year}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\printfield{isbn}%
\newunit\newblock
\printfield{doi}%
\newunit\newblock
\usebibmacro{eprint}
\newunit\newblock
\usebibmacro{url+urldate}%
\newunit\newblock
\printfield{addendum}%
\newunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
\renewenvironment*{thebibliography}
{\list
{}
{\setlength{\leftmargin}{\bibhang}%
\setlength{\itemindent}{-\leftmargin}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}}
{\endlist}
\InitializeBibliographyStyle{%
\global\undef\bbx@lasthash}
\renewbibmacro*{author}{%
\ifthenelse{\ifuseauthor\AND\NOT\ifnameundef{author}}
{\ifthenelse{\iffieldequals{namehash}{\bbx@lasthash}\AND
\NOT\iffirstonpage}
{\bibnamedash}
{\savefield{namehash}{\bbx@lasthash}%
\printnames{author}%
\iffieldundef{authortype}
{\setunit{\addspace}}
{\setunit{\addcomma\space}}}%
\iffieldundef{authortype}
{}
{\usebibmacro{authorstrg}%
\setunit{\addspace}}}%
{\global\undef\bbx@lasthash
\usebibmacro{labeltitle}%
\setunit*{\addspace}}%
\usebibmacro{year+labelyear}}
\renewbibmacro*{editor}{%
\ifthenelse{\ifuseeditor\AND\NOT\ifnameundef{editor}}
{\ifthenelse{\iffieldequals{namehash}{\bbx@lasthash}\AND
\NOT\iffirstonpage}
{\bibnamedash}
{\savefield{namehash}{\bbx@lasthash}%
\printnames{editor}\addcomma\space}%
\usebibmacro{editorstrg}%
\clearname{editor}%
\setunit{\addspace}}%
{\global\undef\bbx@lasthash
\usebibmacro{labeltitle}%
\setunit*{\addspace}}%
\usebibmacro{year+labelyear}}
\newbibmacro*{year+labelyear}{%
\iffieldundef{year}
{}
{ \addperiod%
\setunit*{\addspace}
\printfield{labelyear}\printfield{extrayear}
}}
\newbibmacro*{labeltitle}{%
\iffieldundef{label}
{\iffieldundef{shorttitle}
{\printfield{title}%
\clearfield{title}}
{\printfield[title]{shorttitle}}}
{\printfield{label}}}
\renewbibmacro*{issue+date}{%
\ifthenelse{\iffieldundef{issue}\AND\iffieldundef{month}}
{}
{\iffieldundef{issue}
{\iffieldundef{day}
{\printfield{month}%
\setunit{\addspace}%
\printfield{year}}
{\printtext{\bibdate}}}
{\printfield{issue}%
\setunit{\addspace}%
\printfield{year}}}%
\newunit}
\renewbibmacro*{publisher+location+year}{%
\printlist{publisher}%
\setunit{\addcomma\space}
\printlist{location}%
\newunit}
\renewbibmacro*{institution+location+year}{%
\printlist{location}%
\setunit*{\addcolon\space}%
\printlist{institution}%
\newunit}
\renewbibmacro*{location+year}{%
\printlist{location}}
\renewbibmacro*{date}{%
\iffieldundef{year}
{}
{\iffieldundef{month}
{}
{\iffieldundef{day}
{\printfield{month}%
\setunit{\addspace}%
\printfield{year}}
{\printtext{\bibdate}}}}}
\endinput
You can’t perform that action at this time.