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