summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2005ay.bbx
blob: a3c3059832caa016f59057f689618f9092aab3cf (plain)
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
%%
%% ---------------------------------------------------------------
%% Maintained by huzhenzhen
%% E-mail: hzzmail@163.com
%% Released under the LaTeX Project Public License v1.3c or later
%% ---------------------------------------------------------------
%%注意因为使用了stylemap所以只兼容了biblatex3.7以后的版本
\ProvidesFile{gb7714-2005ay.bbx}[2021/05/16 v1.0 a biblatex bibliography style for GB/T 7714-2005]


%==================================================
%加载gb样式
%==================================================
\RequireBibliographyStyle{gb7714-2015ay}

%==================================================
%与2015的主要差异:
%1.无doi
%2.文献类型标志(电子文献必备,其他文献任选),引用日期(联机文献必备,其他电子文献任选),这条差异无需处理
%3.用汉语拼音书写的中国著者姓名不得缩写。标准说是这么说的,但没有任何示例。需要的话可以在bib条目中设置nameformat=quanpin
%4.无关于页码、获取和访问路径的说明。这条差异无需处理
%5.没有A/CM/DS/Z等新的类型
%==================================================


%==================================================
%选项设置
%==================================================
    \ExecuteBibliographyOptions{
    doi=false,
    url=false,
    }

%==================================================
%类型转换回来
%==================================================
    \DeclareStyleSourcemap{
        \maps[datatype=bibtex]{
            \map[overwrite]{%
                \pertype{dataset}
                \step[fieldset=usera, fieldvalue={Z}]%
            }
            \map[overwrite]{%
                \pertype{archive}
                \step[fieldset=usera, fieldvalue={Z}]%
            }
            \map[overwrite]{%
                \pertype{map}
                \step[fieldset=usera, fieldvalue={Z}]%
            }
        }
    }



%==================================================
%输出格式调整
%==================================================
%
%   重设专利title的输出,将文献类型标识符输出出去,并将国别加入进来
%
\renewbibmacro*{patenttitle}{%原输出来自biblatex.def文件
  \ifboolexpr{%
    test{\iffieldundef{title}}%
    and%
    test{\iffieldundef{subtitle}}%
  }%
    {}%
    {\printtext[title]{\bibtitlefont%
       \printfield[titlecase]{title}%
       \ifboolexpr{test {\iffieldundef{subtitle}}}%
       {}{\setunit{\subtitlepunct}%
       \printfield[titlecase]{subtitle}}%
       \iffieldundef{titleaddon}{\setunit{\subtitlepunct}}%
        {\setunit{\subtitlepunct}\printfield{titleaddon}\setunit{\addcomma\space}}%
       \iflistundef{location}{}%
        {\setunit{\subtitlepunct}\printlist{location}\setunit{\addcomma\space}}%
        \printfield{number}%
        \iftoggle{bbx:gbtype}{\printfield[gbtypeflag]{usera}}{}%
     %\iffieldundef{booktitle}{\newunit}{}%当title是析出时,不要标点
     %\newunit
     }%
}%
\clearlist{location}\clearlist{address}%
}