-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsolent-harvard.cbx
52 lines (47 loc) · 1.45 KB
/
solent-harvard.cbx
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
\ProvidesFile{solent-harvard.cbx}
\RequireCitationStyle{authoryear}
\renewbibmacro*{name:andothers}{% Based on name:andothers from biblatex.def
\ifbibliography
{\ifboolexpr{
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
and
test \ifmorenames
}
{\ifnumgreater{\value{liststop}}{1}
{\finalandcomma}
{}%
\andothersdelim\bibstring{andothers}}
{}}
{\ifboolexpr{
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
and
test \ifmorenames
}
{\ifnumgreater{\value{liststop}}{1}
{\finalandcomma}
{}%
\andothersdelim\bibstring[\emph]{andothers}}
{}}}
% Customizing the citation format to include parentheses
\DeclareCiteCommand{\bracketcite}
{\usebibmacro{prenote}}
{\ifnameundef{labelname}%
{\printtext{Anon}\adddot}%
{\printnames{labelname}}%%
\addspace%
\printfield{year}\printfield{extradate}%
\iffieldundef{pages}%
{}
{\addcomma\addspace\printfield{pages}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\bracketciteyear}
{\usebibmacro{prenote}}
{\printfield{year}\printfield{extradate}%
\iffieldundef{pages}%
{}
{\addcomma\addspace\printfield{pages}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\renewcommand*{\cite}[1]{\textup{(\bracketcite{#1})}}
\renewcommand*{\citeyear}[1]{\textup{(\bracketciteyear{#1})}}