-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbiblatex.cfg
86 lines (78 loc) · 2.25 KB
/
biblatex.cfg
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
\ProvidesFile{biblatex.cfg}
% Put your definitions here.
\ExecuteBibliographyOptions{defernumbers=true, maxbibnames=99, sorting=ydmdnt, date=long, dateabbrev=false, url=false}
% Default horizontal spacing between number and entry is twice what I want it to be ({2\labelsep})
\setlength{\biblabelsep}{\labelsep} % Default: {2\labelsep}
% Default vertical spacing between entries isn't big enough (must be zero)
\setlength{\bibitemsep}{1ex} % Default: \itemsep
% My formatting for DOI, ISBN, and URL fields
\DeclareFieldFormat{doi}{%
DOI\addcolon~%
\ifhyperref%
{\href{https://doi.org/#1}{\nolinkurl{#1}}}
{#1}}
\DeclareFieldFormat{isbn}{ISBN\addcolon~#1}
\DeclareFieldFormat{issn}{ISSN\addcolon~#1}
\DeclareFieldFormat{url}{URL\addcolon~\url{#1}}
% Sort bibliography entries by month and year, then names, then title
\DeclareSortingScheme{ydmdnt}{
\sort{
\field{presort}
}
\sort[final]{
\field{sortkey}
}
\sort[direction=descending]{
\field[strside=left,strwidth=4]{sortyear}
\field[strside=left,strwidth=4]{year}
\literal{9999}
}
\sort[direction=descending]{
\field{month}
\literal{13}
}
\sort[direction=descending]{
\field{day}
\literal{32}
}
\sort{
\field{sortname}
\field{author}
\field{editor}
\field{translator}
\field{sorttitle}
\field{title}
}
\sort{
\field{sorttitle}
\field{title}
}
}
% Makes bold any authors with a last name matching the contents of \MyLastName
\renewbibmacro*{name:given-family}[4]{%
\usebibmacro{name:delim}{#2#3#1}%
\usebibmacro{name:hook}{#2#3#1}%
\ifdefstrequal{\MyLastName}{#1}%
{%
\textbf{%
\ifdefvoid{#2}{}{\mkbibnamegiven{#2}\isdot\bibnamedelimd}%
\ifdefvoid{#3}{}{%
\mkbibnameprefix{#3}\isdot
\ifprefchar
{}
{\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}%
\mkbibnamefamily{#1}\isdot
\ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}
}%
}{%
\ifdefvoid{#2}{}{\mkbibnamegiven{#2}\isdot\bibnamedelimd}%
\ifdefvoid{#3}{}{%
\mkbibnameprefix{#3}\isdot
\ifprefchar
{}
{\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}%
\mkbibnamefamily{#1}\isdot
\ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}
}%
}
\endinput