Skip to content

Commit

Permalink
Map to handle long and abbreviated name for Springer LN series
Browse files Browse the repository at this point in the history
Handling of Spinger series
switch to use acronym for all in proceeding entries not only Springer
  • Loading branch information
gvdgdo committed Oct 15, 2012
1 parent 5e21b36 commit e01e65e
Showing 1 changed file with 49 additions and 10 deletions.
59 changes: 49 additions & 10 deletions lncs.bbx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
minbibnames=1,
mincrossrefs=99,
maxbibnames=999}

\newtoggle{lncs:abbrev}
\DeclareBibliographyOption{acronym}[true]{\toggletrue{lncs:abbrev}}

\DeclareFieldFormat{labelnumberwidth}{#1.}
\defbibenvironment{bibliography}
Expand All @@ -21,6 +24,23 @@
{\endlist}
{\item}

\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=series,
match=\regexp{Lecture\s+Notes\s+in\s+Computer\s+Science},
replace={LNAI}]
\step[fieldsource=series,
match=\regexp{Lecture\s+Notes\s+in\s+Artificial\s+Intelligence},
replace={LNAI}]
\step[fieldsource=series,
match=\regexp{Lecture\s+Notes\s+in\s+Business\s+Information\s+Processing},
replace={LNBIP}]
}
}
}


\DeclareFieldFormat{journaltitle}{#1}
\DeclareFieldFormat[article,inproceedings]{title}{#1}
\DeclareFieldFormat{booktitle}{#1}
Expand Down Expand Up @@ -49,7 +69,14 @@
}
}

\renewbibmacro{\finentry}{}
\newbibmacro{acronym/booktitle}{%
\iffieldundef{acronym}
{\printfield{booktitle}}
{\printfield{acronym}}%
\addcomma\addspace
}

\renewbibmacro{finentry}{}
\renewcommand*{\bibinitdelim}{}

\DeclareNameFormat{author}{%
Expand Down Expand Up @@ -108,17 +135,29 @@
\newunit\newblock
\printtext{In:}
\printnames{editor}
\newunit
\iffieldundef{series}
{\printfield{booktitle}\addcomma\space}
{\iffieldequalstr{series}{LNAI}
{\printfield{acronym}\addperiod\addspace
LNCS\addcomma\addspace
\iffieldundef{volume}
{\iffieldundef{number}{}{vol. \printfield{number}\addcomma}}
{\printfield{volume}\addcomma}
}%
{\printfield{acronym}}%
{\iftoggle{lncs:abbrev}
{\usebibmacro{acronym/booktitle}}
{\printfield{booktitle}\addcomma\space}%
}%
{\ifboolexpr{
test {\iffieldequalstr{series}{LNAI}}
or
test {\iffieldequalstr{series}{LNCS}}
or
test {\iffieldequalstr{series}{LNBIP}}
}
{\usebibmacro{acronym/booktitle}
\printfield{series}\addcomma\addspace
\iffieldundef{volume}
{\iffieldundef{number}{}{vol.\addspace\printfield{number}\addcomma}}
{\printfield{volume}\addcomma}%
}%
{\usebibmacro{acronym/booktitle}%
\printfield{series}\addcomma}%
}
\newunit
\iffieldundef{pages}{}{\printfield{pages}}
\newunit
\printlist{publisher}
Expand Down

0 comments on commit e01e65e

Please sign in to comment.