summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex-contrib/biblatex-spbasic/latex/biblatex-spbasic.cbx
blob: b0c3284b33b001f9c01d7c40d9d0d966bb82981a (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
% biblatex-spbasic.cbx, Herbert Voß
% Herbert Voß -- 2021
% this style is an biblatex style for Springer's spbasic.bst
%
%% This material is subject to the LaTeX Project Public License. 
%% See  https://latex-project.org/lppl/ for the details of that license.
%%
\ProvidesFile{biblatex-spbasic.cbx}[2021/12/22 v0.03 biblatex bibliography style]
% Release Notes can be found in the README

\RequireCitationStyle{authoryear}

\renewbibmacro*{textcite}{%
  \ifnameundef{labelname}
    {\iffieldundef{shorthand}
       {\usebibmacro{cite:label}%
        \setunit{%
          \global\booltrue{cbx:parens}%
          \printtext[bibhyperref]{\printdelim{nonameyeardelim}\bibopenparen}}%
        \ifnumequal{\value{citecount}}{1}
          {\usebibmacro{prenote}}
          {}%
        \usebibmacro{cite:labeldate+extradate}}
       {\usebibmacro{cite:shorthand}}}
    {\printtext[bibhyperref]{\printnames{labelname}}%
     \setunit{%
       \global\booltrue{cbx:parens}%
%       \printtext[bibhyperref]{\printdelim{nameyeardelim}\bibopenparen}}%
       \printdelim{nameyeardelim}\bibopenparen}%
     \ifnumequal{\value{citecount}}{1}
       {\usebibmacro{prenote}}
       {}%
     \usebibmacro{citeyear}}}

\renewbibmacro*{cite}{%
  \iffieldundef{shorthand}
    {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
       {\usebibmacro{cite:label}%
        \setunit{\printdelim{nonameyeardelim}}}
       {\printtext[bibhyperref]{\printnames{labelname}}%
        \setunit{\printdelim{nameyeardelim}}}%
     \usebibmacro{cite:labeldate+extradate}}
    {\usebibmacro{cite:shorthand}}}

\renewbibmacro*{textcite:postnote}{%
  \iffieldundef{postnote}%
    {\ifbool{cbx:parens}%
       {\bibcloseparen}%
%       {\printtext[bibhyperref]{\bibcloseparen}}%
       {}}%
    {\ifbool{cbx:parens}%
%       {\setunit{\printtext[bibhyperref]{\printdelim{postnotedelim}}}}%
       {\setunit{\printdelim{postnotedelim}}}%
%       {\setunit{\printtext[bibhyperref]{\printdelim{extpostnotedelim}\bibopenparen}}}%
       {\setunit{\printdelim{extpostnotedelim}\bibopenparen}}%
     \printtext[bibhyperref]{\printfield{postnote}}\bibcloseparen}}

\renewbibmacro*{prenote}{%
  \iffieldundef{prenote}
    {}
    {\printtext[bibhyperref]{\printfield{prenote}}%
%     \setunit{\printtext[bibhyperref]{\printdelim{prenotedelim}}}}}
     \setunit{\printdelim{prenotedelim}}}}

\renewbibmacro*{postnote}{%
  \iffieldundef{postnote}
    {}
%    {\setunit{\printtext[bibhyperref]{\printdelim{postnotedelim}}}%
    {\setunit{\printdelim{postnotedelim}}%
     \printtext[bibhyperref]{\printfield{postnote}}}}




\endinput