-
Notifications
You must be signed in to change notification settings - Fork 0
/
biblatex.def
2317 lines (2066 loc) · 64.8 KB
/
biblatex.def
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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% $Id: biblatex.def,v 1.7 2011/11/13 19:09:07 lehman stable $
\ProvidesFile{biblatex.def}
[\abx@rcsid $Id: biblatex.def,v 1.7 2011/11/13 19:09:07 lehman stable $
biblatex generic definitions]
% ------------------------------------------------------------------
% FORMATTING COMMANDS
% ------------------------------------------------------------------
% Generic formatting commands and hooks
% ------------------------------------------------------------------
% Used in citations, bibliography, list of shorthands
\newcommand*{\mkbibnamefirst}[1]{#1}
\newcommand*{\mkbibnamelast}[1]{#1}
\newcommand*{\mkbibnameprefix}[1]{#1}
\newcommand*{\mkbibnameaffix}[1]{#1}
\newcommand*{\bibellipsis}{[\textellipsis\unkern]\midsentence}
% Delimiters used in citations, bibliography, list of shorthands
\newcommand*{\multinamedelim}{\addcomma\space}
\newcommand*{\finalnamedelim}{%
\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
\addspace\bibstring{and}\space}
\newcommand*{\revsdnamedelim}{}
\newcommand*{\andothersdelim}{\addspace}
\newcommand*{\multilistdelim}{\addcomma\space}
\newcommand*{\finallistdelim}{%
\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
\addspace\bibstring{and}\space}
\newcommand*{\andmoredelim}{\addspace}
% Used in citations
\newcommand*{\multicitedelim}{\addsemicolon\space}
\newcommand*{\compcitedelim}{\addcomma\space}
\newcommand*{\supercitedelim}{\addcomma}
\newcommand*{\prenotedelim}{\addspace}
\newcommand*{\postnotedelim}{\addcomma\space}
\newcommand*{\nametitledelim}{\addcomma\space}
\newcommand*{\nameyeardelim}{\addspace}
\newcommand*{\volcitedelim}{\addcomma\space}
% Used in the bibliography and the list of shorthands
\newcommand*{\newunitpunct}{\addperiod\space}
\newcommand*{\entrysetpunct}{\addsemicolon\space}
\newcommand*{\finentrypunct}{\addperiod}
\newcommand*{\labelnamepunct}{\newunitpunct}
\newcommand*{\subtitlepunct}{\newunitpunct}
\newcommand*{\intitlepunct}{\addcolon\space}
\newcommand*{\bibpagespunct}{\addcomma\space}
\newcommand*{\bibpagerefpunct}{\addspace}
\newcommand*{\bibnamedash}{%
\ifdimless{\leftmargin}{0.75em}
{\mbox{\textemdash\space}}
{\makebox[\leftmargin][l]{%
\ifdimless{\leftmargin}{1.25em}
{\textendash}
{\textemdash}}}}
% Used for indexing
\newcommand*{\bibindexnamedelima}{ }
\newcommand*{\bibindexnamedelimb}{ }
\newcommand*{\bibindexnamedelimc}{ }
\newcommand*{\bibindexnamedelimd}{ }
\newcommand*{\bibindexnamedelimi}{ }
\newcommand*{\bibindexinitperiod}{.}
\newcommand*{\bibindexinitdelim}{ }
\newcommand*{\bibindexinithyphendelim}{.-}
% \bibsetup is a generic hook controlling the (low-level) layout of
% the bibliography and the list of shorthands. The default
% definition should work fine in most cases.
\newcommand*{\bibsetup}{%
\interlinepenalty=5000\relax
\widowpenalty=10000\relax
\clubpenalty=10000\relax
\raggedbottom
\frenchspacing
\biburlsetup}
% The penalties above are not specific to biblatex. These are
% low-level TeX features. \interlinepenalty is the penalty assigned
% to page breaks within a paragraph (i.e., in this case, a
% bibliography entry); \clubpenalty is an additional penalty
% assigned to page breaks after the first line of a paragraph;
% \widowpenalty is an additional penalty assigned to page breaks
% before the last line of a paragraph. Note that the value 10000
% means 'infinite' as far as TeX is concerned. Setting a penalty to
% 10000 will unconditionally suppress the respective breakpoint.
%
% The net effect of the above settings is as follows. Breaking a
% bibliography entry across pages is discouraged, but not suppressed
% altogether. If a bibliography entry spans less than four lines,
% TeX will always keep it on one page. If it spans four or more
% lines, it may be broken across pages, provided that there are at
% least two lines on the page before and after the break.
%
% These penalties should normally be used in conjunction with
% \raggedbottom. If you don't like that and remove \raggedbottom
% from the definition of \bibsetup, make sure to provide some
% stretchability between bibliography entries by setting \bibitemsep
% to a suitable value, e.g.:
%
% \setlength{\bibitemsep}{0.5\baselineskip plus 0.5\baselineskip}
%
% Using \frenchspacing in the bibliography is recommended. If you
% want more visual separation, try the package option 'block=space'.
% This will yield better results than \nonfrenchspacing.
% \citesetup is a generic hook for citations.
\newcommand*{\citesetup}{%
\frenchspacing
\biburlsetup}
% Local setup for \url; see comments in url.sty for details.
\newcounter{biburlnumpenalty}
\newcounter{biburlucpenalty}
\newcounter{biburllcpenalty}
\newcommand*{\biburlsetup}{%
\Urlmuskip=0mu plus 3mu\relax
\mathchardef\UrlBigBreakPenalty=100\relax
\mathchardef\UrlBreakPenalty=200\relax
\def\UrlBigBreaks{\do\:\do\-}%
\def\UrlBreaks{%
\do\.\do\@\do\/\do\\\do\!\do\_\do\|\do\;\do\>\do\]\do\)\do\}%
\do\,\do\?\do\'\do\+\do\=\do\#\do\$\do\&\do\*\do\^\do\"}%
\ifnumgreater{\value{biburlnumpenalty}}{0}
{\def\do##1{\appto\UrlSpecials{\do##1{\mathchar`##1 \penalty\value{biburlnumpenalty}}}}%
\do\1\do\2\do\3\do\4\do\5\do\6\do\7\do\8\do\9\do\0}
{}%
\ifnumgreater{\value{biburlucpenalty}}{0}
{\def\do##1{\appto\UrlSpecials{\do##1{\mathchar`##1 \penalty\value{biburlucpenalty}}}}%
\do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J
\do\K\do\L\do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T
\do\U\do\V\do\W\do\X\do\Y\do\Z}
{}%
\ifnumgreater{\value{biburllcpenalty}}{0}
{\def\do##1{\appto\UrlSpecials{\do##1{\mathchar`##1 \penalty\value{biburllcpenalty}}}}%
\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j
\do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t
\do\u\do\v\do\w\do\x\do\y\do\z}
{}%
\let\do=\noexpand}
% The above code allows linebreaks before numbers and letters.
% This is often the only way to break DOIs. It also allows breaks
% after hyphens and adjusts \Urlmuskip to add some stretchability
% to URLs.
% The default font of the bibliography and the list of shorthands.
% We simply reset the current font to the global defaults.
\newcommand*{\bibfont}{\normalfont\normalsize}
% Some length registers which may be used to fine-tune the
% (high-level) layout of the bibliography.
\setlength{\bibhang}{\parindent}
\setlength{\biblabelsep}{2\labelsep}
\setlength{\bibitemsep}{\itemsep}
\setlength{\bibnamesep}{0pt}
\setlength{\bibinitsep}{0pt}
\setlength{\bibparsep}{0pt}
% Miscellaneous facilities
% ------------------------------------------------------------------
% The counter 'abbrvpenalty' holds the penalty used in short or
% abbreviated bibliography strings. For example, a linebreak in
% expressions such as "et al." or "ed. by" is unfortunate, but should
% still be possible to prevent overfull boxes. We use TeX's
% \hyphenpenalty (normally 50) as the default value. The idea is
% making TeX treat the whole expression as if it were a single,
% hyphenatable word as far as line-breaking is concerned. If you
% dislike such linebreaks, use a higher value. If you do not mind
% them at all, set this counter to zero. If you want to suppress them
% unconditionally, set it to 10000.
\defcounter{abbrvpenalty}{\hyphenpenalty}
% The counter 'highnamepenalty' also holds a penalty affecting the
% line-breaking of names. This penalty is inserted between smaller
% chunks of a name, for example between the first and the middle
% name. The default value is \hyphenpenalty. If you dislike such
% linebreaks, use a higher value. If you do not mind them at all,
% set this counter to zero. If you prefer the traditional BibTeX
% behavior, set it to 10000.
\defcounter{highnamepenalty}{\hyphenpenalty}
% The counter 'lownamepenalty' holds a penalty which affects the
% line-breaking of names. This penalty is inserted between larger
% chunks of a name, for example between the chunk consisting of all
% first names and the last name. The default value is half the
% \hyphenpenalty. If you dislike such linebreaks, use a higher
% value. If you do not mind them at all, set this counter to zero.
\defcounter{lownamepenalty}{\hyphenpenalty/2}
% Note that default values assigned to the above counters are
% deliberately very low to prevent overfull boxes. This implies that
% you will hardly notice any effect on line-breaking if the text is
% set justified. If you set these counters to 10000 to suppress the
% respective breakpoints, you will notice their effect but you may
% also be confronted with overfull boxes. Keep in mind that
% line-breaking in the bibliography is often more difficult than in
% the body text and that you can not resort to rephrasing a
% sentence. In some cases it may be preferable to set the entire
% bibliography \raggedright (by modifying \bibsetup) to prevent
% suboptimal linebreaks. In this case, even the very low default
% penalties will make a visible difference.
% File name prefixes for external abstracts and annotations
\newcommand*{\bibabstractprefix}{bibabstract-}
\newcommand*{\bibannotationprefix}{bibannotation-}
% Print acronyms in small caps if possible
\newcommand*{\mkbibacro}[1]{%
\ifcsundef{\f@encoding/\f@family/\f@series/sc}
{#1}
{\textsc{\MakeLowercase{#1}}}}
% ------------------------------------------------------------------
% ADDITIONAL PACKAGE OPTIONS
% ------------------------------------------------------------------
% Style of compressed page ranges in back references
\DeclareBibliographyOption{backrefstyle}{%
\ifcsdef{abx@opt@pagerefstyle@#1}
{\letcs\abx@pagerefstyle{abx@opt@pagerefstyle@#1}}
{\PackageError{biblatex}
{Option 'backrefstyle=#1' invalid}
{The option you have supplied is invalid.\MessageBreak
See the biblatex manual for valid option keys
and possible values}}}
\newcommand*{\abx@pagerefstyle}{1}
\csdef{abx@opt@pagerefstyle@none}{-1}
\csdef{abx@opt@pagerefstyle@two}{0}
\csdef{abx@opt@pagerefstyle@three}{1}
\csdef{abx@opt@pagerefstyle@two+}{2}
\csdef{abx@opt@pagerefstyle@three+}{3}
\csdef{abx@opt@pagerefstyle@all+}{4}
% arXiv path/format selector
%
% abs = abstract page
% ps = PostScript version
% pdf = PDF version
% format = format selector
\DeclareBibliographyOption{arxiv}{\def\abx@arxivpath{#1}}
\newcommand*{\abx@arxivpath}{abs}
% ------------------------------------------------------------------
% FIELD FORMATS (#1 is the value of the field)
% ------------------------------------------------------------------
% The fallback used by \printfield
\DeclareFieldFormat{default}{#1}
% The default used by \citefield
\DeclareFieldFormat{citefield}{#1}
% Used in citations
\DeclareFieldFormat{citetitle}{\mkbibemph{#1}}
\DeclareFieldFormat
[article,inbook,incollection,inproceedings,patent,thesis,unpublished]
{citetitle}{\mkbibquote{#1\isdot}}
\DeclareFieldFormat
[suppbook,suppcollection,suppperiodical]
{citetitle}{#1}
\DeclareFieldFormat{labelyear}{\stripzeros{#1}}% = the '1995' part in 'Jones 1995a'
\DeclareFieldFormat{extrayear}{% = the 'a' in 'Jones 1995a'
\iffieldnums{labelyear}
{\mknumalph{#1}}
{\mkbibparens{\mknumalph{#1}}}}
\DeclareFieldFormat{labelalpha}{#1}% = the 'Jon95' part of 'Jon95a'
\DeclareFieldFormat{extraalpha}{\mknumalph{#1}}% = the 'a' in 'Jon95a'
\DeclareFieldFormat{shorthand}{#1\isdot}
\DeclareFieldFormat{shorthandintro}{%
\ifcapital{\MakeCapital{#1}}{#1}\isdot}
% citation commands
\DeclareFieldFormat{prenote}{#1\isdot}
\DeclareFieldFormat{postnote}{\mkpageprefix[pagination]{#1}}
\DeclareFieldFormat{volcitevolume}{\bibstring{volume}\ppspace#1}
\DeclareFieldFormat{volcitepages}{\mkpageprefix[pagination]{#1}}
% multicite commands
\DeclareFieldFormat{multiprenote}{#1\isdot}
\DeclareFieldFormat{multipostnote}{\mkpageprefix[pagination]{#1}}
% Used by \citeurl
\DeclareFieldFormat{citeurl}{\url{#1}}
% Used in the bibliography and the list of shorthands
\DeclareFieldFormat{booktitle}{\mkbibemph{#1}}
\DeclareFieldFormat{chapter}{\bibstring{chapter}~#1}
\DeclareFieldFormat{doi}{%
\mkbibacro{DOI}\addcolon\space
\ifhyperref
{\href{http://dx.doi.org/#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
\DeclareFieldFormat{edition}{%
\ifinteger{#1}
{\mkbibordedition{#1}~\bibstring{edition}}
{#1\isdot}}
\DeclareFieldFormat{eprint}{%
\iffieldundef{eprinttype}
{eprint}
{\thefield{eprinttype}}%
\addcolon\space
\ifhyperref
{\url{#1}}
{\nolinkurl{#1}}%
\iffieldundef{eprintclass}
{}
{\addspace\mkbibparens{\thefield{eprintclass}}}}
\DeclareFieldFormat{eprint:hdl}{%
HDL\addcolon\space
\ifhyperref
{\href{http://hdl.handle.net/#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
\DeclareFieldAlias{eprint:HDL}{eprint:hdl}
\DeclareFieldFormat{eprint:arxiv}{%
arXiv\addcolon
\ifhyperref
{\href{http://arxiv.org/\abx@arxivpath/#1}{%
\nolinkurl{#1}%
\iffieldundef{eprintclass}
{}
{\addspace\texttt{\mkbibbrackets{\thefield{eprintclass}}}}}}
{\nolinkurl{#1}
\iffieldundef{eprintclass}
{}
{\addspace\texttt{\mkbibbrackets{\thefield{eprintclass}}}}}}
\DeclareFieldAlias{eprint:arXiv}{eprint:arxiv}
\DeclareFieldFormat{eprint:jstor}{%
JSTOR\addcolon\space
\ifhyperref
{\href{http://www.jstor.org/stable/#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
\DeclareFieldAlias{eprint:JSTOR}{eprint:jstor}
\DeclareFieldFormat{eprint:pubmed}{%
PMID\addcolon\space
\ifhyperref
{\href{http://www.ncbi.nlm.nih.gov/pubmed/#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
\DeclareFieldAlias{eprint:PubMed}{eprint:pubmed}
\DeclareFieldFormat{eprint:googlebooks}{%
Google Books\addcolon\space
\ifhyperref
{\href{http://books.google.com/books?id=#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
\DeclareFieldAlias{eprint:Google Books}{eprint:googlebooks}
\DeclareFieldFormat{file}{\url{#1}}
\DeclareFieldFormat{isbn}{\mkbibacro{ISBN}\addcolon\space #1}
\DeclareFieldFormat{isrn}{\mkbibacro{ISRN}\addcolon\space #1}
\DeclareFieldFormat{issn}{\mkbibacro{ISSN}\addcolon\space #1}
\DeclareFieldFormat{journaltitle}{\mkbibemph{#1}}
\DeclareFieldFormat{issuetitle}{\mkbibemph{#1}}
\DeclareFieldFormat{maintitle}{\mkbibemph{#1}}
\DeclareFieldFormat{month}{\mkbibmonth{#1}}
\DeclareFieldFormat{note}{#1\isdot}
\DeclareFieldFormat{number}{#1}% number in a series
\DeclareFieldFormat[article,periodical]{number}{#1}% number of a journal
\DeclareFieldFormat{pages}{\mkpageprefix[bookpagination]{#1}}
\DeclareFieldFormat{pagetotal}{\mkpagetotal[bookpagination]{#1}}
\DeclareFieldFormat{part}{.#1}% physical part of a logical volume
\DeclareFieldFormat{series}{#1}% publication series
\DeclareFieldFormat[article,periodical]{series}{% series of a journal
\ifinteger{#1}
{\mkbibordseries{#1}~\bibstring{jourser}}
{\ifbibstring{#1}{\bibstring{#1}}{#1}}}
\DeclareFieldFormat{pubstate}{\ifbibstring{#1}{\bibstring{#1}}{#1}}
\DeclareFieldFormat{title}{\mkbibemph{#1}}
\DeclareFieldFormat
[article,inbook,incollection,inproceedings,patent,thesis,unpublished]
{title}{\mkbibquote{#1\isdot}}
\DeclareFieldFormat
[suppbook,suppcollection,suppperiodical]
{title}{#1}
\DeclareFieldFormat{type}{\ifbibstring{#1}{\bibstring{#1}}{#1}}
\DeclareFieldFormat{url}{\mkbibacro{URL}\addcolon\space\url{#1}}
\DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\space#1}}
\DeclareFieldFormat{version}{\bibstring{version}~#1}
\DeclareFieldFormat{volume}{\bibstring{volume}~#1}% volume of a book
\DeclareFieldFormat[article,periodical]{volume}{#1}% volume of a journal
\DeclareFieldFormat{volumes}{#1~\bibstring{volumes}}
% Generic formats for \printtext and \printfield
\DeclareFieldFormat{emph}{\mkbibemph{#1}}
\DeclareFieldFormat{bold}{\textbf{#1}}
\DeclareFieldFormat{smallcaps}{\textsc{#1}}
\DeclareFieldFormat{parens}{\mkbibparens{#1}}
\DeclareFieldFormat{brackets}{\mkbibbrackets{#1}}
\DeclareFieldFormat{bibhyperref}{\bibhyperref{#1}}
\DeclareFieldFormat{bibhyperlink}{\bibhyperlink{\thefield{entrykey}}{#1}}
\DeclareFieldFormat{bibhypertarget}{\bibhypertarget{\thefield{entrykey}}{#1}}
\DeclareFieldFormat{titlecase}{#1}
\DeclareFieldFormat{noformat}{#1}
% ------------------------------------------------------------------
% LITERAL LIST FORMATS (#1 is the current item)
% ------------------------------------------------------------------
% Formatting directives for literal lists
% ------------------------------------------------------------------
% The fallback used by \printlist
\DeclareListFormat{default}{%
\usebibmacro{list:delim}{#1}%
#1\isdot
\usebibmacro{list:andothers}}
% The default used by \citelist
\DeclareListAlias{citelist}{default}
% Used in the bibliography
\DeclareListFormat{publisher}{%
\usebibmacro{list:delim}{#1}%
#1\isdot
\usebibmacro{list:andothers}}
\DeclareListFormat{language}{%
\usebibmacro{list:delim}{%
\ifbibstring{#1}
{\bibxstring{#1}}
{\ifbibstring{lang#1}
{\bibxstring{lang#1}}
{#1}}}%
\ifbibstring{#1}
{\bibstring{#1}}
{\ifbibstring{lang#1}
{\bibstring{lang#1}}
{#1}}%
\usebibmacro{list:andothers}}
\DeclareListFormat{location}{%
\usebibmacro{list:delim}{#1}%
#1\isdot
\usebibmacro{list:andothers}}
\DeclareListFormat[patent]{location}{%
\usebibmacro{list:plain}%
\ifbibstring{#1}{\bibstring{#1}}{#1\isdot}%
\usebibmacro{list:andothers}}
\DeclareListFormat{pageref}{%
\ifnumless{\abx@pagerefstyle}{0}
{\usebibmacro{list:plain}%
\ifhyperref
{\hyperlink{page.#1}{#1}}
{#1}}
{\ifnumequal{\value{listcount}}{1}
{\usebibmacro{pageref:init}}
{}%
\usebibmacro{pageref:comp}{#1}%
\ifnumequal{\value{listcount}}{\value{liststop}}
{\usebibmacro{pageref:dump}}
{}}}
\DeclareListAlias{origlocation}{location}
\DeclareListAlias{origpublisher}{publisher}
\DeclareListAlias{institution}{default}
\DeclareListAlias{organization}{default}
% Auxiliary macros for list formatting directives
% ------------------------------------------------------------------
\newbibmacro*{list:delim}[1]{%
\ifnumgreater{\value{listcount}}{\value{liststart}}
{\ifboolexpr{
test {\ifnumless{\value{listcount}}{\value{liststop}}}
or
test \ifmoreitems
}
{\multilistdelim}
{\lbx@finallistdelim{#1}}}
{}}
\newbibmacro*{list:plain}{%
\ifnumgreater{\value{listcount}}{\value{liststart}}
{\multilistdelim}
{}}
\newbibmacro*{list:andothers}{%
\ifboolexpr{
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
and
test \ifmoreitems
}
{\ifnumgreater{\value{liststop}}{1}
{\finalandcomma}
{}%
\andmoredelim\bibstring{andmore}}
{}}
\newbibmacro*{pageref:init}{%
\let\abx@range@hold=\empty
\def\abx@range@diff{0}%
\def\abx@range@prev{-1}%
\def\abx@range@this{0}%
\def\abx@range@last{-1}}
\newbibmacro*{pageref:comp}[1]{%
\numdef\abx@range@prev{\abx@range@prev+1}%
\ifinteger{#1}
{\def\abx@range@num{#1}%
\def\abx@range@this{1}%
\ifnumequal{\abx@range@this}{\abx@range@last}
{}
{\def\abx@range@prev{-1}}}
{\ifrmnum{#1}
{\numdef\abx@range@num{\rmntonum{#1}}%
\def\abx@range@this{2}%
\ifnumequal{\abx@range@this}{\abx@range@last}
{}
{\def\abx@range@prev{-1}}}
{\undef\abx@range@num
\def\abx@range@this{0}%
\def\abx@range@prev{-1}}}%
\ifdef\abx@range@num
{\ifnumequal{\abx@range@num}{\abx@range@prev}
{\def\abx@range@hold{#1}%
\numdef\abx@range@diff{\abx@range@diff+1}}
{\usebibmacro{pageref:dump}%
\ifnumgreater{\abx@range@last}{-1}
{\multilistdelim}
{}%
\ifhyperref
{\hyperlink{page.#1}{#1}}
{#1}}%
\edef\abx@range@prev{\abx@range@num}}
{\usebibmacro{pageref:dump}%
\ifnumgreater{\abx@range@last}{-1}
{\multilistdelim}
{}%
\ifhyperref
{\hyperlink{page.#1}{#1}}
{#1}%
\def\abx@range@prev{-1}}%
\edef\abx@range@last{\abx@range@this}}
\newbibmacro*{pageref:dump}{%
\ifnumgreater{\abx@range@diff}{0}
{\ifcase\abx@pagerefstyle\relax % two
\bibrangedash
\ifhyperref
{\hyperlink{page.\abx@range@hold}{\abx@range@hold}}
{\abx@range@hold}%
\or % three
\ifnumless{\abx@range@diff}{2}
{\multilistdelim}
{\bibrangedash}%
\ifhyperref
{\hyperlink{page.\abx@range@hold}{\abx@range@hold}}
{\abx@range@hold}%
\or % two+
\ifnumless{\abx@range@diff}{2}
{\sqspace
\ifhyperref
{\hyperlink{page.\abx@range@hold}{\bibstring{sequens}}}
{\bibstring{sequens}}}
{\bibrangedash
\ifhyperref
{\hyperlink{page.\abx@range@hold}{\abx@range@hold}}
{\abx@range@hold}}%
\or % three+
\ifnumless{\abx@range@diff}{2}
{\sqspace
\ifhyperref
{\hyperlink{page.\abx@range@hold}{\bibstring{sequens}}}
{\bibstring{sequens}}}
{\ifnumless{\abx@range@diff}{3}
{\sqspace
\ifhyperref
{\hyperlink{page.\abx@range@hold}{\bibstring{sequentes}}}
{\bibstring{sequentes}}}
{\bibrangedash
\ifhyperref
{\hyperlink{page.\abx@range@hold}{\abx@range@hold}}
{\abx@range@hold}}}%
\else % all+
\ifnumless{\abx@range@diff}{2}
{\sqspace
\ifhyperref
{\hyperlink{page.\abx@range@hold}{\bibstring{sequens}}}
{\bibstring{sequens}}}
{\sqspace
\ifhyperref
{\hyperlink{page.\abx@range@hold}{\bibstring{sequentes}}}
{\bibstring{sequentes}}}%
\fi
\def\abx@range@diff{0}}
{}}
% ------------------------------------------------------------------
% NAME LIST FORMATS
% ------------------------------------------------------------------
% Argments passed to formatting directives for name lists:
%
% #1 = last name
% #2 = last name (initials)
% #3 = first name
% #4 = first name (initials)
% #5 = name prefix, a.k.a. 'von part'
% #6 = name prefix (initials)
% #7 = name affix, a.k.a. 'junior part'
% #8 = name affix (initials)
% Formatting directives for name lists
% ------------------------------------------------------------------
\DeclareNameFormat{first-last}{%
\iffirstinits
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}%
\usebibmacro{name:andothers}}
\DeclareNameFormat{last-first}{%
\iffirstinits
{\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}}%
\usebibmacro{name:andothers}}
\DeclareNameFormat{last-first/first-last}{%
\ifnumequal{\value{listcount}}{1}
{\iffirstinits
{\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}}%
\ifblank{#3#5}
{}
{\usebibmacro{name:revsdelim}}}
{\iffirstinits
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}}%
\usebibmacro{name:andothers}}
\DeclareNameFormat{initsonly}{%
\usebibmacro{name:first-last}{#2}{#4}{#6}{#8}%
\usebibmacro{name:andothers}}
% Fallback used by \printnames
\DeclareNameAlias{default}{first-last}
% Default used by \citename
\DeclareNameAlias{citename}{default}
% Used in some citations
\DeclareNameFormat{labelname}{%
\ifcase\value{uniquename}%
\usebibmacro{name:last}{#1}{#3}{#5}{#7}%
\or
\ifuseprefix
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#8}}
{\usebibmacro{name:first-last}{#1}{#4}{#6}{#8}}%
\or
\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}%
\fi
\usebibmacro{name:andothers}}
% Used in the bibliography
\DeclareNameAlias{sortname}{last-first/first-last}
\DeclareNameAlias{author}{default}
\DeclareNameAlias{bookauthor}{author}
\DeclareNameAlias{editor}{default}
\DeclareNameAlias{editora}{editor}
\DeclareNameAlias{editorb}{editor}
\DeclareNameAlias{editorc}{editor}
\DeclareNameAlias{translator}{default}
\DeclareNameAlias{byauthor}{default}
\DeclareNameAlias{bybookauthor}{byauthor}
\DeclareNameAlias{byeditor}{default}
\DeclareNameAlias{byeditora}{byeditor}
\DeclareNameAlias{byeditorb}{byeditor}
\DeclareNameAlias{byeditorc}{byeditor}
\DeclareNameAlias{bytranslator}{default}
\DeclareNameAlias{withcommentator}{default}
\DeclareNameAlias{withannotator}{default}
\DeclareNameAlias{withintroduction}{default}
\DeclareNameAlias{withforeword}{default}
\DeclareNameAlias{withafterword}{default}
\DeclareFieldFormat{authortype}{#1}
\DeclareFieldFormat{editortype}{#1}
% Auxiliary macros for name formatting directives
% ------------------------------------------------------------------
\newbibmacro*{name:last}[4]{%
\ifuseprefix
{\usebibmacro{name:delim}{#3#1}%
\usebibmacro{name:hook}{#3#1}%
\ifblank{#3}
{}
{\ifcapital
{\mkbibnameprefix{\MakeCapital{#3}}\isdot}
{\mkbibnameprefix{#3}\isdot}%
\ifpunctmark{'}{}{\bibnamedelimc}}}
{\usebibmacro{name:delim}{#1}%
\usebibmacro{name:hook}{#1}}%
\mkbibnamelast{#1}}%
\newbibmacro*{name:first-last}[4]{%
\usebibmacro{name:delim}{#2#3#1}%
\usebibmacro{name:hook}{#2#3#1}%
\ifblank{#2}{}{\mkbibnamefirst{#2}\isdot\bibnamedelimd}%
\ifblank{#3}{}{%
\mkbibnameprefix{#3}\isdot
\ifpunctmark{'}
{}
{\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}%
\mkbibnamelast{#1}\isdot
\ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}}
\newbibmacro*{name:last-first}[4]{%
\ifuseprefix
{\usebibmacro{name:delim}{#3#1}%
\usebibmacro{name:hook}{#3#1}%
\ifblank{#3}{}{%
\ifcapital
{\mkbibnameprefix{\MakeCapital{#3}}\isdot}
{\mkbibnameprefix{#3}\isdot}%
\ifpunctmark{'}{}{\bibnamedelimc}}%
\mkbibnamelast{#1}\isdot
\ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
\ifblank{#2}{}{\addcomma\bibnamedelimd\mkbibnamefirst{#2}\isdot}}
{\usebibmacro{name:delim}{#1}%
\usebibmacro{name:hook}{#1}%
\mkbibnamelast{#1}\isdot
\ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
\ifblank{#2#3}{}{\addcomma}%
\ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}\isdot}%
\ifblank{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}}}
\newbibmacro*{name:hook}[1]{%
\ifnumequal{\value{listcount}}{1}
{\lbx@initnamehook{#1}}
{}}
\newbibmacro*{name:delim}[1]{%
\ifnumgreater{\value{listcount}}{\value{liststart}}
{\ifboolexpr{
test {\ifnumless{\value{listcount}}{\value{liststop}}}
or
test \ifmorenames
}
{\multinamedelim}
{\lbx@finalnamedelim{#1}}}
{}}
\newbibmacro*{name:revsdelim}{%
\ifboolexpr{
(
test {\ifnumequal{\value{liststop}}{1}}
and
test \ifmorenames
)
or
test {\ifnumequal{\value{liststop}}{2}}
}
{\revsdnamedelim}
{}}
\newbibmacro*{name:andothers}{%
\ifboolexpr{
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
and
test \ifmorenames
}
{\ifnumgreater{\value{liststop}}{1}
{\finalandcomma}
{}%
\andothersdelim\bibstring{andothers}}
{}}
% ------------------------------------------------------------------
% INDEX FORMATS FOR FIELDS (#1 is the value of the field)
% ------------------------------------------------------------------
% There is no need to test if a field to be indexed is empty because
% \indexfield performs this test implicitly.
% The fallback used by \indexfield
\DeclareIndexFieldFormat{default}{\index{#1}}
% Used in the bibliography and in citations
\DeclareIndexFieldFormat{indextitle}{%
\usebibmacro{index:title}{\index}{#1}}
\newbibmacro*{index:title}[2]{%
\usebibmacro{index:field}{#1}{\thefield{indexsorttitle}}{\emph{#2}}}
\newbibmacro*{index:field}[3]{%
\begingroup
\protected@edef\theindexentry{%
\unexpanded{#1}{#2\actualoperator\unexpanded{#3}}}%
\theindexentry
\endgroup}
% ------------------------------------------------------------------
% INDEX FORMATS FOR LITERAL LISTS (#1 is the current item)
% ------------------------------------------------------------------
% The fallback used by \indexlist
\DeclareIndexListFormat{default}{\index{#1}}
% ------------------------------------------------------------------
% INDEX FORMATS FOR NAME LISTS
% ------------------------------------------------------------------
% Argments passed to indexing directives for name lists:
%
% #1 = last name
% #2 = last name (initials)
% #3 = first name
% #4 = first name (initials)
% #5 = name prefix, a.k.a 'von part'
% #6 = name prefix (initials)
% #7 = name affix, a.k.a 'junior part'
% #8 = name affix (initials)
% Indexing directives for name lists
% ------------------------------------------------------------------
% The fallback used by \indexnames
\DeclareIndexNameFormat{default}{%
\usebibmacro{index:name}{\index}{#1}{#3}{#5}{#7}}
% Used in citations
\DeclareIndexNameAlias{labelname}{default}
% Used in the bibliography
\DeclareIndexNameAlias{author}{default}
\DeclareIndexNameAlias{editor}{default}
\DeclareIndexNameAlias{bookauthor}{default}
% Auxiliary macros for name indexing directives
% ------------------------------------------------------------------
% When generating an index entry, we need to test which parts of a
% name are actually available to prevent spurious punctuation and
% spaces. Since those parts which are not available yield an empty
% argument, we can use the \ifblank test from etoolbox.sty to analyze
% the name.
%
% Note that the standard LaTeX \index command simply writes its
% argument to the .idx file without preventing expansion. This means
% that all \ifblank tests are expanded on the way and will not end
% up in the index. The index package, however, prevents expansion.
% This would lead to \ifblank ending up in the .idx file. To avoid
% that, we preprocess the index entry inside an \edef. We use
% \unexpanded to protect the \index command and the actual data from
% expansion. This definition will work with both index.sty and the
% standard indexing facilities.
%
% We also use \ifuseprefix to ensure that the name prefix is handled
% properly. \actualoperator is the so-called actual operator, as
% defined by the 'actual' specifier in the .ist file. The makeindex
% programm will use the part preceeding the \actualoperator
% delimiter for sorting. The part after the delimiter is used as the
% index is printed. Note that this is not specific to biblatex, see
% the makeindex documentation for details.
\newcommand*{\actualoperator}{@}
\newbibmacro*{index:name}[5]{%
\begingroup
\ifuseprefix
{\protected@edef\theindexentry{%
\unexpanded{#1}{%
\ifblank{#4}{}{#4 }%
\@firstofone #2% remove spurious braces
\ifblank{#5}{}{ #5}%
\ifblank{#3}{}{, #3}%
\actualoperator
\ifblank{#4}{}{\MakeCapital{#4} }%
#2%
\ifblank{#5}{}{ #5}%
\ifblank{#3}{}{, #3}}}}
{\protected@edef\theindexentry{%
\unexpanded{#1}{%
\@firstofone #2% remove spurious braces
\ifblank{#5}{}{ #5}%
\ifblank{#3#4}{}{,}%
\ifblank{#3}{}{ #3}%
\ifblank{#4}{}{ #4}}}}%
\theindexentry
\endgroup}
% ------------------------------------------------------------------
% CUSTOMIZATION
% ------------------------------------------------------------------
\DeclareLabelname{%
shortauthor,
author,
shorteditor,
editor,
translator}
\DeclareLabelyear{%
year,
eventyear,
origyear,
urlyear}
% ------------------------------------------------------------------
% SORTING
% ------------------------------------------------------------------
\DeclarePresort{mm}
\DeclareSortingScheme{none}{
\sort{\citeorder}
}
\DeclareSortingScheme{debug}{
\sort{
\field{entrykey}
}
}
\DeclareSortingScheme{nty}{
\sort{
\field{presort}
}
\sort[final]{
\field{sortkey}
}
\sort{
\name{sortname}
\name{author}
\name{editor}
\name{translator}
\field{sorttitle}
\field{title}
}
\sort{
\field{sorttitle}
\field{title}
}
\sort{
\field{sortyear}
\field{year}
}
\sort{
\field[padside=left,padwidth=4,padchar=0]{volume}
\literal{0000}
}
}
\DeclareSortingScheme{nyt}{
\sort{
\field{presort}
}
\sort[final]{
\field{sortkey}
}
\sort{
\name{sortname}
\name{author}
\name{editor}
\name{translator}
\field{sorttitle}
\field{title}
}
\sort{
\field{sortyear}