-
Notifications
You must be signed in to change notification settings - Fork 0
/
referencing-preamble.tex
62 lines (55 loc) · 1.54 KB
/
referencing-preamble.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
%\DeclareNameAlias{sortname}{last-first}
\renewcommand*{\nameyeardelim}{\addcomma\space}
\DeclareFieldFormat{edition}{%
\ifinteger{#1}
{\ifnumequal{#1}{1}%
{}%
{\mkbibordedition{#1}~\bibstring{edition}}%
}
{#1\isdot}}
\DeclareFieldFormat[article,inbook,incollection]{title}{#1\isdot}
\DeclareFieldFormat[article,inbook,incollection]{title}{#1\isdot}
\newrobustcmd{\MakeTitleCase}[1]{%
\ifboolexpr{test {\ifentrytype{article}} or test {\ifentrytype{inbook}} or test {\ifentrytype{incollection}}}
{#1}
{\MakeSentenceCase{#1}}}
\DeclareFieldFormat{urldate}{\bibsentence\mkbibbrackets{\bibstring{urlseen}\space#1}}
\DeclareFieldFormat{url}{\bibstring{urlfrom}\addcolon\space\url{#1}}
\renewbibmacro*{journal}{%
\iffieldundef{journaltitle}
{}
{\printtext[journaltitle]{%
\printfield[titlecase]{journaltitle}%
\setunit{\subtitlepunct}%
\printfield[titlecase]{journalsubtitle}}
\ifboolexpr{
not test {\iffieldundef{url}}
or
not test {\iffieldundef{urldate}}
or
not test {\iffieldundef{doi}}
or
not test {\iffieldundef{eprint}}
}
{\nopunct\bibstring[\mkbibbrackets]{online}}%
{}}}
\newbibmacro*{journal+issuetitle}{%
\usebibmacro{journal}%
\setunit*{\addspace}%
\iffieldundef{series}
{}
{\newunit
\printfield{series}%
\setunit{\addspace}}%
\newunit
\usebibmacro{volume+number+eid}%
\setunit{\addspace}%
\usebibmacro{issue+date}%
\setunit{\addcolon\space}%
\usebibmacro{issue}%
\newunit}
\NewBibliographyString{online}
\DefineBibliographyStrings{english}{%
urlseen = {accessed},
online = {online},
}