-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhydrobib.sty
executable file
·116 lines (102 loc) · 3.02 KB
/
hydrobib.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
%% hydrobib.sty
%% Bibliography Setup
%% This file is part of the Hydro Thesis package for creating masters's theses
%% Author: Robin Schwemmle (robin.schwemmle@venus.uni-freiburg.de)
%% File encoding: ASCII
\ProvidesPackage{hydrobib}[2017/11/04]
\RequirePackage{hyphenat}
\RequirePackage{csquotes} % recommended for biblatex
%Note: biblatex with bibtex backend is frozen at version 1.7.
\RequirePackage[bibstyle=authoryear,citestyle=authoryear,backend=biber,url=false,isbn=false,useprefix=true,maxcitenames=2,maxbibnames=100,uniquelist=true,autocite=inline,sortcites=true,dashed=false,uniquename=true,hyperref=true,giveninits=true]{biblatex}
\setlength{\bibitemsep}{1em} % distance between citation entries
\setlength{\bibhang}{2em} % hanging indent after first line
\setcounter{abbrvpenalty}{0} % set hyphenation threshold for citations
\setcounter{highnamepenalty}{0}
\setcounter{lownamepenalty}{0}
\DeclareNameAlias{sortname}{family-given}
\DeclareBibliographyDriver{article}{%
\printnames{author}:%
\newunit\newblock
\printfield{title},%
\newunit\newblock
\printfield{journaltitle},%
\newunit\newblock
\printfield{volume},%
\newunit\newblock
\printfield{pages},%
\newunit\newblock
\printfield{doi},%
\newunit\newblock
\printfield{year}.%
\finentry}
\DeclareBibliographyDriver{book}{%
\printnames{author}:%
\newunit\newblock
\printfield{title},%
\newunit\newblock
\printlist{publisher},%
\newunit\newblock
\printlist{location},%
\newunit\newblock
\printfield{pages} pp.,%
\newunit\newblock
\printfield{doi},%
\newunit\newblock
\printfield{year}.%
\finentry}
\DeclareBibliographyDriver{inbook}{%
\printnames{author}:%
\newunit\newblock
\printfield{title},%
\newunit\newblock
in: \printfield{booktitle},%
\newunit\newblock
\printlist{publisher},%
\newunit\newblock
\printlist{location},%
\newunit\newblock
\printfield{pages},%
\newunit\newblock
\printfield{doi},%
\newunit\newblock
\printfield{year}.%
\finentry}
\DeclareBibliographyDriver{report}{%
\printnames{author}:%
\newunit\newblock
\printfield{title},%
\newunit\newblock
\printlist{institution},%
\newunit\newblock
\printlist{location},%
\newunit\newblock
\printfield{pages} pp.,%
\newunit\newblock
\printfield{doi},%
\newunit\newblock
\printfield{year}.%
\finentry}
\DeclareBibliographyDriver{online}{%
\printnames{author}:%
\newunit\newblock
\printfield{title},%
\newunit\newblock
\printfield{url},%
\newunit\newblock
\printurldate.%
\finentry}
\DeclareFieldFormat
[article,thesis,report,unpublished,online]
{title}{#1\isdot}
\DeclareFieldFormat
[book]
{title}{#1}
\DeclareFieldFormat{urldate}{\MakeLowercase{last access}\addcolon\space{#1}}
\DeclareFieldFormat{url}{\MakeLowercase{available at}\addcolon\space\url{#1}}
\DeclareFieldFormat{doi}{%
\ifhyperref
{\href{https://doi.org/#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
\DeclareFieldFormat{pages}{#1}
\DeclareDelimFormat{nameyeardelim}{\addcomma\addspace}
% hyphenations exceptions for citations