forked from sisl/tufte_algorithms_book
-
Notifications
You must be signed in to change notification settings - Fork 0
/
references.tex
147 lines (130 loc) · 3.81 KB
/
references.tex
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
\addbibresource{book.bib}
\newcommand{\sidecite}[2][0pt]{%
\sidenote[][#1]{\fullcite{#2}}%
}
\renewcommand{\cite}[2][0pt]{\sidenote[][#1]{\fullcite{#2}.}}
\ExecuteBibliographyOptions{
sorting = nyt,
useprefix
}
\AtEveryBibitem{\clearfield{series}}
\AtEveryCitekey{\clearfield{series}}
\AtEveryBibitem{\clearlist{language}}
\AtEveryCitekey{\clearlist{language}}
\AtEveryBibitem{\clearlist{address}}
\AtEveryCitekey{\clearlist{address}}
\AtEveryBibitem{\clearlist{location}}
\AtEveryCitekey{\clearlist{location}}
\AtEveryBibitem{\clearfield{month}}
\AtEveryCitekey{\clearfield{month}}
\AtEveryCitekey{\ifentrytype{inproceedings}{\clearfield{pages}}{}}
\AtEveryBibitem{\ifentrytype{inproceedings}{\clearfield{pages}}{}}
\AtEveryCitekey{\ifentrytype{inproceedings}{\clearlist{publisher}}{}}
\AtEveryBibitem{\ifentrytype{inproceedings}{\clearlist{publisher}}{}}
\AtEveryCitekey{\ifentrytype{inproceedings}{\clearname{editor}}{}}
\AtEveryBibitem{\ifentrytype{inproceedings}{\clearname{editor}}{}}
\AtEveryCitekey{\ifentrytype{inproceedings}{\clearlist{organization}}{}}
\AtEveryBibitem{\ifentrytype{inproceedings}{\clearlist{organization}}{}}
%\AtEveryCitekey{% Clean up the bibtex rather than editing it
% \clearfield{date}
% \clearfield{eprint}
% \clearfield{isbn}
% \clearfield{issn}
% \clearfield{month}
% \clearlist{language}
% \clearfield{series}
% \ifentrytype{inproceedings}{
% \clearlist{address}
% \clearlist{publisher}
% \clearname{editor}
% \clearlist{organization}
% \clearfield{url}
% \clearfield{doi}
% \clearfield{pages}
% \clearlist{location}
% }{}
% \ifentrytype{incollection}{
% \clearfield{url}
% \clearfield{doi}
% \clearfield{pages}
% }{}
% \ifentrytype{book}{
% \clearfield{url}
% }{}
% \ifentrytype{thesis}{
% \clearfield{url}
% }{}
% \ifentrytype{article}{
% \clearfield{url}
% \clearname{editor}
% \clearlist{location}
% \clearlist{address}
% }{}
% \ifentrytype{techreport}{
% \clearfield{url}
% \clearlist{location}
% \clearlist{address}
% }{}
%}
%\AtEveryCitekey{%
% \ifboolexpr{test {\ifentrytype{article}} or test {\ifentrytype{techreport}}}
% {\clearfield{doi}\clearfield{url}}
% {}}
% See: http://tex.stackexchange.com/questions/43196/biblatex-fullcite-produces-different-result-from-bibliography-entry
\DeclareCiteCommand{\fullcite}
{\usebibmacro{prenote}}
{\usedriver
{\defcounter{minnames}{6}%
\defcounter{maxnames}{6}}
{\thefield{entrytype}}.}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareFieldFormat{labelnumberwidth}{#1.}
\DefineBibliographyStrings{english}{
andothers = et al\adddot,
editor = ed\adddot,
editors = eds\adddot,
}
\defbibheading{subbibliography}[\refname]{%
\section*{#1}%
\addcontentsline{toc}{reference}{References}%
\markright{\thechapter: References}}
\DeclareFieldFormat{titlecase}{\titlecap{\textnc{#1}}}
\renewbibmacro*{title}{%
\ifboolexpr{
test {\iffieldundef{title}}
and
test {\iffieldundef{subtitle}}
}
{}
{%
\printtext[title]{%
\printfield[titlecase]{title}%
\setunit{\subtitlepunct}%
\printfield[titlecase]{subtitle}%
}%
\newunit
}%
\printfield{titleaddon}%
}
\setcounter{biburlnumpenalty}{1000}
\setcounter{biburlucpenalty}{1000}
\setcounter{biburllcpenalty}{1000}
\bibsetup{
\setcounter{abbrvpenalty}{0}
\setcounter{highnamepenalty}{0}
\setcounter{lownamepenalty}{0}
}
\DeclareFieldFormat{doi}{%
\textsc{doi}\addcolon\space
\ifhyperref
{\href{http://dx.doi.org/#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
\setcounter{biburlnumpenalty}{100}
\setcounter{biburlucpenalty}{100}
\setcounter{biburllcpenalty}{100}
%\newcommand{\dobib}{\printbibliography[heading=subbibliography]}
\newcommand{\dobib}{}
\renewrobustcmd*{\bibinitdelim}{\addnbthinspace} % add thin space between author initials
\renewcommand*{\bibfont}{\small}
\renewbibmacro*{bbx:savehash}{} % remove dashes for repeated authors