1Biber(3) User Contributed Perl Documentation Biber(3)
2
3
4
6 Biber - main module for biber, a bibtex replacement for users of
7 biblatex
8
10 use Biber;
11 my $biber = Biber->new();
12 $biber->parse_ctrlfile("example.bcf");
13 $biber->prepare;
14
16 new
17 Initialize the Biber object, optionally passing named options as arguments.
18
19 display_problems
20 Output summary of warnings/errors before exit
21
22 biber_tempdir
23 my $sections= $biber->biber_tempdir
24
25 Returns a File::Temp directory object for use in various things
26
27 sections
28 my $sections= $biber->sections
29
30 Returns a Biber::Sections object describing the bibliography sections
31
32 add_sections
33 Adds a Biber::Sections object. Used externally from, e.g. biber
34
35 datalists
36 my $datalists= $biber->datalists
37
38 Returns a Biber::DataLists object describing the bibliography sorting lists
39
40 set_output_obj
41 Sets the object used to output final results
42 Must be a subclass of Biber::Output::base
43
44 get_preamble
45 Returns the current preamble as an array ref
46
47 get_output_obj
48 Returns the object used to output final results
49
50 set_current_section
51 Sets the current section number that we are working on to a section number
52
53 get_current_section
54 Gets the current section number that we are working on
55
56 tool_mode_setup
57 Fakes parts of the control file for tool mode
58
59 parse_ctrlfile
60 This method reads the control file
61 generated by biblatex to work out the various biblatex options.
62 See Constants.pm for defaults and example of the data structure being built here.
63
64 process_setup
65 Place to put misc pre-processing things needed later
66
67 process_setup_tool
68 Place to put misc pre-processing things needed later for tool mode
69
70 resolve_alias_refs
71 Resolve aliases in xref/crossref/xdata which take keys as values to their real keys
72
73 We use set_datafield as we are overriding the alias in the datasource
74
75 process_citekey_aliases
76 Remove citekey aliases from citekeys as they don't point to real
77 entries.
78
79 instantiate_dynamic
80 This instantiates any dynamic entries so that they are available
81 for processing later on. This has to be done before most all other
82 processing so that when we call $section->bibentry($key), as we
83 do many times in the code, we don't die because there is a key but
84 no Entry object.
85
86 resolve_xdata
87 Resolve xdata entries
88
89 cite_setmembers
90 Promotes set member to cited status
91
92 preprocess_sets
93 $biber->preprocess_sets
94
95 This records the set information for use later
96
97 process_interentry
98 $biber->process_interentry
99
100 This does several things:
101 1. Ensures proper inheritance of data from cross-references.
102 2. Ensures that crossrefs/xrefs that are directly cited or cross-referenced
103 at least mincrossrefs/minxrefs times are included in the bibliography.
104
105 validate_datamodel
106 Validate bib data according to a datamodel
107 Note that we are validating the internal Biber::Entries
108 after they have been created from the datasources so this is
109 datasource neutral, as it should be. It is here to enforce
110 adherence to what biblatex expects.
111
112 process_namedis
113 Generate name strings and disambiguation schema. Has to be in the context
114 of a data list (reference context) because uniquenametemplate can be specified
115 per-list/context
116
117 postprocess_sets
118 Adds required per-entry options etc. to sets
119
120 process_entries_static
121 Processing of entries which is not list-specific and which can therefore
122 insert data directly into entries
123
124 process_entries_pre
125 Main processing operations, to generate metadata and entry information
126 This method is automatically called by C<prepare>.
127 Here we generate the "namehash" and the strings for
128 "labelname", "labelyear", "labelalpha", "sortstrings", etc.
129 Runs prior to uniqueness processing
130
131 process_entries_post
132 More processing operations, to generate things which require uniqueness
133 information like namehash
134 Runs after uniqueness processing
135
136 process_entries_final
137 Final processing operations which depend on all previous processing
138
139 process_uniqueprimaryauthor
140 Track seen primary author base names for generation of uniqueprimaryauthor
141
142 process_workuniqueness
143 Track seen work combination for generation of singletitle, uniquetitle, uniquebaretitle and
144 uniquework
145
146 process_extradate
147 Track labelname/date parts combination for generation of extradate
148
149 process_extratitle
150 Track labelname/labeltitle combination for generation of extratitle
151
152 process_extratitleyear
153 Track labeltitle/labelyear combination for generation of extratitleyear
154
155 process_sets
156 Postprocess set entries
157
158 Checks for common set errors and enforces 'dataonly' for set members.
159 It's not necessary to set skipbib, skipbiblist in the OPTIONS field for
160 the set members as these are automatically set by biblatex due to the \inset
161
162 process_labelname
163 Generate labelname information.
164
165 process_labeldate
166 Generate labeldate information, including times
167
168 process_labeltitle
169 Generate labeltitle
170
171 Note that this is not conditionalised on the biblatex "labeltitle"
172 as labeltitle should always be output since all standard styles need it.
173 Only extratitle is conditionalised on the biblatex "labeltitle" option.
174
175 process_fullhash
176 Generate fullhash
177
178 process_namehash
179 Generate namehash
180
181 process_pername_hashes
182 Generate per_name_hashes
183
184 process_visible_names
185 Generate the visible name information.
186 This is used in various places and it is useful to have it generated in one place.
187
188 process_labelalpha
189 Generate the labelalpha and also the variant for sorting
190
191 process_extraalpha
192 Generate the extraalpha information
193
194 process_presort
195 Put presort fields for an entry into the main Biber bltx state
196 so that it is all available in the same place since this can be
197 set per-type and globally too.
198
199 process_lists
200 Process a bibliography list
201
202 check_list_filter
203 Run an entry through a list filter. Returns a boolean.
204
205 generate_sortdataschema
206 Generate sort data schema for Sort::Key from sort spec like this:
207
208 spec => [
209 [undef, { presort => {} }],
210 [{ final => 1 }, { sortkey => {} }],
211 [
212 {'sort_direction' => 'descending'},
213 { sortname => {} },
214 { author => {} },
215 { editor => {} },
216 { translator => {} },
217 { sorttitle => {} },
218 { title => {} },
219 ],
220 [undef, { sortyear => {} }, { year => {} }],
221 [undef, { sorttitle => {} }, { title => {} }],
222 [undef, { volume => {} }, { "0000" => {} }],
223 ],
224
225 generate_sortinfo
226 Generate information for sorting
227
228 uniqueness
229 Generate the uniqueness information needed when creating .bbl
230
231 create_uniquename_info
232 Gather the uniquename information as we look through the names
233
234 What is happening in here is the following:
235 We are registering the number of occurrences of each name, name+init and fullname
236 within a specific context. For example, the context is "global" with uniquename < 5
237 and "name list" for uniquename=5 or 6. The keys we store to count this are the most specific
238 information for the context, so, for uniquename < 5, this is the full name and for
239 uniquename=5 or 6, this is the complete list of full names. These keys have values in a hash
240 which are ignored. They serve only to accumulate repeated occurrences with the context
241 and we don't care about this and so the values are a useful sinkhole for such repetition.
242
243 For example, if we find in the global context a base name "Smith" in two different entries
244 under the same form "Alan Smith", the data structure will look like:
245
246 {Smith}->{global}->{Alan Smith} = 2
247
248 We don't care about the value as this means that there are 2 "Alan Smith"s in the global
249 context which need disambiguating identically anyway. So, we just count the keys for the
250 base name "Smith" in the global context to see how ambiguous the base name itself is. This
251 would be "1" and so "Alan Smith" would get uniquename=0 because it's unambiguous as just
252 "Smith".
253
254 The same goes for "minimal" list context disambiguation for uniquename=5 or 6.
255 For example, if we had the base name "Smith" to disambiguate in two entries with labelname
256 "John Smith and Alan Jones", the data structure would look like:
257
258 {Smith}->{Smith+Jones}->{John Smith+Alan Jones} = 2
259
260 Again, counting the keys of the context for the base name gives us "1" which means we
261 have uniquename=0 for "John Smith" in both entries because it's the same list. This also
262 works for repeated names in the same list "John Smith and Bert Smith". Disambiguating
263 "Smith" in this:
264
265 {Smith}->{Smith+Smith}->{John Smith+Bert Smith} = 2
266
267 So both "John Smith" and "Bert Smith" in this entry get uniquename=0 (of course, as long as
268 there are no other "X Smith and Y Smith" entries where X != "John" or Y != "Bert").
269
270 The values from biblatex.sty:
271
272 false = 0
273 init = 1
274 true = 2
275 full = 2
276 allinit = 3
277 allfull = 4
278 mininit = 5
279 minfull = 6
280
281 generate_uniquename
282 Generate the per-name uniquename values using the information
283 harvested by create_uniquename_info()
284
285 create_uniquelist_info
286 Gather the uniquelist information as we look through the names
287
288 generate_uniquelist
289 Generate the per-namelist uniquelist values using the information
290 harvested by create_uniquelist_info()
291
292 generate_contextdata
293 Generate information for data which may changes per datalist
294
295 generate_singletitle
296 Generate the singletitle field, if requested. The information for generating
297 this is gathered in process_workuniqueness()
298
299 generate_uniquetitle
300 Generate the uniquetitle field, if requested. The information for generating
301 this is gathered in process_workuniqueness()
302
303 generate_uniquebaretitle
304 Generate the uniquebaretitle field, if requested. The information for generating
305 this is gathered in process_workuniqueness()
306
307 generate_uniquework
308 Generate the uniquework field, if requested. The information for generating
309 this is gathered in process_workuniqueness()
310
311 generate_uniquepa
312 Generate the uniqueprimaryauthor field, if requested. The information for generating
313 this is gathered in create_uniquename_info()
314
315 sort_list
316 Sort a list using information in entries according to a certain sorting template.
317 Use a flag to skip info messages on first pass
318
319 preprocess_options
320 Preprocessing for options. Used primarily to perform process-intensive
321 operations which can be done once instead of inside dense loops later.
322
323 prepare
324 Do the main work.
325 Process and sort all entries before writing the output.
326
327 prepare_tool
328 Do the main work for tool mode
329
330 fetch_data
331 Fetch citekey and dependents data from section datasources
332 Expects to find datasource packages named:
333
334 Biber::Input::<type>::<datatype>
335
336 and one defined subroutine called:
337
338 Biber::Input::<type>::<datatype>::extract_entries
339
340 which takes args:
341
342 1: Biber object
343 2: Datasource name
344 3: Reference to an array of cite keys to look for
345
346 and returns an array of the cite keys it did not find in the datasource
347
348 get_dependents
349 Get dependents of the entries for a given list of citekeys. Is called recursively
350 until there are no more dependents to look for.
351
352 remove_undef_dependent
353 Remove undefined dependent keys from an entry using a map of
354 dependent keys to entries
355
356 _parse_sort
357 Convenience sub to parse a .bcf sorting section and return nice
358 sorting object
359
360 _filedump and _stringdump
361 Dump the biber object with Data::Dump for debugging
362
364 Francois Charette, "<firmicus at ankabut.net>" Philip Kime "<philip at
365 kime.org.uk>"
366
368 Please report any bugs or feature requests on our Github tracker at
369 <https://github.com/plk/biber/issues>.
370
372 Copyright 2009-2018 Francois Charette and Philip Kime, all rights
373 reserved.
374
375 This module is free software. You can redistribute it and/or modify it
376 under the terms of the Artistic License 2.0.
377
378 This program is distributed in the hope that it will be useful, but
379 without any warranty; without even the implied warranty of
380 merchantability or fitness for a particular purpose.
381
382
383
384perl v5.28.0 2018-10-18 Biber(3)