summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-philosophy/philosophy-modern.bbx
blob: 2b08fd82a90db4ddcbd7f47c69be8553a022800c (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
%%
%% This is file `philosophy-modern.bbx',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% biblatex-philosophy.dtx  (with options: `modern-bbx')
%%   ______________________________________________________
%%   The biblatex-philosophy package
%%   Copyright (C) 2009-2013 Ivan Valbusa
%%   All rights reserved
%% 
%%   License information appended
%% 
\ProvidesFile{philosophy-modern.bbx}
    [2013/03/30 v0.8d valbusa beta]


\RequireBibliographyStyle{philosophy-classic}
\newtoggle{bbx:yearleft}
\DeclareBibliographyOption{yearleft}[true]{%
  \settoggle{bbx:yearleft}{#1}}
\ExecuteBibliographyOptions{%
  yearleft=false}
\newlength{\yeartitle}
\newlength{\postnamesep}
\setlength{\yeartitle}{0.8em}%
\setlength{\postnamesep}{0.5ex plus 2pt minus 1pt}
\setlength{\bibitemsep}{\postnamesep}
\setlength{\bibnamesep}{1.5ex plus 2pt minus 1pt}
\setlength{\bibhang}{4\parindent}

\AtBeginBibliography{
\iftoggle{bbx:yearleft}{%
\setlength{\yeartitle}{\fill}}
{}}
\newcommand{\postsep}{\par\nobreak\vskip\postnamesep%
  \hskip-\bibhang\ignorespaces}
\renewcommand{\labelnamepunct}{}

\AtBeginShorthands{%
\renewcommand{\postsep}{}%
\renewcommand{\labelnamepunct}{\newunitpunct}}
\renewbibmacro*{date+extrayear}{%
      \begingroup%
        \clearfield{month}%
  \makebox[\bibhang][r]{\printtext{%
    \iffieldundef{labelyear}%
    {\printtext{\midsentence\bibstring{nodate}}}%
    {\printtext{\printdateextra}}%
    \hskip\yeartitle}}%
       \endgroup}%

\renewbibmacro*{labeltitle}{%
  \iffieldundef{label}%
    {\iffieldundef{shorttitle}
    {\printfield{title}\clearfield{title}}%
    {\printfield[title]{shorttitle}}}%
  {\printtext{\printfield{label}}%
\postsep}}
\renewbibmacro*{author}{%
  \ifboolexpr{
    test \ifuseauthor
    and
    not test {\ifnameundef{author}}
  }
    {\usebibmacro{bbx:dashcheck}
       {}%
       {\usebibmacro{bbx:savehash}%
        \printnames{author}%
        \iffieldundef{nameaddon}{}%
        {\setunit{\addspace}%
        \printtext[brackets]{\printfield{nameaddon}}}%
         \iffieldundef{authortype}
         {}%
         {\setunit{\addcomma\space}}%
        \usebibmacro{authorstrg}%
    \postsep}}%
      {\global\undef\bbx@lasthash
      \usebibmacro{labeltitle}%
      \setunit*{\addspace}}%
  \usebibmacro{date+extrayear}}%

\renewbibmacro*{editor}{%
  \usebibmacro{bbx:editor}{editorstrg}}
\renewbibmacro*{editor+others}{%
  \usebibmacro{bbx:editor}{editor+othersstrg}}
\renewbibmacro*{bbx:editor}[1]{%
 \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }%
    {\usebibmacro{bbx:dashcheck}%
       {}%
       {\printnames{editor}%
     \postsep%ADD
   \usebibmacro{bbx:savehash}}}%
     {\global\undef\bbx@lasthash%
     \usebibmacro{labeltitle}}%
  \usebibmacro{date+extrayear}%
    \iffieldundef{label}%
    {\usebibmacro{#1}%
    \clearname{editor}%
    \printtext{\addcomma\space}}{}}%
\DeclareCiteCommand{\bbx@crossref@inbook}
  {}%
  {\usebibmacro{citeindex}%
  \ifuseeditor{%
    \ifthenelse{\value{listtotal}=2}%
      {\printnames[][-\value{maxnamesincross}]{labelname}}%
      {\printnames[][-\value{minnamesincross}]{labelname}}}%
     {\usebibmacro{labeltitle}}%
    \setunit*{\addspace}%
    \usebibmacro{classic:date+extrayear}}%
  {}%
  {}%

\DeclareCiteCommand{\bbx@crossref@incollection}
  {}%
  {\usebibmacro{citeindex}%
  \ifuseeditor{%
    \ifthenelse{\value{listtotal}=2}%
      {\printnames[][-\value{maxnamesincross}]{labelname}}%
      {\printnames[][-\value{minnamesincross}]{labelname}}}%
     {\usebibmacro{labeltitle}}
    \setunit*{\addspace}%
    \usebibmacro{classic:date+extrayear}}%
  {}%
  {}%

\newbibmacro*{classic:date+extrayear}{%
      \begingroup%
        \clearfield{month}%
    \iffieldundef{labelyear}
      {\printtext[parens]{\midsentence\bibstring{nodate}}}%
      {\printtext[parens]{%
 \printfield{labelyear}%
 \printfield{extrayear}}}%
       \endgroup}%
\define@key{blx@bib1}{restoreclassic}[]{}
\define@key{blx@bib2}{restoreclassic}[true]{%
  \ifstrequal{#1}{true}{%
  \setlength{\bibhang}{\parindent}%
  \renewcommand{\labelnamepunct}{\newunitpunct}
\renewbibmacro*{date+extrayear}{%
      \begingroup%
        \clearfield{month}%
    \iffieldundef{labelyear}
      {\printtext[parens]{\midsentence\bibstring{nodate}}}%
      {\printtext[parens]{\printdateextra}}%
       \endgroup}%
\renewbibmacro*{author}{%
  \ifboolexpr{
    test \ifuseauthor
    and
    not test {\ifnameundef{author}}
  }%
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\usebibmacro{bbx:savehash}%
        \printnames{author}%
        \iffieldundef{nameaddon}{}%
        {\setunit{\addspace}%
        \printtext[brackets]{\printfield{nameaddon}}}%
\iffieldundef{authortype}
  {\setunit{\addspace}}
  {\setunit{\addcomma\space}}}%
     \iffieldundef{authortype}
       {}%
       {\usebibmacro{authorstrg}%
\setunit{\addspace}}}%
    {\global\undef\bbx@lasthash
     \usebibmacro{labeltitle}%
     \setunit*{\addspace}}%
  \usebibmacro{date+extrayear}}%

\renewbibmacro*{editor}{%
  \usebibmacro{bbx:editor}{editorstrg}}
\renewbibmacro*{editor+others}{%
  \usebibmacro{bbx:editor}{editor+othersstrg}}
\renewbibmacro*{bbx:editor}[1]{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }%
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\printnames{editor}%
\setunit{\addspace}%
\usebibmacro{bbx:savehash}}%
     \usebibmacro{#1}%
     \clearname{editor}%
     \setunit{\addspace}}%
    {\global\undef\bbx@lasthash
     \usebibmacro{labeltitle}%
     \setunit*{\addspace}}%
  \usebibmacro{date+extrayear}}%

\renewbibmacro*{labeltitle}{%
  \iffieldundef{label}%
    {\iffieldundef{shorttitle}%
       {\printfield{title}%
        \clearfield{title}}%
       {\printfield[title]{shorttitle}}}%
    {\printfield{label}}}%
  }{}}%
%% 
%%  Copyright 2009-2013 by Ivan Valbusa
%% 
%%  This program is provided under the terms of the
%%  LaTeX Project Public License distributed from CTAN
%%  archives in directory macros/latex/base/lppl.txt.
%% 
%%  Author: Ivan Valbusa
%%          ivan dot valbusa at univr dot it
%% 
%%  This work has the LPPL maintenance status "author-maintained".
%% 
%%
%% End of file `philosophy-modern.bbx'.