Commit a881370a authored by Lukas Janek Körfer's avatar Lukas Janek Körfer
Browse files

Added drivers for book, inbook, proceedings and inproceedings

parent 4d723030
...@@ -2,13 +2,22 @@ ...@@ -2,13 +2,22 @@
\RequireBibliographyStyle{alphabetic} \RequireBibliographyStyle{alphabetic}
% Fix end of entries
\renewcommand*{\finentrypunct}{}
% New strings % New strings
\NewBibliographyString{standard} \NewBibliographyString{standard}
\NewBibliographyString{series}
\NewBibliographyString{organizer}
\NewBibliographyString{journal-volume}
% German strings % German strings
\DefineBibliographyStrings{ngerman}{ \DefineBibliographyStrings{ngerman}{
bibliography = {Literaturverzeichnis}, bibliography = {Literaturverzeichnis},
standard = {Norm}, standard = {Norm},
organizer = {Veranst.},
journal-volume = {Jg},
series = {Reihe},
patent = {Schutzrecht}, patent = {Schutzrecht},
part = {Teil}, part = {Teil},
url = {URL}, url = {URL},
...@@ -39,7 +48,6 @@ ...@@ -39,7 +48,6 @@
\renewcommand{\labelnamepunct}{\addcolon\space} \renewcommand{\labelnamepunct}{\addcolon\space}
\renewcommand{\multinamedelim}{\addsemicolon\space} \renewcommand{\multinamedelim}{\addsemicolon\space}
\renewcommand{\finalnamedelim}{\addsemicolon\space} \renewcommand{\finalnamedelim}{\addsemicolon\space}
\renewcommand*{\finentrypunct}{}
% Title format % Title format
\DeclareFieldFormat*{title}{#1\isdot} \DeclareFieldFormat*{title}{#1\isdot}
...@@ -51,63 +59,90 @@ ...@@ -51,63 +59,90 @@
% URL format % URL format
\DeclareFieldFormat*{url}{\bibstring{url}\addcolon\addspace\url{#1}} \DeclareFieldFormat*{url}{\bibstring{url}\addcolon\addspace\url{#1}}
\DeclareFieldFormat*{urldate}{[\bibstring{urlseen}\addcolon\addspace#1]} \DeclareFieldFormat*{urldate}{\mkbibbrackets{\bibstring{urlseen}\addcolon\addspace#1}}
% Series format
\DeclareFieldFormat*{series}{\bibstring{series}\addcolon\addspace#1}
% Volume format % Part format
\DeclareFieldFormat*{part}{\bibstring{part}\addspace#1} \DeclareFieldFormat*{part}{\bibstring{part}\addspace#1}
\DeclareFieldFormat*{volume}{Bd\adddot\addspace#1}
% Norm / Guideline driver %
\DeclareBibliographyDriver{standard}{% \DeclareFieldFormat[article]{volume}{#1\adddot\addspace\bibstring{journal-volume}\adddot}
\DeclareFieldFormat[article]{number}{\bibstring{number}\adddot\addspace#1}
% Fix editor string
\renewbibmacro*{editor}{\printnames{editor}\addspace\mkbibparens{\bibstring{editor}}}
%
\newbibmacro*{organizer}{\printlist{organization}\addspace\mkbibparens{\bibstring{organizer}}}
% Drivers
\DeclareBibliographyDriver{book}{%
\usebibmacro{bibindex}% \usebibmacro{bibindex}%
\usebibmacro{begentry}% \usebibmacro{begentry}%
\iffieldundef{type}{\bibstring{standard}}{\printfield{type}}% \iffieldundef{author}{\usebibmacro{editor}}{\usebibmacro{author}}%
\setunit{\addspace}% \setunit{\addcolon\addspace}%
\printlist{institution}%
\setunit{\addspace}%
\printfield{number}%
\setunit{\addspace}%
\printfield{part}%
\addspace%
\mkbibparens{\mkbibmonth{\thefield{month}}\addspace\printfield{year}}%
\setunit{\adddot\addspace}%
\usebibmacro{title}% \usebibmacro{title}%
\newunit{\adddot\addspace}\newblock%
\usebibmacro{book-info}%
\usebibmacro{finentry}% \usebibmacro{finentry}%
} }
% Patent driver \DeclareBibliographyDriver{inbook}{%
\DeclareBibliographyDriver{patent}{%
\usebibmacro{bibindex}% \usebibmacro{bibindex}%
\usebibmacro{begentry}% \usebibmacro{begentry}%
\bibstring{patent}%
\setunit{\addspace}%
\printlist{location}
\setunit{\addspace}%
\printfield{number}%
\addspace%
\mkbibparens{\usebibmacro{date}}%
\setunit{\adddot\addspace}%
\usebibmacro{author}% \usebibmacro{author}%
\setunit{\addcolon\addspace}% \setunit{\addcolon\addspace}%
\usebibmacro{title}% \usebibmacro{title}%
\newunit{\adddot\addspace}\newblock%
\usebibmacro{in:}%
\newunit{\addspace}%
\usebibmacro{editor}%
\newunit{\addcolon\addspace}%
\usebibmacro{booktitle}%
\newunit{\adddot\addspace}%
\usebibmacro{book-info}%
\newunit{\addcomma\addspace}%
\printfield{pages}%
\usebibmacro{finentry}% \usebibmacro{finentry}%
} }
% Web / Online driver \newbibmacro*{book-info}{%
\DeclareBibliographyDriver{online}{% \iffieldundef{series}{}{\mkbibparens{\printfield{series}\addcomma\addspace\printfield{volume}}}%
\newunit{\adddot\addspace}%
\printfield{edition}%
\newunit{\addspace}%
\printlist{location}%
\newunit{\addcolon\addspace}%
\printlist{publisher}%
\newunit{\addcomma\addspace}%
\printfield{year}%
}
\DeclareBibliographyDriver{article}{%
\usebibmacro{bibindex}% \usebibmacro{bibindex}%
\usebibmacro{begentry}% \usebibmacro{begentry}%
\usebibmacro{author}% \usebibmacro{author}%
\setunit{\addcolon\addspace}% \setunit{\addcolon\addspace}%
\usebibmacro{title}% \usebibmacro{title}%
\setunit{\adddot\addspace}% \setunit{\adddot\addspace}%
\printfield{url}% \newunit\newblock%
\usebibmacro{in:}%
\setunit{\addspace}% \setunit{\addspace}%
\usebibmacro{urldate}% \printfield{journaltitle}%
\setunit{\adddot\addspace}%
\printfield{volume}%
\setunit{\addcomma\addspace}%
\printdate%
\setunit{\addcomma\addspace}%
\iffieldundef{issue}{\printfield{number}}{\printfield{issue}}
\setunit{\addcomma\addspace}%
\printfield{pages}%
\usebibmacro{finentry}% \usebibmacro{finentry}%
} }
% Misc driver (for brochures etc.)
\DeclareBibliographyDriver{misc}{% \DeclareBibliographyDriver{misc}{%
\usebibmacro{bibindex}% \usebibmacro{bibindex}%
\usebibmacro{begentry}% \usebibmacro{begentry}%
...@@ -123,20 +158,105 @@ ...@@ -123,20 +158,105 @@
\usebibmacro{finentry}% \usebibmacro{finentry}%
} }
\DeclareBibliographyDriver{inbook}{ \DeclareBibliographyDriver{proceedings}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\printfield{eventtitle}%
\setunit{\adddot\addspace}%
\usebibmacro{proceedings-info}%
\usebibmacro{finentry}%
} }
\DeclareBibliographyDriver{article}{ \DeclareBibliographyDriver{inproceedings}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\iffieldundef{author}{\usebibmacro{organizer}}{\usebibmacro{author}}%
\setunit{\addcolon\addspace}
\usebibmacro{title}%
\newunit{\adddot\addspace}\newblock%
\usebibmacro{in:}%
\newunit{\addspace}%
\printfield{eventtitle}%
\newunit{\adddot\addspace}%
\usebibmacro{proceedings-info}%
\newunit{\addcomma\addspace}%
\printfield{pages}%
\usebibmacro{finentry}%
} }
\DeclareBibliographyDriver{thesis}{ \newbibmacro*{proceedings-info}{%
\newunit\newblock%
\printfield{venue}%
\newunit{\addcomma\addspace}%
\printeventdate%
\newunit{\adddot\addspace}%
\printlist{location}%
\newunit{\addcolon\addspace}%
\iflistundef{publisher}{\usebibmacro{organizer}}{\printlist{publisher}}%
\newunit{\addcomma\addspace}%
\printfield{year}%
} }
\DeclareBibliographyDriver{inproceedings}{ \DeclareBibliographyDriver{thesis}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author}%
\setunit{\addcolon\addspace}%
\usebibmacro{title}%
\setunit{\adddot\addspace}%
\printfield{type}%
\setunit{\adddot\addspace}%
\printlist{institution}%
\setunit{\addspace}%
\printfield{year}%
\usebibmacro{finentry}%
}
\DeclareBibliographyDriver{online}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author}%
\setunit{\addcolon\addspace}%
\usebibmacro{title}%
\setunit{\adddot\addspace}%
\printfield{url}%
\setunit{\addspace}%
\usebibmacro{urldate}%
\usebibmacro{finentry}%
}
\DeclareBibliographyDriver{patent}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\bibstring{patent}%
\setunit{\addspace}%
\printlist{location}
\setunit{\addspace}%
\printfield{number}%
\addspace%
\mkbibparens{\usebibmacro{date}}%
\setunit{\adddot\addspace}%
\usebibmacro{author}%
\setunit{\addcolon\addspace}%
\usebibmacro{title}%
\usebibmacro{finentry}%
}
\DeclareBibliographyDriver{standard}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\iffieldundef{type}{\bibstring{standard}}{\printfield{type}}%
\setunit{\addspace}%
\printlist{institution}%
\setunit{\addspace}%
\printfield{number}%
\newunit{\addspace}%
\printfield{part}%
\setunit{\addspace}\newblock%
\mkbibparens{\mkbibmonth{\thefield{month}}\addspace\printfield{year}}%
\setunit{\adddot\addspace}%
\usebibmacro{title}%
\usebibmacro{finentry}%
} }
\endinput \endinput
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment