]> Softwares of Agnibho - biblatex-vancouver.git/blob - vancouver.bbx
Added acknowledgement
[biblatex-vancouver.git] / vancouver.bbx
1 % Copyright (c) 2020 Agnibho Mondal
2 % All rights reserved
3 %
4 % This file is part of BibLaTex Vancouver.
5 %
6 % BibLaTex Vancouver is free software: you can redistribute it and/or modify it
7 % under the terms of the GNU General Public License as published by the Free
8 % Software Foundation, either version 3 of the License, or (at your option) any
9 % later version.
10 %
11 % BibLaTex Vancouver is distributed in the hope that it will be useful, but
12 % WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 % FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14 % details.
15 %
16 % You should have received a copy of the GNU General Public License along with
17 % BibLaTex Vancouver. If not, see <http://www.gnu.org/licenses/>.
18 %
19 % Agnibho Mondal
20 % contact@agnibho.com
21 % www.agnibho.com
22
23 \ProvidesFile{vancouver.bbx}[2020/05/20 v0.1 biblatex vancouver]
24
25 \RequireBiber[2]
26 \RequireBibliographyStyle{numeric}
27
28 \RequirePackage{ifthen}
29
30 \ExecuteBibliographyOptions{
31 sorting=none,
32 giveninits=true,
33 terseinits=true,
34 isbn=false,
35 maxbibnames=99
36 }
37
38 \renewcommand*{\revsdnamepunct}{}
39 \renewcommand*{\finentrypunct}{}
40 \renewcommand*{\bibpagespunct}{\addspace}
41
42 \renewbibmacro{in:}{}
43
44 \newcommand*{\shortmonth}[1]{
45 \ifthenelse{\NOT\equal{#1}{}}{
46 \ifcase#1\relax
47 \or Jan
48 \or Feb
49 \or Mar
50 \or Apr
51 \or May
52 \or Jun
53 \or Jul
54 \or Aug
55 \or Sep
56 \or Oct
57 \or Nov
58 \or Dec
59 \fi
60 }
61 }
62
63 \DeclareNameAlias{default}{family-given}
64
65 \DeclareFieldFormat*{title}{#1}
66 \DeclareFieldFormat*{journaltitle}{#1}
67 \DeclareFieldFormat*{labelnumberwidth}{#1\adddot}
68 \DeclareFieldFormat*{pages}{:\mkcomprange{#1}}
69 \DeclareFieldFormat*{url}{Available from: \url{#1}}
70 \DeclareFieldFormat*[article]{number}{(#1)}
71 \DeclareFieldFormat*{date}{
72 \thefield{year}\addspace
73 \shortmonth{\thefield{month}}\addspace
74 \thefield{day}\isdot
75 }
76 \DeclareFieldFormat*{urldate}{
77 {[}Accessed on:
78 \thefield{urlyear}\addspace
79 \shortmonth{\thefield{urlmonth}}\addspace
80 \thefield{urlday}{]}
81 }
82
83 \DeclareSourcemap{
84 \maps[datatype=bibtex]{
85 \map[overwrite=true]{
86 \step[fieldsource=journaltitle, match=\regexp{(\.)}, replace={}]
87 \step[fieldsource=journaltitle, match=\regexp{($)}, replace={.}]
88 }
89 }
90 }
91
92 %no number in ouput of bibliography
93 \renewbibmacro*{volume+number+eid}{
94 \printfield{volume}
95 \printfield{number}
96 \printfield{eid}
97 }
98
99 %Order year;volume:page
100 \renewbibmacro*{issue+date}{
101 \printfield{issue}
102 \setunit*{\addspace}
103 \usebibmacro{date}
104 \newunit
105 }
106
107 \renewbibmacro*{journal+issuetitle}{
108 \usebibmacro{journal}
109 \iffieldundef{series}
110 {}
111 {\newunit
112 \printfield{series}}
113 \setunit*{\addspace}
114 \usebibmacro{issue+date}
115 \setunit*{\addsemicolon\addspace}
116 \usebibmacro{volume+number+eid}
117 \usebibmacro{issue}
118 \newunit}