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