forked from moewew/biblatex-trad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
trad-abbrv.bbx
78 lines (69 loc) · 2.24 KB
/
trad-abbrv.bbx
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
%% Copyright (c) 2012 Marco Daniel
%%
%% This package may be distributed under the terms of the LaTeX Project
%% Public License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1.0 or, at your option, any later version.
\ProvidesFile{trad-abbrv.bbx}[2016/03/28]
\RequireBibliographyStyle{trad-standard}
\ExecuteBibliographyOptions{%
maxnames = 99 , % set the maximum number of authors
sorting = nty , % sorting name - title - year
dateabbrev = true , % short form of dates
abbreviate = false ,
labelnumber= true ,
}
\@ifpackagelater{biblatex}{2016/03/01}{%
\DeclareNameFormat{abbrv}{%
\nameparts{#1}%
\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefixi}
{\namepartsuffixi}%
\usebibmacro{name:andothers}}
}{%
\DeclareNameFormat{abbrv}{%
\usebibmacro{name:first-last}{#1}{#4}{#6}{#8}%
\usebibmacro{name:andothers}}
}
\DeclareNameAlias{default}{abbrv}
\DeclareFieldFormat{bibentrysetcount}{\mkbibparens{\mknumalph{#1}}}
\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}}
\DeclareFieldFormat{shorthandwidth}{\mkbibbrackets{#1}}
\defbibenvironment{bibliography}
{\list
{\printtext[labelnumberwidth]{%
\printfield{prefixnumber}%
\printfield{labelnumber}}}
{\setlength{\labelwidth}{\labelnumberwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{\hss##1}}
{\endlist}
{\item}
\defbibenvironment{shorthands}
{\list
{\printfield[shorthandwidth]{shorthand}}
{\setlength{\labelwidth}{\shorthandwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}%
\renewcommand*{\makelabel}[1]{\hss##1}}}
{\endlist}
{\item}
\DeclareBibliographyDriver{set}{%
\entryset
{\ifbool{bbx:subentry}
{\printfield[bibentrysetcount]{entrysetcount}%
\setunit*{\addnbspace}}
{}}
{}%
\newunit\newblock
\usebibmacro{setpageref}%
\finentry}
\endinput