Skip to content

Commit

Permalink
Merge pull request gi-ev#1 from georgd/patch-1
Browse files Browse the repository at this point in the history
Approximation to the Word template.
  • Loading branch information
Lukas C. Bossert authored Oct 7, 2016
2 parents 9394a95 + 37b74d9 commit d30c096
Showing 1 changed file with 59 additions and 44 deletions.
103 changes: 59 additions & 44 deletions LNI_biblatex/LNI.bbx
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,8 @@
\renewcommand{\multinamedelim}{\addsemicolon\space}
\renewcommand{\finalnamedelim}{\multinamedelim}

\newbibmacro*{byeditor+others}{%
\ifnameundef{editor}
{}
{(\printnames[byeditor]{editor}%
\clearname{editor}%
\setunit{\addcomma\addspace}%
\usebibmacro{byeditor+othersstrg})%
\newunit}%
\usebibmacro{byeditorx}%
\usebibmacro{bytranslator+others}}


\renewbibmacro*{publisher+location}{%
\newbibmacro*{publisher+location}{%
\printlist{publisher}%
\newunit%
\printlist{location}%
Expand All @@ -72,6 +61,36 @@
{\usebibmacro{author+others}}
{\usebibmacro{translator+others}}}

\renewbibmacro*{event+venue+date}{%
\printfield{eventtitle}%
\newunit
\printfield{eventtitleaddon}%
\ifboolexpr{
test {\iffieldundef{venue}}
and
test {\iffieldundef{eventyear}}
}
{}
{\setunit*{\addspace}%
\printfield{venue}%
\setunit*{\space}%
\printeventdate}%
\newunit}


\DeclareLabelalphaTemplate{
\labelelement{
\field[final]{shorthand}
\field{label}
\field[strwidth=2,strside=left,noalphaothers=true,ifnames=1]{labelname}
\field[strwidth=1,strside=left]{labelname}
}
\labelelement{
\field[strwidth=2,strside=right]{year}
}
}


\DeclareBibliographyDriver{book}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
Expand All @@ -80,9 +99,9 @@
{\usebibmacro{author}}%
\setunit{\nametitledelim}\newblock%
\usebibmacro{title}%
\newunit%
\printunit{\addperiod\space}%
\usebibmacro{publisher+location}%
\setunit{\addspace}
\newunit%
\printfield{year}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
Expand All @@ -93,36 +112,34 @@
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\nopunct%
\usebibmacro{finentry}%
}

\DeclareBibliographyDriver{inproceedings}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/translator+others}%
\setunit{\nametitledelim}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\printunit{\addperiod\space}
% \printlist{language}%
% \newunit\newblock
% \usebibmacro{byauthor}%
% \newunit\newblock
\printtext{\bibstring{in}}
\usebibmacro{byeditor+others}%
\setunit{\addcolon}%
\newunit\newblock
\mkbibparens{\usebibmacro{editor+others}}%
\setunit{\nametitledelim}\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\newunit
\usebibmacro{event+venue+date}%
\newunit\newblock
\printunit{\addperiod\space}\newblock
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\printfield{volumes}%
\newunit\newblock
\setunit{\addperiod\space}\newblock
\usebibmacro{series+number}%
\newunit\newblock
\printfield{note}%
Expand All @@ -132,8 +149,7 @@
\usebibmacro{publisher+location}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit
\addcomma\addspace
\newunit%
\usebibmacro{date}%
\newunit\newblock
\iftoggle{bbx:isbn}
Expand All @@ -151,25 +167,23 @@
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}

\DeclareBibliographyDriver{inbook}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/translator+others}%
\setunit{\nametitledelim}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\setunit{\addperiod\space}
% \printlist{language}%
% \newunit\newblock
% \usebibmacro{byauthor}%
% \newunit\newblock
\printtext{\bibstring{in}}
\usebibmacro{byeditor+others}%
\setunit{\addcolon}%
\newunit\newblock
\mkbibparens{\usebibmacro{editor+others}}%
\setunit{\nametitledelim}\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\newunit\newblock
\setunit{\addperiod\space}\newblock
\printfield{edition}%
\newunit
\iffieldundef{maintitle}
Expand All @@ -187,6 +201,8 @@
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit\newblock
\usebibmacro{date}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
Expand All @@ -209,7 +225,7 @@
\usebibmacro{author/translator+others}%
\setunit{\nametitledelim}\newblock
\usebibmacro{title}%
\newunit
\printunit{\addperiod\space}\newblock
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
Expand All @@ -218,7 +234,6 @@
\newunit\newblock
\printfield{version}%
\newunit\newblock
\usebibmacro{in:}%
\usebibmacro{journal}%
\setunit*{\addspace}%
\iffieldundef{series}
Expand All @@ -227,7 +242,7 @@
\printfield{series}%
\setunit{\addspace}}%
\printfield{volume}%
\printtext{/}
\printtext{/}%
\printfield{number}%
\setunit{\addspace}%
\usebibmacro{issue}%
Expand Down Expand Up @@ -262,4 +277,4 @@
\DeclareFieldFormat*{title}{#1}
\DeclareFieldFormat{urldate}{\addcomma\addspace \bibstring{urlseen}\addcolon\addspace#1}
\endinput
%% End of file `LNI.bbx'.
%% End of file `LNI.bbx'.

0 comments on commit d30c096

Please sign in to comment.