1 %% --------------- Bibliography setup --------------------------------------
3 \usepackage{csquotes} % recommended for biblatex
4 %\usepackage[babel,german=quotes]{csquotes} % utf8-change ??
7 %Note: biblatex with bibtex backend is frozen at version 1.7.
8 \usepackage[style=numeric-comp,backend=biber,bibencoding=auto]{biblatex}[2013/01/10] %utf8-change
10 \ExecuteBibliographyOptions{bibwarn=true,sortcites=true,defernumbers=true,isbn=false,doi=false,backref=true}
12 %% titles of reference section + 3 categories of references:
13 \newcommand{\@bibtitle}{Quellenverzeichnis}
14 \newcommand{\@bibtitleLiteratur}{Literatur}
15 \newcommand{\@bibtitleAvmedia}{Filme und audiovisuelle Medien}
16 \newcommand{\@bibtitleOnline}{Online-Quellen}
18 \ifthenelse{\equal{\hgb@MainLanguage}{english}}{%
19 \renewcommand{\@bibtitle}{References}
20 \renewcommand{\@bibtitleLiteratur}{Literature}
21 \renewcommand{\@bibtitleAvmedia}{Films and audio-visual media}
22 \renewcommand{\@bibtitleOnline}{Online sources}
25 \defbibfilter{literature}{
26 not ( type=movie or type=video or type=music or type=audio or
27 type=online or type=electronic or type=www or type=software )}
29 \defbibfilter{avmedia}{%
30 ( type=movie or type=video or type=music or type=audio or type=software )}
32 \defbibfilter{online}{%
33 ( type=online or type=electronic or type=www )}
36 \defbibheading{noheader}[]{} % 'none' should be defined but isn't
38 % utf8-change (deactivated):
39 % German format in biblatex is flawed: it adds wrong spaces and prohibits
40 % line breaking within date strings. Corrected by Wilbur as follows.
41 % Taken from german.lbx: replaced \thinspace by breaking zero space \hskip0pt
42 %\DefineBibliographyExtras{ngerman}{%
43 %\def\mkbibdatelong#1#2#3{%
46 %{\mkbibordinal{\thefield{#3}}%
47 %\iffieldundef{#2}{}{\space}}% %was: \nobreakspace
50 %{\mkbibmonth{\thefield{#2}}%
51 %\iffieldundef{#1}{\hskip0pt}{\space}}%
52 %\stripzeros{\thefield{#1}}}%
54 %\def\mkbibdateshort#1#2#3{%
57 %{\mkdatezeros{\thefield{#3}}\adddot
58 %\iffieldundef{#2}{}{\hskip0pt}}%
61 %{\mkdatezeros{\thefield{#2}}%
64 %{\iffieldundef{#3}{/}{\adddot\hskip0pt}}}%
65 %\mkdatezeros{\thefield{#1}}}%
68 % utf8-change (deactivated):
69 % Similar problem with badly braking date strings in english.
70 % Taken from english.lbx: added breaking zero space \hskip0pt to /
71 %\DefineBibliographyExtras{english}{%
72 %\def\mkbibdatelong#1#2#3{%
75 %{\mkbibmonth{\thefield{#2}}%
77 %{\iffieldundef{#1}{}{\space}}
78 %{\space}}% %was: \nobreakspace
81 %{\stripzeros{\thefield{#3}}%
82 %\iffieldundef{#1}{}{,\space}}%
83 %\stripzeros{\thefield{#1}}}%
85 %\def\mkbibdateshort#1#2#3{%
88 %{\mkdatezeros{\thefield{#2}}%
90 %{\iffieldundef{#1}{}{/{\hskip0pt}}}
94 %{\mkdatezeros{\thefield{#3}}%
95 %\iffieldundef{#1}{}{/{\hskip0pt}}}%
96 %\mkdatezeros{\thefield{#1}}}%
100 %This is only a wrapper to \addbibresource to allow the use
101 %of the classic bibtex-workflow in the future.
102 \newcommand{\AddBibFile}[1]{
106 %See http://www.jr-x.de/publikationen/latex/tipps/zeilenumbruch.html
107 \newenvironment{bibhyphenation}%
108 {\hyphenpenalty=20% (50)
109 \tolerance=9999% (200)
110 \exhyphenpenalty=0% (50)
112 \setlength{\emergencystretch}{3em}}%
115 % Currently the only public macro:
116 % \MakeBibliography ... creates a reference section split subsections (default)
117 % \MakeBibliography[nosplit] ... creates a one-piece reference section
118 \newcommand{\MakeBibliography}[1][]{
119 % opt. arg (#1): optional argument "nosplit" to get a 1-piece bibliography
121 \ifthenelse{\equal{#1}{nosplit}}%
122 {% create a single bibliography with all entries:
123 %\printbibheading[heading=bibintoc,title={#2}]
124 \printbibheading[heading=bibintoc,title={\@bibtitle}]
125 \begin{bibhyphenation}
126 \printbibliography[heading=noheader]
129 {% split the bibliography using the predefined categories:
130 %\printbibheading[heading=bibintoc,title={#2}]
131 \printbibheading[heading=bibintoc,title={\@bibtitle}]
132 \begin{bibhyphenation}
133 \printbibliography[filter=literature,heading=subbibintoc,title={\@bibtitleLiteratur}]
134 \printbibliography[filter=avmedia,heading=subbibintoc,title={\@bibtitleAvmedia}]
135 \printbibliography[filter=online,heading=subbibintoc,title={\@bibtitleOnline}]