-
Notifications
You must be signed in to change notification settings - Fork 8
/
AuthorGuide.tex
8879 lines (6605 loc) · 725 KB
/
AuthorGuide.tex
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
%注意一些命令比如\cmd,\file,<| |>,而$符号直接用\$表示即可。
%\section{Author Guide}
\section{样式作者指南}
\label{aut}
%This part of the manual documents the author interface of the \biblatex package. The author guide covers everything you need to know in order to write new citation and bibliography styles or localisation modules. You should read the user guide first before continuing with this part of the manual.
本节是样式作者指南,主要介绍\biblatex 包的接口。该指南囊括了设计参考文献著录和标注样式或者本地化模型所需了解的所有知识。在阅读本节内容前最好先阅读上一节的用户手册。
\subsection{概述}%Overview
\label{aut:int}
在讨论\biblatex 提供的命令和工具之前,我们首先介绍一些基本概念。\biblatex 包以一种特殊方式使用辅助文件。最值得注意的是当使用\bibtex 后端程序时,\file{bbl} 文件的使用方式存在差别,即只有一个\file{bst} 文件可用来实现结构化的数据接口,该文件并非用来输出可打印数据。
使用\latex 的标准参考文献工具,一个文档通常包含任意数量的文献引用命令,以及常放在文档末尾的\cmd{bibliographystyle} 和\cmd{bibliography} 命令。文献引用命令在文档中的位置是任意的,而\cmd{bibliographystyle} 和\cmd{bibliography} 命令则标记了打印参考文献表的位置,比如:
Before we get to the commands and facilities provided by \biblatex, we will have a look at some of its fundamental concepts. The \biblatex package uses auxiliary files in a special way. Most notably, the \file{bbl} file is used differently and there is no concept of a style-dependent \file{bst} file. With \latex's standard bibliographic facilities, a document includes any number of citation commands in the document body plus \cmd{bibliographystyle} and \cmd{bibliography}, usually towards the end of the document. The location of the former is arbitrary, the latter marks the spot where the list of references is to be printed:
\begin{ltxexample}
\documentclass{...}
\begin{document}
\cite{...}
...
\bibliographystyle{...}
\bibliography{...}
\end{document}
\end{ltxexample}
%
%Processing this files requires that a certain procedure be followed. This procedure is as follows:
处理这些文件遵循一定的流程,其过程如下:
\begin{enumerate}
\item 运行\bin{latex}: 第一次运行\bin{latex}, 在\file{aux} 文件中写入\cmd{bibstyle} 和 \cmd{bibdata} 命令,以及所有标注的\cmd{citation} 命令。这时,各引文标注\footnote{译者:这里的references译为引文标注,指引用命令在正文中产生的标注,这个标注由标签label构成。} 是未定义的,因为 \latex 等待\bibtex 提供需要的数据,当然参考文献表也未生成。
%Run \bin{latex}: On the first run, \cmd{bibstyle} and \cmd{bibdata} commands are written to the \file{aux} file, along with \cmd{citation} commands for all citations. At this point, the references are undefined because \latex is waiting for \bibtex to supply the required data. There is also no bibliography yet.
\item 运行\bin{bibtex}: \bibtex 在\file{bbl} 文件中写入一个\env{thebibliography} 环境,用以为\file{aux} 文件中\cmd{citation} 命令提供所需的所有\gls{条目},这些条目的数据来自\file{bib} 文件。
%Run \bin{bibtex}: \bibtex writes a \env{thebibliography} environment to the \file{bbl} file, supplying all entries from the \file{bib} file which were requested by the \cmd{citation} commands in the \file{aux} file.
\item 运行\bin{latex}: 第二次运行\bin{latex},\env{thebibliography} 环境中的\cmd{bibitem} 命令为各参考文献条目在\file{aux} 文件中写入\cmd{bibcite} 命令。这些\cmd{bibcite} 命令定义的标签将用于\cmd{cite} 命令。然而,各引文标注仍然未定义,因为这些标签在最后一次运行\bin{latex} 前仍是未知的。
%Run \bin{latex}: Starting with the second run, the \cmd{bibitem} commands in the \env{thebibliography} environment write one \cmd{bibcite} command for each bibliography entry to the \file{aux} file. These \cmd{bibcite} commands define the citation labels used by \cmd{cite}. However, the references are still undefined because the labels are not available until the end of this run.
\item 运行\bin{latex}: 第三次运行,随着导言区最后读入了\file{aux} 文件,引文标注的标签定义完成。至此所有的标注可以正确打印。
%Run \bin{latex}: Starting with the third run, the citation labels are defined as the \file{aux} file is read in at the end of the preamble. All citations can now be printed.
\end{enumerate}
注意到所有的参考文献数据都以最终格式(指最后打印出的格式)写入\file{bbl} 文件。该文件的读取和处理如同任何文档中的可打印章节。例如,考虑在一个\file{bib} 文件中有如下条目:
%Note that all bibliographic data is written to the \file{bbl} file in the final format. The \file{bbl} file is read in and processed like any printable section of the document. For example, consider the following entry in a \file{bib} file:
\begin{lstlisting}[style=bibtex]{}
@Book{companion,
author = {Michel Goossens and Frank Mittelbach and Alexander Samarin},
title = {The LaTeX Companion},
publisher = {Addison-Wesley},
address = {Reading, Mass.},
year = {1994},
}
\end{lstlisting}
%
根据\path{plain.bst} 样式,\bibtex 在\file{bbl} 文件中输出该条目如下:
%With the \path{plain.bst} style, \bibtex exports this entry to the \file{bbl} file as follows:
\begin{ltxexample}
\bibitem{companion}
Michel Goossens, Frank Mittelbach, and Alexander Samarin.
\newblock {\em The LaTeX Companion}.
\newblock Addison-Wesley, Reading, Mass., 1994.
\end{ltxexample}
%
默认情况下,\latex 生成顺序编码制标注标签,因此\cmd{bibitem} 命令在\file{aux} 文件中写入的行如下所示:
%By default, \latex generates numeric citation labels, hence \cmd{bibitem} writes lines such as the following to the \file{aux} file:
\begin{ltxexample}
\bibcite{companion}{1}
\end{ltxexample}
%
要实现一个不同的标注标签样式,意味着需要通过\file{aux} 文件传递更多的数据。比如,当使用\sty{natbib} 包时,\file{aux} 文件包含的标注(或引用)信息行,如下所示:
%Implementing a different citation style implies that more data has to be transferred via the \file{aux} file. With the \sty{natbib} package, for example, the \file{aux} file contains lines like this one:
\begin{ltxexample}
\bibcite{companion}{{1}{1994}{{Goossens et~al.}}{{Goossens, Mittelbach,
and Samarin}}}
\end{ltxexample}
%
\biblatex 包支持任何格式的标注标签,因此标注命令需要访问完整的参考文献数据。观察同样需要在标注中提供完整参考文献数据的\sty{jurabib} 包的输出,我们会更理解这一需求对上述处理过程意味着什么。
%The \biblatex package supports citations in any arbitrary format, hence citation commands need access to all bibliographic data. What this would mean within the scope of the procedure outlined above becomes obvious when looking at the output of the \sty{jurabib} package which also makes all bibliographic data available in citations:
\begin{ltxexample}
\bibcite{companion}{{Goossens\jbbfsasep Mittelbach\jbbstasep Samarin}%
{}{{0}{}{book}{1994}{}{}{}{}{Reading, Mass.\bpubaddr{}Addison-Wesley%
\bibbdsep{} 1994}}{{The LaTeX Companion}{}{}{2}{}{}{}{}{}}{\bibnf
{Goossens}{Michel}{M.}{}{}\Bibbfsasep\bibnf{Mittelbach}{Frank}{F.}%
{}{}\Bibbstasep\bibnf{Samarin}{Alexander}{A.}{}{}}{\bibtfont{The
LaTeX Companion}.\ \apyformat{Reading, Mass.\bpubaddr{}
Addison-Wesley\bibbdsep{} 1994}}}
\end{ltxexample}
%
在这种情况下,整个\env{thebibliography} 环境的内容是通过\file{aux} 文件进行有效传递的。数据首先从\file{bbl} 文件中读取出来,写入到\file{aux} 中,然后再从\file{aux} 读出保存到内存中。参考文献表本身的生成也需要先读入\file{bbl} 文件。这也使得\biblatex 包被迫通过\file{aux} 文件回收所有数据。这意味着上述过程处理过度且多余,因为不管怎样数据都需要保存到内存中。
%In this case, the contents of the entire \env{thebibliography} environment are effectively transferred via the \file{aux} file. The data is read from the \file{bbl} file, written to the \file{aux} file, read back from the \file{aux} file and then kept in memory. The bibliography itself is still generated as the \file{bbl} file is read in. The \biblatex package would also be forced to cycle all data through the \file{aux} file. This implies processing overhead and is also redundant because the data has to be kept in memory anyway.
这种传统的处理过程都基于一个假设,即条目的完整数据只是参考文献表需要而所有的标注都使用短标签。这对于有内存限制的情况是非常高效的,但也意味着它很难扩展。这就是\biblatex 采取另一种方式的原因。采用新的方式,首先文档结构略有变化。取消在文档内使用\cmd{bibliography} 命令,数据库文件由导言区的\cmd{addbibresource} 命令指定,完全忽略\cmd{bibliographystyle} 命令(所有的功能都将由包选项控制),参考文献表则使用\cmd{printbibliography} 命令打印:
%The traditional procedure is based on the assumption that the full bibliographic data of an entry is only required in the bibliography and that all citations use short labels. This makes it very effective in terms of memory requirements, but it also implies that it does not scale well. That is why \biblatex takes a different approach. First of all, the document structure is slightly different. Instead of using \cmd{bibliography} in the document body, database files are specified in the preamble with \cmd{addbibresource}, \cmd{bibliographystyle} is omitted entirely (all features are controlled by package options), and the bibliography is printed using \cmd{printbibliography}:
\begin{ltxexample}
\documentclass{...}
\usepackage[...]{biblatex}
\addbibresource{...}
\begin{document}
\cite{...}
...
\printbibliography
\end{document}
\end{ltxexample}
%
为简化整个过程,\biblatex 基本上以应用\file{aux} 文件的方式应用\file{bbl} 文件,并舍弃了\cmd{bibcite} 命令。于是,我们得到如下流程:
%In order to streamline the whole procedure, \biblatex essentially employs the \file{bbl} file like an \file{aux} file, rendering \cmd{bibcite} obsolete. We then get the following procedure:
\begin{enumerate}
\item 运行\bin{latex}:第一步类似于上述的传统方式:将\cmd{bibstyle} 和 \cmd{bibdata} 以及所有引用的\cmd{citation} 命令写入到\file{aux} 文件中(以\bibtex 为后端程序)或者写到\file{bcf} 文件中(以\biber 为后端程序)。然后等待后端程序提供需要的数据。当以\bibtex 为后端程序时,\biblatex 使用一个特殊的\file{bst} 文件,该文件用于实现\bibtex 后端程序的数据接口,因此\cmd{bibstyle} 命令必须是|\bibstyle{biblatex}|。
Run \bin{latex}: The first step is similar to the traditional procedure described above: \cmd{bibstyle} and \cmd{bibdata} commands are written to th \file{bcf} file, along with \cmd{citation} commands for all citations. We then wait for the backend to supply the required data.
\item 运行\bin{biber} 或 \bin{bibtex}:后端程序为辅助文件中所有\cmd{citation} 命令提供所需的条目,这些条目的数据来自\file{bib} 文件。然而,它并不在\file{bbl} 文件中写出一个可打印的参考文献表,而是一个结构化表达的参考文献数据。类似于\file{aux} 文件,读入该\file{bbl} 文件时不打印任何东西,仅是将数据存入内存中。
%Run \bin{biber} or \bin{bibtex}: The backend supplies those entries from the \file{bib} file which were requested by the \cmd{citation} commands in the auxiliary file. However, it does not write a printable bibliography to the \file{bbl} file, but rather a structured representation of the bibliographic data. Just like an \file{aux} file, this \file{bbl} file does not print anything when read in. It merely puts data in memory.
\item 运行\bin{latex}: 第二次运行,\file{bbl} 文件在文档正文开始的时候处理,类似于\file{aux} 文件。从这开始,所有参考文献数据都已在内存中,所以所有的引用标注都可以正确打印。\footnote{如果\opt{defernumbers} 包选项启用, \biblatex 以类似于传统过程的一种算法来生成顺序制标签。这种情况下,这些数字将在参考文献表打印时指定,且需从后端辅助文件中回收。因此需要额外再运行一次\latex 以在标注中应用。 } 引用命令不仅可以访问预定义的标签,还可以访问完整的参考文献数据。参考文献表由内存中的相同数据生成,可以根据需要进行筛选和划分。
%Run \bin{latex}: Starting with the second run, the \file{bbl} file is processed right at the beginning of the document body, just like an \file{aux} file. From this point on, all bibliographic data is available in memory so that all citations can be printed right away.\footnote{If the \opt{defernumbers} package option is enabled \biblatex uses an algorithm similar to the traditional procedure to generate numeric labels. In this case, the numbers are assigned as the bibliography is printed and then cycled through the backend auxiliary file. It will take an additional \latex run for them to be picked up in citations.} The citation commands have access to the complete bibliographic data, not only to a predefined label. The bibliography is generated from memory using the same data and may be filtered or split as required.
\end{enumerate}
我们再次观察上面给出的条目示例:
%Let's consider the sample entry given above once more:
\begin{lstlisting}[style=bibtex]{}
@Book{companion,
author = {Michel Goossens and Frank Mittelbach and Alexander Samarin},
title = {The LaTeX Companion},
publisher = {Addison-Wesley},
address = {Reading, Mass.},
year = {1994},
}
\end{lstlisting}
%
使用\biblatex 及\biber 后端程序,这一条目实际上以如下格式输出:
%With \biblatex and the \biber backend, this entry is essentially exported in the following format:
\begin{ltxexample}
\entry{companion}{book}{}
\labelname{author}{3}{}{%
{{uniquename=0,hash=...}{Goossens}{G.}{Michel}{M.}{}{}{}{}}%
{{uniquename=0,hash=...}{Mittelbach}{M.}{Frank}{F.}{}{}{}{}}%
{{uniquename=0,hash=...}{Samarin}{S.}{Alexander}{A.}{}{}{}{}}%
}
\name{author}{3}{}{%
{{uniquename=0,hash=...}{Goossens}{G.}{Michel}{M.}{}{}{}{}}%
{{uniquename=0,hash=...}{Mittelbach}{M.}{Frank}{F.}{}{}{}{}}%
{{uniquename=0,hash=...}{Samarin}{S.}{Alexander}{A.}{}{}{}{}}%
}
\list{publisher}{1}{%
{Addison-Wesley}%
}
\list{location}{1}{%
{Reading, Mass.}%
}
\field{title}{The LaTeX Companion}
\field{year}{1994}
\endentry
\end{ltxexample}
%
由该示例可见,某种程度上,结构化的数据构成了\file{bbl} 文件内容\footnote{译者:这里应该是bbl文件而不是原文的bib文件}。此时关于参考文献条目最终格式的任何决定都未作出。而参考文献表和引用标注的格式化最终由 \latex 宏控制,这些宏则定义在参考文献著录和标注样式文件中。
%As seen in this example, the data is presented in a structured format that resembles the structure of a \file{bib} file to some extent. At this point, no decision concerning the final format of the bibliography entry has been made. The formatting of the bibliography and all citations is controlled by \latex macros, which are defined in bibliography and citation style files.
\subsection{参考文献著录样式}%Bibliography Styles
\label{aut:bbx}
\gls{参考文献著录样式} 是用于控制打印参考文献表条目的宏的集合,定义在扩展名为\file{bbx} 的文件中。\biblatex 包在其末尾加载所选择的参考文献著录样式文件。需要注意: 多个标准样式共享的一些常用宏定义在\path{biblatex.def} 文件中。该文件同样在宏包末尾加载,但先于所选的著录样式文件。
%A bibliography style is a set of macros which print the entries in the bibliography. Such styles are defined in files with the suffix \file{bbx}. The \biblatex package loads the selected bibliography style file at the end of the package. Note that a small repertory of frequently used macros shared by several of the standard bibliography styles is included in \path{biblatex.def}. This file is loaded at the end of the package as well, prior to the selected bibliography style.
\subsubsection{参考文献著录样式文件}% Bibliography Style Files
\label{aut:bbx:bbx}
在我们讨论参考文献著录样式的各部分内容之前,先观察一个典型\file{bbx} 文件的总体结构:
%Before we go over the individual components of a bibliography style, consider this example of the overall structure of a typical \file{bbx} file:
\begin{ltxexample}
\ProvidesFile{example.bbx}[2006/03/15 v1.0 biblatex bibliography style]
\defbibenvironment{bibliography}
{...}
{...}
{...}
\defbibenvironment{shorthand}
{...}
{...}
{...}
\InitializeBibliographyStyle{...}
\DeclareBibliographyDriver{article}{...}
\DeclareBibliographyDriver{book}{...}
\DeclareBibliographyDriver{inbook}{...}
...
\DeclareBibliographyDriver{shorthand}{...}
\endinput
\end{ltxexample}
%
参考文献著录样式文件的主要结构包含如下命令:
%The main structure of a bibliography style file consists of the following commands:
\begin{ltxsyntax}
\cmditem{RequireBibliographyStyle}{style}
该命令是可选的,用于引入一些建立在更一般的参考文献样式上的特殊样式。该命令加载了样式文件\path{style.bbx}。
%This command is optional and intended for specialized bibliography styles built on top of a more generic style. It loads the bibliography style \path{style.bbx}.
\cmditem{InitializeBibliographyStyle}{code}
该命令在参考文献表开始之前插入任意给定的\prm{code},但在参考文献表所形成的组内。该命令是可选的。它可以用于共享不同参考文献驱动需要的一些相同定义,但不能用于参考文献组外。记住,文档中可以有多个参考文献表,如果在某个文献表中对参考文献驱动进行了一些全局设置,最好在下一个参考文献表开始前进行重设。
%Specifies arbitrary \prm{code} to be inserted at the beginning of the bibliography, but inside the group formed by the bibliography. This command is optional. It may be useful for definitions which are shared by several bibliography drivers but not used outside the bibliography. Keep in mind that there may be several bibliographies in a document. If the bibliography drivers make any global assignments, they should be reset at the beginning of the next bibliography.
\cmditem{DeclareBibliographyDriver}{entrytype}{code}
定义一个参考文献驱动。一个驱动 <driver> 是一个宏,用于控制某一具体的参考文献条目(当打印参考文献表时)或者某一具体命名了的参考文献表(当打印多个参考文献表时)。\prm{entrytype} 与\file{bib} 文件中使用的条目类型对应,以小写字母给出(见\secref{bib:typ})。\prm{entrytype} 变量可以是一个星号。这种情况下,该驱动将作为未定义具体驱动的条目类型的驱动。\prm{code} 是用于打印各自\prm{entrytype} 的参考文献条目的任意代码。该命令是必须的。每个参考文献著录样式都应提供所用到的每类条目的驱动。
%Defines a bibliography driver. A <driver> is a macro which handles a specific entry type (when printing bibliography lists) or a specific named bibliography list (when printing bibliography lists). The \prm{entrytype} corresponds to the entry type used in \file{bib} files, specified in lowercase letters (see \secref{bib:typ}). The \prm{entrytype} argument may also be an asterisk. In this case, the driver serves as a fallback which is used if no specific driver for the entry type has been defined. The \prm{code} is arbitrary code which typesets all bibliography entries of the respective \prm{entrytype}. This command is mandatory. Every bibliography style should provide a driver for each entry type.
\cmditem{DeclareBibliographyAlias}{alias}{entrytype}
如果一个参考文献驱动用于处理多个条目类型,该命令可以用来定义以\prm{entrytype} 命名的驱动的别名。\prm{alias} 选项可以是一个星号,这种情况下,该驱动将作为未定义具体驱动的条目类型的驱动。
%If a bibliography driver covers more than one entry type, this command may be used to define an alias where \prm{entrytype} is the name of a defined driver. This command is optional. The \prm{alias} argument may also be an asterisk. In this case, the \prm{entrytype} driver serves as a fallback which is used if no specific driver for an entry has been defined.
Note that an alias declared with \cmd{DeclareBibliographyAlias} only <reroutes> the bibliography driver from \prm{alias} to \prm{entrytype}. Type-specific formatting directives still operate with the old \prm{alias} name. \cmd{DeclareBibliographyAlias} thus provides only a <soft> alias. If a complete alias is desired so that \prm{alias} and \prm{entrytype} are completely indistinguishable and use the same type-specific formatting, an approach with source mapping would be more appropriate (cf.~the mappings for \secref{bib:typ:als} in \secref{apx:maps:bibtex}, this would give a <hard> alias).
\cmditem{DeclareBibliographyOption}[datatype]{key}[value]{code}
该命令以\keyval 格式定义额外的导言区选项。\prm{key} 是选项键。\prm{code} 是当使用该选项时执行的任意\tex 代码。键值作为|#1|传递给\prm{code}。可选的\prm{value} 是当该选项仅有键名而无键值给出时的默认键值。这对于布尔选项非常有用。\prm{datatype} 是选项的数据类型(datatype),如果缺省,那么默认为 <boolean>(布尔类型)。一个定义示例如下:
%This command defines additional preamble options in \keyval format. The \prm{key} is the option key. The \prm{code} is arbitrary \tex code to be executed whenever the option is used. The value passed to the option is passed on to the \prm{code} as |#1|. The optional \prm{value} is a default value to be used if the bare key is given without any value. This is useful for boolean switches.
%The \prm{datatype} is a the datatype for the option. If omitted, it defaults to <boolean>. For example, with a definition like the following:
\begin{ltxexample}
\DeclareBibliographyOption[boolean]{somekey}[true]{...}
\end{ltxexample}
%
给出<\texttt{somekey}>而没有键值等价于<\kvopt{somekey}{true}>。有效的\prm{datatype} 在默认的\biber 数据模型中定义,包括:
%giving <\texttt{somekey}> without a value is equivalent to <\kvopt{somekey}{true}>. Valid \prm{datatype} values are defined in the default \biber Datamodel as:
\begin{ltxexample}
\DeclareDatamodelConstant[type=list]{optiondatatypes}{boolean,integer,string,xml}
\end{ltxexample}
\cmditem{DeclareTypeOption}[datatype]{key}[value]{code}
Similar to \cmd{DeclareBibliographyOption} but defines options which are settable on a per"=type basis using the optional argument of \cmd{ExecuteBibliographyOptions} (see \secref{use:cfg:opt}). The \prm{code} is executed whenever \biblatex prepares the data of an entry of the type for which the option has been set for use by a citation command or a bibliography driver.
\cmditem{DeclareEntryOption}[datatype]{key}[value]{code}
类似于\cmd{DeclareBibliographyOption},但用于定义具体条目类型的\bibfield{options} 域(见\secref{bib:fld:spc} 节)中的可设选项。\prm{code} 在\biblatex 为标注命令和参考文献驱动准备数据时执行。
%Similar to \cmd{DeclareBibliographyOption} but defines options which are settable on a per"=entry basis in the \bibfield{options} field from \secref{bib:fld:spc}. The \prm{code} is executed whenever \biblatex prepares the data of the entry for use by a citation command or a bibliography driver.
\cmditem{DeclareBiblatexOption}{scope,\dots}[datatype]{key}[value]{code}
This command is a convenient interface to declare an option for several scopes at once. The \prm{scope} argument may be a comma"=separated list of scopes for which the option will be declared. Currently the scopes \opt{global}, \opt{type}, \opt{entry}, \opt{namelist} and \opt{name} are supported, the first three of which are equivalent to defining the option with \cmd{DeclareBibliographyOption}, \cmd{DeclareTypeOption} and \cmd{DeclareEntryOption}, respectively.
\end{ltxsyntax}
\subsubsection{参考文献表环境}%Bibliography Environments
\label{aut:bbx:env}
除了定义参考文献驱动,参考文献著录样式也要定义参考文献表环境用于控制参考文献表的输出。这些环境由\cmd{defbibenvironment} 命令定义。默认情况下,\cmd{printbibliography} 使用\opt{bibliography} 环境。下面是一个适用于不打印标签的参考文献表的环境定义:
%Apart from defining bibliography drivers, the bibliography style is also responsible for the environments which control the layout of the bibliography and bibliography lists. These environments are defined with \cmd{defbibenvironment}. By default, \cmd{printbibliography} uses the environment \opt{bibliography}. Here is a definition suitable for a bibliography style which does not print any labels in the bibliography:
\begin{ltxexample}
\defbibenvironment{bibliography}
{\list
{}
{\setlength{\leftmargin}{\bibhang}%
\setlength{\itemindent}{-\leftmargin}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}}
{\endlist}
{\item}
\end{ltxexample}
%
该定义使用\biblatex 提供的\cmd{bibhang}\gls{尺寸},应用了一个带悬挂缩进的\env{list} 环境。它允许使用\cmd{bibitemsep} 和 \cmd{bibparsep} 来进行一定程度的布局调整,\biblatex 提供的这两个尺寸的目的也在于此(见 \secref{aut:fmt:len})。作者年制(\texttt{authoryear})和作者题名制(\texttt{authortitle})的参考文献样式使用类似于该例的定义。
%This definition employs a \env{list} environment with hanging indentation, using the \cmd{bibhang} length register provided by \biblatex. It allows for a certain degree of configurability by using \cmd{bibitemsep} and \cmd{bibparsep}, two length registers provided by \biblatex for this very purpose (see \secref{aut:fmt:len}). The \texttt{authoryear} and \texttt{authortitle} bibliography styles use a definition similar to this example.
\begin{ltxexample}
\defbibenvironment{bibliography}
{\list
{\printfield[labelnumberwidth]{labelnumber}}
{\setlength{\labelwidth}{\labelnumberwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{\hss##1}}
{\endlist}
{\item}
\end{ltxexample}
%
一些参考文献样式在参考文献表中打印标签。比如,设计一个顺序编码的参考文献样式需要在参考文献表中每个条目前面打印顺序编码数字,这样参考文献表看起来就像一个顺序列表。在第一个示例中,\cmd{list} 命令的第一个参数是空的。在上面这个示例中,我们需要在其中插入数字,这些数字由\biblatex 的\bibfield{labelnumber} 域提供。我们也应用\biblatex 提供的几个尺寸和工具,详见 \secref{aut:fmt:ich, aut:fmt:ilc}。顺序编码制(\texttt{numeric})参考文献样式使用如上的定义。顺序字母制(\texttt{alphabetic})的样式也是类似的,只是用\texttt{labelalpha} 和\texttt{labelalphawidth} 代替了\textsf{\texttt{labelnumber}} 和\texttt{labelnumberwidth}。
%Some bibliography styles print labels in the bibliography. For example, a bibliography style designed for a numeric citation scheme will print the number of every entry such that the bibliography looks like a numbered list. In the first example, the first argument to \cmd{list} was empty. In this example, we need it to insert the number, which is provided by \biblatex in the \bibfield{labelnumber} field. We also employ several length registers and other facilities provided by \biblatex, see \secref{aut:fmt:ich, aut:fmt:ilc} for details. The \texttt{numeric} bibliography style uses the definition given above. The \texttt{alphabetic} style is similar, except that \textsf{\texttt{labelnumber}} is replaced by \texttt{labelalpha} and \texttt{labelnumberwidth} by \texttt{labelalphawidth}.
参考文献列表以类似方式处理。\cmd{printbiblist} 命令默认使用以bibliography list命名的环境。
%(当使用\bibtex 时,\cmd{printshorthands} 总是使用\texttt{shorthand} 环境)。
一个典型示例如下,其中的尺寸和工具定义详见第\secref{aut:fmt:ich, aut:fmt:ilc} 节。
%Bibliography lists are handled in a similar way. \cmd{printbiblist} uses the environment named after the bibliography list by default. A typical example is given below. See \secref{aut:fmt:ich, aut:fmt:ilc} for details on the length registers and facilities used in this example.
\begin{ltxexample}
\defbibenvironment{shorthand}
{\list
{\printfield[shorthandwidth]{shorthand}}
{\setlength{\labelwidth}{\shorthandwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}%
\renewcommand*{\makelabel}[1]{##1\hss}}}
{\endlist}
{\item}
\end{ltxexample}
\subsubsection{参考文献驱动} %Bibliography Drivers
\label{aut:bbx:drv}
在讨论\biblatex 包的数据接口命令前,了解一下参考文献驱动的结构是有益的。注意,虽然下面给出的示例是大为简化的,但仍具有说明价值。为可读性考虑,我们忽略了一些可能是\bibtype{book} 条目的域,并且简化处理没有忽略的域。主要是为了说明驱动的结构。关于\bibtex 文件格式域与\biblatex 宏包数据类型的映射信息,见\secref{bib:fld}。
%Before we go over the commands which form the data interface of the \biblatex package, it may be instructive to have a look at the structure of a bibliography driver. Note that the example given below is greatly simplified, but still functional. For the sake of readability, we omit several fields which may be part of a \bibtype{book} entry and also simplify the handling of those which are considered. The main point is to give you an idea of how a driver is structured. For information about the mapping of the \bibtex file format fields to \biblatex's data types, see \secref{bib:fld}.
\begin{ltxexample}
\DeclareBibliographyDriver{book}{%
\printnames{author}%
\newunit\newblock
\printfield{title}%
\newunit\newblock
\printlist{publisher}%
\newunit
\printlist{location}%
\newunit
\printfield{year}%
\finentry}
\end{ltxexample}
%
标准的参考文献样式应用两个参考文献宏\texttt{begentry} 和\texttt{finentry}:
%The standard bibliography styles employ two bibliography macros \texttt{begentry} and \texttt{finentry}:
\begin{ltxexample}
\DeclareBibliographyDriver{<<entrytype>>}{%
\usebibmacro{begentry}
...
\usebibmacro{finentry}}
\end{ltxexample}
%
默认定义为:
%with the default definitions
\begin{ltxexample}
\newbibmacro*{begentry}{}
\newbibmacro*{finentry}{\finentry}
\end{ltxexample}
%
为方便在驱动开始或结束时使用钩子,推荐使用这两个宏。
%Use of these macros is recommended for easy hooks into the beginning and end of the driver.
上述给出的\texttt{book} 条目类型的驱动中存在有一些缺省: 即\cmd{printnames}, \cmd{printlist}, 和 \cmd{printfield} 命令所使用的格式化指令。为了说明一个格式化指令是什么,这里给出上述驱动示例中所使用的指令。域格式是很直接的,域的值直接作为参数传递给能实现期望格式的指令。下面的指令简单地将输入参数用一个\cmd{emph} 命令包裹:
%Returning to the driver for the \texttt{book} entrytype above, there is still one piece missing: the formatting directives used by \cmd{printnames}, \cmd{printlist}, and \cmd{printfield}. To give you an idea of what a formatting directive looks like, here are some fictional ones used by our sample driver. Field formats are straightforward, the value of the field is passed to the formatting directive as an argument which may be formatted as desired. The following directive will simply wrap its argument in an \cmd{emph} command:
\begin{ltxexample}
\DeclareFieldFormat{title}{\emph{#1}}
\end{ltxexample}
%
列表格式则稍微要复杂一些。在将列表划分为独立的项后,\biblatex 将对列表中的每一项执行格式化指令。各项作为参数传递给格式化指令。列表中各项间的分隔符由相应的指令控制,因此我们在插入分隔符前必须要检查当前位置是位于列表中还是位于列表末尾。
%List formats are slightly more complex. After splitting up the list into individual items, \biblatex will execute the formatting directive once for every item in the list. The item is passed to the directive as an argument. The separator to be inserted between the individual items in the list is also handled by the corresponding directive, hence we have to check whether we are in the middle of the list or at the end when inserting it.
\begin{ltxexample}
\DeclareListFormat{location}{%
#1%
\ifthenelse{\value{listcount}<\value{liststop}}
{\addcomma\space}
{}}
\end{ltxexample}
%
%姓名(name)的格式化命令类似于这种抄录列表,但列表中的单个项是姓名,因此需要自动的解析为姓名的不同组成部分。列表格式化命令对列表中每个姓名都执行一次,信吗的各个部分以分开的参数传递给该命令。比如,|#1|是姓(last name)和|#3|是名(first name)。下面给出一个简化的格式化命令示例:
%上述各格式化命令调换了第一个作者的姓名前后顺序«Last, First»),而其余姓名则是常规顺序(«First Last»)。注意:必须要保证提供的姓名部分是姓(last name),因此我们必须要检查实际数据中姓名的哪些部分是存在的。如果姓名的一些部分不存在,则相关的变量就为空。如同抄录列表的命令,在各独立项之间插入的分隔符也由格式化命令控制,因为我们也要检查是否处于列表中还是在其末尾,这也是第二个\cmd{ifthenelse} 命令做的事情。
姓名(name)的格式化指令类似于抄录列表。
%Formatting directives for names are similar to those for literal lists.
依赖于数据模型常量<nameparts>的姓名有如下默认定义:
%Names depend on the datamodel constant <nameparts> which has the default definition:
\begin{ltxexample}
\DeclareDatamodelConstant[type=list]{nameparts}
{prefix,family,suffix,given}
\end{ltxexample}
%
可以对其进行设置,比如添加更多姓名成分来处理类似父系姓的问题(见文件\file{93-nameparts.tex})。自然的,数据源需要一个扩展的姓名格式。\biblatexml (\secref{apx:biblatexml})可以处理该问题,其中有一个扩展的姓名格式,当使用\biber 后端时(见\biber 文档),可以处理自定义的姓名成分。
This can be customised to add more name parts to deal with things like patronymics (see the example file \file{93-nameparts.tex}). This needs an extended name format for data sources since the standard \bibtex name format is very limited. \biblatexml (\secref{apx:biblatexml}) handles this natively and there is an extended name format which can handle custom nameparts when using \biber (see \secref{use:enf}).
在姓名格式中,姓名成分常量声明将为数据模型中定义的每个姓名成分提供两个宏:
%Inside name formats, the nameparts constant declaration makes available two macros for each name part defined in the datamodel:
\begin{ltxexample}
\namepart<namepart> \% The full <namepart>
\namepart<namepart>i \% The initials of the <namepart>
\namepart<namepart>un \% Numeric value indicating uniqueness level for <namepart>
\end{ltxexample}
%
%\cmd{namepart<namepart>un} only exists if the package option \opt{uniquename} is not set to <false> and can take the following values.
\cmd{namepart<namepart>un}仅当\opt{uniquename}包选项未设置成<false>时存在,可以设置为如下值:
\begin{argumentlist}{00}
\item[0] 不用于消除姓名歧义的<namepart>(因为在\cmd{DeclareUniquenameTemplate}中设置了\opt{disambiguation=none},见\secref{aut:cav:amb}))。这种情况下,样式需要确定对应这一<namepart>需打印的内容。
%<namepart> was not used in disambiguating the name (because \opt{disambiguation=none} was set in \cmd{DeclareUniquenameTemplate}, see \secref{aut:cav:amb}). In this case the style should decide what to print for this <namepart>
\item[1] 仅需要为<namepart>打印首字母,用以根据\opt{uniquename}选项设置来确保唯一性。
%Initials only should be printed for <namepart> to ensure uniqueness according to the \opt{uniquename} package option setting
\item[2] 需要打印完整的<namepart>,用以根据\opt{uniquename}选项设置来确保唯一性。
%The full <namepart> should be printed to ensure uniqueness according to the \opt{uniquename} package option setting
\end{argumentlist}
%Note these per-namepart uniqueness macros are essentially an override of the \opt{uniquename} value (see \secref{aut:aux:tst}) for the name as a whole. Styles can choose to use either the less granular \opt{uniquename} value or the more detailed per-namepart values. Usually the general \opt{uniquename} value is enough for ordinary Western names but the more granular information per-namepart is provided to allow sophisticated name uniqueness processing for more complex name schemata.
注意,这些按姓名成分处理唯一性的宏实质上是对用于整个姓名的\opt{uniquename}值的覆盖(见\secref{aut:aux:tst})。样式可以选择使用更粗粒度的\opt{uniquename} 值或者更详细的依照姓名成分的值。通常情况下,\opt{uniquename}对于一般的西方姓名已经足够,但也提供了更细粒度的信息用于在复杂姓名格式中进行姓名唯一性的精细处理。
%The name formatting directive is executed once for each name in the name list. Here is a simplified example---the standard name formats are more intricate:
姓名的格式化指令对姓名列表中的每一个姓名进行处理,下面是一个简单示例,标准的格式化处理要更复杂:
\begin{ltxexample}
\DeclareNameFormat{author}{%
\ifthenelse{\value{listcount}=1}
{\namepartfamily%
\ifdefvoid{\namepartgiven}{}{\addcomma\space\namepartgiven}}
{\ifdefvoid{\namepartgiven}{}{\namepartgiven\space}%
\namepartfamily}%
\ifthenelse{\value{listcount}<\value{liststop}}
{\addcomma\space}
{}}
\end{ltxexample}
%
%The above directive reverses the name of the first author («Family, Given»)/(«Last, First») and prints the remaining names in their regular sequence («Given Family»)/(«First Last»). Note that the only component which is guaranteed to be available is the last/family name, hence we have to check which parts of the name are actually present. If a certain name part is not available, the corresponding macro will be empty. As with directives for literal lists, the separator to be inserted between the individual items in the name list is also handled by the formatting directive, hence we have to check whether we are in the middle of the list or at the end when inserting it. This is what the second \cmd{ifthenelse} test does. See also \secref{aut:bib:fmt}.
上述格式化指令调换了第一个作者的姓名前后顺序(«Last, First»),而其余姓名则是常规顺序(«First Last»)。
注意: 当仅有一个姓名成分时,必须确保要它是姓(last name),因此我们需要检查实际数据中姓名的哪些成分存在。
如果姓名的一些成分不存在,则相应的宏就为空。如同抄录列表的指令,在各独立项之间插入的分隔符也由格式化指令控制,
因为我们也要检查当前位置是处于列表中还是在其末尾,这也是第二个\cmd{ifthenelse} 命令做的事情。
另见\secref{aut:bib:fmt}节.
%A similar output that also respects the \cmd{multinamedelim} and \cmd{finalnamedelim} commands as well as the <prefix> and <suffix> name parts can be achieved with
一个涉及到\cmd{multinamedelim}和\cmd{finalnamedelim}命令,
及前缀(<prefix>) 和后缀(<suffix>)姓名成分的类似输出可以通过如下方式实现:
\begin{ltxexample}
\DeclareNameAlias{author}{family-given/given-family}
\end{ltxexample}
\subsubsection{特殊域}%Special Fields
\label{aut:bbx:fld}
下面的列表和域用于\biblatex 给参考文献驱动和标注命令传递数据。它们由宏包自动定义,并不在\file{bib} 文件中使用。但从参考文献著录和标注样式的角度看,它们与\file{bib} 文件中的域并没有什么不同。
%The following lists and fields are used by \biblatex to pass data to bibliography drivers and citation commands. They are not used in \file{bib} files but defined automatically by the package. From the perspective of a bibliography or citation style, they are not different from the fields in a \file{bib} file.
\paragraph{一般域} %Generic Fields
\label{aut:bbx:fld:gen}
\begin{fieldlist}
\fielditem{$<$datetype$>$dateunspecified}{string}
如果$<$datetype$>$date具有一个\acr{ISO8601-2} 4.3 <unspecified>,该域将被设置为\opt{yearindecade}, \opt{yearincentury}, \opt{monthinyear}, \opt{dayinmonth} 或\opt{dayinyear} 之一,这些字符串定义了unspecified 信息的粒度(即表示日期的不确定度,yearincentury表示一个世纪范围内不确定,yearindecade表示10年范围内不确定)。这些字符串可用于日期范围的判断,日期范围自动根据<unspecified>日期创建,一个样式可以选择一种特殊方式来格式化日期。参见\secref{bib:use:dat}。例如:一个条目的日期为:
%If $<$datetype$>$date held an \acr{ISO8601-2} 4.3 <unspecified>, this field will be set to one of \opt{yearindecade}, \opt{yearincentury}, \opt{monthinyear}, \opt{dayinmonth} or \opt{dayinyear} which specifies the granularity of the unspecified information. These strings can be tested for and along with the date ranges which are automatically created for such <unspecified> dates, a style may choose to format the date in a special way. See \secref{bib:use:dat}. For example, an entry with dates such as:
\begin{lstlisting}[style=bibtex]{}
@book{key,
date = {19uu},
origdate = {199u}
}
\end{lstlisting}
%
将在\file{.bbl} 产生如下信息:
%would result in the same information in the \file{.bbl} as:
\begin{lstlisting}[style=bibtex]{}
@book{key,
date = {1900/1999},
origdate = {1990/1999}
}
\end{lstlisting}
%
但也会额外地将\bibfield{dateunspecified} 域设置为<yearincentury>,将\bibfield{origdateunspecified} 设置为<yearindecade>。这一信息可以用来给\bibfield{date} 提供可能的信息<20th century>,给\bibfield{origdate} 提供<The 1990s>,这一信息无法单独从日期范围推算。当<unspecified>元信息给出时,这一自动生成的范围即已知,因此使用该范围值进行特殊的格式化相对容易。但标准样式不做此处理,\file{96-dates.tex} 给出了一些示例。
%but would additionally have the field \bibfield{dateunspecified} set to <yearincentury> and \bibfield{origdateunspecified} set to <yearindecade>. This information could be used to render the \bibfield{date} as perhaps <20th century> and \bibfield{origdate} as <The 1990s>, information which cannot be derived from the date ranges alone. Since such auto-generated ranges have a know values, given the <unspecified> meta-information, it is relatively easy to use the range values to format special cases. While the standard styles not do this, examples are given in the file \file{96-dates.tex}.
\fielditem{entrykey}{string}
\file{bib} 文件中某一项的条目关键词(entry key)。这是一个字符串,用于\biblatex 及其后端程序确定\file{bib} 文件中的某一条目。
%The entry key of an item in the \file{bib} file. This is the string used by \biblatex and the backend to identify an entry in the \file{bib} file.
Note that the set of characters allowed and usable in the string for \bibfield{entrykey} depends on the backend (\biber, \bibtex) as well as the \latex engine (\pdflatex, \lualatex, \xelatex).
Generally, ASCII-letters (\texttt{a-z}, \texttt{A-Z}) and numbers (\texttt{0-9}) are safe, so are the punctuation characters full stop (\texttt{.}) and solidus (\texttt{/}). The punctuation characters \texttt{-\_:;!?} are also safe even if they are made active by \sty{babel}/\sty{polyglossia}. If a Unicode engine is used, non-ASCII characters are also acceptable.
Curly braces (\texttt{\{\}}), commas, spaces, backslashes (\texttt{\textbackslash}), hashes (\texttt{\#}), percent characters (\texttt{\%}) and tildes (\texttt{\textasciitilde}) are always forbidden. \biber additionally forbids round brackets (\texttt{()}), quotation marks (\texttt{\textquotedbl}, \texttt{\textquotesingle}), and the equals sign (\texttt{=}).
The \bibfield{entrykey} is case sensitive, but it is not recommended to exploit that fact too much by introducing two different entries whose key differs only in capitalisation (\eg\ \texttt{sigfridsson} and \texttt{Sigfridsson}).
For full portability it is advisable to stick to a scheme of lowercase (and if so desired uppercase) ASCII-letters, numbers and a small set of acceptable punctuation characters, say \texttt{.:-}.
\fielditem{childentrykey}{string}\DeprecatedMark
%This field is no longer necessary or recommended. For backwards
%compatibility, it is merely a copy of the \bibfield{entrykey} field in any
%set children.
该域不再必需的,也不推荐使用。为后向兼容考虑,它仅仅是集中子条目的\bibfield{entrykey}域的副本。
%老版本的信息:
%当引用一个条目集中的子条目时,\biblatex 给标注命令提供\bibtype{set} 父条目集的数据。这意味着\bibfield{entrykey} 将保存父条目集的关键词。而子条目的关键词在\bibfield{childentrykey} 域中提供。该域仅在引用条目集的某一子条目时使用。
%When citing a subentry of an entry set, \biblatex provides the data of the parent \bibtype{set} entry to citation commands. This implies that the \bibfield{entrykey} field holds the entry key of the parent. The entry key of the child entry being cited is provided in the \bibfield{childentrykey} field. This field is only available when citing a subentry of an entry set.
\fielditem{labelnamesource}{literal}
保存给\bibfield{labelname} 提供信息的域的域名,由\cmd{DeclareLabelname} 确定。
%Holds the name of the field used to populate \bibfield{labelname},
%determined by \cmd{DeclareLabelname}.
\fielditem{labeltitlesource}{literal}
保存给\bibfield{labeltitle} 提供信息的域的域名,由\cmd{DeclareLabeltitle} 确定。
%Holds the name of the field used to populate \bibfield{labeltitle},
%determined by \cmd{DeclareLabeltitle}.
\fielditem{labeldatesource}{literal}
保存如下内容之一:
%Holds one of:
\begin{itemize}
\item 由\cmd{DeclareLabeldate} 选择的日期域域名中<date>前的前缀内容。
%The prefix coming before <date> of the date field name chosen by
%\cmd{DeclareLabeldate}
\item 一个域的域名。
%The name of a field
\item 一个抄录或本地化字符串。\footnote{译者: literal 译为抄录}
%A literal or localisation string
\end{itemize}
%
一般情况下保存由\cmd{DeclareLabeldate} 选择的日期域域名中<date>前的前缀内容。例如,如果labeldate域是\bibfield{eventdate},那么\bibfield{labeldatesource} 就是<event>。如果\cmd{DeclareLabeldate} 命令选择了\bibfield{date} 域,\bibfield{labeldatesource} 将会定义为一个空字符串作为<date>的前缀,因为\bibfield{date} 域名中<date>前内容为空。这就是说\bibfield{labeldatesource} 的内容可以用于构建\cmd{DeclareLabeldate} 选择的域的指针。因为\cmd{DeclareLabeldate} 也可以选择抄录字符串作为备选,\bibfield{labeldatesource} 可以指向一个域或者不进行定义。记住:\cmd{DeclareLabeldate} 命令可以用于选择非日期域作为备选,所以\bibfield{labeldatesource} 也可能包含一个域名。所以,总结起来,规则如下:
%Normally holds the prefix coming before <date> of the date field name chosen by \cmd{DeclareLabeldate}. For example, if the labeldate field is \bibfield{eventdate}, then \bibfield{labeldatesource} will be <event>. In case \cmd{DeclareLabeldate} selects the \bibfield{date} field, then \bibfield{labeldatesource} will be defined but will be an empty string as the prefix coming before <date> in the date label name is empty. This is so that the contents of \bibfield{labeldatesource} can be used in constructing references to the field which \cmd{DeclareLabeldate} chooses. Since \cmd{DeclareLabeldate} can also select literal strings for fallbacks, \bibfield{labeldatesource} may not refer to a field or may be undefined. Bear in mind that \cmd{DeclareLabeldate} can also be used to select non-date fields as a fallback and so \bibfield{labeldatesource} might contain a field name. So, in summary, the rules are
\begin{ltxexample}
\iffieldundef{labeldatesource}
{}% labeldate package option is not set
{\iffieldundef{\thefield{labeldatesource}year}
% \DeclareLabeldate resolved to either a literal/localisation
% string or a non-date field since
% if a date is defined by a date field, there is
% at least a year
{\iffieldundef{\thefield{labeldatesource}}
{}% \DeclareLabeldate resolved to a literal/localisation string
{}% \DeclareLabeldate resolved to a non-date field
}
{} % \DeclareLabeldate resolved a date field name prefix like "" or "orig"
}
\end{ltxexample}
\fielditem{entrytype}{string}
条目类型(\bibtype{book}, \bibtype{inbook} 等),以小写字母给出。
%The entry type (\bibtype{book}, \bibtype{inbook}, etc.), given in lowercase letters.
\fielditem{childentrytype}{string}\DeprecatedMark
%This field is no longer necessary or recommended. For backwards
%compatibility, it is merely a copy of the \bibfield{entrytype} field in any
%set children.
该域不再是必需的,也不推荐使用。为后向兼容考虑,它仅仅是集中子条目的\bibfield{entrytype}域的副本。
%老版本信息:
%当引用一个条目集的子条目时,\biblatex 为标注命令提供父集条目的数据。这意味着\bibfield{entrytype} 保存父条目的类型。子条目的类型则由\bibfield{childentrytype} 域提供。该域仅在引用一个条目集的子条目时使用。
%When citing a subentry of an entry set, \biblatex provides the data of the parent \bibtype{set} entry to citation commands. This implies that the \bibfield{entrytype} field holds the entry type of the parent. The entry type of the child entry being cited is provided in the \bibfield{childentrytype} field. This field is only available when citing a subentry of an entry set.
\fielditem{entrysetcount}{integer}
%This field holds an integer indicating the position of a set member in the entry set (starting at \texttt{1}). This field is only available in the subentries of an entry set.
该域保存的整数用于指明一个条目集中某个集成员的位置(起始值是\texttt{1})。该域仅对一个条目集的子条目有用。
\fielditem{hash}{string}
%This field is special in that it is only available locally in name formatting directives. It holds a hash string which uniquely identifies individual names in a name list. This information is available for all names in all name lists. See also \bibfield{namehash} and \bibfield{fullhash}.
该域非常特殊,仅在姓名格式化命令中使用。它保存一个hash字符串,用于唯一地确定姓名列表中的各个姓名。姓名列表中的所有姓名都具有该信息。另可参见\bibfield{namehash} 和\bibfield{fullhash}。
\fielditem{namehash}{string}
%A hash string which uniquely identifies the \bibfield{labelname} list. This is useful for recurrence checks. For example, a citation style which replaces recurrent authors or editors with a string like <idem> could save the \bibfield{namehash} field with \cmd{savefield} and use it in a comparison with \cmd{iffieldequals} later (see \secref{aut:aux:dat, aut:aux:tst}). The \bibfield{namehash} is derived from the truncated \bibfield{labelname} list, \ie it is responsive to \opt{maxnames} and \opt{minnames}. See also \bibfield{hash} and \bibfield{fullhash}.
一个hash字符串用于唯一确定\bibfield{labelname} 列表。用于在线检查。比如,一个将再次出现的作者和编者用一个类似<idem>的字符串代替的标注样式,
可以用\cmd{savefield} 命令保存\bibfield{namehash} 域,
并用于后面的\cmd{iffieldequals} 比较中(见\secref{aut:aux:dat, aut:aux:tst})。
\bibfield{namehash} 域由截短的\bibfield{labelname} 列表确定,
即与\opt{maxnames} 和\opt{minnames} 选项相关。
另可参见\bibfield{hash} 和\bibfield{fullhash}。
\fielditem{bibnamehash}{string}
%As \bibfield{namehash} but responsive to \opt{maxbibnames} and
%\opt{minbibnames}. This is not used in standard styles but may be used to
%make tests in bibliography lists (such as those used to determine whether
%dashes should replace repeated authors) behave differently.
类似于 \bibfield{namehash} ,但与\opt{maxbibnames} 和
\opt{minbibnames}相关。不用域标准样式中,但可以用在文献表中做测试
(比如用于判断是否用破折号代替重复作者的情况)
\fielditem{$<$namelist$>$namehash}{string}
%As \bibfield{namehash} for the name list called <namelist>.
类似于\bibfield{namehash},但用于 <namelist>姓名列表。
\fielditem{$<$namelist$>$bibnamehash}{string}
As \bibfield{bibnamehash} for the name list called <namelist>.
\fielditem{fullhash}{string}
%A hash string which uniquely identifies the \bibfield{labelname} list. This fields differs from \bibfield{namehash} in two details: 1) The \bibfield{shortauthor} and \bibfield{shorteditor} lists are ignored when generating the hash. 2) The hash always refers to the full list, ignoring \opt{maxnames} and \opt{minnames}. See also \bibfield{hash} and \bibfield{namehash}.
一个hash字符串用于唯一确定\bibfield{labelname} 列表。该域与\bibfield{namehash} 有两点不同:1.产生hash时忽略\bibfield{shortauthor} 和\bibfield{shorteditor} 列表。2.该hash指的是完整的列表,忽略\opt{maxnames} 和\opt{minnames} 选项。另可参见\bibfield{hash} 和\bibfield{namehash}。
\fielditem{$<$namelist$>$fullhash}{string}
%As \bibfield{fullhash} for the name list called <namelist>.
类似于\bibfield{fullhash},但用于 <namelist>姓名列表。
\listitem{pageref}{literal}
%If the \opt{backref} package option is enabled, this list holds the page numbers of the pages on which the respective bibliography entry is cited. If there are \env{refsection} environments in the document, the back references are local to the reference sections.
如果\opt{backref} 包选项启用,该域保存条目被引用所在各页的页码。如果文档中有\env{refsection} 环境,反向引用仅包含当前参考文献节(refsection)内的页码信息。
\fielditem{sortinit}{literal}
%This field holds the initial character of the information used during sorting.
该域保存排序所使用信息的首字符。%使用\bibtex 时,该域也用来代替\bibfield{sortinithash} 域。
\fielditem{sortinithash}{string}
%This field holds a hash of the (locale-specific) Unicode Collation Algorithm primary weight of the first extended grapheme cluster (essentially the first character) of the string used during sorting. This is useful when subdividing the bibliography alphabetically and is used internally by \cmd{bibinitsep} (see \secref{use:fmt:len}).
%使用\biber 时,
该域保存排序字符串的第一个扩展字素集(基本上是第一个字符)的Unicode排序规则算法主权重的hash值。可用于按照字母表顺序划分参考文献列表,该域在\cmd{bibinitsep} 命令内部使用(见\secref{use:fmt:len})。
\fielditem{clonesourcekey}{string}
%This field holds the entry key of the entry from which an entry was cloned. Clones are created for
%entries which are mentioned in \bibfield{related} fields as part of related entry processing, for example.
该域保存复制条目的来源条目的关键词。例如,关联条目处理中\bibfield{related} 域所涉及的条目往往需要进行复制。
\fielditem{urlraw}{verbatim}
%This is the unencoded, raw version of any \bibfield{url}. This is intended for use when the display version and clickable link version of a URL are different. This can be the case when the URL contains special or Unicode characters. In the case where no such characters occur, may be identical to the \bibfield{url}.
\bibfield{url}域的未编码,原始版本。用于当显示的网址与点击时的链接网址不一致的情况,比如网址带有一些特殊的或unicode字符的情况。倘若没有这些特殊字符,它与\bibfield{url}域是一致的。
\end{fieldlist}
\paragraph{标注(引用)标签中使用的域}%Fields for Use in Citation Labels
\label{aut:bbx:fld:lab}
\begin{fieldlist}
\fielditem{labelalpha}{literal}
%当使用\bibtex 为后端程序时,
一个与传统\bibtex 的\path{alpha.bst} 样式产生标签类似的标签。这一标签默认由\bibfield{labelname} 列表抽取的首字母加上出版年的最后两个数字构成。\bibfield{label} 域可用来重设它的非数字部分(non-numeric portion)。如果定义了\bibfield{label} 域,\biblatex 将使用它的值加上出版年的后两个数字生成\bibfield{labelalpha}。\bibfield{shorthand} 域也可用于重设整个标签。如果定义了该域,\bibfield{labelalpha} 就是\bibfield{shorthand} 域,而不是一个自动生成的标签。用户可以定义一个模板用于构建字母顺序标签(见\secref{aut:ctm:lab}),而默认的模板与上面bibtex标签的格式相同。一个完整的字母顺序(<alphabetic>)标签由\bibfield{labelalpha} 加\bibfield{extraalpha} 域构成。注意: 使用\bibfield{labelalpha} 和\bibfield{extraalpha} 域需要打开\opt{labelalpha} 包选项(\secref{use:opt:pre:int})。另可参见\secref{use:fmt:fmt} 节的\bibfield{extraalpha} 和\cmd{labelalphaothers}。
%A label similar to the labels generated by the \path{alpha.bst} style of traditional \bibtex. This default label consists of initials drawn from the \bibfield{labelname} list plus the last two digits of the publication year. The \bibfield{label} field may be used to override its non"=numeric portion. If the \bibfield{label} field is defined, \biblatex will use its value and append the last two digits of the publication year when generating \bibfield{labelalpha}. The \bibfield{shorthand} field may be used to override the entire label. If defined, \bibfield{labelalpha} is the \bibfield{shorthand} rather than an automatically generated label. Users can specify a template used to construct the alphabetic label (see \secref{aut:ctm:lab}) and the default template mirrors the format mentioned for bibtex above. A complete <alphabetic> label consists of the fields \bibfield{labelalpha} plus \bibfield{extraalpha}. Note that the \bibfield{labelalpha} and \bibfield{extraalpha} fields need to be requested with the package option \opt{labelalpha} (\secref{use:opt:pre:int}). See also \bibfield{extraalpha} as well as \cmd{labelalphaothers} in \secref{use:fmt:fmt}.
\fielditem{extraalpha}{integer}
当参考文献中包含同一作者同年出版的多个引文时,<alphabetic>标注样式的标签常需要一个额外的字母加以区分。这种情况下\bibfield{extraalpha} 域保存一个整数,该整数可用命令\cmd{mknumalph} 转换成字母或以其他方式格式化。该域类似于在作者年(author-year)样式中\bibfield{extrayear} 的作用。完整的 <alphabetic>的标签由\bibfield{labelalpha} 加 \bibfield{extraalpha} 构成。注意: 使用\bibfield{labelalpha} 和 \bibfield{extraalpha} 域需要启用包选项 \opt{labelalpha}(详见\secref{use:opt:pre:int})。另可参见\secref{use:fmt:fmt} 节的\bibfield{labelalpha} 和 \ cmd{labelalphaothers}。表\ref{use:opt:tab1} 总结了用于消除歧义的不同\opt{extra*}\gls{计数器} 及其记录的信息。
%The <alphabetic> citation scheme usually requires a letter to be appended to the label if the bibliography contains two or more works by the same author which were all published in the same year. In this case, the \bibfield{extraalpha} field holds an integer which may be converted to a letter with \cmd{mknumalph} or formatted in some other way. This field is similar to the role of \bibfield{extradate} in the author"=year scheme. A complete <alphabetic> label consists of the fields \bibfield{labelalpha} plus \bibfield{extraalpha}. Note that the \bibfield{labelalpha} and \bibfield{extraalpha} fields need to be requested with the package option \opt{labelalpha}, see \secref{use:opt:pre:int} for details. See also \bibfield{labelalpha} as well as \cmd{labelalphaothers} in \secref{use:fmt:fmt}. Table \ref{use:opt:tab1} summarises the various \opt{extra*} disambiguation counters and what they track.
\listitem{labelname}{name}
%The name to be printed in citations. This list is a copy of either the \bibfield{shortauthor}, the \bibfield{author}, the \bibfield{shorteditor}, the \bibfield{editor}, or the \bibfield{translator} list, which are normally checked for in this order. If no authors and editors are available, this list is undefined. Note that this list is also responsive to the \opt{use$<$name$>$}, options, see \secref{use:opt:bib}. Citation styles should use this list when printing the name in a citation. This list is provided for convenience only and does not carry any additional meaning.
%This field may be customized. See \secref{aut:ctm:fld} for details.
标注标签中打印的姓名。该列表可以是\bibfield{shortauthor}, \bibfield{author}, \bibfield{shorteditor}, \bibfield{editor}, 或\bibfield{translator} 域的复制值,正常情况以该顺序检测。如果没有作者(authors)和编者(authors),该列表是未定义的。注意: 该列表也与\opt{use$<$name$>$} 相关,见\secref{use:opt:bib}。标注样式打印引用标签中的姓名时使用这一列表。提供该列表仅为方便起见,没有附加的意义。该域可以定制,详见\secref{aut:ctm:fld}。
\fielditem{extraname}{integer}
%Holds a count of the number of bibliography entries within a refsection which derive from the same \bibfield{labelname} list. This counter takes account of \opt{uniquename} settings (see \secref{use:opt:pre:int}). While not used by any standard styles, this field is useful in styles which wish to number bibliography entries on a per-\bibfield{labelname} basis. This field will only exist if there is a \bibfield{labelname}. The \bibfield{extraname} counter is related to, but conceptually different from \cmd{ifsingletitle} (see \secref{use:opt:pre:int} and \secref{aut:aux:tst}).
保存一个参考文献节内具有相同\bibfield{labelname}姓名列表的文献条目的数量。标准样式不使用。
该域对于希望在每个\bibfield{labelname}层次统计文献条目数很有用。该域仅在\bibfield{labelname}域存在时才会存在,
\bibfield{extraname}计数器逻辑上与 \cmd{ifsingletitle}类似,但概念不同(见\secref{use:opt:pre:int} 和 \secref{aut:aux:tst})。
\fielditem{labelnumber}{literal}
%The number of the bibliography entry, as required by numeric citation schemes. If the \bibfield{shorthand} field is defined, \biblatex does not assign a number to the respective entry. In this case \bibfield{labelnumber} is the shorthand rather than a number. Numeric styles must use the value of this field instead of a counter. Note that this field needs to be requested with the package option \opt{labelnumber}, see \secref{use:opt:pre:int} for details. Also see the package option \opt{defernumbers} in \secref{use:opt:pre:gen}.
参考文献条目的序号,用于顺序编码类的样式。如果定义了\bibfield{shorthand} 域,\biblatex 不再给各条目赋予一个数值。这种情况下,\bibfield{labelnumber} 就是shorthand而不是一个数字。顺序编码类的样式必须使用该域的值而不是一个计数器值。注意: 使用该域需要启用包选项\opt{labelnumber},详见\secref{use:opt:pre:int}。另可参见\secref{use:opt:pre:gen} 节的\opt{defernumbers} 选项。
\fielditem{labelprefix}{literal}
%If the \opt{labelprefix} option of \cmd{newrefcontext} has been set in order to prefix all entries in a subbibliography with a fixed string, this string is available in the \bibfield{labelprefix} field of all affected entries. If no prefix has been set, the \bibfield{labelprefix} field of the respective entry is undefined. See the \opt{labelprefix} option of \cmd{newrefcontext} in \secref{use:bib:context} for details. If the \bibfield{shorthand} field is defined, \biblatex does not assign the prefix to the \bibfield{labelprefix} field of the respective entry. In this case, the \bibfield{labelprefix} field is undefined.
如果要在一个subbibliography文献表的所有条目前都添加一个固定的字符串,设置了\cmd{newrefcontext} 命令的\opt{labelprefix} 选项,那么所有受影响的\bibfield{labelprefix} 域将提供该字符串。如果未设置前缀,相应条目的\bibfield{labelprefix} 域是未定义的。详见\secref{use:bib:context} 节\cmd{newrefcontext} 命令的\opt{labelprefix} 选项。如果定义了\bibfield{shorthand} 域,\biblatex 不会给相应条目的\bibfield{labelprefix} 域设置前缀。这种情况下\bibfield{labelprefix} 是未定义的。
\fielditem{labeltitle}{literal}
%The printable title of a work. In some circumstances, a style might need to choose a title from a list of a possible title fields. For example, citation styles printing short titles may want to print the \bibfield{shorttitle} field if it exists but otherwise print the \bibfield{title} field. The list of fields to be considered when constructing \bibfield{labeltitle} may be customized. See \secref{aut:ctm:fld} for details. Note that the \bibfield{extratitle} field needs to be requested with the package option \opt{labeltitle}, see \secref{use:opt:pre:int} for details. See also \bibfield{extratitle}. Note also that the \bibfield{extratitleyear} field needs to be requested with the package option \opt{labeltitleyear}. See also \bibfield{extratitleyear}.
一篇文献可打印题名(标题)。在一些环境中,一个样式可能需要在一些可能的标题域中选择一个标题。例如,标注样式打印短标题可能需要打印\bibfield{shorttitle} 域(如果它存在的话),否则将打印\bibfield{title} 域。构建\bibfield{labeltitle} 时考虑的域的列表可以自定义。详见 \secref{aut:ctm:fld}。注意: 使用\bibfield{extratitle} 域要求启用\opt{labeltitle} 包选项,详见\secref{use:opt:pre:int}。另可参见\bibfield{extratitle}。也要注意使用\bibfield{extratitleyear} 域也需要启用\opt{labeltitleyear} 包选项,另可参见\bibfield{extratitleyear}。
\fielditem{extratitle}{integer}
%It is sometimes useful, for example in author"=title citation schemes, to be able to disambiguate works with the same title. For works by the same \bibfield{labelname} with the same \bibfield{labeltitle}, the \bibfield{extratitle} field holds an integer which may be converted to a letter with \cmd{mknumalph} or formatted in some other way (or it can be merely used as a flag to say that some other field such as a date should be used in conjunction with the \bibfield{labeltitle} field). This field is undefined if there is only one work with the same \bibfield{labeltitle} by the same \bibfield{labelname} in the bibliography. Note that the \bibfield{extratitle} field needs to be requested with the package option \opt{labeltitle}, see \secref{use:opt:pre:int} for details. See also \bibfield{labeltitle}. Table \ref{use:opt:tab1} summarises the various \opt{extra*} disambiguation counters and what they track.
该命令有时很有用,比如在author-title标注样式中,用于区分标题相同的文献。当有文献具有相同的\bibfield{labelname} 和\bibfield{labeltitle} 时,\bibfield{extratitle} 域保存一个整数,可以利用\cmd{mknumalph} 转换为一个字母或者以其它方式格式化(或者可以仅仅作为一个标志,用于表示将一些其它域比如日期与\bibfield{labeltitle} 域合并)。当文献表中具有相同\bibfield{labeltitle} 和\bibfield{labelname} 的文献只有一篇时,该域不定义。注意:使用\bibfield{extratitle} 域需要启用\opt{labeltitle} 包选项,详见\secref{use:opt:pre:int}。另可参见\bibfield{labeltitle}。\ref{use:opt:tab1} 总结了各种\opt{extra*} 计数器及其作用。
\fielditem{extratitleyear}{integer}
%It is sometimes useful, for example in author"=title citation schemes, to be able to disambiguate works with the same title in the same year but with no author. For works with the same \bibfield{labeltitle} and with the same \bibfield{labelyear}, the \bibfield{extratitleyear} field holds an integer which may be converted to a letter with \cmd{mknumalph} or formatted in some other way (or it can be merely used as a flag to say that some other field such as a publisher should be used in conjunction with the \bibfield{labelyear} field). This field is undefined if there is only one work with the same \bibfield{labeltitle} and \bibfield{labelyear} in the bibliography. Note that the \bibfield{extratitleyear} field needs to be requested with the package option \opt{labeltitleyear}, see \secref{use:opt:pre:int} for details. See also \bibfield{labeltitleyear}. Table \ref{use:opt:tab1} summarises the various \opt{extra*} disambiguation counters and what they track.
该命令有时很有用,比如在author-title标注样式中,用于区分标题相同年份相同但没有责任者的文献。当有文献具有相同的\bibfield{labeltitle} 和\bibfield{labelyear},\bibfield{extratitleyear} 域保存一个整数,可以利用\cmd{mknumalph} 转换为一个字母或者以其它方式格式化(或者可以仅仅作为一个标志,用于表示将一些其它域比如出版者与\bibfield{labelyear} 域合并)。当文献表中具有相同\bibfield{labeltitle} 和\bibfield{labelyear} 的文献只有一篇时,该域不定义。注意: 使用\bibfield{extratitle} 域需要启用\opt{labeltitleyear} 包选项,详见\secref{use:opt:pre:int}。另可参见\bibfield{labeltitleyear}。\ref{use:opt:tab1} 总结了各种\opt{extra*} 计数器及其作用。
\fielditem{labelyear}{literal}
%The year of the date field selected by \cmd{DeclareLabeldate} (\secref{aut:ctm:fld}) or the \bibfield{year} field, for use in author-year labels. A complete author-year label consists of the fields \bibfield{labelyear} plus \bibfield{extradate}. Note that the \bibfield{labelyear} and \bibfield{extradate} fields need to be requested with the package option \opt{labeldateparts}, see \secref{use:opt:pre:int} for details. See also \bibfield{extradate}.
\cmd{DeclareLabeldate}(\secref{aut:ctm:fld})命令选择的日期域的年,或者\bibfield{year} 域,用于作者年制的标签。一个完整的作者年制的标签由\bibfield{labelyear} 加\bibfield{extrayear} 域构成。注意使用\bibfield{labelyear} 和\bibfield{extrayear} 域需要启用\opt{labeldateparts} 包选项,详见\secref{use:opt:pre:int}。另可参见\bibfield{extrayear}。
\fielditem{labelendyear}{literal}
%The end year of the date field selected by \cmd{DeclareLabeldate} (\secref{aut:ctm:fld}) if the selected date is a range.
\cmd{DeclareLabeldate} (\secref{aut:ctm:fld})命令选择的日期域的终止年,如果选择的日期是一个范围。
\fielditem{labelmonth}{datepart}
%The month of the date field selected by \cmd{DeclareLabeldate} (\secref{aut:ctm:fld}), or the \bibfield{month} field for use in author-year labels. Note that the \bibfield{labelmonth} field needs to be requested with the package option \opt{labeldateparts}, see \secref{use:opt:pre:int} for details.
\cmd{DeclareLabeldate}(\secref{aut:ctm:fld})命令选择的日期域的月,或者\bibfield{month} 域,用于作者年制的标签。注意使用\bibfield{labelmonth} 域需要启用 \opt{labeldateparts} 包选项,详见\secref{use:opt:pre:int}。
\fielditem{labelendmonth}{datepart}
%The end month of the date field selected by \cmd{DeclareLabeldate} (\secref{aut:ctm:fld}) if the selected date is a range.
\cmd{DeclareLabeldate} (\secref{aut:ctm:fld})命令选择的日期域的终止月,如果选择的日期是一个范围。
\fielditem{labelday}{datepart}
%The month of the date field selected by \cmd{DeclareLabeldate} (\secref{aut:ctm:fld}) for use in author-year labels. Note that the \bibfield{labelday} field needs to be requested with the package option \opt{labeldateparts}, see \secref{use:opt:pre:int} for details.
\cmd{DeclareLabeldate}(\secref{aut:ctm:fld})命令选择的日期域的日,或者\bibfield{month} 域,用于作者年制的标签。注意使用 \bibfield{labelday} 域要求启用 \opt{labeldateparts} 包选项,详见\secref{use:opt:pre:int}。
\fielditem{labelendday}{datepart}
%The end day of the date field selected by \cmd{DeclareLabeldate} (\secref{aut:ctm:fld}) if the selected date is a range.
\cmd{DeclareLabeldate} (\secref{aut:ctm:fld})命令选择的日期域的终止日,如果选择的日期是一个范围。
\fielditem{extradate}{integer}
%The author"=year citation scheme usually requires a letter to be appended to the year if the bibliography contains two or more works by the same author which were all published in the same year. In this case, the \bibfield{extradate} field holds an integer which may be converted to a letter with \cmd{mknumalph} or formatted in some other way. This field is undefined if there is only one work by the author in the bibliography or if all works by the author have different publication years. A complete author-year label consists of the fields \bibfield{labelyear} plus \bibfield{extradate}. Note that the \bibfield{labelyear} and \bibfield{extradate} fields need to be requested with the package option \opt{labeldateparts}, see \secref{use:opt:pre:int} for details. See also \bibfield{labelyear}. Table \ref{use:opt:tab1} summarises the various \opt{extra*} disambiguation counters and what they track.
当参考文献表中包含两个或更多的具有相同作者的文献且出版年份也相同时,author-year标注样式常需要在年后面附加一个字母以示区分。这种情况下,\bibfield{extradate} 域保存一个整数可以利用\cmd{mknumalph} 转换为一个字母或者以其它方式格式化。当文献表中某作者的文献只有一篇或者所有该作者的文献的出版年不同时,该域不定义。完整的作者年标签由\bibfield{labelyear} 加\bibfield{extradate} 域构成。注意使用\bibfield{labelyear} 和\bibfield{extradate} 域需要启用\opt{labeldateparts} 包选项,详见\secref{use:opt:pre:int}。另可参见\bibfield{labelyear}。\ref{use:opt:tab1} 总结了各种\opt{extra*} 计数器及其作用。
\fielditem{extradatescope}{literal}
%This field contains the name of the most specific field which determined the value of \bibfield{extradate}. It is not used by the standard styles but may be useful in controlling the placement of the \bibfield{extradate} field value.
该域包含确定\bibfield{extradate}值的专用域的域名,标准样式不使用,但可能用于控制\bibfield{extradate}域值的配置。
\end{fieldlist}
\paragraph{Date的成分域}%Date Component Fields
\label{aut:bbx:fld:dat}
注意,可以在数据模型中定义新的日期域,这些新定义的日期域的使用方式与本节将介绍的默认数据模型类似。
%Note that it is possible to define new date fields in the datamodel which behave exactly like the default data model date fields described in this section.
\file{bib} 文件中的日期域与样式接口提供的日期域如何关联详见表\ref{aut:bbx:fld:tab1}。对样式中像\bibfield{origdate} 这样的域做判断时,使用如下代码:
%See \tabref{aut:bbx:fld:tab1} for an overview of how the date fields in \file{bib} files are related to the date fields provided by the style interface. When testing for a field like \bibfield{origdate} in a style, use code like:
\begin{ltxcode}
<<\iffieldundef>>{orig<<year>>}{...}{...}
\end{ltxcode}
%
它将告诉你相应的日期是否已定义。下面的判断:
%This will tell you if the corresponding date is defined at all. This test:
\begin{ltxcode}
<<\iffieldundef>>{orig<<endyear>>}{...}{...}
\end{ltxcode}
%
将告诉你相应的日期和一个(完全确定的)范围是否已定义。下面的判断
%will tell you if the corresponding date is defined and a (fully specified) range. This test:
\begin{ltxcode}
<<\iffieldequalstr>>{orig<<endyear>>}{}{...}{...}
\end{ltxcode}
%
将告诉你相应的日期和一个无期限的(open-ended)范围已经定义。 无期限(Open-ended,无终止日期的)范围由一个空的\texttt{endyear} 成分表示(而不是一个未定义的\texttt{endyear} 成分)。更多示例详见\secref{bib:use:dat} 节和\pageref{bib:use:tab1} 页的表\ref{bib:use:tab1}。
%will tell you if the corresponding date is defined and an open"=ended range. Open"=ended ranges are indicated by an empty \texttt{endyear} component (as opposed to an undefined \texttt{endyear} component). See \secref{bib:use:dat} and \tabref{bib:use:tab1} on page~\pageref{bib:use:tab1} for further examples.
\begingroup
\tablesetup
\begin{longtable}[l]{%
@{}V{0.15\textwidth}%
@{}V{0.4\textwidth}%
@{}V{0.3\textwidth}%
@{}V{0.2\textwidth}@{}}
\toprule
\multicolumn{2}{@{}H}{\file{bib} File} &
\multicolumn{2}{H}{Data Interface} \\
\cmidrule(r){1-2}\cmidrule(l){3-4}
\multicolumn{1}{@{}H}{Field} &
\multicolumn{1}{H}{Value (Example)} &
\multicolumn{1}{H}{Field} &
\multicolumn{1}{H}{Value (Example)} \\
\cmidrule{1-1}\cmidrule(lr){2-2}\cmidrule(l){3-3}\cmidrule(l){4-4}
date & 1988 & day & undefined \\
& & month & undefined \\
& & year & 1988 \\
& & season & undefined \\
& & endday & undefined \\
& & endmonth & undefined \\
& & endyear & undefined \\
& & endseason & undefined \\
& & hour & undefined \\
& & minute & undefined \\
& & second & undefined \\
& & timezone & undefined \\
& & endhour & undefined \\
& & endminute & undefined \\
& & endsecond & undefined \\
& & endtimezone & undefined \\
date & 1997/ & day & undefined \\
& & month & undefined \\
& & year & 1997 \\
& & season & undefined \\
& & endday & undefined \\
& & endmonth & undefined \\
& & endyear & empty \\
& & endseason & undefined \\
& & hour & undefined \\
& & minute & undefined \\
& & second & undefined \\
& & timezone & undefined \\
& & endhour & undefined \\
& & endminute & undefined \\
& & endsecond & undefined \\
& & endtimezone & undefined \\
urldate & 2009-01-31 & urlday & 31 \\
& & urlmonth & 01 \\
& & urlyear & 2009 \\
& & urlseason & undefined \\
& & urlendday & undefined \\
& & urlendmonth & undefined \\
& & urlendyear & undefined \\
& & urlendseason & undefined \\
& & urlhour & undefined \\
& & urlminute & undefined \\
& & urlsecond & undefined \\
& & urltimezone & undefined \\
& & urlendhour & undefined \\
& & urlendminute & undefined \\
& & urlendsecond & undefined \\
& & urlendtimezone & undefined \\
urldate & 2009-01-31T15:34:04Z & urlday & 31 \\
& & urlmonth & 01 \\
& & urlyear & 2009 \\
& & urlseason & undefined \\
& & urlendday & undefined \\
& & urlendmonth & undefined \\
& & urlendyear & undefined \\
& & urlendseason & undefined \\
& & urlhour & 15 \\
& & urlminute & 34 \\
& & urlsecond & 04 \\
& & urltimezone & Z \\
& & urlendhour & undefined \\
& & urlendminute & undefined \\
& & urlendsecond & undefined \\
& & urlendtimezone & undefined \\
urldate & 2009-01-31T15:34:04+05:00 & urlday & 31 \\
& & urlmonth & 01 \\
& & urlyear & 2009 \\
& & urlseason & undefined \\
& & urlendday & undefined \\
& & urlendmonth & undefined \\
& & urlendyear & undefined \\
& & urlendseason & undefined \\
& & urlhour & 15 \\
& & urlminute & 34 \\
& & urlsecond & 04 \\
& & urltimezone & +0500 \\
& & urlendhour & undefined \\
& & urlendminute & undefined \\
& & urlendsecond & undefined \\
& & urlendtimezone & undefined \\
urldate & \parbox[t]{0.4\textwidth}{2009-01-31T15:34:04/\\2009-01-31T16:04:34}& urlday & 31 \\
& & urlmonth & 1 \\
& & urlyear & 2009 \\
& & urlseason & undefined \\
& & urlendday & 31 \\
& & urlendmonth & 1 \\
& & urlendyear & 2009 \\
& & urlendseason & undefined \\
& & urlhour & 15 \\
& & urlminute & 34 \\
& & urlsecond & 4 \\
& & urltimezone & floating \\
& & urlendhour & 16 \\
& & urlendminute & 4 \\
& & urlendsecond & 34 \\
& & urlendtimezone & floating \\
origdate & 2002-21/2002-23 & origday & undefined \\
& & origmonth & 01 \\
& & origyear & 2002 \\
& & origseason & spring \\
& & origendday & undefined \\
& & origendmonth & 02 \\
& & origendyear & 2002 \\
& & origendseason & autumn \\
& & orighour & undefined \\
& & origminute & undefined \\
& & origsecond & undefined \\
& & origtimezone & undefined \\
& & origendhour & undefined \\
& & origendminute & undefined \\
& & origendsecond & undefined \\
& & origendtimezone & undefined \\
eventdate & 1995-01-31/1995-02-05 & eventday & 31 \\
& & eventmonth & 01 \\
& & eventyear & 1995 \\
& & eventseason & undefined \\
& & eventendday & 05 \\
& & eventendmonth & 02 \\
& & eventendyear & 1995 \\
& & eventendseason & undefined \\
& & eventhour & undefined \\
& & eventminute & undefined \\
& & eventsecond & undefined \\
& & eventtimezone & undefined \\
& & eventendhour & undefined \\
& & eventendminute & undefined \\
& & eventendsecond & undefined \\
& & eventendtimezone & undefined \\
\bottomrule
%\end{tabularx}
\caption{日期接口(译者注:biblatex3.7版提供的四个可解析日期接口,分别是date,origdate,eventdate,urldate,在多数场合已经够用)}%Date Interface
\label{aut:bbx:fld:tab1}
\end{longtable}
\endgroup
\begin{fieldlist}
\fielditem{hour}{datepart}
该域保存\bibfield{date} 域的小时(hour)成分,当日期是一个范围时,它保存开始日期的小时成分。
%This field holds the hour component of the \bibfield{date} field. If the date is a range, it holds the hour component of the start date.
\fielditem{minute}{datepart}
该域保存\bibfield{date} 域的分钟成分,当日期是一个范围时,它保存开始日期的分钟成分。
%This field holds the minute component of the \bibfield{date} field. If the date is a range, it holds the minute component of the start date.
\fielditem{second}{datepart}
该域保存\bibfield{date} 域的秒钟成分,当日期是一个范围时,它保存开始日期的秒钟成分。
%This field holds the second component of the \bibfield{date} field. If the date is a range, it holds the second component of the start date.
\fielditem{timezone}{datepart}
该域保存\bibfield{date} 域的时区成分,当日期是一个范围时,它保存开始日期的时区成分。
%This field holds the timezone component of the \bibfield{date} field. If the date is a range, it holds the timezone component of the start date.
\fielditem{day}{datepart}
该域保存\bibfield{date} 域的日成分,当日期是一个范围时,它保存开始日期的日成分。
%This field holds the day component of the \bibfield{date} field. If the date is a range, it holds the day component of the start date.
\fielditem{month}{datepart}
该域保存数据源文件中的\bibfield{month} 域或者\bibfield{date} 域的月成分,当日期是一个范围时,它保存开始日期的月成分。
%This field is the \bibfield{month} as given in the database file or it holds the month component of the \bibfield{date} field. If the date is a range, it holds the month component of the start date.
\fielditem{year}{datepart}
该域保存数据源文件中的\bibfield{year} 域或者\bibfield{date} 域的年成分,当日期是一个范围时,它保存开始日期的年成分。
%This field is the \bibfield{year} as given in the database file or it holds the year component of the \bibfield{date} field. If the date is a range, it holds the year component of the start date.