biblatex-biber-2.9000755000153000001 013205066062 13501 5ustar00vboxother000000000000biblatex-biber-2.9/README.md000444000153000001 350313205066061 15115 0ustar00vboxother000000000000# OVERVIEW Biber is a BibTeX replacement for users of biblatex, with full Unicode support. **Please note**--the default download for all platforms is 64-bit. Please look in the files section for the correct 32-bit platform instead of using the default download button if you want 32-bit. ## REQUIREMENTS Biber is written in Perl with the aim of providing a customised and sophisticated data preparation backend for biblatex. You do not need to install Perl use biber--binaries are provided for many operating systems via the main TeX distributions (TeXLive, MacTeX, MiKTeX) and also via download from SourceForge. You only need a Perl installation to use biber in one of the following cases: - A binary version is not available for your OS/platform - You wish to keep up with all of the bleeding-edge git commits before they - are packaged into a binary. For the vast majority of users, using the latest binary for the OS/platform you are using will be what you want to do. For details on the requirements for installing the Perl program version, please see the biber PDF documentation. The git repository for Biber is kept on github: [https://github.com/plk/biber](https://github.com/plk/biber) ## SUPPORT AND DOCUMENTATION After installing, `biber --help` will give you the basic documentation. The latest PDF documentation can be found here: [https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber](https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber) More information, bugfix releases, forums and bug tracker are available at: [https://github.com/plk/biber](https://github.com/plk/biber) ## BUILDING If you wish to build you own binary, see the main biber PDF documentation. There is a section there on how to do this. The PDF documentation is in the `documentation` folder for the release on Sourceforge. biblatex-biber-2.9/Build.PL000444000153000001 673013205066061 15137 0ustar00vboxother000000000000use strict; use warnings; use utf8; require Module::Build; my $class = Module::Build->subclass ( class => 'My::Builder', code => q{ sub ACTION_test { my $self = shift; $ENV{'LANG'} = 'C'; # set LANG to something known for tests $self->SUPER::ACTION_test; } sub ACTION_docs { my $self = shift; $self->depends_on('code'); $self->depends_on('manpages'); # skip html on perls where it's enabled } } ); my $builder = $class->new( dist_name => 'biblatex-biber', license => 'perl', dist_author => 'Philip Kime ', dist_abstract => 'Biber is a much-augmented bibtex replacement for biblatex users', dist_version_from => 'lib/Biber/Config.pm', test_requires => { 'Test::More' => 0, 'Test::Differences' => 0, 'File::Which' => 0 }, add_to_cleanup => [ 'biber-*' ], configure_requires => { 'Module::Build' => 0.38 }, build_requires => { 'Config::AutoConf' => '0.15', 'ExtUtils::LibBuilder' => '0.02' }, requires => { 'autovivification' => 0, 'Class::Accessor' => 0, 'Data::Dump' => 0, 'Data::Compare' => 0, 'Data::Uniqid' => 0, 'DateTime::Format::Builder' => 0, 'DateTime::Calendar::Julian' => 0, 'File::Slurper' => 0, 'IPC::Cmd' => 0, 'IPC::Run3' => 0, 'List::AllUtils' => 0, 'List::MoreUtils' => 0, 'List::MoreUtils::XS' => 0, 'Mozilla::CA' => '20160104', 'Regexp::Common' => 0, 'Log::Log4perl' => 0, 'Unicode::Collate' => '1.21', 'Unicode::Normalize' => '1.25', 'Unicode::LineBreak' => '2016.003', 'Unicode::GCString' => 0, 'Encode::EUCJPASCII' => 0, 'Encode::JIS2K' => 0, 'Encode::HanExtra' => 0, 'PerlIO::utf8_strict' => 0, 'XML::LibXML' => 1.70, 'XML::LibXML::Simple' => 0, 'XML::LibXSLT' => 0, 'XML::Writer' => 0, 'Sort::Key' => 0, 'Text::CSV' => 0, 'Text::CSV_XS' => 0, 'Text::Roman' => 0, 'URI' => 0, 'Text::BibTeX' => '0.85', 'LWP::Simple' => 0, 'LWP::Protocol::https' => 0, 'Business::ISBN' => 0, 'Business::ISSN' => 0, 'Business::ISMN' => 0, 'Lingua::Translit' => '0.28', 'perl' => '5.26.0' }, script_files => [ glob( "bin/*" ) ], data_files => {'data/schemata/config.rnc' => 'lib/Biber/config.rnc', 'data/schemata/config.rng' => 'lib/Biber/config.rng', 'data/schemata/bcf.rnc' => 'lib/Biber/bcf.rnc', 'data/schemata/bcf.rng' => 'lib/Biber/bcf.rng', 'data/biber-tool.conf' => 'lib/Biber/biber-tool.conf', 'lib/Biber/LaTeX/recode_data.xml' => 'lib/Biber/LaTeX/recode_data.xml', 'data/bcf.xsl' => 'lib/Biber/bcf.xsl' } ); $builder->add_build_element('data'); $builder->create_build_script(); biblatex-biber-2.9/Changes000444000153000001 5461213205066062 15161 0ustar00vboxother000000000000Revision history for Biber 2.9 (2017-21-04) * Misc bug fixes 2.8 (2017-11-04) * Updated copyright dates * Support for many new biblatex 3.8 features (see bibatex change doc and PDF manual). * --output-resolve option is now a meta-alias for the more granular --output-resolve-* options - see the biber -? output * The --nouri-encode option is removed. All urls are URL encoded and a new field urlraw is always output with an unencoded version. 2.7 (2016-12-08) * New option (--nouri-encode) to prevent URL encoding of URLs. Avoids breaking display of URLS which contain non-ASCII. * Misc bug fixes 2.6 (2016-09-10) * Improved tool mode bibtex output. This has some normalisation consequences for YEAR and custom fields. See PDF doc. * Support for new \ifuniquebaretitle test * Sourcemaps can now be restricted to particular refsections * Perl 5.24 is now required due to use of postfix deref notation * Removed RIS input driver due to lack of use * Added extended name format - see documentation * Added notfield function to sourcemaps - see documentation 2.5 (2016-05-10) * Added data annotations feature - see biblatex documentation. * Removed the "latinkeys.txt" Unicode::Collate table. This is now pointless because the compiled 'allkeys.txt' is faster and complete. * Incompatible biblatex/biber version is now a fatal error. * Significant performance improvements, particularly in sorting subsystem. * Addition of new bblXML output format and associated RelaxNG XML schema based on active datamodel. * Integration with new biblatex 3.4 labelprefix name change and refcontext option. * Integration with new biblatex 3.4 \DeclareDatafieldSet functionality. * Improved sourcemap looping functionality 2.4 (2016-03-01) * Misc bug fixes * There is now a 64-bit windows build built on windows 10 * Biblatexml datasources now support sourcemapping and have a schema automatically generated from the datamodel. See new biber options 'validate-bltxml' and 'no-bltxml-schema' in --help output. * New functionality in sourcemaps for creating new entries and looping over specified fields. * Sorting key used to sort names is now customisable. See \DeclareSortingNamekeyScheme in biblatex manual. * Support for Zotero RDF/XML and Endnote removed. These were experimental and messy. 2.3 (2015-12-28) * Misc bug fixes 2.2 (2015-10-21) * Tool mode now preserves comments at the end of the file * New ISBN formatting options for biber (--isbn10, --isnb13, --isbn-normalise) * Implemented way of ignoring certain regexps when counting fixed-width string in labels (see biblatex \DeclareNolabelwidthcount macro) * Updated binary builds to perl 5.22 * Cygwin binary build is now handled by Texlive builders * Misc bug fixes 2.1 (2015-05-06) * Misc bug fixes 2.0 (2015-04-20) * Misc bug fixes * New negated "per type" sourcemap verb for negating the application of maps to specific entry types * New "entry clone" sourcemap verb for cloning entries during sourcemapping. See PDF documentation for biber. * Added range length calculation support. Biber now calculates the length of ranges for biblatex and can handle roman numerals, including just about any UTF-8 composed, non-composed or compat versions * Complete re-write of the biblatex use* name functionality now automatically supports all name fields defined in the data model. See biblatex manual * Moved labelname and labeltitle resolution from biber to biblatex for more flexibility and future extensions * Moved to perl 5.20 for all internals and builds 1.9 (2014-05-25) * Misc bug fixes * Option names accept dashes as well as underscores for general TeX option compatibility. * New "--input-directory" option * Tool mode now also supports data validation * Perl 5.18 is now used to build all biber binaries * Locale-sensitive sorting now more granular (see biblatex "sortlocale" documentation) * Source mapping feature now interpolates from previous matches * Now supports generalised separated values lists using new "--xsvsep" option. * Macro <-> UTF-8 conversion now more robust * New Text::BibTeX library now supports generating initials from general UTF-8 strings (for, e.g. Russian names) 1.8 (2013-10-21) * Perl 5.18 compatibility (hash order randomisation) * Removed Data::Diver module due to linux licensing restrictions * Misc Bug Fixes 1.7 (2013-07-07) * Added clrmacros option * Added map_nomatch * Added --tool_macro_fields option * Exposed sorting option to user-level config file (so sorting in tool mode is possible) 1.6 (2013-04-30) * Bugfixes * Now uses perl 5.16. Non-binary (unpacked) use requires perl 5.16+ * Improved tool mode with some formatting options * Made Unicode NFD/NFC boundaries more robust * labelyear is now labeldate to match biblatex 2.6 * Support for new CLONESOURCEKEY field (see biblatex 2.6 docs) * New padding character option in labelalphatemplate (see biblatex 2.6 docs) 1.5 (2013-01-10) * Added new source mapping option "map_entry_null" * Renamed some options (old ones remain as aliases): bibencoding -> input_encoding bblencoding -> output_encoding bblsafechars -> output_safechars bblsafecharsset -> output_safecharsset outfile -> output_file outformat -> output_format * New "tool" mode with "--tool" option which takes a data source as argument and just performs reencoding and source mappings etc. as per options and config file. * Support for customisable BibTeX data source list and name separators * Better debug output for source mapping * Better defined source mapping hierarchy with bugfixes 1.4 (2012-11-28) * Support for biblatex 2.4 style sourcemaps (See \DeclareStyleSourcemap in biblatex docs) * entrykey is now a possible read-only pseudo field in sourcemaps * Reencode data interface completely re-written. New user option --recodedata allows users to specify a new data file for defining reencoding sets. * Internal changes to allow multiple script/lang variants of fields in biblatex in the future. * Citation key aliases now supported more comprehensively, in crossrefs etc. * Support for new RELATEDOPTIONS field (see biblatex docs) * Misc bug fixes 1.3 (01-11-2012) * New "append" mode for sourcemap to allow combining of fields * map_final now possible for map_set_field steps which causes map to stop completely if map_overwrite is false and the field to set already exists * Allow extrayear generation when there is no labelyear 1.2 (20-08-2012) * Misc bug fixes 1.1 (01-08-2012) * Misc bug fixes * Fixed later CentOS libz issue by including latest libz for linux builds * Fixed DOT output (SF bug 3544894) 1.0 (01-07-2012) * Internal data model processing changes * New labeltitleyear and extratitleyear disambiguation tracker * New labeltitle and extratitle disambiguation tracker * Sorting per list enabled for biblatex 2.0 * New noinit option for ignoring parts of names when generating initials * Some optimisations for large data sources * Fixed build issues which broke PAR::Packer binary under latest Debian (Wheezy) 0.9.9 (30-03-2012) * Added sortfirstinits option * HTTPS support for remote data sources * Biber now ignores names when it can't determine minimal information like a lastname. Before, it would throw lots of errors and die. * Strips UTF-8 BOMs before passing to Text::BibTeX otherwise it complains * Merged --graph and --bltxml options into --outformat option * Updated some internal Unicode 6.0 things * Minor bug fixes 0.9.8 (20-12-2012) * Changed config file sourcemap syntax and docs * Support for citekey aliases * New DOT output format 0.9.7 (27-11-2011) * per-datasource mapping restrictions * Completely new config file format to allow for extensions * Fixed --help issue with PAR::Packer * Fixed .bcf XSL inheritance attribute value issue * Moved XDATA output skip into structure where it should have been originally 0.9.6 (13-11-2011) * Fixed binary issue with Readonly::XS not being detected * Fixed bug tracker ticket #3436870 * Match/replace functionality for data source field filtering * New AUCTeX patches for better biblatex/biber support * Now requires perl 5.14 for full Unicode 6.0 support * New XDATA entrytype and field to allow more complex macro-style data inheritance * crossref cascading is in guaranteed resolve order now * Warnings/error summary is now a more consistent format with all other biber messages. * Matching of .bcf keys to datasource keys is now case-sensitive * Fixed biblatex bug tracker ticket #3399744 * Fixed bug tracker ticket #3402114 * max/minnames -> max/mincitenames * max/min* now all per-type and per-entry * uniquelist/uniquename now per-entry * Re-factored recode module with XML data and XSL->HTML transform doc 0.9.5 (18-08-2011) * Fixed auto-bblsafechars bug * refactored explicit "and others" in bibtex data sources * Fixed issue with sorting=none and \nocite{*} 0.9.4 (30-07-2011) * Added support for "SORTSHORTHAND" field * New "map" option to allow user field/entry type mapping (aliasing) in addition to .dcf settings * Made the relevant places depend on max/min{alpha,bib}names instead of just max/minnames * Bug fixes to bblsafechars * Implemented user-customisable labelalpha (not yet in biblatex) * Implemented per-name hashes 0.9.3 (05-06-2011) * New mininit and minfull uniquename options * New minyear uniquelist option * Major revamp of uniqueness code * Moved to new external process calling module because IPC::Run doesn't work on Windows in packed binaries (kpsewhich was returning nothing). 0.9.2 (09-05-2011) * Some internal changes for perl 5.14 * Bug fixes for uniquelist processing 0.9.1 (29-04-2011) * Made temp files all use a global temp dir. * Moved temp .utf8 conversions to temp dir so biber works using .bib files which are in non-writable locations. * Added back an info log message about finding data sources (Lyx compat) 0.9 (29-03-2011) * No longer auto-escapes any TeX markup in bibtex data sources. This is fraught with danger and is a mess. Best not to do it at all. * Supports biblatex \bibnamedelimi macro * Implementation of uniquename and uniquelist options for biblatex 1.4+ 0.8.4 (19-03-2011) * Bug fixes (wrong escaping of "[", "_" and "]" in .bbl) 0.8.3 14-03-2011 * Biber now in TexLive * Added several new binary builds * All name part and element formatting is now abstracted into macros so that it can be controlled via biblatex. * Much more documentation on binary builds for packagers * Bug fixes 0.8.2 (14-02-2011) * Bug fixes 0.8.1 (12-02-2011) * Small bug with default bibtex month macro support * Made remote file support a little more robust (URI return codes) 0.8 (11-02-2011) * Forces biblatex format for month field * Added support for remote data sources * Added experimental support for RIS data sources * Took out -a and -d flags. These are no longer very useful as the increasingly sophisticated biblatex options cannot be set on the command line anyway and so these flags are less and less relevant * New inheritance model in sync with biblatex defaults * Bug fixes 0.7.4 (05-02-2011) * Fix for mincrossrefs leaking across sections (biblatex SF bug #3173032) 0.7.3 (03-02-2011) * Performance tuning for sorting * Text::BibTeX 0.51 for increased macro stack space * Support for old BibTeX month macros by default * Re-write of datasource processing to allow for modular plugins * Generalised nosort option. * Merged LaTeX::Decode into Biber::LaTeX::Recode and added encoding to deal with inputenc's limitations for PDFLaTeX users * new options for forcing/tuning UTF-8 -> LaTeX macro conversion * Bug fixes 0.7.2 (08-01-2011) * Improved latexmk compatibility more 0.7.1 (07-01-2011) * Improved latexmk compatibility * Added "x-ascii" encoding alias for "ascii" to deal with inputenx ascii. * Bug fixes 0.7 (05-01-2011) * Completely re-written sorting routine using Schwartzian transform for real multi-field support and per-field sorting settings. * Bug fixes 0.6.9 (dev beta) * Bug fixes 0.6.8 (dev beta) * Generalised sorting behaviour in several respects * Bug fixes 0.6.7 (dev beta) * Bug fixes 0.6.6 (dev beta) * More generalised sorting options * Bug fixes 0.6.5 (dev beta) * Bug fixes 0.6.4 (dev beta) * Bug fixes 0.6.3 (dev beta) * Outputs labelname name list to the .bbl * Support for dynamic sets and simpler static set interface * Misc bug fixes 0.6.2 (dev beta) * Internal cleanup of structure code * Misc bug fixes 0.6.1 (dev beta) * More comprehensive structural checks on allowed entrytypes/fields and field combinations/formats * Added option validate_structure to turn on structural checks * Renamed option validate -> validate_control * Renamed option output-directory -> output_directory * Added labelname and labelyear as possible sort specifications * Misc bug fixes 0.6 (20-11-2010) * First non-beta release * More abstracted and extensible crossref inheritance model * U::C dependency to 0.67 * sortcase and sortupper options now take same argument forms as in biblatex * Misc bug fixes 0.5.7 (09-10-2010) * Misc bug fixes 0.5.6 (04-10-2010) * Latex character macro decoding is now better defined in the whole (re)encoding workflow. * "inputenc" option is now "bblencoding" * "locale" option is now "sortlocale" * New option "sortupper" * Unicode::Collate sorting is now default as version 0.61 of this has XS module and CLDR tailoring. * Added binary dist build scripts * Removed bundled Module::Build as there are some conflicts with later versions. This is less of a problem anyway because the binary build makes it less necessary to make builds easy on perl<5.10 * Misc bug fixes 0.5.5 (29-08-2010) * Biber::BibTeX moved to Biber::Input::BibTeX. If upgrading, please remove your installed /Biber/BibTeX.pm, just to be tidy * New aliases for EPRINT classes and types implemented (see BibLaTeX docs). * Biber now resolves XREFs as well as CROSSREFs so one less LaTeX pass is needed * Allows UTF-8 citekeys. Requires Text::BibTeX >= 0.46 and a fully UTF-8 aware TeX macro package (e.g. XeTeX or LuaLaTeX). Normal LaTeX with \inputenc will not work because the UTF-8 it uses is incomplete, macro based and not native. * RecDescent parser is no longer supported or included. If upgrading, please remove your installed /Biber/BibTeX directory, just to be tidy * Now requires LaTeX::Decode >= 0.03 * Stricter version dependency for Text::BibTeX. Older than 0.42 is rather useless for complex names. * Re-factored and enhanced auto-re-encoding of .bib/.bbl. With biblatex 0.9c, Biber handles all reencoding. * Misc bug fixes 0.5.4 (04-08-2010) * Case-sensitive sorting option * Multi-section support. Only one biber pass needed to process all bib sections using extended biblatex 0.9b .bbl format. * .aux file is no longer used by biber - all information is passed in .bcf file. * Misc bug fixes * LaTeX::Decode is now a separate CPAN module and is no longer included 0.5.3 (19-03-2010) * Changed semantics of --outfile and --output-directory. --outfile is now relative to --output-directory. If --outfile is absolute, it is stripped to the filename and the path discarded. Absolute .aux paths are stripped to filename for appending to --output-directory. * Updated PRD to use new encoding option names. Now works with -e. * sortlos was not settable to use bib sort order * With Text::BibTeX >= 0.42, will do all name/initials generation with btparse library. * Abstracted BBL output into Biber::Output class for better re-use and potential for output formats other than .bbl. * Synced uniquename .bcf values with change in biblatex 0.9a 0.5.2 (04-03-2010) * Locale fixes * Uniquename fixed to match BibLaTeX option values * Improved error message for malformed names * Fixed config file problems under windows and also added option to ignore config file * Bug with conflicting case between citations and bib entries * Moved pure perl parsename to PRD.pm * Re-write of name parsing to use Text::BibTeX::Name by default * Fields which can be null are explicitly flagged * Add THANKS file * Die early when biber is called without argument * Fixed Mac config path error * .bib parse continues after certain errors * regularised collate options processing * field nameaddon was missing from Biber::Constants * Improved warning message for missing backend=biber * SF bug 2952347 fix (empty date range end) * uniquename counter was being provided incorrectly 0.5.1 (15-02-2010) * Remove support for legacy control files (\jobname-blx.bib): Biber now only reads .bcf files written by biblatex with the option "backend=biber". * Improved handling of "uniquename" and "namehash". * Don't apply latexescape in bbl output, as it breaks math formatting. 0.5 (13-02-2010) * Supports all changes introduced by biblatex 0.9 * Moved all parts relating to the experimental BibLaTeXML format to the "biblatexml" branch on the git repo * Communication between biblatex and Biber can be done through a XML-based config file (extension .bcf): this is enabled with the experimental biblatex option "backend=biber" * Biber can now be customized with a configuration file * Considerable refactoring and cleanup of the code * Further enhancements to the test suite * Improved logging mechanism * More robust parsing of personal names * Ignore certain prefixes and diacritics in sort strings, for instance ʿAlī is sorted under A, and al-Hasan under H. This can be customized in the configuration file (biber.conf). * New command-line option --output-directory (like TeX) * Many, many bugfixes 0.4.3 (23-07-2009) * With biblatex option "backend=biber" and biber option --v2 the new experimental control file \jobname.bcf is used, which brings in many new features, such as per-entrytype settings. * More sophisticated/customizable sorting mechanism * More extensive test suite * Improved BibLaTeXML schema * improved handling of BibLaTeXML (enable nested children, formatting elements, nosort elements) * Do not apply latexescape() by default on xml strings * Skip title handling in BibLaTeXML when not existing * Ignore maxline, add option wraplines * Built-in sort is now default (option --fastsort) * Sorting with Unicode::Collate is possible with option --collate * Make tests succeed w/o Parse::RD and Regexp::Common * Don't output date and urldate in the bbl * Add missing fields "date" "urldate" "organization" "annotator" "foreword" and "eventtitle" * Use Data::Dump instead of Data::Dumper for debugging * Fields "library" and "remarks" are now skipped * Bugfix for aliases (e.g. address, school) * Bugfix: process urldate to get urlyear,urlmonth,urlday * Remove illegal value shorttranslator from labelname option * Changed biberdebug option to debug * Changed option inputencoding to bibencoding 0.4.2 (25-04-2009) * New option --inputencoding to handle 8-bit encoded bib files * $BIBINPUT environment is now searched * Improved parsing of personal names * @comments are now silently ignored * Fixed handling of @preamble; multiple preambles are allowed * Warnings and errors behave more like BibTeX * Alias fields are automatically converted (e.g. address -> location) * Take care of "phdthesis" and "mathesis" types * Cite keys of bib files are now case-insensitive * Default Unicode collation now uses the table "latinkeys.txt" (this is much faster than "allkeys.txt" which contains rules for all Unicode glyphs) * Unicode::Collate parameters can be passed as a command-line option * Faster sorting (with option -f) is also possible for specific locales given with option --locale (this is OS-dependent however) * PRD grammar is now precompiled * bbl output is now wrapped acc to maxline option * Empty fields are no longer printed in the bbl * Sorting is much improved. * Use sortstring separators 0 1 2 like biblatex.bst * Handle truncation of name lists acc to minnames/maxnames * bib2biblatexml has been improved * Windows version of Text::BibTeX provided as ppm. * Many more bugfixes 0.4.1 (31-03-2009) * Text::BibTeX now optional dependency 0.4 (27-03-2009) * Initial beta release biblatex-biber-2.9/TODO.org000444000153000001 2020713205066062 15135 0ustar00vboxother000000000000* DONE biblatex firstinits option to giveninits * DONE useprefix per names/name? * DONE More flexible sorting allowing arbitrary name part order? * DONE name taxonomy (first, middle, last) needs to be generalised. Internally in Biber too ** firstname -> given ** lastname -> family ** middlename -> middle ** prefix -> prefix ** suffix -> suffix * DONE lastname mandatory relaxed? How about just mandatory that some part is defined since sorting isn't always on lastname first? * DONE name parts and gender types in data model as constants * DONE \keypart round \namepart * DONE make namepart specs ** DONE named ** DONE selectable per sortlist *** TODO abx@aux@sortscheme etc. probably this needs to be generalised to mentioned refcontexts ** DONE per-entry ** DONE per-namelist, per name * DONE hashes use static construction from DM name constants - problem with uniquelist * DONE tool mode bltx output should write schema but controlled by option (normal output uses same option) * DONE per-names/name options are not in .bcf - matters? * DONE per-namelists/per-name options ** DONE needs per names/name support in biblatex and in bbl ** DONE sortnamekeyscheme needs per entry/names/name in bbl ** DONE biblatex macro support in formats for sortnamekeyscheme ** DONE What to do with gender attribute on name? * DONE Document example in biblatex manual of compound keypart * DONE implement patronymic namepart example * DONE Document year/month (datepart fields) are not allowed in bltxml * DONE Sorting ** OM/GRT enhancememts? ** Some integer tests with <=>? * DONE Transliteration interface ** Waiting for L::T release then make this a dep. * DONE Year is missing for knuth:ct in sorting.t? * DONE biblatexml.pm date parsing * DONE BCE, circa etc. ** In bbl/bblxml output *** year should be yearabs *** new *dateera={beforecommonera/commonera} and these should be localisation strings ** datezeros needs to force zeros, not just assume, then testoutput again * DONE biblatex output for date metadata * DONE biblatex input for date metadata * DONE enforce date field naming - where? * DONE datezeros needs to force zeros * DONE biblatex new test doc * DONE docs - negs, explicit era versions, bce bool, locale strings, circa/uncertain format and bools * DONE Test negative date sorting * DONE Volume and ? to ints and remove padding? * DONE Enforce year/month format as ints - sortyear should be int only and documented so. Enforce in biber (not datamodel as it's not part of that) * DONE final sort elements copy string into all further fields which dies on int schema * DONE Tune ... * DONE Remove/convert fastsort? * DONE Decomm RIS * DONE Eras/circa/uncertain in cites * DONE uniquename and initstrings etc. for xname should use DM and no explicit nameparts. ** Config.pm read for unt ** Document \DeclareUniquenameTemplate, add to release notes, add to XSLT * DONE useprefix namelist and name scope with bibtex * DONE LabelalphaNameTemplate implementation ** DONE .bcf read ** DONE config.pm opt read ** DONE compound, strwidth replace pstrwidth, pcompound and compound ** DONE xsl update ** DONE Doc - move pstrwidth (remove) -> strwidth, pcompound (remove) -> compound, strwidth on lant overrides on lat * DONE sortgiveninits ** DONE Should be moved to option of \namepart in SNKS ** DONE Remove biber option and make biblatex deprecated ** DONE Fix in Internals, Remove from Constants.pm and Config.pm ** DONE Change schema, .bcfs, xsl, doc * DONE giveninits should be autogen and inits ** DONE Doc (including scope) * DONE 'given' in _getnamehash_u in Internals - can be abstracted? * DONE nullable_check in Biber.pm - needed? It's a deep loop * DONE donames stuff is messy * DONE hash/fullhash for all names * DONE Implement EDTF Date/Times ** DONE circa/uncertain/era should apply to individual dates, not the range. ** DONE 5.2.5 - seasons - new field (not in DM, only from date parsing), containing localisation string ** DONE iso8601 -> EDTF in biblatex with fallback ** DONE < year for CE/AD ** DONE Document *season and all label* new fields ** DONE cite in 96 is circa xxxx-yyyy instead of circa xxxx-circa yyyy *** DONE Document mkday,month,yearzeros, changes ** DONE 5.2.2 - expand to ranges in biber and put in \Xdateuncertain{} *** DONE biblatex unspec *** DONE Document, remove 5.2.2 exclusion 96-test ** DONE Default for era *** DONE edtf toggle can be removed (not tests - see below) *** DONE Make a 'simple' option for dateera, default *** DONE make a value for dateera that can be tested, perhaps usermode too *** DONE convert edtf toggle tests to check for 'simple' *** DONE This will need to be added to mkranges like labelname but for edtf, no choice as now *** Doc, 96 ** DONE Putting all date meta things into labeldate resolution breaks the ability to treat labeldate parts as normal datepart fields. They shouldn't be applied there really - when they hit forcezeros etc. they cause an error. When they are simpler, forcezeros etc. can have \IfInteger to skip "nodate" etc. labeldate part values. However, labelyear printing in authoryear cites is already processed into a range etc. This probably shouldn't be the case any more so that labelyear is more easily processing like other years. ** DONE times *** DONE Option to decide TZ format (none, "EST", num). Get rid of "floating" in bbl *** DONE timezeros option? *** DONE \mktimezeros - needs options like mkdatezeros? probably not as each component is 2 digits *** DONE option labeldate makes time fields available *** DONE \bibtimesep, \bibtimezonesep AM PM strings *** DONE TZ display option *** DONE formats - 24hour (normal and compressed), 12 hour am/pm (localised) *** DONE Document *time={HH,HHcomp,hh} opts and formats, timelabel, alltimes, Expand bib:use:dat to include times. Format docs in aut:fmt:ich * DONE EDTF should set dateera=simple and use \dateeraprintpre/\enddateeraprintpre * DONE dateera=simple should -1 all bce years on output ** DONE Remove yearabs from biber, biblatex needs to +1 all bce abs values on output when dateera is not "astronomical" ** DONE fix biber tests ** DONE Fix spaces in cites, run tests, upload, reply * DONE bibtex output only works on bibtex input data as it uses ->rawfields - should be able to base it on biblatexml output ** DONE name to bib and name to xnamebib in Name.pm ** DONE Name lists "and others" ** DONE name list output should use namesep option value ** DONE name list output needs to care about x vs normal for per-namelist options. ** DONE error could be raw fields which are found by get_field? ** DONE *seps should have separate output versions, same as input ones ** DONE Output annotations ** DONE Order of fields needs to be determined ** DONE Document all in biber manual, add output_xname, output_*sep to the table there ** DONE Remove raw and references to raw ** DONE Check idiosyncratic fields in input bibtex.pm like keywords etc. ** DONE Tool tests with --output-xname * DONE Julian cutoff ** DONE cutoff option *must* be YYYY-MM-DD. Can be true or custom date. Document. Examples. ** DONE Passed in .bcf, probably no need to update schema if simple option. Must be in .bcf data model as global option. ** DONE Biber needs to put a *(end)datejulian boolean in the .bbl ** DONE Define \if*(end)datejulian and \if(end)datejulian tests * DONE datelabel has to become labeldate somehow, for consistency * DONE Times - more work ** DONE Add to EDTF ** DONE Add time output to standard formats (don't forget ranges in .lbx) *** DONE bibdatetimesp should be space by default for non EDTF output ** DONE Document \print*time are stand-alone time prints and \printdate will print times if *dateusetime is set ** DONE Document *dateusetime, labeldateusetime, alldatesusetime and \bibdatetimesep ** DONE Add *dateusetime, labeldateusetime, alldatesusetime to scope table in doc ** DONE Document that the *usetime options do nothing with compact date range formats as this would be confusing. ** DONE New output format like EDTF but options * DONE extrayear, (namestring, namestrings, namedisschema)->uniquelist, uniquename * DONE bibaltexml.pm needs uiquenametemplate processing removing * DONE sorting scheme names are not used. Create multiple and refer by name as with other dlist * DONE presort, exclude and include should not be inside a sorting spec biblatex-biber-2.9/META.json000444000153000001 1123713205066062 15303 0ustar00vboxother000000000000{ "abstract" : "Biber is a much-augmented bibtex replacement for biblatex users", "author" : [ "Philip Kime " ], "dynamic_config" : 1, "generated_by" : "Module::Build version 0.4216", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "biblatex-biber", "prereqs" : { "build" : { "requires" : { "Config::AutoConf" : "0.15", "ExtUtils::LibBuilder" : "0.02" } }, "configure" : { "requires" : { "Module::Build" : "0.38" } }, "runtime" : { "requires" : { "Business::ISBN" : "0", "Business::ISMN" : "0", "Business::ISSN" : "0", "Class::Accessor" : "0", "Data::Compare" : "0", "Data::Dump" : "0", "Data::Uniqid" : "0", "DateTime::Calendar::Julian" : "0", "DateTime::Format::Builder" : "0", "Encode::EUCJPASCII" : "0", "Encode::HanExtra" : "0", "Encode::JIS2K" : "0", "File::Slurper" : "0", "IPC::Cmd" : "0", "IPC::Run3" : "0", "LWP::Protocol::https" : "0", "LWP::Simple" : "0", "Lingua::Translit" : "0.28", "List::AllUtils" : "0", "List::MoreUtils" : "0", "List::MoreUtils::XS" : "0", "Log::Log4perl" : "0", "Mozilla::CA" : "20160104", "PerlIO::utf8_strict" : "0", "Regexp::Common" : "0", "Sort::Key" : "0", "Text::BibTeX" : "0.85", "Text::CSV" : "0", "Text::CSV_XS" : "0", "Text::Roman" : "0", "URI" : "0", "Unicode::Collate" : "1.21", "Unicode::GCString" : "0", "Unicode::LineBreak" : "2016.003", "Unicode::Normalize" : "1.25", "XML::LibXML" : "1.7", "XML::LibXML::Simple" : "0", "XML::LibXSLT" : "0", "XML::Writer" : "0", "autovivification" : "0", "perl" : "v5.26.0" } }, "test" : { "requires" : { "File::Which" : "0", "Test::Differences" : "0", "Test::More" : "0" } } }, "provides" : { "Biber" : { "file" : "lib/Biber.pm" }, "Biber::Annotation" : { "file" : "lib/Biber/Annotation.pm" }, "Biber::Config" : { "file" : "lib/Biber/Config.pm", "version" : "2.9" }, "Biber::Constants" : { "file" : "lib/Biber/Constants.pm" }, "Biber::DataList" : { "file" : "lib/Biber/DataList.pm" }, "Biber::DataLists" : { "file" : "lib/Biber/DataLists.pm" }, "Biber::DataModel" : { "file" : "lib/Biber/DataModel.pm" }, "Biber::Date::Format" : { "file" : "lib/Biber/Date/Format.pm" }, "Biber::Entries" : { "file" : "lib/Biber/Entries.pm" }, "Biber::Entry" : { "file" : "lib/Biber/Entry.pm" }, "Biber::Entry::Name" : { "file" : "lib/Biber/Entry/Name.pm" }, "Biber::Entry::Names" : { "file" : "lib/Biber/Entry/Names.pm" }, "Biber::Input::file::biblatexml" : { "file" : "lib/Biber/Input/file/biblatexml.pm" }, "Biber::Input::file::bibtex" : { "file" : "lib/Biber/Input/file/bibtex.pm" }, "Biber::Internals" : { "file" : "lib/Biber/Internals.pm" }, "Biber::LaTeX::Recode" : { "file" : "lib/Biber/LaTeX/Recode.pm" }, "Biber::Output::base" : { "file" : "lib/Biber/Output/base.pm" }, "Biber::Output::bbl" : { "file" : "lib/Biber/Output/bbl.pm" }, "Biber::Output::biblatexml" : { "file" : "lib/Biber/Output/biblatexml.pm" }, "Biber::Output::bibtex" : { "file" : "lib/Biber/Output/bibtex.pm" }, "Biber::Output::dot" : { "file" : "lib/Biber/Output/dot.pm" }, "Biber::Output::test" : { "file" : "lib/Biber/Output/test.pm" }, "Biber::Section" : { "file" : "lib/Biber/Section.pm" }, "Biber::Sections" : { "file" : "lib/Biber/Sections.pm" }, "Biber::UCollate" : { "file" : "lib/Biber/UCollate.pm" }, "Biber::Utils" : { "file" : "lib/Biber/Utils.pm" } }, "release_status" : "stable", "resources" : { "license" : [ "http://dev.perl.org/licenses/" ] }, "version" : "2.9" } biblatex-biber-2.9/MANIFEST000444000153000001 761313205066062 14776 0ustar00vboxother000000000000bin/biber Build.PL Changes data/bcf.xsl data/biber-tool.conf data/schemata/bcf.rnc data/schemata/bcf.rng data/schemata/config.rnc data/schemata/config.rng data/schemata/texmap.rnc data/texmap.xsl doc/biber.tex lib/Biber/Annotation.pm lib/Biber/Config.pm lib/Biber/Constants.pm lib/Biber/Date/Format.pm lib/Biber/DataModel.pm lib/Biber/Entries.pm lib/Biber/Entry/Name.pm lib/Biber/Entry/Names.pm lib/Biber/Entry.pm lib/Biber/Input/file/biblatexml.pm lib/Biber/Input/file/bibtex.pm lib/Biber/Internals.pm lib/Biber/LaTeX/recode_data.xml lib/Biber/LaTeX/Recode.pm lib/Biber/Output/base.pm lib/Biber/Output/biblatexml.pm lib/Biber/Output/bibtex.pm lib/Biber/Output/bbl.pm lib/Biber/Output/dot.pm lib/Biber/Output/test.pm lib/Biber.pm lib/Biber/Section.pm lib/Biber/Sections.pm lib/Biber/DataList.pm lib/Biber/DataLists.pm lib/Biber/UCollate.pm lib/Biber/Utils.pm MANIFEST README.md t/annotations.t t/basic-misc.t t/bcfvalidation.t t/biblatexml.t t/bibtex-aliases.t t/bibtex-output.t t/configfile.t t/crossrefs.t t/dm-constraints.t t/dateformats.t t/encoding.t t/extratitle.t t/extratitleyear.t t/extradate.t t/full-bbl.t t/full-bblxml.t t/full-bibtex.t t/full-dot.t THANKS t/labelalpha.t t/labelalphaname.t t/labelname.t t/names.t t/names_x.t TODO.org t/options.t t/related-entries.t t/remote-files.t t/sections-complex.t t/sections.t t/set-dynamic.t t/set-legacy.t t/set-static.t t/skips.t t/sort-case.t t/sort-complex.t t/sorting.t t/datalists.t t/sort-order.t t/sort-uc.t t/tool.t t/tool-bltxml.t t/tool-bltxml-inout.t t/tdata/annotations.bib t/tdata/annotations.bcf t/tdata/basic-misc.bcf t/tdata/biber-test.conf t/tdata/tool-test.conf t/tdata/tool-testsort.conf t/tdata/biblatexml.bcf t/tdata/biblatexml.bltxml t/tdata/bibtex-aliases.bcf t/tdata/bibtex-aliases.bib t/tdata/bibtex-output.bcf t/tdata/crossrefs.bcf t/tdata/crossrefs.bib t/tdata/dm-constraints.bcf t/tdata/dm-constraints.bib t/tdata/dateformats.bcf t/tdata/dateformats.bib t/tdata/encoding1.bcf t/tdata/encoding1.bib t/tdata/encoding2.bcf t/tdata/encoding2.bib t/tdata/encoding3.bcf t/tdata/encoding3.bib t/tdata/encoding4.bcf t/tdata/encoding4.bib t/tdata/encoding5.bcf t/tdata/encoding5.bib t/tdata/encoding6.bcf t/tdata/encoding6.bib t/tdata/examples.bib t/tdata/extratitle.bcf t/tdata/extratitle.bib t/tdata/extratitleyear.bcf t/tdata/extratitleyear.bib t/tdata/extradate.bcf t/tdata/extradate.bib t/tdata/full-bblxml.bblxml t/tdata/full-bblxml.bcf t/tdata/full-bibtex_biber.bib t/tdata/full-bibtex.bcf t/tdata/full-dot.bcf t/tdata/full-dot.bib t/tdata/full-dot.dot t/tdata/full-bbl.bbl t/tdata/full-bbl.bcf t/tdata/full-bbl.bib t/tdata/general.bcf t/tdata/labelalpha.bcf t/tdata/labelalpha.bib t/tdata/labelalphaname.bcf t/tdata/labelalphaname.bib t/tdata/names.bcf t/tdata/names_x.bcf t/tdata/names.bib t/tdata/names_x.bib t/tdata/options.bcf t/tdata/options.bib t/tdata/options.bib t/tdata/related.bcf t/tdata/related.bib t/tdata/remote-files.bcf t/tdata/sections1.bib t/tdata/sections2.bib t/tdata/sections3.bib t/tdata/sections4.bib t/tdata/sections.bcf t/tdata/sections-complex.bcf t/tdata/set-dynamic.bcf t/tdata/set-legacy.bcf t/tdata/sets.bib t/tdata/set-static.bcf t/tdata/skips.bcf t/tdata/skips.bib t/tdata/skips.bib t/tdata/sort.bib t/tdata/sort-case.bcf t/tdata/sort-case.bib t/tdata/sort-complex.bcf t/tdata/datalists.bcf t/tdata/datalists.bib t/tdata/datalists.bltxml t/tdata/sort-order.bcf t/tdata/sort-order.bib t/tdata/sort-order.bib t/tdata/sort-uc.bcf t/tdata/sort-uc.bib t/tdata/tool.bib t/tdata/uniqueness1.bcf t/tdata/uniqueness1.bib t/tdata/uniqueness2.bcf t/tdata/uniqueness2.bib t/tdata/uniqueness3.bcf t/tdata/uniqueness3.bib t/tdata/uniqueness4.bcf t/tdata/uniqueness4.bib t/tdata/uniqueness5.bcf t/tdata/uniqueness5.bib t/tdata/uniqueness6.bcf t/tdata/uniqueness6.bib t/tdata/uniqueness-nameparts.bcf t/tdata/uniqueness-nameparts.bib t/tdata/xdata.bcf t/tdata/xdata.bib t/tdata/xdata.bltxml t/uniqueness.t t/uniqueness-nameparts.t t/utils.t t/xdata.t visual.pl META.yml META.json biblatex-biber-2.9/visual.pl000444000153000001 55413205066062 15462 0ustar00vboxother000000000000# Module::Build "Build test" invokes this after all test scripts to provide some user # feedback. See the manual for Module::Build. The name of this script is not arbitrary. use Biber; BEGIN { push @INC, 'blib/lib/'; } my $v = $Biber::Config::VERSION; $v .= ' (beta)' if $Biber::Config::BETA_VERSION; print "Finished testing biber $v using Perl $] at $^X\n"; biblatex-biber-2.9/THANKS000444000153000001 74013205066062 14532 0ustar00vboxother000000000000We acknowledge the help of: Philipp Lehman, who gave us biblatex, and without whose close collaboration Biber development would not be possible. Alberto Manuel Brandão Simões, the maintainer of Text-BibTeX, for willingly complying to our special requests. John Collins for integration with the excellent latexmk tool. We also wish to thank the following persons for their useful feedback, bug reports, etc.: Simon Spiegel Thomas Arildsen and several others biblatex-biber-2.9/META.yml000444000153000001 567113205066062 15120 0ustar00vboxother000000000000--- abstract: 'Biber is a much-augmented bibtex replacement for biblatex users' author: - 'Philip Kime ' build_requires: Config::AutoConf: '0.15' ExtUtils::LibBuilder: '0.02' File::Which: '0' Test::Differences: '0' Test::More: '0' configure_requires: Module::Build: '0.38' dynamic_config: 1 generated_by: 'Module::Build version 0.4216, CPAN::Meta::Converter version 2.150001' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: biblatex-biber provides: Biber: file: lib/Biber.pm Biber::Annotation: file: lib/Biber/Annotation.pm Biber::Config: file: lib/Biber/Config.pm version: '2.9' Biber::Constants: file: lib/Biber/Constants.pm Biber::DataList: file: lib/Biber/DataList.pm Biber::DataLists: file: lib/Biber/DataLists.pm Biber::DataModel: file: lib/Biber/DataModel.pm Biber::Date::Format: file: lib/Biber/Date/Format.pm Biber::Entries: file: lib/Biber/Entries.pm Biber::Entry: file: lib/Biber/Entry.pm Biber::Entry::Name: file: lib/Biber/Entry/Name.pm Biber::Entry::Names: file: lib/Biber/Entry/Names.pm Biber::Input::file::biblatexml: file: lib/Biber/Input/file/biblatexml.pm Biber::Input::file::bibtex: file: lib/Biber/Input/file/bibtex.pm Biber::Internals: file: lib/Biber/Internals.pm Biber::LaTeX::Recode: file: lib/Biber/LaTeX/Recode.pm Biber::Output::base: file: lib/Biber/Output/base.pm Biber::Output::bbl: file: lib/Biber/Output/bbl.pm Biber::Output::biblatexml: file: lib/Biber/Output/biblatexml.pm Biber::Output::bibtex: file: lib/Biber/Output/bibtex.pm Biber::Output::dot: file: lib/Biber/Output/dot.pm Biber::Output::test: file: lib/Biber/Output/test.pm Biber::Section: file: lib/Biber/Section.pm Biber::Sections: file: lib/Biber/Sections.pm Biber::UCollate: file: lib/Biber/UCollate.pm Biber::Utils: file: lib/Biber/Utils.pm requires: Business::ISBN: '0' Business::ISMN: '0' Business::ISSN: '0' Class::Accessor: '0' Data::Compare: '0' Data::Dump: '0' Data::Uniqid: '0' DateTime::Calendar::Julian: '0' DateTime::Format::Builder: '0' Encode::EUCJPASCII: '0' Encode::HanExtra: '0' Encode::JIS2K: '0' File::Slurper: '0' IPC::Cmd: '0' IPC::Run3: '0' LWP::Protocol::https: '0' LWP::Simple: '0' Lingua::Translit: '0.28' List::AllUtils: '0' List::MoreUtils: '0' List::MoreUtils::XS: '0' Log::Log4perl: '0' Mozilla::CA: '20160104' PerlIO::utf8_strict: '0' Regexp::Common: '0' Sort::Key: '0' Text::BibTeX: '0.85' Text::CSV: '0' Text::CSV_XS: '0' Text::Roman: '0' URI: '0' Unicode::Collate: '1.21' Unicode::GCString: '0' Unicode::LineBreak: '2016.003' Unicode::Normalize: '1.25' XML::LibXML: '1.7' XML::LibXML::Simple: '0' XML::LibXSLT: '0' XML::Writer: '0' autovivification: '0' perl: v5.26.0 resources: license: http://dev.perl.org/licenses/ version: '2.9' biblatex-biber-2.9/data000755000153000001 013205066062 14412 5ustar00vboxother000000000000biblatex-biber-2.9/data/texmap.xsl000444000153000001 1327313205066062 16623 0ustar00vboxother000000000000 Biber UTF-8 <xsl:text disable-output-escaping="yes">&harr;</xsl:text> LaTeX macro decoding/encoding map

Biber UTF-8 &harr; LaTeX macro decoding/encoding map

If you are using PDFTeX as opposed to a native UTF-8 engine like XeTeX or LuaTeX, you will have to load some extra packages to use macros in this section. See the "symbols" document that comes with TeXLive for a comprehensive list of symbols and the packages you need for PDFTeX (run "texdoc symbols" to see this document on a TeXLive system).

Key
  • In encoding mapping (UTF-8 &rarr; LaTeX macros), when there are multiple possible mappings, red highlighted macro is the preferred mapping
  • In encoding mapping, insert the encoded form as-is with no wrapping braces or escaping etc.

Excluded from encoding (ignore LaTeX special chars)

Character

(sets: )

preferred raw
MacroUnicode characterUnicode hex value
\ &nbsp;

biblatex-biber-2.9/data/biber-tool.conf000444000153000001 17535513205066062 17534 0ustar00vboxother000000000000 prefix family given prefix family given suffix prefix mm citeorder sf,sm,sn,pf,pm,pn,pp prefix,family,suffix,given boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata month year day endday endmonth eventday eventendday eventendmonth eventmonth eventyear origday origendday origendmonth origmonth origyear urlday urlendday urlendmonth urlmonth urlyear abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note number origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version volume volumes shorthand shortjournal shortseries shorttitle urlendyear endyear eventendyear origendyear sorttitle sortshorthand sortyear sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date eventdate origdate urldate doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref entryset entrysubtype execute file gender ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf nameaddon options origday origendday origendmonth origendyear origmonth origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear usera userb userc userd usere userf verba verbb verbc xdata xref set entryset crossref article author journaltitle title day endday endmonth endyear month year addendum annotator commentator doi editor editora editorb editorc editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle language note number origlanguage pages pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear version volume bibnote note book author title day endday endmonth endyear month year addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes mvbook author title day endday endmonth endyear month year addendum afterword annotator commentator doi edition editor editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes inbook bookinbook suppbook author title booktitle day endday endmonth endyear month year addendum afterword annotator bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes booklet author editor title day endday endmonth endyear month year addendum chapter doi eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle titleaddon type url urlday urlendday urlendmonth urlendyear urlmonth urlyear collection reference editor title day endday endmonth endyear month year addendum afterword annotator chapter commentator doi edition editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes mvcollection mvreference author title day endday endmonth endyear month year addendum afterword annotator commentator doi edition editor editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes incollection suppcollection inreference author editor title booktitle day endday endmonth endyear month year addendum afterword annotator booksubtitle booktitleaddon chapter commentator doi edition editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes manual title day endday endmonth endyear month year addendum author chapter doi edition editor eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle titleaddon type url urlday urlendday urlendmonth urlendyear urlmonth urlyear version misc title day endday endmonth endyear day endday endmonth endyear month year addendum author doi editor eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle titleaddon type url urlday urlendday urlendmonth urlendyear urlmonth urlyear version online title url addendum author editor language month note organization pubstate subtitle titleaddon urlday urlendday urlendmonth urlendyear urlmonth urlyear version year patent author title number day endday endmonth endyear month year addendum doi eprint eprintclass eprinttype holder location note pubstate subtitle titleaddon type url urlday urlendday urlendmonth urlendyear urlmonth urlyear version periodical editor title day endday endmonth endyear month year addendum doi editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate series subtitle url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume mvproceedings editor title day endday endmonth endyear month year addendum doi eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear venue volumes proceedings editor title day endday endmonth endyear month year addendum chapter doi eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear venue volume volumes inproceedings author editor title booktitle day endday endmonth endyear month year addendum booksubtitle booktitleaddon chapter doi eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear venue volume volumes report author title type institution day endday endmonth endyear month year addendum chapter doi eprint eprintclass eprinttype isrn language location note number pages pagetotal pubstate subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear version thesis author title type institution day endday endmonth endyear month year addendum chapter doi eprint eprintclass eprinttype language location note pages pagetotal pubstate subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear unpublished author title day endday endmonth endyear month year addendum howpublished language location note pubstate subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author editor title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender biblatex-biber-2.9/data/bcf.xsl000444000153000001 17004213205066061 16074 0ustar00vboxother000000000000
Entrytype:
TargetFromTo

Sorting Scheme:

sort_final &darr; &uarr; Aa/ aA/ Aa/ aA/ A a A a
  • > <
Key
  • Heading Format: (sort-direction)(case-order)/(case-sensitivity)
  • Heading key: &uarr; = ascending sort, &darr; = descending sort, Aa = sort uppercase before lower, aA = sort lowercase before upper, A = case-sensitive sorting, a = case-insensitive sorting, sort fieldset is final master key if defined
  • Field key: Padding specification e.g. 0000field = pad field "field" from left with "0" to width 4. Substring specification e.g. field<<<< = take width 4 substring from right side of field "field"
BibLaTeX control file

BibLaTeX Control File (BCF format version: biblatex version: )


options for

OptionValue
,&nbsp;

Option Scope

OptionDatatype

Datafield Sets

NameMembers
datatype: &nbsp; fieldtype: ,&nbsp; ,&nbsp;

Datasource Mappings

Mappings for datatype (default overwrite = 1 0 , section = all )

Mapping ( overwrite = default overwrite , for types: , , for datasources: , , foreach loop field= )
map_final @ &rarr;@ map_newentryNEW created with key "" map_final &rarr; &asymp; &rarr; map_null ="" =TYPE =FIELD =FIELDVAL map_newentry applied to target ""

Key
  • @entrytype: Entrytype for entry must match or mapping terminates
  • field: Entry must have field or mapping terminates
  • @source&rarr;@target: Change source entrytype to target entrytype
  • source&rarr;target: Change source field to target field
  • field: Delete field
  • field="string": Set field to "string"
  • TYPE: Most recently mentioned source entrytype
  • FIELD: Most recently source field
  • FIELDVAL: Most recently source field value
  • field&asymp;MATCH: field must match Regular Expression MATCH
  • field&asymp;MATCH &rarr; REPLACE: Perform Regular Expression match/replace on field

Labelalpha Name Templates

Template for type

OrderPreUse optionWidthSideCompoundNamepart


Labelalpha Templates

Template for type

Part
  • la_final la_compound namecount=&rarr; > la_namessep() la_names= < v/ vf/ l &otimes;
Key
  • Heading key: Label parts are concatenated together in part order shown
  • Labelpart key: Final label, no more parts are considered. "namecount=n&rarr;field" - conditional name fieldpart, only used if there as many names as specified by the range n. Substring specification: ">>>field" = use three chars from left side of field. "field<<" = use two chars from right side of field. "fieldv/n" = variable-width substring, max n chars. "fieldvf/n" = variable-width substring fixed to same length as longest string occuring at least n times. "fieldl" = list scope disambiguation where the label as a whole is unique, not necessarily the individual parts. "field"=range=only use the names in the specified range to form the labelpart. "field(string)"=use string as separator between all names. &otimes; = supress alphaothers

Extradate specification

Fields
,&nbsp;

Inheritance

Defaults

Child type &asymp; Parent type Source field &rarr; Target field Suppress
* &asymp; * inherit_override * &rarr; inherit_override * inherit_override * &rarr; inherit_override &empty;
* &asymp; * inherit_override * &asymp; inherit_override * inherit_override * &rarr; inherit_override &empty;

Specifications

Child type &asymp; Parent type Source field &rarr; Target field Suppress
  • * &asymp; *
  • &rarr; &empty; inherit_override &rarr; inherit_override
Key
  • * matches all entrytypes or fields
  • X &asymp; Y: X inherits from Y
  • X &rarr; &empty;: Field X is suppressed
  • F &rarr; F': Field F in parent becomes field F' in child. If both field F and field F' exist, field in red overrides the other.

Global Default Sorting Options

Presort defaults

EntrytypePresort default
ALL

Sorting exclusions

EntrytypeFields excluded from sorting
,&nbsp;

Sorting inclusions

EntrytypeFields forcibly included in sorting
,&nbsp;

Uniquename Template

OrderBaseUse optionDisambiguation levelNamepart

Sorting Name Key Template

OrderKeypart
(if use=) (Initials only) +

Sorting Schemes

Sorting Transliteration



Data Model

Constants

NameTypeValue

Legal entrytypes

EntrytypeLegal fields for entrytype
GLOBAL
,
GLOBAL fields
GLOBAL fields
,

Field Types

FieldField FormatData type
&empty; &loz; standard &nbsp;
Key
  • &empty; = field can null in .bbl, &loz; = field is not output to .bbl

Constraints

EntrytypesConstraint
  • &forall; &exist; &not;&exist; ( , ) &rarr; &forall; &exist; &not;&exist; ( , ) &le; ( , ) &le; ( , ) must be dates &oplus; ( field_xor_coerce , ) &or; ( , )
Key
  • C &rarr; C': If condition C is met then condition C' must also be met
  • &forall; ( ... ): True if all fields in list exist
  • &exist; ( ... ): True if one field in list exists
  • &not;&exist; ( ... ): True if no fields in list exist
  • n &le; ( ... ) &le; m: True if fields in list are have values in the range n-m
  • &oplus; ( ... ): True if at least and at most one of the fields in the list exists (XOR). If more than field in the set exists, all will be ignored except for the one in red
  • &or; ( ... ): True if at least one of the fields in the list exists (OR)

Reference Sections

Section 0

Data sourcesCitekeysDynamic sets
  • (&nbsp;)
  • &nbsp;()

Section

Data sourcesCitekeys
  • (&nbsp;)

Data Lists

Data list ""

TypeSorting SchemeLabelprefixUniquename Template NameLabelalphaname Template Name
Filters
Filter typeFilter value
biblatex-biber-2.9/data/schemata000755000153000001 013205066062 16177 5ustar00vboxother000000000000biblatex-biber-2.9/data/schemata/config.rng000444000153000001 13425613205066061 20363 0ustar00vboxother000000000000 GLOBAL ENTRYTYPE ENTRY NAMELIST NAME boolean integer string xml 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 upper lower title bibtex bbl biblatexml dot 0 1 0 1 0 1 0 1 base full 0 1 0 1 0 1 0 1 bibtex biblatexml 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 string list true xsv true true true conditional all one none all one none data integer isbn issn ismn date pattern mandatory * 1 * 1 1 1 true false true false * 1 * 1 true false true false * 1 * 1 true false 1 1 true false 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 left right 0 1 1 left right v vf l left right 0 1 1 0 1 0 1 none init initorfull full namepart literal 0 1 0 1 1 1 1 ascending descending 0 1 0 1 1 left right left right 1 1 original translated romanised uniform field list literal name key entrykey date verbatim integer range code uri datepart keyword option biblatex-biber-2.9/data/schemata/bcf.rnc000444000153000001 6271313205066061 17622 0ustar00vboxother000000000000namespace bcf = "https://sourceforge.net/projects/biblatex" start = element bcf:controlfile { # This is usually the same as the biblatex version string but not necessarily. # Sometimes the BCF format version doesn't change between biblatex releases attribute version { xsd:string {minLength="1"}}, attribute bltxversion { xsd:string {minLength="1"}}, # "Global" Biber options. It's not clear what a non-global biber option # would be but just in case, we have the option ... element bcf:options { attribute component { "biber" }, attribute type { "global" }, output_encoding, input_encoding, debug, mincrossrefs, minxrefs, sortcase, sortupper }, # Global BibLaTeX options. That is, options that apply to all # entrytypes (unless a more specifically scoped option is specified) element bcf:options { attribute component { "biblatex" }, attribute type { "global" }, alphaothers, labelalpha, labelnamespec, labeltitle, labeltitlespec, labeltitleyear, labeldateparts, labeldatespec, julian, gregorianstart, maxalphanames, maxbibnames, maxcitenames, maxitems, minalphanames, minbibnames, mincitenames, minitems, singletitle, sortalphaothers?, sortlocale, sortingtemplatename, sortsets, uniquelist, uniquename, uniqueprimaryauthor, uniquetitle, uniquebaretitle, uniquework, useprefix, usenames }, # Per-entrytype BibLaTeX options element bcf:options { attribute component { "biblatex" }, attribute type { text }, alphaothers?, labelalpha?, labelnamespec?, labeltitle?, labeltitlespec?, labeltitleyear?, labeldateparts?, labeldatespec?, maxalphanames?, maxbibnames?, maxcitenames?, maxitems?, minalphanames?, minbibnames?, mincitenames?, minitems?, singletitle?, skipbib?, skiplab?, skipbiblist?, skiplos?, sortalphaothers?, uniquelist?, uniquename?, uniquetitle?, uniquebaretitle?, uniquework?, useprefix?, usenames? }*, # Option scope element bcf:optionscope { attribute type { "GLOBAL" | "ENTRYTYPE" | "ENTRY" | "NAMELIST" | "NAME" }, element bcf:option { attribute datatype { "boolean" | "integer" | "string" | "xml" }, xsd:string }+ }*, # datafield sets element bcf:datafieldset { attribute name { text }, element bcf:member { ((attribute fieldtype { dmfieldtype }?, attribute datatype { dmdatatype }?) | attribute field { text }?), empty }+ }+, # user field/entrytype mapping element bcf:sourcemap { element bcf:maps { attribute datatype { "bibtex" | "biblatexml" }, attribute map_overwrite { "0" | "1" }?, attribute level { "user" | "style" | "driver" }?, map+ }+ }?, # labelalphanametemplate specification element bcf:labelalphanametemplate { attribute name { xsd:string }?, element bcf:namepart { attribute order { xsd:integer }, attribute use { "0" | "1" }?, attribute pre { "0" | "1" }?, attribute substring_width { xsd:integer }?, attribute substring_compound { "0" | "1" }?, attribute substring_side { "left" | "right" }?, text }+ }+, # labelalpha template specification element bcf:labelalphatemplate { attribute type { xsd:string }?, # per-type? element bcf:labelelement { attribute order { xsd:integer }, element bcf:labelpart { attribute final { "0" | "1" }?, attribute pad_char { xsd:string {minLength="1"}}?, attribute pad_side { "left" | "right" }?, attribute substring_width { xsd:integer | "v" | "vf" | "l" }?, attribute substring_fixed_threshold { xsd:integer }?, attribute substring_width_max { xsd:integer }?, attribute substring_side { "left" | "right" }?, attribute ifnames { text }?, attribute names { text }?, attribute namessep { string }?, attribute noalphaothers { "0" | "1" }?, xsd:string }+ }+ }+, # Extradate specification element bcf:extradatespec { # Scope of extradate tracking - an ordered set of fields to try element bcf:scope { # A field used to track extradate element bcf:field { attribute order { xsd:integer }, text }+ }+ }, # Cross-reference inheritance specifications element bcf:inheritance { # Defaults element bcf:defaults { # Whether to inherit all fields attribute inherit_all { "true" | "false" }, # Should we overwrite the target field if it exists? attribute override_target { "true" | "false" }, # ignore of uniqueness tracking attribute ignore { text }?, # Default inherit_all and override_target settings for entrytype source/target pairs element bcf:type_pair { attribute source { "*" | xsd:string {minLength="1"}}, attribute target { "*" | xsd:string {minLength="1"}}, attribute inherit_all { "true" | "false" }?, attribute override_target { "true" | "false" }?, attribute suppress { text }?, empty }* }, # An inheritance specification element bcf:inherit { # ignore of uniqueness tracking attribute ignore { text }?, # applies to these pairs of source/target entrytypes element bcf:type_pair { attribute source { "*" | xsd:string {minLength="1"}}, attribute target { "*" | xsd:string {minLength="1"}}, empty }+, # and here are the field specifications element bcf:field { ( # either a "skip this field" specification # so we can say inherit all except certain fields OR ... (attribute source { xsd:string }, attribute skip { "true" | "false" }) | # ... a source and target field with an optional override attribute (attribute source { xsd:string {minLength="1"}}, attribute target { xsd:string {minLength="1"}}, attribute override_target { "true" | "false" }?) ), empty }+ }* }, # noinit specification element bcf:noinits { element bcf:noinit { attribute value { xsd:string }, empty }+ }?, # nolabel specification element bcf:nolabels { element bcf:nolabel { attribute value { xsd:string }, empty }+ }?, # nosort specification element bcf:nosorts { element bcf:nosort { attribute field { xsd:string }, attribute value { xsd:string }, empty }+ }?, # Transliteration specification(s) translit*, # Uniquename template uniquenametemplate+, # Sorting name key specification sortingnamekeytemplate+, # presort default strings for different entry types element bcf:presort { attribute type { text }?, text }+, # excludes of certain fields for sorting for specified types element bcf:sortexclusion { attribute type { text }, element bcf:exclusion { text }+ }*, # forcibly includes certain fields excluded by sortexclusion for sorting for specified types element bcf:sortinclusion { attribute type { text }, element bcf:inclusion { text }+ }*, # Data model specification element bcf:datamodel { # Constants element bcf:constants { element bcf:constant { attribute type { "string" | "list" }?, attribute name { text }, text }+ }, # Valid entrytypes element bcf:entrytypes { element bcf:entrytype { # Some entrytypes should be completely skipped on output (XDATA etc.) attribute skip_output { "true" }?, text }+ }, # BibLaTeX field types. Biber uses this to determine how to output various types # to the .bbl element bcf:fields { element bcf:field { # fieldtype is "field" or "list" attribute fieldtype { dmfieldtype }, # format is a specification of the format of the field. If not specified, field contents # are just as is. attribute format { "xsv" }?, # datatype of field content attribute datatype { dmdatatype }, # Are we allowed to output a null field value to the .bbl for this field? attribute nullok { "true" }?, # Should this field be skipped and not output to the .bbl? attribute skip_output { "true" }?, # Field can be used as a label? This auto-generates some defaults in biblatex attribute label { "true" }?, text }+ }, # Allowable fields for entrytypes # Only one specification per entrytype: even though it might be nice to have several # so that one could share information, this would be hard to manage and confusing as it # not be visible in one place which fields were valid for an entrytype. element bcf:entryfields { element bcf:entrytype { text }*, element bcf:field { text }+ }+, # Constraints on field (co-)existence and format element bcf:constraints { # Set of entrytypes that this constraint applies to # An entrytype can be specified in multiple constraints # element bcf:entrytype { text }*, # A constraint specification element bcf:constraint { ( # Conditional constraints have an antecedent and consequent # both of which have a quantifier. This allows you to enforce # constraints like: # # if field a,b,c are all present then one of x,y,z must be # if one of field a,b,c are present then none of x,y,z must be # etc. (attribute type { "conditional" }, element bcf:antecedent { attribute quant { "all" | "one" | "none"}, element bcf:field { text }+ }, element bcf:consequent { attribute quant { "all" | "one" | "none"}, element bcf:field { text }+ } ) | # Datatype and format constraints (attribute type { "data" }, # range* attributes are for limiting integer type range attribute datatype { "integer" | "isbn" | "issn" | "ismn" | "date" | "pattern" }?, attribute rangemin { xsd:int }?, attribute rangemax { xsd:int }?, attribute pattern { text }?, element bcf:field { text }+ ) | # Mandatoriness constraints which say which fields must appear (attribute type { "mandatory" }, (element bcf:field { text } | # An XOR set of fields so you can enforce: # # One (but not more) of fields a,b,c must exist element bcf:fieldxor { element bcf:field { text }+ } | # An OR set of fields so you can enforce: # # One (possibly more) of fields a,b,c must exist element bcf:fieldor { element bcf:field { text }+ } )+ ) ) }* }+ }?, # Section specifications secspec+, sorting+, listspec+ } listspec = element bcf:datalist { attribute section { xsd:integer }, attribute type { "entry" | "list" }, attribute sortingtemplatename { xsd:string {minLength="1"} }, attribute sortingnamekeytemplatename { xsd:string {minLength="1"} }, attribute labelprefix { xsd:string }, attribute uniquenametemplatename { xsd:string }, attribute labelalphanametemplatename { xsd:string }, # name is only needed for list types attribute name { xsd:string {minLength="1"} }, (filter | filteror )* }* translit = element bcf:transliteration { attribute entrytype { "*" | xsd:string {minLength="1"} }, element bcf:translit { attribute target { "*" | xsd:string {minLength="1"} }, attribute from { xsd:string {minLength="1"} }, attribute to { xsd:string {minLength="1"} } }+ } uniquenametemplate = element bcf:uniquenametemplate { attribute name { xsd:string {minLength="1"} }, element bcf:namepart { attribute order { xsd:integer }, attribute use { "0" | "1" }?, attribute base { "0" | "1" }?, attribute disambiguation { "none" | "init" | "initorfull" | "full"}?, text }+ } sortingnamekeytemplate = element bcf:sortingnamekeytemplate { attribute name { text }, element bcf:keypart { attribute order { xsd:integer }, element bcf:part { attribute type { "namepart" | "literal" }, attribute order { xsd:integer }, attribute use { "0" | "1" }?, attribute inits { "0" | "1" }?, text }+ }+ }+ sorting = element bcf:sortingtemplate { # sorting template name attribute name { xsd:string {minLength="1"}}, # locale for entire sorting specification attribute locale { xsd:string {minLength="1"}}?, sort+ } sort = # sort specification element bcf:sort { # order of this specification in the set of all sort specifications attribute order { xsd:integer }, # Should we stop generating sorting information after this item? attribute final { "1" }?, # Sort ascending or descending attribute sort_direction { "ascending" | "descending" }?, # Sort case sensitive or not? attribute sortcase { "0" | "1" }?, # Sort upper before lower? attribute sortupper { "0" | "1" }?, # sortset specific override for locale attribute locale { xsd:string {minLength="1"}}?, # A sort item specification - a field or pseudo-field to get sort information from element bcf:sortitem { # order of this item in the set of all other item specifications attribute order { xsd:integer }, # Just use a part of the item information for sorting? attribute substring_side { "left" | "right" }?, attribute substring_width { xsd:integer }?, # Pad the item information when sorting with it? attribute pad_side { "left" | "right" }?, attribute pad_width { xsd:integer }?, attribute pad_char { xsd:string { minLength = "1" maxLength = "1" } }?, text }+ }+ # Section specification secspec = # data sources element bcf:bibdata { # which sections the datafiles are for attribute section { xsd:integer }, element bcf:datasource { attribute type { "file" }, attribute datatype { "bibtex" | "biblatexml" }?, xsd:anyURI }* }?, # citekeys or citekey sets in each section element bcf:section { attribute number { xsd:integer }, element bcf:citekey { ( attribute type { "set" }, attribute members { xsd:string {minLength="1"}}, xsd:string {minLength="1"}) | ( attribute order { xsd:integer }, xsd:string {minLength="1"} ) }* } filteror = element bcf:filteror { filter+ } filter = element bcf:filter { attribute type { "type" | "nottype" | "subtype" | "notsubtype" | "keyword" | "notkeyword" | "field" | "notfield" }, xsd:string {minLength="1"} } # option definitions # use options are dynamically determined from data model usenames = element bcf:option { attribute type { "singlevalued" }, element bcf:key { xsd:string {pattern = "use.*"} }, element bcf:value { "0" | "1" } }+ useprefix = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "useprefix" }, element bcf:value { "0" | "1" } } labelalpha = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "labelalpha" }, element bcf:value { "0" | "1" } } labeltitle = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "labeltitle" }, element bcf:value { "0" | "1" } } labeltitlespec = element bcf:option { attribute type { "multivalued" }, element bcf:key { "labeltitlespec" }, element bcf:value { attribute order { xsd:integer }, attribute lang { text }?, text }+ } labeltitleyear = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "labeltitleyear" }, element bcf:value { "0" | "1" } } labeldateparts = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "labeldateparts" }, element bcf:value { "0" | "1" } } labeldatespec = element bcf:option { attribute type { "multivalued" }, element bcf:key { "labeldatespec" }, element bcf:value { attribute order { xsd:integer }, attribute type { "field" | "string" }, text }+ } singletitle = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "singletitle" }, element bcf:value { "0" | "1" } } skipbib = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "skipbib" }, element bcf:value { "0" | "1" } } skiplab = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "skiplab" }, element bcf:value { "0" | "1" } } skiplos = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "skiplos" }, element bcf:value { "0" | "1" } } skipbiblist = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "skipbiblist" }, element bcf:value { "0" | "1" } } # 0 = do not provide uniquelist information # 1 = disambiguate lists regardless of year # 2 = disambiguate lists only when year is the same uniquelist = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "uniquelist" }, element bcf:value { "0" | "1" | "2" } } # 0 = do not provide uniquename information # 1 = disambiguate with initials, only up to maxcitenames/uniquelist # 2 = disambiguate with full name or initials, only up to maxcitenames/uniquelist # 3 = disambiguate with initials, ignore maxcitenames/uniquelist # 4 = disambiguate with full name or initials, ignore maxcitenames/uniquelist # 5 = disambiguate with initials, only between identical lists in different entries # 6 = disambiguate with full name or initials, only between identical lists in different entries uniquename = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "uniquename" }, element bcf:value { "0" | "1" | "2" | "3" | "4" | "5" | "6" } } uniqueprimaryauthor = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "uniqueprimaryauthor" }, element bcf:value { "0" | "1" } } uniquetitle = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "uniquetitle" }, element bcf:value { "0" | "1" } } uniquebaretitle = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "uniquebaretitle" }, element bcf:value { "0" | "1" } } uniquework = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "uniquework" }, element bcf:value { "0" | "1" } } julian = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "julian" }, element bcf:value { "0" | "1" } } gregorianstart = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "gregorianstart" }, element bcf:value { text } } maxitems = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "maxitems" }, element bcf:value { xsd:integer } } maxbibnames = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "maxbibnames" }, element bcf:value { xsd:integer } } maxalphanames = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "maxalphanames" }, element bcf:value { xsd:integer } } maxcitenames = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "maxcitenames" }, element bcf:value { xsd:integer } } minitems = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "minitems" }, element bcf:value { xsd:integer } } minbibnames = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "minbibnames" }, element bcf:value { xsd:integer } } minalphanames = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "minalphanames" }, element bcf:value { xsd:integer } } mincitenames = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "mincitenames" }, element bcf:value { xsd:integer } } sortlocale = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "sortlocale" }, element bcf:value { text } } sortingtemplatename = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "sortingtemplatename" }, element bcf:value { text } } sortsets = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "sortsets" }, element bcf:value { "0" | "1" } } labelnamespec = element bcf:option { attribute type { "multivalued" }, element bcf:key { "labelnamespec" }, element bcf:value { attribute order { xsd:integer }, attribute lang { text }?, text }+ } mincrossrefs = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "mincrossrefs" }, element bcf:value { xsd:integer } } minxrefs = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "minxrefs" }, element bcf:value { xsd:integer } } debug = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "debug" }, element bcf:value { "0" | "1" } } wrapline = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "wrapline" }, element bcf:value { xsd:integer } } output_encoding = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "output_encoding" }, element bcf:value { text } } input_encoding = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "input_encoding" }, element bcf:value { text } } sortcase = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "sortcase" }, element bcf:value { "0" | "1" } } alphaothers = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "alphaothers" }, element bcf:value { xsd:normalizedString { pattern = "\S+" } } } sortupper = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "sortupper" }, element bcf:value { "0" | "1" } } sortalphaothers = element bcf:option { attribute type { "singlevalued" }, element bcf:key { "sortalphaothers" }, element bcf:value { xsd:normalizedString { pattern = "\S+" } } } map = element bcf:map { attribute map_overwrite { "0" | "1" }?, attribute map_foreach { xsd:string {minLength="1"} }?, attribute refsection { xsd:integer }?, element bcf:per_datasource { xsd:string {minLength="1"} }*, element bcf:per_type { xsd:string {minLength="1"} }*, element bcf:map_step { ( ( attribute map_entry_clone { xsd:string {minLength="1"} } ) | ( attribute map_entry_new { xsd:string {minLength="1"} }, attribute map_entry_newtype { xsd:string {minLength="1"} } ) | ( attribute map_type_source { xsd:string {minLength="1"} }?, attribute map_type_target { xsd:string {minLength="1"} }?, attribute map_field_source { xsd:string {minLength="1"} }?, attribute map_notfield { xsd:string {minLength="1"} }?, attribute map_field_target { xsd:string {minLength="1"} }?, attribute map_entrytarget { xsd:string {minLength="1"} }?, attribute map_field_set { xsd:string {minLength="1"} }?, attribute map_entry_null { "1" }?, attribute map_append { "1" }?, attribute map_final { "1" }?, attribute map_match { xsd:string {minLength="1"} }?, attribute map_notmatch { xsd:string {minLength="1"} }?, attribute map_replace { xsd:string }?, ( attribute map_null { "1" } | attribute map_origfield { "1" } | attribute map_origfieldval { "1" } | attribute map_origentrytype { "1" } | attribute map_field_value { xsd:string {minLength="1"} } )? ) ), empty }+ } dmfieldtype = "field" | "list" dmdatatype = "literal" | "name" | "key" | "entrykey" | "date" | "verbatim" | "integer" | "range" | "code" | "uri" | "datepart" | "keyword" | "option" # Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. # This code is free software. You can redistribute it and/or # modify it under the terms of the Artistic License 2.0. # This program is distributed in the hope that it will be useful, # but without any warranty; without even the implied warranty of # merchantability or fitness for a particular purpose. biblatex-biber-2.9/data/schemata/bcf.rng000444000153000001 20201713205066061 17637 0ustar00vboxother000000000000 1 1 biber global biblatex global biblatex GLOBAL ENTRYTYPE ENTRY NAMELIST NAME boolean integer string xml bibtex biblatexml 0 1 user style driver 0 1 0 1 0 1 left right 0 1 1 left right v vf l left right 0 1 true false true false * 1 * 1 true false true false * 1 * 1 true false 1 1 true false string list true xsv true true true conditional all one none all one none data integer isbn issn ismn date pattern mandatory entry list 1 1 1 * 1 * 1 1 1 1 0 1 0 1 none init initorfull full namepart literal 0 1 0 1 1 1 1 ascending descending 0 1 0 1 1 left right left right 1 1 file bibtex biblatexml set 1 1 1 type nottype subtype notsubtype keyword notkeyword field notfield 1 singlevalued use.* 0 1 singlevalued useprefix 0 1 singlevalued labelalpha 0 1 singlevalued labeltitle 0 1 multivalued labeltitlespec singlevalued labeltitleyear 0 1 singlevalued labeldateparts 0 1 multivalued labeldatespec field string singlevalued singletitle 0 1 singlevalued skipbib 0 1 singlevalued skiplab 0 1 singlevalued skiplos 0 1 singlevalued skipbiblist 0 1 singlevalued uniquelist 0 1 2 singlevalued uniquename 0 1 2 3 4 5 6 singlevalued uniqueprimaryauthor 0 1 singlevalued uniquetitle 0 1 singlevalued uniquebaretitle 0 1 singlevalued uniquework 0 1 singlevalued julian 0 1 singlevalued gregorianstart singlevalued maxitems singlevalued maxbibnames singlevalued maxalphanames singlevalued maxcitenames singlevalued minitems singlevalued minbibnames singlevalued minalphanames singlevalued mincitenames singlevalued sortlocale singlevalued sortingtemplatename singlevalued sortsets 0 1 multivalued labelnamespec singlevalued mincrossrefs singlevalued minxrefs singlevalued debug 0 1 singlevalued wrapline singlevalued output_encoding singlevalued input_encoding singlevalued sortcase 0 1 singlevalued alphaothers \S+ singlevalued sortupper 0 1 singlevalued sortalphaothers \S+ 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 field list literal name key entrykey date verbatim integer range code uri datepart keyword option biblatex-biber-2.9/data/schemata/texmap.rnc000444000153000001 200113205066061 20326 0ustar00vboxother000000000000start = element texmap { element maps { # CSV list of sets attribute set { text }, attribute type { "accents" | "letters" | "diacritics" | "punctuation" | "symbols" | "negatedsymbols" | "superscripts" | "cmdsuperscripts" | "dings" | "greek" }, map+ }+, element encode_exclude { element char { text }+ } } map = element map { element from { attribute preferred {"1"}?,# preferred encoding form if more than one attribute raw {"1"}?,# use the encoding form "as is" in replacement - no extra envs/braces etc. text }, element to { attribute hex { text }, text } } # Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. # This code is free software. You can redistribute it and/or # modify it under the terms of the Artistic License 2.0. # This program is distributed in the hope that it will be useful, # but without any warranty; without even the implied warranty of # merchantability or fitness for a particular purpose. biblatex-biber-2.9/data/schemata/config.rnc000444000153000001 4021413205066062 20326 0ustar00vboxother000000000000start = element config { # Option scope element optionscope { attribute type { "GLOBAL" | "ENTRYTYPE" | "ENTRY" | "NAMELIST" | "NAME" }, element option { attribute datatype { "boolean" | "integer" | "string" | "xml" }, xsd:string }+ }* & element clrmacros { "0" | "1" }? & element collate { "0" | "1" }? & element collate_options { element option { attribute name { text } & attribute value { text } }+ }? & # datafield sets element datafieldset { attribute name { text }, element member { ((attribute fieldtype { dmfieldtype }?, attribute datatype { dmdatatype }?) | attribute field { text }?), empty }+ }* & # Annotation marker element annotation_marker { text }? & # Can't specify the config file location in the config file ... # element configfile { text }? & element convert_control { "0" | "1" }? & element dot_include { text }? & # Data model specification (mainly for tool mode) datamodel? & element decodecharsset { text }? & element debug { "0" | "1" }? & element fastsort { "0" | "1" }? & element fixinits { "0" | "1" }? & # Would never want this in the config file # element help { "0" | "1" }? & inheritance? & element input_encoding { text }? & element listsep { text }? & element logfile { text }? & element mincrossrefs { xsd:unsignedByte }? & element mssplit { text }? & element namesep { text }? & # Can't specify not to use a config file in the config file ... # element noconf { "0" | "1" }? & element nodieonerror { "0" | "1" }? & element nolog { "0" | "1" }? & # noinit specification element noinits { element noinit { attribute value { xsd:string }, empty }+ }? & # nolabel specification element nolabels { element nolabel { attribute value { xsd:string }, empty }+ }? & # nosort specification element nosort { element option { attribute name { text } & attribute value { text } }+ }? & element nostdmacros { "0" | "1" }? & element onlylog { "0" | "1" }? & element others_string { text }? & element output_align { "0" | "1" }? & element output_annotation_marker { text }? & element output_directory { text }? & element output_encoding { text }? & element output_fieldcase { "upper" | "lower" | "title" }? & element output_file { text }? & element output_format { "bibtex" | "bbl" | "biblatexml" | "dot" }? & element output_indent { xsd:unsignedByte }? & element output_listsep { text }? & element output_macro_fields { text }? & element output_namesep { text }? & element output_resolve_xdata { "0" | "1" }? & element output_resolve_crossrefs { "0" | "1" }? & element output_resolve_sets { "0" | "1" }? & element output_safechars { "0" | "1" }? & element output_safecharsset { "base" | "full" }? & element output_xname { "0" | "1" }? & element output_xnamesep { text }? & element quiet { "0" | "1" }? & element recodedata { text }? & element sortcase { "0" | "1" }? & translit* & labelalphanametemplate* & labelalphatemplate? & uniquenametemplate* & sortingnamekeytemplate? & sortingtemplate? & # presort default strings for different entry types element presort { attribute type { text }?, text }* & # excludes of certain fields for sorting for specified types element sortexclusion { attribute type { text }, element exclusion { text }+ }* & # forcibly includes certain fields excluded by sortexclusion for sorting for specified types element sortinclusion { attribute type { text }, element inclusion { text }+ }* & element sortlocale { text }? & element sortupper { "0" | "1" }? & element sourcemap { element maps { attribute datatype { "bibtex" | "biblatexml" }, attribute map_overwrite { "0" | "1" }?, map+ }+ }? & element ssl-nointernalca { "0" | "1" }? & element ssl-noverify-host { "0" | "1" }? & element tool { "0" | "1" }? & element tool_config { text }? & element trace { "0" | "1" }? & element validate_config { "0" | "1" }? & element validate_control { "0" | "1" }? & element validate_datamodel { "0" | "1" }? & # Meaningless in the config file # element version { "0" | "1" }? & element wraplines { "0" | "1" }? } datamodel = element datamodel { # Constants element constants { element constant { attribute type { "string" | "list" }?, attribute name { text }, text }+ }, # Valid entrytypes element entrytypes { element entrytype { # Some entrytypes should be completely skipped on output (XDATA etc.) attribute skip_output { "true" }?, text }+ }, # BibLaTeX field types. Biber uses this to determine how to output various types # to the .bbl element fields { element field { # fieldtype is "field" or "list" attribute fieldtype { dmfieldtype }, # format is a specification of the format of the field. If not specified, field contents # are just as is. attribute format { "xsv" }?, # datatype of field content attribute datatype { dmdatatype }, # Are we allowed to output a null field value to the .bbl for this field? attribute nullok { "true" }?, # Should this field be skipped and not output to the .bbl? attribute skip_output { "true" }?, # Field can be used as a label? This auto-generates some defaults in biblatex attribute label { "true" }?, text }+ }, # Allowable fields for entrytypes # Only one specification per entrytype: even though it might be nice to have several # so that one could share information, this would be hard to manage and confusing as it # not be visible in one place which fields were valid for an entrytype. element entryfields { element entrytype { text }*, element field { text }+ }+, # Constraints on field (co-)existence and format element constraints { # Set of entrytypes that this constraint applies to # An entrytype can be specified in multiple constraints # element entrytype { text }*, # A constraint specification element constraint { ( # Conditional constraints have an antecedent and consequent # both of which have a quantifier. This allows you to enforce # constraints like: # # if field a,b,c are all present then one of x,y,z must be # if one of field a,b,c are present then none of x,y,z must be # etc. (attribute type { "conditional" }, element antecedent { attribute quant { "all" | "one" | "none"}, element field { text }+ }, element consequent { attribute quant { "all" | "one" | "none"}, element field { text }+ } ) | # Datatype and format constraints (attribute type { "data" }, # range* attributes are for limiting integer type range attribute datatype { "integer" | "isbn" | "issn" | "ismn" | "date" | "pattern" }?, attribute rangemin { xsd:int }?, attribute rangemax { xsd:int }?, attribute pattern { text }?, element field { text }+ ) | # Mandatoriness constraints which say which fields must appear (attribute type { "mandatory" }, (element field { text } | # An XOR set of fields so you can enforce: # # One (but not more) of fields a,b,c must exist element fieldxor { element field { text }+ } | # An OR set of fields so you can enforce: # # One (possibly more) of fields a,b,c must exist element fieldor { element field { text }+ } )+ ) ) }* }+ } translit = element transliteration { attribute entrytype { "*" | xsd:string {minLength="1"} }, element translit { attribute target { "*" | xsd:string {minLength="1"} }, attribute from { xsd:string {minLength="1"} }, attribute to { xsd:string {minLength="1"} } }+ } inheritance = # Cross-reference inheritance specifications element inheritance { # Defaults element defaults { # Whether to inherit all fields attribute inherit_all { "true" | "false" }, # Should we overwrite the target field if it exists? attribute override_target { "true" | "false" }, # ignore of uniqueness tracking attribute ignore { text }?, # Default inherit_all and override_target settings for entrytype source/target pairs element type_pair { attribute source { "*" | xsd:string {minLength="1"}}, attribute target { "*" | xsd:string {minLength="1"}}, attribute inherit_all { "true" | "false" }?, attribute override_target { "true" | "false" }?, attribute ignore { text }?, empty }* }, # An inheritance specification element inherit { # ignore of uniqueness tracking attribute ignore { text }?, # applies to these pairs of source/target entrytypes element type_pair { attribute source { "*" | xsd:string {minLength="1"}}, attribute target { "*" | xsd:string {minLength="1"}}, empty }+, # and here are the field specifications element field { ( # either a "skip this field" specification # so we can say inherit all except certain fields OR ... (attribute source { xsd:string }, attribute skip { "true" | "false" }) | # ... a source and target field with an optional override attribute (attribute source { xsd:string {minLength="1"}}, attribute target { xsd:string {minLength="1"}}, attribute override_target { "true" | "false" }?) ), empty }+ }* } map = element map { attribute map_overwrite { "0" | "1" }?, attribute map_foreach { xsd:string {minLength="1"} }?, attribute refsection { xsd:integer }?, element per_datasource { xsd:string {minLength="1"} }*, element per_type { xsd:string {minLength="1"} }*, element map_step { ( ( attribute map_entry_clone { xsd:string {minLength="1"} } ) | ( attribute map_entry_new { xsd:string {minLength="1"} }, attribute map_entry_newtype { xsd:string {minLength="1"} } ) | ( attribute map_type_source { xsd:string {minLength="1"} }?, attribute map_type_target { xsd:string {minLength="1"} }?, attribute map_field_source { xsd:string {minLength="1"} }?, attribute map_notfield { xsd:string {minLength="1"} }?, attribute map_field_target { xsd:string {minLength="1"} }?, attribute map_entrytarget { xsd:string {minLength="1"} }?, attribute map_field_set { xsd:string {minLength="1"} }?, attribute map_entry_null { "1" }?, attribute map_append { "1" }?, attribute map_final { "1" }?, attribute map_match { xsd:string {minLength="1"} }?, attribute map_notmatch { xsd:string {minLength="1"} }?, attribute map_replace { xsd:string }?, ( attribute map_null { "1" } | attribute map_origfield { "1" } | attribute map_origfieldval { "1" } | attribute map_origentrytype { "1" } | attribute map_field_value { xsd:string {minLength="1"} } )? ) ), empty }+ } labelalphanametemplate = element labelalphanametemplate { attribute name { xsd:string }?, element namepart { attribute order { xsd:integer }, attribute use { "0" | "1" }?, attribute pre { "0" | "1" }?, attribute substring_width { xsd:integer }?, attribute substring_compound { "0" | "1" }?, attribute substring_side { "left" | "right" }?, text }+ } labelalphatemplate = element labelalphatemplate { attribute type { xsd:string }?, # per-type? element labelelement { attribute order { xsd:integer }, element labelpart { attribute final { "0" | "1" }?, attribute pad_char { xsd:string {minLength="1"}}?, attribute pad_side { "left" | "right" }?, attribute substring_width { xsd:integer | "v" | "vf" | "l" }?, attribute substring_fixed_threshold { xsd:integer }?, attribute substring_width_max { xsd:integer }?, attribute substring_side { "left" | "right" }?, attribute ifnames { text }?, attribute names { text }?, attribute namessep { string }?, attribute noalphaothers { "0" | "1" }?, xsd:string }+ }+ } uniquenametemplate = element uniquenametemplate { attribute name { xsd:string {minLength="1"} }, element namepart { attribute order { xsd:integer }, attribute use { "0" | "1" }?, attribute base { "0" | "1" }?, attribute context { "none" | "init" | "initorfull" | "full" }?, text }+ } sortingnamekeytemplate = element sortingnamekeytemplate { attribute name { text }, element keypart { attribute order { xsd:integer }, element part { attribute type { "namepart" | "literal" }, attribute order { xsd:integer }, attribute use { "0" | "1" }?, attribute inits { "0" | "1" }?, text }+ }+ } sortingtemplate = element sortingtemplate { # sorting template name attribute name { xsd:string {minLength="1"}}, # locale for entire sorting specification attribute locale { xsd:string {minLength="1"}}?, sort+ } sort = # sort specification element sort { # order of this specification in the set of all sort specifications attribute order { xsd:integer }, # Should we stop generating sorting information after this item? attribute final { "1" }?, # Sort ascending or descending attribute sort_direction { "ascending" | "descending" }?, # Sort case sensitive or not? attribute sortcase { "0" | "1" }?, # Sort upper before lower? attribute sortupper { "0" | "1" }?, # sortset specific override for locale attribute locale { xsd:string {minLength="1"}}?, # A sort item specification - a field or pseudo-field to get sort information from element sortitem { # order of this item in the set of all other item specifications attribute order { xsd:integer }, # Just use a part of the item information for sorting? attribute substring_side { "left" | "right" }?, attribute substring_width { xsd:integer }?, # Pad the item information when sorting with it? attribute pad_side { "left" | "right" }?, attribute pad_width { xsd:integer }?, attribute pad_char { xsd:string { minLength = "1" maxLength = "1" } }?, attribute form { "original" | "translated" | "romanised" | "uniform" }?, text }+ }+ dmfieldtype = "field" | "list" dmdatatype = "literal" | "name" | "key" | "entrykey" | "date" | "verbatim" | "integer" | "range" | "code" | "uri" | "datepart" | "keyword" | "option" # Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. # This code is free software. You can redistribute it and/or # modify it under the terms of the Artistic License 2.0. # This program is distributed in the hope that it will be useful, # but without any warranty; without even the implied warranty of # merchantability or fitness for a particular purpose. biblatex-biber-2.9/bin000755000153000001 013205066062 14251 5ustar00vboxother000000000000biblatex-biber-2.9/bin/biber000555000153000001 7520313205066062 15446 0ustar00vboxother000000000000#!/usr/bin/env perl use v5.24; use strict; use warnings; use constant { EXIT_OK => 0, EXIT_ERROR => 2 }; use Carp; use IPC::Cmd qw( can_run run ); use Log::Log4perl qw(:no_extra_logdie_message); use Log::Log4perl::Level; use POSIX qw(strftime); use Biber; use Biber::Utils; use File::Spec; use Pod::Usage; use List::AllUtils qw( first ); use Getopt::Long qw/:config no_ignore_case/; my $opts = {}; GetOptions( $opts, 'annotation_marker|annotation-marker=s', 'bibencoding=s', # legacy alias for input_encoding 'bblencoding=s', # legacy alias for output_encoding 'bblsafechars', # legacy alias for output_safechars 'bblsafecharsset=s', # legacy alias for output_safecharsset 'cache', 'clrmacros', 'collate_options|collate-options|c=s', 'configfile|g=s', 'convert_control|convert-control', 'debug|D', 'decodecharsset=s', 'dieondatamodel', 'dot_include|dot-include:s@', 'fastsort|f', # does nothing now 'fixinits', 'help|h|?', 'input_directory|input-directory=s', 'input_encoding|input-encodinge=s', 'input_format|input-format=s', 'isbn10', 'isbn13', 'isbn_normalise|isbn-normalise', 'listsep=s', 'logfile=s', 'mincrossrefs|m=s', 'namesep=s', 'no_bblxml_schema|no-bblxml-schema', 'no_bltxml_schema|no-bltxml-schema', 'noconf', 'nodieonerror', 'nolog', 'nostdmacros', 'onlylog', 'others_string|others-string=s', 'outfile=s', # legacy alias for output_file 'outformat=s', # legacy alias for output_format 'output_align|output-align', 'output_annotation_marker|output-annotation-marker=s', 'output_directory|output-directory=s', 'output_encoding|output-encoding|E=s', 'output_fieldcase|output-fieldcase=s', 'output_field_order|output-field-order=s', 'output_file|output-file|O=s', 'output_format|output-format=s', 'output_indent|output-indent=s', 'output_listsep|output-listsep=s', 'output_macro_fields|output-macro-fields=s', 'output_namesep|output-namesep=s', 'output_resolve|output-resolve', 'output_resolve_xdata|output-resolve-xdata', 'output_resolve_crossrefs|output-resolve-crossrefs', 'output_resolve_sets|output-resolve-sets', 'output_safechars|output-safechars', 'output_safecharsset|output-safecharsset=s', 'output_xname|output-xname', 'output_xnamesep|output-xnamesep=s', 'quiet|q+', 'recodedata=s', 'noskipduplicates', 'noxname', 'sortdebug', 'sortcase=s', 'sortlocale|l=s', 'sortupper=s', 'ssl-nointernalca', 'ssl-noverify-host', 'strip_comments|strip-comments', 'tool', 'tool_align|tool-align', # legacy alias for output_align 'tool_config|tool-config', 'tool_fieldcase|tool-fieldcase=s', # legacy alias for output_fieldcase 'tool_indent|tool-indent=s', # legacy alias for output_indent 'tool_macro_fields|tool-macro-fields=s', # legacy alias for output_macro_fields 'tool_resolve|tool-resolve', # legacy alias for output_resolve 'trace|T', 'u', # alias for input_encoding=UTF-8 'U', # alias for output_encoding=UTF-8 'validate_bblxml|validate-bblxml', 'validate_bltxml|validate-bltxml', 'validate_config|validate-config', 'validate_control|validate-control', 'validate_datamodel|validate-datamodel|V', 'version|v', 'wraplines|w', 'xnamesep=s', 'xsvsep=s', ) or pod2usage(-verbose => 0, -exitval => EXIT_ERROR); # verbose > 1 uses external perldoc, this doesn't work with PAR::Packer binaries # so use "-noperldoc" to use built-in POD::Text if (exists $opts->{'help'}) { pod2usage(-verbose => 2, -noperldoc => 1, -exitval => EXIT_OK); } if (exists $opts->{'version'}) { my $v = "biber version: $Biber::Config::VERSION"; $v .= ' (beta)' if $Biber::Config::BETA_VERSION; say "$v"; exit EXIT_OK; } # Show location of PAR::Packer cache if (exists $opts->{'cache'}) { if (my $cache = $ENV{PAR_TEMP}) { $cache =~ s|//|/|og; # Sanitise path in case it worries people say $cache; } else { say "No cache - you are not running the PAR::Packer executable version of biber"; } exit EXIT_OK; } # Show location of default tool mode config file and exit if (exists $opts->{'tool_config'}) { (my $vol, my $dir, undef) = File::Spec->splitpath( $INC{"Biber/Config.pm"} ); $dir =~ s/\/$//; # splitpath sometimes leaves a trailing '/' say File::Spec->catpath($vol, "$dir", 'biber-tool.conf'); exit EXIT_OK; } # Catch this situation early unless (@ARGV) { pod2usage(-verbose => 0, -exitval => EXIT_ERROR); } # Resolve some option shortcuts and legacy aliases if (my $o = $opts->{tool_align}) { $opts->{output_align} = $o; delete $opts->{tool_align}; } if (my $o = $opts->{tool_fieldcase}) { $opts->{output_fieldcase} = $o; delete $opts->{tool_fieldcase}; } if (my $o = $opts->{tool_indent}) { $opts->{output_indent} = $o; delete $opts->{tool_indent}; } if (my $o = $opts->{tool_macro_fields}) { $opts->{output_macro_fields} = $o; delete $opts->{tool_macro_fields}; } if (my $o = $opts->{tool_resolve}) { $opts->{output_resolve} = $o; delete $opts->{tool_resolve}; } if (my $o = $opts->{bibencoding}) { $opts->{input_encoding} = $o; delete $opts->{bibencoding}; } if (my $o = $opts->{bblencoding}) { $opts->{output_encoding} = $o; delete $opts->{bblencoding}; } if (my $o = $opts->{bblsafechars}) { $opts->{output_safechars} = $o; delete $opts->{bblsafechars}; } if (my $o = $opts->{bblsafecharsset}) { $opts->{output_safecharsset} = $o; delete $opts->{bblsafecharsset}; } if (my $o = $opts->{outfile}) { $opts->{output_file} = $o; delete $opts->{outfile}; } if (my $o = $opts->{outformat}) { $opts->{output_format} = $o; delete $opts->{outformat}; } if ($opts->{u}) { $opts->{input_encoding} = 'UTF-8'; delete $opts->{u}; } if ($opts->{U}) { $opts->{output_encoding} = 'UTF-8'; delete $opts->{U}; } # Break up resolve meta-option if (exists($opts->{output_resolve})) { $opts->{output_resolve_xdata} = 1; $opts->{output_resolve_crossrefs} = 1; $opts->{output_resolve_sets} = 1; delete $opts->{output_resolve}; } # Check the output_format option if (my $of = $opts->{output_format}) { unless ($opts->{output_format} =~ /\A(?:bbl|dot|bibtex|biblatexml|bblxml)\z/xms) { say STDERR "Biber: Unknown output format '$of', must be one of 'bbl', 'dot', 'bibtex', 'biblatexml', 'bblxml'"; exit EXIT_ERROR; } } # Auto-detect input-format from extension if not given if (exists($opts->{tool}) and not exists($opts->{input_format})) { if ($ARGV[0] =~ m/\.bib$/) { $opts->{input_format} = 'bibtex'; } elsif ($ARGV[0] =~ m/\.bltxml$/) { $opts->{input_format} = 'biblatexml'; } } # Check output-format value if (exists($opts->{tool}) and exists($opts->{output_format}) and $opts->{output_format} !~ /\A(?:bibtex|biblatexml)\z/xms) { say STDERR "Biber: Output format in tool mode must be one of 'bibtex' or 'biblatexml'"; exit EXIT_ERROR; } # Set default output format if (not exists($opts->{output_format})) { if (exists($opts->{tool})) { $opts->{output_format} = 'bibtex'; # default for tool mode is different } else { $opts->{output_format} = 'bbl'; # default for normal use } } # Check ISBN options if (exists($opts->{isbn10}) and exists($opts->{isbn13})) { say STDERR "Biber: Select only one of 'isbn10' or 'isbn13' but not both"; exit EXIT_ERROR; } # Check the tool_* options if (exists($opts->{output_indent}) and $opts->{output_indent} !~ /^\d+$/) { say STDERR "Biber: Invalid non-numeric argument for 'output_indent' option!"; exit EXIT_ERROR; } if (exists($opts->{output_fieldcase}) and $opts->{output_fieldcase} !~ /^(?:upper|lower|title)$/i) { say STDERR "Biber: Invalid argument for 'output_fieldcase' option - must be one of 'upper', 'lower' or 'title'!"; exit EXIT_ERROR; } # Check the dot_include option if (exists($opts->{dot_include}) and (not exists($opts->{output_format}) or (exists($opts->{output_format}) and $opts->{output_format} ne 'dot'))) { say STDERR "Biber: DOT output format specified but output format is not DOT!"; exit EXIT_ERROR; } if (exists($opts->{dot_include})) { $opts->{dot_include} = {map {lc($_) => 1} split(/,/,join(',',@{$opts->{dot_include}}))}; my @suboptions = ( 'section', 'field', 'crossref', 'xref', 'xdata', 'related' ); foreach my $g (keys $opts->{dot_include}->%*) { unless (first {$_ eq lc($g)} @suboptions) { say STDERR "Biber: '$g' is an invalid output type for DOT output"; exit EXIT_ERROR; } } } # Check input_format option if (exists($opts->{input_format}) and not exists($opts->{tool}) ) { say STDERR "Biber: 'input_format' option is only valid in tool mode"; exit EXIT_ERROR; } if (exists($opts->{input_format}) and $opts->{input_format} !~ /^(?:bibtex|biblatexml|)$/i) { say STDERR 'Biber: ' . $opts->{input_format} . ' is an invalid input format in tool mode'; exit EXIT_ERROR; } # Create Biber object, passing command-line options my $biber = Biber->new($opts->%*); # get the logger object my $logger = Log::Log4perl::get_logger('main'); my $screen = Log::Log4perl::get_logger('screen'); my $logfile = Log::Log4perl::get_logger('logfile'); my $outfile; my $time_string = strftime "%a %b %e, %Y, %H:%M:%S", localtime; $logfile->info("=== $time_string"); my $bcf = Biber::Config->getoption('bcf'); if (Biber::Config->getoption('output_file')) { $outfile = Biber::Config->getoption('output_file') } else { if (Biber::Config->getoption('tool')) { if (Biber::Config->getoption('output_format') eq 'bibtex') { # tool .bib output $outfile = $ARGV[0] =~ s/\..+$/_bibertool.bib/r; } elsif (Biber::Config->getoption('output_format') eq 'biblatexml') { # tool .blxtxml output $outfile = $ARGV[0] =~ s/\..+$/_bibertool.bltxml/r; } } else { if (Biber::Config->getoption('output_format') eq 'dot') { # .dot output $outfile = $bcf =~ s/bcf$/dot/r; } elsif (Biber::Config->getoption('output_format') eq 'bibtex') { # bibtex output $outfile = $bcf =~ s/\..+$/_biber.bib/r; } elsif (Biber::Config->getoption('output_format') eq 'bbl') { # bbl output $outfile = $bcf =~ s/bcf$/bbl/r; } elsif (Biber::Config->getoption('output_format') eq 'bblxml') { # bblxml output $outfile = $bcf =~ s/bcf$/bblxml/r; } else { say "output_format option '" . Biber::Config->getoption('output_format') . "' only makes sense in tool mode (--tool)"; exit EXIT_ERROR; } } } # Set the .bbl path to the output dir, if specified if (my $outdir = Biber::Config->getoption('output_directory')) { my (undef, undef, $file) = File::Spec->splitpath($outfile); $outfile = File::Spec->catfile($outdir, $file) } # Set the output class. Should be a subclass of Biber::Output::base my $package = 'Biber::Output::' . Biber::Config->getoption('output_format'); eval "require $package" or biber_error("Error loading data source package '$package': $@"); $biber->set_output_obj(eval "${package}->new()"); # Get reference to output object my $biberoutput = $biber->get_output_obj; # Set the output filename and get ref to output object This has to come # before .bcf parsing so that we can detect .bcf parsing errors # early and clean up $biberoutput->set_output_target_file($outfile); # Fake some necessary .bcf parts if in tool mode if (Biber::Config->getoption('tool')) { $biber->tool_mode_setup; } else { # parse the .bcf control file $biber->parse_ctrlfile($bcf); } # Reset output filename now we have the output coding from the .bcf # because set_output_target_file() sets output encoding from information in .bcf my $outfileobj = $biberoutput->set_output_target_file($outfile, 1); # Postprocess biber options now that they are all read from the various places Biber::Config->postprocess_biber_opts; # Set the output target obj # Must come after ctrlfile/option parsing otherwise output encoding is not set $biberoutput->set_output_target($outfileobj); # Check to see if the .bcf set debug=1. If so, increase logging level # We couldn't set this on logger init as the .bcf hadn't been read then if (Biber::Config->getoption('debug')) { $logger->level($DEBUG); } if (Biber::Config->getoption('trace')) { $logger->trace("\n###########################################################\n", "############# Dump of initial config object: ##############\n", Data::Dump::pp($Biber::Config::CONFIG), "\n", "############# Dump of initial biber object: ###############\n", $biber->_stringdump, "\n###########################################################") } # Do all the real work Biber::Config->getoption('tool') ? $biber->prepare_tool : $biber->prepare; if (Biber::Config->getoption('trace')) { $logger->trace("\n###########################################################\n", "############# Dump of final config object: ################\n", Data::Dump::pp($Biber::Config::CONFIG), "\n", "############# Dump of final biber object: #################\n", $biber->_stringdump, "\n###########################################################") } # Write the output to the target $biberoutput->output; $biber->display_problems; exit EXIT_OK; __END__ =pod =encoding utf8 =head1 NAME C - A bibtex replacement for users of biblatex =head1 SYNOPSIS biber [options] file[.bcf] biber [options] --tool Creates "file.bbl" using control file "file.bcf" (".bcf" extension is optional). Normally use with biblatex requires no options as they are all set in biblatex and passed via the ".bcf" file In "tool" mode (see B<--tool> option), takes a datasource (defaults to "bibtex" datasource) and outputs a copy of the datasource with any command-line or config file options applied. Please run "biber --help" for option details =head1 DESCRIPTION C provides a replacement of the bibtex processor for users of biblatex. =head1 OPTIONS =over 4 =item B<--annotation-marker=[marker]> Sets the suffix which can be appended to a BibTeX data source field name to indicate that the value of the field is a data annotation. The default is C<+an>. =item B<--cache> If running as a PAR::Packer binary, show the cache location and exit. =item B<--clrmacros> Clears any BibTeX macros (@STRING) between BibLaTeX refsections. This prevents BibTeX warnings about macro redefinitions if you are using the same datasource several times for different refsections. =item B<--collate-options|-c [options]> Options to pass to the C object used for sorting (default is 'level => "4", variable => "non-ignorable"'). See C for details. =item B<--configfile|-g [file]> Use F as configuration file for C. The default is the first file found among F in the current directory, C<$HOME/.biber.conf>, or else the output of C. In tool mode, (B<--tool>) the F installed with Biber is always used to set default options if a user-defined config file is not specified. Use the B<--tool-config> option to view the location of the default tool mode config file, copy this file and edit it to your requirements for use with this option. The options in the default config file reflect the options set by biblatex by default. =item B<--convert-control> Converts the F<.bcf> control file into html using an XSLT transform. Can be useful for debugging. File is named by appending C<.html> to F<.bcf> file. =item B<--decodecharsset=[recode set name]> The set of characters included in the conversion routine when decoding LaTeX macros into UTF-8 (which happens when B<--bblencoding|-E> is set to UTF-8). Set to "full" to try harder with a much larger set or "base" to use a smaller basic set. Default is "base". You may want to try "full" if you have less common UTF-8 characters in your data source. The recode sets are defined in the reencoding data file which can be customised. See the --recodedata option and the PDF manual. The virtual set name "null" may be specified which effectively turns off macro decoding. =item B<--debug|-D> Turn on debugging for C. =item B<--dieondatamodel> Exit immediately with error if using C<--validate-datamodel> and a datamodel validation error is found. Default is to warn and continue. =item B<--dot-include=section,field,xdata,crossref,xref,related> Specifies the element to include in GraphViz DOT output format if the output format is 'dot'. You can also choose to display crossref, xref, xdata and/or related entry connections. The default if not specified is C<--dot_include=section,xdata,crossref,xref>. =item B<--fixinits> Try to fix broken multiple initials when they have no space between them in BibTeX data sources. That is, "A.B. Clarke" becomes "A. B. Clarke" before name parsing. This can slightly mess up things like "{U.K. Government}" and other esoteric cases. =item B<--help|-h> Show this help message. =item B<--input-directory [directory]> F<.bcf> and data files will be looked for first in the F. See the biber PDF documentation for the other possibilities and how this interacts with the C<--output_directory> option. =item B<--input-encoding|-e [encoding]> Specify the encoding of the data source file(s). Default is "UTF-8" Normally it's not necessary to set this as it's passed via the .bcf file from biblatex's C option. See "perldoc Encode::Supported" for a list of supported encodings. The legacy option B<--bibencoding> is supported as an alias. =item B<--input-format=bibtex|biblatexml> Biber input format. This option only means something in tool mode (see B option) since normally the input format of a data source is specified in the F<.bcf> file and therefore from the B<\addbibresouce> macro in BibLaTeX. The default value when in tool mode is 'bibtex' =item B<--isbn10> Force all ISBNs to 10-digit versions on output. This will convert the ISBN internally to an ISBN object which will not have hyphens on output. If you use this option and want an ISBN with hyphens in the correct place on output, use the B<--isbn-normalise> option. =item B<--isbn13> Force all ISBNs to 13-digit versions on output. This will convert the ISBN internally to an ISBN object which will not have hyphens on output. If you use this option and want an ISBN with hyphens in the correct place on output, use the B<--isbn-normalise> option. =item B<--isbn-normalise> Normalise ISBNs with hyphens in the correct places on output. =item B<--logfile [file]> Use F as the name of the logfile. =item B<--listsep=[sep]> Use F as the separator for BibTeX data source list fields. Defaults to BibTeX's usual 'and'. =item B<--mincrossrefs|-m [number]> Set threshold for crossrefs. =item B<--namesep=[sep]> Use C as the separator for BibTeX data source name fields. Defaults to BibTeX's usual 'and'. =item B<--no-bblxml-schema> When writing bblxml output, don't generate an RNG XML schema from the data model. =item B<--no-bltxml-schema> When reading or writing biblatexml data sources, don't generate an RNG XML schema from the data model. =item B<--noconf> Don't look for a configfile. =item B<--nodieonerror> Don't exit on errors, just log and continue as far as possible. This can be useful if the error is something from, for example, the underlying BibTeX parsing C library which can complain about parsing errors which can be ignored. =item B<--nolog> Do not write any logfile. =item B<--nostdmacros> Don't automatically define any standard macros like month abbreviations. If you also define these yourself, this option can be used to suppress macro redefinition warnings. =item B<--noxname> Disable exended name processing in bibtex data sources. Can be useful if you don't use this and it causes problems due to auto-detection of extended name format. =item B<--onlylog> Do not write any message to screen. =item B<--others-string=[string]> Use F as the final name in a name field which implies "et al". Defaults to BibTeX's usual 'others'. =item B<--output-align> Align field values in neat columns in output. Effect depends on the output format. Default is false. The legacy option B<--tool_align> is supported as an alias. =item B<--output-annotation-marker=[marker]> As B<--annotation-marker> but for tool mode bibtex output. The default is C<+an>. =item B<--output-directory [directory]> Output files (including log files) are output to F instead of the current directory. Input files are also looked for in F before current directory (but after C<--input_directory> if that is specified). =item B<--output-encoding|-E [encoding]> Specify the encoding of the output C<.bbl> file. Default is "UTF-8". Normally it's not necessary to set this as it's passed via the .bcf file from biblatex's C option. See C for a list of supported encodings. The legacy option B<--bblencoding> is supported as an alias. =item B<--output-indent=[num]> Indentation for body of entries in output. Effect depends on the output format. Defaults to 2. The legacy option B<--tool_indent> is supported as an alias. =item B<--output-fieldcase=upper|lower|title> Case for field names output. Effect depends on the output format. Defaults to 'upper'. The legacy option B<--tool_fieldcase> is supported as an alias. =item B<--output-field-order=[field1, ... fieldn]> When outputting bibtex format data in tool mode, this option allows the customisation of the order of fields within entries. The value is a comma-separated string of field names or classes of fields. Fields not mentioned in the list are output in sorted name order after the explicitly specified fields. The classes of fields are: 'names' - All name list fields 'lists' - All non-name list fields 'dates' - All date fields By default, its value is 'options,abstract,names,lists,dates'. =item B<--output-file|-O [file]> Output to F instead of F F is relative to B<--output_directory>, if set (absolute paths in this case are stripped to filename only). F can be absolute if B<--output_directory> is not set. F can be '-' to output directly to STDOUT. The legacy option B<--outfile> is supported as an alias. =item B<--output-format=dot|bibtex|biblatexml|bbl|bblxml> Biber output format. Default if not specified is of course, F. Use F to output a GraphViz DOT file instead of F<.bbl>. This is a directed graph of the bibliography data showing entries and, as requested, sections and fields. You must process this file with C, e.g. C to render the graph. See the B<--dot_include> option to select what is included in the DOT output. F is an XML version of the F format which you could transform using XSLT. By default, when outputting F, a RelaxNG XML schema is generated from the active data modeal and saved with a F extension along with the output file name (unless the B<--no-bblxml-schema> option is specified). You may validate the F using the schema with the B<--validate-bblxml> option. The legacy option B<--outformat> is supported as an alias. =item B<--output-listsep=[sep]> As B<--listsep> but for tool mode bibtex output. Defaults to BibTeX's usual 'and'. =item B<--output-macro-fields=[field1, ... fieldn]> A comma-separated list of field names whose values are, on output, treated as BibTeX macros. Effectively this means that they are not wrapped in braces. Effect depends on the output format. The legacy option B<--tool_macro_fields> is supported as an alias. =item B<--output-namesep=[sep]> As B<--namesep> but for tool mode bibtex output. Defaults to BibTeX's usual 'and'. =item B<--output-resolve> Convenience option to set all of the B<--output-resolve-*> options to 'true'. The legacy option B<--tool-resolve> is supported as an alias. =item B<--output-resolve-xdata> Whether to resolve XDATA inheritance in tool mode. Defaults to 'false'. =item B<--output-resolve-crossrefs> Whether to resolve CROSSREF/XREF inheritance in tool mode. Defaults to 'false'. =item B<--output-resolve-sets> Whether to resolve data sets in tool mode. Defaults to 'false'. =item B<--output-safechars> Try to convert UTF-8 chars into LaTeX macros when writing the output. This can prevent unknown char errors when using PDFLaTeX and inputenc as this doesn't understand all of UTF-8. Note, it is better to switch to XeTeX or LuaTeX to avoid this situation. By default uses the --output_safecharsset "base" set of characters. The legacy option B<--bblsafechars> is supported as an alias. =item B<--output-safecharsset=[recode set name]> The set of characters included in the conversion routine for --output_safechars. Set to "full" to try harder with a much larger set or "base" to use a basic set. Default is "base" which is fine for most use cases. You may need to load more macro packages to deal with the results of "full" (Dings, Greek characters, special symbols etc.). The recode sets are defined in the reencoding data file which can be customised. See the --recodedata option and the PDF manual. The legacy option B<--bblsafecharsset> is supported as an alias. The virtual set name "null" may be specified which effectively turns off macro encoding. =item B<--output-xname> When output is a .bib BibTeX file in tool mode, whether to output names the eXtended BibTeX name field format. =item B<--output-xnamesep=[sep]> As B<--xnamesep> but for tool mode bibtex output. Default is '='. =item B<--quiet|-q> Log only errors. If this option is used more than once, don't even log errors. =item B<--recodedata=[file]> The data file to use for the reencoding between UTF-8 and LaTeX macros. It defines the sets specified with the --output_safecharsset and --decodecharsset options. It defaults to F in the same directory as Biber's F module. See the PDF documentation for the format of this file. If this option is used, then F should be somewhere C can find it. =item B<--noskipduplicates> Don't skip duplicate bibliography keys if found. The detection of duplicate keys is done across all data sources. Sometimes you might need duplicates when using several data sources across several refsections in which case you might need to use this option. =item B<--sortdebug> Add comments to output with sorting keys. Useful for debugging. =item B<--sortcase=true|false> Case-sensitive sorting (default is true). =item B<--sortlocale|-l [locale]> Set the locale to be used for sorting. The locale is used to add CLDR tailoring to the sort (if available for the locale). =item B<--sortupper=true|false> Whether to sort uppercase before lowercase when sorting (default is true). =item B<--ssl-nointernalca> Don't try to use the default Mozilla CA certificates when using HTTPS to fetch remote data. This assumes that the user will set one of the perl LWP::UserAgent module environment variables to find the CA certs. =item B<--ssl-noverify-host> Turn off host verification when using HTTPS to fetch remote data sources. You may need this if the SSL certificate is self-signed for example. =item B<--strip-comments> In tool mode, strip all comments from the output file. =item B<--tool> Run in tool mode. This mode is datasource centric rather than document centric. biber reads a datasource (and a config file if specified), applies the command-line and config file options to the datasource and writes a new datasource. Essentially, this allows you to change your data sources using biber's transformation options (such as source mapping, sorting etc.) =item B<--tool-config> Show the location of the default tool mode config file and exit. Useful when you need to copy this file and customise it. =item B<--trace|T> Turn on tracing. Also turns on B<--debug|d> and additionally provides a lot of low-level tracing information in the log. =item B<-u> Alias for B<--input-encoding=UTF-8> =item B<-U> Alias for B<--output-encoding=UTF-8> =item B<--validate-bblxml> Schema validate bblXML output against a schema auto-generated from the BibLaTeX datamodel. The schema will be auto-generated with the name of the F<.bbl> file with a F<.rng> extension. The generated schema can be kept and used with standard XML editors to validate the output during XSL development. =item B<--validate-bltxml> Schema validate BibLaTeXML datasources against a schema auto-generated from the BibLaTeX datamodel. The schema will be auto-generated with the name of the F<.bcf> file with a F<.rng> extension. The generated schema can be kept and used with standard XML editors to validate the datasource during datasource development. The schema validation does not validate all semantic aspects of the datamodel (i.e. the data model constraints)---for this use the C<--validate-datamodel> option. =item B<--validate-config> Schema validate the biber config file. =item B<--validate-control> Schema validate the F<.bcf> biblatex control file. =item B<--validate-datamodel|-V> Validate the data against a data model. =item B<--version|-v> Display version number. =item B<--wraplines|-w> Wrap lines in the F<.bbl> file. =item B<--xnamesep=[sep]> Use F as the separator between namepart names and the namepart values in the eXtended name format. See biber docs. Default is '='. =item B<--xsvsep=[sep]> Use F as the separator for fields of format type "xsv" in the data model. A Perl regexp can be specified. Defaults to a single comma surround by optional whitespace (\s*,\s*). =back =head1 AUTHOR François Charette, CE<10> Philip Kime, C =head1 BUGS & DOCUMENTATION To see the full documentation, run B or get the F manual from SourceForge. Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib000755000153000001 013205066062 14247 5ustar00vboxother000000000000biblatex-biber-2.9/lib/Biber.pm000444000153000001 50162113205066062 16032 0ustar00vboxother000000000000package Biber; use v5.24; use strict; use warnings; use parent qw(Class::Accessor Biber::Internals); use constant { EXIT_OK => 0, EXIT_ERROR => 2 }; use Biber::Config; use Biber::DataLists; use Biber::DataList; use Biber::DataModel; use Biber::Constants; use Biber::Internals; use Biber::Entries; use Biber::Entry; use Biber::Entry::Names; use Biber::Entry::Name; use Biber::Sections; use Biber::Section; use Biber::LaTeX::Recode; use Biber::UCollate; use Biber::Utils; use Carp; use Data::Dump; use Data::Compare; use Encode; use File::Copy; use File::Slurper; use File::Spec; use File::Temp; use IO::File; use List::AllUtils qw( first uniq max first_index); use Log::Log4perl qw( :no_extra_logdie_message ); use POSIX qw( locale_h ); # for lc() use Scalar::Util qw(looks_like_number); use Sort::Key qw ( multikeysorter ); use Text::BibTeX qw(:macrosubs); use Unicode::Normalize; =encoding utf-8 =head1 NAME Biber - main module for biber, a bibtex replacement for users of biblatex =cut my $logger = Log::Log4perl::get_logger('main'); =head1 SYNOPSIS use Biber; my $biber = Biber->new(); $biber->parse_ctrlfile("example.bcf"); $biber->prepare; =cut our $MASTER; # reference to biber object. Needed all over the place =head1 METHODS =head2 new Initialize the Biber object, optionally passing named options as arguments. =cut sub new { my ($class, %opts) = @_; my $self = bless {}, $class; Biber::Config->_initopts(\%opts); # Add a reference to a global temp dir we might use for various things $self->{TEMPDIR} = File::Temp->newdir(); # Initialise recoding schemes Biber::LaTeX::Recode->init_sets(Biber::Config->getoption('decodecharsset'), Biber::Config->getoption('output_safecharsset')); $MASTER = $self; # Validate if asked to. # This has to be here, after config file is read and options # are parsed. It seems strange to validate the config file after it's been # read but there is no choice and it's useful anyway as this will catch some semantic # errors. Uses biber_error() and so $MASTER has to be defined before we call this if (Biber::Config->getoption('validate_config') and $opts{configfile}) { validate_biber_xml($opts{configfile}, 'config', ''); } return $self; } =head2 display_problems Output summary of warnings/errors before exit =cut sub display_problems { my $self = shift; if ($self->{warnings}) { $logger->info('WARNINGS: ' . $self->{warnings}); } if ($self->{errors}) { $logger->info('ERRORS: ' . $self->{errors}); exit EXIT_ERROR; } } =head2 biber_tempdir my $sections= $biber->biber_tempdir Returns a File::Temp directory object for use in various things =cut sub biber_tempdir { my $self = shift; return $self->{TEMPDIR}; } =head2 sections my $sections= $biber->sections Returns a Biber::Sections object describing the bibliography sections =cut sub sections { my $self = shift; return $self->{sections}; } =head2 add_sections Adds a Biber::Sections object. Used externally from, e.g. biber =cut sub add_sections { my ($self, $sections) = @_; $self->{sections} = $sections; return; } =head2 datalists my $datalists= $biber->datalists Returns a Biber::DataLists object describing the bibliography sorting lists =cut sub datalists { my $self = shift; return $self->{datalists}; } =head2 set_output_obj Sets the object used to output final results Must be a subclass of Biber::Output::base =cut sub set_output_obj { my $self = shift; my $obj = shift; croak('Output object must be subclass of Biber::Output::base!') unless $obj->isa('Biber::Output::base'); $self->{output_obj} = $obj; return; } =head2 get_preamble Returns the current preamble as an array ref =cut sub get_preamble { my $self = shift; return $self->{preamble}; } =head2 get_output_obj Returns the object used to output final results =cut sub get_output_obj { my $self = shift; return $self->{output_obj}; } =head2 set_current_section Sets the current section number that we are working on to a section number =cut sub set_current_section { my $self = shift; my $secnum = shift; $self->{current_section} = $secnum; return; } =head2 get_current_section Gets the current section number that we are working on =cut sub get_current_section { my $self = shift; return $self->{current_section}; } =head2 tool_mode_setup Fakes parts of the control file for tool mode =cut sub tool_mode_setup { my $self = shift; my $bib_sections = new Biber::Sections; # There are no sections in tool mode so create a pseudo-section my $bib_section = new Biber::Section('number' => 99999); $bib_section->set_datasources([{type => 'file', name => $ARGV[0], datatype => Biber::Config->getoption('input_format')}]); $bib_section->set_allkeys(1); $bib_sections->add_section($bib_section); # Always resolve date meta-information in tool mode Biber::Config->setblxoption('datecirca', 1); Biber::Config->setblxoption('dateera', 1); Biber::Config->setblxoption('dateuncertain', 1); # Add the Biber::Sections object to the Biber object $self->add_sections($bib_sections); my $datalists = new Biber::DataLists; my $seclist = Biber::DataList->new(section => 99999, sortingtemplatename => 'tool', sortingnamekeytemplatename => 'global', uniquenametemplatename => 'global', labelalphanametemplatename => 'global', labelprefix => '', name => 'tool/global//global/global'); $seclist->set_type('entry'); # Locale just needs a default here - there is no biblatex option to take it from Biber::Config->setblxoption('sortlocale', 'en_US'); if ($logger->is_debug()) {# performance tune $logger->debug("Adding 'entry' list 'tool' for pseudo-section 99999"); } $datalists->add_list($seclist); $self->{datalists} = $datalists; # User maps are set in config file and need some massaging which normally # happens in parse_ctrlfile if (my $usms = Biber::Config->getoption('sourcemap')) { # Force "user" level for the maps $usms->@* = map {$_->{level} = 'user';$_} $usms->@*; } return; } =head2 parse_ctrlfile This method reads the control file generated by biblatex to work out the various biblatex options. See Constants.pm for defaults and example of the data structure being built here. =cut sub parse_ctrlfile { my ($self, $ctrl_file) = @_; my $ctrl_file_path = locate_biber_file($ctrl_file); Biber::Config->set_ctrlfile_path($ctrl_file_path); biber_error("Cannot find control file '$ctrl_file'! - did you pass the \"backend=biber\" option to BibLaTeX?") unless ($ctrl_file_path and -e $ctrl_file_path); # Early check to make sure .bcf is well-formed. If not, this means that the last biblatex run # exited prematurely while writing the .bcf. This results is problems for latexmk. So, if the # .bcf is broken, just stop here, remove the .bcf and exit with error so that we don't write # a bad .bbl my $checkbuf; unless ($checkbuf = eval {File::Slurper::read_text($ctrl_file_path)}) { # Reading ctrl-file as UTF-8 failed. Probably it was written by fontenc as latin1 # with some latin1 char in it (probably a sourcemap), so try that as a last resort unless (eval {$checkbuf = File::Slurper::read_text($ctrl_file_path, 'latin1')}) { biber_error("$ctrl_file_path is not UTF-8 or even latin1, how horrible."); } } $checkbuf = NFD($checkbuf);# Unicode NFD boundary unless (eval "XML::LibXML->load_xml(string => \$checkbuf)") { my $output = $self->get_output_obj->get_output_target_file; unlink($output) unless $output eq '-';# ignore deletion of STDOUT marker biber_error("$ctrl_file_path is malformed, last biblatex run probably failed. Deleted $output"); } # Write ctrl file as UTF-8 File::Slurper::write_text($ctrl_file_path, NFC($checkbuf));# Unicode NFC boundary # Validate if asked to if (Biber::Config->getoption('validate_control')) { validate_biber_xml($ctrl_file_path, 'bcf', 'https://sourceforge.net/projects/biblatex'); } # Convert .bcf to .html using XSLT transform if asked to if (Biber::Config->getoption('convert_control')) { require XML::LibXSLT; require XML::LibXML; my $xslt = XML::LibXSLT->new(); my $CFstyle; # we assume that the schema files are in the same dir as Biber.pm: (my $vol, my $biber_path, undef) = File::Spec->splitpath( $INC{"Biber.pm"} ); # Deal with the strange world of PAR::Packer paths # We might be running inside a PAR executable and @INC is a bit odd in this case # Specifically, "Biber.pm" in @INC might resolve to an internal jumbled name # nowhere near to these files. You know what I mean if you've dealt with pp my $bcf_xsl; if ($biber_path =~ m|/par\-| and $biber_path !~ m|/inc|) { # a mangled PAR @INC path $bcf_xsl = File::Spec->catpath($vol, "$biber_path/inc/lib/Biber", 'bcf.xsl'); } else { $bcf_xsl = File::Spec->catpath($vol, "$biber_path/Biber", 'bcf.xsl'); } if (-e $bcf_xsl) { $CFstyle = XML::LibXML->load_xml( location => $bcf_xsl, no_cdata=>1 ) } else { biber_warn("Cannot find XML::LibXSLT stylesheet. Skipping conversion : $!"); goto LOADCF; } my $CF = XML::LibXML->load_xml(location => $ctrl_file_path); my $stylesheet = $xslt->parse_stylesheet($CFstyle); my $CFhtml = $stylesheet->transform($CF); $stylesheet->output_file($CFhtml, $ctrl_file_path . '.html'); $logger->info("Converted BibLaTeX control file '$ctrl_file_path' to '$ctrl_file_path.html'"); } # Open control file LOADCF: $logger->info("Reading '$ctrl_file_path'"); my $buf = File::Slurper::read_text($ctrl_file_path); $buf = NFD($buf);# Unicode NFD boundary # Read control file require XML::LibXML::Simple; my $bcfxml = XML::LibXML::Simple::XMLin($buf, 'ForceContent' => 1, 'ForceArray' => [ qr/\Acitekey\z/, qr/\Aoption\z/, qr/\Aoptions\z/, qr/\Avalue\z/, qr/\Asortitem\z/, qr/\Abibdata\z/, qr/\Adatasource\z/, qr/\Aconstant\z/, qr/\Asection\z/, qr/\Asort(?:ex|in)clusion\z/, qr/\A(?:ex|in)clusion\z/, qr/\Asort\z/, qr/\Amode\z/, qr/\Amaps\z/, qr/\Amap\z/, qr/\Amap_step\z/, qr/\Aper_type\z/, qr/\Aper_nottype\z/, qr/\Akeypart\z/, qr/\Apart\z/, qr/\Asortingnamekeytemplate\z/, qr/\Asortingtemplate\z/, qr/\Aper_datasource\z/, qr/\Anosort\z/, qr/\Amember\z/, qr/\Anoinit\z/, qr/\Anolabel\z/, qr/\Anolabelwidthcount\z/, qr/\Apresort\z/, qr/\Atype_pair\z/, qr/\Ainherit\z/, qr/\Anamepart\z/, qr/\Afieldor\z/, qr/\Afieldxor\z/, qr/\Afield\z/, qr/\Ascope\z/, qr/\Atransliteration\z/, qr/\Atranslit\z/, qr/\Aalias\z/, qr/\Aalsoset\z/, qr/\Aconstraints\z/, qr/\Aconstraint\z/, qr/\Aentrytype\z/, qr/\Adatetype\z/, qr/\Adatalist\z/, qr/\Alabel(?:part|element|alpha(?:name)?template)\z/, qr/\Auniquenametemplate\z/, qr/\Acondition\z/, qr/\Afilter(?:or)?\z/, qr/\Aoptionscope\z/, ], 'NsStrip' => 1, 'KeyAttr' => []); # use Data::Dump;dd($bcfxml);exit 0; my $controlversion = $bcfxml->{version}; my $bltxversion = $bcfxml->{bltxversion}; Biber::Config->setblxoption('controlversion', $controlversion); unless ($controlversion eq $BCF_VERSION) { biber_error("Error: Found biblatex control file version $controlversion, expected version $BCF_VERSION.\nThis means that your biber ($Biber::Config::VERSION) and biblatex ($bltxversion) versions are incompatible.\nSee compat matrix in biblatex or biber PDF documentation."); } # Option scope foreach my $bcfscopeopts ($bcfxml->{optionscope}->@*) { my $scope = $bcfscopeopts->{type}; foreach my $bcfscopeopt ($bcfscopeopts->{option}->@*) { my $opt = $bcfscopeopt->{content}; $CONFIG_OPTSCOPE_BIBLATEX{$opt}{$scope} = 1; $CONFIG_SCOPEOPT_BIBLATEX{$scope}{$opt} = 1; if (defined($CONFIG_OPTTYPE_BIBLATEX{$opt}) and lc($CONFIG_OPTTYPE_BIBLATEX{$opt}) ne lc($bcfscopeopt->{datatype})) { biber_warn("Warning: Datatype for biblatex option '$opt' has conflicting values, probably at different scopes. This is not supported."); } else { $CONFIG_OPTTYPE_BIBLATEX{$opt} = lc($bcfscopeopt->{datatype}); } } } # Now we have the per-namelist options, make the accessors for them in the Names package foreach my $nso (keys $CONFIG_SCOPEOPT_BIBLATEX{NAMELIST}->%*) { Biber::Entry::Names->follow_best_practice; Biber::Entry::Names->mk_accessors($nso); } # Now we have the per-name options, make the accessors for them in the Name package foreach my $no (keys $CONFIG_SCOPEOPT_BIBLATEX{NAME}->%*) { Biber::Entry::Name->follow_best_practice; Biber::Entry::Name->mk_accessors($no); } # OPTIONS foreach my $bcfopts ($bcfxml->{options}->@*) { # Biber options if ($bcfopts->{component} eq 'biber') { # Global options if ($bcfopts->{type} eq 'global') { foreach my $bcfopt ($bcfopts->{option}->@*) { # unless already explicitly set from cmdline/config file unless (Biber::Config->isexplicitoption($bcfopt->{key}{content})) { if ($bcfopt->{type} eq 'singlevalued') { Biber::Config->setoption($bcfopt->{key}{content}, $bcfopt->{value}[0]{content}); } elsif ($bcfopt->{type} eq 'multivalued') { Biber::Config->setoption($bcfopt->{key}{content}, [ map {$_->{content}} sort {$a->{order} <=> $b->{order}} $bcfopt->{value}->@* ]); } } } } } # BibLaTeX options if ($bcfopts->{component} eq 'biblatex') { # Global options if ($bcfopts->{type} eq 'global') { foreach my $bcfopt ($bcfopts->{option}->@*) { if ($bcfopt->{type} eq 'singlevalued') { Biber::Config->setblxoption($bcfopt->{key}{content}, $bcfopt->{value}[0]{content}); } elsif ($bcfopt->{type} eq 'multivalued') { # sort on order attribute and then remove it Biber::Config->setblxoption($bcfopt->{key}{content}, [ map {delete($_->{order}); $_} sort {$a->{order} <=> $b->{order}} $bcfopt->{value}->@* ]); } } } # Entrytype options else { my $entrytype = $bcfopts->{type}; foreach my $bcfopt ($bcfopts->{option}->@*) { if ($bcfopt->{type} eq 'singlevalued') { Biber::Config->setblxoption($bcfopt->{key}{content}, $bcfopt->{value}[0]{content}, 'ENTRYTYPE', $entrytype); } elsif ($bcfopt->{type} eq 'multivalued') { # sort on order attribute and then remove it Biber::Config->setblxoption($bcfopt->{key}{content}, [ map {delete($_->{order}); $_} sort {$a->{order} <=> $b->{order}} $bcfopt->{value}->@* ], 'ENTRYTYPE', $entrytype); } } } } } # DATAFIELD SETS # Since we have to use the datamodel to resolve some members, just record the settings # here for processing after the datamodel is parsed foreach my $s ($bcfxml->{datafieldset}->@*) { my $name = lc($s->{name}); foreach my $m ($s->{member}->@*) { if (my $field = $m->{field}[0]) {# 'field' has forcearray for other things push $DATAFIELD_SETS{$name}->@*, $field; } else { push $DATAFIELD_SETS{$name}->@*, {fieldtype => $m->{fieldtype}, datatype => $m->{datatype}}; } } } # DATASOURCE MAPPING # This is special as it's both a biblatex option and a biber option # We merge into the biber option # In biblatex you can set driver mappings but not in biber # Order of application of maps is decided by the level and within 'user' level, # which can come from two places (biber.conf and \DeclareSourcemap), order is # \DeclareSourcemap, then biber.conf if (exists($bcfxml->{sourcemap})) { # User maps are set in config file if (my $usms = Biber::Config->getoption('sourcemap')) { # Force "user" level for the maps $usms->@* = map {$_->{level} = 'user';$_} $usms->@*; # Merge any user maps from the document set by \DeclareSourcemap into user # maps set in the biber config file. These document user maps take precedence so go # at the front of any other user maps # Are there any doc maps to merge? if (my @docmaps = grep {$_->{level} eq 'user'} $bcfxml->{sourcemap}{maps}->@*) { # If so, get a reference to the maps in the config map and prepend all # of the doc maps to it. Must also deref the doc maps map element to make # sure that they collapse nicely my $configmaps = first {$_->{level} eq 'user'} $usms->@*; unshift($configmaps->{map}->@*, map {$_->{map}->@*} @docmaps); } # Merge the driver/style maps with the user maps from the config file if (my @m = grep {$_->{level} eq 'driver' or $_->{level} eq 'style'} $bcfxml->{sourcemap}{maps}->@* ) { Biber::Config->setoption('sourcemap', [$usms->@*, @m]); } else { # no driver defaults, just override the config file user map settings Biber::Config->setoption('sourcemap', $bcfxml->{sourcemap}{maps}); } } else { # just write the option as there are no config file settings at all Biber::Config->setoption('sourcemap', $bcfxml->{sourcemap}{maps}); } } # LABELALPHA NAME TEMPLATE my $lants; foreach my $t ($bcfxml->{labelalphanametemplate}->@*) { my $lant; foreach my $np (sort {$a->{order} <=> $b->{order}} $t->{namepart}->@*) { push $lant->@*, {namepart => $np->{content}, use => $np->{use}, pre => $np->{pre}, substring_compound => $np->{substring_compound}, substring_side => $np->{substring_side}, substring_width => $np->{substring_width}}; } $lants->{$t->{name}} = $lant; } Biber::Config->setblxoption('labelalphanametemplate', $lants); # LABELALPHA TEMPLATE foreach my $t ($bcfxml->{labelalphatemplate}->@*) { my $latype = $t->{type}; if ($latype eq 'global') { Biber::Config->setblxoption('labelalphatemplate', $t); } else { Biber::Config->setblxoption('labelalphatemplate', $t, 'ENTRYTYPE', $latype); } } # EXTRADATE specification my $ed; foreach my $scope ($bcfxml->{extradatespec}->{scope}->@*) { my $fields; foreach my $field (sort {$a->{order} <=> $b->{order}} $scope->{field}->@*) { push $fields->@*, $field->{content}; } push $ed->@*, $fields; } Biber::Config->setblxoption('extradatespec', $ed); # INHERITANCE schemes for crossreferences (always global) Biber::Config->setblxoption('inheritance', $bcfxml->{inheritance}); # NOINIT # Make the data structure look like the biber config file structure # "value" is forced to arrays for other elements so we extract # the first element here as they will always be only length=1 my $noinit; foreach my $ni ($bcfxml->{noinits}{noinit}->@*) { push $noinit->@*, { value => $ni->{value}[0]}; } # There is a default so don't set this option if nothing is in the .bcf Biber::Config->setoption('noinit', $noinit) if $noinit; # NOLABEL # Make the data structure look like the biber config file structure # "value" is forced to arrays for other elements so we extract # the first element here as they will always be only length=1 my $nolabel; foreach my $nl ($bcfxml->{nolabels}{nolabel}->@*) { push $nolabel->@*, { value => $nl->{value}[0]}; } # There is a default so don't set this option if nothing is in the .bcf Biber::Config->setoption('nolabel', $nolabel) if $nolabel; # NOLABELWIDTHCOUNT # Make the data structure look like the biber config file structure # "value" is forced to arrays for other elements so we extract # the first element here as they will always be only length=1 my $nolabelwidthcount; foreach my $nlwc ($bcfxml->{nolabelwidthcounts}{nolabelwidthcount}->@*) { push $nolabelwidthcount->@*, { value => $nlwc->{value}[0]}; } # There is a default so don't set this option if nothing is in the .bcf Biber::Config->setoption('nolabelwidthcount', $nolabelwidthcount) if $nolabelwidthcount; # NOSORT # Make the data structure look like the biber config file structure # "field" and "value" are forced to arrays for other elements so we extract # the first element here as they will always be only length=1 my $nosort; foreach my $ns ($bcfxml->{nosorts}{nosort}->@*) { push $nosort->@*, {name => $ns->{field}[0], value => $ns->{value}[0]}; } # There is a default so don't set this option if nothing is in the .bcf Biber::Config->setoption('nosort', $nosort) if $nosort; # UNIQUENAME TEMPLATE my $unts; foreach my $unt ($bcfxml->{uniquenametemplate}->@*) { my $untval = []; foreach my $np (sort {$a->{order} <=> $b->{order}} $unt->{namepart}->@*) { push $untval->@*, {namepart => $np->{content}, use => $np->{use}, disambiguation => $np->{disambiguation}, base => $np->{base}}; } $unts->{$unt->{name}} = $untval; } Biber::Config->setblxoption('uniquenametemplate', $unts); # SORTING NAME KEY # Use the order attributes to make sure things are in right order and create a data structure # we can use later my $snss; foreach my $sns ($bcfxml->{sortingnamekeytemplate}->@*) { my $snkps; foreach my $snkp (sort {$a->{order} <=> $b->{order}} $sns->{keypart}->@*) { my $snps; foreach my $snp (sort {$a->{order} <=> $b->{order}} $snkp->{part}->@*) { my $np; if ($snp->{type} eq 'namepart') { $np = { type => 'namepart', value => $snp->{content} }; if (exists($snp->{use})) { $np->{use} = $snp->{use}; } if (exists($snp->{inits})) { $np->{inits} = $snp->{inits}; } } elsif ($snp->{type} eq 'literal') { $np = { type => 'literal', value => $snp->{content} }; } push $snps->@*, $np; } push $snkps->@*, $snps; } $snss->{$sns->{name}} = $snkps; } Biber::Config->setblxoption('sortingnamekeytemplate', $snss); # SORTING # transliterations foreach my $tr ($bcfxml->{transliteration}->@*) { if ($tr->{entrytype}[0] eq '*') { # already array forced for another option Biber::Config->setblxoption('translit', $tr->{translit}); } else { # per_entrytype Biber::Config->setblxoption('translit', $tr->{translit}, 'ENTRYTYPE', $tr->{entrytype}[0]); } } # sorting excludes foreach my $sex ($bcfxml->{sortexclusion}->@*) { my $excludes; foreach my $ex ($sex->{exclusion}->@*) { $excludes->{$ex->{content}} = 1; } Biber::Config->setblxoption('sortexclusion', $excludes, 'ENTRYTYPE', $sex->{type}); } # sorting includes foreach my $sin ($bcfxml->{sortinclusion}->@*) { my $includes; foreach my $in ($sin->{inclusion}->@*) { $includes->{$in->{content}} = 1; } Biber::Config->setblxoption('sortinclusion', $includes, 'ENTRYTYPE', $sin->{type}); } # presort defaults foreach my $presort ($bcfxml->{presort}->@*) { # Global presort default unless (exists($presort->{type})) { Biber::Config->setblxoption('presort', $presort->{content}); } # Per-type default else { Biber::Config->setblxoption('presort', $presort->{content}, 'ENTRYTYPE', $presort->{type}); } } my $sortingtemplates; foreach my $ss ($bcfxml->{sortingtemplate}->@*) { $sortingtemplates->{$ss->{name}} = _parse_sort($ss); } Biber::Config->setblxoption('sortingtemplate', $sortingtemplates); # DATAMODEL schema (always global) Biber::Config->setblxoption('datamodel', $bcfxml->{datamodel}); # SECTIONS # This is also where we set data files as these are associated with a bib section # Data sources my %bibdatasources = (); foreach my $data ($bcfxml->{bibdata}->@*) { foreach my $datasource ($data->{datasource}->@*) { unless (first {$_->{type} eq $datasource->{type} and $_->{datatype} eq $datasource->{datatype} and $_->{name} eq $datasource->{content}} $bibdatasources{$data->{section}[0]}->@*) { push $bibdatasources{$data->{section}[0]}->@*, { type => $datasource->{type}, name => $datasource->{content}, datatype => $datasource->{datatype} }; } } } # Be friendly to latexmk etc. unless (%bibdatasources) { biber_warn("No data sources defined!"); exit EXIT_OK; } my $key_flag = 0; my $bib_sections = new Biber::Sections; SECTION: foreach my $section ($bcfxml->{section}->@*) { my $bib_section; my $secnum = $section->{number}; # Can be multiple section 0 entries and so re-use that section object if it exists if (my $existing_section = $bib_sections->get_section($secnum)) { $bib_section = $existing_section; } else { $bib_section = new Biber::Section('number' => $secnum); } # Set the data files for the section unless we've already done so # (for example, for multiple section 0 entries) $bib_section->set_datasources($bibdatasources{$secnum}) unless $bib_section->get_datasources; my @keys = (); foreach my $keyc ($section->{citekey}->@*) { my $key = NFD($keyc->{content});# Key is already UTF-8 - it comes from UTF-8 XML # Stop reading citekeys if we encounter "*" as a citation as this means # "all keys" if ($key eq '*') { $bib_section->set_allkeys(1); $key_flag = 1; # There is at least one key, used for error reporting below } elsif (not Biber::Config->get_seenkey($key, $secnum)) { # Dynamic set definition # Save dynamic key -> member keys mapping for set entry auto creation later # We still need to find these even if allkeys is set if (exists($keyc->{type}) and $keyc->{type} eq 'set') { $bib_section->set_dynamic_set($key, split /\s*,\s*/, $keyc->{members}); push @keys, $key; $key_flag = 1; # There is at least one key, used for error reporting below } else { next if $bib_section->is_allkeys; # Skip if we have already encountered '*' # Set order information - there is no order on dynamic key defs above # as they are a definition, not a cite Biber::Config->set_keyorder($secnum, $key, $keyc->{order}); push @keys, $key; $key_flag = 1; # There is at least one key, used for error reporting below Biber::Config->incr_seenkey($key, $secnum); } } } if ($bib_section->is_allkeys) { # Normalise - when allkeys is true don't need citekeys - just in case someone # lists "*" and also some other citekeys $bib_section->del_citekeys; $logger->info("Using all citekeys in bib section " . $secnum); } else { $logger->info('Found ', $#keys+1 , " citekeys in bib section $secnum"); } unless ($bib_section->is_allkeys) { if ($logger->is_debug()) { # performance shortcut $logger->debug("The citekeys for section $secnum are: ", join(', ', sort @keys), "\n"); } } $bib_section->add_citekeys(@keys) unless $bib_section->is_allkeys; $bib_sections->add_section($bib_section); } # Add the Biber::Sections object to the Biber object $self->{sections} = $bib_sections; # Read datalists my $datalists = new Biber::DataLists; foreach my $list ($bcfxml->{datalist}->@*) { my $ltype = $list->{type}; my $lstn = $list->{sortingtemplatename}; my $lsnksn = $list->{sortingnamekeytemplatename}; my $luntn = $list->{uniquenametemplatename}; my $llantn = $list->{labelalphanametemplatename}; my $lpn = $list->{labelprefix}; my $lname = $list->{name}; my $lsection = $list->{section}[0]; # because "section" needs to be a list elsewhere in XML if ($datalists->get_list(section => $lsection, name => $lname, type => $ltype, sortingtemplatename => $lstn, sortingnamekeytemplatename => $lsnksn, labelprefix => $lpn, uniquenametemplatename => $luntn, labelalphanametemplatename => $llantn)) { if ($logger->is_debug()) {# performance tune $logger->debug("Section datalist '$lname' of type '$ltype' with sortingtemplate '$lstn', sortingnamekeytemplatename '$lsnksn', labelprefix '$lpn', uniquenametemplate '$luntn' and labelalphanametemplate '$llantn' is repeated for section $lsection - ignoring"); } next; } my $datalist = Biber::DataList->new(section => $lsection, sortingtemplatename => $lstn, sortingnamekeytemplatename => $lsnksn, uniquenametemplatename => $luntn, labelalphanametemplatename => $llantn, labelprefix => $lpn, name => $lname); $datalist->set_type($ltype || 'entry'); # lists are entry lists by default $datalist->set_name($lname || "$lstn/$lsnksn/$lpn/$luntn/$llantn"); # default to ss+snkss+pn+untn+lantn foreach my $filter ($list->{filter}->@*) { $datalist->add_filter({'type' => $filter->{type}, 'value' => $filter->{content}}); } # disjunctive filters are an array ref of filter hashes foreach my $orfilter ($list->{filteror}->@*) { my $orfilts = []; foreach my $filter ($orfilter->{filter}->@*) { push $orfilts->@*, {type => $filter->{type}, value => $filter->{content}}; } $datalist->add_filter($orfilts) if $orfilts; } # Collator for determining primary weight hash for sortinit # Here as it varies only with the locale and that doesn't vary between entries in a list # Potentially, the locale could be different for the first field in the sort spec in which # case that might give wrong results but this is highly unlikely as it is only used to # determine sortinithash in DataList.pm and that only changes \bibinitsep in biblatex. $datalist->set_sortinit_collator(Unicode::Collate::Locale->new(locale => Biber::Config->getblxoption('sortingtemplate')->{$datalist->get_sortingtemplatename}->{locale}, level => 1)); if ($logger->is_debug()) {# performance tune $logger->debug("Adding datalist of type '$ltype' with sortingtemplate '$lstn', sortingnamekeytemplatename '$lsnksn', labelprefix '$lpn', uniquenametemplate '$luntn', labelalphanametemplate '$llantn' and name '$lname' for section $lsection"); } $datalists->add_list($datalist); } # Check to make sure that each section has an entry datalist for global sorting # We have to make sure in case sortcites is used which uses the global order. foreach my $section ($bcfxml->{section}->@*) { my $globalss = Biber::Config->getblxoption('sortingtemplatename'); my $secnum = $section->{number}; unless ($datalists->get_lists_by_attrs(section => $secnum, type => 'entry', sortingtemplatename => $globalss, sortingnamekeytemplatename => 'global', uniquenametemplatename => 'global', labelalphanametemplatename => 'global', labelprefix => '', name => "$globalss/global//global/global")) { my $datalist = Biber::DataList->new(section => $secnum, type => 'entry', sortingtemplatename => $globalss, sortingnamekeytemplatename => 'global', uniquenametemplatename => 'global', labelalphanametemplatename => 'global', labelprefix => '', name => "$globalss/global//global/global"); $datalists->add_list($datalist); # See comment above $datalist->set_sortinit_collator(Unicode::Collate::Locale->new(locale => Biber::Config->getblxoption('sortingtemplate')->{$datalist->get_sortingtemplatename}->{locale}, level => 1)); } } # Add the Biber::DataLists object to the Biber object $self->{datalists} = $datalists; # Warn if there are no citations in any section unless ($key_flag) { biber_warn("The file '$ctrl_file_path' does not contain any citations!"); } # Normalise any UTF-8 encoding string immediately to exactly what we want # We want the strict perl utf8 "UTF-8" normalise_utf8(); # bibtex output when not in tool mode, is essentially entering tool mode but # without allkeys. We are not in tool mode if we are here. We fake tool mode # and then add a special section which contains all cited keys from all sections if (Biber::Config->getoption('output_format') eq 'bibtex') { Biber::Config->setoption('tool' ,1); Biber::Config->setoption('pseudo_tool' ,1); my $bib_section = new Biber::Section('number' => 99999); foreach my $section ($self->sections->get_sections->@*) { if ($section->is_allkeys) { $bib_section->set_allkeys(1); } else { $bib_section->add_citekeys($section->get_citekeys); } foreach my $ds ($section->get_datasources->@*) { $bib_section->add_datasource($ds); } } $self->sections->add_section($bib_section); # Global sorting in non tool mode bibtex output is citeorder so override the .bcf here Biber::Config->setblxoption('sortingtemplatename', 'none'); # Global locale in non tool mode bibtex output is default Biber::Config->setblxoption('sortlocale', 'english'); my $datalist = Biber::DataList->new(section => 99999, sortingtemplatename => 'none', sortingnamekeytemplatename => 'global', uniquenametemplatename => 'global', labelalphanametemplatename => 'global', labelprefix => '', name => Biber::Config->getblxoption('sortingtemplatename') . '/global//global/global'); $datalist->set_type('entry'); if ($logger->is_debug()) {# performance tune $logger->debug("Adding 'entry' list 'none' for pseudo-section 99999"); } $self->{datalists}->add_list($datalist); } return; } =head2 process_setup Place to put misc pre-processing things needed later =cut sub process_setup { my $self = shift; # Make sure there is a default entry list with global sorting for each refsection # Needed in case someone cites entries which are included in no # bibliography as this results in no entry list in the .bcf foreach my $section ($self->sections->get_sections->@*) { my $secnum = $section->number; unless ($self->datalists->has_lists_of_type_for_section($secnum, 'entry')) { my $datalist = Biber::DataList->new(sortingtemplatename => Biber::Config->getblxoption('sortingtemplatename'), sortingnamekeytemplatename => 'global', uniquenametemplatename => 'global', labelalphanametemplatename => 'global', labelprefix => '', name => Biber::Config->getblxoption('sortingtemplatename') . '/global//global/global'); $datalist->set_type('entry'); $datalist->set_section($secnum); $self->datalists->add_list($datalist); # See comment for same call in .bcf instantiation of datalists $datalist->set_sortinit_collator(Unicode::Collate::Locale->new(locale => Biber::Config->getblxoption('sortingtemplate')->{$datalist->get_sortingtemplatename}->{locale}, level => 1)); } } # Break data model information up into more processing-friendly formats # for use in verification checks later # This has to be here as opposed to in parse_ctrlfile() so that it can pick # up user config dm settings Biber::Config->set_dm(Biber::DataModel->new(Biber::Config->getblxoption('datamodel'))); # Now resolve any datafield sets from the .bcf _resolve_datafieldsets(); # Force output_safechars flag if output to ASCII and input_encoding is not ASCII if (Biber::Config->getoption('output_encoding') =~ /(?:x-)?ascii/xmsi and Biber::Config->getoption('input_encoding') !~ /(?:x-)?ascii/xmsi) { Biber::Config->setoption('output_safechars', 1); } } =head2 process_setup_tool Place to put misc pre-processing things needed later for tool mode =cut sub process_setup_tool { my $self = shift; Biber::Config->set_dm(Biber::DataModel->new(Biber::Config->getblxoption('datamodel'))); # Now resolve any datafield sets from the .bcf _resolve_datafieldsets(); # Force output_safechars flag if output to ASCII and input_encoding is not ASCII if (Biber::Config->getoption('output_encoding') =~ /(?:x-)?ascii/xmsi and Biber::Config->getoption('input_encoding') !~ /(?:x-)?ascii/xmsi) { Biber::Config->setoption('output_safechars', 1); } } # datafield sets need to be resolved after the datamodel is parsed sub _resolve_datafieldsets { my $dm = Biber::Config->get_dm; while (my ($key, $value) = each %DATAFIELD_SETS) { my $fs; foreach my $m ($value->@*) { if (ref $m eq 'HASH') { if ($m->{fieldtype} and $m->{datatype}) { push $fs->@*, $dm->get_fields_of_type($m->{fieldtype}, $m->{datatype})->@*; } elsif ($m->{fieldtype}) { push $fs->@*, $dm->get_fields_of_fieldtype($m->{fieldtype})->@*; } elsif ($m->{datatype}) { push $fs->@*, $dm->get_fields_of_datatype($m->{datatype})->@*; } } else { push $fs->@*, $m; } } $DATAFIELD_SETS{$key} = $fs; } } =head2 resolve_alias_refs Resolve aliases in xref/crossref/xdata which take keys as values to their real keys We use set_datafield as we are overriding the alias in the datasource =cut sub resolve_alias_refs { my $self = shift; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); foreach my $citekey ($section->get_citekeys) { my $be = $section->bibentry($citekey); # XREF if (my $refkey = $be->get_field('xref')) { if (my $realkey = $section->get_citekey_alias($refkey)) { $be->set_datafield('xref', $realkey); } } # CROSSREF if (my $refkey = $be->get_field('crossref')) { if (my $realkey = $section->get_citekey_alias($refkey)) { $be->set_datafield('crossref', $realkey); } } # XDATA if (my $xdata = $be->get_field('xdata')) { my $resolved_keys; foreach my $refkey ($xdata->@*) { $refkey = $section->get_citekey_alias($refkey) // $refkey; push $resolved_keys->@*, $refkey; } $be->set_datafield('xdata', $resolved_keys); } } } =head2 process_citekey_aliases Remove citekey aliases from citekeys as they don't point to real entries. =cut sub process_citekey_aliases { my $self = shift; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); foreach my $citekey ($section->get_citekeys) { if (my $a = $section->get_citekey_alias($citekey)) { if ($logger->is_debug()) {# performance tune $logger->debug("Pruning citekey alias '$citekey' from citekeys"); } $section->del_citekey($citekey); } } } =head2 instantiate_dynamic This instantiates any dynamic entries so that they are available for processing later on. This has to be done before most all other processing so that when we call $section->bibentry($key), as we do many times in the code, we don't die because there is a key but no Entry object. =cut sub instantiate_dynamic { my $self = shift; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); if ($logger->is_debug()) {# performance tune $logger->debug("Creating dynamic entries (sets/related) for section $secnum"); } # Instantiate any dynamic set entries before we do anything else foreach my $dset ($section->dynamic_set_keys->@*) { my @members = $section->get_dynamic_set($dset); # Resolve any aliases in the members my @realmems; foreach my $mem (@members) { push @realmems, $section->get_citekey_alias($mem) // $mem; } @members = @realmems; $section->set_dynamic_set($dset, @realmems); my $be = new Biber::Entry; $be->set_field('entrytype', 'set'); $be->set_field('entryset', [ @members ]); $be->set_field('citekey', $dset); $be->set_field('datatype', 'dynamic'); $section->bibentries->add_entry($dset, $be); if ($logger->is_debug()) {# performance tune $logger->debug("Created dynamic set entry '$dset' in section $secnum"); } foreach my $m (@members) { # Save graph information if requested if (Biber::Config->getoption('output_format') eq 'dot') { Biber::Config->set_graph('set', $dset, $m); } # Instantiate any related entry clones we need from dynamic set members $section->bibentry($m)->relclone; } # Setting dataonly for members is handled by process_sets() } # Instantiate any related entry clones we need from regular entries foreach my $citekey ($section->get_citekeys) { $section->bibentry($citekey)->relclone; } return; } =head2 resolve_xdata Resolve xdata entries =cut sub resolve_xdata { my $self = shift; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); if ($logger->is_debug()) {# performance tune $logger->debug("Resolving XDATA entries for section $secnum"); } # We are not looping over citekeys here as XDATA entries are not cited. # They may have been added to the section as entries, however. foreach my $be ($section->bibentries->entries) { # Don't directly resolve XDATA entrytypes - this is done recursively in the Entry method # Otherwise, we will die on loops etc. for XDATA entries which are never referenced from # any cited entry next if $be->get_field('entrytype') eq 'xdata'; next unless my $xdata = $be->get_field('xdata'); $be->resolve_xdata($xdata); } } =head2 cite_setmembers Promotes set member to cited status =cut sub cite_setmembers { my $self = shift; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); if ($logger->is_debug()) {# performance tune $logger->debug("Adding set members to citekeys for section $secnum"); } foreach my $citekey ($section->get_citekeys) { my $be = $section->bibentry($citekey); # promote indirectly cited inset set members to fully cited entries if ($be->get_field('entrytype') eq 'set' and $be->get_field('entryset')) { my $inset_keys = $be->get_field('entryset'); my $realmems; foreach my $mem ($inset_keys->@*) { push $realmems->@*, $section->get_citekey_alias($mem) // $mem; } $inset_keys = $realmems; $be->set_datafield('entryset', $inset_keys); foreach my $inset_key ($inset_keys->@*) { if ($logger->is_debug()) {# performance tune $logger->debug("Adding set member '$inset_key' to the citekeys (section $secnum)"); } $section->add_citekeys($inset_key); # Save graph information if requested if (Biber::Config->getoption('output_format') eq 'dot') { Biber::Config->set_graph('set', $citekey, $inset_key); } } # Set parents inherit first child member data so that they get sensible # sorting/labelling defaults. Most of these inherited fields will not be output # in the .bbl $be->set_inherit_from($section->bibentry($inset_keys->[0]), $section); # warning for the old pre-Biber way of doing things if ($be->get_field('crossref')) { biber_warn("Field 'crossref' is no longer needed in set entries in Biber - ignoring in entry '$citekey'", $be); $be->del_field('crossref'); } } } } =head2 preprocess_sets $biber->preprocess_sets This records the set information for use later =cut sub preprocess_sets { my $self = shift; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); if ($logger->is_debug()) {# performance tune $logger->debug("Recording set information"); } foreach my $citekey ($section->get_citekeys) { my $be = $section->bibentry($citekey); # Record set information # It's best to do this in the loop here as every entry needs the information # from all other entries in process_sets() if ($be->get_field('entrytype') eq 'set') { my $entrysetkeys = $be->get_field('entryset'); foreach my $member ($entrysetkeys->@*) { Biber::Config->set_set_pc($citekey, $member); Biber::Config->set_set_cp($member, $citekey); # Instantiate any related entry clones we need from static set members $section->bibentry($member)->relclone; } } } } =head2 process_interentry $biber->process_interentry This does several things: 1. Ensures proper inheritance of data from cross-references. 2. Ensures that crossrefs/xrefs that are directly cited or cross-referenced at least mincrossrefs/minxrefs times are included in the bibliography. =cut sub process_interentry { my $self = shift; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); if ($logger->is_debug()) {# performance tune $logger->debug("Processing explicit and implicit xref/crossrefs for section $secnum"); } foreach my $citekey ($section->get_citekeys) { my $be = $section->bibentry($citekey); # Loop over cited keys and count the cross/xrefs # Can't do this when parsing entries as this would count them # for potentially uncited children if (my $refkey = $be->get_field('crossref')) { if ($logger->is_debug()) {# performance tune $logger->debug("Incrementing crossrefkey count for entry '$refkey' via entry '$citekey'"); } Biber::Config->incr_crossrefkey($refkey); } if (my $refkey = $be->get_field('xref')) { if ($logger->is_debug()) {# performance tune $logger->debug("Incrementing xrefkey count for entry '$refkey' via entry '$citekey'"); } Biber::Config->incr_xrefkey($refkey); } # Record xref inheritance for graphing if required if (Biber::Config->getoption('output_format') eq 'dot' and my $xref = $be->get_field('xref')) { Biber::Config->set_graph('xref', $citekey, $xref); } } # We make sure that crossrefs that are directly cited or cross-referenced # at least mincrossrefs times are included in the bibliography. foreach my $k ( Biber::Config->get_crossrefkeys->@* ) { # If parent has been crossref'ed more than mincrossref times, upgrade it # to cited crossref status and add it to the citekeys list if (Biber::Config->get_crossrefkey($k) >= Biber::Config->getoption('mincrossrefs')) { if ($logger->is_debug()) {# performance tune $logger->debug("cross key '$k' is crossref'ed >= mincrossrefs, adding to citekeys"); } # Don't add this flag if the entry is also cited directly $section->bibentry($k)->set_field('crossrefsource', 1) unless $section->has_citekey($k); $section->add_citekeys($k); } } # We make sure that xrefs that are directly cited or x-referenced # at least minxrefs times are included in the bibliography. foreach my $k ( Biber::Config->get_xrefkeys->@* ) { # If parent has been xref'ed more than minxref times, upgrade it # to cited xref status and add it to the citekeys list if (Biber::Config->get_xrefkey($k) >= Biber::Config->getoption('minxrefs')) { if ($logger->is_debug()) {# performance tune $logger->debug("xref key '$k' is xref'ed >= minxrefs, adding to citekeys"); } # Don't add this flag if the entry is also cited directly $section->bibentry($k)->set_field('xrefsource', 1) unless $section->has_citekey($k); $section->add_citekeys($k); } } # This must come after doing implicit inclusion based on minref/mincrossref # otherwise cascading xref->crossref wont' work foreach my $citekey ($section->get_citekeys) { my $be = $section->bibentry($citekey); # Do crossref inheritance if (my $cr = $be->get_field('crossref')) { # Skip inheritance if we've already done it next if Biber::Config->get_inheritance('crossref', $cr, $be->get_field('citekey')); my $parent = $section->bibentry($cr); if ($logger->is_debug()) {# performance tune $logger->debug("Entry $citekey inheriting fields from parent $cr"); } unless ($parent) { biber_warn("Cannot inherit from crossref key '$cr' - does it exist?", $be); } else { $be->inherit_from($parent); } } } } =head2 validate_datamodel Validate bib data according to a datamodel Note that we are validating the internal Biber::Entries after they have been created from the datasources so this is datasource neutral, as it should be. It is here to enforce adherence to what biblatex expects. =cut sub validate_datamodel { my $self = shift; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $dm = Biber::Config->get_dm; if (Biber::Config->getoption('validate_datamodel')) { my $dmwe = Biber::Config->getoption('dieondatamodel') ? \&biber_error : \&biber_warn; foreach my $citekey ($section->get_citekeys) { my $be = $section->bibentry($citekey); my $citekey = $be->get_field('citekey'); my $et = $be->get_field('entrytype'); my $ds = $section->get_keytods($citekey); # default entrytype to MISC type if not a known type unless ($dm->is_entrytype($et)) { $dmwe->("Datamodel: Entry '$citekey' ($ds): Invalid entry type '" . $be->get_field('entrytype') . "' - defaulting to 'misc'", $be); $be->set_field('entrytype', 'misc'); $et = 'misc'; # reset this too } # Are all fields valid fields? # Each field must be: # * Valid because it's allowed for "ALL" entrytypes OR # * Valid field for the specific entrytype OR # * Valid because entrytype allows "ALL" fields unless ($et eq 'xdata') { # XDATA are generic containers for any field foreach my $ef ($be->datafields) { unless ($dm->is_field_for_entrytype($et, $ef)) { $dmwe->("Datamodel: Entry '$citekey' ($ds): Invalid field '$ef' for entrytype '$et'", $be); } } } # Mandatory constraints foreach my $warning ($dm->check_mandatory_constraints($be)) { $dmwe->($warning, $be); } # Conditional constraints foreach my $warning ($dm->check_conditional_constraints($be)) { $dmwe->($warning, $be); } # Data constraints foreach my $warning ($dm->check_data_constraints($be)) { $dmwe->($warning, $be); } } } } =head2 process_namedis Generate name strings and disambiguation schema. Has to be in the context of a data list (reference context) because uniquenametemplate can be specified per-list/context =cut sub process_namedis { my ($self, $citekey, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $dmh = Biber::Config->get_dm_helpers; if ($logger->is_debug()) { # performance tune $logger->debug("Processing names in entries in section $secnum to generate disambiguation data"); } # Use nameuniqueness template to construct uniqueness strings my $untname = $dlist->get_uniquenametemplatename; my $be = $section->bibentry($citekey); my $un = Biber::Config->getblxoption('uniquename', $be->get_field('entrytype'), $citekey); # Can be per-entry $untname = Biber::Config->getblxoption('uniquenametemplatename', undef, $citekey) // $untname; # Instead of setting this directly in here, we save the data and pass it out as we need # to use this method to get data without setting it in the list object (in uniqueprimaryauthor()) my $namedis; foreach my $pn ($dmh->{namelistsall}->@*) { next unless my $nl = $be->get_field($pn); my $nlid = $nl->get_id; # per-namelist uniquenametemplatename if (defined($nl->get_uniquenametemplatename)) { $untname = $nl->get_uniquenametemplatename; } foreach my $n ($nl->names->@*) { my $nid = $n->get_id; my $namestring = ''; my $namestrings = []; my $namedisschema = []; # per-name uniquenametemplatename if (defined($n->get_uniquenametemplatename)) { $untname = $n->get_uniquenametemplatename; } # First construct base part ... my $base; my $baseparts; foreach my $np (Biber::Config->getblxoption('uniquenametemplate')->{$untname}->@*) { next unless $np->{base}; my $npn = $np->{namepart}; if (my $p = $n->get_namepart($npn)) { if ($np->{use}) { # only ever defined as 1 my $method = "get_use$npn"; my $useok = Biber::Config->getblxoption("use$npn", $be->get_field('entrytype'), $citekey); # Override with per-namelist setting - only for extended name format if (defined($nl->$method)) { $useok = $nl->$method; } # Override with per-name setting - only for extended name format if (defined($nl->$method)) { $useok = $nl->$method; } next unless $useok; } $base .= $p; push $baseparts->@*, $npn; } } $namestring .= $base; push $namestrings->@*, $base; push $namedisschema->@*, ['base' => $baseparts]; # ... then add non-base parts by incrementally adding to the last disambiguation level foreach my $np (Biber::Config->getblxoption('uniquenametemplate')->{$untname}->@*) { next if $np->{base}; next if defined($np->{disambiguation}) and ($np->{disambiguation} eq 'none'); my $npn = $np->{namepart}; my $level = $np->{disambiguation} // $UNIQUENAME_CONTEXTS{$un // 0}; my $lastns = $namestrings->[$namestrings->$#*]; if (my $p = $n->get_namepart($npn)) { my $pi = $n->get_namepart_initial($npn); if ($np->{use}) { # only ever defined as 1 my $method = "get_use$npn"; my $useok = Biber::Config->getblxoption("use$npn", $be->get_field('entrytype'), $citekey); # Override with per-namelist setting - only for extended name format if (defined($nl->$method)) { $useok = $nl->$method; } # Override with per-name setting - only for extended name format if (defined($nl->$method)) { $useok = $nl->$method; } next unless $useok; } $namestring .= $p; # per-namepart disambiguation level # Here we incrementally add disambiguation possibilities to an array and simultaneously # record a schema of what each incremental disambiguation is if (fc($level) eq fc('full')) { # only full disambiguation push $namestrings->@*, $lastns . $p; push $namedisschema->@*, [$npn => 'fullonly']; } if (fc($level) eq fc('initorfull')) { # initials or full disambiguation push $namestrings->@*, $lastns . join('', $pi->@*); push $namedisschema->@*, [$npn => 'init']; push $namestrings->@*, $lastns . $p; push $namedisschema->@*, [$npn => 'full']; } elsif (fc($level) eq fc('init')) { # inits only push $namestrings->@*, $lastns . join('', $pi->@*); push $namedisschema->@*, [$npn => 'init']; } } } if ($logger->is_trace()) { # performance tune $logger->trace("namestrings in '$citekey': " . join (',', $namestrings->@*)); } $namedis->{$nlid}{$nid} = {namestring => $namestring, namestrings => $namestrings, namedisschema => $namedisschema}; } } return $namedis; } =head2 postprocess_sets Adds required per-entry options etc. to sets =cut sub postprocess_sets { my $self = shift; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); foreach my $citekey ( $section->get_citekeys ) { # process set entries $self->process_sets($citekey); } return; } =head2 process_entries_static Processing of entries which is not list-specific and which can therefore insert data directly into entries =cut sub process_entries_static { my ($self) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); if ($logger->is_debug()) {# performance tune $logger->debug("Processing static entry information in section $secnum"); } foreach my $citekey ( $section->get_citekeys ) { # generate labelname name $self->process_labelname($citekey); # generate labeldate name $self->process_labeldate($citekey); # generate labeltitle name $self->process_labeltitle($citekey); # generate fullhash $self->process_fullhash($citekey); # push entry-specific presort fields into the presort state $self->process_presort($citekey); } } =head2 process_entries_pre Main processing operations, to generate metadata and entry information This method is automatically called by C. Here we generate the "namehash" and the strings for "labelname", "labelyear", "labelalpha", "sortstrings", etc. Runs prior to uniqueness processing =cut sub process_entries_pre { my ($self, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); if ($logger->is_debug()) {# performance tune $logger->debug("Processing entries in section $secnum (before uniqueness)"); } foreach my $citekey ( $section->get_citekeys ) { my $be = $section->bibentry($citekey); # Check this outside of process_namedis() because we need to use that in cases # where uniquename=false (uniqueprimaryauthor for example); if (Biber::Config->getblxoption('uniquename', $be->get_field('entrytype'), $citekey) or Biber::Config->getblxoption('uniquelist', $be->get_field('entrytype'), $citekey)) { # process name disambiguation schemata my $namedis = $self->process_namedis($citekey, $dlist); foreach my $nlid (keys $namedis->%*) { foreach my $nid (keys $namedis->{$nlid}->%*) { $dlist->set_namedis($nlid, $nid, $namedis->{$nlid}{$nid}{namestring}, $namedis->{$nlid}{$nid}{namestrings}, $namedis->{$nlid}{$nid}{namedisschema}); } } } } if ($logger->is_debug()) {# performance tune $logger->debug("Finished processing entries in section $secnum (before uniqueness)"); } return; } =head2 process_entries_post More processing operations, to generate things which require uniqueness information like namehash Runs after uniqueness processing =cut sub process_entries_post { my ($self, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); if ($logger->is_debug()) {# performance tune $logger->debug("Postprocessing entries in section $secnum (after uniqueness)"); } foreach my $citekey ( $section->get_citekeys ) { # generate labelalpha information $self->process_labelalpha($citekey, $dlist); # generate information for tracking extraalpha $self->process_extraalpha($citekey, $dlist); # generate information for tracking extradate $self->process_extradate($citekey, $dlist); # generate information for tracking extratitle $self->process_extratitle($citekey, $dlist); # generate information for tracking extratitleyear $self->process_extratitleyear($citekey, $dlist); # generate information for tracking singletitle, uniquetitle, uniquebaretitle and uniquework $self->process_workuniqueness($citekey, $dlist); # generate information for tracking uniqueprimaryauthor $self ->process_uniqueprimaryauthor($citekey, $dlist); # generate namehash $self->process_namehash($citekey, $dlist); # generate per-name hashes $self->process_pername_hashes($citekey, $dlist); } if ($logger->is_debug()) {# performance tune $logger->debug("Finished processing entries in section $secnum (after uniqueness)"); } return; } =head2 process_entries_final Final processing operations which depend on all previous processing =cut sub process_entries_final { my ($self, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); if ($logger->is_debug()) {# performance tune $logger->debug("Final processing for entries in section $secnum"); } foreach my $citekey ( $section->get_citekeys ) { # Generate singletitle field if requested $self->generate_singletitle($citekey, $dlist); # Generate uniquetitle field if requested $self->generate_uniquetitle($citekey, $dlist); # Generate uniquebaretitle field if requested $self->generate_uniquebaretitle($citekey, $dlist); # Generate uniquework field if requested $self->generate_uniquework($citekey, $dlist); # Generate uniqueprimaryauthor if requested $self->generate_uniquepa($citekey, $dlist); } } =head2 process_uniqueprimaryauthor Track seen primary author base names for generation of uniqueprimaryauthor =cut sub process_uniqueprimaryauthor { my ($self, $citekey, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $be = $section->bibentry($citekey); if (my $lni = $be->get_labelname_info) { if (Biber::Config->getblxoption('uniqueprimaryauthor')) { my $nl = $be->get_field($lni); if ($logger->is_trace()) {# performance tune $logger->trace("Creating uniqueprimaryauthor information for '$citekey'"); } my $namedis = $self->process_namedis($citekey, $dlist); my $nds = $namedis->{$nl->get_id}{$nl->nth_name(1)->get_id}{namedisschema}; my $nss = $namedis->{$nl->get_id}{$nl->nth_name(1)->get_id}{namestrings}; my $paf; for (my $i=0;$i<=$nds->$#*;$i++) { my $se = $nds->[$i]; if ($se->[0] eq 'base') { $paf = $nss->[$i]; last; } } $dlist->set_entryfield($citekey, 'seenprimaryauthor', $paf); $dlist->incr_seenpa($paf); } } } =head2 process_workuniqueness Track seen work combination for generation of singletitle, uniquetitle, uniquebaretitle and uniquework =cut sub process_workuniqueness { my ($self, $citekey, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $be = $section->bibentry($citekey); my $bee = $be->get_field('entrytype'); my $identifier; my $lni = $be->get_labelname_info; my $lti = $be->get_labeltitle_info; # ignore settings from inheritance data? my $ignore = Biber::Config->get_uniq_ignore($citekey); # singletitle # Don't generate information for entries with no labelname or labeltitle # Use fullhash as this is not a test of uniqueness of only visible information if ($lni and Biber::Config->getblxoption('singletitle', $bee)) { $identifier = $self->_getfullhash($citekey, $be->get_field($lni)); # Skip due to ignore settings? # Don't count towards singletitle being false if both labelname and labeltitle # were inherited # Put another way, if both labelname and labeltitle were inherited, singletitle # can still be true (in a mvbook for example, which is just a single "work") unless (($lni and first {fc($lni) eq fc($_)} $ignore->{singletitle}->@*) and ($lti and first {fc($lti) eq fc($_)} $ignore->{singletitle}->@*)) { $dlist->incr_seenname($identifier); } $dlist->set_entryfield($citekey, 'seenname', $identifier); } # uniquetitle # Don't generate information for entries with no labeltitle if ($lti and Biber::Config->getblxoption('uniquetitle', $bee)) { $identifier = $be->get_field($lti); # Skip due to ignore settings? unless (first {fc($lti) eq fc($_)} $ignore->{uniquetitle}->@*) { $dlist->incr_seentitle($identifier); } $dlist->set_entryfield($citekey, 'seentitle', $identifier); } # uniquebaretitle # Don't generate information for entries with no labeltitle and with labelname if ($lti and not $lni and Biber::Config->getblxoption('uniquebaretitle', $bee)) { $identifier = $be->get_field($lti); # Skip due to ignore settings? unless (first {fc($lti) eq fc($_)} $ignore->{uniquebaretitle}->@*) { $dlist->incr_seenbaretitle($identifier); } $dlist->set_entryfield($citekey, 'seenbaretitle', $identifier); } # uniquework # Don't generate information for entries with no labelname and labeltitle # Should use fullhash this is not a test of uniqueness of only visible information if ($lni and $lti and Biber::Config->getblxoption('uniquework', $bee)) { $identifier = $self->_getfullhash($citekey, $be->get_field($lni)) . $be->get_field($lti); # Skip due to ignore settings? unless (first {fc($lni) eq fc($_)} $ignore->{uniquework}->@* and first {fc($lti) eq fc($_)} $ignore->{uniquework}->@*) { $dlist->incr_seenwork($identifier); } $dlist->set_entryfield($citekey, 'seenwork', $identifier); } return; } =head2 process_extradate Track labelname/date parts combination for generation of extradate =cut sub process_extradate { my ($self, $citekey, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $be = $section->bibentry($citekey); my $bee = $be->get_field('entrytype'); # Generate labelname/year combination for tracking extradate # * If there is no labelname to use, use empty string # * If there is no date information to use, try year # * Don't increment the seen_namedateparts count if the name string is empty # (see code in incr_seen_namedateparts method). # * Don't increment if skiplab is set if (Biber::Config->getblxoption('labeldateparts', $bee)) { if (Biber::Config->getblxoption('skiplab', $bee, $citekey)) { return; } if ($logger->is_trace()) {# performance tune $logger->trace("Creating extradate information for '$citekey'"); } my $namehash = ''; if (my $lni = $be->get_labelname_info) { $namehash = $self->_getnamehash_u($citekey, $be->get_field($lni), $dlist); } my $datestring = ''; # Need a default empty string my $edspec = Biber::Config->getblxoption('extradatespec'); my $edscope; # Look in each scope foreach my $scope ($edspec->@*) { # Use the first field in the scope which we find and ignore the rest foreach my $field ($scope->@*) { if (my $val = $be->get_field($field)) { $datestring .= $val; $edscope = $field; last; } } } my $tracking_string = "$namehash,$datestring"; $be->set_field('extradatescope', $edscope); $dlist->set_entryfield($citekey, 'namedateparts', $tracking_string); $dlist->incr_seen_namedateparts($namehash, $datestring); } return; } =head2 process_extratitle Track labelname/labeltitle combination for generation of extratitle =cut sub process_extratitle { my ($self, $citekey, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $be = $section->bibentry($citekey); my $bee = $be->get_field('entrytype'); # Generate labelname/labeltitle combination for tracking extratitle # * If there is no labelname to use, use empty string # * If there is no labeltitle to use, use empty string # * Don't increment if skiplab is set # This is different from extradate in that we do track the information # if the labelname is empty as titles are much more unique than years if (Biber::Config->getblxoption('labeltitle', $bee)) { if (Biber::Config->getblxoption('skiplab', $bee, $citekey)) { return; } if ($logger->is_trace()) {# performance tune $logger->trace("Creating extratitle information for '$citekey'"); } my $namehash = ''; if (my $lni = $be->get_labelname_info) { $namehash = $self->_getnamehash_u($citekey, $be->get_field($lni), $dlist); } my $lti = $be->get_labeltitle_info; my $title_string = $be->get_field($lti) // ''; my $nametitle_string = "$namehash,$title_string"; if ($logger->is_trace()) {# performance tune $logger->trace("Setting nametitle to '$nametitle_string' for entry '$citekey'"); } $dlist->set_entryfield($citekey, 'nametitle', $nametitle_string); if ($logger->is_trace()) {# performance tune $logger->trace("Incrementing nametitle for '$namehash'"); } $dlist->incr_seen_nametitle($namehash, $title_string); } return; } =head2 process_extratitleyear Track labeltitle/labelyear combination for generation of extratitleyear =cut sub process_extratitleyear { my ($self, $citekey, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $be = $section->bibentry($citekey); my $bee = $be->get_field('entrytype'); # Generate labeltitle/labelyear combination for tracking extratitleyear # * If there is no labeltitle to use, use empty string # * If there is no labelyear to use, use empty string # * Don't increment the seen_titleyear count if the labeltitle field is empty # (see code in incr_seen_titleyear method). # * Don't increment if skiplab is set if (Biber::Config->getblxoption('labeltitleyear', $bee)) { if (Biber::Config->getblxoption('skiplab', $bee, $citekey)) { return; } if ($logger->is_trace()) {# performance tune $logger->trace("Creating extratitleyear information for '$citekey'"); } my $lti = $be->get_labeltitle_info; my $title_string = $be->get_field($lti) // ''; # Takes into account the labelyear which can be a range my $year_string = $be->get_field('labelyear') || $be->get_field('year') || ''; my $titleyear_string = "$title_string,$year_string"; if ($logger->is_trace()) {# performance tune $logger->trace("Setting titleyear to '$titleyear_string' for entry '$citekey'"); } $dlist->set_entryfield($citekey, 'titleyear', $titleyear_string); if ($logger->is_trace()) {# performance tune $logger->trace("Incrementing titleyear for '$title_string'"); } $dlist->incr_seen_titleyear($title_string, $year_string); } return; } =head2 process_sets Postprocess set entries Checks for common set errors and enforces 'dataonly' for set members. It's not necessary to set skipbib, skipbiblist in the OPTIONS field for the set members as these are automatically set by biblatex due to the \inset =cut sub process_sets { my $self = shift; my $citekey = shift; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $be = $section->bibentry($citekey); if (my @entrysetkeys = Biber::Config->get_set_children($citekey)) { # Enforce Biber parts of virtual "dataonly" for set members # Also automatically create an "entryset" field for the members foreach my $member (@entrysetkeys) { my $me = $section->bibentry($member); process_entry_options($member, [ 'skiplab', 'skipbiblist', 'uniquename=0', 'uniquelist=0' ]); if ($me->get_field('entryset')) { biber_warn("Field 'entryset' is no longer needed in set member entries in Biber - ignoring in entry '$member'", $me); $me->del_field('entryset'); } # This ends up setting \inset{} in the bbl $me->set_field('entryset', [ $citekey ]); } unless (@entrysetkeys) { biber_warn("No entryset found for entry $citekey of type 'set'", $be); } } # Also set this here for any non-set keys which are in a set and which haven't # had skips set by being seen as a member of that set yet else { if (Biber::Config->get_set_parents($citekey)) { my $me = $section->bibentry($citekey); process_entry_options($citekey, [ 'skiplab', 'skipbiblist', 'uniquename=0', 'uniquelist=0' ]); } } } =head2 process_labelname Generate labelname information. =cut sub process_labelname { my ($self, $citekey) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $be = $section->bibentry($citekey); my $bee = $be->get_field('entrytype'); my $lnamespec = Biber::Config->getblxoption('labelnamespec', $bee); my $dm = Biber::Config->get_dm; my $dmh = Biber::Config->get_dm_helpers; # First we set the normal labelname name foreach my $h_ln ($lnamespec->@*) { my $lnameopt; my $ln = $h_ln->{content}; if ( $ln =~ /\Ashort(\X+)\z/xms ) { $lnameopt = $1; } else { $lnameopt = $ln; } unless (first {$ln eq $_} $dmh->{namelistsall}->@*) { biber_warn("Labelname candidate '$ln' is not a name field - skipping"); next; } # If there is a biblatex option which controls the use of this labelname info, check it if ($CONFIG_OPTSCOPE_BIBLATEX{"use$lnameopt"} and not Biber::Config->getblxoption("use$lnameopt", $bee, $citekey)) { next; } if ($be->get_field($ln)) { $be->set_labelname_info($ln); last; } } # Then we loop again to set the labelname name for the fullhash generation code # This is because fullhash generation ignores SHORT* fields (section 4.2.4.1, BibLaTeX # manual) foreach my $h_ln ($lnamespec->@*) { my $ln = $h_ln->{content}; if ( $ln =~ /\Ashort(.+)\z/xms ) { next; } # We have already warned about this above next unless (first {$ln eq $_} $dmh->{namelistsall}->@*); # If there is a biblatex option which controls the use of this labelname info, check it if ($CONFIG_OPTSCOPE_BIBLATEX{"use$ln"} and not Biber::Config->getblxoption("use$ln", $bee, $citekey)) { next; } if ($be->get_field($ln)) { $be->set_labelnamefh_info($ln); last; } } unless ($be->get_labelname_info) { if ($logger->is_debug()) {# performance tune $logger->debug("Could not determine the labelname source of entry $citekey"); } } } =head2 process_labeldate Generate labeldate information, including times =cut sub process_labeldate { my $self = shift; my $citekey = shift; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $be = $section->bibentry($citekey); my $bee = $be->get_field('entrytype'); my $dm = Biber::Config->get_dm; if (Biber::Config->getblxoption('labeldateparts', $bee)) { my $ldatespec = Biber::Config->getblxoption('labeldatespec', $bee); foreach my $lds ($ldatespec->@*) { my $pseudodate; my $ld = $lds->{content}; if ($lds->{'type'} eq 'field') { # labeldate field my $ldy; my $ldey; my $ldm; my $ldd; my $ldhour; my $ldmin; my $ldsec; my $ldtz; my $datetype; # resolve dates $datetype = $ld =~ s/date\z//xmsr; if ($dm->field_is_datatype('date', $ld) and $be->get_field("${datetype}datesplit")) { # real EDTF dates $ldy = $datetype . 'year'; $ldey = $datetype . 'endyear'; $ldm = $datetype . 'month'; $ldd = $datetype . 'day'; $ldhour = $datetype . 'hour'; $ldmin = $datetype . 'minute'; $ldsec = $datetype . 'second'; $ldtz = $datetype . 'timezone'; } else { # non-EDTF split date field so make a pseudo-year $ldy = $ld; $pseudodate = 1; } # Did we find a labeldate - this is equivalent to checking for a year/endyear # as that is always present if there is a labeldate if ($be->get_field($ldy) or $be->get_field($ldey)) { # set source to field or date field prefix for a real date field $be->set_labeldate_info({'field' => {year => $ldy, month => $ldm, day => $ldd, hour => $ldhour, minute => $ldmin, second => $ldsec, timezone => $ldtz, pseudodate => $pseudodate, source => $pseudodate ? $ldy : $datetype }}); last; } } elsif ($lds->{'type'} eq 'string') { # labelyear fallback string $be->set_labeldate_info({'string' => $ld}); last; } } # Construct label* # Might not have been set due to skiplab/dataonly if (my $ldi = $be->get_labeldate_info) { if (my $df = $ldi->{field}) { # set labelyear to a field value my $pseudodate = $df->{pseudodate}; $be->set_field('labelyear', $be->get_field($df->{year})); $be->set_field('labelmonth', $be->get_field($df->{month})) if $df->{month}; $be->set_field('labelday', $be->get_field($df->{day})) if $df->{day}; $be->set_field('labelhour', $be->get_field($df->{hour})) if $df->{hour}; $be->set_field('labelminute', $be->get_field($df->{minute})) if $df->{minute}; $be->set_field('labelsecond', $be->get_field($df->{second})) if $df->{second}; $be->set_field('labeltimezone', $be->get_field($df->{timezone})) if $df->{timezone}; $be->set_field('labeldatesource', $df->{source}); # ignore endyear if it's the same as year my ($ytype) = $df->{year} =~ /\A(\X*)year\z/xms; $ytype = $ytype // ''; # Avoid undef warnings since no match above can make it undef # construct labelyear from start/end year field if ($be->field_exists($ytype . 'endyear') and (($be->get_field($df->{year}) // '') ne $be->get_field($ytype . 'endyear'))) { $be->set_field('labelyear', ($be->get_field('labelyear') // ''). '\bibdatedash ' . $be->get_field($ytype . 'endyear')); } # construct labelmonth from start/end month field if (not $pseudodate and $be->get_field($ytype . 'endmonth') and (($be->get_field($df->{month}) // '') ne $be->get_field($ytype . 'endmonth'))) { $be->set_field('labelmonth', ($be->get_field('labelmonth') // '') . '\bibdatedash ' . $be->get_field($ytype . 'endmonth')); } # construct labelday from start/end month field if (not $pseudodate and $be->get_field($ytype . 'endday') and (($be->get_field($df->{day}) // '') ne $be->get_field($ytype . 'endday'))) { $be->set_field('labelday', ($be->get_field('labelday') // '') . '\bibdatedash ' . $be->get_field($ytype . 'endday')); } # construct labelhour from start/end hour field if (not $pseudodate and $be->get_field($ytype . 'endhour') and (($be->get_field($df->{hour}) // '') ne $be->get_field($ytype . 'endhour'))) { $be->set_field('labelhour', ($be->get_field('labelhour') // '') . '\bibdatedash ' . $be->get_field($ytype . 'endhour')); } # construct labelminute from start/end minute field if (not $pseudodate and $be->get_field($ytype . 'endminute') and (($be->get_field($df->{minute}) // '') ne $be->get_field($ytype . 'endminute'))) { $be->set_field('labelminute', ($be->get_field('labelminute') // '') . '\bibdatedash ' . $be->get_field($ytype . 'endminute')); } # construct labelsecond from start/end second field if (not $pseudodate and $be->get_field($ytype . 'endsecond') and (($be->get_field($df->{second}) // '') ne $be->get_field($ytype . 'endsecond'))) { $be->set_field('labelsecond', ($be->get_field('labelsecond') // '') . '\bibdatedash ' . $be->get_field($ytype . 'endsecond')); } } elsif (my $ys = $ldi->{string}) { # set labeldatesource to a fallback string $be->set_field('labeldatesource', $ys); } } else { if ($logger->is_debug()) {# performance tune $logger->debug("labeldate information of entry $citekey is unset"); } } } } =head2 process_labeltitle Generate labeltitle Note that this is not conditionalised on the biblatex "labeltitle" as labeltitle should always be output since all standard styles need it. Only extratitle is conditionalised on the biblatex "labeltitle" option. =cut sub process_labeltitle { my $self = shift; my $citekey = shift; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $be = $section->bibentry($citekey); my $bee = $be->get_field('entrytype'); my $ltitlespec = Biber::Config->getblxoption('labeltitlespec', $bee); foreach my $h_ltn ($ltitlespec->@*) { my $ltn = $h_ltn->{content}; if (my $lt = $be->get_field($ltn)) { $be->set_labeltitle_info($ltn); $be->set_field('labeltitle', $lt); last; } if ($logger->is_debug()) {# performance tune $logger->debug("labeltitle information of entry $citekey is unset"); } } } =head2 process_fullhash Generate fullhash =cut sub process_fullhash { my $self = shift; my $citekey = shift; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $be = $section->bibentry($citekey); my $dmh = Biber::Config->get_dm_helpers; # fullhash is generated from the labelname but ignores SHORT* fields and # max/mincitenames settings # This can't be resolved nicely by biblatex because it depends on use* options # and also SHORT* fields etc. if (my $lnfhi = $be->get_labelnamefh_info) { if (my $lnfh = $be->get_field($lnfhi)) { $be->set_field('fullhash', $self->_getfullhash($citekey, $lnfh)); } } # Generate fullhash for all other name fields foreach my $n ($dmh->{namelistsall}->@*) { next unless my $nv = $be->get_field($n); $be->set_field("${n}fullhash", $self->_getfullhash($citekey, $nv)); } return; } =head2 process_namehash Generate namehash =cut sub process_namehash { my ($self, $citekey, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $be = $section->bibentry($citekey); my $dmh = Biber::Config->get_dm_helpers; # namehash is generated from the labelname # This can't be resolved nicely by biblatex because it depends on use* options # and also SHORT* fields etc. if (my $lni = $be->get_labelname_info) { if (my $ln = $be->get_field($lni)) { $dlist->set_entryfield($citekey, 'namehash', $self->_getnamehash($citekey, $ln, $dlist)); $dlist->set_entryfield($citekey, 'bibnamehash', $self->_getnamehash($citekey, $ln, $dlist, 1)); } } # Generate namehash for all other name fields foreach my $n ($dmh->{namelistsall}->@*) { next unless my $nv = $be->get_field($n); $dlist->set_entryfield($citekey, "${n}namehash", $self->_getnamehash($citekey, $nv, $dlist)); $dlist->set_entryfield($citekey, "${n}bibnamehash", $self->_getnamehash($citekey, $nv, $dlist, 1)); } return; } =head2 process_pername_hashes Generate per_name_hashes =cut sub process_pername_hashes { my ($self, $citekey, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $be = $section->bibentry($citekey); my $dmh = Biber::Config->get_dm_helpers; foreach my $pn ($dmh->{namelistsall}->@*) { next unless my $nl = $be->get_field($pn); foreach my $n ($nl->names->@*) { $dlist->set_namehash($nl->get_id, $n->get_id, $self->_genpnhash($citekey, $n)); } } return; } =head2 process_visible_names Generate the visible name information. This is used in various places and it is useful to have it generated in one place. =cut sub process_visible_names { my ($self, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $dmh = Biber::Config->get_dm_helpers; if ($logger->is_debug()) {# performance tune $logger->debug("Postprocessing visible names for section $secnum"); } foreach my $citekey ($section->get_citekeys) { my $be = $section->bibentry($citekey); my $bee = $be->get_field('entrytype'); my $maxcn = Biber::Config->getblxoption('maxcitenames', $bee, $citekey); my $mincn = Biber::Config->getblxoption('mincitenames', $bee, $citekey); my $maxbn = Biber::Config->getblxoption('maxbibnames', $bee, $citekey); my $minbn = Biber::Config->getblxoption('minbibnames', $bee, $citekey); my $maxan = Biber::Config->getblxoption('maxalphanames', $bee, $citekey); my $minan = Biber::Config->getblxoption('minalphanames', $bee, $citekey); foreach my $n ($dmh->{namelistsall}->@*) { next unless my $nl = $be->get_field($n); my $count = $nl->count_names; my $visible_names_cite; my $visible_names_bib; my $visible_names_alpha; # Cap min*names for this entry at $count. Why? Because imagine we have this: # # John Smith and Bill Jones # # and mincitenames=3. Then visibility will be set to 3 but there aren't 3 names to # get information from so looping over the visibility count would cause name methods # to operate on undef at index 3 and die my $l_mincn = $count < $mincn ? $count : $mincn; my $l_minbn = $count < $minbn ? $count : $minbn; my $l_minan = $count < $minan ? $count : $minan; # If name list was truncated in bib with "and others", this means that the # name list has already been manually truncated to the correct visibility # and so the visibility is just the count of the explicit names # max/minalphanames doesn't care about uniquelist - labels are just labels if ($count > $maxan) { $visible_names_alpha = $l_minan; } else { $visible_names_alpha = $count; } # max/mincitenames if ($count > $maxcn) { # Visibility to the uniquelist point if uniquelist is requested # We know at this stage that if uniquelist is set, there are more than maxcitenames # names. We also know that uniquelist > mincitenames because it is a further # disambiguation on top of mincitenames so can't be less as you can't disambiguate # by losing information $visible_names_cite = $dlist->get_uniquelist($nl->get_id) // $l_mincn; } else { # visibility is simply the full list $visible_names_cite = $count; } # max/minbibnames if ($count > $maxbn) { # Visibility to the uniquelist point if uniquelist is requested # We know at this stage that if uniquelist is set, there are more than maxbibnames # names. We also know that uniquelist > mincitenames because it is a further # disambiguation on top of mincitenames so can't be less as you can't disambiguate # by losing information $visible_names_bib = $dlist->get_uniquelist($nl->get_id) // $l_minbn; } else { # visibility is simply the full list $visible_names_bib = $count; } if ($logger->is_trace()) { # performance shortcut $logger->trace("Setting visible names (cite) for key '$citekey' to '$visible_names_cite'"); $logger->trace("Setting visible names (bib) for key '$citekey' to '$visible_names_bib'"); $logger->trace("Setting visible names (alpha) for key '$citekey' to '$visible_names_alpha'"); } # Need to set these on all name forms my $nlid = $be->get_field($n)->get_id; $dlist->set_visible_cite($nlid, $visible_names_cite); $dlist->set_visible_bib($nlid, $visible_names_bib); $dlist->set_visible_alpha($nlid, $visible_names_alpha); } } } =head2 process_labelalpha Generate the labelalpha and also the variant for sorting =cut sub process_labelalpha { my ($self, $citekey, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $be = $section->bibentry($citekey); my $bee = $be->get_field('entrytype'); # Don't add a label if skiplab is set for entry if (Biber::Config->getblxoption('skiplab', $bee, $citekey)) { return; } if ( my $la = Biber::Config->getblxoption('labelalpha', $be->get_field('entrytype')) ) { my ($label, $sortlabel) = $self->_genlabel($citekey, $dlist)->@*; $dlist->set_entryfield($citekey, 'labelalpha', $label); $dlist->set_entryfield($citekey, 'sortlabelalpha', $sortlabel); } } =head2 process_extraalpha Generate the extraalpha information =cut sub process_extraalpha { my ($self, $citekey, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $be = $section->bibentry($citekey); if (Biber::Config->getblxoption('labelalpha', $be->get_field('entrytype'))) { if (my $la = $dlist->get_entryfield($citekey, 'labelalpha')) { $dlist->incr_la_disambiguation($la); } } } =head2 process_presort Put presort fields for an entry into the main Biber bltx state so that it is all available in the same place since this can be set per-type and globally too. =cut sub process_presort { my $self = shift; my $citekey = shift; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $be = $section->bibentry($citekey); # We are treating presort as an option as it can be set per-type and globally too if (my $ps = $be->get_field('presort')) { Biber::Config->setblxoption('presort', $ps, 'ENTRY', $citekey); } } =head2 process_lists Process a bibliography list =cut sub process_lists { my $self = shift; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); foreach my $list ($self->datalists->get_lists_for_section($secnum)->@*) { my $lattrs = $list->get_attrs; my $ltype = $list->get_type; my $lname = $list->get_name; # sanitise state - essential in tests which call Biber::prepare() multiple times $list->reset_state; # Last-ditch fallback in case we still don't have a sorting spec $list->set_sortingnamekeytemplatename('global') unless $list->get_sortingnamekeytemplatename; $list->set_uniquenametemplatename('global') unless $list->get_uniquenametemplatename; $list->set_labelalphanametemplatename('global') unless $list->get_labelalphanametemplatename; $list->set_keys([ $section->get_citekeys ]); if ($logger->is_debug()) { # performance tune $logger->debug("Populated datalist '$lname' of type '$ltype' with attributes '$lattrs' in section $secnum with keys: " . join(', ', $list->get_keys->@*)); } # A datalist represents a biblatex refcontext # and many things are refcontext specific and so we need to use the right data. For # example labelalphanametemplate and uniquenametemplate can be set per-list and much # processing uses these unless (Biber::Config->getoption('tool')) { # Set this so that uniqueness processing starts $list->set_unul_changed(1); # Main processing loop, part 1 $self->process_entries_pre($list); # Generate uniqueness information $self->uniqueness($list); } # Generate visible names information for all entries $self->process_visible_names($list); unless (Biber::Config->getoption('tool')) { # Main processing loop, part 2 $self->process_entries_post($list); # Final processing loop $self->process_entries_final($list); } # Sorting $self->generate_sortdataschema($list); # generate the sort schema information $self->generate_sortinfo($list); # generate the sort information $self->sort_list($list); # sort the list $self->generate_contextdata($list) unless Biber::Config->getoption('tool'); # Filtering if (my $filters = $list->get_filters) { my $flist = []; KEYLOOP: foreach my $k ($list->get_keys->@*) { my $be = $section->bibentry($k); foreach my $f ($filters->@*) { # Filter disjunction is ok if any of the checks are ok, hence the grep() if (ref $f eq 'ARRAY') { next KEYLOOP unless grep {check_list_filter($k, $_->{type}, $_->{value}, $be)} $f->@*; } else { next KEYLOOP unless check_list_filter($k, $f->{type}, $f->{value}, $be); } } push $flist->@*, $k; } if ($logger->is_debug()) { # performance tune $logger->debug("Keys after filtering list '$lname' in section $secnum: " . join(', ', $flist->@*)); } $list->set_keys($flist); # Now save the sorted list in the list object } } return; } =head2 check_list_filter Run an entry through a list filter. Returns a boolean. =cut sub check_list_filter { my ($k, $t, $fs, $be) = @_; if ($logger->is_debug()) {# performance tune $logger->debug("Checking key '$k' against filter '$t=$fs'"); } if ($t eq 'type') { if ($be->get_field('entrytype') eq lc($fs)) { if ($logger->is_trace()) {# performance tune $logger->trace("Key '$k' passes against filter '$t=$fs'"); } } else { return 0; } } elsif ($t eq 'nottype') { if ($be->get_field('entrytype') eq lc($fs)) { return 0; } else { if ($logger->is_trace()) {# performance tune $logger->trace("Key '$k' passes against filter '$t=$fs'"); } } } elsif ($t eq 'subtype') { if ($be->field_exists('entrysubtype') and $be->get_field('entrysubtype') eq lc($fs)) { if ($logger->is_trace()) {# performance tune $logger->trace("Key '$k' passes against filter '$t=$fs'"); } } else { return 0; } } elsif ($t eq 'notsubtype') { if ($be->field_exists('entrysubtype') and $be->get_field('entrysubtype') eq lc($fs)) { return 0; } else { if ($logger->is_trace()) {# performance tune $logger->trace("Key '$k' passes against filter '$t=$fs'"); } } } elsif ($t eq 'keyword') { if ($be->has_keyword($fs)) { if ($logger->is_trace()) {# performance tune $logger->trace("Key '$k' passes against filter '$t=$fs'"); } } else { return 0; } } elsif ($t eq 'notkeyword') { if ($be->has_keyword($fs)) { return 0; } else { if ($logger->is_trace()) {# performance tune $logger->trace("Key '$k' passes against filter '$t=$fs'"); } } } elsif ($t eq 'field') { if ($be->field_exists($fs)) { if ($logger->is_trace()) {# performance tune $logger->trace("Key '$k' passes against filter '$t=$fs'"); } } else { return 0; } } elsif ($t eq 'notfield') { if ($be->field_exists($fs)) { return 0; } else { if ($logger->is_trace()) {# performance tune $logger->trace("Key '$k' passes against filter '$t=$fs'"); } } } return 1; } =head2 generate_sortdataschema Generate sort data schema for Sort::Key from sort spec like this: spec => [ [undef, { presort => {} }], [{ final => 1 }, { sortkey => {} }], [ {'sort_direction' => 'descending'}, { sortname => {} }, { author => {} }, { editor => {} }, { translator => {} }, { sorttitle => {} }, { title => {} }, ], [undef, { sortyear => {} }, { year => {} }], [undef, { sorttitle => {} }, { title => {} }], [undef, { volume => {} }, { "0000" => {} }], ], =cut sub generate_sortdataschema { my ($self, $list) = @_; my $dm = Biber::Config->get_dm; my $ds; my $schema; # Check if sorting templatename for the list contains anything ... if (keys Biber::Config->getblxoption('sortingtemplate')->{$list->get_sortingtemplatename}->%*) { $schema = Biber::Config->getblxoption('sortingtemplate')->{$list->get_sortingtemplatename}; } else { # ... fall back to global default if named template does not exist $schema = Biber::Config->getblxoption('sortingtemplate')->{Biber::Config->getblxoption('sortingtemplatename')}; } $list->set_sortingtemplate($schema); # link the sort schema into the list foreach my $sort ($schema->{spec}->@*) { # Assume here that every item in a sorting spec section is the same datatype # See header for data structure my $direction = ''; while (my ($sopt, $val) = each $sort->[0]->%*) { if ($sopt eq 'sort_direction') { if ($val eq 'descending') { $direction = '-'; } } } my $spec = $dm->{sortdataschema}->([keys $sort->[1]->%*]->[0]); push $ds->@*, {spec => "$direction$spec", $spec => 1}; # Speed shortcut for sortkey extraction sub } $list->set_sortdataschema($ds); return; } =head2 generate_sortinfo Generate information for sorting =cut sub generate_sortinfo { my ($self, $dlist) = @_; foreach my $key ($dlist->get_keys->@*) { $self->_generatesortinfo($key, $dlist); } return; } =head2 uniqueness Generate the uniqueness information needed when creating .bbl =cut sub uniqueness { my ($self, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); # Generate uniqueness information according to this algorithm: # 1. Generate uniquename if uniquename option is set # 2. if (uniquelist has never run before OR step 1 changed any uniquename values) { # goto step 3 # } else { return } # 3. Completely regenerate uniquelist if uniquelist option is set # 4. if (step 3 changed any uniquelist values) { # goto step 1 # } else { return } # uniquelist can never shorten to a list shorter than maxcitenames because: # * Shortening a list can't make it unique # * You can't lengthen it if the list is shorter than maxcitenames because there # is no more information to add that you don't already have. # uniquelist cannot be less than mincitenames as the list is either unambiguous # at mincitenames or it isn't and uniquelist needs more information by adding items # Set a flag for first uniquelist pass. This is a special case as we always want to run # at least one uniquelist pass if requested, regardless of unul_done global flag. my $first_ul_pass = 1; # Generate uniquename information, if requested while ('true') { unless ($dlist->get_unul_done) { if ($logger->is_debug()) {# performance tune $logger->debug("Entering uniquename processing"); } $dlist->set_unul_changed(0); # reset state for global unul changed flag $self->create_uniquename_info($dlist); $self->generate_uniquename($dlist); } else { last; # uniquename/uniquelist disambiguation is finished as nothing changed } # Generate uniquelist information, if requested # Always run uniquelist at least once, if requested if ($first_ul_pass or not $dlist->get_unul_done) { if ($logger->is_debug()) {# performance tune $logger->debug("Entering uniquelist processing"); } $dlist->set_unul_changed(0); # reset state for global unul changed flag $first_ul_pass = 0; # Ignore special case when uniquelist has run once $self->create_uniquelist_info($dlist); $self->generate_uniquelist($dlist); } else { last; # uniquename/uniquelist disambiguation is finished as nothing changed } } return; } =head2 create_uniquename_info Gather the uniquename information as we look through the names What is happening in here is the following: We are registering the number of occurrences of each name, name+init and fullname within a specific context. For example, the context is "global" with uniquename < 5 and "name list" for uniquename=5 or 6. The keys we store to count this are the most specific information for the context, so, for uniquename < 5, this is the full name and for uniquename=5 or 6, this is the complete list of full names. These keys have values in a hash which are ignored. They serve only to accumulate repeated occurrences with the context and we don't care about this and so the values are a useful sinkhole for such repetition. For example, if we find in the global context a base name "Smith" in two different entries under the same form "Alan Smith", the data structure will look like: {Smith}->{global}->{Alan Smith} = 2 We don't care about the value as this means that there are 2 "Alan Smith"s in the global context which need disambiguating identically anyway. So, we just count the keys for the base name "Smith" in the global context to see how ambiguous the base name itself is. This would be "1" and so "Alan Smith" would get uniquename=0 because it's unambiguous as just "Smith". The same goes for "minimal" list context disambiguation for uniquename=5 or 6. For example, if we had the base name "Smith" to disambiguate in two entries with labelname "John Smith and Alan Jones", the data structure would look like: {Smith}->{Smith+Jones}->{John Smith+Alan Jones} = 2 Again, counting the keys of the context for the base name gives us "1" which means we have uniquename=0 for "John Smith" in both entries because it's the same list. This also works for repeated names in the same list "John Smith and Bert Smith". Disambiguating "Smith" in this: {Smith}->{Smith+Smith}->{John Smith+Bert Smith} = 2 So both "John Smith" and "Bert Smith" in this entry get uniquename=0 (of course, as long as there are no other "X Smith and Y Smith" entries where X != "John" or Y != "Bert"). The values from biblatex.sty: false = 0 init = 1 true = 2 full = 2 allinit = 3 allfull = 4 mininit = 5 minfull = 6 =cut sub create_uniquename_info { my ($self, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $bibentries = $section->bibentries; # Reset uniquename information as we have to generate it # again because uniquelist information might have changed $dlist->reset_uniquenamecount; foreach my $citekey ( $section->get_citekeys ) { my $be = $bibentries->entry($citekey); my $bee = $be->get_field('entrytype'); next unless my $un = Biber::Config->getblxoption('uniquename', $bee, $citekey); if ($logger->is_trace()) {# performance tune $logger->trace("Generating uniquename information for '$citekey'"); } if (my $lni = $be->get_labelname_info) { my $nl = $be->get_field($lni); my $nlid = $nl->get_id; # Set the index limit beyond which we don't look for disambiguating information my $ul = undef; # Not set if (defined($dlist->get_uniquelist($nlid))) { # If defined, $ul will always be >1, see comment in set_uniquelist() in Names.pm $ul = $dlist->get_uniquelist($nlid); } my $maxcn = Biber::Config->getblxoption('maxcitenames', $bee, $citekey); my $mincn = Biber::Config->getblxoption('mincitenames', $bee, $citekey); # Note that we don't determine if a name is unique here - # we can't, were still processing entries at this point. # Here we are just recording seen combinations of the basename plus # non-basename parts in both initial and full formats. # # A name scope can be either a complete single name or a list of names # depending on whether uniquename=min* or not # # Anything which has more than one combination for a given basename+non-basenameparts # would be uniquename = 2 unless even the full name doesn't disambiguate # and then it is left at uniquename = 0 my $num_names = $nl->count_names; my $names = $nl->names; # If name list was truncated in bib with "and others", this overrides maxcitenames my $morenames = $nl->get_morenames ? 1 : 0; my %truncnames; my @basenames; my @allnames; foreach my $n ($names->@*) { my $nid = $n->get_id; # We need to track two types of uniquename disambiguation here: # # 1. Information to disambiguate visible names from visible names # where "visibility" is governed by uniquelist/max/mincitenames. # This is the actual "uniquename" feature information. # 2. Information to disambiguate all names, regardless of visibility # This is needed for uniquelist because it needs to construct # hypothetical ambiguity information for every list position. # We want to record disambiguation information for visible names when: # uniquename = 3 (allinit) or 4 (allfull) # Uniquelist is set and a name appears before the uniquelist truncation # Uniquelist is not set and the entry has an explicit "and others" at the end # since this means that every name is less than maxcitenames by definition # Uniquelist is not set and a name list is shorter than the maxcitenames truncation # Uniquelist is not set, a name list is longer than the maxcitenames truncation # and the name appears before the mincitenames truncation if ($un == 3 or $un == 4 or ($ul and $n->get_index <= $ul) or $morenames or $num_names <= $maxcn or $n->get_index <= $mincn) { # implicitly, $num_names > $maxcn here $truncnames{$nid} = 1; if ($un == 5 or $un == 6) { push @basenames, $dlist->get_basenamestring($nlid, $nid); push @allnames, $dlist->get_namestring($nlid, $nid); } } } # Information for mininit ($un=5) or minfull ($un=6), here the basename # and non-basename is all names in the namelist, not just the current name my $min_basename; my $min_namestring; if ($un == 5 or $un == 6) { $min_basename = join("\x{10FFFD}", @basenames); $min_namestring = join("\x{10FFFD}", @allnames); if ($#basenames + 1 < $num_names or $morenames) { $min_basename .= "\x{10FFFD}et al"; # if truncated, record this $min_namestring .= "\x{10FFFD}et al"; # if truncated, record this } } foreach my $n ($names->@*) { my $nid = $n->get_id; my $basename = $dlist->get_basenamestring($nlid, $nid); my $namestring = $dlist->get_namestring($nlid, $nid); my $namestrings = $dlist->get_namestrings($nlid, $nid); my $namedisamiguationscope; my $nskey; # Disambiguation scope and key depend on the uniquename setting if ($un == 1 or $un == 2 or $un == 3 or $un ==4) { $namedisamiguationscope = 'global'; $nskey = join("\x{10FFFD}", $namestrings->@*); } elsif ($un == 5 or $un == 6) { $namedisamiguationscope = $min_basename; $nskey = $min_namestring; $dlist->set_unmininfo($nlid, $nid, $min_basename); } if ($truncnames{$nid}) { # Record uniqueness information entry for all name contexts # showing that they have been seen for this name key in this name scope foreach my $ns ($namestrings->@*) { $dlist->add_uniquenamecount($ns, $namedisamiguationscope, $nskey); } } # As above but here we are collecting (separate) information for all # names, regardless of visibility (needed to track uniquelist) if (Biber::Config->getblxoption('uniquelist', $bee, $citekey)) { foreach my $ns ($namestrings->@*) { $dlist->add_uniquenamecount_all($ns, $namedisamiguationscope, $nskey); } } } } } return; } =head2 generate_uniquename Generate the per-name uniquename values using the information harvested by create_uniquename_info() =cut sub generate_uniquename { my ($self, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $bibentries = $section->bibentries; # Now use the information to set the actual uniquename information foreach my $citekey ( $section->get_citekeys ) { my $be = $bibentries->entry($citekey); my $bee = $be->get_field('entrytype'); next unless my $un = Biber::Config->getblxoption('uniquename', $bee, $citekey); if ($logger->is_trace()) {# performance tune $logger->trace("Setting uniquename for '$citekey'"); } if (my $lni = $be->get_labelname_info) { my $nl = $be->get_field($lni); my $nlid = $nl->get_id; # Set the index limit beyond which we don't look for disambiguating information # If defined, $ul will always be >1, see comment in set_uniquelist() in Names.pm my $ul = $dlist->get_uniquelist($nlid); my $maxcn = Biber::Config->getblxoption('maxcitenames', $bee, $citekey); my $mincn = Biber::Config->getblxoption('mincitenames', $bee, $citekey); my $num_names = $nl->count_names; my $names = $nl->names; # If name list was truncated in bib with "and others", this overrides maxcitenames my $morenames = ($nl->get_morenames) ? 1 : 0; my %truncnames; foreach my $n ($names->@*) { my $nid = $n->get_id; if ($un == 3 or $un == 4 or ($ul and $n->get_index <= $ul) or $morenames or $num_names <= $maxcn or $n->get_index <= $mincn) { # implicitly, $num_names > $maxcn here $truncnames{$nid} = 1; } else { # Set anything now not visible due to uniquelist back to 0 $dlist->reset_uniquename($nlid, $nid); } } foreach my $n ($names->@*) { my $nid = $n->get_id; my $basename = $dlist->get_basenamestring($nlid, $nid); my $namestrings = $dlist->get_namestrings($nlid, $nid); my $namedisschema = $dlist->get_namedisschema($nlid, $nid); my $namescope = 'global'; # default if ($un == 5 or $un == 6) { $namescope = $dlist->get_unmininfo($nlid, $nid); # $un=5 and 6 } if ($truncnames{$nid}) { for (my $i=0; $i<=$namestrings->$#*; $i++) { my $ns = $namestrings->[$i]; my $nss = $namedisschema->[$i]; if ($dlist->get_numofuniquenames($ns, $namescope) == 1) { $dlist->set_uniquename($nlid, $nid, $nss); # We have found the most general disambiguation schema which disambiguates, # skip the rest since the schema array goes from most general to least general last; } } # Nothing disambiguates, set to just base of schema $dlist->set_uniquename($nlid, $nid, $namedisschema->[0]) unless defined($dlist->get_uniquename($nlid, $nid)); } # As above but not just for visible names (needed for uniquelist) if (Biber::Config->getblxoption('uniquelist', $bee, $citekey)) { for (my $i=0; $i<=$namestrings->$#*; $i++) { my $ns = $namestrings->[$i]; my $nss = $namedisschema->[$i]; if ($dlist->get_numofuniquenames_all($ns, $namescope) == 1) { $dlist->set_uniquename_all($nlid, $nid, $nss); # We have found the most general disambiguation schema which disambiguates, # skip the rest since the schema array goes from most general to least general last; } } # Nothing disambiguates, set to just base of schema $dlist->set_uniquename_all($nlid, $nid, $namedisschema->[0]) unless defined($dlist->get_uniquename_all($nlid, $nid)); } } } } return; } =head2 create_uniquelist_info Gather the uniquelist information as we look through the names =cut sub create_uniquelist_info { my ($self, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $bibentries = $section->bibentries; # Reset uniquelist information as we have to generate it again because uniquename # information might have changed $dlist->reset_uniquelistcount; foreach my $citekey ($section->get_citekeys) { my $be = $bibentries->entry($citekey); my $bee = $be->get_field('entrytype'); my $maxcn = Biber::Config->getblxoption('maxcitenames', $bee, $citekey); my $mincn = Biber::Config->getblxoption('mincitenames', $bee, $citekey); next unless my $ul = Biber::Config->getblxoption('uniquelist', $bee, $citekey); if ($logger->is_trace()) {# performance tune $logger->trace("Generating uniquelist information for '$citekey'"); } if (my $lni = $be->get_labelname_info) { my $nl = $be->get_field($lni); my $nlid = $nl->get_id; my $num_names = $nl->count_names; my $namelist = []; my $ulminyear_namelist = []; foreach my $n ($nl->names->@*) { my $nid = $n->get_id; my $basename = $dlist->get_basenamestring($nlid, $nid); my $namestrings = $dlist->get_namestrings($nlid, $nid); my $namedisschema = $dlist->get_namedisschema($nlid, $nid); my $ulminyearflag = 0; # uniquelist = minyear if ($ul == 2) { # minyear uniquename, we set based on the max/mincitenames list if ($num_names > $maxcn and $n->get_index <= $mincn) { $ulminyearflag = 1; } } my $unall = $dlist->get_uniquename_all($nlid, $nid); # uniquename is not set so generate uniquelist based on just base name if (not defined($unall) or $unall->[0] eq 'base') { push $namelist->@*, $basename; push $ulminyear_namelist->@*, $basename if $ulminyearflag; } else { for (my $i=0; $i<=$namedisschema->$#*; $i++) { my $nss = $namedisschema->[$i]; if (Compare($nss, $unall)) { push $namelist->@*, $namestrings->[$i]; push $ulminyear_namelist->@*, $namestrings->[$i] if $ulminyearflag; } } } $dlist->add_uniquelistcount($namelist); } # We need to know the list uniqueness counts for the whole list seperately otherwise # we will falsely "disambiguate" identical name lists from each other by setting # uniquelist to the full list because every part of each list will have more than # one count. We therefore need to distinguish counts which are of the final, complete # list of names. If there is more than one count for these, (meaning that there are # two or more identical name lists), we don't expand them at all as there is no point. $dlist->add_uniquelistcount_final($namelist); # Add count for uniquelist=minyear unless (Compare($ulminyear_namelist, [])) { $dlist->add_uniquelistcount_minyear($ulminyear_namelist, $be->get_field('labelyear'), $namelist); } } } return; } =head2 generate_uniquelist Generate the per-namelist uniquelist values using the information harvested by create_uniquelist_info() =cut sub generate_uniquelist { my ($self, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $bibentries = $section->bibentries; LOOP: foreach my $citekey ( $section->get_citekeys ) { my $be = $bibentries->entry($citekey); my $bee = $be->get_field('entrytype'); my $maxcn = Biber::Config->getblxoption('maxcitenames', $bee, $citekey); my $mincn = Biber::Config->getblxoption('mincitenames', $bee, $citekey); next unless my $ul = Biber::Config->getblxoption('uniquelist', $bee, $citekey); if ($logger->is_trace()) {# performance tune $logger->trace("Creating uniquelist for '$citekey'"); } if (my $lni = $be->get_labelname_info) { my $nl = $be->get_field($lni); my $nlid = $nl->get_id; my $namelist = []; my $num_names = $nl->count_names; foreach my $n ($nl->names->@*) { my $nid = $n->get_id; my $basename = $dlist->get_basenamestring($nlid, $nid); my $namestrings = $dlist->get_namestrings($nlid, $nid); my $namedisschema = $dlist->get_namedisschema($nlid, $nid); my $unall = $dlist->get_uniquename_all($nlid, $nid); # uniquename is not set so generate uniquelist based on just base name if (not defined($unall) or $unall->[0] eq 'base') { push $namelist->@*, $basename; } else { for (my $i=0; $i<=$namedisschema->$#*; $i++) { my $nss = $namedisschema->[$i]; if (Compare($nss, $unall)) { push $namelist->@*, $namestrings->[$i]; } } } # With uniquelist=minyear, uniquelist should not be set at all if there are # no other entries with the same max/mincitenames visible list and different years # to disambiguate from if ($ul == 2 and $num_names > $maxcn and $n->get_index <= $mincn and $dlist->get_uniquelistcount_minyear($namelist, $be->get_field('labelyear')) == 1) { if ($logger->is_trace()) {# performance tune $logger->trace("Not setting uniquelist=minyear for '$citekey'"); } next LOOP; } # list is unique after this many names so we set uniquelist to this point # Even if uniquelist=minyear, we record normal uniquelist information if # we didn't skip this key in the test above if ($dlist->get_uniquelistcount($namelist) == 1) { last; } } if ($logger->is_trace()) {# performance tune $logger->trace("Setting uniquelist for '$citekey' using " . join(',', $namelist->@*)); } $dlist->set_uniquelist($nl, $namelist, $maxcn, $mincn); } } return; } =head2 generate_contextdata Generate information for data which may changes per datalist =cut sub generate_contextdata { my ($self, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $dmh = Biber::Config->get_dm_helpers; # This loop critically depends on the order of the citekeys which # is why we have to do sorting before this foreach my $key ($dlist->get_keys->@*) { my $be = $section->bibentry($key); my $bee = $be->get_field('entrytype'); # Sort any set members according to the list sorting order of the keys. # This gets the indices of the set elements in the sorted datalist, sorts # them numerically and then extracts the actual citekeys to make a new # entryset field value which we store in the list metadata until output time. if ($be->get_field('entrytype') eq 'set') { my @es; if (Biber::Config->getblxoption('sortsets')) { my $setkeys = $be->get_field('entryset'); my $keys = $dlist->get_keys; my @sorted_setkeys; # Generate array of indices of set members in the main sorted datalist foreach my $elem ($setkeys->@*) { push @sorted_setkeys, first_index {$elem eq $_} $keys->@*; } # Sort the indices numerically (sorting has already been done so this is fine) # then get the actual citekeys using an array slice on the main sorted list @es = $keys->@[sort {$a <=> $b} @sorted_setkeys]; } else { @es = $be->get_field('entryset')->@*; } $dlist->set_entryfield($key, 'entryset', \@es); } # Only generate extra* information if skiplab is not set. # Don't forget that skiplab is implied for set members unless (Biber::Config->getblxoption('skiplab', $bee, $key)) { # extradate if (Biber::Config->getblxoption('labeldateparts', $bee)) { my $namedateparts = $dlist->get_entryfield($key, 'namedateparts'); if ($dlist->get_seen_namedateparts($namedateparts) > 1) { if ($logger->is_trace()) {# performance tune $logger->trace("namedateparts for '$namedateparts': " . $dlist->get_seen_namedateparts($namedateparts)); } my $v = $dlist->incr_seen_extradate($namedateparts); $dlist->set_extradatedata_for_key($key, $v); } } # extratitle if (Biber::Config->getblxoption('labeltitle', $bee)) { my $nametitle = $dlist->get_entryfield($key, 'nametitle'); if ($dlist->get_seen_nametitle($nametitle) > 1) { if ($logger->is_trace()) {# performance tune $logger->trace("nametitle for '$nametitle': " . $dlist->get_seen_nametitle($nametitle)); } my $v = $dlist->incr_seen_extratitle($nametitle); $dlist->set_extratitledata_for_key($key, $v); } } # extratitleyear if (Biber::Config->getblxoption('labeltitleyear', $bee)) { my $titleyear = $dlist->get_entryfield($key, 'titleyear'); if ($dlist->get_seen_titleyear($titleyear) > 1) { if ($logger->is_trace()) {# performance tune $logger->trace("titleyear for '$titleyear': " . $dlist->get_seen_titleyear($titleyear)); } my $v = $dlist->incr_seen_extratitleyear($titleyear); $dlist->set_extratitleyeardata_for_key($key, $v); } } # labelalpha # This works because labelalpha field is regenerated per-list if (Biber::Config->getblxoption('labelalpha', $bee)) { $dlist->set_labelalphadata_for_key($key, $dlist->get_entryfield($key, 'labelalpha')); } # extraalpha if (Biber::Config->getblxoption('labelalpha', $bee)) { my $la = $dlist->get_entryfield($key, 'labelalpha'); if ($dlist->get_la_disambiguation($la) > 1) { if ($logger->is_trace()) {# performance tune $logger->trace("labelalpha disambiguation for '$la': " . $dlist->get_la_disambiguation($la)); } my $v = $dlist->incr_seen_extraalpha($la); $dlist->set_extraalphadata_for_key($key, $v); } } } # uniquename # Using defined as 0 is a valid per-entry override of a global/per-entry setting if (defined(Biber::Config->getblxoption('uniquename', $bee, $key))) { foreach my $namefield ($dmh->{namelists}->@*) { if (my $nl = $be->get_field($namefield)) { my $nlid = $nl->get_id; foreach my $n ($nl->names->@*) { my $nid = $n->get_id; my $uniquename = $dlist->get_uniquename($nlid, $nid); my $namedisschema = $dlist->get_namedisschema($nlid, $nid); # Construct per-namepart uniquename value my %pnun; for (my $i=0; $i<=$namedisschema->$#*; $i++) { my $nss = $namedisschema->[$i]; if (Compare($uniquename, $nss)) { # Find where uniqueness is established, determine un settings up to this point my @dis = grep {$_->[0] ne 'base' and $_->[1] ne 'full'} $namedisschema->@[1..$i-1]; push @dis, $namedisschema->@[$i]; # normalise 'fullonly' to 'full' now that we have stripped all non-disambiguating elements %pnun = map {$_->[0] => ($_->[1] eq 'fullonly' ? 'full' : $_->[1])} @dis; last; } } foreach my $np ($n->get_nameparts) { my $npun = $UNIQUENAME_VALUES{$pnun{$np} // 'none'}; $npun //= 0; $dlist->set_unparts($nlid, $nid, $np, $npun); } } } } } } return; } =head2 generate_singletitle Generate the singletitle field, if requested. The information for generating this is gathered in process_workuniqueness() =cut sub generate_singletitle { my ($self, $citekey, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $bibentries = $section->bibentries; my $be = $bibentries->entry($citekey); if (Biber::Config->getblxoption('singletitle', $be->get_field('entrytype'))) { my $sn = $dlist->get_entryfield($citekey, 'seenname'); if (defined($sn) and $dlist->get_seenname($sn) < 2 ) { $dlist->set_entryfield($citekey, 'singletitle', 1); } } return; } =head2 generate_uniquetitle Generate the uniquetitle field, if requested. The information for generating this is gathered in process_workuniqueness() =cut sub generate_uniquetitle { my ($self, $citekey, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $bibentries = $section->bibentries; my $be = $bibentries->entry($citekey); if (Biber::Config->getblxoption('uniquetitle', $be->get_field('entrytype'))) { my $ut = $dlist->get_entryfield($citekey, 'seentitle'); if (defined($ut) and $dlist->get_seentitle($ut) < 2 ) { $dlist->set_entryfield($citekey, 'uniquetitle', 1); } } return; } =head2 generate_uniquebaretitle Generate the uniquebaretitle field, if requested. The information for generating this is gathered in process_workuniqueness() =cut sub generate_uniquebaretitle { my ($self, $citekey, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $bibentries = $section->bibentries; my $be = $bibentries->entry($citekey); if (Biber::Config->getblxoption('uniquebaretitle', $be->get_field('entrytype'))) { my $ubt = $dlist->get_entryfield($citekey, 'seenbaretitle'); if (defined($ubt) and $dlist->get_seenbaretitle($ubt) < 2 ) { $dlist->set_entryfield($citekey, 'uniquebaretitle', 1); } } return; } =head2 generate_uniquework Generate the uniquework field, if requested. The information for generating this is gathered in process_workuniqueness() =cut sub generate_uniquework { my ($self, $citekey, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $bibentries = $section->bibentries; my $be = $bibentries->entry($citekey); if (Biber::Config->getblxoption('uniquework', $be->get_field('entrytype'))) { if ($dlist->get_entryfield($citekey, 'seenwork') and $dlist->get_seenwork($dlist->get_entryfield($citekey, 'seenwork')) < 2 ) { if ($logger->is_trace()) { # performance tune $logger->trace("Setting uniquework for '$citekey'"); } $dlist->set_entryfield($citekey, 'uniquework', 1); } else { if ($logger->is_trace()) { # performance tune $logger->trace("Not setting uniquework for '$citekey'"); } } } return; } =head2 generate_uniquepa Generate the uniqueprimaryauthor field, if requested. The information for generating this is gathered in create_uniquename_info() =cut sub generate_uniquepa { my ($self, $citekey, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $bibentries = $section->bibentries; my $be = $bibentries->entry($citekey); if (Biber::Config->getblxoption('uniqueprimaryauthor')) { if ($dlist->get_entryfield($citekey, 'seenprimaryauthor') and $dlist->get_seenpa($dlist->get_entryfield($citekey, 'seenprimaryauthor')) < 2 ) { if ($logger->is_trace()) { # performance tune $logger->trace("Setting uniqueprimaryauthor for '$citekey'"); } $dlist->set_entryfield($citekey, 'uniqueprimaryauthor', 1); } else { if ($logger->is_trace()) { # performance tune $logger->trace("Not setting uniqueprimaryauthor for '$citekey'"); } } } return; } =head2 sort_list Sort a list using information in entries according to a certain sorting template. Use a flag to skip info messages on first pass =cut sub sort_list { my ($self, $dlist) = @_; my $sortingtemplate = $dlist->get_sortingtemplate; my $lsds = $dlist->get_sortdataschema; my @keys = $dlist->get_keys->@*; my $lstn = $dlist->get_sortingtemplatename; my $ltype = $dlist->get_type; my $lname = $dlist->get_name; my $llocale = locale2bcp47($sortingtemplate->{locale} || Biber::Config->getblxoption('sortlocale')); my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); if ($logger->is_debug()) {# performance tune if (Biber::Config->getoption('sortcase')) { $logger->debug("Sorting is by default case-SENSITIVE"); } else { $logger->debug("Sorting is by default case-INSENSITIVE"); } $logger->debug("Keys before sort:\n"); foreach my $k (@keys) { $logger->debug("$k => " . $dlist->get_sortdata_for_key($k)->[0]); } } if ($logger->is_trace()) { # performance shortcut $logger->trace("Sorting datalist '$lname' of type '$ltype' with sortingtemplate '$lstn'. Scheme is\n-------------------\n" . Data::Dump::pp($sortingtemplate) . "\n-------------------\n"); } # Set up locale. Order of priority is: # 1. locale value passed to Unicode::Collate::Locale->new() (Unicode::Collate sorts only) # 2. Biber sortlocale option # 3. Sorting 'locale' option # 4. Global biblatex 'sortlocale' option my $thislocale = Biber::Config->getoption('sortlocale') || $llocale; if ($logger->is_debug()) {# performance tune $logger->debug("Locale for sorting is '$thislocale'"); } if ( Biber::Config->getoption('fastsort') ) { biber_warn("fastsort option no longer required/supported, defaulting to UCA"); } my $collopts = Biber::Config->getoption('collate_options'); # UCA level 2 if case insensitive sorting is requested unless (Biber::Config->getoption('sortcase')) { $collopts->{level} = 2; } # Add upper_before_lower option $collopts->{upper_before_lower} = Biber::Config->getoption('sortupper'); # Create collation object my $Collator = Biber::UCollate->new($thislocale, $collopts->%*); my $UCAversion = $Collator->version(); $logger->info("Sorting list '$lname' of type '$ltype' with template '$lstn' and locale '$thislocale'"); if ($logger->is_debug()) {# performance tune $logger->debug("Sorting with Unicode::Collate (" . stringify_hash($collopts) . ", UCA version: $UCAversion, Locale: " . $Collator->getlocale . ")"); } # Log if U::C::L currently has no tailoring for used locale if ($Collator->getlocale eq 'default') { $logger->info("No sort tailoring available for locale '$thislocale'"); } # For collecting the collation object settings for retrieval in the sort key extractor my @collateobjs; # Instantiate Sort::Key sorter with correct data schema my $sorter = multikeysorter(map {$_->{spec}} $lsds->@*); # Sorting cache to shortcut expensive UCA keygen my $cache; # Construct data needed for sort key extractor foreach my $sortset ($sortingtemplate->{spec}->@*) { my $fc = ''; my @fc; # Re-instantiate collation object if a different locale is required for this sort item. # This can't be done in a ->change() method, has to be a new object. my $cobj; my $sl = locale2bcp47($sortset->[0]{locale}); if (defined($sl) and $sl ne $thislocale) { $cobj = 'Biber::UCollate->new(' . "'$sl'" . ",'" . join("','", $collopts->%*) . "')"; } else { $cobj = '$Collator'; } # If the case or upper option on a field is not the global default # set it locally on the $Collator by constructing a change() method call my $sc = $sortset->[0]{sortcase}; if (defined($sc) and $sc != Biber::Config->getoption('sortcase')) { push @fc, $sc ? 'level => 4' : 'level => 2'; } my $su = $sortset->[0]{sortupper}; if (defined($su) and $su != Biber::Config->getoption('sortupper')) { push @fc, $su ? 'upper_before_lower => 1' : 'upper_before_lower => 0'; } if (@fc) { # This field has custom collation options $fc = '->change(' . join(',', @fc) . ')'; } else { # Reset collation options to global defaults if there are no field options # We have to do this as ->change modifies the Collation object $fc = '->change(level => ' . $collopts->{level} . ' ,upper_before_lower => ' . $collopts->{upper_before_lower} . ')'; } push @collateobjs, $cobj . $fc; } # Sort::Key sort key extractor called on each element of array to be sorted and # returns an array of the sorting keys for each sorting field. We have to construct # the collator strings and then eval() because passing the collation # objects in directly by reference means that the wrong settings are present on some of them # since they point to the same object and the ->change() calls in later references # therefore change earlier sorting field sorts. So, we have to defer until actual use time. my $extract = sub { my @d; my $key = $keys[$_]; # Loop over all sorting fields for (my $i=0; $i<=$#{$dlist->get_sortdata_for_key($key)->[1]}; $i++) { my $sortfield = $dlist->get_sortdata_for_key($key)->[1][$i]; # Resolve real zeros back again if ($lsds->[$i]{int}) { # There is special cases to be careful of here in that "final" elements # in sorting copy themselves as strings to further sort fields and therefore # need coercing to 0 for int tests. Fallback of '0' for int fields should # be handled in the sorting spec otherwise this will be the default for missing # int fields. This means that entries with missing data for an int sort field will # always sort after int fields by default. # normalise all strings to a large int so that they sort after real ints # as a fallback push @d, looks_like_number($sortfield) ? $sortfield : 2000000000; } else { # Don't do '$sortfield' or "$sortfield" because it might contain quotes my $a = $collateobjs[$i] . "->getSortKey(q{$sortfield})"; # Cache index is just the collation object opts and key gen call in string form # since this should be unique for a key/collopts combination push @d, $cache->{$a} ||= eval $a; } } return @d; }; # We actually sort the indices of the keys array, as we need these in the extractor. # Then we extract the real keys with a map. This therefore follows the typical ST sort # semantics (plus an OM cache above due to expensive UCA key extraction). @keys = map {$keys[$_]} &$sorter($extract, 0..$#keys); if ($logger->is_debug()) {# performance tune for large @keys $logger->debug("Keys after sort:\n"); foreach my $k (@keys) { $logger->debug("$k => " . $dlist->get_sortdata_for_key($k)->[0]); } } $dlist->set_keys([ @keys ]); return; } =head2 preprocess_options Preprocessing for options. Used primarily to perform process-intensive operations which can be done once instead of inside dense loops later. =cut sub preprocess_options { # nosort - compile regexps if (my $nosort = Biber::Config->getoption('nosort')) { foreach my $nsopt ($nosort->@*) { my $re = $nsopt->{value}; $nsopt->{value} = qr/$re/; } } # nolabel - compile regexps if (my $nolabel = Biber::Config->getoption('nolabel')) { foreach my $nsopt ($nolabel->@*) { my $re = $nsopt->{value}; $nsopt->{value} = qr/$re/; } } # noinit - compile regexps if (my $noinit = Biber::Config->getoption('noinit')) { foreach my $nsopt ($noinit->@*) { my $re = $nsopt->{value}; $nsopt->{value} = qr/$re/; } } return; } =head2 prepare Do the main work. Process and sort all entries before writing the output. =cut sub prepare { my $self = shift; my $out = $self->get_output_obj; # Biber::Output object # Place to put global pre-processing things $self->process_setup; foreach my $section ($self->sections->get_sections->@*) { # shortcut - skip sections that don't have any keys next unless $section->get_citekeys or $section->is_allkeys; my $secnum = $section->number; $logger->info("Processing section $secnum"); $section->reset_caches; # Reset the the section caches Biber::Config->_init; # (re)initialise Config object $self->set_current_section($secnum); # Set the section number we are working on $self->preprocess_options; # Preprocess any options $self->fetch_data; # Fetch cited key and dependent data from sources $self->process_citekey_aliases; # Remove citekey aliases from citekeys $self->instantiate_dynamic; # Instantiate any dynamic entries (sets, related) $self->resolve_alias_refs; # Resolve xref/crossref/xdata aliases to real keys $self->resolve_xdata; # Resolve xdata entries $self->cite_setmembers; # Cite set members $self->preprocess_sets; # Record set information $self->process_interentry; # Process crossrefs/xrefs etc. $self->validate_datamodel; # Check against data model $self->postprocess_sets; # Add options to set members etc. $self->process_entries_static; # Generate static entry data not depedent on lists $self->process_lists; # Process the output lists $out->create_output_section; # Generate and push the section output into the # output object ready for writing } $out->create_output_misc; # Generate and push the final misc bits of output # into the output object ready for writing return; } =head2 prepare_tool Do the main work for tool mode =cut sub prepare_tool { my $self = shift; my $out = $self->get_output_obj; # Biber::Output object # Place to put global pre-processing things $self->process_setup_tool; # tool mode only has a section '99999' my $secnum = 99999; my $section = $self->sections->get_section($secnum); $section->reset_caches; # Reset the the section caches (sorting, label etc.) Biber::Config->_init; # (re)initialise Config object $self->set_current_section($secnum); # Set the section number we are working on $self->preprocess_options; # Preprocess any options $self->fetch_data; # Fetch cited key and dependent data from sources if (Biber::Config->getoption('output_resolve_xdata') or Biber::Config->getoption('output_resolve_crossrefs')) { $self->resolve_alias_refs; # Resolve xref/crossref/xdata aliases to real keys } if (Biber::Config->getoption('output_resolve_sets')) { $self->preprocess_sets; # Record set information } if (Biber::Config->getoption('output_resolve_crossrefs')) { $self->process_interentry; # Process crossrefs/xrefs etc. } if (Biber::Config->getoption('output_resolve_xdata')) { $self->resolve_xdata; # Resolve xdata entries } $self->validate_datamodel; # Check against data model $self->process_lists; # process the output lists (sort and filtering) $out->create_output_section; # Generate and push the section output into the # into the output object ready for writing return; } =head2 fetch_data Fetch citekey and dependents data from section datasources Expects to find datasource packages named: Biber::Input:::: and one defined subroutine called: Biber::Input::::::extract_entries which takes args: 1: Biber object 2: Datasource name 3: Reference to an array of cite keys to look for and returns an array of the cite keys it did not find in the datasource =cut sub fetch_data { my $self = shift; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $dm = Biber::Config->get_dm; # Only looking for static keys, dynamic key entries are not in any datasource ... my @citekeys = $section->get_static_citekeys; no strict 'refs'; # symbolic references below ... # Clear all T::B macro definitions between sections if asked as T::B never clears these if (Biber::Config->getoption('clrmacros')) { if ($logger->is_debug()) {# performance tune $logger->debug('Clearing Text::BibTeX macros definitions'); } Text::BibTeX::delete_all_macros(); } # (Re-)define the old BibTeX month macros to what biblatex wants unless user stops this unless (Biber::Config->getoption('nostdmacros')) { my %months = ('jan' => '1', 'feb' => '2', 'mar' => '3', 'apr' => '4', 'may' => '5', 'jun' => '6', 'jul' => '7', 'aug' => '8', 'sep' => '9', 'oct' => '10', 'nov' => '11', 'dec' => '12'); foreach my $mon (keys %months) { Text::BibTeX::delete_macro($mon); Text::BibTeX::add_macro_text($mon, $months{$mon}); } } # First we look for the directly cited keys in each datasource my @remaining_keys = @citekeys; if ($logger->is_debug()) {# performance tune $logger->debug('Looking for directly cited keys: ' . join(', ', @remaining_keys)); } foreach my $datasource ($section->get_datasources->@*) { # shortcut if we have found all the keys now last unless (@remaining_keys or $section->is_allkeys); my $type = $datasource->{type}; my $name = $datasource->{name}; my $datatype = $datasource->{datatype}; if ($datatype eq 'biblatexml') { my $outfile; if (Biber::Config->getoption('tool')) { my $exts = join('|', values %DS_EXTENSIONS); $outfile = Biber::Config->getoption('dsn') =~ s/\.(?:$exts)$/.rng/r; } else { $outfile = Biber::Config->getoption('bcf') =~ s/bcf$/rng/r; } # Generate schema for datasource unless (Biber::Config->getoption('no_bltxml_schema')) { $dm->generate_bltxml_schema($outfile); } if (Biber::Config->getoption('validate_bltxml')) { validate_biber_xml($name, 'bltx', 'http://biblatex-biber.sourceforge.net/biblatexml', $outfile); } } my $package = 'Biber::Input::' . $type . '::' . $datatype; eval "require $package" or biber_error("Error loading data source package '$package': $@"); # Slightly different message for tool mode if (Biber::Config->getoption('tool')) { $logger->info("Looking for $datatype format $type '$name'"); } else { $logger->info("Looking for $datatype format $type '$name' for section $secnum"); } @remaining_keys = "${package}::extract_entries"->($name, \@remaining_keys); } # error reporting if ($logger->is_debug()) {# performance tune $logger->debug("Directly cited keys not found for section '$secnum': " . join(',', @remaining_keys)); } foreach my $citekey (@remaining_keys) { biber_warn("I didn't find a database entry for '$citekey' (section $secnum)"); $section->del_citekey($citekey); $section->add_undef_citekey($citekey); } # Don't need to do dependent detection if running in (real) tool mode since this is always # allkeys=1 and we don't care about missing dependents which get_dependents() might prune. # pseudo_tool mode is bibtex output when not in tool mode. Internally, it's essentially # the same but without allkeys. if (Biber::Config->getoption('tool') and not Biber::Config->getoption('pseudo_tool')) { return; } if ($logger->is_debug()) {# performance tune $logger->debug('Building dependents for keys: ' . join(',', $section->get_citekeys)); } # dependent key list generation - has to be a sub as it's recursive to catch # nested crossrefs, xdata etc. get_dependents($self, [$section->get_citekeys]); if ($logger->is_debug()) {# performance tune $logger->debug("Citekeys for section '$secnum' after fetching data: " . join(', ', $section->get_citekeys)); } return; } =head2 get_dependents Get dependents of the entries for a given list of citekeys. Is called recursively until there are no more dependents to look for. =cut sub get_dependents { my ($self, $keys, $keyswithdeps, $missing) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $new_deps; $keyswithdeps = $keyswithdeps // []; $missing = $missing // []; no strict 'refs'; # symbolic references below ... foreach my $citekey ($keys->@*) { # aliases need resolving here and are treated as dependents if (my $real = $section->get_citekey_alias($citekey)) { if ($logger->is_debug()) {# performance tune $logger->debug("Alias '$citekey' requires real key '$real'"); } push $new_deps->@*, $real; push $keyswithdeps->@*, $real unless first {$real eq $_} $keyswithdeps->@*; } # Dynamic sets don't exist yet but their members do elsif (my @dmems = $section->get_dynamic_set($citekey)) { # skip looking for dependent if it's already there foreach my $dm (@dmems) { unless ($section->bibentry($dm)) { push $new_deps->@*, $dm; push $keyswithdeps->@*, $citekey unless first {$citekey eq $_} $keyswithdeps->@*; } } if ($logger->is_debug()) {# performance tune $logger->debug("Dynamic set entry '$citekey' has members: " . join(', ', @dmems)); } } else { # This must exist for all but dynamic sets my $be = $section->bibentry($citekey); # xdata if (my $xdata = $be->get_field('xdata')) { foreach my $xdatum ($xdata->@*) { # skip looking for dependent if it's already there (loop suppression) push $new_deps->@*, $xdatum unless $section->bibentry($xdatum); if ($logger->is_debug()) {# performance tune $logger->debug("Entry '$citekey' has xdata '$xdatum'"); } push $keyswithdeps->@*, $citekey unless first {$citekey eq $_} $keyswithdeps->@*; } } # xrefs if (my $refkey = $be->get_field('xref')) { # skip looking for dependent if it's already there (loop suppression) push $new_deps->@*, $refkey unless $section->bibentry($refkey); if ($logger->is_debug()) {# performance tune $logger->debug("Entry '$citekey' has xref '$refkey'"); } push $keyswithdeps->@*, $citekey unless first {$citekey eq $_} $keyswithdeps->@*; } # crossrefs if (my $refkey = $be->get_field('crossref')) { # skip looking for dependent if it's already there (loop suppression) push $new_deps->@*, $refkey unless $section->bibentry($refkey); if ($logger->is_debug()) {# performance tune $logger->debug("Entry '$citekey' has crossref '$refkey'"); } push $keyswithdeps->@*, $citekey unless first {$citekey eq $_} $keyswithdeps->@*; } # static sets if ($be->get_field('entrytype') eq 'set') { my $smems = $be->get_field('entryset'); # skip looking for dependent if it's already there (loop suppression) foreach my $sm ($smems->@*) { unless ($section->has_citekey($sm)) { push $new_deps->@*, $sm; push $keyswithdeps->@*, $citekey unless first {$citekey eq $_} $keyswithdeps->@*; } } if ($logger->is_debug()) {# performance tune $logger->debug("Static set entry '$citekey' has members: " . join(', ', $smems->@*)); } } # Related entries if (my $relkeys = $be->get_field('related')) { # skip looking for dependent if it's already there (loop suppression) foreach my $rm ($relkeys->@*) { unless ($section->has_citekey($rm) or $section->is_related($rm)) { # record that $rm is used as a related entry key $section->add_related($rm); push $new_deps->@*, $rm; push $keyswithdeps->@*, $citekey unless first {$citekey eq $_} $keyswithdeps->@*; } } if ($logger->is_debug()) {# performance tune $logger->debug("Entry '$citekey' has related entries: " . join(', ', $relkeys->@*)); } } } } # Remove repeated keys which are dependents of more than one entry $new_deps->@* = uniq $new_deps->@*; if ($new_deps->@*) { # Now look for the dependents of the directly cited keys if ($logger->is_debug()) {# performance tune $logger->debug('Looking for dependent keys: ' . join(', ', $new_deps->@*)); } # No need to go back to the datasource if allkeys, just see if the keys # are in section if ($section->is_allkeys) { foreach my $dk ($new_deps->@*) { push $missing->@*, $dk unless $section->has_citekey($dk); } } else { $missing->@* = $new_deps->@*; foreach my $datasource ($section->get_datasources->@*) { # shortcut if we have found all the keys now last unless $missing->@*; my $type = $datasource->{type}; my $name = $datasource->{name}; my $datatype = $datasource->{datatype}; my $package = 'Biber::Input::' . $type . '::' . $datatype; eval "require $package" or biber_error("Error loading data source package '$package': $@"); $missing->@* = "${package}::extract_entries"->($name, $missing); } } if ($logger->is_debug()) {# performance tune $logger->debug("Dependent keys not found for section '$secnum': " . join(', ', $missing->@*)); } foreach my $missing_key ($missing->@*) { # Remove the missing key from the list to recurse with $new_deps->@* = grep { $_ ne $missing_key } $new_deps->@*; } } # recurse if there are more things to find if ($logger->is_trace()) {# performance tune $logger->trace('Recursing in get_dependents with: ' . join(', ', $new_deps->@*)); } get_dependents($self, $new_deps, $keyswithdeps) if $new_deps->@*; # Now remove any missing entries from various places in all entries we have flagged # as having dependendents. If we don't do this, many things fail later like clone creation # for related entries etc. foreach my $keywithdeps ($keyswithdeps->@*) { foreach my $missing_key ($missing->@*) { $self->remove_undef_dependent($keywithdeps, $missing_key); } } return; # bottom of recursion } =head2 remove_undef_dependent Remove undefined dependent keys from an entry using a map of dependent keys to entries =cut sub remove_undef_dependent { my $self = shift; my ($citekey, $missing_key) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); if ($logger->is_debug()) {# performance tune $logger->debug("Removing dependency on missing key '$missing_key' from '$citekey' in section '$secnum'"); } # remove from any dynamic keys if (my @dmems = $section->get_dynamic_set($citekey)){ if (first {$missing_key eq $_} @dmems) { $section->set_dynamic_set($citekey, grep {$_ ne $missing_key} @dmems); if ($logger->is_trace()) {# performance tune $logger->trace("Removed dynamic set dependency for missing key '$missing_key' from '$citekey' in section '$secnum'"); } biber_warn("I didn't find a database entry for dynamic set member '$missing_key' - ignoring (section $secnum)"); } } else { my $be = $section->bibentry($citekey); # remove any xrefs if ($be->get_field('xref') and ($be->get_field('xref') eq $missing_key)) { $be->del_field('xref'); biber_warn("I didn't find a database entry for xref '$missing_key' in entry '$citekey' - ignoring (section $secnum)"); } # remove any crossrefs if ($be->get_field('crossref') and ($be->get_field('crossref') eq $missing_key)) { $be->del_field('crossref'); if ($logger->is_trace()) {# performance tune $logger->trace("Removed crossref dependency for missing key '$missing_key' from '$citekey' in section '$secnum'"); } biber_warn("I didn't find a database entry for crossref '$missing_key' in entry '$citekey' - ignoring (section $secnum)"); } # remove xdata if (my $xdata = $be->get_field('xdata')) { if (first {$missing_key eq $_} $xdata->@*) { $be->set_datafield('xdata', [ grep {$_ ne $missing_key} $xdata->@* ]) ; if ($logger->is_trace()) {# performance tune $logger->trace("Removed xdata dependency for missing key '$missing_key' from '$citekey' in section '$secnum'"); } biber_warn("I didn't find a database entry for xdata entry '$missing_key' in entry '$citekey' - ignoring (section $secnum)"); } } # remove static sets if ($be->get_field('entrytype') eq 'set') { my $smems = $be->get_field('entryset'); if (first {$missing_key eq $_} $smems->@*) { $be->set_datafield('entryset', [ grep {$_ ne $missing_key} $smems->@* ]); if ($logger->is_trace()) {# performance tune $logger->trace("Removed static set dependency for missing key '$missing_key' from '$citekey' in section '$secnum'"); } biber_warn("I didn't find a database entry for static set member '$missing_key' in entry '$citekey' - ignoring (section $secnum)"); } } # remove related entries if (my $relkeys = $be->get_field('related')) { if (first {$missing_key eq $_} $relkeys->@*) { $be->set_datafield('related', [ grep {$_ ne $missing_key} $relkeys->@* ]); # If no more related entries, remove the other related fields unless ($be->get_field('related')) { $be->del_field('relatedtype'); $be->del_field('relatedstring'); if ($logger->is_trace()) {# performance tune $logger->trace("Removed related entry dependency for missing key '$missing_key' from '$citekey' in section '$secnum'"); } } biber_warn("I didn't find a database entry for related entry '$missing_key' in entry '$citekey' - ignoring (section $secnum)"); } } } return; } =head2 _parse_sort Convenience sub to parse a .bcf sorting section and return nice sorting object =cut sub _parse_sort { my $root_obj = shift; my $sorting; foreach my $sort (sort {$a->{order} <=> $b->{order}} $root_obj->{sort}->@*) { my $sortingitems; # Generate sorting pass structures foreach my $sortitem (sort {$a->{order} <=> $b->{order}} $sort->{sortitem}->@*) { my $sortitemattributes = {}; if (defined($sortitem->{substring_side})) { # Found sorting substring side attribute $sortitemattributes->{substring_side} = $sortitem->{substring_side}; } if (defined($sortitem->{substring_width})) { # Found sorting substring length attribute $sortitemattributes->{substring_width} = $sortitem->{substring_width}; } if (defined($sortitem->{pad_width})) { # Found sorting pad length attribute $sortitemattributes->{pad_width} = $sortitem->{pad_width}; } if (defined($sortitem->{pad_char})) { # Found sorting pad char attribute $sortitemattributes->{pad_char} = $sortitem->{pad_char}; } if (defined($sortitem->{pad_side})) { # Found sorting pad side attribute $sortitemattributes->{pad_side} = $sortitem->{pad_side}; } push $sortingitems->@*, {$sortitem->{content} => $sortitemattributes}; } # Only push a sortitem if defined. # Also, we only push the sort attributes if there are any sortitems otherwise # we end up with a blank sort my $sopts; $sopts->{final} = $sort->{final} if defined($sort->{final}); $sopts->{sort_direction} = $sort->{sort_direction} if defined($sort->{sort_direction}); $sopts->{sortcase} = $sort->{sortcase} if defined($sort->{sortcase}); $sopts->{sortupper} = $sort->{sortupper} if defined($sort->{sortupper}); $sopts->{locale} = $sort->{locale} if defined($sort->{locale}); if (defined($sortingitems)) { unshift $sortingitems->@*, $sopts; push $sorting->@*, $sortingitems; } } return {locale => locale2bcp47($root_obj->{locale} || Biber::Config->getblxoption('sortlocale')), spec => $sorting}; } =head2 _filedump and _stringdump Dump the biber object with Data::Dump for debugging =cut sub _filedump { my ($self, $file) = @_; my $fh = IO::File->new($file, '>') or croak "Can't open file $file for writing"; print $fh Data::Dump::pp($self); close $fh; return } sub _stringdump { my $self = shift ; return Data::Dump::pp($self); } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber000755000153000001 013205066062 15272 5ustar00vboxother000000000000biblatex-biber-2.9/lib/Biber/DataModel.pm000444000153000001 17415313205066062 17672 0ustar00vboxother000000000000package Biber::DataModel; use v5.24; use strict; use warnings; no autovivification; use List::Util qw( first ); use Biber::Config; use Biber::Utils; use Biber::Constants; use Data::Dump qw( pp ); use Log::Log4perl qw( :no_extra_logdie_message ); =encoding utf-8 =head1 NAME Biber::DataModel =cut my $logger = Log::Log4perl::get_logger('main'); =head2 new Initialize a Biber::DataModel object =cut sub new { my $class = shift; my $dm = shift; my $self; $self = bless {}, $class; # use Data::Dump;dd($dm);exit 0; # Early check for fatal datamodel errors # Make sure dates are named *date. A lot of code relies on this. foreach my $date (grep {$_->{datatype} eq 'date'} $dm->{fields}{field}->@*) { unless ($date->{content} =~ m/date$/) { biber_error("Fatal datamodel error: date field '" . $date->{content} . "' must end with string 'date'"); } } # Pull out legal entrytypes, fields and constraints and make lookup hash # for quick tests later foreach my $f ($dm->{fields}{field}->@*) { # In case of conflicts, we need to remove the previous definitions since # later overrides earlier if (my $previous = $self->{fieldsbyname}{$f->{content}}) { if ($f->{format}) { $self->{fieldsbytype}{$previous->{fieldtype}}{$previous->{datatype}}{$previous->{format}}->@* = grep {$_ ne $f->{content}} $self->{fieldsbytype}{$previous->{fieldtype}}{$previous->{datatype}}{$previous->{format}}->@*; } $self->{fieldsbytype}{$previous->{fieldtype}}{$previous->{datatype}}{'*'}->@* = grep {$_ ne $f->{content}} $self->{fieldsbytype}{$previous->{fieldtype}}{$previous->{datatype}}{'*'}->@*; $self->{fieldsbyfieldtype}{$previous->{fieldtype}}->@* = grep {$_ ne $f->{content}} $self->{fieldsbyfieldtype}{$previous->{fieldtype}}->@*; $self->{fieldsbydatatype}{$previous->{datatype}}->@* = grep {$_ ne $f->{content}} $self->{fieldsbydatatype}{$previous->{datatype}}->@*; $self->{fieldsbyformat}{$previous->{'format'}}->@* = grep {$_ ne $f->{content}} $self->{fieldsbyformat}{$previous->{format}}->@*; delete $self->{fieldsbyname}{$f->{content}}; } $self->{fieldsbyname}{$f->{content}} = {'fieldtype' => $f->{fieldtype}, 'datatype' => $f->{datatype}, 'format' => $f->{format} || 'default'}; if ($f->{format}) { push $self->{fieldsbytype}{$f->{fieldtype}}{$f->{datatype}}{$f->{format}}->@*, $f->{content}; } push $self->{fieldsbytype}{$f->{fieldtype}}{$f->{datatype}}{'*'}->@*, $f->{content}; push $self->{fieldsbyfieldtype}{$f->{fieldtype}}->@*, $f->{content}; push $self->{fieldsbydatatype}{$f->{datatype}}->@*, $f->{content}; push $self->{fieldsbyformat}{$f->{format} || 'default'}->@*, $f->{content}; # check null_ok if ($f->{nullok}) { $self->{fieldsbyname}{$f->{content}}{nullok} = 1; } # check skips - fields we don't want to output to .bbl if ($f->{skip_output}) { $self->{fieldsbyname}{$f->{content}}{skipout} = 1; } } my $constants; foreach my $constant ($dm->{constants}{constant}->@*) { $self->{constants}{$constant->{name}}{type} = $constant->{type}; $self->{constants}{$constant->{name}}{value} = $constant->{content}; } my $leg_ents; foreach my $et ($dm->{entrytypes}{entrytype}->@*) { my $es = $et->{content}; # Skip output flag for certain entrytypes if ($et->{skip_output}) { $leg_ents->{$es}{skipout} = 1; } # fields for entrytypes my $lfs; foreach my $ef ($dm->{entryfields}->@*) { # Found a section describing legal fields for entrytype if (not exists($ef->{entrytype}) or grep {$_->{content} eq $es} $ef->{entrytype}->@*) { foreach my $f ($ef->{field}->@*) { $lfs->{$f->{content}} = 1; } } } # constraints my $constraints; foreach my $cd ($dm->{constraints}->@*) { # Found a section describing constraints for entrytype if (not exists($cd->{entrytype}) or grep {$_->{content} eq $es} $cd->{entrytype}->@*) { foreach my $c ($cd->{constraint}->@*) { if ($c->{type} eq 'mandatory') { # field foreach my $f ($c->{field}->@*) { push $constraints->{mandatory}->@*, $f->{content}; } # xor set of fields # [ XOR, field1, field2, ... , fieldn ] foreach my $fxor ($c->{fieldxor}->@*) { my $xorset; foreach my $f ($fxor->{field}->@*) { push $xorset->@*, $f->{content}; } unshift $xorset->@*, 'XOR'; push $constraints->{mandatory}->@*, $xorset; } # or set of fields # [ OR, field1, field2, ... , fieldn ] foreach my $for ($c->{fieldor}->@*) { my $orset; foreach my $f ($for->{field}->@*) { push $orset->@*, $f->{content}; } unshift $orset->@*, 'OR'; push $constraints->{mandatory}->@*, $orset; } } # Conditional constraints # [ ANTECEDENT_QUANTIFIER # [ ANTECEDENT LIST ] # CONSEQUENT_QUANTIFIER # [ CONSEQUENT LIST ] # ] elsif ($c->{type} eq 'conditional') { my $cond; $cond->[0] = $c->{antecedent}{quant}; $cond->[1] = [ map { $_->{content} } $c->{antecedent}{field}->@* ]; $cond->[2] = $c->{consequent}{quant}; $cond->[3] = [ map { $_->{content} } $c->{consequent}{field}->@* ]; push $constraints->{conditional}->@*, $cond; } # data constraints elsif ($c->{type} eq 'data') { my $data; $data->{fields} = [ map { $_->{content} } $c->{field}->@* ]; $data->{datatype} = $c->{datatype}; $data->{rangemin} = $c->{rangemin}; $data->{rangemax} = $c->{rangemax}; $data->{pattern} = $c->{pattern}; push $constraints->{data}->@*, $data; } } } } $leg_ents->{$es}{legal_fields} = $lfs; $leg_ents->{$es}{constraints} = $constraints; } $self->{entrytypesbyname} = $leg_ents; # Calculate and store some convenient lists of DM fields. This is to save the expense # of constructing these in dense loops like entry processing/output. # Mostly only used for .bbl output since that's the most commonly used one and so # we care about performance there. Other output formats are not often used and so a few # seconds difference is irrelevant. $self->{helpers} = {namelistsall => [sort $self->get_fields_of_type('list', 'name')->@*], namelists => [sort grep {not $self->field_is_skipout($_)} $self->get_fields_of_type('list', 'name')->@*], lists => [sort grep { not $self->field_is_datatype('name', $_) and not $self->field_is_skipout($_) and not $self->field_is_datatype('verbatim', $_) and not $self->field_is_datatype('uri', $_) } $self->get_fields_of_fieldtype('list')->@*], fields => [sort grep { not $self->field_is_skipout($_) and not $self->get_fieldformat($_) eq 'xsv' } $self->get_fields_of_type('field', ['entrykey', 'key', 'integer', 'datepart', 'literal', 'code'])->@*], datefields => [sort $self->get_fields_of_type('field', 'date')->@*], dateparts => [sort $self->get_fields_of_type('field', 'datepart')->@*], xsv => [sort grep { not $self->field_is_skipout($_) and not $self->get_datatype($_) eq 'keyword' } $self->get_fields_of_fieldformat('xsv')->@*], ranges => [sort grep { not $self->field_is_skipout($_) } $self->get_fields_of_datatype('range')->@*], uris => [sort grep { not $self->field_is_skipout($_); } $self->get_fields_of_type('field', 'uri')->@*], urils => [sort grep { not $self->field_is_skipout($_); } $self->get_fields_of_type('list', 'uri')->@*], verbs => [sort grep { not $self->field_is_skipout($_); } $self->get_fields_of_datatype(['verbatim', 'uri'])->@*], vfields => [sort grep { not $self->field_is_skipout($_); } $self->get_fields_of_type('field', ['verbatim', 'uri'])->@*], vlists => [sort grep { not $self->field_is_skipout($_); } $self->get_fields_of_type('list', ['verbatim', 'uri'])->@*], integers => [sort $self->get_fields_of_datatype(['datepart', 'integer'])->@*] }; # Mapping of sorting fields to Sort::Key sort data types which are not 'str' $self->{sortdataschema} = sub { my $f = shift; if (first {$f eq $_} ('citeorder', $self->{helpers}{integers}->@*)) { return 'int'; } else { return 'str'; } }; # use Data::Dump;dd($self);exit 0; return $self; } =head2 constants Returns array ref of constant names =cut sub constants { my $self = shift; return [ keys $self->{constants}->%* ]; } =head2 get_constant_type Returns a constant type =cut sub get_constant_type { my ($self, $name) = @_; return $self->{constants}{$name}{type}; } =head2 get_constant_value Returns a constant value =cut sub get_constant_value { my ($self, $name) = @_; if ($self->{constants}{$name}{type} eq 'list') { return split(/\s*,\s*/, $self->{constants}{$name}{value}); } elsif ($self->{constants}{$name}{type} eq 'string') { return $self->{constants}{$name}{value}; } } =head2 fieldtypes Returns array ref of legal fieldtypes =cut sub fieldtypes { my $self = shift; return [ keys $self->{fieldsbyfieldtype}->%* ]; } =head2 datatypes Returns array ref of legal datatypes =cut sub datatypes { my $self = shift; return [ keys $self->{fieldsbydatatype}->%* ]; } =head2 is_field Returns boolean to say if a field is a legal field. Allows for fields with meta markers whose marked field should be in the datamodel. =cut sub is_field { my $self = shift; my $field = shift; my $ann = $CONFIG_META_MARKERS{annotation}; if ($field =~ m/^(.+)(?:$ann)$/) { return $self->{fieldsbyname}{$1} ? 1 : 0; } else { return $self->{fieldsbyname}{$field} ? 1 : 0; } } =head2 entrytypes Returns array ref of legal entrytypes =cut sub entrytypes { my $self = shift; return [ keys $self->{entrytypesbyname}->%* ]; } =head2 is_entrytype Returns boolean to say if an entrytype is a legal entrytype =cut sub is_entrytype { my $self = shift; my $type = shift; return $self->{entrytypesbyname}{$type} ? 1 : 0; } =head2 is_field_for_entrytype Returns boolean to say if a field is legal for an entrytype =cut sub is_field_for_entrytype { my $self = shift; my ($type, $field) = @_; if ($self->{entrytypesbyname}{$type}{legal_fields}{$field}) { return 1; } else { return 0; } } =head2 entrytype_is_skipout Returns boolean depending on whether an entrytype is to be skipped on output =cut sub entrytype_is_skipout { my ($self, $type) = @_; return $self->{entrytypesbyname}{$type}{skipout} // 0; } =head2 get_fields_of_fieldtype Retrieve fields of a certain biblatex fieldtype from data model Return in sorted order so that bbl order doesn't change when changing .bcf. This really messes up tests otherwise. =cut sub get_fields_of_fieldtype { my ($self, $fieldtype) = @_; my $f = $self->{fieldsbyfieldtype}{$fieldtype}; return $f ? [ sort $f->@* ] : []; } =head2 get_fields_of_fieldformat Retrieve fields of a certain format from data model Return in sorted order so that bbl order doesn't change when changing .bcf. This really messes up tests otherwise. =cut sub get_fields_of_fieldformat { my ($self, $format) = @_; my $f = $self->{fieldsbyformat}{$format}; return $f ? [ sort $f->@* ] : []; } =head2 get_fields_of_datatype Retrieve fields of a certain biblatex datatype from data model Return in sorted order so that bbl order doesn't change when changing .bcf. This really messes up tests otherwise. =cut sub get_fields_of_datatype { my ($self, $datatype) = @_; my @f; # datatype can be array ref of datatypes - makes some calls cleaner if (ref($datatype) eq 'ARRAY') { foreach my $dt ($datatype->@*) { if (my $fs = $self->{fieldsbydatatype}{$dt}) { push @f, $fs->@*; } } } else { if (my $fs = $self->{fieldsbydatatype}{$datatype}) { push @f, $fs->@*; } } return [ sort @f ]; } =head2 get_fields_of_type Retrieve fields of a certain biblatex type from data model Return in sorted order so that bbl order doesn't change when changing .bcf. This really messes up tests otherwise. =cut sub get_fields_of_type { my ($self, $fieldtype, $datatype, $format) = @_; my @f; $format //= '*'; # datatype can be array ref of datatypes - makes some calls cleaner if (ref($datatype) eq 'ARRAY') { foreach my $dt ($datatype->@*) { if (my $fs = $self->{fieldsbytype}{$fieldtype}{$dt}{$format}) { push @f, $fs->@*; } } } else { if (my $fs = $self->{fieldsbytype}{$fieldtype}{$datatype}{$format}) { push @f, $fs->@*; } } return [ sort @f ]; } =head2 is_fields_of_type Returns boolean to say if the given fieldtype/datatype/format is a valid combination =cut sub is_fields_of_type { my ($self, $fieldtype, $datatype, $format) = @_; my $f; if ($format) { return exists($self->{fieldsbytype}{$fieldtype}{$datatype}{$format}) ? 1 : 0; } else { return exists($self->{fieldsbytype}{$fieldtype}{$datatype}) ? 1 : 0; } } =head2 get_fieldtype Returns the fieldtype of a field =cut sub get_fieldtype { my ($self, $field) = @_; return $self->{fieldsbyname}{$field}{fieldtype}; } =head2 get_datatype Returns the datatype of a field =cut sub get_datatype { my ($self, $field) = @_; return $self->{fieldsbyname}{$field}{datatype}; } =head2 get_fieldformat Returns the format of a field =cut sub get_fieldformat { my ($self, $field) = @_; return $self->{fieldsbyname}{$field}{format}; } =head2 get_dm_for_field Returns the fieldtype, datatype and format of a field =cut sub get_dm_for_field { my ($self, $field) = @_; return {'fieldtype' => $self->{fieldsbyname}{$field}{fieldtype}, 'datatype' => $self->{fieldsbyname}{$field}{datatype}, 'format' => $self->{fieldsbyname}{$field}{format}}; } =head2 field_is_fieldtype Returns boolean depending on whether a field is a certain biblatex fieldtype =cut sub field_is_fieldtype { my ($self, $fieldtype, $field) = @_; return $self->{fieldsbyname}{$field}{fieldtype} eq $fieldtype ? 1 : 0; } =head2 field_is_datatype Returns boolean depending on whether a field is a certain biblatex datatype =cut sub field_is_datatype { my ($self, $datatype, $field) = @_; return $self->{fieldsbyname}{$field}{datatype} eq $datatype ? 1 : 0; } =head2 field_is_type Returns boolean depending on whether a field is a certain biblatex fieldtype and datatype =cut sub field_is_type { my ($self, $fieldtype, $datatype, $field) = @_; if ($self->{fieldsbyname}{$field} and $self->{fieldsbyname}{$field}{fieldtype} eq $fieldtype and $self->{fieldsbyname}{$field}{datatype} eq $datatype) { return 1; } else { return 0; } } =head2 field_is_nullok Returns boolean depending on whether a field is ok to be null =cut sub field_is_nullok { my ($self, $field) = @_; return $self->{fieldsbyname}{$field}{nullok} // 0; } =head2 field_is_skipout Returns boolean depending on whether a field is to be skipped on output =cut sub field_is_skipout { my ($self, $field) = @_; return $self->{fieldsbyname}{$field}{skipout} // 0; } =head2 check_mandatory_constraints Checks constraints of type "mandatory" on entry and returns an arry of warnings, if any =cut sub check_mandatory_constraints { my $self = shift; my $be = shift; my $secnum = $Biber::MASTER->get_current_section; my $section = $Biber::MASTER->sections->get_section($secnum); my @warnings; my $et = $be->get_field('entrytype'); my $key = $be->get_field('citekey'); my $ds = $section->get_keytods($key); foreach my $c ($self->{entrytypesbyname}{$et}{constraints}{mandatory}->@*) { if (ref($c) eq 'ARRAY') { # Exactly one of a set is mandatory if ($c->[0] eq 'XOR') { my @fs = $c->@[1,-1]; # Lose the first element which is the 'XOR' my $flag = 0; my $xorflag = 0; foreach my $of (@fs) { if ($be->field_exists($of) and # ignore date field if it has been split into parts not ($of eq 'date' and $be->get_field('datesplit'))) { if ($xorflag) { push @warnings, "Datamodel: Entry '$key' ($ds): Mandatory fields - only one of '" . join(', ', @fs) . "' must be defined - ignoring field '$of'"; $be->del_field($of); } $flag = 1; $xorflag = 1; } } unless ($flag) { push @warnings, "Datamodel: Entry '$key' ($ds): Missing mandatory field - one of '" . join(', ', @fs) . "' must be defined"; } } # One or more of a set is mandatory elsif ($c->[0] eq 'OR') { my @fs = $c->@[1,-1]; # Lose the first element which is the 'OR' my $flag = 0; foreach my $of (@fs) { if ($be->field_exists($of)) { $flag = 1; last; } } unless ($flag) { push @warnings, "Datamodel: Entry '$key' ($ds): Missing mandatory field - one of '" . join(', ', @fs) . "' must be defined"; } } } # Simple mandatory field else { unless ($be->field_exists($c)) { push @warnings, "Datamodel: Entry '$key' ($ds): Missing mandatory field '$c'"; } } } return @warnings; } =head2 check_conditional_constraints Checks constraints of type "conditional" on entry and returns an arry of warnings, if any =cut sub check_conditional_constraints { my $self = shift; my $be = shift; my $secnum = $Biber::MASTER->get_current_section; my $section = $Biber::MASTER->sections->get_section($secnum); my @warnings; my $et = $be->get_field('entrytype'); my $key = $be->get_field('citekey'); my $ds = $section->get_keytods($key); foreach my $c ($self->{entrytypesbyname}{$et}{constraints}{conditional}->@*) { my $aq = $c->[0]; # Antecedent quantifier my $afs = $c->[1]; # Antecedent fields my $cq = $c->[2]; # Consequent quantifier my $cfs = $c->[3]; # Consequent fields my @actual_afs = (grep {$be->field_exists($_)} $afs->@*); # antecedent fields in entry # check antecedent if ($aq eq 'all') { next unless $afs->$#* == $#actual_afs; # ALL -> ? not satisfied } elsif ($aq eq 'none') { next if @actual_afs; # NONE -> ? not satisfied } elsif ($aq eq 'one') { next unless @actual_afs; # ONE -> ? not satisfied } # check consequent my @actual_cfs = (grep {$be->field_exists($_)} $cfs->@*); if ($cq eq 'all') { unless ($cfs->$#* == $#actual_cfs) { # ? -> ALL not satisfied push @warnings, "Datamodel: Entry '$key' ($ds): Constraint violation - $cq of fields (" . join(', ', $cfs->@*) . ") must exist when $aq of fields (" . join(', ', $afs->@*). ") exist"; } } elsif ($cq eq 'none') { if (@actual_cfs) { # ? -> NONE not satisfied push @warnings, "Datamodel: Entry '$key' ($ds): Constraint violation - $cq of fields (" . join(', ', @actual_cfs) . ") must exist when $aq of fields (" . join(', ', $afs->@*). ") exist. Ignoring them."; # delete the offending fields foreach my $f (@actual_cfs) { $be->del_field($f); } } } elsif ($cq eq 'one') { unless (@actual_cfs) { # ? -> ONE not satisfied push @warnings, "Datamodel: Entry '$key' ($ds): Constraint violation - $cq of fields (" . join(', ', $cfs->@*) . ") must exist when $aq of fields (" . join(', ', $afs->@*). ") exist"; } } } return @warnings; } =head2 check_data_constraints Checks constraints of type "data" on entry and returns an array of warnings, if any =cut sub check_data_constraints { my $self = shift; my $be = shift; my $secnum = $Biber::MASTER->get_current_section; my $section = $Biber::MASTER->sections->get_section($secnum); my @warnings; my $et = $be->get_field('entrytype'); my $key = $be->get_field('citekey'); my $ds = $section->get_keytods($key); foreach my $c ($self->{entrytypesbyname}{$et}{constraints}{data}->@*) { # This is the datatype of the constraint, not the field! if ($c->{datatype} eq 'isbn') { foreach my $f ($c->{fields}->@*) { if (my $fv = $be->get_field($f)) { require Business::ISBN; my ($vol, $dir, undef) = File::Spec->splitpath( $INC{"Business/ISBN.pm"} ); $dir =~ s/\/$//; # splitpath sometimes leaves a trailing '/' # Just in case it is already set. We also need to fake this in tests or it will # look for it in the blib dir unless (exists($ENV{ISBN_RANGE_MESSAGE})) { $ENV{ISBN_RANGE_MESSAGE} = File::Spec->catpath($vol, "$dir/ISBN/", 'RangeMessage.xml'); } # Treat as a list field just in case someone has made it so in a custom datamodel unless ($self->get_fieldtype($f) eq 'list') { $fv = [$fv]; } foreach ($fv->@*) { my $isbn = Business::ISBN->new($_); if (not $isbn) { push @warnings, "Datamodel: Entry '$key' ($ds): Invalid ISBN in value of field '$f'"; } # Business::ISBN has an error() method so we might get more information elsif (not $isbn->is_valid) { push @warnings, "Datamodel: Entry '$key' ($ds): Invalid ISBN in value of field '$f' (" . $isbn->error. ')'; } } } } } elsif ($c->{datatype} eq 'issn') { foreach my $f ($c->{fields}->@*) { if (my $fv = $be->get_field($f)) { require Business::ISSN; # Treat as a list field just in case someone has made it so in a custom datamodel unless ($self->get_fieldtype($f) eq 'list') { $fv = [$fv]; } foreach ($fv->@*) { my $issn = Business::ISSN->new($_); unless ($issn and $issn->is_valid) { push @warnings, "Datamodel: Entry '$key' ($ds): Invalid ISSN in value of field '$f'"; } } } } } elsif ($c->{datatype} eq 'ismn') { foreach my $f ($c->{fields}->@*) { if (my $fv = $be->get_field($f)) { require Business::ISMN; # Treat as a list field just in case someone has made it so in a custom datamodel unless ($self->get_fieldtype($f) eq 'list') { $fv = [$fv]; } foreach ($fv->@*) { my $ismn = Business::ISMN->new($_); unless ($ismn and $ismn->is_valid) { push @warnings, "Datamodel: Entry '$key' ($ds): Invalid ISMN in value of field '$f'"; } } } } } elsif ($c->{datatype} eq 'integer' or $c->{datatype} eq 'datepart') { my $dt = $DM_DATATYPES{$c->{datatype}}; foreach my $f ($c->{fields}->@*) { if (my $fv = $be->get_field($f)) { unless ( $fv =~ /$dt/ ) { push @warnings, "Datamodel: Entry '$key' ($ds): Invalid format (" . $c->{datatype}. ") of field '$f' - ignoring field"; $be->del_field($f); next; } if (my $fmin = $c->{rangemin}) { unless ($fv >= $fmin) { push @warnings, "Datamodel: Entry '$key' ($ds): Invalid value of field '$f' must be '>=$fmin' - ignoring field"; $be->del_field($f); next; } } if (my $fmax = $c->{rangemax}) { unless ($fv <= $fmax) { push @warnings, "Datamodel: Entry '$key' ($ds): Invalid value of field '$f' must be '<=$fmax' - ignoring field"; $be->del_field($f); next; } } } } } elsif ($c->{datatype} eq 'pattern') { my $patt; unless ($patt = $c->{pattern}) { push @warnings, "Datamodel: Pattern constraint has no pattern!"; } foreach my $f ($c->{fields}->@*) { if (my $fv = $be->get_field($f)) { unless (imatch($fv, $patt)) { push @warnings, "Datamodel: Entry '$key' ($ds): Invalid value (pattern match fails) for field '$f'"; } } } } } return @warnings; } =head2 dump Dump Biber::DataModel object =cut sub dump { my $self = shift; return pp($self); } =head2 generate_bltxml_schema Generate a RelaxNG XML schema from the datamodel for BibLaTeXML datasources =cut sub generate_bltxml_schema { my ($dm, $outfile) = @_; return if $dm->{bltxml_schema_gen_done}; # Set the .rng path to the output dir, if specified if (my $outdir = Biber::Config->getoption('output_directory')) { my (undef, undef, $file) = File::Spec->splitpath($outfile); $outfile = File::Spec->catfile($outdir, $file) } my $rng = IO::File->new($outfile, '>:encoding(UTF-8)'); $rng->autoflush;# Needed for running tests to string refs $logger->info("Writing BibLaTeXML RNG schema '$outfile' for datamodel"); require XML::Writer; my $bltx_ns = 'http://biblatex-biber.sourceforge.net/biblatexml'; my $bltx = 'bltx'; my $default_ns = 'http://relaxng.org/ns/structure/1.0'; my $writer = new XML::Writer(NAMESPACES => 1, ENCODING => 'UTF-8', DATA_MODE => 1, DATA_INDENT => 2, OUTPUT => $rng, PREFIX_MAP => {$bltx_ns => $bltx, $default_ns => ''}); $writer->xmlDecl(); $writer->comment('Auto-generated from .bcf Datamodel'); $writer->forceNSDecl($default_ns); $writer->forceNSDecl($bltx_ns); $writer->startTag('grammar', 'datatypeLibrary' => 'http://www.w3.org/2001/XMLSchema-datatypes'); $writer->startTag('start'); $writer->startTag('element', 'name' => "$bltx:entries"); $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bltx:entry"); $writer->emptyTag('attribute', 'name' => 'id'); $writer->startTag('attribute', 'name' => 'entrytype'); $writer->startTag('choice'); foreach my $entrytype ($dm->entrytypes->@*) { $writer->dataElement('value', $entrytype); } $writer->endTag();# choice $writer->endTag();# attribute $writer->startTag('interleave'); foreach my $ft ($dm->fieldtypes->@*) { foreach my $dt ($dm->datatypes->@*) { if ($dm->is_fields_of_type($ft, $dt)) { next if $dt eq 'datepart'; # not legal in input, only output $writer->comment("$dt ${ft}s"); $writer->emptyTag('ref', 'name' => "$dt$ft"); } } } $writer->endTag();# interleave $writer->endTag();# entry element $writer->endTag();# oneOrMore $writer->endTag();# entries element $writer->endTag();# start foreach my $ft ($dm->fieldtypes->@*) { foreach my $dt ($dm->datatypes->@*) { if ($dm->is_fields_of_type($ft, $dt)) { next if $dt eq 'datepart'; # not legal in input, only output $writer->comment("$dt ${ft}s definition"); $writer->startTag('define', 'name' => "$dt$ft"); # Name lists element definition # ============================= if ($ft eq 'list' and $dt eq 'name') { $writer->startTag('zeroOrMore');# for example, XDATA doesn't need a name $writer->startTag('element', 'name' => "$bltx:names"); # useprefix attribute $writer->comment('useprefix option'); $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'useprefix'); $writer->emptyTag('data', 'type' => 'boolean'); $writer->endTag(); # attribute $writer->endTag(); # optional # sortingnamekeytemplatename attribute $writer->comment('sortingnamekeytemplatename option'); $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'sortingnamekeytemplatename'); $writer->emptyTag('data', 'type' => 'string'); $writer->endTag(); # attribute $writer->endTag(); # optional # type attribute $writer->comment('types of names elements'); $writer->startTag('attribute', 'name' => 'type'); $writer->startTag('choice'); foreach my $name ($dm->get_fields_of_type($ft, $dt)->@*) { $writer->dataElement('value', $name); } $writer->endTag(); # choice $writer->endTag(); # attribute # morenames attribute $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'morenames'); $writer->emptyTag('data', 'type' => 'boolean'); $writer->endTag(); # attribute $writer->endTag(); # optional # generic annotation attribute $writer->emptyTag('ref', 'name' => "annotation"); $writer->startTag('oneOrMore'); # Individual name element $writer->startTag('element', 'name' => "$bltx:name"); # useprefix attribute $writer->comment('useprefix option'); $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'useprefix'); $writer->emptyTag('data', 'type' => 'boolean'); $writer->endTag(); # attribute $writer->endTag(); # optional # sortingnamekeytemplatename attribute $writer->comment('sortingnamekeytemplatename option'); $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'sortingnamekeytemplatename'); $writer->emptyTag('data', 'type' => 'string'); $writer->endTag(); # attribute $writer->endTag(); # optional # gender attribute ref $writer->emptyTag('ref', 'name' => 'gender'); # generic annotation attribute $writer->emptyTag('ref', 'name' => "annotation"); # namepart element $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bltx:namepart"); $writer->startTag('attribute', 'name' => 'type'); $writer->startTag('choice'); foreach my $np ($dm->get_constant_value('nameparts')) {# list type so returns list $writer->dataElement('value', $np); } $writer->endTag(); # choice $writer->endTag(); # attribute $writer->startTag('optional'); $writer->emptyTag('attribute', 'name' => 'initial'); $writer->endTag(); # optional # generic annotation attribute $writer->emptyTag('ref', 'name' => "annotation"); $writer->startTag('choice'); $writer->emptyTag('text');# text $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bltx:namepart"); $writer->startTag('optional'); $writer->emptyTag('attribute', 'name' => 'initial'); $writer->endTag(); # optional $writer->emptyTag('text');# text $writer->endTag(); # (sub)namepart element $writer->endTag(); # oneOrMore $writer->endTag(); # choice $writer->endTag(); # namepart element $writer->endTag(); # oneOrMore $writer->endTag(); # name element $writer->endTag(); # oneOrMore $writer->endTag(); # names element $writer->endTag(); # zeroOrMore # ======================== } elsif ($ft eq 'list') { # lists element definition # ======================== $writer->startTag('interleave'); foreach my $list ($dm->get_fields_of_type($ft, $dt)->@*) { $writer->startTag('optional'); $writer->startTag('element', 'name' => "$bltx:$list"); # generic annotation attribute $writer->emptyTag('ref', 'name' => "annotation"); $writer->startTag('choice'); $writer->emptyTag('text');# text $writer->startTag('element', 'name' => "$bltx:list"); $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bltx:item"); # generic annotation attribute $writer->emptyTag('ref', 'name' => "annotation"); $writer->emptyTag('text');# text $writer->endTag(); # item element $writer->endTag(); # oneOrMore element $writer->endTag(); # list element $writer->endTag(); # choice $writer->endTag(); # $list element $writer->endTag(); # optional } $writer->endTag();# interleave # ======================== } elsif ($ft eq 'field' and $dt eq 'uri') { # uri field element definition # ============================ $writer->startTag('interleave'); foreach my $field ($dm->get_fields_of_type($ft, $dt)->@*) { $writer->startTag('optional'); $writer->startTag('element', 'name' => "$bltx:$field"); # generic annotation attribute $writer->emptyTag('ref', 'name' => "annotation"); $writer->emptyTag('data', 'type' => 'anyURI'); $writer->endTag(); # $field element $writer->endTag();# optional } $writer->endTag();# interleave # ============================ } elsif ($ft eq 'field' and $dt eq 'range') { # range field element definition # ============================== $writer->startTag('interleave'); foreach my $field ($dm->get_fields_of_type($ft, $dt)->@*) { $writer->startTag('optional'); $writer->startTag('element', 'name' => "$bltx:$field"); # generic annotation attribute $writer->emptyTag('ref', 'name' => "annotation"); $writer->startTag('element', 'name' => "$bltx:list"); $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bltx:item"); $writer->startTag('element', 'name' => "$bltx:start"); $writer->emptyTag('text'); $writer->endTag(); # start element $writer->startTag('element', 'name' => "$bltx:end"); $writer->startTag('choice'); $writer->emptyTag('text'); $writer->emptyTag('empty'); $writer->endTag(); # choice $writer->endTag(); # end element $writer->endTag(); # item element $writer->endTag(); # oneOrMore element $writer->endTag(); # list element $writer->endTag(); # $field element $writer->endTag();# optional } $writer->endTag();# interleave # ============================== } elsif ($ft eq 'field' and $dt eq 'entrykey') { # entrykey field element definition # ================================= $writer->startTag('interleave'); foreach my $field ($dm->get_fields_of_type($ft, $dt)->@*) { $writer->startTag('optional'); # related field is special if ($field eq 'related') { $writer->startTag('element', 'name' => "$bltx:$field"); $writer->startTag('element', 'name' => "$bltx:list"); $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bltx:item"); $writer->emptyTag('attribute', 'name' => 'type'); $writer->emptyTag('attribute', 'name' => 'ids'); $writer->startTag('optional'); $writer->emptyTag('attribute', 'name' => 'string'); $writer->endTag(); # optional $writer->startTag('optional'); $writer->emptyTag('attribute', 'name' => 'options'); $writer->endTag(); # optional $writer->endTag(); # item element $writer->endTag(); # oneOrMore $writer->endTag(); # list element $writer->endTag(); # $field element } else { $writer->startTag('element', 'name' => "$bltx:$field"); # generic annotation attribute $writer->emptyTag('ref', 'name' => "annotation"); $writer->startTag('choice'); $writer->startTag('list'); $writer->startTag('oneOrMore'); $writer->emptyTag('data', 'type' => 'string'); $writer->endTag(); # oneOrMore $writer->endTag(); # list $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bltx:key"); $writer->emptyTag('text');# text $writer->endTag(); # key element $writer->endTag(); # oneOrMore $writer->endTag(); # choice $writer->endTag(); # $field element } $writer->endTag(); # optional } $writer->endTag();# interleave } elsif ($ft eq 'field' and $dt eq 'date') { # date field element definition # ============================= my @types = map { s/date$//r } $dm->get_fields_of_type($ft, $dt)->@*; $writer->startTag('zeroOrMore'); $writer->startTag('element', 'name' => "$bltx:date"); $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'type'); $writer->startTag('choice'); foreach my $datetype(@types) { next unless $datetype; $writer->dataElement('value', $datetype); } $writer->endTag(); # choice $writer->endTag(); # attribute $writer->endTag(); # optional # generic annotation attribute $writer->emptyTag('ref', 'name' => "annotation"); $writer->startTag('choice'); $writer->emptyTag('data', 'type' => 'date'); $writer->emptyTag('data', 'type' => 'gYear'); $writer->startTag('group'); $writer->startTag('element', 'name' => "$bltx:start"); $writer->startTag('choice'); $writer->emptyTag('data', 'type' => 'date'); $writer->emptyTag('data', 'type' => 'gYear'); $writer->endTag(); # choice $writer->endTag(); # start element $writer->startTag('element', 'name' => "$bltx:end"); $writer->startTag('choice'); $writer->emptyTag('data', 'type' => 'date'); $writer->emptyTag('data', 'type' => 'gYear'); $writer->emptyTag('empty'); $writer->endTag(); # choice $writer->endTag(); # end element $writer->endTag(); # group $writer->endTag(); # choice $writer->endTag(); # $field element $writer->endTag(); # zeroOrMore # ============================= } elsif ($ft eq 'field') { # field element definition # ======================== $writer->startTag('interleave'); foreach my $field ($dm->get_fields_of_type($ft, $dt)->@*) { $writer->startTag('optional'); $writer->startTag('element', 'name' => "$bltx:$field"); # generic annotation attribute $writer->emptyTag('ref', 'name' => "annotation"); $writer->emptyTag('text');# text $writer->endTag(); # $field element $writer->endTag();# optional } $writer->endTag();# interleave # ======================== } $writer->endTag(); # define } } } # gender attribute definition # =========================== $writer->comment('gender attribute definition'); $writer->startTag('define', 'name' => 'gender'); $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'gender'); $writer->startTag('choice'); foreach my $gender ($dm->get_constant_value('gender')) {# list type so returns list $writer->dataElement('value', $gender); } $writer->endTag();# choice $writer->endTag();# attribute $writer->endTag();# optional $writer->endTag();# define # =========================== # generic annotation attribute definition # ===================================== $writer->comment('generic annotation attribute definition'); $writer->startTag('define', 'name' => 'annotation'); $writer->startTag('optional'); $writer->emptyTag('attribute', 'name' => 'annotation'); $writer->endTag(); # optional $writer->endTag();# define # =========================== $writer->endTag();# grammar $writer->end(); $rng->close(); # So we only do this one for potentially multiple .bltxml datasources $dm->{bltxml_schema_gen_done} = 1; } =head2 generate_bblxml_schema Generate a RelaxNG XML schema from the datamodel for bblXML output =cut sub generate_bblxml_schema { my ($dm, $outfile) = @_; my $dmh = $dm->{helpers}; # Set the .rng path to the output dir, if specified if (my $outdir = Biber::Config->getoption('output_directory')) { my (undef, undef, $file) = File::Spec->splitpath($outfile); $outfile = File::Spec->catfile($outdir, $file) } my $rng = IO::File->new($outfile, '>:encoding(UTF-8)'); $rng->autoflush;# Needed for running tests to string refs $logger->info("Writing bblXML RNG schema '$outfile' for datamodel"); require XML::Writer; my $bbl_ns = 'https://sourceforge.net/projects/biblatex/bblxml'; my $bbl = 'bbl'; my $default_ns = 'http://relaxng.org/ns/structure/1.0'; my $writer = new XML::Writer(NAMESPACES => 1, ENCODING => 'UTF-8', DATA_MODE => 1, DATA_INDENT => 2, OUTPUT => $rng, PREFIX_MAP => {$bbl_ns => $bbl, $default_ns => ''}); $writer->xmlDecl(); $writer->comment('Auto-generated from .bcf Datamodel'); $writer->forceNSDecl($default_ns); $writer->forceNSDecl($bbl_ns); $writer->startTag('grammar', 'datatypeLibrary' => 'http://www.w3.org/2001/XMLSchema-datatypes'); $writer->startTag('start'); $writer->startTag('element', 'name' => "$bbl:refsections"); $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bbl:refsection"); $writer->emptyTag('attribute', 'name' => 'id'); $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bbl:datalist"); $writer->emptyTag('attribute', 'name' => 'id'); $writer->startTag('attribute', 'name' => 'type'); $writer->startTag('choice'); $writer->dataElement('value', 'entry'); $writer->dataElement('value', 'list'); $writer->endTag(); # choice $writer->endTag(); # attribute $writer->startTag('oneOrMore'); $writer->startTag('choice'); # Set parent entries are special $writer->startTag('element', 'name' => "$bbl:entry"); $writer->emptyTag('attribute', 'name' => 'key'); $writer->startTag('attribute', 'name' => 'type'); $writer->startTag('choice'); $writer->dataElement('value', 'set'); $writer->endTag(); # choice $writer->endTag(); # attribute $writer->startTag('element', 'name' => "$bbl:set"); $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bbl:member"); $writer->emptyTag('text');# text $writer->endTag(); # member $writer->endTag(); # oneOrMore $writer->endTag(); # set $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bbl:field"); $writer->startTag('attribute', 'name' => 'name'); $writer->startTag('choice'); $writer->dataElement('value', 'labelprefix'); $writer->dataElement('value', 'labelalpha'); $writer->dataElement('value', 'extraalpha'); $writer->dataElement('value', 'annotation'); $writer->dataElement('value', 'sortinit'); $writer->dataElement('value', 'sortinithash'); $writer->dataElement('value', 'label'); $writer->endTag(); # choice $writer->endTag(); # attribute $writer->emptyTag('text');# text $writer->endTag(); # field $writer->endTag(); # oneOrMore $writer->endTag(); # entry # Normal entries $writer->startTag('element', 'name' => "$bbl:entry"); $writer->emptyTag('attribute', 'name' => 'key'); $writer->startTag('attribute', 'name' => 'type'); $writer->startTag('choice'); foreach my $et ($dm->entrytypes->@*) { $writer->dataElement('value', $et); } $writer->endTag(); # choice $writer->endTag(); # attribute # source $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'source'); $writer->startTag('choice'); $writer->dataElement('value', 'crossref'); $writer->dataElement('value', 'xref'); $writer->endTag(); # choice $writer->endTag(); # attribute $writer->endTag(); # optional # singletitle $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'singletitle'); $writer->startTag('choice'); $writer->dataElement('value', 'true'); $writer->endTag(); # choice $writer->endTag(); # attribute $writer->endTag(); # optional # uniquetitle $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'uniquetitle'); $writer->startTag('choice'); $writer->dataElement('value', 'true'); $writer->endTag(); # choice $writer->endTag(); # attribute $writer->endTag(); # optional # uniquework $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'uniquework'); $writer->startTag('choice'); $writer->dataElement('value', 'true'); $writer->endTag(); # choice $writer->endTag(); # attribute $writer->endTag(); # optional # uniqueprimaryauthor $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'uniqueprimaryauthor'); $writer->startTag('choice'); $writer->dataElement('value', 'true'); $writer->endTag(); # choice $writer->endTag(); # attribute $writer->endTag(); # optional $writer->startTag('interleave'); $writer->startTag('zeroOrMore'); $writer->startTag('element', 'name' => "$bbl:inset"); $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bbl:member"); $writer->emptyTag('text');# text $writer->endTag(); # member $writer->endTag(); # oneOrMore $writer->endTag(); # inset $writer->endTag(); # zeroOrMore # names my @names = grep {not $dm->field_is_skipout($_)} $dm->get_fields_of_type('list', 'name')->@*; $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bbl:names"); $writer->startTag('attribute', 'name' => 'type'); $writer->startTag('choice'); foreach my $name (@names) { $writer->dataElement('value', $name); } $writer->endTag(); # choice $writer->endTag(); # attribute $writer->startTag('attribute', 'name' => 'count'); $writer->emptyTag('data', 'type' => 'integer'); $writer->endTag(); # attribute $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'uniquelist'); $writer->emptyTag('data', 'type' => 'integer'); $writer->endTag(); # attribute $writer->endTag(); # optional $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'useprefix'); $writer->emptyTag('data', 'type' => 'boolean'); $writer->endTag(); # attribute $writer->endTag(); # optional $writer->startTag('optional'); $writer->emptyTag('attribute', 'name' => 'sortingnamekeytemplatename'); $writer->endTag(); # optional $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'more'); $writer->emptyTag('data', 'type' => 'boolean'); $writer->endTag(); # attribute $writer->endTag(); # optional # name $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bbl:name"); $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'useprefix'); $writer->emptyTag('data', 'type' => 'boolean'); $writer->endTag(); # attribute $writer->endTag(); # optional $writer->startTag('optional'); $writer->emptyTag('attribute', 'name' => 'sortingnamekeytemplatename'); $writer->endTag(); # optional $writer->emptyTag('attribute', 'name' => 'hash'); $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'uniquename'); $writer->emptyTag('data', 'type' => 'integer'); $writer->endTag(); # attribute $writer->startTag('attribute', 'name' => 'uniquepart'); $writer->emptyTag('data', 'type' => 'string'); $writer->endTag(); # attribute $writer->endTag(); # optional $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bbl:namepart"); $writer->emptyTag('attribute', 'name' => 'type'); $writer->emptyTag('attribute', 'name' => 'initials'); $writer->startTag('optional'); $writer->emptyTag('attribute', 'name' => 'uniquename'); $writer->endTag(); # optional $writer->emptyTag('text');# text $writer->endTag();# namepart $writer->endTag();# oneOrMore $writer->endTag();# name $writer->endTag();# oneOrMore $writer->endTag();# names $writer->endTag();# oneOrMore # lists # verbatim lists don't need special handling in XML, unlike TeX so they are here my @lists = grep { not $dm->field_is_datatype('name', $_) and not $dm->field_is_datatype('uri', $_) and not $dm->field_is_skipout($_) } $dm->get_fields_of_fieldtype('list')->@*; $writer->startTag('zeroOrMore'); $writer->startTag('element', 'name' => "$bbl:list"); $writer->startTag('attribute', 'name' => 'name'); $writer->startTag('choice'); foreach my $list (@lists) { $writer->dataElement('value', $list); } $writer->endTag(); # choice $writer->endTag(); # attribute $writer->startTag('attribute', 'name' => 'count'); $writer->emptyTag('data', 'type' => 'integer'); $writer->endTag(); # attribute $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'more'); $writer->emptyTag('data', 'type' => 'boolean'); $writer->endTag(); # attribute $writer->endTag(); # optional $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bbl:item"); $writer->emptyTag('text');# text $writer->endTag(); # item $writer->endTag(); # oneOrMore $writer->endTag(); # list $writer->endTag(); # zeroOrMore # fields my @fs1 = qw/namehash bibnamehash fullhash labelalpha sortinit sortinithash sortinithash extradate labelyear labelmonth labelday labeldatesource labelprefix extratitle extratitleyear extraalpha labelnamesource labeltitlesource clonesourcekey/; # verbatim fields don't need special handling in XML, unlike TeX so they are here my @fs2 = grep { not ($dm->get_fieldformat($_) eq 'xsv') and not $dm->field_is_skipout($_) } $dm->get_fields_of_type('field', ['entrykey', 'key', 'integer', 'datepart', 'literal', 'code', 'verbatim'])->@*; # uri fields my @fs3 = $dm->get_fields_of_type('field', 'uri')->@*; # namehash and fullhash my @fs4; map {push @fs4, "${_}namehash";push @fs4, "${_}bibnamehash";push @fs4, "${_}fullhash"} $dmh->{namelists}->@*; $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bbl:field"); $writer->startTag('choice'); # start choice of normal vs datepart fields $writer->startTag('group'); # $writer->startTag('attribute', 'name' => 'name'); $writer->startTag('choice'); foreach my $f (@fs1, @fs2, @fs3, @fs4) { $writer->dataElement('value', $f); } $writer->endTag(); # choice $writer->endTag(); # attribute $writer->endTag(); # group $writer->startTag('group'); # $writer->startTag('attribute', 'name' => 'name'); $writer->startTag('choice'); foreach my $dp ($dm->get_fields_of_type('field', 'datepart')->@*) { $writer->dataElement('value', $dp); } $writer->endTag(); # choice $writer->endTag(); # attribute # dateparts may have an era attributes $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'startera'); $writer->startTag('choice'); $writer->dataElement('value', 'bce'); $writer->dataElement('value', 'ce'); $writer->endTag(); # choice $writer->endTag(); # attribute $writer->endTag(); # optional $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'endera'); $writer->startTag('choice'); $writer->dataElement('value', 'bce'); $writer->dataElement('value', 'ce'); $writer->endTag(); # choice $writer->endTag(); # attribute $writer->endTag(); # optional # dateparts may have a julian attributes $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'startjulian'); $writer->startTag('choice'); $writer->dataElement('value', 'true'); $writer->endTag(); # choice $writer->endTag(); # attribute $writer->endTag(); # optional $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'endjulian'); $writer->startTag('choice'); $writer->dataElement('value', 'true'); $writer->endTag(); # choice $writer->endTag(); # attribute $writer->endTag(); # optional # dateparts may have a circa attributes $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'startcirca'); $writer->startTag('choice'); $writer->dataElement('value', 'true'); $writer->endTag(); # choice $writer->endTag(); # attribute $writer->endTag(); # optional $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'endcirca'); $writer->startTag('choice'); $writer->dataElement('value', 'true'); $writer->endTag(); # choice $writer->endTag(); # attribute $writer->endTag(); # optional # dateparts may have an uncertain attributes $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'startuncertain'); $writer->startTag('choice'); $writer->dataElement('value', 'true'); $writer->endTag(); # choice $writer->endTag(); # attribute $writer->endTag(); # optional $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'enduncertain'); $writer->startTag('choice'); $writer->dataElement('value', 'true'); $writer->endTag(); # choice $writer->endTag(); # attribute $writer->endTag(); # optional # dateparts may have an unknown attributes $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'startunknown'); $writer->startTag('choice'); $writer->dataElement('value', 'true'); $writer->endTag(); # choice $writer->endTag(); # attribute $writer->endTag(); # optional $writer->startTag('optional'); $writer->startTag('attribute', 'name' => 'endunknown'); $writer->startTag('choice'); $writer->dataElement('value', 'true'); $writer->endTag(); # choice $writer->endTag(); # attribute $writer->endTag(); # optional $writer->endTag(); # group $writer->endTag(); # choice (normal vs datepart) $writer->emptyTag('text');# text $writer->endTag(); # field $writer->endTag(); # oneOrMore # ranges my @ranges = grep {not $dm->field_is_skipout($_)} $dm->get_fields_of_datatype('range')->@*; $writer->startTag('zeroOrMore'); $writer->startTag('element', 'name' => "$bbl:range"); $writer->startTag('attribute', 'name' => 'name'); $writer->startTag('choice'); foreach my $r (@ranges) { $writer->dataElement('value', $r); } $writer->endTag(); # choice $writer->endTag(); # attribute $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bbl:item"); $writer->startTag('attribute', 'name' => 'length'); $writer->emptyTag('data', 'type' => 'integer'); $writer->endTag(); # attribute $writer->startTag('element', 'name' => "$bbl:start"); $writer->emptyTag('text');# text $writer->endTag(); # start $writer->startTag('optional'); $writer->startTag('element', 'name' => "$bbl:end"); $writer->emptyTag('text');# text $writer->endTag(); # end $writer->endTag(); # optional $writer->endTag(); # item $writer->endTag(); # oneOrMore $writer->endTag(); # range $writer->endTag(); # zeroOrMore # uri lists - not in default data model if (my @uril = $dm->get_fields_of_type('list', 'uri')->@*) { $writer->startTag('optional'); $writer->startTag('element', 'name' => "$bbl:list"); $writer->startTag('attribute', 'name' => 'name'); $writer->startTag('choice'); foreach my $u (@uril) { $writer->dataElement('value', $u); } $writer->endTag(); # choice $writer->endTag(); # attribute $writer->startTag('attribute', 'name' => 'count'); $writer->emptyTag('data', 'type' => 'integer'); $writer->endTag(); # attribute $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bbl:item"); $writer->emptyTag('data', 'type' => 'anyURI'); $writer->endTag(); # item $writer->endTag(); # oneOrMore $writer->endTag(); # list element $writer->endTag(); # optional } # keywords $writer->startTag('optional'); $writer->startTag('element', 'name' => "$bbl:keywords"); $writer->startTag('oneOrMore'); $writer->startTag('element', 'name' => "$bbl:keyword"); $writer->emptyTag('data', 'type' => 'string'); $writer->endTag();# item $writer->endTag();# oneOrMore $writer->endTag();# keywords $writer->endTag();# optional # annotations $writer->startTag('zeroOrMore'); $writer->startTag('element', 'name' => "$bbl:annotation"); $writer->startTag('attribute', 'name' => 'scope'); $writer->startTag('choice'); foreach my $s ('field', 'list', 'names', 'item', 'name', 'namepart') { $writer->dataElement('value', $s); } $writer->endTag();# choice $writer->endTag();# scope attribute $writer->emptyTag('attribute', 'name' => 'field'); $writer->emptyTag('attribute', 'name' => 'value'); $writer->startTag('optional'); $writer->emptyTag('attribute', 'name' => 'item'); $writer->endTag();# optional $writer->startTag('optional'); $writer->emptyTag('attribute', 'name' => 'part'); $writer->endTag();# optional $writer->endTag();# annotation $writer->endTag();# zeroOrMore # warnings $writer->startTag('zeroOrMore'); $writer->startTag('element', 'name' => "$bbl:warning"); $writer->emptyTag('data', 'type' => 'string'); $writer->endTag();# warning $writer->endTag();# zeroOrMore $writer->endTag();# interleave element $writer->endTag();# entry element $writer->endTag();# choice $writer->endTag();# oneOrMore $writer->endTag();# datalist element $writer->endTag();# oneOrMore # aliases $writer->startTag('zeroOrMore'); $writer->startTag('element', 'name' => "$bbl:keyalias"); $writer->emptyTag('attribute', 'name' => 'key'); $writer->emptyTag('text');# text $writer->endTag();# keyalias $writer->endTag();# zeroOrMore # missing keys $writer->startTag('zeroOrMore'); $writer->startTag('element', 'name' => "$bbl:missing"); $writer->emptyTag('text');# text $writer->endTag();# missing $writer->endTag();# zeroOrMore $writer->endTag();# refsection element $writer->endTag();# oneOrMore $writer->endTag();# refsections element $writer->endTag();# start $writer->endTag();# grammar $writer->end(); $rng->close(); } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Annotation.pm000444000153000001 671413205066062 20107 0ustar00vboxother000000000000package Biber::Annotation; use v5.24; use strict; use warnings; use Biber::Config; use Biber::Constants; use Data::Dump; use Biber::Utils; use Log::Log4perl qw( :no_extra_logdie_message ); use List::Util qw( first ); no autovivification; my $logger = Log::Log4perl::get_logger('main'); # Static class data my $ANN = {}; =encoding utf-8 =head1 ANNOTATION Biber::Entry::Annotation =head2 set_annotation Record an annotation for a scope and citekey =cut sub set_annotation { shift; # class method so don't care about class name my ($scope, $key, $field, $value, $count, $part) = @_; if ($scope eq 'field') { $ANN->{field}{$key}{$field} = $value; } elsif ($scope eq 'item') { $ANN->{item}{$key}{$field}{$count} = $value; } elsif ($scope eq 'part') { $ANN->{part}{$key}{$field}{$count}{$part} = $value; } # For easy checking later whether or not a field is annotated $ANN->{fields}{$key}{$field} = 1; return; } =head2 get_annotation Retrieve an annotation for a scope and citekey =cut sub get_annotation { shift; # class method so don't care about class name my ($scope, $key, $field, $count, $part) = @_; if ($scope eq 'field') { return $ANN->{field}{$key}{$field}; } elsif ($scope eq 'item') { return $ANN->{item}{$key}{$field}{$count}; } elsif ($scope eq 'part') { return $ANN->{part}{$key}{$field}{$count}{$part}; } return undef; } =head2 is_annotated_field Returns boolean to say if a field is annotated =cut sub is_annotated_field { shift; # class method so don't care about class name my ($key, $field) = @_; return $ANN->{fields}{$key}{$field}; } =head2 get_field_annotation Retrieve 'field' scope annotation for a field. There will only be one. =cut sub get_field_annotation { shift; # class method so don't care about class name my ($key, $field) = @_; return $ANN->{field}{$key}{$field}; } =head2 get_annotated_fields Retrieve all annotated fields for a particular scope for a key =cut sub get_annotated_fields { shift; # class method so don't care about class name my ($scope, $key) = @_; return sort keys $ANN->{$scope}{$key}->%*; } =head2 get_annotated_items Retrieve the itemcounts for for a particular scope, key and field =cut sub get_annotated_items { shift; # class method so don't care about class name my ($scope, $key, $field) = @_; return sort keys $ANN->{$scope}{$key}{$field}->%*; } =head2 get_annotated_parts Retrieve the parts for for a particular scope, key, field and itemcount =cut sub get_annotated_parts { shift; # class method so don't care about class name my ($scope, $key, $field, $count) = @_; return sort keys $ANN->{$scope}{$key}{$field}{$count}->%*; } =head2 dump Dump config information (for debugging) =cut sub dump { shift; # class method so don't care about class name dd($ANN); } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Config.pm000444000153000001 11540113205066062 17234 0ustar00vboxother000000000000package Biber::Config; use v5.24; use Biber::Constants; use Biber::Utils; use IPC::Cmd qw( can_run ); use IPC::Run3; # This works with PAR::Packer and Windows. IPC::Run doesn't use Cwd qw( abs_path ); use Data::Compare; use Data::Dump; use Encode; use File::Slurper; use File::Spec; use Carp; use List::AllUtils qw(first max); use Log::Log4perl qw( :no_extra_logdie_message ); # To keep PAR::Packer happy, explicitly load these use Log::Log4perl::Appender::Screen; use Log::Log4perl::Appender::File; use Log::Log4perl::Layout::SimpleLayout; use Log::Log4perl::Layout::PatternLayout; use Unicode::Normalize; use parent qw(Class::Accessor); __PACKAGE__->follow_best_practice; our $VERSION = '2.9'; our $BETA_VERSION = 0; # Is this a beta version? our $logger = Log::Log4perl::get_logger('main'); our $screen = Log::Log4perl::get_logger('screen'); our $logfile = Log::Log4perl::get_logger('logfile'); =encoding utf-8 =head1 NAME Biber::Config - Configuration items which need to be saved across the lifetime of a Biber object This class contains a static object and static methods to access configuration and state data. There are several classes of data in here which have separate accessors: * Biber options * Biblatex options * State information used by Biber as it processes entries * displaymode date =cut # Static (class) data our $CONFIG; # Uniqueness ignore information from inheritance data $CONFIG->{state}{uniqignore} = {}; $CONFIG->{state}{crossrefkeys} = {}; $CONFIG->{state}{xrefkeys} = {}; # Set tracking, parent->child and child->parent $CONFIG->{state}{set}{pc} = {}; $CONFIG->{state}{set}{cp} = {}; # Citekeys which refer to the same entry $CONFIG->{state}{citkey_aliases} = {}; # Record of which entries have inherited from other fields. Used for loop detection. $CONFIG->{state}{crossref} = []; $CONFIG->{state}{xdata} = []; # Record of which entries have inherited what from whom, with the fields inherited. # Used for generating inheritance trees $CONFIG->{state}{graph} = {}; $CONFIG->{state}{seenkeys} = {}; # Track the order of keys as cited. Keys cited in the same \cite*{} get the same order # Used for sorting schemes which use \citeorder $CONFIG->{state}{keyorder} = {}; # Location of the control file $CONFIG->{state}{control_file_location} = ''; # Data files per section being used by biber $CONFIG->{state}{datafiles} = []; =head2 _init Reset internal hashes to defaults. =cut sub _init { $CONFIG->{state}{uniqignore} = {}; $CONFIG->{state}{control_file_location} = ''; $CONFIG->{state}{crossrefkeys} = {}; $CONFIG->{state}{xrefkeys} = {}; $CONFIG->{state}{seenkeys} = {}; $CONFIG->{state}{datafiles} = []; $CONFIG->{state}{crossref} = []; $CONFIG->{state}{xdata} = []; $CONFIG->{state}{set}{pc} = {}; $CONFIG->{state}{set}{cp} = {}; return; } =head2 _initopts Initialise default options, optionally with config file as argument =cut sub _initopts { shift; # class method so don't care about class name my $opts = shift; my $userconf; # For testing, need to be able to force ignore of conf file in case user # already has one which interferes with test settings. unless (defined($opts->{noconf})) { # if a config file was given as cmd-line arg, it overrides all other # config file locations unless ( defined($opts->{configfile}) and -f $opts->{configfile} ) { $opts->{configfile} = config_file(); } } # Set hard-coded biber option defaults while (my ($k, $v) = each $CONFIG_DEFAULT_BIBER->%*) { if (exists($v->{content})) { # simple option Biber::Config->setoption($k, $v->{content}); } # mildly complex options elsif (lc($k) eq 'dot_include' or lc($k) eq 'collate_options' or lc($k) eq 'nosort' or lc($k) eq 'nolabel' or lc($k) eq 'nolabelwidthcount' or lc($k) eq 'noinit' ) { Biber::Config->setoption($k, $v->{option}); } } # There is a special default config file for tool mode # Referring to as yet unprocessed cmd-line tool option as it isn't processed until below if ($opts->{tool}) { (my $vol, my $dir, undef) = File::Spec->splitpath( $INC{"Biber/Config.pm"} ); $dir =~ s/\/$//; # splitpath sometimes leaves a trailing '/' _config_file_set(File::Spec->catpath($vol, "$dir", 'biber-tool.conf')); } # Normal user config file - overrides tool mode defaults _config_file_set($opts->{configfile}); # Set hard-coded biblatex option defaults # This has to go after _config_file_set() as this is what defines option scope # in tool mode (from the .conf file) foreach (keys %CONFIG_DEFAULT_BIBLATEX) { Biber::Config->setblxoption($_, $CONFIG_DEFAULT_BIBLATEX{$_}); } # Command-line overrides everything else foreach my $copt (keys $opts->%*) { # This is a tricky option as we need to keep non-overriden defaults # If we don't we can get errors when contructing the sorting call to eval() later if (lc($copt) eq 'collate_options') { my $collopts = Biber::Config->getoption('collate_options'); my $copt_h = eval "{ $opts->{$copt} }" or croak('Bad command-line collation options'); # Override defaults with any cmdline settings foreach my $co (keys $copt_h->%*) { $collopts->{$co} = $copt_h->{$co}; } Biber::Config->setconfigfileoption('collate_options', $collopts); } else { Biber::Config->setcmdlineoption($copt, $opts->{$copt}); } } # Record the $ARGV[0] name for future use if (Biber::Config->getoption('tool')) { # Set datasource file name. In a conditional as @ARGV might not be set in tests if (my $dsn = $ARGV[0]) { # ARGV is ok even in a module Biber::Config->setoption('dsn', $dsn); } } else { # Set control file name. In a conditional as @ARGV might not be set in tests if (defined($ARGV[0])) { # ARGV is ok even in a module my $bcf = $ARGV[0]; $bcf .= '.bcf' unless $bcf =~ m/\.bcf$/; Biber::Config->setoption('bcf', $bcf); } } # Set log file name my $biberlog; if (my $log = Biber::Config->getoption('logfile')) { # user specified logfile name # Sanitise user-specified log name $log =~ s/\.blg\z//xms; $biberlog = $log . '.blg'; } elsif (not @ARGV) { # default if no .bcf file specified - mainly in tests Biber::Config->setoption('nolog', 1); } else { # set log to \jobname.blg my $bcf = $ARGV[0]; # ARGV is ok even in a module # Sanitise control file name $bcf =~ s/\.bcf\z//xms; $biberlog = $bcf . '.blg'; } # prepend output directory for log, if specified if (my $outdir = Biber::Config->getoption('output_directory')) { $biberlog = File::Spec->catfile($outdir, $biberlog); } # cache meta markers since they are referenced in the oft-called _get_handler $CONFIG_META_MARKERS{annotation} = quotemeta(Biber::Config->getoption('annotation_marker')); $CONFIG_META_MARKERS{xname} = quotemeta(Biber::Config->getoption('xname_marker')); # Setting up Log::Log4perl my $LOGLEVEL; if (Biber::Config->getoption('trace')) { $LOGLEVEL = 'TRACE' } elsif (Biber::Config->getoption('debug')) { $LOGLEVEL = 'DEBUG' } elsif (Biber::Config->getoption('quiet') == 1) { $LOGLEVEL = 'ERROR' } elsif (Biber::Config->getoption('quiet') > 1) { $LOGLEVEL = 'FATAL' } else { $LOGLEVEL = 'INFO' } my $LOGLEVEL_F; my $LOG_MAIN; if (Biber::Config->getoption('nolog')) { $LOG_MAIN = 'Screen'; $LOGLEVEL_F = 'OFF' } else { $LOG_MAIN = 'Logfile, Screen'; $LOGLEVEL_F = $LOGLEVEL } my $LOGLEVEL_S; if (Biber::Config->getoption('onlylog')) { $LOGLEVEL_S = 'OFF' } else { # Max screen loglevel is INFO if (Biber::Config->getoption('quiet') == 1) { $LOGLEVEL_S = 'ERROR'; } elsif (Biber::Config->getoption('quiet') > 1) { $LOGLEVEL_S = 'FATAL' } else { $LOGLEVEL_S = 'INFO'; } } # configuration "file" for Log::Log4perl my $l4pconf = qq| log4perl.category.main = $LOGLEVEL, $LOG_MAIN log4perl.category.screen = $LOGLEVEL_S, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LOGLEVEL_S log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; # Only want a logfile appender if --nolog isn't set if ($LOGLEVEL_F ne 'OFF') { $l4pconf .= qq| log4perl.category.logfile = $LOGLEVEL_F, Logfile log4perl.appender.Logfile = Log::Log4perl::Appender::File log4perl.appender.Logfile.utf8 = 1 log4perl.appender.Logfile.Threshold = $LOGLEVEL_F log4perl.appender.Logfile.filename = $biberlog log4perl.appender.Logfile.mode = clobber log4perl.appender.Logfile.layout = Log::Log4perl::Layout::PatternLayout log4perl.appender.Logfile.layout.ConversionPattern = [%r] %F{1}:%L> %p - %m%n |; } Log::Log4perl->init(\$l4pconf); my $vn = $VERSION; $vn .= ' (beta)' if $BETA_VERSION; my $tool = ' running in TOOL mode' if Biber::Config->getoption('tool'); $logger->info("This is Biber $vn$tool") unless Biber::Config->getoption('nolog'); $logger->info("Config file is '" . $opts->{configfile} . "'") if $opts->{configfile}; $logger->info("Logfile is '$biberlog'") unless Biber::Config->getoption('nolog'); if (Biber::Config->getoption('debug')) { $screen->info("DEBUG mode: all messages are logged to '$biberlog'") } return; } # read a config file and set options from it sub _config_file_set { my $conf = shift; my $userconf; # Can't use logcroak here because logging isn't initialised yet if (defined($conf)) { require XML::LibXML::Simple; my $buf = NFD(File::Slurper::read_text($conf));# Unicode NFD boundary $userconf = XML::LibXML::Simple::XMLin($buf, 'ForceContent' => 1, 'ForceArray' => [ qr/\Aoption\z/, qr/\Amaps\z/, qr/\Amap\z/, qr/\Amap_step\z/, qr/\Aper_type\z/, qr/\Aper_datasource\z/, qr/\Atype_pair\z/, qr/\Ainherit\z/, qr/\Afieldor\z/, qr/\Afieldxor\z/, qr/\Afield\z/, qr/\Aalias\z/, qr/\Akeypart\z/, qr/\Apart\z/, qr/\Amember\z/, qr/\Anoinit\z/, qr/\Anolabel\z/, qr/\Aalsoset\z/, qr/\Aconstraints\z/, qr/\Aconstraint\z/, qr/\Aentrytype\z/, qr/\Adatetype\z/, qr/\Acondition\z/, qr/\A(?:or)?filter\z/, qr/\Asortexclusion\z/, qr/\Aexclusion\z/, qr/\Asortingtemplate\z/, qr/\Asort\z/, qr/\Alabelalpha(?:name)?template\z/, qr/\Asortitem\z/, qr/\Auniquenametemplate\z/, qr/\Apresort\z/, qr/\Aoptionscope\z/, qr/\Asortingnamekeytemplate\z/, ], 'NsStrip' => 1, 'KeyAttr' => []) or croak("Failed to read biber config file '$conf'\n $@"); } # Option scope has to be set first foreach my $bcfscopeopts ($userconf->{optionscope}->@*) { my $scope = $bcfscopeopts->{type}; foreach my $bcfscopeopt ($bcfscopeopts->{option}->@*) { my $opt = $bcfscopeopt->{content}; $CONFIG_OPTSCOPE_BIBLATEX{$opt}{$scope} = 1; $CONFIG_SCOPEOPT_BIBLATEX{$scope}{$opt} = 1; } } # Now we have the per-namelist options, make the accessors for them in the Names package foreach my $nso (keys $CONFIG_SCOPEOPT_BIBLATEX{NAMELIST}->%*) { Biber::Entry::Names->follow_best_practice; Biber::Entry::Names->mk_accessors($nso); } # Now we have the per-name options, make the accessors for them in the Name package foreach my $no (keys $CONFIG_SCOPEOPT_BIBLATEX{NAME}->%*) { Biber::Entry::Name->follow_best_practice; Biber::Entry::Name->mk_accessors($no); } delete $userconf->{optionscope}; # DATAFIELD SETS # Since we have to use the datamodel to resolve some members, just record the settings # here for processing after the datamodel is parsed foreach my $s ($userconf->{datafieldset}->@*) { my $name = $s->{name}; foreach my $m ($s->{member}->@*) { if (my $field = $m->{field}[0]) {# 'field' has forcearray for other things push $DATAFIELD_SETS{$name}->@*, $field; } else { push $DATAFIELD_SETS{$name}->@*, {fieldtype => $m->{fieldtype}, datatype => $m->{datatype}}; } } } delete $userconf->{datafieldset}; # Set options from config file while (my ($k, $v) = each $userconf->%*) { # Has to be an array ref and so must come before # the later options tests which assume hash refs if (lc($k) eq 'labelalphatemplate') { foreach my $t ($v->@*) { my $latype = $t->{type}; if ($latype eq 'global') { Biber::Config->setblxoption('labelalphatemplate', $t); } else { Biber::Config->setblxoption('labelalphatemplate', $t, 'ENTRYTYPE', $latype); } } } elsif (lc($k) eq 'labelalphanametemplate') { foreach my $t ($v->@*) { my $lants; my $lant; foreach my $np (sort {$a->{order} <=> $b->{order}} $t->{namepart}->@*) { push $lant->@*, {namepart => $np->{content}, use => $np->{use}, pre => $np->{pre}, substring_compound => $np->{substring_compound}, substring_side => $np->{substring_side}, substring_width => $np->{substring_width} }; } $lants->{$t->{name}} = $lant; Biber::Config->setblxoption('labelalphanametemplate', $lants); } } elsif (lc($k) eq 'uniquenametemplate') { my $unts; foreach my $unt ($v->@*) { my $untval = []; foreach my $np (sort {$a->{order} <=> $b->{order}} $unt->{namepart}->@*) { push $untval->@*, {namepart => $np->{content}, use => $np->{use}, disambiguation => $np->{disambiguation}, base => $np->{base}}; } $unts->{$unt->{name}} = $untval; } Biber::Config->setblxoption('uniquenametemplate', $unts); } elsif (lc($k) eq 'sortingnamekeytemplate') { my $snss; foreach my $sns ($v->@*) { my $snkps; foreach my $snkp (sort {$a->{order} <=> $b->{order}} $sns->{keypart}->@*) { my $snps; foreach my $snp (sort {$a->{order} <=> $b->{order}} $snkp->{part}->@*) { my $np; if ($snp->{type} eq 'namepart') { $np = { type => 'namepart', value => $snp->{content} }; if (exists($snp->{use})) { $np->{use} = $snp->{use}; } if (exists($snp->{inits})) { $np->{inits} = $snp->{inits}; } } elsif ($snp->{type} eq 'literal') { $np = { type => 'literal', value => $snp->{content} }; } push $snps->@*, $np; } push $snkps->@*, $snps; } $snss->{$sns->{name}} = $snkps; } Biber::Config->setblxoption('sortingnamekeytemplate', $snss); } elsif (lc($k) eq 'transliteration') { foreach my $tr ($v->@*) { if ($tr->{entrytype}[0] eq '*') { # already array forced for another option Biber::Config->setblxoption('translit', $tr->{translit}); } else { # per_entrytype Biber::Config->setblxoption('translit', $tr->{translit}, 'ENTRYTYPE', $tr->{entrytype}[0]); } } } # mildly complex options - nosort/collate_options elsif (lc($k) eq 'nosort' or lc($k) eq 'noinit' or lc($k) eq 'nolabel' ) { Biber::Config->setconfigfileoption($k, $v->{option}); } # rather complex options elsif (lc($k) eq 'collate_options') { my $collopts = Biber::Config->getoption('collate_options'); # Override defaults with any user settings foreach my $co ($v->{option}->@*) { $collopts->{$co->{name}} = $co->{value}; } Biber::Config->setconfigfileoption($k, $collopts); } elsif (lc($k) eq 'sourcemap') { my $sms; foreach my $sm ($v->{maps}->@*) { if (defined($sm->{level}) and $sm->{level} eq 'driver') { carp("You can't set driver level sourcemaps via biber - use \\DeclareDriverSourcemap in biblatex. Ignoring map."); } elsif (defined($sm->{level}) and $sm->{level} eq 'style') { carp("You can't set style level sourcemaps via biber - use \\DeclareStyleSourcemap in biblatex. Ignoring map."); } else { push $sms->@*, $sm; } } Biber::Config->setconfigfileoption($k, $sms); } elsif (lc($k) eq 'inheritance') {# This is a biblatex option Biber::Config->setblxoption($k, $v); } elsif (lc($k) eq 'sortexclusion') {# This is a biblatex option foreach my $sex ($v->@*) { my $excludes; foreach my $ex ($sex->{exclusion}->@*) { $excludes->{$ex->{content}} = 1; } Biber::Config->setblxoption('sortexclusion', $excludes, 'ENTRYTYPE', $sex->{type}); } } elsif (lc($k) eq 'sortinclusion') {# This is a biblatex option foreach my $sin ($v->@*) { my $includes; foreach my $in ($sin->{inclusion}->@*) { $includes->{$in->{content}} = 1; } Biber::Config->setblxoption('sortinclusion', $includes, 'ENTRYTYPE', $sin->{type}); } } elsif (lc($k) eq 'presort') {# This is a biblatex option # presort defaults foreach my $presort ($v->@*) { # Global presort default unless (exists($presort->{type})) { Biber::Config->setblxoption('presort', $presort->{content}); } # Per-type default else { Biber::Config->setblxoption('presort', $presort->{content}, 'ENTRYTYPE', $presort->{type}); } } } elsif (lc($k) eq 'sortingtemplate') {# This is a biblatex option my $sorttemplates; foreach my $ss ($v->@*) { $sorttemplates->{$ss->{name}} = Biber::_parse_sort($ss); } Biber::Config->setblxoption('sortingtemplate', $sorttemplates); } elsif (lc($k) eq 'datamodel') {# This is a biblatex option Biber::Config->setblxoption('datamodel', $v); } elsif (exists($v->{content})) { # simple option Biber::Config->setconfigfileoption($k, $v->{content}); } } } =head2 config_file Returns the full path of the B configuration file. If returns the first file found among: =over 4 =item * C in the current directory =item * C<$HOME/.biber.conf> =item * C<$ENV{XDG_CONFIG_HOME}/biber/biber.conf> =item * C<$HOME/Library/biber/biber.conf> (Mac OSX only) =item * C<$ENV{APPDATA}/biber.conf> (Windows only) =item * the output of C (if available on the system). =back If no file is found, it returns C. =cut sub config_file { my $biberconf; if ( -f $BIBER_CONF_NAME ) { $biberconf = abs_path($BIBER_CONF_NAME); } elsif ( -f File::Spec->catfile($ENV{HOME}, ".$BIBER_CONF_NAME" ) ) { $biberconf = File::Spec->catfile($ENV{HOME}, ".$BIBER_CONF_NAME" ); } elsif ( defined $ENV{XDG_CONFIG_HOME} and -f File::Spec->catfile($ENV{XDG_CONFIG_HOME}, "biber", $BIBER_CONF_NAME) ) { $biberconf = File::Spec->catfile($ENV{XDG_CONFIG_HOME}, "biber", $BIBER_CONF_NAME); } elsif ( $^O =~ /(?:Mac|darwin)/ and -f File::Spec->catfile($ENV{HOME}, "Library", "biber", $BIBER_CONF_NAME) ) { $biberconf = File::Spec->catfile($ENV{HOME}, "Library", "biber", $BIBER_CONF_NAME); } elsif ( $^O =~ /Win/ and defined $ENV{APPDATA} and -f File::Spec->catfile($ENV{APPDATA}, "biber", $BIBER_CONF_NAME) ) { $biberconf = File::Spec->catfile($ENV{APPDATA}, "biber", $BIBER_CONF_NAME); } elsif ( can_run('kpsewhich') ) { my $err; run3 [ 'kpsewhich', $BIBER_CONF_NAME ], \undef, \$biberconf, \$err, { return_if_system_error => 1}; if ($? == -1) { biber_error("Error running kpsewhich to look for config file: $err"); } chomp $biberconf; $biberconf =~ s/\cM\z//xms; # kpsewhich in cygwin sometimes returns ^M at the end $biberconf = undef unless $biberconf; # sanitise just in case it's an empty string } else { $biberconf = undef; } return $biberconf; } ############################## # Biber options static methods ############################## =head2 add_uniq_ignore Track uniqueness ignore settings found in inheritance data =cut sub add_uniq_ignore { shift; # class method so don't care about class name my ($key, $field, $uniqs) = @_; return unless $uniqs; foreach my $u (split(/\s*,\s*/, $uniqs)) { push $CONFIG->{state}{uniqignore}{$key}{$u}->@*, $field; } return; } =head2 get_uniq_ignore Retrieve uniqueness ignore settings found in inheritance data =cut sub get_uniq_ignore { no autovivification; shift; # class method so don't care about class name my $key = shift; return $CONFIG->{state}{uniqignore}{$key}; } =head2 postprocess_biber_opts Place to postprocess biber options when they have been gathered from all the possible places that set them =cut sub postprocess_biber_opts { shift; # class method so don't care about class name # Turn sortcase and sortupper into booleans if they are not already # They are not booleans on the command-line/config file so that they # mirror biblatex option syntax for users, for example foreach my $opt ('sortcase', 'sortupper') { if (exists($CONFIG->{options}{biber}{$opt})) { if ($CONFIG->{options}{biber}{$opt} eq 'true') { $CONFIG->{options}{biber}{$opt} = 1; } elsif ($CONFIG->{options}{biber}{$opt} eq 'false') { $CONFIG->{options}{biber}{$opt} = 0; } unless ($CONFIG->{options}{biber}{$opt} eq '1' or $CONFIG->{options}{biber}{$opt} eq '0') { Biber::Utils::biber_error("Invalid value for option '$opt'"); } } } } =head2 set_dm Sets the data model information object =cut sub set_dm { shift; my $obj = shift; $CONFIG->{dm} = $obj; return; } =head2 get_dm Gets the data model information object =cut sub get_dm { shift; return $CONFIG->{dm}; } =head2 get_dm_helpers Sets the datamodel helper lists =cut sub get_dm_helpers { shift; return $CONFIG->{dm}{helpers}; } =head2 set_ctrlfile_path Stores the path to the control file =cut sub set_ctrlfile_path { shift; $CONFIG->{control_file_location} = shift; return; } =head2 get_ctrlfile_path Retrieved the path to the control file =cut sub get_ctrlfile_path { shift; return $CONFIG->{control_file_location}; } =head2 setoption Store a Biber config option =cut sub setoption { shift; # class method so don't care about class name my ($opt, $val) = @_; $CONFIG->{options}{biber}{$opt} = $val; return; } =head2 getoption Get a Biber option =cut sub getoption { shift; # class method so don't care about class name my $opt = shift; return $CONFIG->{options}{biber}{$opt}; } =head2 setcmdlineoption Store a Biber command-line option =cut sub setcmdlineoption { shift; # class method so don't care about class name my ($opt, $val) = @_; # Command line options are also options ... $CONFIG->{options}{biber}{$opt} = $CONFIG->{cmdlineoptions}{$opt} = $val; return; } =head2 setconfigfileoption Store a Biber config-file option =cut sub setconfigfileoption { shift; # class method so don't care about class name my ($opt, $val) = @_; # Config file options are also options ... $CONFIG->{options}{biber}{$opt} = $CONFIG->{configfileoptions}{$opt} = $val; # Config file options can also be global biblatex options if ($CONFIG_OPTSCOPE_BIBLATEX{$opt}) { $CONFIG->{options}{biblatex}{GLOBAL}{$opt} = $val; } return; } =head2 iscmdlineoption Check if an option is explicitly set by user on the command line =cut sub iscmdlineoption { shift; # class method so don't care about class name my $opt = shift; return 1 if defined($CONFIG->{cmdlineoptions}{$opt}); return 0; } =head2 isconfigfileoption Check if an option is explicitly set by user in their config file =cut sub isconfigfileoption { shift; # class method so don't care about class name my $opt = shift; return 1 if defined($CONFIG->{configfileoptions}{$opt}); return 0; } =head2 isexplicitoption Check if an option is explicitly set by user on the command line or in the config file =cut sub isexplicitoption { my $self = shift; my $opt = shift; return 1 if ($self->iscmdlineoption($opt) || $self->isconfigfileoption($opt)); return 0; } ################################# # BibLaTeX options static methods ################################# =head2 setblxoption Set a biblatex option on the appropriate scope =cut sub setblxoption { shift; # class method so don't care about class name my ($opt, $val, $scope, $scopeval) = @_; if (not defined($scope)) { # global is the default if ($CONFIG_OPTSCOPE_BIBLATEX{$opt}->{GLOBAL}) { $CONFIG->{options}{biblatex}{GLOBAL}{$opt} = $val; } } else { # Per-type/entry options need to specify type/entry too if ($CONFIG_OPTSCOPE_BIBLATEX{$opt}->{$scope}) { $CONFIG->{options}{biblatex}{$scope}{$scopeval}{$opt} = $val; } } return; } =head2 getblxoption Get a biblatex option from the global, per-type or per entry scope getblxoption('option', ['entrytype'], ['citekey']) Returns the value of option. In order of decreasing preference, returns: 1. Biblatex option defined for entry 2. Biblatex option defined for entry type 3. Biblatex option defined globally =cut sub getblxoption { no autovivification; shift; # class method so don't care about class name my ($opt, $entrytype, $citekey) = @_; if ( defined($citekey) and $CONFIG_OPTSCOPE_BIBLATEX{$opt}->{ENTRY} and defined $CONFIG->{options}{biblatex}{ENTRY}{$citekey}{$opt}) { return $CONFIG->{options}{biblatex}{ENTRY}{$citekey}{$opt}; } elsif (defined($entrytype) and $CONFIG_OPTSCOPE_BIBLATEX{$opt}->{ENTRYTYPE} and defined $CONFIG->{options}{biblatex}{ENTRYTYPE}{lc($entrytype)}{$opt}) { return $CONFIG->{options}{biblatex}{ENTRYTYPE}{lc($entrytype)}{$opt}; } elsif ($CONFIG_OPTSCOPE_BIBLATEX{$opt}->{GLOBAL}) { return $CONFIG->{options}{biblatex}{GLOBAL}{$opt}; } } =head2 getblxentryoptions Get all per-entry options for an entry =cut sub getblxentryoptions { no autovivification; shift; # class method so don't care about class name my $key = shift; return keys $CONFIG->{options}{biblatex}{ENTRY}{$key}->%*; } ############################## # Inheritance state methods ############################## =head2 set_graph Record node and arc connection types for .dot output =cut sub set_graph { shift; # class method so don't care about class name my $type = shift; if ($type eq 'set') { my ($source_key, $target_key) = @_; if ($logger->is_debug()) {# performance tune $logger->debug("Saving DOT graph information type 'set' with SOURCEKEY=$source_key, TARGETKEY=$target_key"); } $CONFIG->{state}{graph}{$type}{settomem}{$source_key}{$target_key} = 1; $CONFIG->{state}{graph}{$type}{memtoset}{$target_key} = $source_key; } elsif ($type eq 'xref') { my ($source_key, $target_key) = @_; if ($logger->is_debug()) {# performance tune $logger->debug("Saving DOT graph information type 'xref' with SOURCEKEY=$source_key, TARGETKEY=$target_key"); } $CONFIG->{state}{graph}{$type}{$source_key} = $target_key; } elsif ($type eq 'related') { my ($clone_key, $related_key, $target_key) = @_; if ($logger->is_debug()) {# performance tune $logger->debug("Saving DOT graph information type 'related' with CLONEKEY=$clone_key, RELATEDKEY=$related_key, TARGETKEY=$target_key"); } $CONFIG->{state}{graph}{$type}{reltoclone}{$related_key}{$clone_key} = 1; $CONFIG->{state}{graph}{$type}{clonetotarget}{$clone_key}{$target_key} = 1; } else { my ($source_key, $target_key, $source_field, $target_field) = @_; if ($logger->is_debug()) {# performance tune $logger->debug("Saving DOT graph information type '$type' with SOURCEKEY=$source_key, TARGETKEY=$target_key, SOURCEFIELD=$source_field, TARGETFIELD=$target_field"); } # source can go to more than one target (and does in default rules) so need array here push $CONFIG->{state}{graph}{$type}{$source_key}{$source_field}{$target_key}->@*, $target_field; } return; } =head2 get_graph Return an inheritance graph data structure for an inheritance type =cut sub get_graph { shift; # class method so don't care about class name my $type = shift; return $CONFIG->{state}{graph}{$type}; } =head2 set_set_pc Record a parent->child set relationship =cut sub set_set_pc { shift; # class method so don't care about class name my ($parent, $child) = @_; $CONFIG->{state}{set}{pc}{$parent}{$child} = 1; return; } =head2 set_set_cp Record a child->parent set relationship =cut sub set_set_cp { shift; # class method so don't care about class name my ($child, $parent) = @_; $CONFIG->{state}{set}{cp}{$child}{$parent} = 1; return; } =head2 get_set_pc Return a boolean saying if there is a parent->child set relationship =cut sub get_set_pc { shift; # class method so don't care about class name my ($parent, $child) = @_; return exists($CONFIG->{state}{set}{pc}{$parent}{$child}) ? 1 : 0; } =head2 get_set_cp Return a boolean saying if there is a child->parent set relationship =cut sub get_set_cp { shift; # class method so don't care about class name my ($child, $parent) = @_; return exists($CONFIG->{state}{set}{cp}{$child}{$parent}) ? 1 : 0; } =head2 get_set_children Return a list of children for a parent set =cut sub get_set_children { shift; # class method so don't care about class name my $parent = shift; if (exists($CONFIG->{state}{set}{pc}{$parent})) { return (keys $CONFIG->{state}{set}{pc}{$parent}->%*); } else { return (); } } =head2 get_set_parents Return a list of parents for a child of a set =cut sub get_set_parents { shift; # class method so don't care about class name my $child = shift; if (exists($CONFIG->{state}{set}{cp}{$child})) { return (keys $CONFIG->{state}{set}{cp}{$child}->%*); } else { return (); } } =head2 set_inheritance Record that $target inherited information from $source Can be used for crossrefs and xdata. This just records that an entry inherited from another entry, for loop detection. =cut sub set_inheritance { shift; # class method so don't care about class name my ($type, $source, $target) = @_; push $CONFIG->{state}{$type}->@*, {s => $source, t => $target}; return; } =head2 get_inheritance Check if $target directly inherited information from $source Can be used for crossrefs and xdata =cut sub get_inheritance { shift; # class method so don't care about class name my ($type, $source, $target) = @_; return first {$_->{s} eq $source and $_->{t} eq $target} $CONFIG->{state}{$type}->@*; } =head2 is_inheritance_path Checks for an inheritance path from entry $e1 to $e2 Can be used for crossrefs and xdata [ {s => 'A', t => 'B'}, {s => 'A', t => 'E'}, {s => 'B', t => 'C'}, {s => 'C', t => 'D'} ]; =cut sub is_inheritance_path { my ($self, $type, $e1, $e2) = @_; foreach my $dps (grep {$_->{s} eq $e1} $CONFIG->{state}{$type}->@*) { return 1 if $dps->{t} eq $e2; return 1 if is_inheritance_path($self, $type, $dps->{t}, $e2); } return 0; } =head1 keyorder =head2 set_keyorder Set some key order information =cut sub set_keyorder { shift; # class method so don't care about class name my ($section, $key, $keyorder) = @_; $CONFIG->{state}{keyorder}{$section}{$key} = $keyorder; return; } =head2 get_keyorder Get some key order information =cut sub get_keyorder { shift; # class method so don't care about class name my ($section, $key) = @_; return $CONFIG->{state}{keyorder}{$section}{$key}; } =head2 get_keyorder_max Get maximum key order number for a section =cut sub get_keyorder_max { shift; # class method so don't care about class name my $section = shift; return (max values $CONFIG->{state}{keyorder}{$section}->%*) || 0; } =head2 reset_keyorder Reset keyorder - for use in tests where we switch to allkeys =cut sub reset_keyorder { shift; # class method so don't care about class name my $section = shift; delete $CONFIG->{state}{keyorder}{$section}; return; } =head1 seenkey =head2 get_seenkey Get the count of a key =cut sub get_seenkey { shift; # class method so don't care about class name my $key = shift; my $section = shift; # If passed, return count for just this section if (defined($section)) { return $CONFIG->{state}{seenkeys}{$section}{$key}; } else { my $count; foreach my $section (keys $CONFIG->{state}{seenkeys}->%*) { $count += $CONFIG->{state}{seenkeys}{$section}{$key}; } return $count; } } =head2 incr_seenkey Increment the seen count of a key =cut sub incr_seenkey { shift; # class method so don't care about class name my $key = shift; my $section = shift; $CONFIG->{state}{seenkeys}{$section}{$key}++; return; } =head1 crossrefkeys =head2 get_crossrefkeys Return ref to array of keys which are crossref targets =cut sub get_crossrefkeys { shift; # class method so don't care about class name return [ keys $CONFIG->{state}{crossrefkeys}->%* ]; } =head1 xrefkeys =head2 get_xrefkeys Return ref to array of keys which are xref targets =cut sub get_xrefkeys { shift; # class method so don't care about class name return [ keys $CONFIG->{state}{xrefkeys}->%* ]; } =head2 get_crossrefkey Return an integer representing the number of times a crossref target key has been ref'ed =cut sub get_crossrefkey { shift; # class method so don't care about class name my $k = shift; return $CONFIG->{state}{crossrefkeys}{$k}; } =head2 get_xrefkey Return an integer representing the number of times a xref target key has been ref'ed =cut sub get_xrefkey { shift; # class method so don't care about class name my $k = shift; return $CONFIG->{state}{xrefkeys}{$k}; } =head2 del_crossrefkey Remove a crossref target key from the crossrefkeys state =cut sub del_crossrefkey { shift; # class method so don't care about class name my $k = shift; if (exists($CONFIG->{state}{crossrefkeys}{$k})) { delete $CONFIG->{state}{crossrefkeys}{$k}; } return; } =head2 del_xrefkey Remove a xref target key from the xrefkeys state =cut sub del_xrefkey { shift; # class method so don't care about class name my $k = shift; if (exists($CONFIG->{state}{xrefkeys}{$k})) { delete $CONFIG->{state}{xrefkeys}{$k}; } return; } =head2 incr_crossrefkey Increment the crossreferences count for a target crossref key =cut sub incr_crossrefkey { shift; # class method so don't care about class name my $k = shift; $CONFIG->{state}{crossrefkeys}{$k}++; return; } =head2 incr_xrefkey Increment the xreferences count for a target xref key =cut sub incr_xrefkey { shift; # class method so don't care about class name my $k = shift; $CONFIG->{state}{xrefkeys}{$k}++; return; } =head2 dump Dump config information (for debugging) =cut sub dump { shift; # class method so don't care about class name dd($CONFIG); } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Utils.pm000444000153000001 11214213205066062 17126 0ustar00vboxother000000000000package Biber::Utils; use v5.24; use strict; use warnings; use parent qw(Exporter); use constant { EXIT_OK => 0, EXIT_ERROR => 2 }; use Carp; use Encode; use File::Find; use File::Spec; use IPC::Cmd qw( can_run ); use IPC::Run3; # This works with PAR::Packer and Windows. IPC::Run doesn't use Biber::Constants; use Biber::LaTeX::Recode; use Biber::Entry::Name; use Data::Uniqid qw ( suniqid ); use Regexp::Common qw( balanced ); use List::AllUtils qw( first ); use Log::Log4perl qw(:no_extra_logdie_message); use Scalar::Util qw(looks_like_number); use Text::CSV; use Text::Roman qw(isroman roman2int); use Unicode::Normalize; use Unicode::GCString; my $logger = Log::Log4perl::get_logger('main'); =encoding utf-8 =head1 NAME Biber::Utils - Various utility subs used in Biber =cut =head1 EXPORT All functions are exported by default. =cut our @EXPORT = qw{ locate_biber_file makenamesid makenameid stringify_hash normalise_string normalise_string_hash normalise_string_underscore normalise_string_sort normalise_string_label reduce_array remove_outer has_outer add_outer ucinit strip_nosort strip_noinit is_def is_undef is_def_and_notnull is_def_and_null is_undef_or_null is_notnull is_null normalise_utf8 inits join_name latex_recode_output filter_entry_options biber_error biber_warn ireplace imatch validate_biber_xml process_entry_options remove_entry_options escape_label unescape_label biber_decode_utf8 out parse_date_start parse_date_end parse_date_range locale2bcp47 bcp472locale rangelen match_indices process_comment map_boolean parse_range parse_range_alt maploopreplace get_transliterator call_transliterator normalise_string_bblxml gen_initials join_name_parts split_xsv edtf_monthday tzformat expand_option}; =head1 FUNCTIONS =head2 locate_biber_file Searches for a file by The exact path if the filename is absolute In the input_directory, if defined In the output_directory, if defined Relative to the current directory In the same directory as the control file Using kpsewhich, if available =cut sub locate_biber_file { my $filename = shift; my $filenamepath = $filename; # default if nothing else below applies my $foundfile; # If input_directory is set, perhaps the file can be found there so # construct a path to test later if (my $indir = Biber::Config->getoption('input_directory')) { $foundfile = File::Spec->catfile($indir, $filename); } # If output_directory is set, perhaps the file can be found there so # construct a path to test later elsif (my $outdir = Biber::Config->getoption('output_directory')) { $foundfile = File::Spec->catfile($outdir, $filename); } # Filename is absolute if (File::Spec->file_name_is_absolute($filename) and -e $filename) { return $filename; } # File is input_directory or output_directory if (defined($foundfile) and -e $foundfile) { return $foundfile; } # NFD filesystem: File is relative to cwd if (-e NFD($filename)) { return NFD($filename); } # NFC filesystem: File is relative to cwd if (-e NFC($filename)) { return NFC($filename); } # File is where control file lives if (my $cfp = Biber::Config->get_ctrlfile_path) { my ($ctlvolume, $ctldir, undef) = File::Spec->splitpath($cfp); if ($ctlvolume) { # add vol sep for windows if volume is set and there isn't one $ctlvolume .= ':' unless $ctlvolume =~ /:\z/; } if ($ctldir) { # add path sep if there isn't one $ctldir .= '/' unless $ctldir =~ /\/\z/; } my $path = "$ctlvolume$ctldir$filename"; return $path if -e $path; } # File is in kpse path if (can_run('kpsewhich')) { if ($logger->is_debug()) {# performance tune $logger->debug("Looking for file '$filename' via kpsewhich"); } my $found; my $err; run3 [ 'kpsewhich', $filename ], \undef, \$found, \$err, { return_if_system_error => 1}; if ($?) { if ($logger->is_debug()) {# performance tune $logger->debug("kpsewhich returned error: $err ($!)"); } } if ($logger->is_trace()) {# performance tune $logger->trace("kpsewhich returned '$found'"); } if ($found) { if ($logger->is_debug()) {# performance tune $logger->debug("Found '$filename' via kpsewhich"); } chomp $found; $found =~ s/\cM\z//xms; # kpsewhich in cygwin sometimes returns ^M at the end # filename can be UTF-8 and run3() isn't clever with UTF-8 return decode_utf8($found); } else { if ($logger->is_debug()) {# performance tune $logger->debug("Could not find '$filename' via kpsewhich"); } } } return undef; } =head2 biber_warn Wrapper around various warnings bits and pieces Logs a warning, add warning to the list of .bbl warnings and optionally increments warning count in Biber object, if present =cut sub biber_warn { my ($warning, $entry) = @_; $logger->warn($warning); $entry->add_warning($warning) if $entry; $Biber::MASTER->{warnings}++; return; } =head2 biber_error Wrapper around error logging Forces an exit. =cut sub biber_error { my $error = shift; $logger->error($error); $Biber::MASTER->{errors}++; # exit unless user requested not to for errors unless (Biber::Config->getoption('nodieonerror')) { $Biber::MASTER->display_problems; exit EXIT_ERROR; } } =head2 makenamesid Given a Biber::Names object, return an underscore normalised concatenation of all of the full name strings. =cut sub makenamesid { my $names = shift; my @namestrings; foreach my $name ($names->names->@*) { push @namestrings, $name->get_namestring; } my $tmp = join ' ', @namestrings; return normalise_string_underscore($tmp); } =head2 makenameid Given a Biber::Name object, return an underscore normalised concatenation of the full name strings. =cut sub makenameid { my $name = shift; return normalise_string_underscore($name->get_namestring); } =head2 latex_recode_output Tries to convert UTF-8 to TeX macros in passed string =cut sub latex_recode_output { my $string = shift; return Biber::LaTeX::Recode::latex_encode($string); }; =head2 strip_noinit Removes elements which are not to be considered during initials generation in names =cut sub strip_noinit { my $string = shift; return '' unless $string; # Sanitise missing data return $string unless my $noinit = Biber::Config->getoption('noinit'); foreach my $opt ($noinit->@*) { my $re = $opt->{value}; $string =~ s/$re//gxms; } return $string; } =head2 strip_nosort Removes elements which are not to be used in sorting a name from a string =cut sub strip_nosort { no autovivification; my ($string, $fieldname) = @_; return '' unless $string; # Sanitise missing data return $string unless my $nosort = Biber::Config->getoption('nosort'); my $restrings; foreach my $nsopt ($nosort->@*) { # Specific fieldnames override sets if (fc($nsopt->{name}) eq fc($fieldname)) { push $restrings->@*, $nsopt->{value}; } elsif (my $set = $DATAFIELD_SETS{lc($nsopt->{name})} ) { if (first {fc($_) eq fc($fieldname)} $set->@*) { push $restrings->@*, $nsopt->{value}; } } } # If no nosort to do, just return string return $string unless $restrings; foreach my $re ($restrings->@*) { $string =~ s/$re//gxms; } return $string; } =head2 normalise_string_label Remove some things from a string for label generation. =cut sub normalise_string_label { my $str = shift; return '' unless $str; # Sanitise missing data my $nolabels = Biber::Config->getoption('nolabel'); $str =~ s/\\[A-Za-z]+//g; # remove latex macros (assuming they have only ASCII letters) # Replace ties with spaces or they will be lost $str =~ s/([^\\])~/$1 /g; # Foo~Bar -> Foo Bar foreach my $nolabel ($nolabels->@*) { my $re = $nolabel->{value}; $str =~ s/$re//gxms; # remove nolabel items } $str =~ s/(?:^\s+|\s+$)//g; # Remove leading and trailing spaces $str =~ s/\s+/ /g; # collapse spaces return $str; } =head2 normalise_string_sort Removes LaTeX macros, and all punctuation, symbols, separators and control characters, as well as leading and trailing whitespace for sorting strings. =cut sub normalise_string_sort { my $str = shift; my $fieldname = shift; return '' unless $str; # Sanitise missing data # First strip nosort REs $str = strip_nosort($str, $fieldname); # Then replace ties with spaces or they will be lost $str =~ s/([^\\])~/$1 /g; # Foo~Bar -> Foo Bar # Don't use normalise_string_common() as this strips out things needed for sorting $str =~ s/\\[A-Za-z]+//g; # remove latex macros (assuming they have only ASCII letters) $str =~ s/[\{\}\p{C}]+//g; # remove embedded braces and control $str =~ s/^\s+|\s+$//g; # Remove leading and trailing spaces $str =~ s/\s+/ /g; # collapse spaces return $str; } =head2 normalise_string_bblxml Some string normalisation for bblxml output =cut sub normalise_string_bblxml { my $str = shift; return '' unless $str; # Sanitise missing data $str =~ s/\\[A-Za-z]+//g; # remove latex macros (assuming they have only ASCII letters) $str =~ s/\{([^\{\}]+)\}/$1/g; # remove pointless braces $str =~ s/~/ /g; # replace ties with spaces return $str; } =head2 normalise_string Removes LaTeX macros, and all punctuation, symbols, separators and control characters, as well as leading and trailing whitespace for sorting strings. Only decodes LaTeX character macros into Unicode if output is UTF-8 =cut sub normalise_string { my $str = shift; return '' unless $str; # Sanitise missing data # First replace ties with spaces or they will be lost $str =~ s/([^\\])~/$1 /g; # Foo~Bar -> Foo Bar return normalise_string_common($str); } =head2 normalise_string_common Common bit for normalisation =cut sub normalise_string_common { my $str = shift; $str =~ s/\\[A-Za-z]+//g; # remove latex macros (assuming they have only ASCII letters) $str =~ s/[\p{P}\p{S}\p{C}]+//g; # remove punctuation, symbols and control $str =~ s/^\s+|\s+$//g; # Remove leading and trailing spaces $str =~ s/\s+/ /g; # collapse spaces return $str; } =head2 normalise_string_hash Normalise strings used for hashes. We collapse LaTeX macros into a vestige so that hashes are unique between things like: Smith {\v S}mith we replace macros like this to preserve their vestiges: \v S -> v: \" -> 34: =cut sub normalise_string_hash { my $str = shift; return '' unless $str; # Sanitise missing data $str =~ s/\\(\p{L}+)\s*/$1:/g; # remove tex macros $str =~ s/\\([^\p{L}])\s*/ord($1).':'/ge; # remove accent macros like \"a $str =~ s/[\{\}~\.\s]+//g; # Remove brackes, ties, dots, spaces return $str; } =head2 normalise_string_underscore Like normalise_string, but also substitutes ~ and whitespace with underscore. =cut sub normalise_string_underscore { my $str = shift; return '' unless $str; # Sanitise missing data $str =~ s/([^\\])~/$1 /g; # Foo~Bar -> Foo Bar $str = normalise_string($str); $str =~ s/\s+/_/g; return $str; } =head2 escape_label Escapes a few special character which might be used in labels =cut sub escape_label { my $str = shift; return '' unless $str; # Sanitise missing data $str =~ s/([_\^\$\#\%\&])/\\$1/g; $str =~ s/~/{\\textasciitilde}/g; $str =~ s/>/{\\textgreater}/g; $str =~ s//g; $str =~ s/\{\\textless\}/@*) { $countb{$elem}++; } my @result; foreach my $elem ($a->@*) { push @result, $elem unless $countb{$elem}; } return @result; } =head2 remove_outer Remove surrounding curly brackets: '{string}' -> 'string' but not '{string} {string}' -> 'string} {string' Return (boolean if stripped, string) =cut sub remove_outer { my $str = shift; return (0, $str) if $str =~ m/}\s*{/; my $r = $str =~ s/^{(\X+)}$/$1/; return (($r ? 1 : 0), $str); } =head2 has_outer Return (boolean if surrounded in braces =cut sub has_outer { my $str = shift; return 0 if $str =~ m/}\s*{/; return $str =~ m/^{\X+}$/; } =head2 add_outer Add surrounding curly brackets: 'string' -> '{string}' =cut sub add_outer { my $str = shift; return '{' . $str . '}'; } =head2 ucinit upper case of initial letters in a string =cut sub ucinit { my $str = shift; $str = lc($str); $str =~ s/\b(\p{Ll})/\u$1/g; return $str; } =head2 is_undef Checks for undefness of arbitrary things, including composite method chain calls which don't reliably work with defined() (see perldoc for defined()) This works because we are just testing the value passed to this sub. So, for example, this is randomly unreliable even if the resulting value of the arg to defined() is "undef": defined($thing->method($arg)->method) wheras: is_undef($thing->method($arg)->method) works since we only test the return value of all the methods with defined() =cut sub is_undef { my $val = shift; return defined($val) ? 0 : 1; } =head2 is_def Checks for definedness in the same way as is_undef() =cut sub is_def { my $val = shift; return defined($val) ? 1 : 0; } =head2 is_undef_or_null Checks for undef or nullness (see is_undef() above) =cut sub is_undef_or_null { my $val = shift; return 1 if is_undef($val); return $val ? 0 : 1; } =head2 is_def_and_notnull Checks for def and unnullness (see is_undef() above) =cut sub is_def_and_notnull { my $arg = shift; if (defined($arg) and is_notnull($arg)) { return 1; } else { return 0; } } =head2 is_def_and_null Checks for def and nullness (see is_undef() above) =cut sub is_def_and_null { my $arg = shift; if (defined($arg) and is_null($arg)) { return 1; } else { return 0; } } =head2 is_null Checks for nullness =cut sub is_null { my $arg = shift; return is_notnull($arg) ? 0 : 1; } =head2 is_notnull Checks for notnullness =cut sub is_notnull { my $arg = shift; return undef unless defined($arg); my $st = is_notnull_scalar($arg); if (defined($st) and $st) { return 1; } my $at = is_notnull_array($arg); if (defined($at) and $at) { return 1; } my $ht = is_notnull_hash($arg); if (defined($ht) and $ht) { return 1; } my $ot = is_notnull_object($arg); if (defined($ot) and $ot) { return 1; } return 0; } =head2 is_notnull_scalar Checks for notnullness of a scalar =cut sub is_notnull_scalar { my $arg = shift; unless (ref \$arg eq 'SCALAR') { return undef; } return $arg ne '' ? 1 : 0; } =head2 is_notnull_array Checks for notnullness of an array (passed by ref) =cut sub is_notnull_array { my $arg = shift; unless (ref $arg eq 'ARRAY') { return undef; } my @arr = $arg->@*; return $#arr > -1 ? 1 : 0; } =head2 is_notnull_hash Checks for notnullness of an hash (passed by ref) =cut sub is_notnull_hash { my $arg = shift; unless (ref $arg eq 'HASH') { return undef; } my @arr = keys $arg->%*; return $#arr > -1 ? 1 : 0; } =head2 is_notnull_object Checks for notnullness of an object (passed by ref) =cut sub is_notnull_object { my $arg = shift; unless (ref($arg) =~ m/\ABiber::/xms) { return undef; } return $arg->notnull ? 1 : 0; } =head2 stringify_hash Turns a hash into a string of keys and values =cut sub stringify_hash { my $hashref = shift; my $string; while (my ($k,$v) = each $hashref->%*) { $string .= "$k => $v, "; } # Take off the trailing comma and space chop $string; chop $string; return $string; } =head2 normalise_utf8 Normalise any UTF-8 encoding string immediately to exactly what we want We want the strict perl utf8 "UTF-8" =cut sub normalise_utf8 { if (defined(Biber::Config->getoption('input_encoding')) and Biber::Config->getoption('input_encoding') =~ m/\Autf-?8\z/xmsi) { Biber::Config->setoption('input_encoding', 'UTF-8'); } if (defined(Biber::Config->getoption('output_encoding')) and Biber::Config->getoption('output_encoding') =~ m/\Autf-?8\z/xmsi) { Biber::Config->setoption('output_encoding', 'UTF-8'); } } =head2 inits We turn the initials into an array so we can be flexible with them later The tie here is used only so we know what to split on. We don't want to make any typesetting decisions in Biber, like what to use to join initials so on output to the .bbl, we only use BibLaTeX macros. =cut sub inits { my $istring = shift; return [ split(/(?@*) { m/^([^=\s]+)\s*=?\s*([^\s]+)?$/; my $cfopt = $CONFIG_BIBLATEX_ENTRY_OPTIONS{lc($1)}{OUTPUT}; # convert booleans my $val = $2; if ($val and $CONFIG_OPTTYPE_BIBLATEX{lc($1)} and $CONFIG_OPTTYPE_BIBLATEX{lc($1)} eq 'boolean') { $val = map_boolean($val, 'tostring'); } # Standard option if (not defined($cfopt) or $cfopt == 1) { push $roptions->@*, $1 . ($val ? "=$val" : '') ; } # Set all split options to same value as parent elsif (ref($cfopt) eq 'ARRAY') { foreach my $map ($cfopt->@*) { push $roptions->@*, "$map=$val"; } } # Set all splits to specific values elsif (ref($cfopt) eq 'HASH') { foreach my $map (keys $cfopt->%*) { push $roptions->@*, "$map=" . $_->{$map}; } } } return $roptions; } =head2 imatch Do an interpolating (neg)match using a match RE and a string passed in as variables Using /g on matches so that $1,$2 etc. can be populated from repeated matches of same capture group as well as different groups =cut sub imatch { my ($value, $val_match, $negmatch) = @_; return 0 unless $val_match; $val_match = qr/$val_match/; if ($negmatch) {# "!~" doesn't work here as we need an array returned return $value =~ m/$val_match/xmsg ? () : (1); } else { return $value =~ m/$val_match/xmsg; } } =head2 ireplace Do an interpolating match/replace using a match RE, replacement RE and string passed in as variables =cut sub ireplace { my ($value, $val_match, $val_replace) = @_; return $value unless $val_match; $val_match = qr/$val_match/; # Tricky quoting because of later evals $val_replace = '"' . $val_replace . '"'; $value =~ s/$val_match/$val_replace/eegxms; return $value; } =head2 validate_biber_xml Validate a biber/biblatex XML metadata file against an RNG XML schema =cut sub validate_biber_xml { my ($file, $type, $prefix, $schema) = @_; require XML::LibXML; # Set up XML parser my $xmlparser = XML::LibXML->new(); $xmlparser->line_numbers(1); # line numbers for more informative errors # Set up schema my $xmlschema; # Deal with the strange world of Par::Packer paths # We might be running inside a PAR executable and @INC is a bit odd in this case # Specifically, "Biber.pm" in @INC might resolve to an internal jumbled name # nowhere near to these files. You know what I mean if you've dealt with pp unless ($schema) { # we assume that unspecified schema files are in the same dir as Biber.pm: (my $vol, my $biber_path, undef) = File::Spec->splitpath( $INC{"Biber.pm"} ); $biber_path =~ s/\/$//; # splitpath sometimes leaves a trailing '/' if ($biber_path =~ m|/par\-| and $biber_path !~ m|/inc|) { # a mangled PAR @INC path $schema = File::Spec->catpath($vol, "$biber_path/inc/lib/Biber", "${type}.rng"); } else { $schema = File::Spec->catpath($vol, "$biber_path/Biber", "${type}.rng"); } } if (-e $schema) { $xmlschema = XML::LibXML::RelaxNG->new( location => $schema ) } else { biber_warn("Cannot find XML::LibXML::RelaxNG schema '$schema'. Skipping validation : $!"); return; } # Parse file my $doc = $xmlparser->load_xml(location => $file); # XPath context if ($prefix) { my $xpc = XML::LibXML::XPathContext->new($doc); $xpc->registerNs($type, $prefix); } # Validate against schema. Dies if it fails. eval { $xmlschema->validate($doc) }; if (ref($@)) { if ($logger->is_debug()) {# performance tune $logger->debug( $@->dump() ); } biber_error("'$file' failed to validate against schema '$schema'"); } elsif ($@) { biber_error("'$file' failed to validate against schema '$schema'\n$@"); } else { $logger->info("'$file' validates against schema '$schema'"); } undef $xmlparser; } =head2 map_boolean Convert booleans between strings and numbers. Because standard XML "boolean" datatype considers "true" and "1" the same etc. =cut sub map_boolean { my $b = lc(shift); my $dir = shift; my %map = (true => 1, false => 0, ); if ($dir eq 'tonum') { return $b if looks_like_number($b); return $map{$b}; } elsif ($dir eq 'tostring') { return $b if not looks_like_number($b); %map = reverse %map; return $map{$b}; } } =head2 remove_entry_options Remove per-entry options =cut sub remove_entry_options { my $options = shift; my $mods = shift; my $changed_opts; foreach ($options->@*) { s/\s+=\s+/=/g; # get rid of spaces around any "=" m/^([^=]+)(=?)(.+)?$/; unless ($mods->{$1}) { push $changed_opts->@*, ($1 . ($2 // '') . ($3 // '')); } } return $changed_opts; } =head2 process_entry_options Set per-entry options =cut sub process_entry_options { my $citekey = shift; my $options = shift; return unless $options; # Just in case it's null foreach ($options->@*) { s/\s+=\s+/=/g; # get rid of spaces around any "=" m/^([^=]+)=?(.+)?$/; my $val = $2 // 1; # bare options are just boolean numerals if ($CONFIG_OPTTYPE_BIBLATEX{lc($1)} and $CONFIG_OPTTYPE_BIBLATEX{lc($1)} eq 'boolean') { $val = map_boolean($val, 'tonum'); } my $oo = expand_option($1, $val, $CONFIG_BIBLATEX_ENTRY_OPTIONS{lc($1)}->{INPUT}); foreach my $o ($oo->@*) { Biber::Config->setblxoption($o->[0], $o->[1], 'ENTRY', $citekey); } } return; } =head2 expand_option Expand option such as meta-options coming from biblatex =cut sub expand_option { my ($opt, $val, $cfopt) = @_; my $outopts; # Standard option if (not defined($cfopt)) { push $outopts->@*, [$opt, $val]; } # Set all split options elsif (ref($cfopt) eq 'ARRAY') { foreach my $k ($cfopt->@*) { push $outopts->@*, [$k, $val]; } } # Specify values per all splits elsif (ref($cfopt) eq 'HASH') { foreach my $k (keys $cfopt->%*) { push $outopts->@*, [$k, $cfopt->{$k}]; } } return $outopts; } =head2 parse_date_range Parse of EDTF date range Returns two-element array ref: [start DT object, end DT object] =cut sub parse_date_range { my ($bibentry, $datetype, $datestring) = @_; my ($sd, $sep, $ed) = $datestring =~ m|^([^/]+)?(/)?([^/]+)?$|; my $unspec; if ($sd =~ /u/ and $sd !~ /unknown/) {# EDTF 5.2.2 Unspecified format but not 5.2.3 ($sd, $sep, $ed, $unspec) = parse_date_edtf_unspecified($sd); } # Set start date unknown flag if ($sd) { if (fc($sd) eq fc('unknown') or fc($sd) eq fc('*')) { $bibentry->set_field($datetype . 'dateunknown',1); } } # Set end date unknown flag if ($ed) { if (fc($ed) eq fc('unknown') or fc($ed) eq fc('*')) { $bibentry->set_field($datetype . 'enddateunknown',1); } } return (parse_date_start($sd), parse_date_end($ed), $sep, $unspec); } =head2 parse_date_edtf_unspecified Parse of EDTF 5.2.2 Unspecified format into date range Returns range plus specification of granularity of unspecified =cut sub parse_date_edtf_unspecified { my $d = shift; # 199u -> 1990/1999 if ($d =~ m/^(\d{3})u$/) { return ("${1}0", '/', "${1}9", 'yearindecade'); } # 19uu -> 1900/1999 elsif ($d =~ m/^(\d{2})uu$/) { return ("${1}00", '/', "${1}99", 'yearincentury'); } # 1999-uu -> 1999-01/1999-12 elsif ($d =~ m/^(\d{4})\p{Dash}uu$/) { return ("${1}-01", '/', "${1}-12", 'monthinyear'); } # 1999-01-uu -> 1999-01-01/1999-01-31 # (understands different months and leap years) elsif ($d =~ m/^(\d{4})\p{Dash}(\d{2})\p{Dash}uu$/) { sub leapyear { my $year = shift; if ((($year % 4 == 0) and ($year % 100 != 0)) or ($year % 400 == 0)) { return 1; } else { return 0; } } my %monthdays; @monthdays{map {sprintf('%.2d', $_)} 1..12} = ('31') x 12; @monthdays{'09', '04', '06', '11'} = ('30') x 4; $monthdays{'02'} = leapyear($1) ? 29 : 28; return ("${1}-${2}-01", '/', "${1}-${2}-" . $monthdays{$2}, 'dayinmonth'); } # 1999-uu-uu -> 1999-01-01/1999-12-31 elsif ($d =~ m/^(\d{4})\p{Dash}uu\p{Dash}uu$/) { return ("${1}-01-01", '/', "${1}-12-31", 'dayinyear'); } } =head2 parse_date_start Convenience wrapper =cut sub parse_date_start { return parse_date($CONFIG_DATE_PARSERS{start}, shift); } =head2 parse_date_end Convenience wrapper =cut sub parse_date_end { return parse_date($CONFIG_DATE_PARSERS{end}, shift); } =head2 parse_date Parse of EDTF dates =cut sub parse_date { my ($obj, $string) = @_; # Must do this to make sure meta-information from sub-class Biber::Date::Format is reset $obj->init(); return 0 unless $string; return 0 if $string eq 'unknown'; # EDTF 5.2.3 return 0 if $string eq '*'; # ISO8601-2 equivalent for "unknown" return 0 if $string eq 'open'; # EDTF 5.2.3 my $dt = eval {$obj->parse_datetime($string)}; return $dt unless $dt; # bad parse, don't do anything else # Check if this datetime is before the Gregorian start date. If so, return Julian date # instead of Gregorian/astronomical # This conversion is only done if the date is not missing month or day since the Julian # Gregorian difference is usually a matter of only days and therefore a bare year like # "1565" could be "1564" or "1565" in Julian, depending on the month/day of the Gregorian date # For example, "1565-01-01" (which is what DateTime will default to for bare years), is # "1564-12-22" Julian but 1564-01-11" and later is "1565" Julian year. if (Biber::Config->getblxoption('julian') and not $obj->missing('month') and not $obj->missing('day')) { # There is guaranteed to be an end point since biblatex has a default my $gs = Biber::Config->getblxoption('gregorianstart'); my ($gsyear, $gsmonth, $gsday) = $gs =~ m/^(\d{4})\p{Dash}(\d{2})\p{Dash}(\d{2})$/; my $dtgs = DateTime->new( year => $gsyear, month => $gsmonth, day => $gsday ); # Datetime is not before the Gregorian start point if (DateTime->compare($dt, $dtgs) == -1) { # Override with Julian conversion $dt = DateTime::Calendar::Julian->from_object( object => $dt ); $obj->set_julian; } } return $dt; } =head2 edtf_monthday Force month/day to EDTF format with leading zero =cut sub edtf_monthday { my $md = shift; return $md ? sprintf('%.2d', $md) : undef; } =head2 biber_decode_utf8 Perform NFD form conversion as well as UTF-8 conversion. Used to normalize bibtex input as the T::B interface doesn't allow a neat whole file slurping. =cut sub biber_decode_utf8 { return NFD(decode_utf8(shift));# Unicode NFD boundary } =head2 out Output to target. Outputs NFC UTF-8 if output is UTF-8 =cut sub out { my ($fh, $string) = @_; print $fh NFC($string);# Unicode NFC boundary } =head2 process_comment Fix up some problems with comments after being processed by btparse =cut sub process_comment { my $comment = shift; # Fix up structured Jabref comments by re-instating line breaks. Hack. if ($comment =~ m/jabref-meta:/) { $comment =~ s/([:;])\s(\d)/$1\n$2/xmsg; $comment =~ s/\z/\n/xms; } return $comment; } =head2 locale2bcp47 Map babel/polyglossia language options to a sensible CLDR (bcp47) locale default Return input string if there is no mapping =cut sub locale2bcp47 { my $localestr = shift; return $localestr unless $localestr; return $LOCALE_MAP{$localestr} || $localestr; } =head2 bcp472locale Map CLDR (bcp47) locale to a babel/polyglossia locale Return input string if there is no mapping =cut sub bcp472locale { my $localestr = shift; return $localestr unless $localestr; return $LOCALE_MAP_R{$localestr} || $localestr; } =head2 rangelen Calculate the length of a range field Range fields are an array ref of two-element array refs [range_start, range_end] range_end can be be empty for open-ended range or undef Deals with Unicode and ASCII roman numerals via the magic of Unicode NFKD form m-n -> [m, n] m -> [m, undef] m- -> [m, ''] -n -> ['', n] - -> ['', undef] =cut sub rangelen { my $rf = shift; my $rl = 0; foreach my $f ($rf->@*) { my $m = $f->[0]; my $n = $f->[1]; # m is something that's just numerals (decimal Unicode roman or ASCII roman) if ($m and $m =~ /^[\p{Nd}\p{Nl}iIvVxXlLcCdDmM]+$/) { # This magically decomposes Unicode roman chars into ASCII compat $m = NFKD($m); # n is something that's just numerals (decimal Unicode roman or ASCII roman) if ($n and $n =~ /^[\p{Nd}\p{Nl}iIvVxXlLcCdDmM]+$/) { # This magically decomposes Unicode roman chars into ASCII compat $n = NFKD($n); $m = isroman($m) ? roman2int($m) : $m; $n = isroman($n) ? roman2int($n) : $n; # If still not an int at this point, it's probably some non-int page number that # isn't a roman numeral so give up unless (looks_like_number($n) and looks_like_number($m)) { return -1; } # Deal with not so explicit ranges like 22-4 or 135-38 # Done by turning numbers into string arrays, reversing and then filling in blanks if ($n < $m) { my @m = reverse split(//,$m); my @n = reverse split(//,$n); for (my $i=0;$i<=$#m;$i++) { next if $n[$i]; $n[$i] = $m[$i]; } $n = join('', reverse @n); } $rl += (($n - $m) + 1); } # n is '' elsif (defined($n)) { # open-ended range can't be calculated, just return -1 return -1; } # n is undef, single item else { $rl += 1; } } else { # open-ended range can't be calculated, just return -1 return -1; } } return $rl; } =head2 match_indices Return array ref of array refs of matches and start indices of matches for provided array of compiled regexps into string =cut sub match_indices { my ($regexes, $string) = @_; my @ret; my $relen = 0; foreach my $regex ($regexes->@*) { my $len = 0; while ($string =~ /$regex/g) { my $gcs = Unicode::GCString->new($string)->substr($-[0], $+[0]-$-[0]); push @ret, [ $gcs->as_string, $-[0] - $relen ]; $len = $gcs->length; } $relen += $len; } # Return last index first so replacements can be done without recalculating # indices changed by earlier index replacements return scalar(@ret) ? [reverse @ret] : undef; } =head2 parse_range Parses a range of values into a two-value array ref. Ranges with no starting value default to "1" Ranges can be open-ended and it's up to surrounding code to interpret this Ranges can be single figures which is shorthand for 1-x =cut sub parse_range { my $rs = shift; $rs =~ m/\A\s*(\P{Pd}+)?\s*(\p{Pd})*\s*(\P{Pd}+)?\s*\z/xms; if ($2) { return [$1 // 1, $3]; } else { return [1, $1]; } } =head2 parse_range_alt Parses a range of values into a two-value array ref. Either start or end can be undef and it's up to surrounding code to interpret this =cut sub parse_range_alt { my $rs = shift; $rs =~ m/\A\s*(\P{Pd}+)?\s*(\p{Pd})*\s*(\P{Pd}+)?\s*\z/xms; if ($2) { return [$1, $3]; } else { return undef; } } =head2 maploopreplace Replace loop markers with values. =cut sub maploopreplace { # $MAPUNIQVAL is lexical here no strict 'vars'; my ($string, $maploop) = @_; return undef unless defined($string); return $string unless $maploop; $string =~ s/\$MAPLOOP/$maploop/g; $string =~ s/\$MAPUNIQVAL/$MAPUNIQVAL/g; if ($string =~ m/\$MAPUNIQ/) { my $MAPUNIQ = suniqid; $string =~ s/\$MAPUNIQ/$MAPUNIQ/g; $MAPUNIQVAL = $MAPUNIQ; } return $string; } =head2 get_transliterator Get a ref to a transliterator for the given from/to We are abstracting this in this way because it is not clear what the future of the transliteration library is. We want to be able to switch. =cut sub get_transliterator { my ($target, $from, $to) = map {lc} @_; my @valid_from = ('iast', 'russian'); my @valid_to = ('devanagari', 'ala-lc', 'bgn/pcgn-standard'); unless (first {$from eq $_} @valid_from and first {$to eq $_} @valid_to) { biber_warn("Invalid transliteration from/to pair ($from/$to)"); } require Lingua::Translit; if ($logger->is_debug()) {# performance tune $logger->debug("Using '$from -> $to' transliteration for sorting '$target'"); } # List pairs explicitly as we don't expect there to be to many of these ever if ($from eq 'iast' and $to eq 'devanagari') { return new Lingua::Translit('IAST Devanagari'); } elsif ($from eq 'russian' and $to eq 'ala-lc') { return new Lingua::Translit('ALA-LC RUS'); } elsif ($from eq 'russian' and $to eq 'bgn/pcgn-standard') { return new Lingua::Translit('BGN/PCGN RUS Standard'); } return undef; } =head2 call_transliterator Run a transliterator on passed text. Hides call semantics of transliterator so we can switch engine in the future. =cut sub call_transliterator { my ($target, $from, $to, $text) = @_; if (my $tr = get_transliterator($target, $from, $to)) { # using Lingua::Translit return $tr->translit($text); } else { return $text; } } # Passed an array of strings, returns an array of initials sub gen_initials { my @strings = @_; my @strings_out; foreach my $str (@strings) { # Deal with hyphenated name parts and normalise to a '-' character for easy # replacement with macro later if ($str =~ m/\p{Dash}/) { push @strings_out, join('-', gen_initials(split(/\p{Dash}/, $str))); } else { my $chr = Unicode::GCString->new($str)->substr(0, 1)->as_string; # Keep diacritics with their following characters if ($chr =~ m/\p{Dia}/) { push @strings_out, Unicode::GCString->new($str)->substr(0, 2)->as_string; } else { push @strings_out, $chr; } } } return @strings_out; } # Joins name parts using BibTeX tie algorithm. Ties are added: # # 1. After the first part if it is less than three characters long # 2. Before the family part sub join_name_parts { my $parts = shift; # special case - 1 part if ($#{$parts} == 0) { return $parts->[0]; } # special case - 2 parts if ($#{$parts} == 1) { return $parts->[0] . '~' . $parts->[1]; } my $namestring = $parts->[0]; $namestring .= Unicode::GCString->new($parts->[0])->length < 3 ? '~' : ' '; $namestring .= join(' ', $parts->@[1 .. ($#{$parts} - 1)]); $namestring .= '~' . $parts->[$#{$parts}]; return $namestring; } # Split an xsv using Text::CSV because it is fast and can handle quoting sub split_xsv { my ($string, $sep) = @_; if ($sep) { $CONFIG_CSV_PARSER->sep_char($sep); } $CONFIG_CSV_PARSER->parse($string); return $CONFIG_CSV_PARSER->fields(); } # Add a macro sep for minutes in timezones sub tzformat { my $tz = shift; if ($tz =~ m/^([+-])(\d{2}):?(\d{2})?/) { return "$1$2" . ($3 ? "\\bibtzminsep $3" : ''); } elsif ($tz eq 'UTC') { return 'Z'; } else { return $tz; } } 1; __END__ =head1 AUTHOR François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Internals.pm000444000153000001 16061413205066061 17773 0ustar00vboxother000000000000package Biber::Internals; use v5.24; use strict; use warnings; use Carp; use Biber::Constants; use Biber::Utils; use Biber::DataModel; use Data::Compare; use List::AllUtils qw( :all ); use Log::Log4perl qw(:no_extra_logdie_message); use Digest::MD5 qw( md5_hex ); use POSIX qw( locale_h ); # for lc() use Scalar::Util qw(looks_like_number); use Text::Roman qw(isroman roman2int); use Unicode::GCString; use Unicode::Collate::Locale; use Unicode::Normalize; use Encode; =encoding utf-8 =head1 NAME Biber::Internals - Internal methods for processing the bibliographic data =head1 METHODS =cut my $logger = Log::Log4perl::get_logger('main'); # Hashes should not care about use* or sorting name key template etc. We want to generate hashes # unique to a name, not a particular representation of a name. So, always statically concatenate # nameparts from the data model list of valid nameparts sub _getnamehash { my ($self, $citekey, $names, $dlist, $bib) = @_; my $hashkey = ''; my $count = $names->count_names; my $visible = $bib ? $dlist->get_visible_bib($names->get_id) : $dlist->get_visible_cite($names->get_id); my $dm = Biber::Config->get_dm; my @nps = $dm->get_constant_value('nameparts'); # namehash obeys list truncations but not uniquename foreach my $n ($names->first_n_names($visible)->@*) { foreach my $nt (@nps) {# list type so returns list if (my $np = $n->get_namepart($nt)) { $hashkey .= $np; } } } # name list was truncated if ($visible < $count or $names->get_morenames) { $hashkey .= '+'; } # Digest::MD5 can't deal with straight UTF8 so encode it first (via NFC as this is "output") return md5_hex(encode_utf8(NFC($hashkey))); } sub _getfullhash { my ($self, $citekey, $names) = @_; my $hashkey = ''; my $dm = Biber::Config->get_dm; my @nps = $dm->get_constant_value('nameparts'); foreach my $n ($names->names->@*) { foreach my $nt (@nps) {# list type so returns list if (my $np = $n->get_namepart($nt)) { $hashkey .= $np; } } } # If we had an "and others" if ($names->get_morenames) { $hashkey .= '+' } # Digest::MD5 can't deal with straight UTF8 so encode it first (via NFC as this is "output") return md5_hex(encode_utf8(NFC($hashkey))); } # Same as _getnamehash but takes account of uniquename setting for firstname # It's used for extra* tracking only sub _getnamehash_u { my ($self, $citekey, $names, $dlist) = @_; my $hashkey = ''; my $count = $names->count_names; my $nlid = $names->get_id; my $visible = $dlist->get_visible_cite($nlid); my $dm = Biber::Config->get_dm; my @nps = $dm->get_constant_value('nameparts'); # refcontext or per-entry uniquenametemplate my $untname = Biber::Config->getblxoption('uniquenametemplatename', undef, $citekey) // $dlist->get_uniquenametemplatename; # Per-namelist uniquenametemplate if (defined($names->get_uniquenametemplatename)) { $untname = $names->get_uniquenametemplatename; } # namehash obeys list truncations foreach my $n ($names->first_n_names($visible)->@*) { my $nid = $n->get_id; # Per-name uniquenametemplate if (defined($n->get_uniquenametemplatename)) { $untname = $n->get_uniquenametemplatename; } # Use nameuniqueness template to construct hash foreach my $nps (Biber::Config->getblxoption('uniquenametemplate')->{$untname}->@*) { # Same as omitting this next if defined($nps->{disambiguation}) and ($nps->{disambiguation} eq 'none'); my $npn = $nps->{namepart}; if (my $np = $n->get_namepart($npn)) { if ($nps->{base}) { $hashkey .= $np; } else { my $un = $dlist->get_uniquename($nlid, $nid); if (defined($un) and ($un->[0] ne 'base')) { if ($un->[1] eq 'full' or $un->[1] eq 'fullonly') { $hashkey .= $np; } # Use initials for non-base parts if uniquename indicates this will disambiguate elsif ($un->[1] eq 'init') { $hashkey .= join('', $n->get_namepart_initial($npn)->@*); } } } } } } # name list was truncated if ($visible < $count or $names->get_morenames) { $hashkey .= '+'; } # Digest::MD5 can't deal with straight UTF8 so encode it first (via NFC as this is "output") return md5_hex(encode_utf8(NFC($hashkey))); } # Special hash to track per-name information sub _genpnhash { my ($self, $citekey, $n) = @_; my $hashkey = ''; my $dm = Biber::Config->get_dm; my @nps = $dm->get_constant_value('nameparts'); foreach my $nt (@nps) {# list type so returns list if (my $np = $n->get_namepart($nt)) { $hashkey .= $np; } } if ($logger->is_trace()) { # performance shortcut $logger->trace("Creating MD5 pnhash using '$hashkey'"); } # Digest::MD5 can't deal with straight UTF8 so encode it first (via NFC as this is "output") return md5_hex(encode_utf8(NFC($hashkey))); } ################## # LABEL GENERATION ################## # special label routines - either not part of the dm but special fields for biblatex # or dm fields which need special treatment. Technically users could remove such fields # from the dm but it would be very strange. my %internal_dispatch_label = ( 'label' => [\&_label_basic, ['label', 'nostrip']], 'shorthand' => [\&_label_basic, ['shorthand', 'nostrip']], 'sortkey' => [\&_label_basic, ['sortkey', 'nostrip']], 'citekey' => [\&_label_citekey, []], 'labelname' => [\&_label_name, ['labelname']], 'labeltitle' => [\&_label_basic, ['labeltitle']], 'labelmonth' => [\&_label_basic, ['labelmonth']], 'labelday' => [\&_label_basic, ['labelday']], 'labelyear' => [\&_label_basic, ['labelyear']]); sub _dispatch_table_label { my ($field, $dm) = @_; # internal fields not part of the data model if (my $id = $internal_dispatch_label{$field}) { return $id; } # Label elements which aren't fields unless ($dm->is_field($field)) { return undef; } # Fields which are part of the datamodel my $dmf = $dm->get_dm_for_field($field); if ($dmf->{fieldtype} eq 'list' and $dmf->{datatype} eq 'name') { return [\&_label_name, [$field]]; } else { return [\&_label_basic, [$field]]; } } # Main label loop sub _genlabel { my ($self, $citekey, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $be = $section->bibentry($citekey); my $labelalphatemplate = Biber::Config->getblxoption('labelalphatemplate', $be->get_field('entrytype')); my $label; my $slabel; $LABEL_FINAL = 0; # reset final shortcut foreach my $labelpart (sort {$a->{order} <=> $b->{order}} $labelalphatemplate->{labelelement}->@*) { my $ret = _labelpart($self, $labelpart->{labelpart}, $citekey, $secnum, $section, $be, $dlist); $label .= $ret->[0] || ''; $slabel .= $ret->[1] || ''; last if $LABEL_FINAL; } return [ $label, $slabel ]; } # Disjunctive set of label parts sub _labelpart { my ($self, $labelpart, $citekey, $secnum, $section, $be, $dlist) = @_; my $bee = $be->get_field('entrytype'); my $dm = Biber::Config->get_dm; my $maxan = Biber::Config->getblxoption('maxalphanames', $bee, $citekey); my $minan = Biber::Config->getblxoption('minalphanames', $bee, $citekey); my $lp; my $slp; foreach my $part ($labelpart->@*) { # Implement defaults not set by biblatex itself unless (exists($part->{substring_fixed_threshold})) { $part->{substring_fixed_threshold} = 1; } # Deal with various tests # ifnames only uses this label template part if the list it is applied to is a certain # length if (my $inc = $part->{ifnames}) { my $f = $part->{content}; # resolve labelname if ($f eq 'labelname') { $f = ($be->get_labelname_info || ''); } if ( first {$f eq $_} $dm->get_fields_of_type('list', 'name')->@*) { my $name = $be->get_field($f) || next; # just in case there is no labelname etc. my $total_names = $name->count_names; my $visible_names; if ($total_names > $maxan) { $visible_names = $minan; } else { $visible_names = $total_names; } # Deal with ifnames if ($inc =~ m/^\d+$/) {# just a number next unless $visible_names == $inc; } else {# a range my $incr = parse_range_alt($inc); if (not defined($incr->[0])) {# range -x next unless $visible_names <= $incr->[1]; } elsif (not defined($incr->[1])) {# range x- next unless $visible_names >= $incr->[0]; } else {# range x-y next unless ($visible_names >= $incr->[0] and $visible_names <= $incr->[1]); } } } } my $ret = _dispatch_label($self, $part, $citekey, $secnum, $section, $be, $dlist); $lp .= $ret->[0]; $slp .= $ret->[1]; # We use the first one to return something if ($ret->[0]) { $LABEL_FINAL = 1 if $part->{final}; last; } } return [ $lp, $slp ]; } # Main label dispatch method sub _dispatch_label { my ($self, $part, $citekey, $secnum, $section, $be, $dlist) = @_; my $code_ref; my $code_args_ref; my $lp; my $slp; my $dm = Biber::Config->get_dm; # real label field if (my $d = _dispatch_table_label($part->{content}, $dm)) { $code_ref = $d->[0]; $code_args_ref = $d->[1]; } else { # if the field is not found in the dispatch table, assume it's a literal string $code_ref = \&_label_literal; $code_args_ref = [$part->{content}]; } return &{$code_ref}($self, $citekey, $secnum, $section, $be, $code_args_ref, $part, $dlist); } ######################### # Label dispatch routines ######################### sub _label_citekey { my ($self, $citekey, $secnum, $section, $be, $args, $labelattrs, $dlist) = @_; my $k = _process_label_attributes($self, $citekey, $dlist, [[$citekey,undef]], $labelattrs, $args->[0]); return [$k, unescape_label($k)]; } sub _label_basic { my ($self, $citekey, $secnum, $section, $be, $args, $labelattrs, $dlist) = @_; my $e = $args->[0]; my $f; if ($args->[1] and $args->[1] eq 'nostrip') { $f = $be->get_field($e); } else { $f = normalise_string_label($be->get_field($e)); } if ($f) { my $b = _process_label_attributes($self, $citekey, $dlist, [[$f, undef]], $labelattrs, $e); return [$b, unescape_label($b)]; } else { return ['', '']; } } # literal string - don't post-process this, there is no point sub _label_literal { my ($self, $citekey, $secnum, $section, $be, $args, $labelattrs) = @_; my $string = $args->[0]; return [escape_label(unescape_label($string)), unescape_label($string)]; } # names sub _label_name { my ($self, $citekey, $secnum, $section, $be, $args, $labelattrs, $dlist) = @_; my $bee = $be->get_field('entrytype'); my $useprefix = Biber::Config->getblxoption('useprefix', $bee, $citekey); my $alphaothers = Biber::Config->getblxoption('alphaothers', $bee); my $sortalphaothers = Biber::Config->getblxoption('sortalphaothers', $bee); # Get the labelalphanametemplate name or this list context my $lantname = $dlist->get_labelalphanametemplatename; # Override with any entry-specific information $lantname = Biber::Config->getblxoption('labelalphanametemplatename', undef, $citekey) // $lantname; # Shortcut - if there is no labelname, don't do anything return ['',''] unless defined($be->get_labelname_info); my $namename = $args->[0]; my $acc = '';# Must initialise to empty string as we need to return a string # This contains sortalphaothers instead of alphaothers, if defined # This is needed in cases where alphaothers is something like # '\textasteriskcentered' which would mess up sorting. my $sortacc; # Careful to extract the information we need about the real name behind labelname # as we need this to set the use* options below. my $realname; if ($namename eq 'labelname') { $realname = $be->get_labelname_info; } else { $realname = $namename; } my $names = $be->get_field($realname); # Account for labelname set to short* when testing use* options my $lnameopt; if ( $realname =~ /\Ashort(\X+)\z/xms ) { $lnameopt = $1; } else { $lnameopt = $realname; } if (Biber::Config->getblxoption("use$lnameopt", $bee, $citekey) and $names) { # namelist scope labelalphanametemplate if (defined($names->get_labelalphanametemplatename)) { $lantname = $names->get_labelalphanametemplatename; } # namelist scope useprefix if (defined($names->get_useprefix)) { $useprefix = $names->get_useprefix; } my $numnames = $names->count_names; my $visibility = $dlist->get_visible_alpha($names->get_id); # Use name range override, if any my $nr_start; my $nr_end; if (exists($labelattrs->{names})) { my $nr = parse_range($labelattrs->{names}); $nr_start = $nr->[0]; $nr_end = $nr->[1]; if (defined($nr_end) and $nr_end eq '+') {# minalphanames cap marker $nr_end = $visibility; } elsif (not defined($nr_end) or $nr_end > $numnames) { # cap at numnames, of course $nr_end = $numnames; } } else { $nr_start = 1; $nr_end = $visibility; # Else use bib visibility } if ($logger->is_trace()) {# performance tune $logger->trace("$realname/numnames=$numnames/visibility=$visibility/nr_start=$nr_start/nr_end=$nr_end"); } my $parts; my $opts; foreach my $name ($names->names->@*) { # name scope labelalphanametemplate if (defined($name->get_labelalphanametemplatename)) { $lantname = $name->get_labelalphanametemplatename; } # name scope useprefix if (defined($name->get_useprefix)) { $useprefix = $name->get_useprefix; } # In future, perhaps there will be a need for more namepart use* options and # therefore $opts will come from somewhere else $opts->{useprefix} = $useprefix; # Now extract the template to use from the global hash of templates my $lnat = Biber::Config->getblxoption('labelalphanametemplate')->{$lantname}; my $preacc; # arrayref accumulator for "pre" nameparts my $mainacc; # arrayref accumulator for main non "pre" nameparts my $mpns; # arrayref accumulator for main non "pre" namepart names my $preopts; # arrayref accumulator for "pre" namepart options my $mainopts; # arrayref accumulator for main non "pre" namepart options foreach my $lnp ($lnat->@*) { my $npn = $lnp->{namepart}; my $np; if ($np = $name->get_namepart($npn)) { if ($lnp->{use}) { # only ever defined as 1 next unless $opts->{"use$npn"}; } if ($lnp->{pre}) { push $preacc->@*, [normalise_string_label($np), {substring_width => $lnp->{substring_width}, substring_side => $lnp->{substring_side}, substring_compound => $lnp->{substring_compound}}]; } else { push $mpns->@*, $npn; push $mainacc->@*, [normalise_string_label($np), {substring_width => $lnp->{substring_width}, substring_side => $lnp->{substring_side}, substring_compound => $lnp->{substring_compound}}]; } } } push $parts->{pre}{strings}->@*, $preacc; push $parts->{main}{strings}->@*, $mainacc; push $parts->{main}{partnames}->@*, $mpns; } # Loop over names in range for (my $i = $nr_start-1; $i < $nr_end; $i++) { # Deal with pre options foreach my $fieldinfo ($parts->{pre}{strings}[$i]->@*) { my $np = $fieldinfo->[0]; my $npo = $fieldinfo->[1]; my $w = $npo->{substring_width} // 1; if ($npo->{substring_compound}) { my $tmpstring; # Splitting on tilde too as libbtparse inserts these into compound prefices foreach my $part (split(/[\s\p{Dash}~]+/, $np)) { $tmpstring .= Unicode::GCString->new($part)->substr(0, $w)->as_string; } $acc .= $tmpstring; } else { $acc .= Unicode::GCString->new($np)->substr(0, $w)->as_string; } } $acc .= _process_label_attributes($self, $citekey, $dlist, $parts->{main}{strings}[$i], $labelattrs, $realname, $parts->{main}{partnames}[$i], $i); # put in names sep, if any if (my $nsep = $labelattrs->{namessep}) { $acc .= $nsep unless ($i == $nr_end-1); } } $sortacc = $acc; # Add alphaothers if name list is truncated unless noalphaothers is specified unless ($labelattrs->{noalphaothers}) { if ($numnames > $nr_end or $names->get_morenames) { $acc .= $alphaothers // ''; # alphaothers can be undef $sortacc .= $sortalphaothers // ''; # sortalphaothers can be undef } } return [$acc, unescape_label($sortacc)]; } else { return ['', '']; } } # Label generation utilities # Modify label string according to some attributes # We use different caches for the "v" and "l" schemes because they have a different format # internally and interfere with each other between resets in prepare() otherwise # Complicated due to various label disambiguation schemes and also due to dealing with # name fields sub _process_label_attributes { my ($self, $citekey, $dlist, $fieldstrings, $labelattrs, $field, $nameparts, $index) = @_; return join('', map {$_->[0]} $fieldstrings->@*) unless $labelattrs; my $rfield_string; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my @citekeys = $section->get_citekeys; my $nindex = first_index {$_ eq $citekey} @citekeys; foreach my $fieldinfo ($fieldstrings->@*) { my $field_string = $fieldinfo->[0]; my $namepartopts = $fieldinfo->[1]; if (defined($labelattrs->{substring_width})) { # dynamically disambiguated width (individual name disambiguation) if ($labelattrs->{substring_width} =~ /v/ and $field) { # Use the cache if there is one if (my $lcache = $section->get_labelcache_v($field)) { if ($logger->is_debug()) { # performance tune $logger->debug("Using label disambiguation cache (name) for '$field' in section $secnum"); } # Use the global index override if set (substring_width =~ /f/) $field_string = ${$lcache->{$field_string}{data}}[$lcache->{globalindices}{$field_string} || $lcache->{$field_string}{index}]; } else { # This contains a mapping of strings to substrings of increasing lengths my %substr_cache = (); my $lcache = {}; # Get the indices of each field (or namepart) we are dealing with my %indices; foreach my $key (@citekeys) { if (my $f = $section->bibentry($key)->get_field($field)) { if ($nameparts) { # name field my $nlid = $f->get_id; foreach my $n ($f->first_n_names($dlist->get_visible_alpha($nlid))->@*) { # Do strip/nosort here as that's what we also do to the field contents # we will use to look up in this hash later $indices{normalise_string_label(join('',map {$n->get_namepart($_)} $nameparts->@*), $field)} = $n->get_index; } } else { $indices{$f} = 0; } } } # This ends up as a flat list due to array interpolation my @strings = uniq keys %indices; # Look to the index of the longest string or the explicit max width if set my $maxlen = $labelattrs->{substring_width_max} || max map {Unicode::GCString->new($_)->length} @strings; for (my $i = 1; $i <= $maxlen; $i++) { foreach my $map (map { my $s = Unicode::GCString->new($_)->substr(0, $i)->as_string; $substr_cache{$s}++; [$_, $s] } @strings) { # We construct a list of all substrings, up to the length of the longest string # or substring_width_max. Then we save the index of the list element which is # the minimal disambiguation if it's not yet defined push $lcache->{$map->[0]}{data}->@*, $map->[1]; $lcache->{$map->[0]}{nameindex} = $indices{$map->[0]}; if (not exists($lcache->{$map->[0]}{index}) and ($substr_cache{$map->[1]} == 1 or $i == $maxlen)) { # -1 to make it into a clean array index $lcache->{$map->[0]}{index} = Unicode::GCString->new($map->[1])->length - 1; } } } # We want to use a string width for all strings equal to the longest one needed # to disambiguate this list. We do this by saving an override for the minimal # disambiguation length per index if ($labelattrs->{substring_width} =~ /f/) { # Get the uniqueness indices of all of the strings and strip out those # which don't occur at least substring_fixed_threshold times my $is; foreach my $v (values %$lcache) { $is->{$v->{nameindex}}{$v->{index}}++; } # Now set a new global index for the name part index which is the maximum of those # occuring above a certain threshold foreach my $s (keys %$lcache) { foreach my $ind (keys %$is) { next unless $indices{$s} == $ind; $lcache->{globalindices}{$s} = max grep {$is->{$ind}{$_} >= $labelattrs->{substring_fixed_threshold} } keys $is->{$ind}->%*; } } } # Use the global index override if set (substring_width =~ /f/) $field_string = ${$lcache->{$field_string}{data}}[$lcache->{globalindices}{$field_string} || $lcache->{$field_string}{index}]; if ($logger->is_trace()) { # performance tune $logger->trace("Label disambiguation cache for '$field' " . ($nameparts ? '(' . join(',', $nameparts->@*) . ') ' : '') . "in section $secnum:\n " . Data::Dump::pp($lcache)); } $section->set_labelcache_v($field, $lcache); } } # dynamically disambiguated width (list disambiguation) elsif ($labelattrs->{substring_width} =~ /l/ and $field) { # Use the cache if there is one if (my $lcache = $section->get_labelcache_l($field)) { if ($logger->is_debug()) { # performance tune $logger->debug("Using label disambiguation cache (list) for '$field' in section $secnum"); } $field_string = $lcache->{data}[$nindex][$index]; } else { # This retains the structure of the entries for the "l" list disambiguation # Have to be careful if field "$f" is not set for all entries my $strings = [map {my $f = $section->bibentry($_)->get_field($field); $f ? ($nameparts ? [map {my $n = $_;join('', map {$n->get_namepart($_)} $nameparts->@*)} $f->first_n_names($dlist->get_visible_alpha($f->get_id))->@*] : [$f]) : [''] } @citekeys]; my $lcache = _label_listdisambiguation($strings); $field_string = $lcache->{data}[$nindex][$index]; if ($logger->is_trace()) { # performance tune $logger->trace("Label disambiguation (list) cache for '$field' " . ($nameparts ? '(' . join(',', $nameparts->@*) . ') ' : '') . "in section $secnum:\n " . Data::Dump::pp($lcache)); } $section->set_labelcache_l($field, $lcache); } } # static substring width else { my $subs_offset = 0; my $default_substring_width = 1; my $default_substring_side = 'left'; my $padchar = $labelattrs->{pad_char}; my $subs_side = ($labelattrs->{substring_side} or $default_substring_side); my $subs_width = ($labelattrs->{substring_width} or $default_substring_width); # Override subs width with namepart specific setting, if it exists if ($nameparts) { if (my $w = $namepartopts->{substring_width}) { $subs_width = $w; } if (my $s = $namepartopts->{substring_side}) { $subs_side = $s; } } # Set offset depending on subs side if ($subs_side eq 'right') { $subs_offset = 0 - $subs_width; } # Get map of regexps to not count against string width and record their place in the # string my $nolabelwcs = Biber::Config->getoption('nolabelwidthcount'); my $nolabelwcis; if ($nolabelwcs) { $nolabelwcis = match_indices([map {$_->{value}} $nolabelwcs->@*], $field_string); $logger->trace('Saved indices for nolabelwidthcount: ' . Data::Dump::pp($nolabelwcis)); # Then remove the nolabelwidthcount chars for now foreach my $nolabelwc ($nolabelwcs->@*) { my $nlwcopt = $nolabelwc->{value}; my $re = qr/$nlwcopt/; $field_string =~ s/$re//gxms; # remove nolabelwidthcount items } } # If desired, do the substring on all parts of compound names # (with internal spaces or hyphens) if ($nameparts and $namepartopts->{substring_compound}) { my $tmpstring; foreach my $part (split(/[\s\p{Dash}]+/, $field_string)) { $tmpstring .= Unicode::GCString->new($part)->substr($subs_offset, $subs_width)->as_string; } $field_string = $tmpstring; } else { $field_string = Unicode::GCString->new($field_string)->substr($subs_offset, $subs_width)->as_string; } # Padding if ($padchar) { $padchar = unescape_label($padchar); my $pad_side = ($labelattrs->{pad_side} or 'right'); my $paddiff = $subs_width - Unicode::GCString->new($field_string)->length; if ($paddiff > 0) { if ($pad_side eq 'right') { $field_string .= $padchar x $paddiff; } elsif ($pad_side eq 'left') { $field_string = $padchar x $paddiff . $field_string; } } $field_string = escape_label($field_string); } # Now reinstate any nolabelwidthcount regexps if ($nolabelwcis) { my $gc_string = Unicode::GCString->new($field_string); foreach my $nolabelwci ($nolabelwcis->@*) { # Don't put back anything at positions which are no longer in the string if ($nolabelwci->[1] +1 <= $gc_string->length) { $gc_string->substr($nolabelwci->[1], 0, $nolabelwci->[0]); } } $field_string = $gc_string->as_string; } } } $rfield_string .= $field_string; } # Case changes if ($labelattrs->{uppercase} and $labelattrs->{lowercase}) { # do nothing if both are set, for sanity } elsif ($labelattrs->{uppercase}) { $rfield_string = uc($rfield_string); } elsif ($labelattrs->{lowercase}) { $rfield_string = lc($rfield_string); } return $rfield_string; } # This turns a list of label strings: # [ # ['Agassi', 'Chang', 'Laver', 'bob'], # ['Agassi', 'Chang', 'Laver'], # ['Agassi', 'Chang', 'Laver'], # ['Agassi', 'Connors', 'Lendl'], # ['Agassi', 'Courier', 'Laver'], # ['Borg', 'Connors', 'Edberg'], # ['Borg', 'Connors', 'Emerson'], # ['Becker', 'Connors', 'Emerson'], # ['Becker'] # ['Zoo', 'Xaa'], # ['Zoo', 'Xaa'], # ['Zaa'], # ['Abc', 'Abc', 'Abc'], # ['Abc', 'Abc', 'Abc'], # ['Abc', 'Abc', 'Abc'] # ] # # # into a disambiguated list of substrings: # # { data => [ # ['A', 'C', 'L', 'b'], # ['A', 'Ch', 'L' ], # ['A', 'Ch', 'L' ], # ['A', 'Co', 'L' ], # ['A', 'C', 'L' ], # ['B', 'C', 'Ed' ], # ['Bo', 'C', 'E' ], # ['B', 'C', 'E' ], # ['B' ] # ['Z' 'X' ] # ['Z' 'X' ] # ['Z' ] # ['A', 'A', 'A' ] # ['A', 'A', 'A' ] # ['A', 'A', 'A' ] # ], # } # sub _label_listdisambiguation { my $strings = shift; # Cache map says which index are we substr'ing to for each name. # Starting default is first char from each my $cache->{substr_map} = [map {[map {1} $_->@*]} $strings->@*]; my $lcache->{data} = [map {undef} $strings->@*]; # First flag any duplicates so we can shortcut setting these later my @dups; for (my $i = 0; $i <= $strings->$#*; $i++) { $dups[$i] = join('', $strings->[$i]->@*); } _do_substr($lcache, $cache, $strings); # loop until the entire disambiguation cache is filled. while (grep { !defined } $lcache->{data}->@*) { _check_counts($lcache, $cache); foreach my $ambiguous_indices ($cache->{ambiguity}->@*) { my $ambiguous_strings = [$strings->@[$ambiguous_indices->@*]]; # slice # We work on the first in an ambiguous set # We have to find the first name which is not the same as another name in the # same position as we can't disambiguate on the basis of an identical name. For example: # [ # [ 'Smith', 'Jones' ] # [ 'Smith', 'Janes' ] # ] # # Here there is no point trying more characters in "Smith" as it won't help # Special case: If all lists in an ambiguity set are identical, like # # [ # [ 'Smith, 'Jones' ], # [ 'Smith, 'Jones' ], # ] # # Then we can shortcut and take a 1-char substring only # if all name lists in the ambiguous list are in fact the same if (all {Compare($ambiguous_strings->[0], $_)} $ambiguous_strings->@*) { $lcache->{data}[$ambiguous_indices->[0]] = [map {Unicode::GCString->new($_)->substr(0,1)->as_string} $ambiguous_strings->[0]->@*]; } else { # Get disambiguating list position information _gen_first_disambiguating_name_map($cache, $ambiguous_strings, $ambiguous_indices); # Then increment appropriate substr map $cache->{substr_map}[$ambiguous_indices->[0]][$cache->{name_map}[$ambiguous_indices->[0]]]++; } # Rebuild the cache and loop _do_substr($lcache, $cache, $strings); } } return $lcache; } # Take substrings of name lists according to a map and save the results sub _do_substr { my ($lcache, $cache, $strings) = @_; delete($cache->{keys}); for (my $i = 0; $i <= $strings->$#*; $i++) { next if defined($lcache->{data}[$i]); # ignore names already disambiguated my $row = $strings->[$i]; my @s; for (my $j = 0; $j <= $row->$#*; $j++) { push @s, Unicode::GCString->new($row->[$j])->substr(0 ,$cache->{substr_map}[$i][$j])->as_string; } my $js = join('', @s); $cache->{keys}{$js}{index} = $i; # index of the last seen $js key - useless for count >1 push $cache->{keys}{$js}{indices}->@*, $i; $cache->{keys}{$js}{count}++; $cache->{keys}{$js}{strings} = \@s; } } # Push finished disambiguation into results and save still ambiguous labels for loop sub _check_counts { my ($lcache, $cache) = @_; delete($cache->{ambiguity}); foreach my $key (keys $cache->{keys}->%*) { if ($cache->{keys}{$key}{count} > 1) { push $cache->{ambiguity}->@*, $cache->{keys}{$key}{indices}; } else { $lcache->{data}[$cache->{keys}{$key}{index}] = $cache->{keys}{$key}{strings}; } } } # Find the index of the first name in $array->[0] which doesn't # occur in any other of $array in the same position. This must be the name # which disambiguates. # [ # ['Agassi', 'Chang', 'Laver'], # ['Agassi', 'Chang', 'Laver'], # ['Agassi', 'Connors', 'Lendl'], # ['Agassi', 'Courier', 'Laver'], # ['Agassi', 'Courier', 'Lendl'], # ] # results in # $cache->{name_map} = [ 1, 1, 1, 1, 2 ] sub _gen_first_disambiguating_name_map { my ($cache, $array, $indices) = @_; for (my $i = 0; $i <= $array->$#*; $i++) { my @check_array = $array->@*; splice(@check_array, $i, 1); # Remove duplicates from the check array otherwise the duplicate makes generating the # name disambiguation index fail because there is a same name in every position @check_array = grep {not Compare($array->[$i], $_)} @check_array; # all ambiguous must be same length (otherwise they wouldn't be ambiguous) my $len = $#{$array->[0]}; for (my $j = 0; $j <= $len; $j++) { # if no other name equal to this one in same place, this is the index of the name # to use for disambiguation unless (grep {$array->[$i][$j] eq $_} map {$_->[$j]} @check_array) { $cache->{name_map}[$indices->[$i]] = $j; last; } } } } ######### # Sorting ######### # None of these can be used to generate sorting information otherwise there # would be a circular dependency: # sortinit # sortinithash # extradate # extratitle # extratitleyear # extraalpha my $sorting_sep = ','; # special sorting routines - not part of the dm but special fields for biblatex my %internal_dispatch_sorting = ( 'editoratype' => [\&_sort_editort, ['editoratype']], 'editorbtype' => [\&_sort_editort, ['editorbtype']], 'editorctype' => [\&_sort_editort, ['editorctype']], 'citeorder' => [\&_sort_citeorder, []], 'labelalpha' => [\&_sort_labelalpha, []], 'labelname' => [\&_sort_labelname, []], 'labeltitle' => [\&_sort_labeltitle, []], 'labelyear' => [\&_sort_labeldate, ['year']], 'labelmonth' => [\&_sort_labeldate, ['month']], 'labelday' => [\&_sort_labeldate, ['day']], 'presort' => [\&_sort_presort, []], 'sortname' => [\&_sort_sortname, []], 'entrykey' => [\&_sort_entrykey, []]); # The value is an array pointer, first element is a code pointer, second is # a pointer to extra arguments to the code. This is to make code re-use possible # so the sorting can share code for similar things. sub _dispatch_table_sorting { my ($field, $dm) = @_; # internal fields not part of the data model if (my $id = $internal_dispatch_sorting{$field}) { return $id; } # Sorting elements which aren't fields unless ($dm->is_field($field)) { return undef; } # Fields which are part of the datamodel my $dmf = $dm->get_dm_for_field($field); if ($dmf->{fieldtype} eq 'list' and $dmf->{datatype} eq 'name') { return [\&_sort_name, [$field]]; } elsif ($dmf->{fieldtype} eq 'field' and $dmf->{datatype} eq 'literal') { return [\&_sort_literal, [$field]]; } elsif ($dmf->{fieldtype} eq 'field' and ($dmf->{datatype} eq 'integer' or $dmf->{datatype} eq 'datepart')) { return [\&_sort_integer, [$field]]; } elsif ($dmf->{fieldtype} eq 'list' and ($dmf->{datatype} eq 'literal' or $dmf->{datatype} eq 'key')) { return [\&_sort_list, [$field]]; } elsif ($dmf->{fieldtype} eq 'field' and $dmf->{datatype} eq 'key') { return [\&_sort_literal, [$field]]; } } # Main sorting dispatch method sub _dispatch_sorting { my ($self, $sortfield, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes) = @_; my $code_ref; my $code_args_ref; my $dm = Biber::Config->get_dm; # If this field is excluded from sorting for this entrytype, then skip it and return if (my $se = Biber::Config->getblxoption('sortexclusion', $be->get_field('entrytype'))) { if ($se->{$sortfield}) { return ''; } } # If this field is excluded from sorting for all entrytypes, then include it if it's # explicitly included if (my $se = Biber::Config->getblxoption('sortexclusion', '*')) { if ($se->{$sortfield}) { if (my $si = Biber::Config->getblxoption('sortinclusion', $be->get_field('entrytype'))) { unless ($si->{$sortfield}) { return ''; } } else { return ''; } } } # real sorting field if (my $d = _dispatch_table_sorting($sortfield, $dm)) { $code_ref = $d->[0]; $code_args_ref = $d->[1]; } else { # if the field is not found in the dispatch table, assume it's a literal string $code_ref = \&_sort_string; $code_args_ref = [$sortfield]; } return &{$code_ref}($self, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes, $code_args_ref); } # Conjunctive set of sorting sets sub _generatesortinfo { my ($self, $citekey, $dlist) = @_; my $sortingtemplate = $dlist->get_sortingtemplate; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $be = $section->bibentry($citekey); my $sortobj; my $szero = 0; $BIBER_SORT_NULL = 0; $BIBER_SORT_FINAL = ''; foreach my $sortset ($sortingtemplate->{spec}->@*) { my $s = $self->_sortset($sortset, $citekey, $secnum, $section, $be, $dlist); # Did we get a real zero? This messes up tests below unless we are careful # Don't try and make this more implicit, it is too subtle a problem if ($s eq 'BIBERZERO') { $szero = 1; $s = 0; } # We have already found a "final" item so if this item returns null, # copy in the "final" item string as it's the master key for this entry now if ($BIBER_SORT_FINAL and not $BIBER_SORT_NULL) { push $sortobj->@*, $BIBER_SORT_FINAL; } else { push $sortobj->@*, $s; } } # Record the information needed for sorting later # sortstring isn't actually used to sort, it's used to generate sortinit and # for debugging purposes my $ss = join($sorting_sep, $sortobj->@*); $dlist->set_sortdata($citekey, [$ss, $sortobj]); if ($logger->is_debug()) { # performance shortcut $logger->debug("Sorting object for key '$citekey' -> " . Data::Dump::pp($sortobj)); } # Generate sortinit. Skip if there is no sortstring, which is possible in tests if ($ss or $szero) { # This must ignore the presort characters, naturally my $pre = Biber::Config->getblxoption('presort', $be->get_field('entrytype'), $citekey); # Strip off the prefix $ss =~ s/\A$pre$sorting_sep+//; my $init = Unicode::GCString->new(normalise_string($ss))->substr(0, 1)->as_string; $dlist->set_sortinitdata_for_key($citekey, $init); } return; } # Process sorting set sub _sortset { my ($self, $sortset, $citekey, $secnum, $section, $be, $dlist) = @_; my $dm = Biber::Config->get_dm; foreach my $sortelement ($sortset->@[1..$sortset->$#*]) { my ($sortelementname, $sortelementattributes) = %$sortelement; $BIBER_SORT_NULL = 0; # reset this per sortset my $out = $self->_dispatch_sorting($sortelementname, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes); if ($out) { # sort returns something for this key if ($sortset->[0]{final}) { # If we encounter a "final" element, we return an empty sort # string and save the string so it can be copied into all further # fields as this is now the master sort key. We use an empty string # where we found it in order to preserve sort field order and so # that we sort correctly against all other entries without a value # for this "final" field $BIBER_SORT_FINAL = $out; last; } return $out; } } $BIBER_SORT_NULL = 1; # set null flag - need this to deal with some cases return ''; } ############################################## # Sort dispatch routines ############################################## sub _sort_citeorder { my ($self, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes) = @_; # Allkeys and sorting=none means use bib order which is in orig_order_citekeys # However, someone might do: # \cite{b,a} # \nocite{*} # in the same section which means we need to use the order attribute for those # keys which have one (the \cited keys) and then an orig_order_citekey index based index # for the nocite ones. my $ko = Biber::Config->get_keyorder($secnum, $citekey);# only for \cited keys if ($section->is_allkeys) { return $ko || (Biber::Config->get_keyorder_max($secnum) + (first_index {$_ eq $citekey} $section->get_orig_order_citekeys) + 1); } # otherwise, we need to take account of citations with simulataneous order like # \cite{key1, key2} so this tied sorting order can be further sorted with other fields # Note the fallback of '' - this is for auto-generated entries which are not cited # and so never have a keyorder entry else { return $ko || ''; } } sub _sort_integer { my ($self, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes, $args) = @_; my $dmtype = $args->[0]; # get int field type my $bee = $be->get_field('entrytype'); if (my $field = $be->get_field($dmtype)) { # Make and attempt to map if (not looks_like_number($field)) { # Make an attempt to map roman numerals to integers for sorting $field = NFKD($field); if (isroman($field)) { $field = roman2int($field); } } # Make an attempt to map alpha fields to integers for sorting if (not looks_like_number($field)) { $field = sum(map {ord} split('', $field)); } return _process_sort_attributes($field, $sortelementattributes); } else { return ''; } } sub _sort_editort { my ($self, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes, $args) = @_; my $edtypeclass = $args->[0]; # get editor type/class field my $bee = $be->get_field('entrytype'); if (Biber::Config->getblxoption('useeditor', $be->get_field('entrytype'), $citekey) and $be->get_field($edtypeclass)) { my $string = $be->get_field($edtypeclass); return _translit($edtypeclass, $bee, _process_sort_attributes($string, $sortelementattributes)); } else { return ''; } } sub _sort_entrykey { my ($self, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes) = @_; return _process_sort_attributes($citekey, $sortelementattributes); } sub _sort_labelalpha { my ($self, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes, $args) = @_; my $string = $dlist->get_entryfield($citekey, 'sortlabelalpha') // ''; return _process_sort_attributes($string, $sortelementattributes); } sub _sort_labelname { my ($self, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes, $args) = @_; # re-direct to the right sorting routine for the labelname if (my $lni = $be->get_labelname_info) { # Don't process attributes as they will be processed in the real sub return $self->_dispatch_sorting($lni, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes); } else { return ''; } } sub _sort_labeltitle { my ($self, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes, $args) = @_; # re-direct to the right sorting routine for the labeltitle if (my $lti = $be->get_labeltitle_info) { # Don't process attributes as they will be processed in the real sub return $self->_dispatch_sorting($lti, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes); } else { return ''; } } sub _sort_labeldate { no autovivification; my ($self, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes, $args) = @_; my $ldc = $args->[0]; # labeldate component # re-direct to the right sorting routine for the labeldate component if (my $ldi = $be->get_labeldate_info) { if (my $ldf = $ldi->{field}{$ldc}) { # Don't process attributes as they will be processed in the real sub return $self->_dispatch_sorting($ldf, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes); } elsif (exists($ldi->{string})) { # labelyear fallback string return ''; } } else { return ''; } } # This is a meta-sub which uses the optional arguments to the dispatch code # It's done to avoid having many repetitions of almost identical sorting code sub _sort_list { my ($self, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes, $args) = @_; my $list = $args->[0]; # get list field my $bee = $be->get_field('entrytype'); if ($be->get_field($list)) { my $string = $self->_liststring($citekey, $list); return _translit($list, $bee, _process_sort_attributes($string, $sortelementattributes)); } else { return ''; } } # This is a meta-sub which uses the optional arguments to the dispatch code # It's done to avoid having many repetitions of almost identical sorting code # for literal strings which need normalising sub _sort_literal { my ($self, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes, $args) = @_; my $literal = $args->[0]; # get actual field my $bee = $be->get_field('entrytype'); if (my $field = $be->get_field($literal)) { my $string = normalise_string_sort($field, $literal); return _translit($literal, $bee, _process_sort_attributes($string, $sortelementattributes)); } else { return ''; } } # This is a meta-sub which uses the optional arguments to the dispatch code # It's done to avoid having many repetitions of almost identical sorting code # for the editor roles sub _sort_name { my ($self, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes, $args) = @_; my $name = $args->[0]; # get name field name my $bee = $be->get_field('entrytype'); # If there is a biblatex option which controls the use of this name, check it if ($CONFIG_OPTSCOPE_BIBLATEX{"use$name"} and not Biber::Config->getblxoption("use$name", $be->get_field('entrytype'), $citekey)) { return ''; } if ($be->get_field($name)) { my $string = $self->_namestring($citekey, $name, $dlist); return _translit($name, $bee, _process_sort_attributes($string, $sortelementattributes)); } else { return ''; } } sub _sort_presort { my ($self, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes) = @_; my $string = Biber::Config->getblxoption('presort', $be->get_field('entrytype'), $citekey); return _process_sort_attributes($string, $sortelementattributes); } sub _sort_sortname { my ($self, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes) = @_; my $bee = $be->get_field('entrytype'); my $dm = Biber::Config->get_dm; # sortname is ignored if no use option is defined - see biblatex manual if ($be->get_field('sortname') and grep {Biber::Config->getblxoption("use$_", $be->get_field('entrytype'), $citekey)} $dm->get_fields_of_type('list', 'name')->@*) { my $string = $self->_namestring($citekey, 'sortname', $dlist); return _translit('sortname', $bee, _process_sort_attributes($string, $sortelementattributes)); } else { return ''; } } sub _sort_string { my ($self, $citekey, $secnum, $section, $be, $dlist, $sortelementattributes, $args) = @_; my $string = $args->[0]; # get literal string return _process_sort_attributes($string, $sortelementattributes); } #======================================================== # Utility subs used elsewhere but relying on sorting code #======================================================== sub _process_sort_attributes { my ($field_string, $sortelementattributes) = @_; return 'BIBERZERO' if $field_string eq '0'; # preserve real zeros return $field_string unless $sortelementattributes; return $field_string unless $field_string; # process substring if ($sortelementattributes->{substring_width} or $sortelementattributes->{substring_side}) { my $subs_offset = 0; my $default_substring_width = 4; my $default_substring_side = 'left'; my $subs_width = ($sortelementattributes->{substring_width} or $default_substring_width); my $subs_side = ($sortelementattributes->{substring_side} or $default_substring_side); if ($subs_side eq 'right') { $subs_offset = 0 - $subs_width; } $field_string = Unicode::GCString->new($field_string)->substr($subs_offset, $subs_width)->as_string; } # Process padding if ($sortelementattributes->{pad_side} or $sortelementattributes->{pad_width} or $sortelementattributes->{pad_char}) { my $default_pad_width = 4; my $default_pad_side = 'left'; my $default_pad_char = '0'; my $pad_width = ($sortelementattributes->{pad_width} or $default_pad_width); my $pad_side = ($sortelementattributes->{pad_side} or $default_pad_side); my $pad_char = ($sortelementattributes->{pad_char} or $default_pad_char); my $pad_length = $pad_width - Unicode::GCString->new($field_string)->length; if ($pad_length > 0) { if ($pad_side eq 'left') { $field_string = ($pad_char x $pad_length) . $field_string; } elsif ($pad_side eq 'right') { $field_string = $field_string . ($pad_char x $pad_length); } } } return $field_string; } # This is used to generate sorting string for names sub _namestring { my $self = shift; my ($citekey, $field, $dlist) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $be = $section->bibentry($citekey); my $bee = $be->get_field('entrytype'); my $names = $be->get_field($field); my $str = ''; my $count = $names->count_names; # get visibility for bib - can be different to cite my $visible = $dlist->get_visible_bib($names->get_id); my $useprefix = Biber::Config->getblxoption('useprefix', $bee, $citekey); # Get the sorting name key template for this list context my $snkname = $dlist->get_sortingnamekeytemplatename; # Override with any entry-specific sorting name key template option $snkname = Biber::Config->getblxoption('sortingnamekeytemplatename', undef, $citekey) // $snkname; # Override with any namelist scope sorting name key template option $snkname = $names->get_sortingnamekeytemplatename // $snkname; # Name list scope useprefix option if (defined($names->get_useprefix)) { $useprefix = $names->get_useprefix; } # These should be symbols which can't appear in names and which sort before all alphanum # so that "Alan Smith" sorts after "Al Smith". This means, symbols which normalise_string_sort() # strips out. Unfortuately, this means using punctuation and these are by default variable # weight and ignorable in DUCET so we have to set U::C to variable=>'non-ignorable' as # sorting default so that they are non-ignorable my $nsi = '!'; # name separator, internal my $nse = '#'; # name separator, external # Guaranteed to sort after everything else as it's the last legal Unicode code point my $trunc = "\x{10FFFD}"; # sort string for "et al" truncated name # We strip nosort first otherwise normalise_string_sort damages diacritics # We strip each individual component instead of the whole thing so we can use # as name separators things which would otherwise be stripped. This way we # guarantee that the separators are never in names foreach my $n ($names->first_n_names($visible)->@*) { # Name scope useprefix option if (defined($n->get_useprefix)) { $useprefix = $n->get_useprefix; } # Override with any name scope sorting name key template option $snkname = $n->get_sortingnamekeytemplatename // $snkname; # Now get the actual sorting name key template my $snk = Biber::Config->getblxoption('sortingnamekeytemplate')->{$snkname}; # Get the sorting name key specification and use it to construct a sorting key for each name foreach my $kp ($snk->@*) { my $kps; foreach my $np ($kp->@*) { if ($np->{type} eq 'namepart') { my $namepart = $np->{value}; my $useopt = exists($np->{use}) ? "use$namepart" : undef; my $useoptval = Biber::Config->getblxoption($useopt, $bee, $citekey); # useprefix can be name list or name local if ($useopt and $useopt eq 'useprefix') { $useoptval = map_boolean($useprefix, 'tonum'); } if (my $npstring = $n->get_namepart($namepart)) { # No use attribute conditionals or the attribute is specified and matches the option if (not $useopt or ($useopt and $useoptval == $np->{use})) { # Do we only want initials for sorting? if ($np->{inits}) { my $npistring = $n->get_namepart_initial($namepart); $kps .= normalise_string_sort(join('', $npistring->@*), $field); } else { $kps .= normalise_string_sort($npstring, $field); } } } } elsif ($np->{type} eq 'literal') { $kps .= $np->{value}; } } # Now append the key part string plus internal name sep if the string is not empty $str .= $kps . $nsi if $kps; } $str =~ s/\Q$nsi\E\z//xms; # Remove any trailing internal separator $str .= $nse; # Add separator in between names } # If we had an explicit "and others" if ($names->get_morenames) { $str .= "+$nse"; } $str =~ s/\s+\Q$nse\E/$nse/gxms; # Remove any whitespace before external separator $str =~ s/\Q$nse\E\z//xms; # strip final external separator as we have finished $str .= $trunc if $visible < $count; # name list was truncated return $str; } sub _liststring { my ($self, $citekey, $field) = @_; my $secnum = $self->get_current_section; my $section = $self->sections->get_section($secnum); my $be = $section->bibentry($citekey); my $bee = $be->get_field('entrytype'); my $f = $be->get_field($field); # _liststring is used in tests so there has to be return '' unless defined($f); # more error checking which will never be needed in normal use my @items = $f->@*; my $str = ''; my $truncated = 0; # These should be symbols which can't appear in lists and which sort before all alphanum # so that "Alan Smith" sorts after "Al Smth". This means, symbols which normalise_string_sort() # strips out. Unfortuately, this means using punctuation and these are by default variable # weight and ignorable in DUCET so we have to redefine these these symbols after loading DUCET # when sorting so that they are non-ignorable (see Biber.pm) my $lsi = '!'; # list separator, internal # Guaranteed to sort after everything else as it's the last legal Unicode code point my $trunc = "\x{10FFFD}"; # sort string for truncated list # perform truncation according to options minitems, maxitems if ( $#items + 1 > Biber::Config->getblxoption('maxitems', $bee, $citekey) ) { $truncated = 1; @items = splice(@items, 0, Biber::Config->getblxoption('minitems', $bee, $citekey) ); } # separate the items by a string to give some structure $str = join($lsi, map { normalise_string_sort($_, $field)} @items); $str =~ s/\s+\z//xms; $str .= $trunc if $truncated; return $str; } # transliterate if requested sub _translit { my ($target, $entrytype, $string) = @_; if (my $translits = Biber::Config->getblxoption('translit', $entrytype)) { foreach my $tr ($translits->@*) { if (lc($tr->{target}) eq '*' or $tr->{target} eq $target or first {$target eq $_} $DATAFIELD_SETS{$tr->{target}}->@*) { return call_transliterator($target, $tr->{from}, $tr->{to}, $string); } } } else { return $string; } } 1; __END__ =head1 AUTHOR François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Sections.pm000444000153000001 355713205066062 17566 0ustar00vboxother000000000000package Biber::Sections; use v5.24; use strict; use warnings; =encoding utf-8 =head1 NAME Biber::Sections =head2 new Initialize a Biber::Sections object =cut sub new { my ($class) = @_; my $self = bless {}, $class; return $self; } =head2 get_num_sections Gets the number of Biber::Section objects =cut sub get_num_sections { my $self = shift; my @keys = keys $self->%*; return $#keys + 1; } =head2 get_section Gets a Biber::Section by number from the Biber::Sections object =cut sub get_section { my $self = shift; my $number = shift; return $self->{$number}; } =head2 get_sections Gets an sorted array ref of all Biber::Section objects =cut sub get_sections { my $self = shift; return [ sort {$a->number <=> $b->number} values $self->%* ]; } =head2 add_section Adds a Biber::Section to the Biber::Sections object =cut sub add_section { my $self = shift; my $section = shift; my $number = $section->number; $self->{$number} = $section; return; } =head2 delete_section Deletes a section Mainly used in test scripts =cut sub delete_section { my $self = shift; my $section = shift; my $number = $section->number; delete $self->{$number}; return; } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/DataList.pm000444000153000001 13577713205066062 17556 0ustar00vboxother000000000000package Biber::DataList; use v5.24; use strict; use warnings; use Biber::Utils; use Biber::Constants; use Data::Compare; use Digest::MD5 qw( md5_hex ); use List::Util qw( first ); =encoding utf-8 =head1 NAME Biber::DataList =head2 new Initialize a Biber::DataList object =cut sub new { my ($class, %params) = @_; my $self = bless {%params}, $class; return $self; } =head2 set_section Sets the section of a data list =cut sub set_section { my $self = shift; my $section = shift; $self->{section} = lc($section); return; } =head2 get_section Gets the section of a data list =cut sub get_section { my $self = shift; return $self->{section}; } =head2 reset_state Resets all state data. Used mainly in tests which call Biber::prepare() multiple times without re-creating datalists =cut sub reset_state { shift->{state} = {}; return; } =head2 incr_seenpa Increment the count of occurrences of a primary author family name =cut sub incr_seenpa { my ($self, $identifier) = @_; $self->{state}{seenpa}{$identifier}++; return; } =head2 get_seenpa Get the count of occurrences of a primary author family name =cut sub get_seenpa { my ($self, $identifier) = @_; return $self->{state}{seenpa}{$identifier}; } =head2 reset_entryfields Resets all entryfield data in a list =cut sub reset_entryfields { my $self = shift; $self->{state}{fields} = {}; return; } =head2 get_entryfield Retrieves per-list datafield information for an entry =cut sub get_entryfield { my ($self, $citekey, $f) = @_; return $self->{state}{fields}{$citekey}{$f}; } =head2 set_entryfield Records per-list datafield information for an entry =cut sub set_entryfield { my ($self, $citekey, $f, $v) = @_; $self->{state}{fields}{$citekey}{$f} = $v; return; } =head2 add_uniquenamecount Add a name to the list of name contexts which have the name in it (only called for visible names) =cut sub add_uniquenamecount { my ($self, $name, $namecontext, $key) = @_; $self->{state}{uniquenamecount}{$name}{$namecontext}{$key}++; return; } =head2 add_uniquenamecount_all Add a name to the list of name contexts which have the name in it (called for all names) =cut sub add_uniquenamecount_all { my ($self, $name, $namecontext, $key) = @_; $self->{state}{uniquenamecount_all}{$name}{$namecontext}{$key}++; return; } =head2 get_uniquelistcount Get the number of uniquelist entries for a (possibly partial) list =cut sub get_uniquelistcount { my ($self, $namelist) = @_; return $self->{state}{uniquelistcount}{global}{join("\x{10FFFD}", $namelist->@*)}; } =head2 add_uniquelistcount Incremenent the count for a list part to the data for a name =cut sub add_uniquelistcount { my ($self, $namelist) = @_; $self->{state}{uniquelistcount}{global}{join("\x{10FFFD}", $namelist->@*)}++; return; } =head2 add_uniquelistcount_final Incremenent the count for a complete list to the data for a name =cut sub add_uniquelistcount_final { my ($self, $namelist) = @_; $self->{state}{uniquelistcount}{global}{final}{join("\x{10FFFD}", $namelist->@*)}++; return; } =head2 add_uniquelistcount_minyear Incremenent the count for a list and year to the data for a name Used to track uniquelist = minyear =cut sub add_uniquelistcount_minyear { my ($self, $minyearnamelist, $year, $namelist) = @_; # Allow year a default in case labelname is undef $self->{state}{uniquelistcount}{minyear}{join("\x{10FFFD}", $minyearnamelist->@*)}{$year // '0'}{join("\x{10FFFD}", $namelist->@*)}++; return; } =head2 get_uniquelistcount_minyear Get the count for a list and year to the data for a name Used to track uniquelist = minyear =cut sub get_uniquelistcount_minyear { my ($self, $minyearnamelist, $year) = @_; return scalar keys $self->{state}{uniquelistcount}{minyear}{join("\x{10FFFD}", $minyearnamelist->@*)}{$year}->%*; } =head2 get_uniquelistcount_final Get the number of uniquelist entries for a full list =cut sub get_uniquelistcount_final { my ($self, $namelist) = @_; my $c = $self->{state}{uniquelistcount}{global}{final}{join("\x{10FFFD}", $namelist->@*)}; return $c // 0; } =head2 reset_uniquelistcount Reset the count for list parts and complete lists =cut sub reset_uniquelistcount { my $self = shift; $self->{state}{uniquelistcount} = {}; return; } =head2 reset_uniquenamecount Reset the list of names which have the name part in it =cut sub reset_uniquenamecount { my $self = shift; $self->{state}{uniquenamecount} = {}; $self->{state}{uniquenamecount_all} = {}; return; } =head2 get_basenamestring Get a basenamestring for a particular name =cut sub get_basenamestring { my ($self, $nlid, $nid) = @_; return $self->{state}{namelistdata}{$nlid}{$nid}{basenamestring}; } =head2 get_namestring Get a namestring for a particular name =cut sub get_namestring { my ($self, $nlid, $nid) = @_; return $self->{state}{namelistdata}{$nlid}{$nid}{namestring}; } =head2 get_namestrings Get namestrings for a particular name =cut sub get_namestrings { my ($self, $nlid, $nid) = @_; return $self->{state}{namelistdata}{$nlid}{$nid}{namestrings}; } =head2 set_namedis Set name disambiguation metadata =cut sub set_namedis { my ($self, $nlid, $nid, $ns, $nss, $nds) = @_; $self->{state}{namelistdata}{$nlid}{$nid}{namestring} = $ns; $self->{state}{namelistdata}{$nlid}{$nid}{namestrings} = $nss; for (my $i=0;$i<=$nds->$#*;$i++) { my $se = $nds->[$i]; # make these explicit for faster lookup since they are static if ($se->[0] eq 'base') { $self->{state}{namelistdata}{$nlid}{$nid}{basenamestring} = $nss->[$i]; $self->{state}{namelistdata}{$nlid}{$nid}{basenamestringparts} = $se->[1]; last; } } $self->{state}{namelistdata}{$nlid}{$nid}{namedisschema} = $nds; return; } =head2 is_unbasepart Return boolean to say if a namepart is a base part according to template which created the information =cut sub is_unbasepart { my ($self, $nlid, $nid, $np) = @_; if (first {$_ eq $np} $self->{state}{namelistdata}{$nlid}{$nid}{basenamestringparts}->@*) { return 1; } else { return 0; } } =head2 get_namehash Get hash for a name =cut sub get_namehash { my ($self, $nlid, $nid) = @_; return $self->{state}{namelistdata}{$nlid}{$nid}{hash}; } =head2 set_namehash Set hash for a name =cut sub set_namehash { my ($self, $nlid, $nid, $s) = @_; $self->{state}{namelistdata}{$nlid}{$nid}{hash} = $s; return; } =head2 get_unmininfo Get uniquename minimalness info for a name =cut sub get_unmininfo { my ($self, $nlid, $nid) = @_; return $self->{state}{namelistdata}{$nlid}{$nid}{unmininfo}; } =head2 set_unmininfo Set uniquename minimalness info for a name =cut sub set_unmininfo { my ($self, $nlid, $nid, $s) = @_; $self->{state}{namelistdata}{$nlid}{$nid}{unmininfo} = $s; return; } =head2 get_namedisschema Get a name disambiguation schema for a name =cut sub get_namedisschema { my ($self, $nlid, $nid) = @_; return $self->{state}{namelistdata}{$nlid}{$nid}{namedisschema}; } =head2 get_unsummary Get legacy uniquename summary for a name =cut sub get_unsummary { my ($self, $nlid, $nid) = @_; my $un = $self->{state}{namelistdata}{$nlid}{$nid}{un}; return undef unless defined($un); if ($un->[1] eq 'none' or $un->[0] eq 'base') { return 0; } elsif ($un->[1] eq 'init') { return 1; } elsif ($un->[1] eq 'full' or $un->[1] eq 'fullonly') { return 2; } return 0; } =head2 get_unpart Get uniquename summary part for a name =cut sub get_unpart { my ($self, $nlid, $nid) = @_; my $un = $self->{state}{namelistdata}{$nlid}{$nid}{un}; return undef unless defined($un); return $un->[0] } =head2 get_unparts Get uniquename parts for a name =cut sub get_unparts { my ($self, $nlid, $nid, $np) = @_; return $self->{state}{namelistdata}{$nlid}{$nid}{unparts}{$np}; } =head2 set_unparts Set uniquename parts for a name =cut sub set_unparts { my ($self, $nlid, $nid, $np, $s) = @_; $self->{state}{namelistdata}{$nlid}{$nid}{unparts}{$np} = $s; return; } =head2 _get_uniquename Get the list of name contexts which contain a name Mainly for use in tests =cut sub _get_uniquename { my ($self, $name, $namecontext) = @_; my @list = sort keys $self->{state}{uniquenamecount}{$name}{$namecontext}->%*; return \@list; } =head2 get_uniquename Get uniquename for a name =cut sub get_uniquename { my ($self, $nlid, $nid) = @_; return $self->{state}{namelistdata}{$nlid}{$nid}{un}; } =head2 set_uniquename Set uniquename for a name =cut sub set_uniquename { my ($self, $nlid, $nid, $s) = @_; my $currval = $self->{state}{namelistdata}{$nlid}{$nid}{un}; # Set modified flag to positive if we changed something if (not defined($currval) or not Compare($currval, $s)) { $self->set_unul_changed(1); } $self->{state}{namelistdata}{$nlid}{$nid}{un} = $s; return; } =head2 reset_uniquename Reset uniquename for a name =cut sub reset_uniquename { my ($self, $nlid, $nid) = @_; $self->{state}{namelistdata}{$nlid}{$nid}{un} = ['base', $self->{state}{namelistdata}{$nlid}{$nid}{basenamestringparts}]; return; } =head2 get_uniquename_all Get uniquename for a name, regardless of visibility =cut sub get_uniquename_all { my ($self, $nlid, $nid) = @_; return $self->{state}{namelistdata}{$nlid}{$nid}{unall}; } =head2 set_uniquename_all Set uniquename for a name, regardless of visibility =cut sub set_uniquename_all { my ($self, $nlid, $nid, $s) = @_; $self->{state}{namelistdata}{$nlid}{$nid}{unall} = $s; return; } =head2 count_uniquelist Count the names in a string used to determine uniquelist. =cut sub count_uniquelist { my ($self, $namelist) = @_; return $namelist->$#* + 1; } =head2 get_uniquelist Gets a uniquelist setting for a namelist =cut sub get_uniquelist { my ($self, $nlid) = @_; return $self->{state}{namelistdata}{$nlid}{ul}; } =head2 set_uniquelist Sets a uniquelist setting for a namelist =cut sub set_uniquelist { my ($self, $nl, $namelist, $maxcn, $mincn) = @_; my $nlid = $nl->get_id; my $uniquelist = $self->count_uniquelist($namelist); my $num_names = $nl->count_names; my $currval = $self->{state}{namelistdata}{$nlid}{ul}; # Set modified flag to positive if we changed something if (not defined($currval) or $currval != $uniquelist) { $self->set_unul_changed(1); } # Special case $uniquelist <=1 is meaningless return if $uniquelist <= 1; # Don't set uniquelist unless the list is longer than maxcitenames as it was therefore # never truncated to mincitenames in the first place and uniquelist is a "local mincitenames" return unless $num_names > $maxcn; # No disambiguation needed if uniquelist is <= mincitenames as this makes no sense # since it implies that disambiguation beyond mincitenames was needed. # This doesn't apply when the list length is mincitenames as maxmanes therefore # (since it can't be less than mincitenames) could also be the same as the list length # and this is a special case where we need to preserve uniquelist (see comments in # create_uniquelist_info()) # $uniquelist cannot be undef or 0 either since every list occurs at least once. # This guarantees that uniquelist, when set, is >1 because mincitenames cannot # be <1 return if $uniquelist <= $mincn and not $mincn == $num_names; # Special case # No point disambiguating with uniquelist lists which have the same count # for the complete list as this means they are the same list. So, if this # is the case, don't set uniquelist at all. # BUT, this only applies if there is nothing else which these identical lists # need disambiguating from so check if there are any other lists which differ # up to any index. If there is such a list, set uniquelist using that index. # if final count > 1 (identical lists) if ($self->get_uniquelistcount_final($namelist) > 1) { # index where this namelist begins to differ from any other # Can't be 0 as that means it begins differently in which case $index is undef my $index = $self->namelist_differs_index($namelist); return unless $index; # Now we know that some disambiguation is needed from other similar list(s) $uniquelist = $index+1;# convert zero-based index into 1-based uniquelist value } # this is an elsif because for final count > 1, we are setting uniquelist and don't # want to mess about with it any more elsif ($num_names > $uniquelist and not $self->namelist_differs_nth($namelist, $uniquelist)) { # If there are more names than uniquelist, reduce it by one unless # there is another list which differs at uniquelist and is at least as long # so we get: # # AAA and BBB and CCC # AAA and BBB and CCC et al # # instead of # # AAA and BBB and CCC # AAA and BBB and CCC and DDD et al # # BUT, we also want # # AAA and BBB and CCC # AAA and BBB and CCC and DDD et al # AAA and BBB and CCC and EEE et al $uniquelist--; } $self->{state}{namelistdata}{$nlid}{ul} = $uniquelist; return; } =head2 get_visible_cite Gets citation name list visibility =cut sub get_visible_cite { my ($self, $nlid) = @_; return $self->{state}{namelistdata}{$nlid}{viscite}; } =head2 set_visible_cite Gets citation name list visibility =cut sub set_visible_cite { my ($self, $nlid, $s) = @_; $self->{state}{namelistdata}{$nlid}{viscite} = $s; return; } =head2 get_visible_bib Gets bib name list visibility =cut sub get_visible_bib { my ($self, $nlid) = @_; return $self->{state}{namelistdata}{$nlid}{visbib}; } =head2 set_visible_bib Gets bib name list visibility =cut sub set_visible_bib { my ($self, $nlid, $s) = @_; $self->{state}{namelistdata}{$nlid}{visbib} = $s; return; } =head2 get_visible_alpha Gets alpha name list visibility =cut sub get_visible_alpha { my ($self, $nlid) = @_; return $self->{state}{namelistdata}{$nlid}{visalpha}; } =head2 set_visible_alpha Gets alpha name list visibility =cut sub set_visible_alpha { my ($self, $nlid, $s) = @_; $self->{state}{namelistdata}{$nlid}{visalpha} = $s; return; } =head2 get_numofuniquenames Get the number of uniquenames entries for a visible name =cut sub get_numofuniquenames { my ($self, $name, $namecontext) = @_; return scalar keys $self->{state}{uniquenamecount}{$name}{$namecontext}->%*; } =head2 get_numofuniquenames_all Get the number of uniquenames entries for a name =cut sub get_numofuniquenames_all { my ($self, $name, $namecontext) = @_; return scalar keys $self->{state}{uniquenamecount_all}{$name}{$namecontext}->%*; } =head2 get_unul_done Return a boolean saying whether uniquenename+uniquelist processing is finished =cut sub get_unul_done { my $self = shift; return $self->{unulchanged} ? 0 : 1; } =head2 set_unul_changed Set a boolean saying whether uniquename+uniquelist has changed =cut sub set_unul_changed { my ($self, $val) = @_; $self->{unulchanged} = $val; return; } =head2 reset_seen_extra Reset the counters for extra* =cut sub reset_seen_extra { my $self = shift; $self->{state}{seen_extradate} = {}; $self->{state}{seen_extratitle} = {}; $self->{state}{seen_extratitleyear} = {}; $self->{state}{seen_extraalpha} = {}; $self->{state}{seen_namedateparts} = {}; $self->{state}{seen_nametitle} = {}; $self->{state}{seen_titleyear} = {}; return; } =head2 incr_seen_extradate Increment and return the counter for extradate =cut sub incr_seen_extradate { my ($self, $ey) = @_; return ++$self->{state}{seen_extradate}{$ey}; } =head2 incr_seen_extratitle Increment and return the counter for extratitle =cut sub incr_seen_extratitle { my ($self, $et) = @_; return ++$self->{state}{seen_extratitle}{$et}; } =head2 incr_seen_extratitleyear Increment and return the counter for extratitleyear =cut sub incr_seen_extratitleyear { my ($self, $ety) = @_; return ++$self->{state}{seen_extratitleyear}{$ety}; } =head2 incr_seen_extraalpha Increment and return the counter for extraalpha =cut sub incr_seen_extraalpha { my ($self, $ea) = @_; return ++$self->{state}{seen_extraalpha}{$ea}; } =head2 get_seen_namedateparts Get the count of an labelname/dateparts combination for tracking extradate. It uses labelyear plus name as we need to disambiguate entries with different labelyear (like differentiating 1984--1986 from just 1984) =cut sub get_seen_namedateparts { my ($self, $ny) = @_; return $self->{state}{seen_namedateparts}{$ny} // 0; } =head2 incr_seen_namedateparts Increment the count of an labelname/dateparts combination for extradate We pass in the name and date strings separately as we have to be careful and only increment this counter beyond 1 if there is a name component. Otherwise, extradate gets defined for all entries with no name but the same year etc. =cut sub incr_seen_namedateparts { my ($self, $ns, $ys) = @_; my $tmp = "$ns,$ys"; # We can always increment this to 1 unless (exists($self->{state}{seen_namedateparts}{$tmp})) { $self->{state}{seen_namedateparts}{$tmp}++; } # But beyond that only if we have a labelname in the entry since # this counter is used to create extradate which doesn't mean anything for # entries with no name # We allow empty year so that we generate extradate for the same name with no year # so we can do things like "n.d.-a", "n.d.-b" etc. else { if ($ns) { $self->{state}{seen_namedateparts}{$tmp}++; } } return; } =head2 get_seen_nametitle Get the count of an labelname/labeltitle combination for tracking extratitle. =cut sub get_seen_nametitle { my ($self, $nt) = @_; return $self->{state}{seen_nametitle}{$nt} // 0; } =head2 incr_seen_nametitle Increment the count of an labelname/labeltitle combination for extratitle We pass in the name and year strings separately as we have to be careful and only increment this counter beyond 1 if there is a title component. Otherwise, extratitle gets defined for all entries with no title. =cut sub incr_seen_nametitle { my ($self, $ns, $ts) = @_; my $tmp = "$ns,$ts"; # We can always increment this to 1 unless ($self->{state}{seen_nametitle}{$tmp}) { $self->{state}{seen_nametitle}{$tmp}++; } # But beyond that only if we have a labeltitle in the entry since # this counter is used to create extratitle which doesn't mean anything for # entries with no title else { if ($ts) { $self->{state}{seen_nametitle}{$tmp}++; } } return; } =head2 get_seen_titleyear Get the count of an labeltitle/labelyear combination for tracking extratitleyear =cut sub get_seen_titleyear { my ($self, $ty) = @_; return $self->{state}{seen_titleyear}{$ty} // 0; } =head2 incr_seen_titleyear Increment the count of an labeltitle/labelyear combination for extratitleyear We pass in the title and year strings separately as we have to be careful and only increment this counter beyond 1 if there is a title component. Otherwise, extratitleyear gets defined for all entries with no title. =cut sub incr_seen_titleyear { my ($self, $ts, $ys) = @_; my $tmp = "$ts,$ys"; # We can always increment this to 1 unless ($self->{state}{seen_titleyear}{$tmp}) { $self->{state}{seen_titleyear}{$tmp}++; } # But beyond that only if we have a labeltitle in the entry since # this counter is used to create extratitleyear which doesn't mean anything for # entries with no title else { if ($ts) { $self->{state}{seen_titleyear}{$tmp}++; } } return; } =head2 reset_workuniqueness Reset various work uniqueness counters =cut sub reset_workuniqueness { my $self = shift; $self->{state}{seenname} = {}; $self->{state}{seentitle} = {}; $self->{state}{seenbaretitle} = {}; $self->{state}{seenwork} = {}; return; } =head2 get_seenname Get the count of occurrences of a labelname or labeltitle =cut sub get_seenname { my ($self, $identifier) = @_; return $self->{state}{seenname}{$identifier}; } =head2 incr_seenname Increment the count of occurrences of a labelname or labeltitle =cut sub incr_seenname { my ($self, $identifier) = @_; $self->{state}{seenname}{$identifier}++; return; } =head2 get_seentitle Get the count of occurrences of a labeltitle =cut sub get_seentitle { my ($self, $identifier) = @_; return $self->{state}{seentitle}{$identifier}; } =head2 incr_seentitle Increment the count of occurrences of a labeltitle =cut sub incr_seentitle { my ($self, $identifier) = @_; $self->{state}{seentitle}{$identifier}++; return; } =head2 get_seenbaretitle Get the count of occurrences of a labeltitle when there is no labelname =cut sub get_seenbaretitle { my ($self, $identifier) = @_; return $self->{state}{seenbaretitle}{$identifier}; } =head2 incr_seenbaretitle Increment the count of occurrences of a labeltitle when there is no labelname =cut sub incr_seenbaretitle { my ($self, $identifier) = @_; $self->{state}{seenbaretitle}{$identifier}++; return; } =head2 get_seenwork Get the count of occurrences of a labelname and labeltitle =cut sub get_seenwork { my ($self, $identifier) = @_; return $self->{state}{seenwork}{$identifier}; } =head2 incr_seenwork Increment the count of occurrences of a labelname and labeltitle =cut sub incr_seenwork { my ($self, $identifier) = @_; $self->{state}{seenwork}{$identifier}++; return; } =head2 incr_la_disambiguation Increment a counter to say we have seen this labelalpha =cut sub incr_la_disambiguation { my ($self, $la) = @_; $self->{state}{ladisambiguation}{$la}++; return; } =head2 get_la_disambiguation Get the disambiguation counter for this labelalpha. Return a 0 for undefs to avoid spurious errors. =cut sub get_la_disambiguation { my ($self, $la) = @_; return $self->{state}{ladisambiguation}{$la} // 0; } =head2 set_sortingtemplatename Sets the sortingtemplate name of a data list =cut sub set_sortingtemplatename { my $self = shift; my $stn = shift; $self->{sortingtemplatename} = lc($stn); return; } =head2 get_attrs Gets the attributes of a data list =cut sub get_attrs { my $self = shift; return join('/', ($self->{sortingtemplatename}, $self->{sortingnamekeytemplatename}, $self->{labelprefix}, $self->{uniquenametemplatename}, $self->{labelalphanametemplatename})); } =head2 get_sortingtemplatename Gets the sortingtemplatename of a data list =cut sub get_sortingtemplatename { my $self = shift; return $self->{sortingtemplatename}; } =head2 set_sortingnamekeytemplatename Sets the sortingnamekeytemplate name of a data list =cut sub set_sortingnamekeytemplatename { my $self = shift; my $snksn = shift; $self->{sortingnamekeytemplatename} = lc($snksn); return; } =head2 get_sortingnamekeytemplatename Gets the sortingnamekeytemplatename of a data list =cut sub get_sortingnamekeytemplatename { my $self = shift; return $self->{sortingnamekeytemplatename}; } =head2 set_uniquenametemplatename Sets the uniquenametemplate name of a data list =cut sub set_uniquenametemplatename { my $self = shift; my $untn = shift; $self->{uniquenametemplatename} = lc($untn); return; } =head2 get_uniquenametemplatename Gets the uniquenametemplate name of a data list =cut sub get_uniquenametemplatename { my $self = shift; return $self->{uniquenametemplatename}; } =head2 set_labelalphanametemplatename Sets the labelalphanametemplate name of a data list =cut sub set_labelalphanametemplatename { my $self = shift; my $latn = shift; $self->{labelalphanametemplatename} = lc($latn); return; } =head2 get_labelalphanametemplatename Gets the labelalphanametemplate name of a data list =cut sub get_labelalphanametemplatename { my $self = shift; return $self->{labelalphanametemplatename}; } =head2 set_sortinit_collator Sets the sortinit collator for this list =cut sub set_sortinit_collator { my $self = shift; $self->{sortinitcollator} = shift;; return; } =head2 get_sortinit_collator Gets the sortinit collator for this list =cut sub get_sortinit_collator { my $self = shift; return $self->{sortinitcollator}; } =head2 get_labelprefix Gets the labelprefix setting of a data list =cut sub get_labelprefix { my $self = shift; return $self->{labelprefix}; } =head2 set_labelprefix Sets the labelprefix setting of a data list =cut sub set_labelprefix { my $self = shift; my $pn = shift; $self->{labelprefix} = $pn; return } =head2 set_name Sets the name of a data list =cut sub set_name { my $self = shift; my $name = shift; $self->{name} = $name; return; } =head2 get_name Gets the name of a data list =cut sub get_name { my $self = shift; return $self->{name}; } =head2 set_type Sets the type of a data list =cut sub set_type { my $self = shift; my $type = shift; $self->{type} = lc($type); return; } =head2 get_type Gets the type of a section list =cut sub get_type { my $self = shift; return $self->{type}; } =head2 set_keys Sets the keys for the list =cut sub set_keys { my ($self, $keys) = @_; $self->{keys} = $keys; return; } =head2 get_keys Gets the keys for the list =cut sub get_keys { my $self = shift; return $self->{keys}; } =head2 count_keys Count the keys for the list =cut sub count_keys { my $self = shift; return $#{$self->{keys}} + 1; } =head2 get_namelistdata Gets name list data =cut sub get_namelistdata { return shift->{state}{namelistdata}; } =head2 set_namelistdata Saves name list data =cut sub set_namelistdata { my ($self, $nld) = @_; $self->{state}{namelistdata} = $nld; return; } =head2 get_labelalphadata Gets labelalpha field data =cut sub get_labelalphadata { return shift->{state}{labelalphadata}; } =head2 set_labelalphadata Saves labelalpha data =cut sub set_labelalphadata { my ($self, $lad) = @_; $self->{state}{labelalphadata} = $lad; return; } =head2 get_labelalphadata_for_key Gets labelalpha field data for a key =cut sub get_labelalphadata_for_key { my ($self, $key) = @_; return $self->{state}{labelalphadata}{$key}; } =head2 set_labelalphadata_for_key Saves labelalpha field data for a key =cut sub set_labelalphadata_for_key { my ($self, $key, $la) = @_; return unless defined($key); $self->{state}{labelalphadata}{$key} = $la; return; } =head2 set_extradatedata_for_key Saves extradate field data for a key =cut sub set_extradatedata_for_key { my ($self, $key, $ed) = @_; return unless defined($key); $self->{state}{extradatedata}{$key} = $ed; return; } =head2 set_extradatedata Saves extradate field data for all keys =cut sub set_extradatedata { my ($self, $ed) = @_; $self->{state}{extradatedata} = $ed; return; } =head2 get_extradatedata Gets the extradate field data for a key =cut sub get_extradatedata_for_key { my ($self, $key) = @_; return unless defined($key); return $self->{state}{extradatedata}{$key}; } =head2 set_extratitledata_for_key Saves extratitle field data for a key =cut sub set_extratitledata_for_key { my ($self, $key, $ed) = @_; return unless defined($key); $self->{state}{extratitledata}{$key} = $ed; return; } =head2 set_extratitledata Saves extratitle field data for all keys =cut sub set_extratitledata { my ($self, $ed) = @_; $self->{state}{extratitledata} = $ed; return; } =head2 get_extratitledata Gets the extratitle field data for a key =cut sub get_extratitledata_for_key { my ($self, $key) = @_; return unless defined($key); return $self->{state}{extratitledata}{$key}; } =head2 set_extratitleyeardata_for_key Saves extratitleyear field data for a key =cut sub set_extratitleyeardata_for_key { my ($self, $key, $ed) = @_; return unless defined($key); $self->{state}{extratitleyeardata}{$key} = $ed; return; } =head2 set_extratitleyeardata Saves extratitleyear field data for all keys =cut sub set_extratitleyeardata { my ($self, $ed) = @_; $self->{state}{extratitleyeardata} = $ed; return; } =head2 get_extratitleyeardata Gets the extratitleyear field data for a key =cut sub get_extratitleyeardata_for_key { my ($self, $key) = @_; return unless defined($key); return $self->{state}{extratitleyeardata}{$key}; } =head2 set_extraalphadata_for_key Saves extraalpha field data for a key =cut sub set_extraalphadata_for_key { my ($self, $key, $ed) = @_; return unless defined($key); $self->{state}{extraalphadata}{$key} = $ed; return; } =head2 set_extraalphadata Saves extraalpha field data for all keys =cut sub set_extraalphadata { my ($self, $ed) = @_; $self->{state}{extraalphadata} = $ed; return; } =head2 get_extraalphadata Gets the extraalpha field data for a key =cut sub get_extraalphadata_for_key { my ($self, $key) = @_; return unless defined($key); return $self->{state}{extraalphadata}{$key}; } =head2 get_sortdataschema Gets the sortdata schema for a sortlist =cut sub get_sortdataschema { my ($self) = @_; return $self->{sortdataschema}; } =head2 set_sortdataschema Saves the sortdata schema for a sortlist =cut sub set_sortdataschema { my ($self, $ss) = @_; $self->{sortdataschema} = $ss; return; } =head2 set_sortdata Saves sorting data in a list for a key =cut sub set_sortdata { my ($self, $key, $sd) = @_; return unless defined($key); $self->{sortdata}{$key} = $sd; return; } =head2 get_sortdata_for_key Gets the sorting data in a list for a key =cut sub get_sortdata_for_key { my ($self, $key) = @_; return unless defined($key); return $self->{sortdata}{$key}; } =head2 set_sortinitdata_for_key Saves sortinit data for a specific key =cut sub set_sortinitdata_for_key { my ($self, $key, $init) = @_; return unless defined($key); $self->{sortinitdata}{$key} = {init => $init}; return; } =head2 set_sortinitdata Saves sortinit data for all keys =cut sub set_sortinitdata { my ($self, $sid) = @_; $self->{sortinitdata} = $sid; return; } =head2 get_sortinit_for_key Gets the sortinit in a list for a key =cut sub get_sortinit_for_key { my ($self, $key) = @_; return unless defined($key); return $self->{sortinitdata}{$key}{init}; } =head2 set_sortingtemplate Sets the sortingtemplate of a list =cut sub set_sortingtemplate { my $self = shift; my $sortingtemplate = shift; $self->{sortingtemplate} = $sortingtemplate; return; } =head2 get_sortingtemplate Gets the sortingtemplate of a list =cut sub get_sortingtemplate { my $self = shift; return $self->{sortingtemplate}; } =head2 add_filter Adds a filter to a list object =cut sub add_filter { my $self = shift; my ($filter) = @_; push $self->{filters}->@*, $filter; return; } =head2 get_filters Gets all filters for a list object =cut sub get_filters { my $self = shift; return $self->{filters}; } =head2 instantiate_entry Do any dynamic information replacement for information which varies in an entry between lists. This is information which needs to be output to the .bbl for an entry but which is a property of the reference context and not the entry per se so it cannot be stored statically in the entry and must be retrieved from the specific datalist when outputting the entry. =cut sub instantiate_entry { my ($self, $section, $entry, $key, $format) = @_; my $be = $section->bibentry($key); my $bee = $be->get_field('entrytype'); my $un = Biber::Config->getblxoption('uniquename', $bee, $key); my $ul = Biber::Config->getblxoption('uniquelist', $bee, $key); return '' unless $entry and $be; my $dmh = Biber::Config->get_dm_helpers; $format //= 'bbl'; # default my $entry_string = $$entry; # .bbl output if ($format eq 'bbl') { # entryset if (my $es = $self->get_entryfield($key, 'entryset')) { my $str = "\\set{" . join(',', $es->@*) . '}'; $entry_string =~ s|ENTRYSET|$str|gxms; } # uniqueprimaryauthor if ($self->get_entryfield($key, 'uniqueprimaryauthor')) { my $str = "\\true{uniqueprimaryauthor}"; $entry_string =~ s|UNIQUEPRIMARYAUTHOR|$str|gxms; } # uniquework if ($self->get_entryfield($key, 'uniquework')) { my $str = "\\true{uniquework}"; $entry_string =~ s|UNIQUEWORK|$str|gxms; } # uniquebaretitle if ($self->get_entryfield($key, 'uniquebaretitle')) { my $str = "\\true{uniquebaretitle}"; $entry_string =~ s|UNIQUEBARETITLE|$str|gxms; } # uniquetitle if ($self->get_entryfield($key, 'uniquetitle')) { my $str = "\\true{uniquetitle}"; $entry_string =~ s|UNIQUETITLE|$str|gxms; } # extraalpha if (my $e = $self->get_extraalphadata_for_key($key)) { my $str = "\\field{extraalpha}{$e}"; $entry_string =~ s|EXTRAALPHA|$str|gxms; } # labelalpha if (my $e = $self->get_labelalphadata_for_key($key)) { my $str = "\\field{labelalpha}{$e}"; $entry_string =~ s|LABELALPHA|$str|gxms; } # uniquename if ($un) { # uniquename is expensive so skip if not requested foreach my $namefield ($dmh->{namelists}->@*) { next unless my $nl = $be->get_field($namefield); my $nlid = $nl->get_id; foreach my $n ($nl->names->@*) { my $nid = $n->get_id; if (defined($self->get_unsummary($nlid, $nid))) { my $str = 'uniquename=' . $self->get_unsummary($nlid, $nid); $entry_string =~ s|UNS-$nid|$str|gxms; $str = 'uniquepart=' . $self->get_unpart($nlid, $nid); $entry_string =~ s|UNP-$nid|$str|gxms; foreach my $np ($n->get_nameparts) { if ($self->is_unbasepart($nlid, $nid, $np)) { $entry_string =~ s|\s+UNP-$np-$nid,?||gxms; } else { $str = "${np}un=" . $self->get_unparts($nlid, $nid, $np); $entry_string =~ s|UNP-$np-$nid|$str|gxms; } } } else { $entry_string =~ s|UN[SP]-$nid,?||gxms; foreach my $np ($n->get_nameparts) { $entry_string =~ s|\s+UNP-$np-$nid,?||gxms; } } } } } # uniquelist if ($ul) { # uniquelist is expensive so skip if not requested foreach my $namefield ($dmh->{namelists}->@*) { next unless my $nl = $be->get_field($namefield); my $nlid = $nl->get_id; if (defined($self->get_uniquelist($nlid))) { my $str = 'uniquelist=' . $self->get_uniquelist($nlid); $entry_string =~ s|UL-$nlid|$str|gxms; } else { $entry_string =~ s|UL-$nlid,?||gxms; } } } # extratitleyear if (my $e = $self->get_extratitleyeardata_for_key($key)) { my $str = "\\field{extratitleyear}{$e}"; $entry_string =~ s|EXTRATITLEYEAR|$str|gxms; } # extratitle if (my $e = $self->get_extratitledata_for_key($key)) { my $str = "\\field{extratitle}{$e}"; $entry_string =~ s|EXTRATITLE|$str|gxms; } # per-namelist bibnamehash and namehash foreach my $namefield ($dmh->{namelists}->@*) { # per-namelist bibnamehash if (my $e = $self->get_entryfield($key, "${namefield}bibnamehash")) { my $str = "\\strng{${namefield}bibnamehash}{$e}"; $entry_string =~ s|${namefield}BIBNAMEHASH|$str|gxms; } # per-namelist namehash if (my $e = $self->get_entryfield($key, "${namefield}namehash")) { my $str = "\\strng{${namefield}namehash}{$e}"; $entry_string =~ s|${namefield}NAMEHASH|$str|gxms; } } # bibnamehash if (my $e = $self->get_entryfield($key, 'bibnamehash')) { my $str = "\\strng{bibnamehash}{$e}"; $entry_string =~ s|BIBNAMEHASH|$str|gxms; } # namehash if (my $e = $self->get_entryfield($key, 'namehash')) { my $str = "\\strng{namehash}{$e}"; $entry_string =~ s|NAMEHASH|$str|gxms; } # per-namehash foreach my $pn ($dmh->{namelistsall}->@*) { next unless my $nl = $be->get_field($pn); foreach my $n ($nl->names->@*) { my $nid = $n->get_id; if (my $e = $self->{state}{namelistdata}{$nl->get_id}{$nid}{hash}) { my $str = "hash=$e"; $entry_string =~ s|$nid-PERNAMEHASH|$str|gxms; } else { $entry_string =~ s|$nid-PERNAMEHASH,?||gxms; } } } # extradate if (my $e = $self->get_extradatedata_for_key($key)) { my $str = "\\field{extradate}{$e}"; $entry_string =~ s|EXTRADATE|$str|gxms; } # sortinit + sortinithash my $sinit = $self->get_sortinit_for_key($key); if (defined($sinit)) { my $str = "\\field{sortinit}{$sinit}"; $entry_string =~ s|SORTINIT|$str|gxms; my $sinithash = md5_hex($self->{sortinitcollator}->viewSortKey($sinit)); $str = "\\field{sortinithash}{$sinithash}"; $entry_string =~ s|SORTINITHASH|$str|gxms; } # labelprefix if (my $pn = $self->get_labelprefix($key)) { my $str = "\\field{labelprefix}{$pn}"; $entry_string =~ s|LABELPREFIX|$str|gxms; } # singletitle if ($self->get_entryfield($key, 'singletitle')) { my $str = "\\true{singletitle}"; $entry_string =~ s|SINGLETITLE|$str|gxms; } } # .bblxml output if ($format eq 'bblxml') { # entryset if (my $es = $self->get_entryfield($key, 'entryset')) { my $str = "\n"; foreach my $m ($es->@*) { $str .= " $m\n"; } $str .= " "; $entry_string =~ s|ENTRYSET|$str|gxms; } # uniqueprimaryauthor if ($self->get_entryfield($key, 'uniqueprimaryauthor')) { my $str = 'true'; $entry_string =~ s|\[BDS\]UNIQUEPRIMARYAUTHOR\[/BDS\]|$str|gxms; } else { $entry_string =~ s|\suniqueprimaryauthor="\[BDS\]UNIQUEPRIMARYAUTHOR\[/BDS\]"||gxms; } # uniquework if ($self->get_entryfield($key, 'uniquework')) { my $str = 'true'; $entry_string =~ s|\[BDS\]UNIQUEWORK\[/BDS\]|$str|gxms; } else { $entry_string =~ s|\suniquework="\[BDS\]UNIQUEWORK\[/BDS\]"||gxms; } # uniquebaretitle if ($self->get_entryfield($key, 'uniquebaretitle')) { my $str = 'true'; $entry_string =~ s|\[BDS\]UNIQUEBARETITLE\[/BDS\]|$str|gxms; } else { $entry_string =~ s|\suniquebaretitle="\[BDS\]UNIQUEBARETITLE\[/BDS\]"||gxms; } # uniquetitle if ($self->get_entryfield($key, 'uniquetitle')) { my $str = 'true'; $entry_string =~ s|\[BDS\]UNIQUETITLE\[/BDS\]|$str|gxms; } else { $entry_string =~ s|\suniquetitle="\[BDS\]UNIQUETITLE\[/BDS\]"||gxms; } # extraalpha if (my $e = $self->get_extraalphadata_for_key($key)) { my $str = "$e"; $entry_string =~ s|EXTRAALPHA|$str|gxms; } # labelalpha if (my $e = $self->get_labelalphadata_for_key($key)) { my $str = "$e"; $entry_string =~ s|LABELALPHA|$str|gxms; } # uniquename if ($un) { # uniquename is expensive so skip if not requested foreach my $namefield ($dmh->{namelists}->@*) { next unless my $nl = $be->get_field($namefield); my $nlid = $nl->get_id; foreach my $n ($nl->names->@*) { my $nid = $n->get_id; if (defined($self->get_unsummary($nlid, $nid))) { my $str = $self->get_unsummary($nlid, $nid); $entry_string =~ s|\[BDS\]UNS-$nid\[/BDS\]|$str|gxms; $str = $self->get_unpart($nlid, $nid); $entry_string =~ s|\[BDS\]UNP-$nid\[/BDS\]|$str|gxms; foreach my $np ($n->get_nameparts) { if ($self->is_unbasepart($nlid, $nid, $np)) { $entry_string =~ s|\suniquename="\[BDS\]UNP-$np-$nid\[/BDS\]",?||gxms; } else { $str = $self->get_unparts($nlid, $nid, $np); $entry_string =~ s|\[BDS\]UNP-$np-$nid\[/BDS\]|$str|gxms; } } } else { $entry_string =~ s#\s(?:uniquename|uniquepart)="\[BDS\]UN[SP]-$nid\[/BDS\]",?##gxms; foreach my $np ($n->get_nameparts) { $entry_string =~ s|\suniquename="\[BDS\]UNP-$np-$nid\[/BDS\]",?||gxms; } } } } } # uniquelist if ($ul) { # uniquelist is expensive so skip if not requested foreach my $namefield ($dmh->{namelists}->@*) { next unless my $nl = $be->get_field($namefield); my $nlid = $nl->get_id; if (defined($self->get_uniquelist($nlid))) { my $str = $self->get_uniquelist($nlid); $entry_string =~ s|\[BDS\]UL-$nlid\[/BDS\]|$str|gxms; } else { $entry_string =~ s|\suniquelist="\[BDS\]UL-$nlid\[/BDS\]"||gxms; } } } # extratitleyear if (my $e = $self->get_extratitleyeardata_for_key($key)) { my $str = "$e"; $entry_string =~ s|EXTRATITLEYEAR|$str|gxms; } # extratitle if (my $e = $self->get_extratitledata_for_key($key)) { my $str = "$e"; $entry_string =~ s|EXTRATITLE|$str|gxms; } # per-namelist bibnamehash and namehash foreach my $namefield ($dmh->{namelists}->@*) { # per-namelist bibnamehash if (my $e = $self->get_entryfield($key, "${namefield}bibnamehash")) { my $str = "$e"; $entry_string =~ s|${namefield}BIBNAMEHASH|$str|gxms; } # per-namelist namehash if (my $e = $self->get_entryfield($key, "${namefield}namehash")) { my $str = "$e"; $entry_string =~ s|${namefield}NAMEHASH|$str|gxms; } } # bibnamehash if (my $e = $self->get_entryfield($key, 'bibnamehash')) { my $str = "$e"; $entry_string =~ s|BIBNAMEHASH|$str|gxms; } # namehash if (my $e = $self->get_entryfield($key, 'namehash')) { my $str = "$e"; $entry_string =~ s|NAMEHASH|$str|gxms; } # per-namehash foreach my $pn ($dmh->{namelistsall}->@*) { next unless my $nl = $be->get_field($pn); foreach my $n ($nl->names->@*) { my $nid = $n->get_id; if (my $e = $self->{state}{namelistdata}{$nl->get_id}{$nid}{hash}) { my $str = $e; $entry_string =~ s|\[BDS\]$nid-PERNAMEHASH\[/BDS\]|$str|gxms; } else { $entry_string =~ s|hash="\[BDS\]$nid-PERNAMEHASH\[/BDS\]"?,?||gxms; } } } # extradate if (my $e = $self->get_extradatedata_for_key($key)) { my $str = "$e"; $entry_string =~ s|EXTRADATE|$str|gxms; } # sortinit + sortinithash my $sinit = $self->get_sortinit_for_key($key); if (defined($sinit)) { my $str = "$sinit"; $entry_string =~ s|SORTINIT|$str|gxms; my $sinithash = md5_hex($self->{sortinitcollator}->viewSortKey($sinit)); $str = "$sinithash"; $entry_string =~ s|SORTINITHASH|$str|gxms; } # labelprefix if (my $pn = $self->get_labelprefix($key)) { my $str = "$pn"; $entry_string =~ s|LABELPREFIX|$str|gxms; } # singletitle if ($self->get_entryfield($key, 'singletitle')) { my $str = 'true'; $entry_string =~ s|\[BDS\]SINGLETITLE\[/BDS\]|$str|gxms; } else { $entry_string =~ s|\ssingletitle="\[BDS\]SINGLETITLE\[/BDS\]"||gxms; } } # Clean up dangling commas $entry_string =~ s|,(?:\n\s+)?\}\}|}}|gxms; # Clean up generic metadata which was not replaced $entry_string =~ s|^\s+[^<]+\n||gxms; return $entry_string; } =head2 namelist_differs_index Returns the index where the name list begins to differ from any other list Assuming these lists [a, b] [a, b, d, e, f, g, h, i, j] [a, b, d, e, f] [a, b, e, z, z, y] namelist_differs_index([a, b, c, d, e]) -> 2 namelist_differs_index([a]) -> 1 =cut sub namelist_differs_index { my $self = shift; my @list = shift->@*; my $index; foreach my $l_s (keys $self->{state}{uniquelistcount}{global}{final}->%*) { my @l = split("\x{10FFFD}", $l_s); next if Compare(\@list, \@l);# Ignore identical lists for (my $i=0;$i<=$#list;$i++) { if (defined($list[$i]) and defined($l[$i]) and ($list[$i] eq $l[$i])) { if (not defined($index) or $i > $index) { $index = $i; } } else { last; } } } if (defined($index)) { # one or more similar lists if ($index == $#list) { # There is another list which is a superset, return last index return $index; } else { # Differs with some list, return index of where difference begins return $index+1; } } else { # no similar lists return undef; } } =head2 namelist_differs_nth Returns true if some other name list differs at passed nth place and is at least as long namelist_differs_nth([a, b, c, d, e], 3) = 1 if there is another name list like any of these: [a, b, d, e, f] [a, b, e, z, z, y] =cut sub namelist_differs_nth { my $self = shift; my ($list, $n) = @_; my @list_one = $list->@*; # Loop over all final lists, looking for ones which match: # * up to n - 1 # * differ at $n # * are at least as long foreach my $l_s (keys $self->{state}{uniquelistcount}{global}{final}->%*) { my @l = split("\x{10FFFD}", $l_s); # If list is shorter than the list we are checking, it's irrelevant next if $#l < $list->$#*; # If list matches at $n, it's irrelevant next if ($list_one[$n-1] eq $l[$n-1]); # If list doesn't match up to $n - 1, it's irrelevant next unless Compare([@list_one[0 .. $n-2]], [@l[0 .. $n-2]]); return 1; } return 0; } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/UCollate.pm000444000153000001 623713205066062 17505 0ustar00vboxother000000000000package Biber::UCollate; use v5.24; use strict; use Carp; use Data::Dump; use parent qw(Unicode::Collate::Locale); my $logger = Log::Log4perl::get_logger('main'); =encoding utf-8 =head1 NAME Biber::UCollate =head2 new Instantiate new Unicode::Collate::Locale object with some extra reporting checks. We need this also so that we can chain some things during sorting object construction. Without an object, we would need to call a regular subroutine but due to the special semantics of Schwartzian transforms, we need to chain all sorting elements so that they return a boolean value (see Biber.pm). This is much tidier with Foo->new()->change()->cmp than with something messy like "my $uc = create_uc_object; $uc->change()->cmp()" etc. =cut sub new { my $class = shift; my ($thislocale, %collopts) = @_; # Add tailoring locale for Unicode::Collate # Ignore table as this is not valid for U::C::Locale objects if ($thislocale and not $collopts{locale}) { $collopts{locale} = $thislocale; if ($collopts{table}) { my $t = delete $collopts{table}; $logger->info("Ignoring collation table '$t' as locale is set ($thislocale)"); } } # Remove locale from options as we need this to make the object my $coll_locale = delete $collopts{locale}; # Now create the collator object my $Collator = $class->SUPER::new(locale => $coll_locale) or $logger->logcarp("Problem creating Unicode::Collate::Locale object: $@"); # Fix the old "alternate" alias otherwise we have problems as U::C->change() always # returns the new "variable" option and we get confused. if (my $alt = delete $collopts{alternate}) { $collopts{variable} = $alt; } # Show the collation options when debugging if ($logger->is_debug()) {# performance tune $logger->debug('Collation options: ' . Data::Dump::pp(%collopts)); } # Tailor the collation object and report differences from defaults for locale # Have to do this in ->change method as ->new can croak with conflicting tailoring # for locales which enforce certain tailorings my %coll_changed = $Collator->change( %collopts ); while (my ($k, $v) = each %coll_changed) { # If we are changing something that has no override tailoring in the locale, it # is undef in this hash and we don't care about such things next unless defined($coll_changed{$k}); if ($coll_changed{$k} ne $collopts{$k}) { $logger->info("Overriding locale '$coll_locale' defaults '$k = $v' with '$k = " . $collopts{$k} . "'"); } } return $Collator; } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Section.pm000444000153000001 3011113205066061 17404 0ustar00vboxother000000000000package Biber::Section; use v5.24; use strict; use warnings; use Biber::Entries; use Biber::Utils; use List::Util qw( first ); =encoding utf-8 =head1 NAME Biber::Section =head2 new Initialize a Biber::Section object =cut sub new { my ($class, %params) = @_; my $self = bless {%params}, $class; $self->{bibentries} = new Biber::Entries; $self->{keytorelclone} = {}; $self->{relclonetokey} = {}; $self->{relkeys} = {}; $self->{allkeys} = 0; $self->{citekeys} = []; $self->{citekeys_h} = {}; # For faster hash-based lookup of individual keys $self->{labelcache_l} = {}; $self->{everykey} = {}; $self->{everykey_lc} = {}; $self->{bcfkeycache} = {}; $self->{labelcache_v} = {}; $self->{dkeys} = {}; $self->{keytods} = {}; $self->{orig_order_citekeys} = []; $self->{undef_citekeys} = []; $self->{citekey_alias} = {}; $self->{static_keys} = {}; return $self; } =head2 reset_caches Reset section caches which need it =cut sub reset_caches { my $self = shift; $self->{labelcache_l} = {}; $self->{labelcache_v} = {}; $self->{bcfkeycache} = {}; return; } =head2 set_keytods Save information about citekey->datasource name mapping. Used for error reporting. =cut sub set_keytods { my ($self, $key, $ds) = @_; $self->{keytods}{$key} = $ds; return; } =head2 get_keytods Get information about citekey->datasource name mapping. Used for error reporting. =cut sub get_keytods { my ($self, $key) = @_; return $self->{keytods}{$key}; } =head2 has_badcasekey Returns a value to say if we've seen a key differing only in case before - we've seen a differently cased variant of this key so we can warn about this undef - Not seen this key at all in any case variant before =cut sub has_badcasekey { my ($self, $key) = @_; my $ckey = $self->{everykey_lc}{lc($key)}; return undef unless $ckey; return $ckey ne $key ? $ckey : undef; } =head2 add_related Record that a key is used as a related entry =cut sub add_related { my ($self, $key) = @_; $self->{relkeys}{$key} = 1; return; } =head2 is_related Check if a key is used as a related entry key =cut sub is_related { my ($self, $key) = @_; return $self->{relkeys}{$key}; } =head2 keytorelclone Record a key<->clone key mapping. =cut sub keytorelclone { my ($self, $key, $clonekey) = @_; $self->{keytorelclone}{$key} = $clonekey; $self->{relclonetokey}{$clonekey} = $key; return; } =head2 get_keytorelclone Fetch a related entry clone key, given a cite key =cut sub get_keytorelclone { my ($self, $key) = @_; return $self->{keytorelclone}{$key}; } =head2 get_relclonetokey Fetch a related entry key, given a clone key =cut sub get_relclonetokey { my ($self, $key) = @_; return $self->{relclonetokey}{$key}; } =head2 has_keytorelclone Return boolean saying if a cite key has a related entry clone in the current section =cut sub has_keytorelclone { my ($self, $key) = @_; return defined($self->{keytorelclone}{$key}) ? 1 : 0; } =head2 has_relclonetokey Return boolean saying if a related clone key has a citekey in the current section =cut sub has_relclonetokey { my ($self, $key) = @_; return defined($self->{relclonetokey}{$key}) ? 1 : 0; } =head2 add_everykey Adds a datasource key to the section list of all datasource keys =cut sub add_everykey { my ($self, $key) = @_; $self->{everykey}{$key} = 1; $self->{everykey_lc}{lc($key)} = $key; return; } =head2 del_everykeys Delete everykey cache. For use in tests. =cut sub del_everykeys { my $self = shift; $self->{everykey} = undef $self->{everykey_lc} = undef; return; } =head2 has_everykey Returns a boolean to say if we've seen a key in any datasource for this section. This used to be an array ref which was checked using first() and it was twenty times slower. =cut sub has_everykey { my ($self, $key) = @_; return $self->{everykey}{$key} ? 1 : 0; } =head2 set_allkeys Sets flag to say citekey '*' occurred in citekeys We allow setting it to false too because it's useful in tests =cut sub set_allkeys { my ($self, $val) = @_; $self->{allkeys} = $val; return; } =head2 is_allkeys Checks flag which says citekey '*' occurred in citekeys =cut sub is_allkeys { my $self = shift; return $self->{allkeys}; } =head2 bibentry Returns a Biber::Entry object for the given citation key Understands citekey aliases =cut sub bibentry { my ($self, $key) = @_; if (my $realkey = $self->get_citekey_alias($key)) { return $self->bibentries->entry($realkey); } else { return $self->bibentries->entry($key); } } =head2 bibentries Return Biber::Entries object for this section =cut sub bibentries { my $self = shift; return $self->{bibentries}; } =head2 del_bibentries Delete all Biber::Entry objects from the Biber::Section object =cut sub del_bibentries { my $self = shift; $self->{bibentries} = new Biber::Entries; return; } =head2 set_citekeys Sets the citekeys in a Biber::Section object =cut sub set_citekeys { my $self = shift; my $keys = shift; map { $self->{citekeys_h}{$_} = 1} $keys->@*; $self->{citekeys} = $keys; return; } =head2 set_orig_order_citekeys Sets the original order of citekeys in a Biber::Section object =cut sub set_orig_order_citekeys { my $self = shift; my $keys = shift; $self->{orig_order_citekeys} = $keys; return; } =head2 get_citekeys Gets the citekeys of a Biber::Section object Returns a normal array =cut sub get_citekeys { my $self = shift; return $self->{citekeys}->@*; } =head2 get_static_citekeys Gets the citekeys of a Biber::Section object excluding dynamic set entry keys Returns a normal array =cut sub get_static_citekeys { my $self = shift; return reduce_array($self->{citekeys}, $self->dynamic_set_keys); } =head2 has_cited_citekey Returns true when $key was one of the actually cited keys in the section =cut sub has_cited_citekey { my $self = shift; my $key = shift; return $self->{citekeys_h}{$key} ? 1 : 0; } =head2 add_undef_citekey Adds a citekey to the Biber::Section object as an undefined key. This allows us to output this information to the .bbl and so biblatex can do better reporting to external utils like latexmk =cut sub add_undef_citekey { my $self = shift; my $key = shift; push $self->{undef_citekeys}->@*, $key; return; } =head2 get_undef_citekeys Gets the list of undefined citekeys of a Biber::Section object Returns a normal array =cut sub get_undef_citekeys { my $self = shift; return $self->{undef_citekeys}->@*; } =head2 get_orig_order_citekeys Gets the citekeys of a Biber::Section object in their original order This is just to ensure we have a method that will return this, just in case we mess about with the order at some point. This is needed by citeorder sorting. =cut sub get_orig_order_citekeys { my $self = shift; return $self->{orig_order_citekeys}->@*; } =head2 has_citekey Returns true when $key is in the Biber::Section object Understands key alaises =cut sub has_citekey { my $self = shift; my $key = shift; return $self->{citekeys_h}{$self->get_citekey_alias($key) || $key} ? 1 : 0; } =head2 del_citekey Deletes a citekey from a Biber::Section object =cut sub del_citekey { my $self = shift; my $key = shift; return unless $self->has_citekey($key); $self->{citekeys} = [ grep {$_ ne $key} $self->{citekeys}->@* ]; $self->{orig_order_citekeys} = [ grep {$_ ne $key} $self->{orig_order_citekeys}->@* ]; delete $self->{citekeys_h}{$key}; return; } =head2 del_citekeys Deletes all citekeys from a Biber::Section object =cut sub del_citekeys { my $self = shift; $self->{citekeys} = []; $self->{citekeys_h} = {}; $self->{orig_order_citekeys} = []; return; } =head2 add_citekeys Adds citekeys to the Biber::Section object =cut sub add_citekeys { my $self = shift; my @keys = @_; foreach my $key (@keys) { next if $self->has_citekey($key); $self->{citekeys_h}{$key} = 1; push $self->{citekeys}->@*, $key; push $self->{orig_order_citekeys}->@*, $key; } return; } =head2 set_citekey_alias Set citekey alias information =cut sub set_citekey_alias { my $self = shift; my ($alias, $key) = @_; $self->{citekey_alias}{$alias} = $key; return; } =head2 get_citekey_alias Get citekey alias information =cut sub get_citekey_alias { my $self = shift; my $alias = shift; return $self->{citekey_alias}{$alias}; } =head2 del_citekey_alias Delete citekey alias =cut sub del_citekey_alias { my $self = shift; my $alias = shift; delete($self->{citekey_alias}{$alias}); return; } =head2 get_citekey_aliases Get a list of all citekey aliases for the section =cut sub get_citekey_aliases { my $self = shift; return ( keys $self->{citekey_alias}->%* ); } =head2 set_labelcache_v Sets the variable label disambiguation cache for a field =cut sub set_labelcache_v { my ($self, $field, $cache) = @_; $self->{labelcache_v}{$field} = $cache; return; } =head2 get_labelcache_v Gets the variable label disambiguation cache for a field =cut sub get_labelcache_v { my ($self, $field) = @_; return $self->{labelcache_v}{$field}; } =head2 set_labelcache_l Sets the list label disambiguation cache for a field =cut sub set_labelcache_l { my ($self, $field, $cache) = @_; $self->{labelcache_l}{$field} = $cache; return; } =head2 get_labelcache_l Gets the list label disambiguation cache for a field =cut sub get_labelcache_l { my ($self, $field) = @_; return $self->{labelcache_l}{$field}; } =head2 is_dynamic_set Test if a key is a dynamic set =cut sub is_dynamic_set { my $self = shift; my $dkey = shift; return defined($self->{dkeys}{$dkey}) ? 1 : 0; } =head2 set_dynamic_set Record a mapping of dynamic key to member keys =cut sub set_dynamic_set { my $self = shift; my $dkey = shift; my @members = @_; $self->{dkeys}{$dkey} = \@members; return; } =head2 get_dynamic_set Retrieve member keys for a dynamic set key Check that reference returning anything to stop spurious warnings about empty dereference in return. =cut sub get_dynamic_set { my $self = shift; my $dkey = shift; if (my $set_members = $self->{dkeys}{$dkey}) { return $set_members->@*; } else { return (); } } =head2 dynamic_set_keys Retrieve all dynamic set keys =cut sub dynamic_set_keys { my $self = shift; return [keys $self->{dkeys}->%*]; } =head2 has_dynamic_sets Returns true of false depending on whether the section has any dynamic set keys =cut sub has_dynamic_sets { my $self = shift; return defined($self->{dkeys}) ? 1 : 0; } =head2 add_datasource Adds a data source to a section =cut sub add_datasource { my $self = shift; my $source = shift; push $self->{datasources}->@*, $source; return; } =head2 set_datasources Sets the data sources for a section =cut sub set_datasources { my $self = shift; my $sources = shift; $self->{datasources} = $sources; return; } =head2 get_datasources Gets an array of data sources for this section =cut sub get_datasources { my $self = shift; if (exists($self->{datasources})) { return $self->{datasources}; } else { return undef; } } =head2 number Gets the section number of a Biber::Section object =cut sub number { my $self = shift; return $self->{number}; } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Constants.pm000444000153000001 6636313205066062 17777 0ustar00vboxother000000000000package Biber::Constants; use v5.24; use strict; use warnings; use Encode; use Encode::Alias; use parent qw(Exporter); use Biber::Date::Format; use Text::CSV; our @EXPORT = qw{ $CONFIG_DEFAULT_BIBER $CONFIG_CSV_PARSER $BIBER_CONF_NAME $BCF_VERSION $BBL_VERSION $BIBER_SORT_FINAL $BIBER_SORT_NULL $LABEL_FINAL %CONFIG_DEFAULT_BIBLATEX %CONFIG_OPTSCOPE_BIBLATEX %CONFIG_SCOPEOPT_BIBLATEX %CONFIG_OPTTYPE_BIBLATEX %CONFIG_BIBLATEX_ENTRY_OPTIONS %CONFIG_BIBLATEX_NAMELIST_OPTIONS %CONFIG_BIBLATEX_NAME_OPTIONS %CONFIG_META_MARKERS %CONFIG_DATE_PARSERS %DATAFIELD_SETS %DM_DATATYPES %LOCALE_MAP %LOCALE_MAP_R %REMOTE_MAP %DS_EXTENSIONS %UNIQUENAME_CONTEXTS %UNIQUENAME_VALUES }; # Version of biblatex control file which this release expects. Matched against version # passed in control file. Used when checking the .bcf our $BCF_VERSION = '3.4'; # Format version of the .bbl. Used when writing the .bbl our $BBL_VERSION = '2.9'; # Global flags needed for sorting our $BIBER_SORT_FINAL; our $BIBER_SORT_NULL; # the name of the Biber configuration file, which should be # either returned by kpsewhich or located at "$HOME/.$BIBER_CONF_NAME" our $BIBER_CONF_NAME = 'biber.conf'; ## Biber CONFIGURATION DEFAULTS # Locale - if nothing, set a default my $locale; unless ($locale) { if ( $^O =~ /Win/) { $locale = 'English_United States.1252'; } else { $locale = 'en_US.UTF-8'; } } # datafieldsets our %DATAFIELD_SETS = (); # datatypes for data model validation our %DM_DATATYPES = ( integer => qr/\A\d+\z/xms, datepart => qr/\A\d+\z/xms ); # Mapping of data source and output types to extensions our %DS_EXTENSIONS = ( bbl => 'bbl', bblxml => 'bblxml', bibtex => 'bib', biblatexml => 'bltxml' ); # Mapping of biblatex uniquename option to disambiguation level our %UNIQUENAME_CONTEXTS = (0 => 'none', # false 1 => 'init', # init 2 => 'initorfull', # full/true 3 => 'init', # allinit 4 => 'initorfull', # allfull 5 => 'init', # mininit 6 => 'initorfull'); # minfull # Mapping of strings to numeric uniquename values for easier biblatex processing our %UNIQUENAME_VALUES = ('none' => 0, 'init' => 1, full => '2'); # Biber option defaults. Mostly not needed outside of tool mode since they are passed by .bcf our $CONFIG_DEFAULT_BIBER = { annotation_marker => { content => q/+an/ }, clrmacros => { content => 0 }, collate_options => { option => {level => 4, variable => 'non-ignorable', normalization => 'prenormalized' }}, graph => { content => 0 }, debug => { content => 0 }, dieondatamodel => { content => 0 }, decodecharsset => { content => 'base' }, dot_include => { option => {section => 1, xdata => 1, crossref => 1, xref => 1 }}, fixinits => { content => 0 }, input_encoding => { content => 'UTF-8' }, input_format => { content => 'bibtex' }, isbn10 => { content => 0 }, isbn13 => { content => 0 }, isbn_normalise => { content => 0 }, listsep => { content => 'and' }, mincrossrefs => { content => 2 }, minxrefs => { content => 2 }, namesep => { content => 'and' }, no_bblxml_schema => { content => 0 }, no_bltxml_schema => { content => 0 }, nodieonerror => { content => 0 }, noinit => { option => [ {value => q/\b\p{Ll}{2}\p{Pd}/}, {value => q/[\x{2bf}\x{2018}]/} ] }, nolabel => { option => [ {value => q/[\p{P}\p{S}\p{C}]+/} ] }, # nolabelwidthcount => { option => }, # default is nothing nolog => { content => 0 }, nostdmacros => { content => 0 }, nosort => { option => [ { name => 'setnames', value => q/\A\p{L}{2}\p{Pd}/ }, { name => 'setnames', value => q/[\x{2bf}\x{2018}]/ } ] }, onlylog => { content => 0 }, others_string => { content => 'others' }, output_align => { content => 0 }, output_annotation_marker => { content => '+an' }, output_encoding => { content => 'UTF-8' }, output_field_order => { content => 'options,abstract,names,lists,dates' }, output_format => { content => 'bbl' }, output_indent => { content => '2' }, output_fieldcase => { content => 'upper' }, output_listsep => { content => 'and' }, output_namesep => { content => 'and' }, output_resolve_xdata => { content => 0 }, output_resolve_crossrefs => { content => 0 }, output_resolve_sets => { content => 0 }, output_safechars => { content => 0 }, output_safecharsset => { content => 'base' }, output_xnamesep => { content => '=' }, quiet => { content => 0 }, noskipduplicates => { content => 0 }, sortdebug => { content => 0 }, sortcase => { content => 1 }, sortupper => { content => 1 }, strip_comments => { content => 0 }, tool => { content => 0 }, trace => { content => 0 }, nouri_encode => { content => 0 }, validate_bblxml => { content => 0 }, validate_bltxml => { content => 0 }, validate_config => { content => 0 }, validate_control => { content => 0 }, validate_datamodel => { content => 0 }, wraplines => { content => 0 }, xnamesep => { content => '=' }, xsvsep => { content => q/\s*,\s*/ }, }; # Set up some re-usable CSV parsers here for efficiency reasons our $CONFIG_CSV_PARSER = Text::CSV->new ( { binary => 1, allow_whitespace => 1, always_quote => 1 } ); # Set up some re-usable Date parsers here for efficiency reasons # We need two as the missing component data is in these objects, not # in the DT objects returned by ->parse_datetime() and this data will # likely be different for start/end our %CONFIG_DATE_PARSERS = ('start' => Biber::Date::Format->new(), 'end' => Biber::Date::Format->new()); our %CONFIG_META_MARKERS = (); # default global options for biblatex # Used to set: # * Some tool-mode defaults (as there is no .bcf and some biblatex options # cannot be set in a biber config file) our %CONFIG_DEFAULT_BIBLATEX = ( sortingtemplatename => 'tool', useauthor => 1, useeditor => 1, usetranslator => 1, maxbibnames => 100, maxitems => 100, minbibnames => 100, maxalphanames => 100, maxcitenames => 100, minalphanames => 100, mincitenames => 100, minitems => 100, useprefix => 0 ); # Set up some encoding aliases to map \inputen{c,x} encoding names to Encode # It seems that inputen{c,x} has a different idea of nextstep than Encode # so we push it to MacRoman define_alias('ansinew' => 'cp1252'); # inputenc alias for cp1252 define_alias('applemac' => 'MacRoman'); define_alias('applemacce' => 'MacCentralEurRoman'); define_alias('next' => 'MacRoman'); define_alias('x-mac-roman' => 'MacRoman'); define_alias('x-mac-centeuro' => 'MacCentralEurRoman'); define_alias('x-mac-cyrillic' => 'MacCyrillic'); define_alias('x-nextstep' => 'MacRoman'); define_alias('x-ascii' => 'ascii'); # Encode doesn't resolve this one by default define_alias('lutf8' => 'UTF-8'); # Luatex define_alias('utf8x' => 'UTF-8'); # UCS (old) # maps between bcp47 lang/locales and babel/polyglossia language names our %LOCALE_MAP = ( 'acadian' => 'fr-CA', 'american' => 'en-US', 'australian' => 'en-AU', 'afrikaans' => 'af-ZA', 'albanian' => 'sq-AL', 'amharic' => 'am-ET', 'arabic' => 'ar-001', 'armenian' => 'hy-AM', 'asturian' => 'ast-ES', 'austrian' => 'de-AT', 'bahasa' => 'id-ID', 'bahasai' => 'id-ID', 'bahasam' => 'id-ID', 'basque' => 'eu-ES', 'bengali' => 'bn-BD', 'bgreek' => 'el-GR', 'brazil' => 'pt-BR', 'brazilian' => 'pt-BR', 'breton' => 'br-FR', 'british' => 'en-GB', 'bulgarian' => 'bg-BG', 'canadian' => 'en-CA', 'canadien' => 'fr-CA', 'catalan' => 'ca-AD', 'coptic' => 'cop', 'croatian' => 'hr-HR', 'czech' => 'cs-CZ', 'danish' => 'da-DK', 'divehi' => 'dv-MV', 'dutch' => 'nl-NL', 'english' => 'en-US', 'esperanto' => 'eo-001', 'estonian' => 'et-EE', 'ethiopia' => 'am-ET', 'farsi' => 'fa-IR', 'finnish' => 'fi-FI', 'francais' => 'fr-FR', 'french' => 'fr-FR', 'frenchle' => 'fr-FR', 'friulan' => 'fur-IT', 'galician' => 'gl-ES', 'german' => 'de-DE', 'germanb' => 'de-DE', 'greek' => 'el-GR', 'hebrew' => 'he-IL', 'hindi' => 'hi-IN', 'ibygreek' => 'el-CY', 'icelandic' => 'is-IS', 'indon' => 'id-ID', 'indonesia' => 'id-ID', 'interlingua' => 'ia-FR', 'irish' => 'ga-IE', 'italian' => 'it-IT', 'japanese' => 'ja-JP', 'kannada' => 'kn-IN', 'lao' => 'lo-LA', 'latin' => 'la-Latn', 'latvian' => 'lv-LV', 'lithuanian' => 'lt-LT', 'lowersorbian' => 'dsb-DE', 'lsorbian' => 'dsb-DE', 'magyar' => 'hu-HU', 'malay' => 'id-ID', 'malayalam' => 'ml-IN', 'marathi' => 'mr-IN', 'meyalu' => 'id-ID', 'mongolian' => 'mn-Cyrl', 'naustrian' => 'de-AT', 'newzealand' => 'en-NZ', 'ngerman' => 'de-DE', 'nko' => 'ha-NG', 'norsk' => 'nb-NO', 'norwegian' => 'nn-NO', 'nynorsk' => 'nn-NO', 'occitan' => 'oc-FR', 'piedmontese' => 'pms-IT', 'pinyin' => 'pny', 'polish' => 'pl-PL', 'polutonikogreek' => 'el-GR', 'portuges' => 'pt-PT', 'portuguese' => 'pt-PT', 'romanian' => 'ro-RO', 'romansh' => 'rm-CH', 'russian' => 'ru-RU', 'samin' => 'se-NO', 'sanskrit' => 'sa-IN', 'scottish' => 'gd-GB', 'serbian' => 'sr-Latn', 'serbianc' => 'sr-Cyrl', 'slovak' => 'sk-SK', 'slovene' => 'sl-SI', 'slovenian' => 'sl-SI', 'spanish' => 'es-ES', 'swedish' => 'sv-SE', 'swiss' => 'de-CH', 'swissgerman' => 'de-CH', 'nswissgerman' => 'de-CH', 'syriac' => 'syc', 'tamil' => 'ta-IN', 'telugu' => 'te-IN', 'thai' => 'th-TH', 'thaicjk' => 'th-TH', 'tibetan' => 'bo-CN', 'turkish' => 'tr-TR', 'turkmen' => 'tk-TM', 'ukrainian' => 'uk-UA', 'urdu' => 'ur-IN', 'UKenglish' => 'en-UK', 'uppersorbian' => 'hsb-DE', 'USenglish' => 'en-US', 'usorbian' => 'hsb-DE', 'vietnamese' => 'vi-VN', 'welsh' => 'cy-GB', ); our %LOCALE_MAP_R = ( 'af' => 'afrikaans', 'af-ZA' => 'afrikaans', 'am' => 'ethiopia', 'am-ET' => 'amharic', 'ar' => 'arabic', 'ar-001' => 'arabic', 'ast' => 'asturian', 'ast-ES' => 'asturian', 'bg' => 'bulgarian', 'bg-BG' => 'bulgarian', 'bn' => 'bengali', 'bn-BD' => 'bengali', 'bo' => 'tibetan', 'bo-CN' => 'tibetan', 'br' => 'breton', 'br-FR' => 'breton', 'ca' => 'catalan', 'ca-AD' => 'catalan', 'ca-ES' => 'catalan', 'cop' => 'coptic', 'cs' => 'czech', 'cs-CZ' => 'czech', 'cy' => 'welsh', 'cy-GB' => 'welsh', 'da' => 'danish', 'da-DK' => 'danish', 'de-1996' => 'ngerman', 'de-AT' => 'austrian', 'de-AT-1996' => 'naustrian', 'de-CH' => 'swissgerman', 'de-CH-1996' => 'nswissgerman', 'de-DE' => 'german', 'de-DE-1996' => 'ngerman', 'dsb' => 'lowersorbian', 'dsb-DE' => 'lowersorbian', 'dv' => 'divehi', 'dv-MV' => 'divehi', 'el' => 'greek', 'el-CY' => 'ibygreek', 'el-GR' => 'greek', 'en' => 'english', 'en-AU' => 'australian', 'en-CA' => 'canadian', 'en-UK' => 'UKenglish', 'en-GB' => 'british', 'en-NZ' => 'newzealand', 'en-US' => 'USenglish', 'en-US' => 'american', 'en-US' => 'english', 'eo' => 'esperanto', 'eo-001' => 'esperanto', 'es' => 'spanish', 'es-ES' => 'spanish', 'et' => 'estonian', 'et-EE' => 'estonian', 'eu' => 'basque', 'eu-ES' => 'basque', 'fa' => 'farsi', 'fa-IR' => 'farsi', 'fi' => 'finnish', 'fi-FI' => 'finnish', 'fr' => 'french', 'fr-CA' => 'acadian', 'fr-CA' => 'canadien', 'fr-FR' => 'french', 'fur' => 'friulan', 'fur-IT' => 'friulan', 'ga' => 'irish', 'ga-IE' => 'irish', 'gd' => 'scottish', 'gd-GB' => 'scottish', 'gl' => 'galician', 'gl-ES' => 'galician', 'ha' => 'nko', 'ha-NG' => 'nko', 'he' => 'hebrew', 'he-IL' => 'hebrew', 'hi' => 'hindi', 'hi-IN' => 'hindi', 'hr' => 'croatian', 'hr-HR' => 'croatian', 'hsb' => 'uppersorbian', 'hsb-DE' => 'uppersorbian', 'hu' => 'magyar', 'hu-HU' => 'magyar', 'hy' => 'armenian', 'hy-AM' => 'armenian', 'ia' => 'interlingua', 'ia-FR' => 'interlingua', 'id' => 'indonesia', 'is' => 'icelandic', 'is-IS' => 'icelandic', 'it' => 'italian', 'it-IT' => 'italian', 'ja' => 'japanese', 'ja-JP' => 'japanese', 'kn' => 'kannada', 'kn-IN' => 'kannada', 'lo' => 'lao', 'lo-LA' => 'lao', 'lt' => 'lithuanian', 'lt-LT' => 'lithuanian', 'lv' => 'latvian', 'lv-LV' => 'latvian', 'ml' => 'malayalam', 'ml-IN' => 'malayalam', 'mn' => 'mongolian', 'mn-Cyrl' => 'mongolian', 'mr' => 'marathi', 'mr-IN' => 'marathi', 'nb' => 'norsk', 'nb-NO' => 'norsk', 'nl' => 'dutch', 'nl-NL' => 'dutch', 'nn' => 'nynorsk', 'nn-NO' => 'nynorsk', 'oc' => 'occitan', 'oc-FR' => 'occitan', 'pl' => 'polish', 'pl-PL' => 'polish', 'pms' => 'piedmontese', 'pms-IT' => 'piedmontese', 'pny' => 'pinyin', 'pt' => 'portuguese', 'pt-BR' => 'brazilian', 'pt-PT' => 'portuguese', 'rm' => 'romansh', 'rm-CH' => 'romansh', 'ro' => 'romanian', 'ro-RO' => 'romanian', 'ru' => 'russian', 'ru-RU' => 'russian', 'sa' => 'sanskrit', 'sa-IN' => 'sanskrit', 'se' => 'samin', 'se-NO' => 'samin', 'sk' => 'slovak', 'sk-SK' => 'slovak', 'sl' => 'slovenian', 'sl-SI' => 'slovenian', 'sq' => 'albanian', 'sq-AL' => 'albanian', 'sr' => 'serbian', 'sr-Cyrl' => 'serbian', 'sr-Latn' => 'latin', 'sv' => 'swedish', 'sv-SE' => 'swedish', 'syc' => 'syriac', 'ta' => 'tamil', 'ta-IN' => 'tamil', 'te' => 'telugu', 'te-IN' => 'telugu', 'th' => 'thai', 'th-TH' => 'thai', 'tk' => 'turkmen', 'tk-TM' => 'turkmen', 'tr' => 'turkish', 'tr-TR' => 'turkish', 'uk' => 'ukrainian', 'uk-UA' => 'ukrainian', 'ur' => 'urdu', 'ur-IN' => 'urdu', 'vi' => 'vietnamese', 'vi-VN' => 'vietnamese', ); # Holds the scope of each of the BibLaTeX configuration options from the .bcf our %CONFIG_OPTSCOPE_BIBLATEX; # Holds the options in a particular scope our %CONFIG_SCOPEOPT_BIBLATEX; # Holds the datatype of an option at a particular scope our %CONFIG_OPTTYPE_BIBLATEX; # For per-entry options, what should be set when we find them and # what should be output to the .bbl for biblatex. # Basically, here we have to emulate relevant parts of biblatex's options processing # for local entry-specific options, note therefore the presence here of some # options like max/mincitenames which are not passed in the .bcf our %CONFIG_BIBLATEX_ENTRY_OPTIONS = ( dataonly => {OUTPUT => 1, INPUT => {skiplab => 1, skipbiblist => 1, uniquename => 0, uniquelist => 0} }, maxitems => {OUTPUT => 1}, minitems => {OUTPUT => 1}, maxbibnames => {OUTPUT => 1}, minbibnames => {OUTPUT => 1}, maxcitenames => {OUTPUT => 1}, mincitenames => {OUTPUT => 1}, maxalphanames => {OUTPUT => 0}, minalphanames => {OUTPUT => 0}, maxnames => {OUTPUT => ['maxcitenames', 'maxbibnames'], INPUT => ['maxcitenames', 'maxbibnames']}, minnames => {OUTPUT => ['mincitenames', 'minbibnames'], INPUT => ['mincitenames', 'minbibnames']}, nametemplates => {OUTPUT => ['sortingnamekeytemplatename', 'uniquenametemplatename', 'labelalphanametemplatename'], INPUT => ['sortingnamekeytemplatename', 'uniquenametemplatename', 'labelalphanametemplatename']}, noinherit => {OUTPUT => 0}, presort => {OUTPUT => 0}, skipbib => {OUTPUT => 1}, skipbiblist => {OUTPUT => 1}, skiplab => {OUTPUT => 1}, sortingnamekeytemplatename => {OUTPUT => 1}, uniquenametemplatename => {OUTPUT => 1}, labelalphanametemplatename => {OUTPUT => 1}, uniquelist => {OUTPUT => 0}, useauthor => {OUTPUT => 1}, useeditor => {OUTPUT => 1}, useprefix => {OUTPUT => 1}, usetranslator => {OUTPUT => 1}, ); our %CONFIG_BIBLATEX_NAMELIST_OPTIONS = ( nametemplates => {OUTPUT => ['sortingnamekeytemplatename', 'uniquenametemplatename', 'labelalphanametemplatename'], INPUT => ['sortingnamekeytemplatename', 'uniquenametemplatename', 'labelalphanametemplatename']}, ); our %CONFIG_BIBLATEX_NAME_OPTIONS = ( nametemplates => {OUTPUT => ['sortingnamekeytemplatename', 'uniquenametemplatename', 'labelalphanametemplatename'], INPUT => ['sortingnamekeytemplatename', 'uniquenametemplatename', 'labelalphanametemplatename']}, ); 1; __END__ =pod =encoding utf-8 =head1 NAME Biber::Constants - global constants for biber =head1 AUTHOR François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Entry.pm000444000153000001 5540213205066061 17113 0ustar00vboxother000000000000package Biber::Entry; use v5.24; use strict; use warnings; use Biber::Utils; use Biber::Internals; use Biber::Constants; use Data::Dump qw( pp ); use Digest::MD5 qw( md5_hex ); use Encode; use Log::Log4perl qw( :no_extra_logdie_message ); use List::Util qw( first ); my $logger = Log::Log4perl::get_logger('main'); =encoding utf-8 =head1 NAME Biber::Entry =head2 new Initialize a Biber::Entry object There are three types of field possible in an entry: * data - These are fields which derive directly from or are themselves fields in the data source. Things like YEAR, MONTH, DAY etc. are such fields which are derived from, for example, the DATE field. They are part of the original data implicitly, derived from a field. * derived - These are fields, often meta-information like labelname, labelalpha etc. which are more removed from the data fields. The reason for this division is largely the entry cloning required for the related entry and inheritance features. When we clone an entry or copy some fields from one entry to another we generally don't want the "derived" category as such derived meta-fields will often need to be re-created or ignored so we need to know which are the actual "data" fields to copy/clone. =cut sub new { my $class = shift; my $obj = shift; my $self; if (defined($obj) and ref($obj) eq 'HASH') { $self = bless $obj, $class; } else { $self = bless {}, $class; } return $self; } =head2 relclone Recursively create related entry clones starting with an entry =cut sub relclone { my $self = shift; my $citekey = $self->get_field('citekey'); my $secnum = $Biber::MASTER->get_current_section; my $section = $Biber::MASTER->sections->get_section($secnum); my $dmh = Biber::Config->get_dm_helpers; if (my $relkeys = $self->get_field('related')) { if ($logger->is_debug()) {# performance tune $logger->debug("Found RELATED field in '$citekey' with contents " . join(',', @$relkeys)); } my @clonekeys; foreach my $relkey (@$relkeys) { # Resolve any alias my $nrelkey = $section->get_citekey_alias($relkey) // $relkey; if ($logger->is_debug()) {# performance tune $logger->debug("Resolved RELATED key alias '$relkey' to '$nrelkey'") if $relkey ne $nrelkey; $logger->debug("Looking at RELATED key '$relkey'"); } $relkey = $nrelkey; # Loop avoidance, in case we are back in an entry again in the guise of a clone # We can record the related clone but don't create it again if (my $ck = $section->get_keytorelclone($relkey)) { if ($logger->is_debug()) {# performance tune $logger->debug("Found RELATED key '$relkey' already has clone '$ck'"); } push @clonekeys, $ck; # Save graph information if requested if (Biber::Config->getoption('output_format') eq 'dot') { Biber::Config->set_graph('related', $ck, $relkey, $citekey); } } else { my $relentry = $section->bibentry($relkey); # Digest::MD5 can't deal with straight UTF8 so encode it first (via NFC as this is "output") my $clonekey = md5_hex(encode_utf8($relkey)); push @clonekeys, $clonekey; my $relclone = $relentry->clone($clonekey); if ($logger->is_debug()) {# performance tune $logger->debug("Created new related clone for '$relkey' with clone key '$clonekey'"); } # *datesplit is a special non datafield and needs to be copied for things like era # output foreach my $df ($dmh->{datefields}->@*) { $df =~ s/date$//; if (my $ds = $self->get_field("${df}datesplit")) { $relclone->set_field("${df}datesplit", $ds); } } # Set related clone options if (my $relopts = $self->get_field('relatedoptions')) { # Check if this clone was also directly cited. If so, set skipbib/skipbiblist # if they are unset as otherwise this entry would appear twice in bibliographies # but with different keys. if ($section->has_citekey($relkey)) { $relopts = remove_entry_options($relopts, {skipbib => 1, skipbiblist => 1}); push @$relopts, ('skipbib=true', 'skipbiblist=true'); } process_entry_options($clonekey, $relopts); $relclone->set_datafield('options', $relopts); } else { process_entry_options($clonekey, ['skiplab','skipbiblist','uniquename=0','uniquelist=0']); # Preserve options already in the clone but add 'dataonly' $relclone->set_datafield('options', [ 'dataonly', @{$relclone->get_datafield('options') || []} ]); } $section->bibentries->add_entry($clonekey, $relclone); $section->keytorelclone($relkey, $clonekey); # Save graph information if requested if (Biber::Config->getoption('output_format') eq 'dot') { Biber::Config->set_graph('related', $clonekey, $relkey, $citekey); } # recurse so we can do cascading related entries if ($logger->is_debug()) {# performance tune $logger->debug("Recursing into RELATED entry '$clonekey'"); } $relclone->relclone; } } # point to clone keys and add to citekeys # We have to add the citekeys as we need these clones in the .bbl # but the dataonly will cause biblatex not to print them in the bib $section->add_citekeys(@clonekeys); $self->set_datafield('related', [ @clonekeys ]); } } =head2 clone Clone a Biber::Entry object and return a copy Accepts optionally a key for the copy =cut sub clone { my ($self, $newkey) = @_; my $new = new Biber::Entry; while (my ($k, $v) = each(%{$self->{datafields}})) { $new->{datafields}{$k} = $v; } while (my ($k, $v) = each(%{$self->{origfields}})) { $new->{origfields}{$k} = $v; } # Need to add entrytype and datatype $new->{derivedfields}{entrytype} = $self->{derivedfields}{entrytype}; $new->{derivedfields}{datatype} = $self->{derivedfields}{datatype}; # put in key if specified if ($newkey) { $new->{derivedfields}{citekey} = $newkey; } # Record the key of the source of the clone in the clone. Useful for loop detection etc. # in biblatex $new->{derivedfields}{clonesourcekey} = $self->get_field('citekey'); return $new; } =head2 notnull Test for an empty object =cut sub notnull { my $self = shift; my @arr = keys %$self; return $#arr > -1 ? 1 : 0; } =head2 set_labelname_info Record the labelname information. This is special meta-information so we have a separate method for this Takes a hash ref with the information. =cut sub set_labelname_info { my ($self, $data) = @_; $self->{labelnameinfo} = $data; return; } =head2 get_labelname_info Retrieve the labelname information. This is special meta-information so we have a separate method for this Returns a hash ref with the information. =cut sub get_labelname_info { my $self = shift; return $self->{labelnameinfo}; } =head2 set_labelnamefh_info Record the fullhash labelname information. This is special meta-information so we have a separate method for this Takes a hash ref with the information. =cut sub set_labelnamefh_info { my ($self, $data) = @_; $self->{labelnamefhinfo} = $data; return; } =head2 get_labelnamefh_info Retrieve the fullhash labelname information. This is special meta-information so we have a separate method for this Returns a hash ref with the information. =cut sub get_labelnamefh_info { my $self = shift; return $self->{labelnamefhinfo}; } =head2 set_labeltitle_info Record the labeltitle information. This is special meta-information so we have a separate method for this Takes a hash ref with the information. =cut sub set_labeltitle_info { my ($self, $data) = @_; $self->{labeltitleinfo} = $data; return; } =head2 get_labeltitle_info Retrieve the labeltitle information. This is special meta-information so we have a separate method for this Returns a hash ref with the information. =cut sub get_labeltitle_info { my $self = shift; return $self->{labeltitleinfo}; } =head2 set_labeldate_info Record the labeldate information. This is special meta-information so we have a separate method for this Takes a hash ref with the information. =cut sub set_labeldate_info { my ($self, $data) = @_; $self->{labeldateinfo} = $data; return; } =head2 get_labeldate_info Retrieve the labeldate information. This is special meta-information so we have a separate method for this Returns a hash ref with the information. =cut sub get_labeldate_info { my $self = shift; return $self->{labeldateinfo}; } =head2 set_field Set a derived field for a Biber::Entry object, that is, a field which was not an actual bibliography field =cut sub set_field { my ($self, $key, $val) = @_; # All derived fields can be null $self->{derivedfields}{$key} = $val; return; } =head2 get_field Get a field for a Biber::Entry object Uses // as fields can be null (end dates etc). =cut sub get_field { my ($self, $key) = @_; return undef unless $key; return $self->{datafields}{$key} // $self->{derivedfields}{$key}; } =head2 set_datafield Set a field which is in the .bib data file =cut sub set_datafield { my ($self, $key, $val) = @_; $self->{datafields}{$key} = $val; return; } =head2 get_datafield Get a field that was in the original data file =cut sub get_datafield { my ($self, $key) = @_; return $self->{datafields}{$key}; } =head2 del_field Delete a field in a Biber::Entry object =cut sub del_field { my ($self, $key) = @_; delete $self->{datafields}{$key}; delete $self->{derivedfields}{$key}; return; } =head2 del_datafield Delete an original data source data field in a Biber::Entry object =cut sub del_datafield { my ($self, $key) = @_; delete $self->{datafields}{$key}; return; } =head2 field_exists Check whether a field exists (even if null) =cut sub field_exists { my ($self, $key) = @_; return (exists($self->{datafields}{$key}) || exists($self->{derivedfields}{$key})) ? 1 : 0; } =head2 date_fields_exist Check whether any parts of a date field exist when passed a datepart field name =cut sub date_fields_exist { my ($self, $field) = @_; my $t = $field =~ s/(?:end)?(?:year|month|day|hour|minute|second|season|timezone)$//r; foreach my $dp ('year', 'month', 'day', 'hour', 'minute', 'second', 'season', 'timezone') { if (exists($self->{datafields}{"$t$dp"}) or exists($self->{datafields}{"${t}end$dp"})) { return 1; } } return 0; } =head2 datafields Returns a sorted array of the fields which came from the data source =cut sub datafields { my $self = shift; use locale; return sort keys %{$self->{datafields}}; } =head2 count_datafields Returns the number of datafields =cut sub count_datafields { my $self = shift; return keys %{$self->{datafields}}; } =head2 derivedfields Returns a sorted array of the fields which were added during processing =cut sub derivedfields { my $self = shift; use locale; return sort keys %{$self->{derivedfields}}; } =head2 fields Returns a sorted array of all field names, including ones added during processing which are not necessarily fields which came from the data file =cut sub fields { my $self = shift; use locale; my %keys = (%{$self->{derivedfields}}, %{$self->{datafields}}); return sort keys %keys; } =head2 count_fields Returns the number of fields =cut sub count_fields { my $self = shift; my %keys = (%{$self->{derivedfields}}, %{$self->{datafields}}); return keys %keys; } =head2 has_keyword Check if a Biber::Entry object has a particular keyword in in the KEYWORDS field. =cut sub has_keyword { no autovivification; my $self = shift; my $keyword = shift; if (my $keywords = $self->{datafields}{keywords}) { return (first {$_ eq $keyword} @$keywords) ? 1 : 0; } else { return 0; } return undef; # shouldn't get here } =head2 add_warning Append a warning to a Biber::Entry object =cut sub add_warning { my ($self, $warning) = @_; push $self->{derivedfields}{warnings}->@*, $warning; return; } =head2 set_inherit_from Inherit fields from first child entry $entry->set_inherit_from($firstchild); Takes a second Biber::Entry object as argument The purpose here is to inherit fields so that sorting/labelling defaults can be generated for set parents from the first child set member data, unless the set parent itself already has some fields set that will do this. Set parents only have certain fields output in the .bbl and those that output but are not used in sorting/labelling data generation should not be inherited. =cut sub set_inherit_from { my ($self, $parent) = @_; my $dmh = Biber::Config->get_dm_helpers; # Data source fields foreach my $field ($parent->datafields) { next if $self->field_exists($field); # Don't overwrite existing fields # Annotations are allowed for set parents themselves so never inherit these. # This can't be suppressed at .bbl writing as it is impossible to know there # whether the field came from the parent or first child because inheritance # is a low-level operation on datafields next if fc($field) eq fc('annotation'); $self->set_datafield($field, $parent->get_field($field)); } # Datesplit is a special non datafield and needs to be inherited for any # validation checks which may occur later foreach my $df ($dmh->{datefields}->@*) { $df =~ s/date$//; if (my $ds = $parent->get_field("${df}datesplit")) { $self->set_field("${df}datesplit", $ds); } } return; } =head2 resolve_xdata Recursively resolve XDATA fields in an entry $entry->resolve_xdata($xdata_entry); =cut sub resolve_xdata { my ($self, $xdata) = @_; my $secnum = $Biber::MASTER->get_current_section; my $section = $Biber::MASTER->sections->get_section($secnum); my $entry_key = $self->get_field('citekey'); foreach my $xdatum (@$xdata) { unless (my $xdatum_entry = $section->bibentry($xdatum)) { biber_warn("Entry '$entry_key' references XDATA entry '$xdatum' which does not exist in section $secnum"); next; } else { # Skip xdata inheritance if we've already done it # This will only ever be between two XDATA entrytypes since we # always start at a non-XDATA entrytype, which we'll not look at again # and recursion is always between XDATA entrytypes. next if Biber::Config->get_inheritance('xdata', $xdatum, $entry_key); # record the XDATA resolve between these entries to prevent loops Biber::Config->set_inheritance('xdata', $xdatum, $entry_key); # Detect XDATA loops unless (Biber::Config->is_inheritance_path('xdata', $entry_key, $xdatum)) { if (my $recurse_xdata = $xdatum_entry->get_field('xdata')) { # recurse $xdatum_entry->resolve_xdata($recurse_xdata); } foreach my $field ($xdatum_entry->datafields()) { # set fields next if $field eq 'ids'; # Never inherit aliases $self->set_datafield($field, $xdatum_entry->get_field($field)); # Record graphing information if required if (Biber::Config->getoption('output_format') eq 'dot') { Biber::Config->set_graph('xdata', $xdatum_entry->get_field('citekey'), $entry_key, $field, $field); } if ($logger->is_debug()) { # performance tune $logger->debug("Setting field '$field' in entry '$entry_key' via XDATA"); } } } else { biber_error("Circular XDATA inheritance between '$xdatum'<->'$entry_key'"); } } } } =head2 inherit_from Inherit fields from parent entry (as indicated by the crossref field) $entry->inherit_from($parententry); Takes a second Biber::Entry object as argument Uses the crossref inheritance specifications from the .bcf =cut sub inherit_from { my ($self, $parent) = @_; my $dmh = Biber::Config->get_dm_helpers; my $secnum = $Biber::MASTER->get_current_section; my $section = $Biber::MASTER->sections->get_section($secnum); my $target_key = $self->get_field('citekey'); # target/child key my $source_key = $parent->get_field('citekey'); # source/parent key # record the inheritance between these entries to prevent loops and repeats. Biber::Config->set_inheritance('crossref', $source_key, $target_key); # Detect crossref loops unless (Biber::Config->is_inheritance_path('crossref', $target_key, $source_key)) { # cascading crossrefs if (my $ppkey = $parent->get_field('crossref')) { $parent->inherit_from($section->bibentry($ppkey)); } } else { biber_error("Circular inheritance between '$source_key'<->'$target_key'"); } my $type = $self->get_field('entrytype'); my $parenttype = $parent->get_field('entrytype'); my $inheritance = Biber::Config->getblxoption('inheritance'); my %processed; # get defaults my $defaults = $inheritance->{defaults}; # global defaults ... my $inherit_all = $defaults->{inherit_all}; my $override_target = $defaults->{override_target}; my $dignore = $defaults->{ignore}; # override with type_pair specific defaults if they exist ... foreach my $type_pair ($defaults->{type_pair}->@*) { if (($type_pair->{source} eq '*' or $type_pair->{source} eq $parenttype) and ($type_pair->{target} eq '*' or $type_pair->{target} eq $type)) { $inherit_all = $type_pair->{inherit_all} if $type_pair->{inherit_all}; $override_target = $type_pair->{override_target} if $type_pair->{override_target}; $dignore = $type_pair->{ignore} if defined($type_pair->{ignore}); } } # First process any fields that have special treatment foreach my $inherit ($inheritance->{inherit}->@*) { # Match for this combination of entry and crossref parent? foreach my $type_pair ($inherit->{type_pair}->@*) { if (($type_pair->{source} eq '*' or $type_pair->{source} eq $parenttype) and ($type_pair->{target} eq '*' or $type_pair->{target} eq $type)) { foreach my $field ($inherit->{field}->@*) { # Skip for fields in the per-entry noinerit datafield set if (my $niset = Biber::Config->getblxoption('noinherit', undef, $target_key) and exists($field->{target})) { if (first {$field->{target} eq $_} $DATAFIELD_SETS{$niset}->@*) { next; } } next unless $parent->field_exists($field->{source}); $processed{$field->{source}} = 1; # localise defaults according to field, if specified my $field_override_target = $field->{override_target} // 'false'; # Skip this field if requested if ($field->{skip}) { $processed{$field->{source}} = 1; } # Set the field if it doesn't exist or override is requested elsif (not $self->field_exists($field->{target}) or $field_override_target eq 'true') { if ($logger->is_debug()) {# performance tune $logger->debug("Entry '$target_key' is inheriting field '" . $field->{source}. "' as '" . $field->{target} . "' from entry '$source_key'"); } $self->set_datafield($field->{target}, $parent->get_field($field->{source})); # Ignore uniqueness information tracking for this inheritance? my $ignore = $inherit->{ignore} || $dignore; Biber::Config->add_uniq_ignore($target_key, $field->{target}, $ignore); # Record graphing information if required if (Biber::Config->getoption('output_format') eq 'dot') { Biber::Config->set_graph('crossref', $source_key, $target_key, $field->{source}, $field->{target}); } } } } } } # Now process the rest of the (original data only) fields, if necessary if ($inherit_all eq 'true') { my @fields = $parent->datafields; # Special case - if the child has any Xdate datepart, don't inherit any Xdateparts # from parent otherwise you can end up with rather broken dates in the child. # Remove such fields before we start since it can't be done in the loop because # as soon as one Xdatepart field has been inherited, no more will be. my @filtered_fields; foreach my $field (@fields) { if (first {$_ eq $field} $dmh->{dateparts}->@*) { next if $self->date_fields_exist($field); } push @filtered_fields, $field; } @fields = @filtered_fields; foreach my $field (@fields) { # Skip for fields in the per-entry noinherit datafield set if (my $niset = Biber::Config->getblxoption('noinherit', undef, $target_key)) { if (first {$field eq $_} $DATAFIELD_SETS{$niset}->@*) { next; } } next if $processed{$field}; # Skip if we have already dealt with this field above # Set the field if it doesn't exist or override is requested if (not $self->field_exists($field) or $override_target eq 'true') { if ($logger->is_debug()) { # performance tune $logger->debug("Entry '$target_key' is inheriting field '$field' from entry '$source_key'"); } $self->set_datafield($field, $parent->get_field($field)); # Ignore uniqueness information tracking for this inheritance? Biber::Config->add_uniq_ignore($target_key, $field, $dignore); # Record graphing information if required if (Biber::Config->getoption('output_format') eq 'dot') { Biber::Config->set_graph('crossref', $source_key, $target_key, $field, $field); } } } } # Datesplit is a special non datafield and needs to be inherited for any # validation checks which may occur later foreach my $df ($dmh->{datefields}->@*) { $df =~ s/date$//; if (my $ds = $parent->get_field("${df}datesplit")) { $self->set_field("${df}datesplit", $ds); } } return; } =head2 dump Dump Biber::Entry object =cut sub dump { my $self = shift; return pp($self); } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/DataLists.pm000444000153000001 533513205066061 17662 0ustar00vboxother000000000000package Biber::DataLists; use v5.24; use strict; use warnings; =encoding utf-8 =head1 NAME Biber::DataLists =head2 new Initialize a Biber::DataLists object =cut sub new { my ($class) = @_; my $self = bless {}, $class; return $self; } =head2 add_list Adds a section list to this section =cut sub add_list { my $self = shift; my $list = shift; push $self->{lists}->@*, $list; return; } =head2 get_lists Returns an array ref of all sort lists =cut sub get_lists { my $self = shift; return $self->{lists}; } =head2 get_lists_for_section Returns an array ref of all sort lists for a given section Using numeric equals as section identifiers are numbers =cut sub get_lists_for_section { my $self = shift; my $section = shift; my $lists = []; my $glist; foreach my $list ($self->{lists}->@*) { if ($list->get_section == $section) { push $lists->@*, $list; } } return $lists; } =head2 get_lists_by_attrs Returns an array ref of data lists with certain attributes =cut sub get_lists_by_attrs { my ($self, %attrs) = @_; my $lists; LIST: foreach my $list ($self->{lists}->@*) { foreach my $attr (keys %attrs) { my $method = "get_$attr"; unless ($attrs{$attr} eq $list->$method) { next LIST; } } push $lists->@*, $list; } return $lists; } =head2 get_list Returns a specific list by list metadata =cut sub get_list { my ($self, $name, $section, $type) = @_; foreach my $list ($self->{lists}->@*) { next if (defined($section) and ($list->get_section ne $section)); next if ($type and ($list->get_type ne $type)); return $list if $list->get_name eq $name; } return undef; } =head2 has_lists_of_type_for_section Returns boolean saying whether there is a sort list for a section of a specified type =cut sub has_lists_of_type_for_section { my ($self, $section, $type) = @_; foreach my $list ($self->{lists}->@*) { if ($list->get_type eq $type and $list->get_section == $section) { return 1; } } return 0; } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Entries.pm000444000153000001 416113205066062 17400 0ustar00vboxother000000000000package Biber::Entries; use v5.24; use strict; use warnings; =encoding utf-8 =head1 NAME Biber::Entries =head2 new Initialize a Biber::Entries object =cut sub new { my ($class) = @_; my $self = bless {}, $class; return $self; } =head2 notnull Test for an empty object =cut sub notnull { my $self = shift; my @arr = keys $self->%*; return $#arr > -1 ? 1 : 0; } =head2 entry_exists Boolean values sub to tell if there is an entry for the passed citation key. =cut sub entry_exists { my ($self, $citekey) = @_; return defined($self->{$citekey}) ? 1 : 0; } =head2 entry Returns a Biber::Entry object for a given citekey =cut sub entry { my ($self, $citekey) = @_; return $self->{$citekey}; } =head2 entries Returns an array of all Biber::Entry objects =cut sub entries { my $self = shift; return values $self->%*; } =head2 del_entries Deletes all Biber::Entry objects =cut sub del_entries { my $self = shift; foreach my $e (keys $self->%*) { delete($self->{$e}); } return; } =head2 add_entry Adds a Biber::Entry to the Biber::Entries object =cut sub add_entry { my $self = shift; my ($key, $entry) = @_; $self->{$key} = $entry; return; } =head2 del_entry Deletes a Biber::Entry object for a given citekey. Only used in tests in order to reset data before regeneration with different options. =cut sub del_entry { my ($self, $citekey) = @_; delete($self->{$citekey}); return; } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Output000755000153000001 013205066062 16572 5ustar00vboxother000000000000biblatex-biber-2.9/lib/Biber/Output/dot.pm000444000153000001 3076513205066061 20105 0ustar00vboxother000000000000package Biber::Output::dot; use v5.24; use strict; use warnings; use parent qw(Biber::Output::base); use Biber::Config; use Biber::Constants; use Biber::Entry; use Biber::Utils; use List::AllUtils qw( :all ); use IO::File; use Log::Log4perl qw( :no_extra_logdie_message ); use Unicode::Normalize; my $logger = Log::Log4perl::get_logger('main'); =encoding utf-8 =head1 NAME Biber::Output::dot - class for Biber output of GraphViz .dot files =cut =head2 new Initialize a Biber::Output::dot object =cut my $graph; # accumulator for .dot string my $graph_edges = ''; # accumulator for .dot string. Initialise as can be empty my $state; # some state information for building output my $in; # indentation string my $i; # indentation level my $gopts = Biber::Config->getoption('dot_include'); my $linknode; # node to use to do cluster links sub new { my $class = shift; my $obj = shift; my $self = $class->SUPER::new($obj); $self->{output_data}{HEAD} = <<~EOF; digraph Biberdata { compound = true; edge [ arrowhead=open ]; graph [ style=filled, rankdir=LR ]; node [ fontsize=10, fillcolor=white, style=filled, shape=box ]; EOF return $self; } =head2 set_output_target_file Set the output target file of a Biber::Output::dot object A convenience around set_output_target so we can keep track of the filename =cut sub set_output_target_file { my $self = shift; my $dotfile = shift; $self->{output_target_file} = $dotfile; return IO::File->new($dotfile, '>:encoding(UTF-8)'); } =head2 set_output_entry We don't use this, we output everything in one go at the end =cut sub set_output_entry { return; } =head2 create_output_section We don't use this, we output everything in one go at the end =cut sub create_output_section { return; } =head2 output Create a graph of the required things and save to .dot format =cut sub output { my $self = shift; my $biber = $Biber::MASTER; my $data = $self->{output_data}; my $target = $self->{output_target}; my $target_string = "Target"; # Default if ($self->{output_target_file}) { $target_string = $self->{output_target_file}; } # for debugging mainly unless ($target) { $target = new IO::File '>-'; } if ($logger->is_debug()) {# performance tune $logger->debug('Preparing final output using class ' . __PACKAGE__ . '...'); } $logger->info("Writing '$target_string' with encoding 'UTF-8'"); out($target, $data->{HEAD}); $in = 2; # indentation $i = ' '; # starting indentation # Loop over sections, sort so we can run tests foreach my $section (sort {$a->number <=> $b->number} $biber->sections->get_sections->@*) { my $secnum = $section->number; if ($gopts->{section}) { $graph .= $i x $in . "subgraph \"cluster_section${secnum}\" {\n"; $in += 2; $graph .= $i x $in . "label=\"Section $secnum\";\n"; $graph .= $i x $in . "tooltip=\"Section $secnum\";\n"; $graph .= $i x $in . "fontsize=\"10\";\n"; $graph .= $i x $in . "fontname=serif;\n"; $graph .= $i x $in . "fillcolor=\"#fce3fa\";\n"; $graph .= "\n"; } # First create nodes/groups for entries foreach my $be (sort {$a->get_field('citekey') cmp $b->get_field('citekey')} $section->bibentries->entries) { my $citekey = $be->get_field('citekey'); $state->{$secnum}{"${secnum}/${citekey}"} = 1; my $et = uc($be->get_field('entrytype')); # colour depends on whether cited, uncited, dataonly or key alias my $c = $section->has_citekey($citekey) ? '#a0d0ff' : '#deefff'; if (my $options = $be->get_field('options')) { $c = '#fdffd9' if $options =~ m/dataonly/o; } $c = '#a1edec' if $section->get_citekey_alias($citekey); # make a set subgraph if a set member # This will make identically named subgraph sections for # every element in a set but dot is clever enough to merge them by # ID. if (my $sets = Biber::Config->get_graph('set')) { if (my $set = $sets->{memtoset}{$citekey}) { # entry is a set member $graph .= $i x $in . "subgraph \"cluster_${secnum}/set_${set}\" {\n"; $in += 2; $graph .= $i x $in . "label=\"$set (SET)\";\n"; $graph .= $i x $in . "tooltip=\"$set (SET)\";\n"; $graph .= $i x $in . "fontsize=\"10\";\n"; $graph .= $i x $in . "fontname=serif;\n"; $graph .= $i x $in . "fillcolor=\"#e3dadc\";\n"; $graph .= "\n"; } next if $sets->{settomem}{$citekey}; # Don't make normal nodes for sets } # Citekey aliases my $aliases = ''; foreach my $alias (sort $section->get_citekey_aliases) { my $realkey = $section->get_citekey_alias($alias); if ($realkey eq $citekey) { $aliases .= "\\n$alias (alias)"; } } if ($gopts->{field}) { # If granularity is at the level of fields $graph .= $i x $in . "subgraph \"cluster_section${secnum}/${citekey}\" {\n"; $in += 2; $graph .= $i x $in . "fontsize=\"10\";\n"; $graph .= $i x $in . "label=\"$citekey ($et)$aliases\";\n"; $graph .= $i x $in . "tooltip=\"$citekey ($et)\";\n"; $graph .= $i x $in . "fillcolor=\"$c\";\n"; $graph .= "\n"; foreach my $field (sort $be->datafields) { $graph .= $i x $in . "\"section${secnum}/${citekey}/${field}\" [ label=\"" . uc($field) . "\" ]\n"; } $in -= 2; $graph .= $i x $in . "}\n\n"; # link node for cluster->cluster links my $middle = int($be->count_datafields / 2); $state->{$secnum}{$citekey}{linknode} = ($be->datafields)[$middle]; } else { # Granularity is at the level of entries $graph .= $i x $in . "\"section${secnum}/${citekey}\" [ label=\"$citekey ($et)$aliases\", fillcolor=\"$c\", tooltip=\"$citekey ($et)\" ]\n"; } # Close set subgraph if necessary if (my $sets = Biber::Config->get_graph('set')) { if ($sets->{memtoset}{$citekey}) { # entry is a set member $graph .= $i x $in . "}\n\n"; $in -= 2; } } } # Then add the requested links # crossrefs _graph_inheritance('crossref', $secnum) if $gopts->{crossref}; # xdata _graph_inheritance('xdata', $secnum) if $gopts->{xdata}; # xref _graph_xref($secnum) if $gopts->{xref}; # related _graph_related($secnum) if $gopts->{related}; # Close the section, if any if ($gopts->{section}) { $graph .= $i x $in . "}\n\n"; $in -= 2; } } $graph .= "\n\n${graph_edges}"; $graph .= "\n}\n"; out($target, $graph); $logger->info("Output to $target_string"); close $target; return; } # Graph related entries sub _graph_related { my $secnum = shift; if (my $gr = Biber::Config->get_graph('related')) { # related links foreach my $f_entry (sort keys $gr->{clonetotarget}->%*) { my $m = $gr->{clonetotarget}{$f_entry}; foreach my $t_entry (sort keys $m->%*) { next unless $state->{$secnum}{"${secnum}/${f_entry}"}; next unless $state->{$secnum}{"${secnum}/${t_entry}"}; if ($gopts->{field}) { # links between clusters my $f_linknode = $state->{$secnum}{$f_entry}{linknode}; my $t_linknode = $state->{$secnum}{$t_entry}{linknode}; $graph_edges .= $i x $in . "\"section${secnum}/${f_entry}/${f_linknode}\" -> \"section${secnum}/${t_entry}/${t_linknode}\" [ penwidth=\"2.0\", color=\"#ad1741\", ltail=\"cluster_section${secnum}/${f_entry}\", lhead=\"cluster_section${secnum}/${t_entry}\", tooltip=\"${f_entry} is a related entry of ${t_entry}\" ]\n"; } else { # links between nodes $graph_edges .= $i x $in . "\"section${secnum}/${f_entry}\" -> \"section${secnum}/${t_entry}\" [ penwidth=\"2.0\", color=\"#ad1741\", tooltip=\"${f_entry} is a related entry of ${t_entry}\" ]\n"; } } } # clone links foreach my $f_entry (sort keys $gr->{reltoclone}->%*) { my $m = $gr->{reltoclone}{$f_entry}; foreach my $t_entry (sort keys $m->%*) { next unless $state->{$secnum}{"${secnum}/${f_entry}"}; next unless $state->{$secnum}{"${secnum}/${t_entry}"}; if ($gopts->{field}) { # links between clusters my $f_linknode = $state->{$secnum}{$f_entry}{linknode}; my $t_linknode = $state->{$secnum}{$t_entry}{linknode}; $graph_edges .= $i x $in . "\"section${secnum}/${f_entry}/${f_linknode}\" -> \"section${secnum}/${t_entry}/${t_linknode}\" [ style=\"dashed\", penwidth=\"2.0\", color=\"#ad1741\", ltail=\"cluster_section${secnum}/${f_entry}\", lhead=\"cluster_section${secnum}/${t_entry}\", tooltip=\"${t_entry} is a clone of ${f_entry}\" ]\n"; } else { # links between nodes $graph_edges .= $i x $in . "\"section${secnum}/${f_entry}\" -> \"section${secnum}/${t_entry}\" [ style=\"dashed\", penwidth=\"2.0\", color=\"#ad1741\", tooltip=\"${t_entry} is a clone of ${f_entry}\" ]\n"; } } } } } # Graph xrefs sub _graph_xref { my $secnum = shift; if (my $gr = Biber::Config->get_graph('xref')) { foreach my $f_entry (sort keys $gr->%*) { my $t_entry = $gr->{$f_entry}; next unless $state->{$secnum}{"${secnum}/${f_entry}"}; next unless $state->{$secnum}{"${secnum}/${t_entry}"}; if ($gopts->{field}) { # links between clusters my $f_linknode = $state->{$secnum}{$f_entry}{linknode}; my $t_linknode = $state->{$secnum}{$t_entry}{linknode}; $graph_edges .= $i x $in . "\"section${secnum}/${f_entry}/${f_linknode}\" -> \"section${secnum}/${t_entry}/${t_linknode}\" [ penwidth=\"2.0\", style=\"dashed\", color=\"#7d7879\", ltail=\"cluster_section${secnum}/${f_entry}\", lhead=\"cluster_section${secnum}/${t_entry}\", tooltip=\"${f_entry} XREFS ${t_entry}\" ]\n"; } else { # links between nodes $graph_edges .= $i x $in . "\"section${secnum}/${f_entry}\" -> \"section${secnum}/${t_entry}\" [ penwidth=\"2.0\", style=\"dashed\", color=\"#7d7879\", tooltip=\"${f_entry} XREFS ${t_entry}\" ]\n"; } } } } # Graph crossrefs and xdata sub _graph_inheritance { my ($type, $secnum) = @_; my $edgecolor; if ($type eq 'crossref') { $edgecolor = '#7d7879'; } elsif ($type eq 'xdata') { $edgecolor = '#2ca314'; } if (my $gr = Biber::Config->get_graph($type)) { # Show fields if ($gopts->{field}) { foreach my $f_entry (sort keys $gr->%*) { my $v = $gr->{$f_entry}; foreach my $f_field (sort keys $v->%*) { my $w = $v->{$f_field}; foreach my $t_entry (sort keys $w->%*) { foreach my $t_field ($w->{$t_entry}->@*) { next unless $state->{$secnum}{"${secnum}/${f_entry}"}; next unless $state->{$secnum}{"${secnum}/${t_entry}"}; $graph_edges .= $i x $in . "\"section${secnum}/${f_entry}/${f_field}\" -> \"section${secnum}/${t_entry}/${t_field}\" [ penwidth=\"2.0\", color=\"${edgecolor}\", tooltip=\"${t_entry}/" . uc($t_field) . " inherited via " . uc($type) . " from ${f_entry}/" . uc($f_field) . "\" ]\n"; } } } } } # Just show the entries, no fields else { foreach my $f_entry (sort keys $gr->%*) { my $v = $gr->{$f_entry}; foreach my $w (sort values $v->%*) { foreach my $t_entry (sort keys $w->%*) { next unless $state->{$secnum}{"${secnum}/${f_entry}"}; next unless $state->{$secnum}{"${secnum}/${t_entry}"}; next if $state->{edges}{"section${secnum}/${f_entry}"}{"section${secnum}/${t_entry}"}; $graph_edges .= $i x $in . "\"section${secnum}/${f_entry}\" -> \"section${secnum}/${t_entry}\" [ penwidth=\"2.0\", color=\"${edgecolor}\", tooltip=\"${t_entry} inherits via $type from ${f_entry}\" ]\n"; $state->{edges}{"section${secnum}/${f_entry}"}{"section${secnum}/${t_entry}"} = 1; } } } } } } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Output/bibtex.pm000444000153000001 4505313205066062 20571 0ustar00vboxother000000000000package Biber::Output::bibtex; use v5.24; use strict; use warnings; use parent qw(Biber::Output::base); use Biber::Annotation; use Biber::Config; use Biber::Constants; use Biber::Utils; use List::AllUtils qw( :all ); use Encode; use IO::File; use Log::Log4perl qw( :no_extra_logdie_message ); use Scalar::Util qw(looks_like_number); use Text::Wrap; $Text::Wrap::columns = 80; use Unicode::Normalize; my $logger = Log::Log4perl::get_logger('main'); =encoding utf-8 =head1 NAME Biber::Output::bibtex - class for bibtex output =cut =head2 set_output_target_file Set the output target file of a Biber::Output::bibtex object A convenience around set_output_target so we can keep track of the filename =cut sub set_output_target_file { my $self = shift; my $outfile = shift; $self->{output_target_file} = $outfile; return undef; } =head2 set_output_comment Set the output for a comment =cut sub set_output_comment { my $self = shift; my $comment = shift; my $acc = ''; # Make the right casing function my $casing; if (Biber::Config->getoption('output_fieldcase') eq 'upper') { $casing = sub {uc(shift)}; } elsif (Biber::Config->getoption('output_fieldcase') eq 'lower') { $casing = sub {lc(shift)}; } elsif (Biber::Config->getoption('output_fieldcase') eq 'title') { $casing = sub {ucfirst(shift)}; } $acc .= '@'; $acc .= $casing->('comment'); $acc .= "{$comment}\n"; push $self->{output_data}{COMMENTS}->@*, $acc; return; } =head2 set_output_entry Set the output for an entry =cut sub set_output_entry { my $self = shift; my $be = shift; # Biber::Entry object my $bee = $be->get_field('entrytype'); my $section = shift; # Section object the entry occurs in my $dm = shift; # Data Model object my $dmh = $dm->{helpers}; my $acc = ''; my $secnum = $section->number; my $key = $be->get_field('citekey'); # Make the right casing function my $casing; if (Biber::Config->getoption('output_fieldcase') eq 'upper') { $casing = sub {uc(shift)}; } elsif (Biber::Config->getoption('output_fieldcase') eq 'lower') { $casing = sub {lc(shift)}; } elsif (Biber::Config->getoption('output_fieldcase') eq 'title') { $casing = sub {ucfirst(shift)}; } $acc .= '@'; $acc .= $casing->($bee); $acc .= "\{$key,\n"; # hash accumulator so we can gather all the data before formatting so that things like # $max_field_len can be calculated my %acc; # Name fields my $tonamesub = 'name_to_bib'; if (Biber::Config->getoption('output_xname')) { $tonamesub = 'name_to_xname'; } foreach my $namefield ($dmh->{namelists}->@*) { if (my $names = $be->get_field($namefield)) { my $namesep = Biber::Config->getoption('output_namesep'); my @namelist; # Namelist scope useprefix if (defined($names->get_useprefix)) {# could be 0 push @namelist, 'useprefix=' . Biber::Utils::map_boolean($names->get_useprefix, 'tostring'); } # Namelist scope sortingnamekeytemplatename if (my $snks = $names->get_sortingnamekeytemplatename) { push @namelist, "sortingnamekeytemplatename=$snks"; } # Now add all names to accumulator foreach my $name ($names->names->@*) { push @namelist, $name->$tonamesub; } $acc{$casing->($namefield)} = join(" $namesep ", @namelist); # Deal with morenames if ($names->get_morenames) { $acc{$casing->($namefield)} .= " $namesep others"; } } } # List fields and verbatim list fields foreach my $listfield ($dmh->{lists}->@*, $dmh->{vlists}->@*) { if (my $list = $be->get_field($listfield)) { my $listsep = Biber::Config->getoption('output_listsep'); my @plainlist; foreach my $item ($list->@*) { push @plainlist, $item; } $acc{$casing->($listfield)} = join(" $listsep ", @plainlist); } } # Per-entry options my @entryoptions; foreach my $opt (Biber::Config->getblxentryoptions($key)) { push @entryoptions, $opt . '=' . Biber::Config->getblxoption($opt, undef, $key); } $acc{$casing->('options')} = join(',', @entryoptions) if @entryoptions; # Date fields foreach my $d ($dmh->{datefields}->@*) { $d =~ s/date$//; next unless $be->get_field("${d}year"); $acc{$casing->("${d}date")} = construct_datetime($be, $d); } # YEAR and MONTH are legacy - convert these to DATE if possible if (my $val = $be->get_field('year')) { if (looks_like_number($val)) { $acc{$casing->('date')} = $val; $be->del_field('year'); } } if (my $val = $be->get_field('month')) { if (looks_like_number($val)) { $acc{$casing->('date')} .= "-$val"; $be->del_field('month'); } } # If CROSSREF and XDATA have been resolved, don't output them if (Biber::Config->getoption('output_resolve_crossrefs')) { if ($be->get_field('crossref')) { $be->del_field('crossref'); } } if (Biber::Config->getoption('output_resolve_xdata')) { if ($be->get_field('xdata')) { $be->del_field('xdata'); } } # Standard fields foreach my $field ($dmh->{fields}->@*) { if (my $val = $be->get_field($field)) { $acc{$casing->($field)} = $val; } } # XSV fields foreach my $field ($dmh->{xsv}->@*) { if (my $f = $be->get_field($field)) { $acc{$casing->($field)} .= join(',', $f->@*); } } # Ranges foreach my $rfield ($dmh->{ranges}->@*) { if ( my $rf = $be->get_field($rfield) ) { $acc{$casing->($rfield)} .= construct_range($rf); } } # Verbatim fields foreach my $vfield ($dmh->{vfields}->@*) { if ( my $vf = $be->get_field($vfield) ) { if ($vfield eq 'url') { $acc{$casing->('urlraw')} = $vf; } else { $acc{$casing->($vfield)} = $vf; } } } # Keywords if ( my $k = $be->get_field('keywords') ) { $acc{$casing->('keywords')} = join(',', $k->@*); } # Annotations foreach my $f (keys %acc) { if (Biber::Annotation->is_annotated_field($key, lc($f))) { $acc{$casing->($f) . Biber::Config->getoption('output_annotation_marker')} = construct_annotation($key, lc($f)); } } # Determine maximum length of field names my $max_field_len; if (Biber::Config->getoption('output_align')) { $max_field_len = max map {Unicode::GCString->new($_)->length} keys %acc; } # Determine order of fields my %classmap = ('names' => 'namelists', 'lists' => 'lists', 'dates' => 'datefields'); foreach my $field (split(/\s*,\s*/, Biber::Config->getoption('output_field_order'))) { if ($field eq 'names' or $field eq 'lists' or $field eq 'dates') { my @donefields; foreach my $key (sort keys %acc) { if (first {fc($_) eq fc($key)} $dmh->{$classmap{$field}}->@*) { $acc .= bibfield($key, $acc{$key}, $max_field_len); push @donefields, $key; # Keep annotations with their fields my $ann = $key . Biber::Config->getoption('output_annotation_marker'); if (my $value = $acc{$ann}) { $acc .= bibfield($ann, $value, $max_field_len); push @donefields, $ann; } } } delete @acc{@donefields}; } elsif (my $value = delete $acc{$casing->($field)}) { $acc .= bibfield($casing->($field), $value, $max_field_len); # Keep annotations with their fields my $ann = $casing->($field) . Biber::Config->getoption('output_annotation_marker'); if (my $value = delete $acc{$ann}) { $acc .= bibfield($ann, $value, $max_field_len); } } } # Now rest of fields not explicitly specified foreach my $field (sort keys %acc) { $acc .= bibfield($field, $acc{$field}, $max_field_len); } $acc .= "}\n\n"; # If requested to convert UTF-8 to macros ... if (Biber::Config->getoption('output_safechars')) { $acc = latex_recode_output($acc); } else { # ... or, check for encoding problems and force macros my $outenc = Biber::Config->getoption('output_encoding'); if ($outenc ne 'UTF-8') { # Can this entry be represented in the output encoding? if (encode($outenc, NFC($acc)) =~ /\?/) { # Malformed data encoding char # So convert to macro $acc = latex_recode_output($acc); biber_warn("The entry '$key' has characters which cannot be encoded in '$outenc'. Recoding problematic characters into macros."); } } } # Create an index by keyname for easy retrieval $self->{output_data}{ENTRIES}{$secnum}{index}{$key} = \$acc; return; } =head2 output output method =cut sub output { my $self = shift; my $data = $self->{output_data}; my $target_string = "Target"; # Default if ($self->{output_target_file}) { $target_string = $self->{output_target_file}; } # Instantiate output file now that input is read in case we want to do in-place # output for tool mode my $enc_out; if (Biber::Config->getoption('output_encoding')) { $enc_out = ':encoding(' . Biber::Config->getoption('output_encoding') . ')'; } my $target = IO::File->new($target_string, ">$enc_out"); # for debugging mainly if (not $target or $target_string eq '-') { $target = new IO::File '>-'; } if ($logger->is_debug()) {# performance tune $logger->debug('Preparing final output using class ' . __PACKAGE__ . '...'); } $logger->info("Writing '$target_string' with encoding '" . Biber::Config->getoption('output_encoding') . "'"); $logger->info('Converting UTF-8 to TeX macros on output') if Biber::Config->getoption('output_safechars'); out($target, $data->{HEAD}); if ($logger->is_debug()) {# performance tune $logger->debug("Writing entries in bibtex format"); } # Bibtex output uses just one special section, always sorted by global sorting spec foreach my $key ($Biber::MASTER->datalists->get_lists_by_attrs(section => 99999, name => Biber::Config->getblxoption('sortingtemplatename') . '/global//global/global', type => 'entry', sortingtemplatename => Biber::Config->getblxoption('sortingtemplatename'), sortingnamekeytemplatename => 'global', labelprefix => '', uniquenametemplatename => 'global', labelalphanametemplatename => 'global')->[0]->get_keys->@*) { out($target, ${$data->{ENTRIES}{99999}{index}{$key}}); } # Output any comments when in tool mode if (Biber::Config->getoption('tool')) { foreach my $comment ($data->{COMMENTS}->@*) { out($target, $comment); } } out($target, $data->{TAIL}); $logger->info("Output to $target_string"); close $target; return; } =head2 create_output_section Create the output from the sections data and push it into the output object. =cut sub create_output_section { my $self = shift; my $secnum = $Biber::MASTER->get_current_section; my $section = $Biber::MASTER->sections->get_section($secnum); # We rely on the order of this array for the order of the .bib foreach my $k ($section->get_citekeys) { # Regular entry my $be = $section->bibentry($k) or biber_error("Cannot find entry with key '$k' to output"); $self->set_output_entry($be, $section, Biber::Config->get_dm); } # Output all comments at the end foreach my $comment ($Biber::MASTER->{comments}->@*) { $self->set_output_comment($comment); } # Make sure the output object knows about the output section $self->set_output_section($secnum, $section); return; } =head2 bibfield Format a single field =cut sub bibfield { my ($field, $value, $max_field_len) = @_; my $acc; $acc .= ' ' x Biber::Config->getoption('output_indent'); $acc .= $field; $acc .= ' ' x ($max_field_len - Unicode::GCString->new($field)->length) if $max_field_len; $acc .= ' = '; # Don't wrap fields which should be macros in braces my $mfs = Biber::Config->getoption('output_macro_fields'); if (defined($mfs) and first {lc($field) eq $_} map {lc($_)} split(/\s*,\s*/, $mfs) ) { $acc .= "$value,\n"; } else { $acc .= "\{$value\},\n"; } return $acc; } =head2 construct_annotation Construct a field annotation =cut sub construct_annotation { my ($key, $field) = @_; my @annotations; if (my $fa = Biber::Annotation->get_field_annotation($key, $field)) { push @annotations, "=$fa"; } foreach my $item (Biber::Annotation->get_annotated_items('item', $key, $field)) { push @annotations, "$item=" . Biber::Annotation->get_annotation('item', $key, $field, $item); } foreach my $item (Biber::Annotation->get_annotated_items('part', $key, $field)) { foreach my $part (Biber::Annotation->get_annotated_parts('part', $key, $field, $item)) { push @annotations, "$item:$part=" . Biber::Annotation->get_annotation('part', $key, $field, $item, $part); } } return join(';', @annotations); } =head2 construct_range Construct a range field from its components [m, n] -> m-n [m, undef] -> m [m, ''] -> m- ['', n] -> -n ['', undef] -> ignore =cut sub construct_range { my $r = shift; my @ranges; foreach my $e ($r->@*) { my $rs = $e->[0]; if (defined($e->[1])) { $rs .= '--' . $e->[1]; } push @ranges, $rs; } return join(',', @ranges); } =head2 construct_datetime Construct a datetime from its components =cut sub construct_datetime { my ($be, $d) = @_; my $datestring = ''; my $overridey; my $overridem; my $overrideem; my $overrided; my %seasons = ( 'spring' => 21, 'summer' => 22, 'autumn' => 23, 'winter' => 24 ); # Did the date fields come from interpreting an EDTF 5.2.2 unspecified date? # If so, do the reverse of Biber::Utils::parse_date_edtf_unspecified() if (my $unspec = $be->get_field("${d}dateunspecified")) { # 1990/1999 -> 199u if ($unspec eq 'yearindecade') { my ($decade) = $be->get_field("${d}year") =~ m/^(\d+)\d$/; $overridey = "${decade}u"; $be->del_field("${d}endyear"); } # 1900/1999 -> 19uu elsif ($unspec eq 'yearincentury') { my ($century) = $be->get_field("${d}year") =~ m/^(\d+)\d\d$/; $overridey = "${century}uu"; $be->del_field("${d}endyear"); } # 1999-01/1999-12 => 1999-uu elsif ($unspec eq 'monthinyear') { $overridem = 'uu'; $be->del_field("${d}endyear"); $be->del_field("${d}endmonth"); } # 1999-01-01/1999-01-31 -> 1999-01-uu elsif ($unspec eq 'dayinmonth') { $overrided = 'uu'; $be->del_field("${d}endyear"); $be->del_field("${d}endmonth"); $be->del_field("${d}endday"); } # 1999-01-01/1999-12-31 -> 1999-uu-uu elsif ($unspec eq 'dayinyear') { $overridem = 'uu'; $overrided = 'uu'; $be->del_field("${d}endyear"); $be->del_field("${d}endmonth"); $be->del_field("${d}endday"); } } # Seasons derived from EDTF dates if (my $s = $be->get_field("${d}season")) { $overridem = $seasons{$s}; } if (my $s = $be->get_field("${d}endseason")) { $overrideem = $seasons{$s}; } # date exists if there is a start year if (my $sy = $overridey || $be->get_field("${d}year") ) { $datestring .= $sy; $be->del_field("${d}year"); # Start month if (my $sm = $overridem || $be->get_field("${d}month")) { $datestring .= '-' . sprintf('%.2d', $sm); $be->del_field("${d}month"); } # Start day if (my $sd = $overrided || $be->get_field("${d}day")) { $datestring .= '-' . sprintf('%.2d', $sd); $be->del_field("${d}day"); } # Uncertain start date if ($be->get_field("${d}dateuncertain")) { $datestring .= '?'; } # Circa start date if ($be->get_field("${d}datecirca")) { $datestring .= '~'; } # If start hour, there must be minute and second if (my $sh = $be->get_field("${d}hour")) { $datestring .= 'T' . sprintf('%.2d', $sh) . ':' . sprintf('%.2d', $be->get_field("${d}minute")) . ':' . sprintf('%.2d', $be->get_field("${d}second")); $be->del_field("${d}hour"); $be->del_field("${d}minute"); $be->del_field("${d}second"); } # start timezone if (my $stz = $be->get_field("${d}timezone")) { $stz =~ s/\\bibtzminsep\s+/:/; $datestring .= $stz; $be->del_field("${d}timezone"); } # End year, can be empty if ($be->field_exists("${d}endyear")) { $datestring .= '/'; } # End year if (my $ey = $be->get_field("${d}endyear")) { $datestring .= $ey; $be->del_field("${d}endyear"); # End month if (my $em = $overrideem || $be->get_field("${d}endmonth")) { $datestring .= '-' . sprintf('%.2d', $em); $be->del_field("${d}endmonth"); } # End day if (my $ed = $be->get_field("${d}endday")) { $datestring .= '-' . sprintf('%.2d', $ed); $be->del_field("${d}endday"); } # Uncertain start date if ($be->get_field("${d}enddateuncertain")) { $datestring .= '?'; } # Circa start date if ($be->get_field("${d}enddatecirca")) { $datestring .= '~'; } # If end hour, there must be minute and second if (my $eh = $be->get_field("${d}endhour")) { $datestring .= 'T' . sprintf('%.2d', $eh) . ':' . sprintf('%.2d', $be->get_field("${d}endminute")) . ':' . sprintf('%.2d', $be->get_field("${d}endsecond")); $be->del_field("${d}endhour"); $be->del_field("${d}endminute"); $be->del_field("${d}endsecond"); } # end timezone if (my $etz = $be->get_field("${d}endtimezone")) { $etz =~ s/\\bibtzminsep\s+/:/; $datestring .= $etz; $be->del_field("${d}endtimezone"); } } } return $datestring; } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Output/test.pm000444000153000001 3372613205066062 20277 0ustar00vboxother000000000000package Biber::Output::test; use v5.24; use strict; use warnings; use parent qw(Biber::Output::base); use Biber::Config; use Biber::Constants; use Biber::Entry; use Biber::Utils; use IO::File; use Log::Log4perl qw( :no_extra_logdie_message ); my $logger = Log::Log4perl::get_logger('main'); use Unicode::Normalize; =encoding utf-8 =head1 NAME Biber::Output::test - Output class for loopback testing Essentially, this outputs to a string so we can look at it internally in tests =cut =head2 _printfield Add the .bbl for a text field to the output accumulator. =cut sub _printfield { my ($be, $field, $str) = @_; my $field_type = 'field'; # crossref and xref are of type 'strng' in the .bbl if (lc($field) eq 'crossref' or lc($field) eq 'xref') { $field_type = 'strng'; } # auto-escase TeX special chars if: # * The entry is not a bibtex entry (no auto-escaping for bibtex data) # * It's not a strng field if ($field_type ne 'strng' and $be->get_field('datatype') ne 'bibtex') { $str =~ s/(?getoption('wraplines')) { ## 16 is the length of ' \field{}{}' if ( 16 + Unicode::GCString->new($field)->length + Unicode::GCString->new($str)->length > 2*$Text::Wrap::columns ) { return " \\${field_type}{$field}{%\n" . wrap(' ', ' ', $str) . "%\n }\n"; } elsif ( 16 + Unicode::GCString->new($field)->length + Unicode::GCString->new($str)->length > $Text::Wrap::columns ) { return wrap(' ', ' ', "\\${field_type}{$field}{$str}" ) . "\n"; } else { return " \\${field_type}{$field}{$str}\n"; } } else { return " \\${field_type}{$field}{$str}\n"; } return; } =head2 set_output_entry Set the .bbl output for an entry. This is the meat of the .bbl output =cut sub set_output_entry { my ($self, $be, $section, $dm) = @_; my $bee = $be->get_field('entrytype'); my $acc = ''; my $secnum = $section->number; my $dmh = $dm->{helpers}; my $key = $be->get_field('citekey'); my $un = Biber::Config->getblxoption('uniquename', $bee, $key); my $ul = Biber::Config->getblxoption('uniquelist', $bee, $key); $acc .= "% sortstring = " . $be->get_field('sortstring') . "\n" if (Biber::Config->getoption('debug') || Biber::Config->getblxoption('debug')); $acc .= " \\entry{$key}{$bee}{" . join(',', filter_entry_options($be->get_field('options'))->@*) . "}\n"; # Generate set information if ($bee eq 'set') { # Set parents get \set entry ... $acc .= " \\set{" . join(',', $be->get_field('entryset')->@*) . "}\n"; # Set parents need this - it is the labelalpha from the first entry if ( Biber::Config->getblxoption('labelalpha', $bee) ) { $acc .= " LABELALPHA\n"; $acc .= " EXTRAALPHA\n"; } # This is special, we have to put a marker for sortinit{hash} and then replace this string # on output as it can vary between lists $acc .= " SORTINIT\n"; $acc .= " SORTINITHASH\n"; # labelprefix is list-specific. It is only defined if there is no shorthand # (see biblatex documentation) $acc .= " LABELPREFIX\n"; # Label can be in set parents if (my $lab = $be->get_field('label')) { $acc .= " \\field{label}{$lab}\n"; } # Annotation can be in set parents if (my $ann = $be->get_field('annotation')) { $acc .= " \\field{annotation}{$ann}\n"; } # Skip everything else # labelnumber/labelprefix etc. are generated by biblatex after reading the .bbl goto ENDENTRY; } else { # Everything else that isn't a set parent ... if (my $es = $be->get_field('entryset')) { # ... gets a \inset if it's a set member $acc .= " \\inset{" . join(',', $es->@*) . "}\n"; } } # Output name fields foreach my $namefield ($dm->get_fields_of_type('list', 'name')->@*) { next if $dm->field_is_skipout($namefield); if ( my $nf = $be->get_field($namefield) ) { my $nlid = $nf->get_id; # Did we have "and others" in the data? if ( $nf->get_morenames ) { $acc .= " \\true{more$namefield}\n"; # Is this name labelname? If so, provide \morelabelname if (my $lni = $be->get_labelname_info) { if ( $lni eq $namefield ) { $acc .= " \\true{morelabelname}\n"; } } } my $total = $nf->count_names; # Add per-list options, if any my $lni = $be->get_labelname_info; my $nfv = ''; if (defined($lni) and $lni eq $namefield) { # Add uniquelist, if defined my @plo; # Add uniquelist if requested if ($ul) { push @plo, "UL-${nlid}"; } # Add per-namelist options foreach my $nlo (keys $CONFIG_SCOPEOPT_BIBLATEX{NAMELIST}->%*) { if (defined($nf->${\"get_$nlo"})) { my $nlov = $nf->${\"get_$nlo"}; if ($CONFIG_OPTTYPE_BIBLATEX{lc($nlo)} and $CONFIG_OPTTYPE_BIBLATEX{lc($nlo)} eq 'boolean') { $nlov = map_boolean($nlov, 'tostring'); } my $oo = expand_option($nlo, $nlov, $CONFIG_BIBLATEX_NAMELIST_OPTIONS{$nlo}->{INPUT}); foreach my $o ($oo->@*) { push @plo, $o->[0] . '=' . $o->[1]; } } } $nfv = join(',', @plo); } $acc .= " \\name{$namefield}{$total}{$nfv}{%\n"; foreach my $n ($nf->names->@*) { $acc .= $n->name_to_bbl($un); } $acc .= " }\n"; } } foreach my $listfield ($dm->get_fields_of_fieldtype('list')->@*) { next if $dm->field_is_datatype('name', $listfield); # name is a special list if ( my $lf = $be->get_field($listfield) ) { if ( lc($be->get_field($listfield)->[-1]) eq Biber::Config->getoption('others_string') ) { $acc .= " \\true{more$listfield}\n"; pop $lf->@*; # remove the last element in the array }; my $total = $lf->$#* + 1; $acc .= " \\list{$listfield}{$total}{%\n"; foreach my $f ($lf->@*) { $acc .= " {$f}%\n"; } $acc .= " }\n"; } } # Output labelname hashes $acc .= " NAMEHASH\n"; my $fullhash = $be->get_field('fullhash'); $acc .= " \\strng{fullhash}{$fullhash}\n" if $fullhash; $acc .= " BIBNAMEHASH\n"; # Output namelist hashes foreach my $namefield ($dmh->{namelists}->@*) { next unless $be->get_field($namefield); $acc .= " ${namefield}BIBNAMEHASH\n"; $acc .= " ${namefield}NAMEHASH\n"; if (my $fullhash = $be->get_field("${namefield}fullhash")) { $acc .= " \\strng{${namefield}fullhash}{$fullhash}\n"; } } if ( Biber::Config->getblxoption('labelalpha', $be->get_field('entrytype')) ) { $acc .= " LABELALPHA\n"; } # This is special, we have to put a marker for sortinit{hash} and then replace this string # on output as it can vary between lists $acc .= " SORTINIT\n"; $acc .= " SORTINITHASH\n"; # The labeldateparts option determines whether "extradate" is output # Skip generating extradate for entries with "skiplab" set if ( Biber::Config->getblxoption('labeldateparts', $be->get_field('entrytype'))) { # Might not have been set due to skiplab/dataonly if (my $ey = $be->get_field('extradate')) { $acc .= " EXTRADATE\n"; } if ($be->field_exists('labeldatesource')) { $acc .= " \\field{labeldatesource}{" . $be->get_field('labeldatesource') . "}\n"; } } # labelprefix is list-specific. It is only defined if there is no shorthand # (see biblatex documentation) unless ($be->get_field('shorthand')) { $acc .= " LABELPREFIX\n"; } # The labeltitle option determines whether "extratitle" is output if ( Biber::Config->getblxoption('labeltitle', $bee)) { $acc .= " EXTRATITLE\n"; } # The labeltitleyear option determines whether "extratitleyear" is output if ( Biber::Config->getblxoption('labeltitleyear', $bee)) { $acc .= " EXTRATITLEYEAR\n"; } # The labelalpha option determines whether "extraalpha" is output if ( Biber::Config->getblxoption('labelalpha', $bee)) { $acc .= " EXTRAALPHA\n"; } $acc .= " SINGLETITLE\n"; $acc .= " UNIQUETITLE\n"; $acc .= " UNIQUEBARETITLE\n"; $acc .= " UNIQUEWORK\n"; $acc .= " UNIQUEPRIMARYAUTHOR\n"; # The source field for labelname if (my $lni = $be->get_labelname_info) { $acc .= " \\field{labelnamesource}{$lni}\n"; } # The source field for labeltitle if (my $lti = $be->get_labeltitle_info) { $acc .= " \\field{labeltitlesource}{$lti}\n"; } foreach my $field (sort $dm->get_fields_of_type('field', 'entrykey')->@*, $dm->get_fields_of_type('field', 'key')->@*, $dm->get_fields_of_type('field', 'integer')->@*, $dm->get_fields_of_type('field', 'datepart')->@*, $dm->get_fields_of_type('field', 'literal')->@*, $dm->get_fields_of_type('field', 'code')->@*) { next if $dm->field_is_skipout($field); next if $dm->get_fieldformat($field) eq 'xsv'; if ( ($dm->field_is_nullok($field) and $be->field_exists($field)) or $be->get_field($field) ) { # we skip outputting the crossref or xref when the parent is not cited # (biblatex manual, section 2.2.3) # sets are a special case so always output crossref/xref for them since their # children will always be in the .bbl otherwise they make no sense. unless ( $be->get_field('entrytype') eq 'set') { next if ($field eq 'crossref' and not $section->has_citekey($be->get_field('crossref'))); next if ($field eq 'xref' and not $section->has_citekey($be->get_field('xref'))); } $acc .= _printfield($be, $field, $be->get_field($field) ); } } foreach my $field (sort $dm->get_fields_of_fieldformat('xsv')->@*) { next if $dm->field_is_skipout($field); next if $dm->get_datatype($field) eq 'keyword';# This is special in .bbl if (my $f = $be->get_field($field)) { $acc .= _printfield($be, $field, join(',', $f->@*) ); } } foreach my $rfield ($dm->get_fields_of_datatype('range')->@*) { if ( my $rf = $be->get_field($rfield)) { $rf =~ s/[-–]+/\\bibrangedash /g; $acc .= " \\field{$rfield}{$rf}\n"; $acc .= " \\range{$rfield}{" . rangelen($rf) . "}\n"; } } foreach my $vfield (($dm->get_fields_of_datatype('verbatim')->@*, $dm->get_fields_of_datatype('uri')->@*)) { if ( my $rf = $be->get_field($vfield) ) { $acc .= " \\verb{$vfield}\n"; $acc .= " \\verb $rf\n \\endverb\n"; } } if ( my $k = $be->get_field('keywords') ) { $acc .= " \\keyw{$k}\n"; } # Append any warnings to the entry, if any if (my $w = $be->get_field('warnings')) { foreach my $warning ($w->@*) { $acc .= " \\warn{\\item $warning}\n"; } } ENDENTRY: $acc .= " \\endentry\n"; # Create an index by keyname for easy retrieval $self->{output_data}{ENTRIES}{$secnum}{index}{$key} = \$acc; return; } =head2 create_output_misc Create the output for misc bits and pieces like preamble and closing macro call and add to output object. =cut sub create_output_misc { my $self = shift; if (my $pa = $Biber::MASTER->get_preamble) { $pa = join("%\n", $pa->@*); # Decode UTF-8 -> LaTeX macros if asked to if (Biber::Config->getoption('output_safechars')) { $pa = Biber::LaTeX::Recode::latex_encode($pa); } $self->{output_data}{HEAD} .= "\\preamble{%\n$pa%\n}\n\n"; } $self->{output_data}{TAIL} .= "\\endinput\n\n"; return; } =head2 output BBL output method - this takes care to output entries in the explicit order derived from the virtual order of the auxcitekeys after sortkey sorting. =cut sub output { my $self = shift; my $data = $self->{output_data}; my $target = $self->{output_target}; $logger->info("Writing output with encoding '" . Biber::Config->getoption('output_encoding') . "'"); $logger->info('Converting UTF-8 to TeX macros on output to .bbl') if Biber::Config->getoption('output_safechars'); foreach my $secnum (sort keys $data->{ENTRIES}->%*) { my $section = $self->get_output_section($secnum); foreach my $list (sort {$a->get_sortingtemplatename cmp $b->get_sortingtemplatename} $Biber::MASTER->datalists->get_lists_for_section($secnum)->@*) { next unless $list->count_keys; # skip empty lists my $listtype = $list->get_type; foreach my $k ($list->get_keys->@*) { my $entry = $data->{ENTRIES}{$secnum}{index}{$k}; # Instantiate any dynamic, list specific entry information my $entry_string = $list->instantiate_entry($section, $entry, $k); # If requested to convert UTF-8 to macros ... if (Biber::Config->getoption('output_safechars')) { $entry_string = latex_recode_output($entry_string); } out($target, $entry_string); } } } close $target; return; } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Output/bbl.pm000444000153000001 5635313205066062 20060 0ustar00vboxother000000000000package Biber::Output::bbl; use v5.24; use strict; use warnings; use parent qw(Biber::Output::base); use Biber::Annotation; use Biber::Config; use Biber::Constants; use Biber::Entry; use Biber::Utils; use Encode; use List::AllUtils qw( :all ); use IO::File; use Log::Log4perl qw( :no_extra_logdie_message ); use Scalar::Util qw(looks_like_number); use Text::Wrap; use Unicode::Normalize; use URI; $Text::Wrap::columns = 80; my $logger = Log::Log4perl::get_logger('main'); =encoding utf-8 =head1 NAME Biber::Output::bbl - class for Biber output of .bbl =cut =head2 new Initialize a Biber::Output::bbl object =cut sub new { my $class = shift; my $obj = shift; my $self = $class->SUPER::new($obj); $self->{output_data}{HEAD} = <<~EOF; % \$ biblatex auxiliary file \$ % \$ biblatex bbl format version $Biber::Config::BBL_VERSION \$ % Do not modify the above lines! % % This is an auxiliary file used by the 'biblatex' package. % This file may safely be deleted. It will be recreated by % biber as required. % \\begingroup \\makeatletter \\\@ifundefined{ver\@biblatex.sty} {\\\@latex\@error {Missing 'biblatex' package} {The bibliography requires the 'biblatex' package.} \\aftergroup\\endinput} {} \\endgroup EOF return $self; } =head2 create_output_misc Create the output for misc bits and pieces like preamble and closing macro call and add to output object. =cut sub create_output_misc { my $self = shift; if (my $pa = $Biber::MASTER->get_preamble) { $pa = join("%\n", $pa->@*); # If requested to convert UTF-8 to macros ... if (Biber::Config->getoption('output_safechars')) { $pa = latex_recode_output($pa); } else { # ... or, check for encoding problems and force macros my $outenc = Biber::Config->getoption('output_encoding'); if ($outenc ne 'UTF-8') { # Can this entry be represented in the output encoding? if (encode($outenc, NFC($pa), sub {"\0"}) =~ /\0/) { # Malformed data encoding char # So convert to macro $pa = latex_recode_output($pa); } } } $self->{output_data}{HEAD} .= "\\preamble{%\n$pa%\n}\n\n"; } $self->{output_data}{TAIL} .= "\\endinput\n\n"; return; } =head2 _printfield Add the .bbl for a text field to the output accumulator. =cut sub _printfield { my ($be, $field, $str) = @_; my $field_type = 'field'; my $dm = Biber::Config->get_dm; return '' if is_null($str) and not $dm->field_is_nullok($field); # crossref and xref are of type 'strng' in the .bbl if (lc($field) eq 'crossref' or lc($field) eq 'xref') { $field_type = 'strng'; } # Output absolute astronomical year by default (with year 0) # biblatex will adjust the years when printed with BCE/CE eras if ($field =~ m/^(.*)(?!end)year$/) { if (my $y = $be->get_field("$1year")) { $str = abs($y) if looks_like_number($y); } } # auto-escape TeX special chars if: # * The entry is not a BibTeX entry (no auto-escaping for BibTeX data) # * It's not a string field if ($field_type ne 'strng' and $be->get_field('datatype') ne 'bibtex') { $str =~ s/(?getoption('wraplines')) { ## 16 is the length of ' \field{}{}' or ' \strng{}{}' if ( 16 + Unicode::GCString->new($field)->length + Unicode::GCString->new($str)->length > 2*$Text::Wrap::columns ) { return " \\${field_type}{$field}{%\n" . wrap(' ', ' ', $str) . "%\n }\n"; } elsif ( 16 + Unicode::GCString->new($field)->length + Unicode::GCString->new($str)->length > $Text::Wrap::columns ) { return wrap(' ', ' ', "\\${field_type}{$field}{$str}" ) . "\n"; } else { return " \\${field_type}{$field}{$str}\n"; } } else { return " \\${field_type}{$field}{$str}\n"; } return; } =head2 set_output_keyalias Set the output for a key which is an alias to another key =cut sub set_output_keyalias { my ($self, $alias, $key, $section) = @_; my $secnum = $section->number; my $acc = " \\keyalias{$alias}{$key}\n"; # Create an index by keyname for easy retrieval $self->{output_data}{ALIAS_ENTRIES}{$secnum}{index}{$alias} = \$acc; return; } =head2 set_output_undefkey Set the .bbl output for an undefined key =cut sub set_output_undefkey { my ($self, $key, $section) = @_; my $secnum = $section->number; my $acc = " \\missing{$key}\n"; # Create an index by keyname for easy retrieval $self->{output_data}{MISSING_ENTRIES}{$secnum}{index}{$key} = \$acc; return; } =head2 set_output_entry Set the .bbl output for an entry. This is the meat of the .bbl output =cut sub set_output_entry { my ($self, $be, $section, $dm) = @_; my $bee = $be->get_field('entrytype'); my $secnum = $section->number; my $key = $be->get_field('citekey'); my $acc = ''; my $dmh = $dm->{helpers}; my $un = Biber::Config->getblxoption('uniquename', $bee, $key); my $ul = Biber::Config->getblxoption('uniquelist', $bee, $key); # Skip entrytypes we don't want to output according to datamodel return if $dm->entrytype_is_skipout($bee); $acc .= " \\entry{$key}{$bee}{" . join(',', filter_entry_options($be->get_field('options'))->@*) . "}\n"; # Generate set information. # Set parents are special and need very little if ($bee eq 'set') { # Set parents get \set entry ... $acc .= " ENTRYSET\n"; # Set parents need this - it is the labelalpha from the first entry if (Biber::Config->getblxoption('labelalpha', $bee)) { $acc .= " LABELALPHA\n"; $acc .= " EXTRAALPHA\n"; } $acc .= " SORTINIT\n"; $acc .= " SORTINITHASH\n"; # labelprefix is list-specific. It is only defined if there is no shorthand # (see biblatex documentation) $acc .= " LABELPREFIX\n"; # Label can be in set parents if (my $lab = $be->get_field('label')) { $acc .= " \\field{label}{$lab}\n"; } # Annotation can be in set parents if (my $ann = $be->get_field('annotation')) { $acc .= " \\field{annotation}{$ann}\n"; } # Skip everything else # labelnumber is generated by biblatex after reading the .bbl goto ENDENTRY; } else { # Everything else that isn't a set parent ... if (my $es = $be->get_field('entryset')) { # ... gets a \inset if it's a set member $acc .= " \\inset{" . join(',', $es->@*) . "}\n"; } } # Output name fields foreach my $namefield ($dmh->{namelists}->@*) { # Performance - as little as possible here - loop over DM fields for every entry if ( my $nf = $be->get_field($namefield) ) { my $nlid = $nf->get_id; # Did we have "and others" in the data? if ( $nf->get_morenames ) { $acc .= " \\true{more$namefield}\n"; # Is this name labelname? If so, provide \morelabelname if (my $lni = $be->get_labelname_info) { if ( $lni eq $namefield ) { $acc .= " \\true{morelabelname}\n"; } } } my $total = $nf->count_names; my $lni = $be->get_labelname_info; my $nfv = ''; if (defined($lni) and $lni eq $namefield) { my @plo; # Add uniquelist if requested if ($ul) { push @plo, "UL-${nlid}"; } # Add per-namelist options foreach my $nlo (keys $CONFIG_SCOPEOPT_BIBLATEX{NAMELIST}->%*) { if (defined($nf->${\"get_$nlo"})) { my $nlov = $nf->${\"get_$nlo"}; if ($CONFIG_OPTTYPE_BIBLATEX{lc($nlo)} and $CONFIG_OPTTYPE_BIBLATEX{lc($nlo)} eq 'boolean') { $nlov = map_boolean($nlov, 'tostring'); } my $oo = expand_option($nlo, $nlov, $CONFIG_BIBLATEX_NAMELIST_OPTIONS{$nlo}->{OUTPUT}); foreach my $o ($oo->@*) { push @plo, $o->[0] . '=' . $o->[1]; } } } $nfv = join(',', @plo); } $acc .= " \\name{$namefield}{$total}{$nfv}{%\n"; foreach my $n ($nf->names->@*) { $acc .= $n->name_to_bbl($un); } $acc .= " }\n"; } } # Output list fields foreach my $listfield ($dmh->{lists}->@*) { # Performance - as little as possible here - loop over DM fields for every entry if (my $lf = $be->get_field($listfield)) { if ( lc($lf->[-1]) eq Biber::Config->getoption('others_string') ) { $acc .= " \\true{more$listfield}\n"; pop $lf->@*; # remove the last element in the array } my $total = $lf->$#* + 1; $acc .= " \\list{$listfield}{$total}{%\n"; foreach my $f ($lf->@*) { $acc .= " {$f}%\n"; } $acc .= " }\n"; } } # Output labelname hashes $acc .= " NAMEHASH\n"; my $fullhash = $be->get_field('fullhash'); $acc .= " \\strng{fullhash}{$fullhash}\n" if $fullhash; $acc .= " BIBNAMEHASH\n"; # Output namelist hashes foreach my $namefield ($dmh->{namelists}->@*) { next unless $be->get_field($namefield); $acc .= " ${namefield}BIBNAMEHASH\n"; $acc .= " ${namefield}NAMEHASH\n"; if (my $fullhash = $be->get_field("${namefield}fullhash")) { $acc .= " \\strng{${namefield}fullhash}{$fullhash}\n"; } } if ( Biber::Config->getblxoption('labelalpha', $bee) ) { $acc .= " LABELALPHA\n"; } $acc .= " SORTINIT\n"; $acc .= " SORTINITHASH\n"; # The labeldateparts option determines whether "extradate" is output if (Biber::Config->getblxoption('labeldateparts', $bee)) { $acc .= " EXTRADATE\n"; if (my $edscope = $be->get_field('extradatescope')) { $acc .= " \\field{extradatescope}{$edscope}\n"; } if ($be->field_exists('labeldatesource')) { $acc .= " \\field{labeldatesource}{" . $be->get_field('labeldatesource') . "}\n"; } } # labelprefix is list-specific. It is only defined if there is no shorthand # (see biblatex documentation) unless ($be->get_field('shorthand')) { $acc .= " LABELPREFIX\n"; } # The labeltitle option determines whether "extratitle" is output if ( Biber::Config->getblxoption('labeltitle', $bee)) { $acc .= " EXTRATITLE\n"; } # The labeltitleyear option determines whether "extratitleyear" is output if ( Biber::Config->getblxoption('labeltitleyear', $bee)) { $acc .= " EXTRATITLEYEAR\n"; } # The labelalpha option determines whether "extraalpha" is output if ( Biber::Config->getblxoption('labelalpha', $bee)) { $acc .= " EXTRAALPHA\n"; } if (defined($be->get_field('crossrefsource'))) { $acc .= " \\true{crossrefsource}\n"; } if (defined($be->get_field('xrefsource'))) { $acc .= " \\true{xrefsource}\n"; } $acc .= " SINGLETITLE\n"; $acc .= " UNIQUETITLE\n"; $acc .= " UNIQUEBARETITLE\n"; $acc .= " UNIQUEWORK\n"; $acc .= " UNIQUEPRIMARYAUTHOR\n"; # The source field for labelname if (my $lni = $be->get_labelname_info) { $acc .= " \\field{labelnamesource}{$lni}\n"; } # The source field for labeltitle if (my $lti = $be->get_labeltitle_info) { $acc .= " \\field{labeltitlesource}{$lti}\n"; } if (my $ck = $be->get_field('clonesourcekey')) { $acc .= " \\field{clonesourcekey}{$ck}\n"; } foreach my $field ($dmh->{fields}->@*) { # Performance - as little as possible here - loop over DM fields for every entry my $val = $be->get_field($field); if ( length($val) or # length() catches '0' values, which we want ($dm->field_is_nullok($field) and $be->field_exists($field)) ) { # we skip outputting the crossref or xref when the parent is not cited # (biblatex manual, section 2.2.3) # sets are a special case so always output crossref/xref for them since their # children will always be in the .bbl otherwise they make no sense. unless ($bee eq 'set') { next if ($field eq 'crossref' and not $section->has_citekey($be->get_field('crossref'))); next if ($field eq 'xref' and not $section->has_citekey($be->get_field('xref'))); } $acc .= _printfield($be, $field, $val); } } # Date meta-information foreach my $d ($dmh->{datefields}->@*) { $d =~ s/date$//; # Unspecified granularity if (my $unspec = $be->get_field("${d}dateunspecified")) { $acc .= " \\field{${d}dateunspecified}{$unspec}\n"; } # Julian dates if ($be->get_field("${d}datejulian")) { $acc .= " \\true{${d}datejulian}\n"; } if ($be->get_field("${d}enddatejulian")) { $acc .= " \\true{${d}enddatejulian}\n"; } # Circa dates if ($be->get_field("${d}datecirca")) { $acc .= " \\true{${d}datecirca}\n"; } if ($be->get_field("${d}enddatecirca")) { $acc .= " \\true{${d}enddatecirca}\n"; } # Uncertain dates if ($be->get_field("${d}dateuncertain")) { $acc .= " \\true{${d}dateuncertain}\n"; } if ($be->get_field("${d}enddateuncertain")) { $acc .= " \\true{${d}enddateuncertain}\n"; } # Unknown dates if ($be->get_field("${d}dateunknown")) { $acc .= " \\true{${d}dateunknown}\n"; } if ($be->get_field("${d}enddateunknown")) { $acc .= " \\true{${d}enddateunknown}\n"; } # Output enddateera if ($be->field_exists("${d}endyear")) { # use exists test as could be year 0000 if (my $era = $be->get_field("${d}endera")) { $acc .= " \\field{${d}enddateera}{$era}\n"; } } # Only output era for date if: # The field is "year" and it came from splitting a date # The field is any other startyear if ($be->field_exists("${d}year")) { # use exists test as could be year 0000 next unless $be->get_field("${d}datesplit"); if (my $era = $be->get_field("${d}era")) { $acc .= " \\field{${d}dateera}{$era}\n"; } } } # XSV fields foreach my $field ($dmh->{xsv}->@*) { if (my $f = $be->get_field($field)) { $acc .= _printfield($be, $field, join(',', $f->@*) ); } } foreach my $rfield ($dmh->{ranges}->@*) { # Performance - as little as possible here - loop over DM fields for every entry if ( my $rf = $be->get_field($rfield) ) { # range fields are an array ref of two-element array refs [range_start, range_end] # range_end can be be empty for open-ended range or undef my @pr; foreach my $f ($rf->@*) { if (defined($f->[1])) { push @pr, $f->[0] . '\bibrangedash' . ($f->[1] ? ' ' . $f->[1] : ''); } else { push @pr, $f->[0]; } } my $bbl_rf = join('\bibrangessep ', @pr); $acc .= " \\field{$rfield}{$bbl_rf}\n"; $acc .= " \\range{$rfield}{" . rangelen($rf) . "}\n"; } } # verbatim fields foreach my $vfield ($dmh->{vfields}->@*) { # Performance - as little as possible here - loop over DM fields for every entry if ( my $vf = $be->get_field($vfield) ) { if ($vfield eq 'url') { $acc .= " \\verb{urlraw}\n"; $acc .= " \\verb $vf\n \\endverb\n"; # Unicode NFC boundary (before hex encoding) $vf = URI->new(NFC($vf))->as_string; } $acc .= " \\verb{$vfield}\n"; $acc .= " \\verb $vf\n \\endverb\n"; } } # verbatim lists foreach my $vlist ($dmh->{vlists}->@*) { if ( my $vlf = $be->get_field($vlist) ) { if ( lc($vlf->[-1]) eq Biber::Config->getoption('others_string') ) { $acc .= " \\true{more$vlist}\n"; pop $vlf->@*; # remove the last element in the array } my $total = $vlf->$#* + 1; $acc .= " \\lverb{$vlist}{$total}\n"; foreach my $f ($vlf->@*) { if ($vlist eq 'urls') { # Unicode NFC boundary (before hex encoding) $f = URI->new(NFC($f))->as_string; } $acc .= " \\lverb $f\n"; } $acc .= " \\endlverb\n"; } } if ( my $k = $be->get_field('keywords') ) { $k = join(',', $k->@*); $acc .= " \\keyw{$k}\n"; } # Output annotations foreach my $f (Biber::Annotation->get_annotated_fields('field', $key)) { my $v = Biber::Annotation->get_annotation('field', $key, $f); $acc .= " \\annotation{field}{$f}{}{}{$v}\n"; } foreach my $f (Biber::Annotation->get_annotated_fields('item', $key)) { foreach my $c (Biber::Annotation->get_annotated_items('item', $key, $f)) { my $v = Biber::Annotation->get_annotation('item', $key, $f, $c); $acc .= " \\annotation{item}{$f}{$c}{}{$v}\n"; } } foreach my $f (Biber::Annotation->get_annotated_fields('part', $key)) { foreach my $c (Biber::Annotation->get_annotated_items('part', $key, $f)) { foreach my $p (Biber::Annotation->get_annotated_parts('part', $key, $f, $c)) { my $v = Biber::Annotation->get_annotation('part', $key, $f, $c, $p); $acc .= " \\annotation{part}{$f}{$c}{$p}{$v}\n"; } } } # Append any warnings to the entry, if any if (my $w = $be->get_field('warnings')) { foreach my $warning ($w->@*) { $acc .= " \\warn{\\item $warning}\n"; } } ENDENTRY: $acc .= " \\endentry\n"; # Create an index by keyname for easy retrieval $self->{output_data}{ENTRIES}{$secnum}{index}{$key} = \$acc; return; } =head2 output BBL output method - this takes care to output entries in the explicit order derived from the virtual order of the citekeys after sortkey sorting. =cut sub output { my $self = shift; my $data = $self->{output_data}; my $target = $self->{output_target}; my $target_string = "Target"; # Default if ($self->{output_target_file}) { $target_string = $self->{output_target_file}; } # for debugging mainly unless ($target) { $target = new IO::File '>-'; } if ($logger->is_debug()) {# performance tune $logger->debug('Preparing final output using class ' . __PACKAGE__ . '...'); } $logger->info("Writing '$target_string' with encoding '" . Biber::Config->getoption('output_encoding') . "'"); $logger->info('Converting UTF-8 to TeX macros on output to .bbl') if Biber::Config->getoption('output_safechars'); out($target, $data->{HEAD}); foreach my $secnum (sort keys $data->{ENTRIES}->%*) { if ($logger->is_debug()) {# performance tune $logger->debug("Writing entries for section $secnum"); } out($target, "\n\\refsection{$secnum}\n"); my $section = $self->get_output_section($secnum); my @lists; # Need to reshuffle list to put global sort order list at end, see below # This sort is cosmetic, just to order the lists in a predictable way in the .bbl # but omit global sort lists so that we can add them last foreach my $list (sort {$a->get_sortingtemplatename cmp $b->get_sortingtemplatename} $Biber::MASTER->datalists->get_lists_for_section($secnum)->@*) { if ($list->get_sortingtemplatename eq Biber::Config->getblxoption('sortingtemplatename') and $list->get_type eq 'entry') { next; } push @lists, $list; } # biblatex requires the last list in the .bbl to be the global sort list # due to its sequential reading of the .bbl as the final list overrides the # previously read ones and the global list determines the order of labelnumber # and sortcites etc. when not using defernumbers push @lists, $Biber::MASTER->datalists->get_lists_by_attrs(section => $secnum, type => 'entry', sortingtemplatename => Biber::Config->getblxoption('sortingtemplatename'))->@*; foreach my $list (@lists) { next unless $list->count_keys; # skip empty lists my $listtype = $list->get_type; my $listname = $list->get_name; if ($logger->is_debug()) {# performance tune $logger->debug("Writing entries in '$listname' list of type '$listtype'"); } out($target, " \\datalist[$listtype]{$listname}\n"); # The order of this array is the sorted order foreach my $k ($list->get_keys->@*) { if ($logger->is_debug()) {# performance tune $logger->debug("Writing entry for key '$k'"); } my $entry = $data->{ENTRIES}{$secnum}{index}{$k}; # Instantiate any dynamic, list specific entry information my $entry_string = $list->instantiate_entry($section, $entry, $k); # If requested to convert UTF-8 to macros ... if (Biber::Config->getoption('output_safechars')) { $entry_string = latex_recode_output($entry_string); } else { # ... or, check for encoding problems and force macros my $outenc = Biber::Config->getoption('output_encoding'); if ($outenc ne 'UTF-8') { # Can this entry be represented in the output encoding? # We must have an ASCII-safe replacement string for encode which is unlikely to be # in the string. Default is "?" which could easily be in URLS so we choose ASCII null if (encode($outenc, NFC($entry_string), sub {"\0"}) =~ /\0/) { # Malformed data encoding char # So convert to macro $entry_string = latex_recode_output($entry_string); biber_warn("The entry '$k' has characters which cannot be encoded in '$outenc'. Recoding problematic characters into macros."); } } } # If requested, add a printable sorting key to the output - useful for debugging if (Biber::Config->getoption('sortdebug')) { $entry_string = " % sorting key for '$k':\n % " . $list->get_sortdata_for_key($k)->[0] . "\n" . $entry_string; } # Now output out($target, $entry_string); } out($target, " \\enddatalist\n"); } # Aliases # Use sort to guarantee deterministic order for things like latexmk foreach my $ks (sort keys $data->{ALIAS_ENTRIES}{$secnum}{index}->%*) { out($target, $data->{ALIAS_ENTRIES}{$secnum}{index}{$ks}->$*); } # Missing keys # Use sort to guarantee deterministic order for things like latexmk foreach my $ks (sort keys $data->{MISSING_ENTRIES}{$secnum}{index}->%*) { out($target, $data->{MISSING_ENTRIES}{$secnum}{index}{$ks}->$*); } out($target, "\\endrefsection\n"); } out($target, $data->{TAIL}); $logger->info("Output to $target_string"); close $target; return; } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Output/biblatexml.pm000444000153000001 4044413205066062 21436 0ustar00vboxother000000000000package Biber::Output::biblatexml; use v5.24; use strict; use warnings; use parent qw(Biber::Output::base); use Biber::Annotation; use Biber::Config; use Biber::Constants; use Biber::Utils; use List::AllUtils qw( :all ); use Encode; use IO::File; use Log::Log4perl qw( :no_extra_logdie_message ); use XML::Writer; use Unicode::Normalize; my $logger = Log::Log4perl::get_logger('main'); =encoding utf-8 =head1 NAME Biber::Output::biblatexml - class for biblatexml output of tool mode =cut =head2 new Initialize a Biber::Output::biblatexml object =cut sub new { my $class = shift; my $obj = shift; my $self; if (defined($obj) and ref($obj) eq 'HASH') { $self = bless $obj, $class; } else { $self = bless {}, $class; } return $self; } =head2 set_output_target_file Set the output target file of a Biber::Output::biblatexml object A convenience around set_output_target so we can keep track of the filename =cut sub set_output_target_file { my ($self, $toolfile, $init) = @_; # biblatexml output is only in tool mode and so we are looking at a data source name in # $ARGV[0] my $exts = join('|', values %DS_EXTENSIONS); my $schemafile = Biber::Config->getoption('dsn') =~ s/\.(?:$exts)$/.rng/r; $self->{output_target_file} = $toolfile; # Initialise any output object like an XML Writer if ($init) { my $bltxml = 'http://biblatex-biber.sourceforge.net/biblatexml'; $self->{xml_prefix} = $bltxml; my $of; if ($toolfile eq '-') { open($of, '>&:encoding(UTF-8)', STDOUT); } else { $of = IO::File->new($toolfile, '>:encoding(UTF-8)'); } $of->autoflush; # Needed for running tests to string refs my $xml = XML::Writer->new(OUTPUT => $of, ENCODING => 'UTF-8', DATA_MODE => 1, DATA_INDENT => Biber::Config->getoption('output_indent'), NAMESPACES => 1, PREFIX_MAP => {$bltxml => 'bltx'}); $xml->xmlDecl(); $xml->pi('xml-model', "href=\"$schemafile\" type=\"application/xml\" schematypens=\"http://relaxng.org/ns/structure/1.0\""); $xml->comment("Auto-generated by Biber::Output::biblatexml"); $xml->startTag([$self->{xml_prefix}, 'entries']); return $xml; } return; } =head2 set_output_entry Set the output for an entry =cut sub set_output_entry { my $self = shift; my $be = shift; # Biber::Entry object my $bee = $be->get_field('entrytype'); my $section = shift; # Section object the entry occurs in my $dm = shift; # Data Model object my $dmh = Biber::Config->get_dm_helpers; my $secnum = $section->number; my $key = $be->get_field('citekey'); my $xml = $self->{output_target}; my $xml_prefix = $self->{xml_prefix}; $xml->startTag([$xml_prefix, 'entry'], id => NFC($key), entrytype => NFC($bee)); # Filter aliases which point to this key an insert them if (my @ids = sort grep {$section->get_citekey_alias($_) eq $key} $section->get_citekey_aliases) { $xml->startTag([$xml_prefix, 'ids']); foreach my $id (@ids) { $xml->dataElement([$xml_prefix, 'key'], NFC($id)); } $xml->endTag();# ids } # If CROSSREF and XDATA have been resolved, don't output them # We can't use the usual skipout test for fields not to be output # as this only refers to .bbl output and not to biblatexml output since this # latter is not really a "processed" output, it is supposed to be something # which could be again used as input and so we don't want to resolve/skip # fields like DATE etc. unless (Biber::Config->getoption('output_resolve_xdata')) { if (my $xdata = $be->get_field('xdata')) { $xml->startTag([$xml_prefix, 'xdata']); foreach my $xd ($xdata->@*) { $xml->dataElement([$xml_prefix, 'key'], NFC($xd)); } $xml->endTag(); } } unless (Biber::Config->getoption('output_resolve_crossrefs')) { if (my $crossref = $be->get_field('crossref')) { $xml->dataElement([$xml_prefix, 'crossref'], NFC($crossref)); } } # Per-entry options my @entryoptions; foreach my $opt (Biber::Config->getblxentryoptions($key)) { push @entryoptions, $opt . '=' . Biber::Config->getblxoption($opt, undef, $key); } $xml->dataElement([$xml_prefix, 'options'], NFC(join(',', @entryoptions))) if @entryoptions; # Output name fields foreach my $namefield ($dm->get_fields_of_type('list', 'name')->@*) { # Name loop if (my $nf = $be->get_field($namefield)) { my @attrs = ('type' => $namefield); # Did we have "and others" in the data? if ( $nf->get_morenames ) { push @attrs, (morenames => 1); } # Add per-namelist options foreach my $nlo (keys $CONFIG_SCOPEOPT_BIBLATEX{NAMELIST}->%*) { if (defined($nf->${\"get_$nlo"})) { my $nlov = $nf->${\"get_$nlo"}; if ($CONFIG_OPTTYPE_BIBLATEX{lc($nlo)} and $CONFIG_OPTTYPE_BIBLATEX{lc($nlo)} eq 'boolean') { $nlov = map_boolean($nlov, 'tostring'); } my $oo = expand_option($nlo, $nlov, $CONFIG_BIBLATEX_NAMELIST_OPTIONS{$nlo}->{OUTPUT}); foreach my $o ($oo->@*) { push @attrs, ($o->[0] => $o->[1]); } } } # names scope annotation if (my $ann = Biber::Annotation->get_annotation('field', $key, $namefield)) { push @attrs, ('annotation' => $ann); } $xml->startTag([$xml_prefix, 'names'], @attrs); foreach my $n ($nf->names->@*) { $n->name_to_biblatexml($self, $xml, $key, $namefield, $n->get_index); } $xml->endTag(); # Names } } # Output list fields foreach my $listfield (sort $dm->get_fields_of_fieldtype('list')->@*) { next if $dm->field_is_datatype('name', $listfield); # name is a special list # List loop if (my $lf = $be->get_field($listfield)) { my @attrs; # Did we have a "more" list? if (lc($lf->[-1]) eq Biber::Config->getoption('others_string') ) { push @attrs, (morelist => 1); pop $lf->@*; # remove the last element in the array } # list scope annotation if (my $ann = Biber::Annotation->get_annotation('field', $key, $listfield)) { push @attrs, ('annotation' => $ann); } $xml->startTag([$xml_prefix, $listfield], @attrs); $xml->startTag([$xml_prefix, 'list']); # List loop my $itemcount = 1; foreach my $f ($lf->@*) { my @lattrs; # item scope annotation if (my $ann = Biber::Annotation->get_annotation('item', $key, $listfield, $itemcount++)) { push @lattrs, ('annotation' => $ann); } $xml->dataElement([$xml_prefix, 'item'], NFC($f), @lattrs); } $xml->endTag(); # list $xml->endTag(); # listfield } } # Standard fields foreach my $field (sort $dm->get_fields_of_type('field', ['entrykey', 'key', 'literal', 'code', 'integer', 'verbatim', 'uri'])->@*) { my $val = $be->get_field($field); if (length($val) or # length() catches '0' values, which we want ($dm->field_is_nullok($field) and $be->field_exists($field))) { next if $dm->get_fieldformat($field) eq 'xsv'; next if $field eq 'crossref'; # this is handled above my @attrs; # field scope annotation if (my $ann = Biber::Annotation->get_annotation('field', $key, $field)) { push @attrs, ('annotation' => $ann); } $xml->dataElement([$xml_prefix, $field], NFC($val), @attrs); } } # xsv fields foreach my $xsvf ($dm->get_fields_of_type('field', 'xsv')->@*) { if (my $f = $be->get_field($xsvf)) { next if $xsvf eq 'ids'; # IDS is special next if $xsvf eq 'xdata'; # XDATA is special my @attrs; # field scope annotation if (my $ann = Biber::Annotation->get_annotation('field', $key, $xsvf)) { push @attrs, ('annotation' => $ann); } $xml->dataElement([$xml_prefix, $xsvf], NFC(join(',',$f->@*))); } } # Range fields foreach my $rfield (sort $dm->get_fields_of_datatype('range')->@*) { if ( my $rf = $be->get_field($rfield) ) { # range fields are an array ref of two-element array refs [range_start, range_end] # range_end can be be empty for open-ended range or undef $xml->startTag([$xml_prefix, $rfield]); $xml->startTag([$xml_prefix, 'list']); foreach my $f ($rf->@*) { $xml->startTag([$xml_prefix, 'item']); if (defined($f->[1])) { $xml->dataElement([$xml_prefix, 'start'], NFC($f->[0])); $xml->dataElement([$xml_prefix, 'end'], NFC($f->[1])); } else { $xml->characters(NFC($f->[0])); } $xml->endTag();# item } $xml->endTag();# list $xml->endTag();# range } } # Date fields my %dinfo; foreach my $datefield (sort $dm->get_fields_of_datatype('date')->@*) { my @attrs; my @start; my @end; my $overridey; my $overridem; my $overrideem; my $overrided; my ($d) = $datefield =~ m/^(.*)date$/; if (my $sf = $be->get_field("${d}year") ) { # date exists if there is a year push @attrs, ('type', $d) if $d; # ignore for main date $xml->startTag([$xml_prefix, 'date'], @attrs); # Uncertain dates if ($be->get_field("${d}dateuncertain")) { $sf .= '?'; } # Unknown dates if ($be->get_field("${d}dateunknown")) { $sf = 'unknown'; } # Circa dates if ($be->get_field("${d}datecirca")) { $sf .= '~'; } my %seasons = ( 'spring' => 21, 'summer' => 22, 'autumn' => 23, 'winter' => 24 ); # Did the date fields come from interpreting an EDTF 5.2.2 unspecified date? # If so, do the reverse of Biber::Utils::parse_date_edtf_unspecified() if (my $unspec = $be->get_field("${d}dateunspecified")) { # 1990/1999 -> 199u if ($unspec eq 'yearindecade') { my ($decade) = $be->get_field("${d}year") =~ m/^(\d+)\d$/; $overridey = "${decade}u"; $be->del_field("${d}endyear"); } # 1900/1999 -> 19uu elsif ($unspec eq 'yearincentury') { my ($century) = $be->get_field("${d}year") =~ m/^(\d+)\d\d$/; $overridey = "${century}uu"; $be->del_field("${d}endyear"); } # 1999-01/1999-12 => 1999-uu elsif ($unspec eq 'monthinyear') { $overridem = 'uu'; $be->del_field("${d}endyear"); $be->del_field("${d}endmonth"); } # 1999-01-01/1999-01-31 -> 1999-01-uu elsif ($unspec eq 'dayinmonth') { $overrided = 'uu'; $be->del_field("${d}endyear"); $be->del_field("${d}endmonth"); $be->del_field("${d}endday"); } # 1999-01-01/1999-12-31 -> 1999-uu-uu elsif ($unspec eq 'dayinyear') { $overridem = 'uu'; $overrided = 'uu'; $be->del_field("${d}endyear"); $be->del_field("${d}endmonth"); $be->del_field("${d}endday"); } } # Seasons derived from EDTF dates if (my $s = $be->get_field("${d}season")) { $overridem = $seasons{$s}; } if (my $s = $be->get_field("${d}endseason")) { $overrideem = $seasons{$s}; } $sf = $overridey || $sf; # strip undefs push @start, grep {$_} $sf, edtf_monthday($overridem || $be->get_field("${d}month")), edtf_monthday($overrided || $be->get_field("${d}day")); push @end, grep {defined($_)} # because end can be def but empty $be->get_field("${d}endyear"), edtf_monthday($overrideem || $be->get_field("${d}endmonth")), edtf_monthday($be->get_field("${d}endday")); # Date range if (@end) { my $start = NFC(join('-', @start)); my $end = NFC(join('-', @end)); # If start hour, there must be minute and second if (my $sh = $be->get_field("${d}hour")) { $start .= NFC('T' . sprintf('%.2d', $sh) . ':' . sprintf('%.2d', $be->get_field("${d}minute")) . ':' . sprintf('%.2d', $be->get_field("${d}second"))); } # start timezone if (my $stz = $be->get_field("${d}timezone")) { $stz =~ s/\\bibtzminsep\s+/:/; $start .= NFC($stz); } # If end hour, there must be minute and second if (my $eh = $be->get_field("${d}endhour")) { $end .= NFC('T' . sprintf('%.2d', $eh) . ':' . sprintf('%.2d', $be->get_field("${d}endminute")) . ':' . sprintf('%.2d', $be->get_field("${d}endsecond"))); } # end timezone if (my $etz = $be->get_field("${d}endtimezone")) { $etz =~ s/\\bibtzminsep\s+/:/; $end .= NFC($etz); } $xml->dataElement([$xml_prefix, 'start'], $start); $xml->dataElement([$xml_prefix, 'end'], $end); } else { # simple date $xml->characters(NFC(join('-', @start))); # If start hour, there must be minute and second if (my $sh = $be->get_field("${d}hour")) { $xml->characters(NFC('T' . sprintf('%.2d', $sh) . ':' . sprintf('%.2d', $be->get_field("${d}minute")) . ':' . sprintf('%.2d', $be->get_field("${d}second")))); } # start timezone if (my $stz = $be->get_field("${d}timezone")) { $stz =~ s/\\bibtzminsep\s+/:/; $xml->characters(NFC($stz)); } } $xml->endTag(); # date } } $xml->endTag(); return; } =head2 output Tool output method =cut sub output { my $self = shift; my $data = $self->{output_data}; my $xml = $self->{output_target}; my $target_string = "Target"; # Default my $dm = Biber::Config->get_dm; if ($self->{output_target_file}) { $target_string = $self->{output_target_file}; } if ($logger->is_debug()) {# performance tune $logger->debug('Preparing final output using class ' . __PACKAGE__ . '...'); $logger->debug("Writing entries in tool mode"); } $xml->endTag(); $xml->end(); $logger->info("Output to $target_string"); my $exts = join('|', values %DS_EXTENSIONS); my $schemafile = Biber::Config->getoption('dsn') =~ s/\.(?:$exts)$/.rng/r; # Generate schema to accompany output unless (Biber::Config->getoption('no_bltxml_schema')) { $dm->generate_bltxml_schema($schemafile); } if (Biber::Config->getoption('validate_bltxml')) { validate_biber_xml($target_string, 'bltx', 'http://biblatex-biber.sourceforge.net/biblatexml', $schemafile); } return; } =head2 create_output_section Create the output from the sections data and push it into the output object. =cut sub create_output_section { my $self = shift; my $secnum = $Biber::MASTER->get_current_section; my $section = $Biber::MASTER->sections->get_section($secnum); # We rely on the order of this array for the order of the .bbl foreach my $k ($section->get_citekeys) { # Regular entry my $be = $section->bibentry($k) or biber_error("Cannot find entry with key '$k' to output"); $self->set_output_entry($be, $section, Biber::Config->get_dm); } # Make sure the output object knows about the output section $self->set_output_section($secnum, $section); return; } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Output/base.pm000444000153000001 2357413205066062 20232 0ustar00vboxother000000000000package Biber::Output::base; use v5.24; use strict; use warnings; use Biber::Entry; use Biber::Utils; use Encode; use IO::File; use Text::Wrap; $Text::Wrap::columns = 80; use Log::Log4perl qw( :no_extra_logdie_message ); use Unicode::Normalize; my $logger = Log::Log4perl::get_logger('main'); =encoding utf-8 =head1 NAME Biber::Output::base - base class for Biber output modules. =cut =head2 new Initialize a Biber::Output::base object =cut sub new { my $class = shift; my $obj = shift; my $self; if (defined($obj) and ref($obj) eq 'HASH') { $self = bless $obj, $class; } else { $self = bless {}, $class; } $self->{output_data}{HEAD} = ''; $self->{output_data}{TAIL} = ''; return $self; } =head2 set_output_target_file Set the output target file of a Biber::Output::base object A convenience around set_output_target so we can keep track of the filename. Returns an IO::File object for the target =cut sub set_output_target_file { my ($self, $file, $init) = @_; $self->{output_target_file} = $file; my $enc_out; if (my $enc = Biber::Config->getoption('output_encoding')) { $enc_out = ":encoding($enc)"; } return IO::File->new($file, ">$enc_out"); } =head2 get_output_target_file Get the output target file name =cut sub get_output_target_file { my $self = shift; return $self->{output_target_file}; } =head2 set_output_target Set the output target of a Biber::Output::base object =cut sub set_output_target { my $self = shift; my $target = shift; $self->{output_target} = $target; return; } =head2 set_output_head Set the output head of a Biber::Output::base object $data could be anything - the caller is expected to know. =cut sub set_output_head { my $self = shift; my $data = shift; $self->{output_data}{HEAD} = $data; return; } =head2 set_output_tail Set the output tail of a Biber::Output::base object $data could be anything - the caller is expected to know. =cut sub set_output_tail { my $self = shift; my $data = shift; $self->{output_data}{TAIL} = $data; return; } =head2 get_output_head Get the output head of a Biber::Output object $data could be anything - the caller is expected to know. Mainly used in debugging =cut sub get_output_head { my $self = shift; return $self->{output_data}{HEAD}; } =head2 get_output_tail Get the output tail of a Biber::Output object $data could be anything - the caller is expected to know. Mainly used in debugging =cut sub get_output_tail { my $self = shift; return $self->{output_data}{TAIL}; } =head2 add_output_head Add to the head output data of a Biber::Output::base object The base class method just does a string append =cut sub add_output_head { my $self = shift; my $data = shift; $self->{output_data}{HEAD} .= $data; return; } =head2 add_output_tail Add to the tail output data of a Biber::Output::base object The base class method just does a string append =cut sub add_output_tail { my $self = shift; my $data = shift; $self->{output_data}{TAIL} .= $data; return; } =head2 set_output_section Records the section object in the output object We need some information from this when writing the output =cut sub set_output_section { my $self = shift; my $secnum = shift; my $section = shift; $self->{section}{$secnum} = $section; return; } =head2 get_output_section Retrieve the output section object =cut sub get_output_section { my $self = shift; my $secnum = shift; return $self->{section}{$secnum}; } =head2 get_output_entries Get the sorted order output data for all entries in a list as array ref Used really only in tests as it instantiates list dynamic information so we can see it in tests. As a result, we have to NFC() the result to mimic real output since UTF-8 output is assumed in most tests. =cut sub get_output_entries { my $self = shift; my $section = shift; my $list = shift; return [ map {$self->{output_data}{ENTRIES}{$section}{index}{$_} || $self->{output_data}{MISSING_ENTRIES}{$section}{index}{$_} || $self->{output_data}{ALIAS_ENTRIES}{$section}{index}{$_}} $list->get_keys->@*]; } =head2 get_output_comments Get the output comments for tool mode tests =cut sub get_output_comments { my $self = shift; return $self->{output_data}{COMMENTS}; } =head2 get_output_entry Get the output data for a specific entry. Used really only in tests as it instantiates list dynamic information so we can see it in tests. As a result, we have to NFC() the result to mimic real output since UTF-8 output is assumed in most tests. =cut sub get_output_entry { my ($self, $key, $list, $secnum) = @_; # defaults - mainly for tests if (not defined($secnum)) { if (Biber::Config->getoption('tool') or Biber::Config->getoption('output_format') eq 'bibtex') { $secnum = 99999; } else { $secnum = 0; } } my $section = $self->get_output_section($secnum); # Force a return of undef if there is no output for this key to avoid # dereferencing errors in tests my $out = $self->{output_data}{ENTRIES}{$secnum}{index}{$key} || $self->{output_data}{MISSING_ENTRIES}{$secnum}{index}{$key} || $self->{output_data}{ALIAS_ENTRIES}{$secnum}{index}{$key}; my $out_string = $list ? $list->instantiate_entry($section, $out, $key) : $out; # If requested to convert UTF-8 to macros ... if (Biber::Config->getoption('output_safechars')) { $out_string = latex_recode_output($out_string); } else { # ... or, check for encoding problems and force macros my $outenc = Biber::Config->getoption('output_encoding'); if ($outenc ne 'UTF-8') { # Can this entry be represented in the output encoding? if (encode($outenc, NFC($out_string)) =~ /\?/) { # Malformed data encoding char # So convert to macro $out_string = latex_recode_output($out_string); biber_warn("The entry '$key' has characters which cannot be encoded in '$outenc'. Recoding problematic characters into macros."); } } } # Sometimes $out_string might still be a scalar ref (tool mode, for example which doesn't use # sort lists) return $out ? (ref($out_string) eq 'SCALAR' ? NFC($$out_string) : NFC($out_string)) : undef; } =head2 set_output_entry Add an entry output to a Biber::Output::base object The base class method just does a dump =cut sub set_output_entry { my $self = shift; my $entry = shift; my $secnum = shift; my $struc = shift; $self->{output_data}{ENTRIES}{$secnum}{index}{$entry->get_field('citekey')} = $entry->dump; return; } =head2 create_output_misc Create the output for misc bits and pieces like preamble and closing macro call and add to output object. =cut sub create_output_misc { return; } =head2 create_output_section Create the output from the sections data and push it into the output object. =cut sub create_output_section { my $self = shift; my $secnum = $Biber::MASTER->get_current_section; my $section = $Biber::MASTER->sections->get_section($secnum); # We rely on the order of this array for the order of the ouput foreach my $k ($section->get_citekeys) { # Regular entry my $be = $section->bibentry($k) or biber_error("Cannot find entry with key '$k' to output"); $self->set_output_entry($be, $section, Biber::Config->get_dm); } # Make sure the output object knows about the output section $self->set_output_section($secnum, $section); # undef citekeys are global to a section # Missing citekeys foreach my $k ($section->get_undef_citekeys) { $self->set_output_undefkey($k, $section); } # alias citekeys are global to a section foreach my $k ($section->get_citekey_aliases) { my $realkey = $section->get_citekey_alias($k); $self->set_output_keyalias($k, $realkey, $section) } return; } =head2 set_output_keyalias Set the output for a key which is an alias to another key =cut sub set_output_keyalias { return; } =head2 set_output_undefkey Set the output for an undefined key =cut sub set_output_undefkey { return; } =head2 output Generic base output method =cut sub output { my $self = shift; my $data = $self->{output_data}; my $target = $self->{output_target}; my $target_string = "Target"; # Default if ($self->{output_target_file}) { $target_string = $self->{output_target_file}; } if ($logger->is_debug()) {# performance tune $logger->debug('Preparing final output using class ' . __PACKAGE__ . '...'); } $logger->info("Writing '$target_string' with encoding '" . Biber::Config->getoption('output_encoding') . "'"); out($target, $data->{HEAD}); foreach my $secnum (sort keys $data->{ENTRIES}->%*) { out($target, "SECTION: $secnum\n\n"); my $section = $self->get_output_section($secnum); foreach my $list ($section->get_lists->@*) { my $listlabel = $list->get_label; my $listtype = $list->get_type; out($target, " LIST: $listlabel\n\n"); foreach my $k ($list->get_keys->@*) { my $entry_string = $data->{ENTRIES}{$secnum}{index}{$k}; out($target, $entry_string); } } } out($target, $data->{TAIL}); $logger->info("Output to $target_string"); close $target; return; } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/LaTeX000755000153000001 013205066062 16247 5ustar00vboxother000000000000biblatex-biber-2.9/lib/Biber/LaTeX/recode_data.xml000444000153000001 16642413205066061 21434 0ustar00vboxother000000000000 AA Å AE Æ DH Ð O Ø Thorn Þ TH Þ ss ß aa å ae æ dh ð o ø textthorn þ textthornvari þ textthornvarii þ textthornvariii þ textthornvariv þ th þ DJ Đ dj đ textcrd đ textHbar Ħ textcrh ħ texthbar ħ i ı j ȷ IJ IJ ij ij textkra ĸ L Ł textbarl ł l ł NG Ŋ ng ŋ OE Œ oe œ textTbar Ŧ textTstroke Ŧ texttbar ŧ texttstroke ŧ textcrb ƀ textBhook Ɓ textOopen Ɔ textChook Ƈ textchook ƈ texthtc ƈ textDafrican Ɖ textDhook Ɗ textEreversed Ǝ textEopen Ɛ textFhook Ƒ textflorin ƒ textGammaafrican Ɣ texthvlig ƕ hv ƕ textIotaafrican Ɩ textKhook Ƙ textkhook ƙ texthtk ƙ textcrlambda ƛ textNhookleft Ɲ OHORN Ơ ohorn ơ textPhook Ƥ textphook ƥ texthtp ƥ textEsh Ʃ ESH Ʃ textlooptoprevesh ƪ textpalhookbelow ƫ textThook Ƭ textthook ƭ texthtt ƭ textTretroflexhook Ʈ UHORN Ư uhorn ư textVhook Ʋ textYhook Ƴ textyhook ƴ textEzh Ʒ texteturned ǝ textturna ɐ textscripta ɑ textturnscripta ɒ textbhook ɓ texthtb ɓ textoopen ɔ textopeno ɔ textctc ɕ textdtail ɖ textrtaild ɖ textdhook ɗ texthtd ɗ textreve ɘ textschwa ə textrhookschwa ɚ texteopen ɛ textepsilon ɛ textrevepsilon ɜ textrhookrevepsilon ɝ textcloserevepsilon ɞ textbardotlessj ɟ texthtg ɠ textscriptg ɡ textscg ɢ textgammalatinsmall ɣ textgamma ɣ textramshorns ɤ textturnh ɥ texthth ɦ texththeng ɧ textbari ɨ textiotalatin ɩ textiota ɩ textsci ɪ textltilde ɫ textbeltl ɬ textrtaill ɭ textlyoghlig ɮ textturnm ɯ textturnmrleg ɰ textltailm ɱ textltailn ɲ textnhookleft ɲ textrtailn ɳ textscn ɴ textbaro ɵ textscoelig ɶ textcloseomega ɷ textphi ɸ textturnr ɹ textturnlonglegr ɺ textturnrrtail ɻ textlonglegr ɼ textrtailr ɽ textfishhookr ɾ textlhti ɿ textscr ʀ textinvscr ʁ textrtails ʂ textesh ʃ texthtbardotlessj ʄ textraisevibyi ʅ textctesh ʆ textturnt ʇ textrtailt ʈ texttretroflexhook ʈ textbaru ʉ textupsilon ʊ textscriptv ʋ textvhook ʋ textturnv ʌ textturnw ʍ textturny ʎ textscy ʏ textrtailz ʐ textctz ʑ textezh ʒ textyogh ʒ textctyogh ʓ textglotstop ʔ textrevglotstop ʕ textinvglotstop ʖ textstretchc ʗ textbullseye ʘ textscb ʙ textcloseepsilon ʚ texthtscg ʛ textsch ʜ textctj ʝ textturnk ʞ textscl ʟ texthtq ʠ textbarglotstop ʡ textbarrevglotstop ʢ textdzlig ʣ textdyoghlig ʤ textdctzlig ʥ texttslig ʦ textteshlig ʧ texttesh ʧ texttctclig ʨ hamza ʾ ain ʿ ayn ʿ textprimstress ˈ textlengthmark ː ` ̀ ' ́ ^ ̂ ~ ̃ = ̄ u ̆ . ̇ " ̈ h ̉ r ̊ H ̋ v ̌ | ̍ U ̎ G ̏ M ̢ d ̣ c ̧ k ̨ b ̱ B ̵ t ̑ textvbaraccent ̍ textdoublevbaraccent ̎ textdotbreve ̐ textturncommaabove ̒ textcommaabove ̓ textrevcommaabove ̔ textcommaabover ̕ textsubgrave ̖ textsubacute ̗ textadvancing ̘ textretracting ̙ textlangleabove ̚ textrighthorn ̛ textsublhalfring ̜ textraising ̝ textlowering ̞ textsubplus ̟ textsubbar ̠ textsubminus ̠ textpalhookbelow ̡ textsubumlaut ̤ textsubring ̥ textcommabelow ̦ textsyllabic ̩ textsubbridge ̪ textsubw ̫ textsubwedge ̬ textsubcircnum ̭ textsubbreve ̮ textundertie ̮ textsubarch ̯ textsubtilde ̰ subdoublebar ̳ textsuperimposetilde ̴ textlstrokethru ̶ textsstrikethru ̷ textlstrikethru ̸ textsubrhalfring ̹ textinvsubbridge ̺ textsubsquare ̻ textseagull ̼ textovercross ̽ overbridge ͆ subdoublebar ͇ subdoublevert ͈ subcorner ͉ crtilde ͊ textoverw ͊ dottedtilde ͋ doubletilde ͌ spreadlips ͍ whistle ͎ textrightarrowhead ͐ textlefthalfring ͑ sublptr ͔ subrptr ͕ textrightuparrowhead ͖ textrighthalfring ͗ textdoublebreve ͝ textdoublemacron ͞ textdoublemacronbelow ͟ textdoubletilde ͠ texttoptiebar ͡ sliding ͢ - - textendash -- textendash -- textemdash --- textquoteleft textquoteright quotesinglbase textquotedblleft textquotedblright quotedblbase dag ddag textbullet dots textperthousand textpertenthousand guilsinglleft guilsinglright textreferencemark textinterrobang textoverline langle rangle textquotedbl " textdollar $ textpercent % textampersand & textquotesingle ' textasteriskcentered * textless < textequals = textgreater > textasciicircum ^ textasciigrave ` textbraceleft { textbar | textbraceright } textasciitilde ~ nobreakspace   textexclamdown ¡ textcent ¢ textsterling £ pounds £ textcurrency ¤ textyen ¥ textbrokenbar ¦ textsection § S § textasciidieresis ¨ textcopyright © copyright © textordfeminine ª guillemotleft « textminus textregistered ® textasciimacron ¯ textdegree ° texttwosuperior ² textthreesuperior ³ textasciiacute ´ textparagraph P textcentereddot · textperiodcentered · textasciicedilla ¸ textonesuperior ¹ textordmasculine º guillemotright » textonequarter ¼ textonehalf ½ textthreequarters ¾ textquestiondown ¿ textg g textdiv ÷ div ÷ texttimes × times × textmu µ mu µ textpm ± pm ± textlogicalnot ¬ lnot ¬ textcolonmonetary textlira textnaira textwon textdong euro texteuro textnumero texttrademark leftarrow uparrow rightarrow downarrow leftrightarrow updownarrow leadsto rightleftharpoons Rightarrow Leftrightarrow forall complement partial exists nexists set Delta nabla in notin ni prod coprod sum mp dotplus setminus ast circ bullet surd propto infty angle measuredangle sphericalangle mid nmid parallel nparallel wedge vee cap cup int iint iiint oint therefore because sim backsim wr nsim simeq cong ncong approx approxeq asymp Bumpeq bumpeq doteq doteqdot fallingdotseq risingdotseq eqcirc circeq triangleq neq equiv leq geq leqq geqq lneqq gneqq ll gg between nless ngtr nleq ngeq lesssim gtrsim lessgtr gtrless prec succ preccurlyeq succcurlyeq precsim succsim nprec nsucc subset supset subseteq supseteq nsubseteq nsupseteq subsetneq supsetneq uplus sqsubset sqsupset sqsubseteq sqsupseteq sqcap sqcup oplus ominus otimes oslash odot circledcirc circledast circleddash boxplus boxminus boxtimes boxdot vdash dashv top bot Vdash Vvdash nVdash lhd rhd unlhd unrhd multimap intercal veebar barwedge bigwedge bigvee bigcap bigcup diamond cdot star divideontimes bowtie ltimes rtimes leftthreetimes rightthreetimes backsimeq curlyvee curlywedge Subset Supset Cap Cup pitchfork lessdot gtrdot lll ggg lesseqgtr gtreqless curlyeqprec curlyeqsucc lnsim gnsim precnsim succnsim ntriangleleft ntriangleright ntrianglelefteq ntrianglerighteq vdots cdots ddots lceil rceil lfloor rfloor Box spadesuit heartsuit diamondsuit clubsuit flat natural sharp tone5 ˥ tone4 ˦ tone3 ˧ tone2 ˨ tone1 ˩ asymp lesssim gtrsim subset supset ni simeq approx equiv preccurlyeq succcurlyeq sqsubseteq sqsupseteq 0 i 4 5 6 7 8 9 + - = ( ) n SM h ʰ j ʲ r ʳ w ʷ y ʸ texthth ʱ textturnr ʴ textturnrrtail ʵ textinvscr ʶ 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E A1 A2 A3 A4 A5 A6 A7 A9 AA AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE alpha α beta β gamma γ delta δ varepsilon ε zeta ζ eta η vartheta θ iota ι kappa κ lambda λ mu μ nu ν xi ξ omicron ο pi π varrho ρ varsigma ς sigma σ tau τ upsilon υ varphi φ chi χ psi ψ omega ω Alpha Α Beta Β Gamma Γ Delta Δ Epsilon Ε Zeta Ζ Eta Η Theta Θ Iota Ι Kappa Κ Lambda Λ Mu Μ Nu Ν Xi Ξ Omicron Ο Pi Π Rho Ρ Sigma Σ Tau Τ Upsilon Υ Phi Φ Chi Χ Psi Ψ Omega Ω - | textbraceleft textbraceright textunderscore " # $ % & ' * < = > [ ] \ ^ _ ` g { | } ~   £ ± biblatex-biber-2.9/lib/Biber/LaTeX/Recode.pm000444000153000001 3531313205066062 20170 0ustar00vboxother000000000000package Biber::LaTeX::Recode; use v5.24; use strict; use warnings; use parent qw(Exporter); use Biber::Config; use Digest::MD5 qw( md5_hex ); use Encode; use File::Slurper; use File::Spec; use IPC::Cmd qw( can_run ); use IPC::Run3; # This works with PAR::Packer and Windows. IPC::Run doesn't use Unicode::Normalize; use List::AllUtils qw (first); use Log::Log4perl qw(:no_extra_logdie_message); use XML::LibXML::Simple; use Carp; use utf8; our @EXPORT = qw(latex_encode latex_decode); my $logger = Log::Log4perl::get_logger('main'); =encoding utf-8 =head1 NAME Biber::LaTeX::Recode - Encode/Decode chars to/from UTF-8/lacros in LaTeX =head1 SYNOPSIS use Biber::LaTeX:Recode my $string = 'Muḥammad ibn Mūsā al-Khwārizmī'; my $latex_string = latex_encode($string); # => 'Mu\d{h}ammad ibn M\=us\=a al-Khw\=arizm\={\i}' my $string = 'Mu\d{h}ammad ibn M\=us\=a al-Khw\=arizm\={\i}'; my $utf8_string = latex_decode($string); # => 'Muḥammad ibn Mūsā al-Khwārizmī' =head1 DESCRIPTION Allows conversion between Unicode chars and LaTeX macros. =head1 GLOBAL OPTIONS Possible values for the encoding/decoding set to use are 'null', 'base' and 'full'; default value is 'base'. null => No conversion base => Most common macros and diacritics (sufficient for Western languages and common symbols) full => Also converts punctuation, larger range of diacritics and macros (e.g. for IPA, Latin Extended Additional, etc.), symbols, Greek letters, dingbats, negated symbols, and superscript characters and symbols ... =cut use vars qw( $remap_d $remap_e $remap_e_raw $set_d $set_e ); =head2 init_sets(, ) Initialise recoding sets. We can't do this on loading the module as we don't have the config information to do this yet =cut sub init_sets { shift; # class method ($set_d, $set_e) = @_; no autovivification; # Reset these, mostly for tests which call init_sets more than once $remap_d = {}; $remap_e = {}; $remap_e_raw = {}; my $mapdata; # User-defined recode data file if (my $rdata = Biber::Config->getoption('recodedata')) { my $err; if ( can_run('kpsewhich') ) { run3 [ 'kpsewhich', $rdata ], \undef, \$mapdata, \$err, { return_if_system_error => 1}; if ($? == -1) { biber_error("Error running kpsewhich to look for output_safechars data file: $err"); } chomp $mapdata; $mapdata =~ s/\cM\z//xms; # kpsewhich in cygwin sometimes returns ^M at the end $mapdata = undef unless $mapdata; # sanitise just in case it's an empty string } else { biber_error("Can't run kpsewhich to look for output_safechars data file: $err"); } $logger->info("Using user-defined recode data file '$mapdata'"); } else { # we assume that the data file is in the same dir as the module (my $vol, my $data_path, undef) = File::Spec->splitpath( $INC{'Biber/LaTeX/Recode.pm'} ); # Deal with the strange world of Par::Packer paths, see similar code in Biber.pm if ($data_path =~ m|/par\-| and $data_path !~ m|/inc|) { # a mangled PAR @INC path $mapdata = File::Spec->catpath($vol, "$data_path/inc/lib/Biber/LaTeX/recode_data.xml"); } else { $mapdata = File::Spec->catpath($vol, $data_path, 'recode_data.xml'); } } # Read driver config file my $xml = File::Slurper::read_text($mapdata); my $doc = XML::LibXML->load_xml(string => $xml); my $xpc = XML::LibXML::XPathContext->new($doc); my @types = qw(letters diacritics punctuation symbols negatedsymbols superscripts cmdsuperscripts dings greek); # Have to have separate loops for decode/recode or you can't have independent decode/recode # sets # Construct decode set foreach my $type (@types) { foreach my $maps ($xpc->findnodes("/texmap/maps[\@type='$type']")) { my @set = split(/\s*,\s*/, $maps->getAttribute('set')); next unless first {$set_d eq $_} @set; foreach my $map ($maps->findnodes('map')) { my $from = $map->findnodes('from')->shift(); my $to = $map->findnodes('to')->shift(); $remap_d->{$type}{map}{NFD($from->textContent())} = NFD($to->textContent()); } } # Things we don't want to change when decoding as this breaks some things foreach my $d ($xpc->findnodes('/texmap/decode_exclude/char')) { delete($remap_d->{$type}{map}{NFD($d->textContent())}); } } # Construct encode set foreach my $type (@types) { foreach my $maps ($xpc->findnodes("/texmap/maps[\@type='$type']")) { my @set = split(/\s*,\s*/, $maps->getAttribute('set')); next unless first {$set_e eq $_} @set; foreach my $map ($maps->findnodes('map')) { my $from = $map->findnodes('from')->shift(); my $to = $map->findnodes('to')->shift(); $remap_e->{$type}{map}{NFD($to->textContent())} = NFD($from->textContent()); } # There are some duplicates in the data to handle preferred encodings. foreach my $map ($maps->findnodes('map[from[@preferred]]')) { my $from = $map->findnodes('from')->shift(); my $to = $map->findnodes('to')->shift(); $remap_e->{$type}{map}{NFD($to->textContent())} = NFD($from->textContent()); } # Some things might need to be inserted as is rather than wrapped in some macro/braces foreach my $map ($maps->findnodes('map[from[@raw]]')) { my $from = $map->findnodes('from')->shift(); my $to = $map->findnodes('to')->shift(); $remap_e_raw->{NFD($to->textContent())} = 1; } } # Things we don't want to change when encoding as this would break LaTeX foreach my $e ($xpc->findnodes('/texmap/encode_exclude/char')) { delete($remap_e->{$type}{map}{NFD($e->textContent())}); } } # Populate the decode regexps # sort by descending length of macro name to avoid shorter macros which are substrings # of longer ones damaging the longer ones foreach my $type (@types) { next unless exists $remap_d->{$type}; $remap_d->{$type}{re} = join('|', map { /[\.\^\|\+\-\)\(]/ ? '\\' . $_ : $_ } sort {length($b) <=> length($a)} keys $remap_d->{$type}{map}->%*); $remap_d->{$type}{re} = qr|$remap_d->{$type}{re}|; } # Populate the encode regexps foreach my $type (@types) { next unless exists $remap_e->{$type}; $remap_e->{$type}{re} = join('|', map { /[\.\^\|\+\-\)\(]/ ? '\\' . $_ : $_ } sort keys %{$remap_e->{$type}{map}}); $remap_e->{$type}{re} = qr|$remap_e->{$type}{re}|; } } =head2 latex_decode($text, @options) Converts LaTeX macros in the $text to Unicode characters. The function accepts a number of options: * normalize => $bool (default 1) whether the output string should be normalized with Unicode::Normalize * normalization => (default 'NFD') and if yes, the normalization form to use (see the Unicode::Normalize documentation) =cut sub latex_decode { my $text = shift; if ($logger->is_trace()) {# performance tune $logger->trace("String before latex_decode() -> '$text'"); } my %opts = @_; my $norm = exists $opts{normalize} ? $opts{normalize} : 1; my $norm_form = exists $opts{normalization} ? $opts{normalization} : 'NFD'; # Deal with raw TeX \char macros. $text =~ s/\\char"(\p{ASCII_Hex_Digit}+)/"chr(0x$1)"/gee; # hex chars $text =~ s/\\char'(\d+)/"chr(0$1)"/gee; # octal chars $text =~ s/\\char(\d+)/"chr($1)"/gee; # decimal chars $text =~ s/(\\[a-zA-Z]+)\\(\s+)/$1\{\}$2/g; # \foo\ bar -> \foo{} bar $text =~ s/([^\{]\\\w)([;,.:%])/$1\{\}$2/g; #} Aaaa\o, -> Aaaa\o{}, foreach my $type ('greek', 'dings', 'punctuation', 'symbols', 'negatedsymbols', 'superscripts', 'cmdsuperscripts', 'letters', 'diacritics') { my $map = $remap_d->{$type}{map}; my $re = $remap_d->{$type}{re}; next unless $re; # Might not be present depending on set if ($type eq 'negatedsymbols') { $text =~ s/\\not\\($re)/$map->{$1}/ge; } elsif ($type eq 'superscripts') { $text =~ s/\\textsuperscript\{($re)\}/$map->{$1}/ge; } elsif ($type eq 'cmdsuperscripts') { $text =~ s/\\textsuperscript\{\\($re)\}/$map->{$1}/ge; } elsif ($type eq 'dings') { $text =~ s/\\ding\{([2-9AF][0-9A-F])\}/$map->{$1}/ge; } elsif ($type eq 'letters') { $text =~ s/\\($re)(?:\{\}|\s+|\b)/$map->{$1}/ge; } elsif (first {$type eq $_} ('punctuation', 'symbols', 'greek')) { $text =~ s/\\($re)(?: \{\}|\s+|\b)/$map->{$1}/ge; } elsif ($type eq 'diacritics') { # Using Unicode INFORMATION SEPARATOR ONE/TWO my $bracemap = {'' => '', '{' => "\x{1f}", '}' => "\x{1e}"}; # Rename protecting braces so that they are not broken by RE manipulations $text =~ s/(\{?)\\($re)\s*\{(\pL\pM*)\}(\}?)/$bracemap->{$1} . $3 . $map->{$2} . $bracemap->{$4}/ge; # Conditional regexp with code-block condition # non letter macros for diacritics (e.g. \=) can be followed by any letter # but letter diacritic macros (e.g \c) can't (\cS) horribly Broken # # If the RE for the macro doesn't end with a basic LaTeX macro letter (\=), then # next char can be any letter (\=d) # Else if it did end with a normal LaTeX macro letter (\c), then # If this was followed by a space (\c ) # Any letter is allowed after the space (\c S) # Else # Only a non basic LaTeX letter is allowed (\c-) $text =~ s/(\{?)\\# slash ($re)# the diacritic (\s*)# optional space (# capture paren (?(?{$2 !~ m:[A-Za-z]$:})# code block condition (is not a letter?) \pL # yes pattern | # no pattern (?(?{$3}) # code block condition (space matched earlier after diacritic?) \pL # yes pattern | # no pattern [^A-Za-z] ) # close conditional ) # close conditional \pM* # optional marks ) # capture paren (\}?)/$bracemap->{$1} . $4 . $map->{$2} . $bracemap->{$5}/gxe; } } if ($logger->is_trace()) {# performance tune $logger->trace("String in latex_decode() before brace elimination now -> '$text'"); } # Now remove braces around single letters with diacritics (which the replace above # can result in). Things like '{á}'. Such things can break kerning. We can't do this in # the RE above as we can't determine if the braces are wrapping a phrase because this # match is on an entire field string. So we can't in one step tell the difference between: # # author = {Andr\'e} # and # author = {Andr\'{e}} # # when this is part of a (much) larger string # # We don't want to do this if it would result in a broken macro name like with # \textupper{é} # or # \frac{a}{b} # # Workaround perl's lack of variable-width negative look-behind - # Reverse string (and therefore some of the Re) and use variable width negative look-ahead # Careful here - reversing puts any combining chars before the char so \X can't be used $text = reverse $text; $text =~ s/\}(\pM*\pL)\{(?!(?:\}[^}]+\{)*\pL+\\)/$1/g; $text = reverse $text; # Put brace markers back after doing the brace elimination as we only want to eliminate # braces introduced as part of decoding, not explicit braces in the data $text =~ s/\x{1f}/{/g; $text =~ s/\x{1e}/}/g; if ($logger->is_trace()) {# performance tune $logger->trace("String in latex_decode() now -> '$text'"); } if ($norm) { return Unicode::Normalize::normalize($norm_form, $text); } else { return $text; } } =head2 latex_encode($text, @options) Converts UTF-8 to LaTeX =cut sub latex_encode { my $text = shift; # Optimisation - if virtual null set was specified, do nothing return $text if $set_e eq 'null'; foreach my $type ('greek', 'dings', 'negatedsymbols', 'superscripts', 'cmdsuperscripts', 'diacritics', 'letters', 'punctuation', 'symbols') { my $map = $remap_e->{$type}{map}; my $re = $remap_e->{$type}{re}; next unless $re; # Might not be present depending on set if ($type eq 'negatedsymbols') { $text =~ s/($re)/"{\$\\not\\" . $map->{$1} . '$}'/ge; } elsif ($type eq 'superscripts') { $text =~ s/($re)/'\textsuperscript{' . $map->{$1} . '}'/ge; } elsif ($type eq 'cmdsuperscripts') { $text =~ s/($re)/"\\textsuperscript{\\" . $map->{$1} . "}"/ge; } elsif ($type eq 'dings') { $text =~ s/($re)/'\ding{' . $map->{$1} . '}'/ge; } elsif ($type eq 'letters') { # General macros (excluding special encoding excludes) $text =~ s/($re)/($remap_e_raw->{$1} ? '' : "\\") . $map->{$1} . ($remap_e_raw->{$1} ? '' : '{}')/ge; } elsif (first {$type eq $_} ('punctuation', 'symbols', 'greek')) { $text =~ s/($re)/_wrap($1,$map,$remap_e_raw)/ge; } elsif ($type eq 'diacritics') { # special case such as "i\x{304}" -> '\={\i}' -> "i" needs the dot removing for accents $text =~ s/i($re)/"\\" . $map->{$1} . '{\i}'/ge; $text =~ s/\{(\pL\pM*)\}($re)/"\\" . $map->{$2} . "{$1}"/ge; $text =~ s/(\pL\pM*)($re)/"\\" . $map->{$2} . "{$1}"/ge; $text =~ s{ (\PM)($re)($re)($re) }{ "\\" . $map->{$4} . "{\\" . $map->{$3} . "{\\" . $map->{$2} . "{$1}" . '}}' }gex; $text =~ s{ (\PM)($re)($re) }{ "\\" . $map->{$3} . "{\\" . $map->{$2} . "{$1}" . '}' }gex; $text =~ s{ (\PM)($re) }{ "\\" . $map->{$2} . "{$1}" }gex; } } sub _wrap { my ($s, $map, $remap_e_raw) = @_; if ($map->{$s} =~ m/^(?:text|guillemot)/) { "\\" . $map->{$s} . '{}'; } elsif ($remap_e_raw->{$s}) { $map->{$s}; } else { "{\$\\" . $map->{$s} . '$}'; } } return $text; } 1; __END__ =head1 AUTHOR François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Date000755000153000001 013205066062 16147 5ustar00vboxother000000000000biblatex-biber-2.9/lib/Biber/Date/Format.pm000444000153000001 1077613205066062 20125 0ustar00vboxother000000000000package Biber::Date::Format; use v5.24; use strict; use Carp; use DateTime; use DateTime::TimeZone; use DateTime::Format::Builder; use DateTime::Calendar::Julian; =encoding utf-8 =head1 NAME Biber::Date::Format =head2 Description Implements EDTF Levels 0 and 1 and also allows detection of missing month/year. https://www.loc.gov/standards/datetime/pre-submission.html =cut # Needed as a reset of class information between parses as this isn't reset # by a new parse_datetime sub init { my $self = shift; delete $self->{missing}; delete $self->{circa}; delete $self->{uncertain}; delete $self->{season}; delete $self->{julian}; return $self; } sub set_julian { my $self = shift; $self->{julian} = 1; } sub julian { my $self = shift; return $self->{julian}; } sub missing { my $self = shift; my $part = shift; return $self->{missing}{$part}; } sub circa { my $self = shift; return $self->{circa}; } sub uncertain { my $self = shift; return $self->{uncertain}; } sub season { my $self = shift; return $self->{season}; } DateTime::Format::Builder->create_class( parsers => { parse_datetime => [ [ preprocess => \&_pre ], {# EDTF 5.1.2 #[-]YYYY-MM-DDThh:mm:ss 1985-04-12T10:15:30 length => [ qw( 19 20 ) ], regex => qr/^ (-?\d{4}) - (\d\d) - (\d\d) T (\d\d) : (\d\d) : (\d\d) $/x, params => [ qw( year month day hour minute second ) ], }, {# EDTF 5.1.1 #[-]YYYY-MM-DD 1985-04-12 length => [ qw( 10 11 ) ], regex => qr/^ (-?\d{4}) - (\d\d) - (\d\d) $/x, params => [ qw( year month day ) ], postprocess => \&_missing_time }, {# EDTF 5.1.1 #[-]YYYY-MM 1985-04 length => [ qw( 7 8 ) ], regex => qr/^ (-?\d{4}) - (\d\d) $/x, params => [ qw( year month ) ], postprocess => [ \&_missing_day, \&_missing_time ] }, {# EDTF 5.1.1 #[-]YYYY 1985 length => [ qw( 4 5 ) ], regex => qr/^ (-?\d{4}) $/x, params => [ qw( year ) ], postprocess => [ \&_missing_month, \&_missing_day, \&_missing_time ] }, {# EDTF 5.2.4 #y[-]YYYYY... y17000000002 regex => qr/^ y(-?\d{5,}) $/x, params => [ qw( year ) ], postprocess => [ \&_missing_month, \&_missing_day, \&_missing_time ] }, ], } ); # Parse out timezones and missing/meta information sub _pre { my %p = @_; delete $p{self}{missing}; delete $p{self}{circa}; delete $p{self}{uncertain}; delete $p{self}{season}; my %seasons = ( 21 => 'spring', 22 => 'summer', 23 => 'autumn', 24 => 'winter' ); # EDTF 5.2.1 (approximate) if ($p{input} =~ s/^\s*(.+?)\s*\~\s*$/$1/i) { $p{self}{circa} = 1; } # EDTF 5.2.1 (uncertain) if ($p{input} =~ s/^\s*(.+?)\s*\?\s*$/$1/i) { $p{self}{uncertain} = 1; } # EDTF 5.1.2 (time zone) if ($p{input} =~ s/Z$//) { $p{parsed}{time_zone} = 'UTC'; } elsif ($p{input} =~ s/([+-]\d\d:\d\d)$//) { $p{parsed}{time_zone} = $1; } # EDTF 5.1.5 (season) if ($p{input} =~ s/^(-?\d{4})-(2[1234])$/$1/) { $p{self}{season} = $seasons{$2}; } return $p{input}; } sub _missing_month { my %p = @_; $p{self}{missing}{month} = 1; return 1; } sub _missing_day { my %p = @_; $p{self}{missing}{day} = 1; return 1; } sub _missing_time { my %p = @_; $p{self}{missing}{time} = 1; return 1; } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Entry000755000153000001 013205066061 16372 5ustar00vboxother000000000000biblatex-biber-2.9/lib/Biber/Entry/Name.pm000444000153000001 3034113205066061 17766 0ustar00vboxother000000000000package Biber::Entry::Name; use v5.24; use strict; use warnings; use parent qw(Class::Accessor); __PACKAGE__->follow_best_practice; use Regexp::Common qw( balanced ); use Biber::Annotation; use Biber::Config; use Biber::Constants; use Biber::Utils; use Data::Dump qw( pp ); use Data::Uniqid qw (suniqid); use Log::Log4perl qw( :no_extra_logdie_message ); use List::Util qw( first ); use Unicode::Normalize; no autovivification; my $logger = Log::Log4perl::get_logger('main'); # Names of simple package accessor attributes for those not created automatically # by the option scope in the .bcf __PACKAGE__->mk_accessors(qw ( gender hash index id rawstring )); =encoding utf-8 =head1 NAME Biber::Entry::Name =head2 new Initialise a Biber::Entry::Name object, optionally with key=>value arguments. =cut sub new { my ($class, %params) = @_; my $dm = Biber::Config->get_dm; if (%params) { my $name = {}; foreach my $attr (keys $CONFIG_SCOPEOPT_BIBLATEX{NAME}->%*, 'gender', 'useprefix', 'strip') { if (exists $params{$attr}) { $name->{$attr} = $params{$attr}; } } foreach my $np ($dm->get_constant_value('nameparts')) { if (exists $params{$np}) { $name->{nameparts}{$np} = $params{$np}; } } $name->{rawstring} = join('', map {$name->{nameparts}{$_}{string} // ''} keys $name->{nameparts}->%*); $name->{id} = suniqid; return bless $name, $class; } else { return bless {id => suniqid}, $class; } } =head2 TO_JSON Serialiser for JSON::XS::encode =cut sub TO_JSON { my $self = shift; my $json; while (my ($k, $v) = each($self->%*)) { $json->{$k} = $v; } return $json; } =head2 notnull Test for an empty object =cut sub notnull { my $self = shift; my @arr = keys %$self; return $#arr > -1 ? 1 : 0; } =head2 was_stripped Return boolean to tell if the passed field had braces stripped from the original =cut sub was_stripped { my ($self, $part) = @_; return exists($self->{strip}) ? $self->{strip}{$part} : undef; } =head2 get_nameparts Get nameparts for a name =cut sub get_nameparts { my $self = shift; return keys $self->{nameparts}->%*; } =head2 get_namepart Get a namepart by passed name =cut sub get_namepart { my ($self, $namepart) = @_; # prevent warnings when concating arbitrary nameparts return $self->{nameparts}{$namepart}{string} || ''; } =head2 set_namepart Set a namepart by passed name =cut sub set_namepart { my ($self, $namepart, $val) = @_; $self->{nameparts}{$namepart}{string} = $val; return; } =head2 get_namepart_initial Get a namepart initial by passed name =cut sub get_namepart_initial { my ($self, $namepart) = @_; return $self->{nameparts}{$namepart}{initial}; } =head2 set_namepart_initial Set a namepart initial by passed name =cut sub set_namepart_initial { my ($self, $namepart, $val) = @_; $self->{nameparts}{$namepart}{initial} = $val; return; } =head2 name_to_biblatexml { Create biblatexml data for a name =cut sub name_to_biblatexml { my ($self, $out, $xml, $key, $namefield, $count) = @_; my $xml_prefix = $out->{xml_prefix}; my $dm = Biber::Config->get_dm; my @attrs; # Add per-name options foreach my $no (keys $CONFIG_SCOPEOPT_BIBLATEX{NAME}->%*) { if (defined($self->${\"get_$no"})) { my $nov = $self->${\"get_$no"}; if ($CONFIG_OPTTYPE_BIBLATEX{lc($no)} and $CONFIG_OPTTYPE_BIBLATEX{lc($no)} eq 'boolean') { $nov = map_boolean($nov, 'tostring'); } my $oo = expand_option($no, $nov, $CONFIG_BIBLATEX_NAME_OPTIONS{$no}->{OUTPUT}); foreach my $o ($oo->@*) { push @attrs, ($o->[0] => $o->[1]); } } } # gender if (my $g = $self->get_gender) { push @attrs, ('gender' => $g); } # name scope annotation if (my $ann = Biber::Annotation->get_annotation('item', $key, $namefield, $count)) { push @attrs, ('annotation' => $ann); } $xml->startTag([$xml_prefix, 'name'], @attrs); foreach my $np ($dm->get_constant_value('nameparts')) {# list type so returns list $self->name_part_to_bltxml($xml, $xml_prefix, $key, $namefield, $np, $count); } $xml->endTag(); # Name } =head2 name_part_to_bltxml Return BibLaTeXML data for a name =cut sub name_part_to_bltxml { my ($self, $xml, $xml_prefix, $key, $namefield, $npn, $count) = @_; my $np = $self->get_namepart($npn); my $nip = $self->get_namepart_initial($npn); if ($np) { my $parts = [split(/[\s~]/, $np)]; my @attrs; # namepart scope annotation if (my $ann = Biber::Annotation->get_annotation('part', $key, $namefield, $count, $npn)) { push @attrs, ('annotation' => $ann); } # Compound name part if ($parts->$#* > 0) { $xml->startTag([$xml_prefix, 'namepart'], type => $npn, @attrs); for (my $i=0;$i <= $parts->$#*;$i++) { if (my $init = $nip->[$i]) { $xml->startTag([$xml_prefix, 'namepart'], initial => $init); } else { $xml->startTag([$xml_prefix, 'namepart']); } $xml->characters(NFC($parts->[$i])); $xml->endTag(); # namepart } $xml->endTag(); # namepart } else { # simple name part if (my $init = $nip->[0]) { $xml->startTag([$xml_prefix, 'namepart'], type => $npn, initial => $init, @attrs); } else { $xml->startTag([$xml_prefix, 'namepart']); } $xml->characters(NFC($parts->[0])); $xml->endTag(); # namepart } } } =head2 name_to_bbl Return bbl data for a name =cut sub name_to_bbl { my ($self, $un) = @_; my $dm = Biber::Config->get_dm; my @pno; # per-name options my $pno; # per-name options final string my $namestring; my @namestrings; my $nid = $self->{id}; foreach my $np ($dm->get_constant_value('nameparts')) {# list type so returns list my $npc; my $npci; if ($npc = $self->get_namepart($np)) { if ($self->was_stripped($np)) { $npc = Biber::Utils::add_outer($npc); } else { # Don't insert name seps in protected names $npc = Biber::Utils::join_name($npc); } $npci = join('\bibinitperiod\bibinitdelim ', @{$self->get_namepart_initial($np)}) . '\bibinitperiod'; $npci =~ s/\p{Pd}/\\bibinithyphendelim /gxms; } # Some of the subs above can result in these being undef so make sure there is an empty # string instead of undef so that interpolation below doesn't produce warnings $npc //= ''; $npci //= ''; if ($npc) { push @namestrings, " $np={$npc}", " ${np}i={$npci}"; # Only if uniquename is true if ($un) { push @namestrings, " UNP-${np}-${nid}"; } } } # Generate uniquename if uniquename is requested if ($un) { push @pno, "UNS-${nid}"; push @pno, "UNP-${nid}"; } # Add per-name options foreach my $no (keys $CONFIG_SCOPEOPT_BIBLATEX{NAME}->%*) { if (defined($self->${\"get_$no"})) { my $nov = $self->${\"get_$no"}; if ($CONFIG_OPTTYPE_BIBLATEX{lc($no)} and $CONFIG_OPTTYPE_BIBLATEX{lc($no)} eq 'boolean') { $nov = Biber::Utils::map_boolean($nov, 'tostring'); } my $oo = Biber::Utils::expand_option($no, $nov, $CONFIG_BIBLATEX_NAME_OPTIONS{$no}->{OUTPUT}); foreach my $o ($oo->@*) { push @pno, $o->[0] . '=' . $o->[1]; } } } # Add the name hash to the options push @pno, "${nid}-PERNAMEHASH"; $pno = join(',', @pno); $namestring = " {{$pno}{\%\n"; $namestring .= join(",\n", @namestrings); $namestring .= "}}%\n"; return $namestring; } =head2 name_to_bblxml Return bblxml data for a name =cut sub name_to_bblxml { my ($self, $xml, $xml_prefix, $un) = @_; my $dm = Biber::Config->get_dm; my %pno; # per-name options my %names; my $nid = $self->{id}; foreach my $np ($dm->get_constant_value('nameparts')) {# list type so returns list my $npc; my $npci; if ($npc = $self->get_namepart($np)) { $npci = join('. ', @{$self->get_namepart_initial($np)}); } # Some of the subs above can result in these being undef so make sure there is an empty # string instead of undef so that interpolation below doesn't produce warnings $npc //= ''; $npci //= ''; if ($npc) { $names{$np} = [$npc, $npci]; if ($un) { push $names{$np}->@*, "[BDS]UNP-${np}-${nid}[/BDS]"; } } } # Generate uniquename if uniquename is requested if ($un) { $pno{uniquename} = "[BDS]UNS-${nid}[/BDS]"; $pno{uniquepart} = "[BDS]UNP-${nid}[/BDS]"; } # Add per-name options foreach my $no (keys $CONFIG_SCOPEOPT_BIBLATEX{NAME}->%*) { if (defined($self->${\"get_$no"})) { my $nov = $self->${\"get_$no"}; if ($CONFIG_OPTTYPE_BIBLATEX{lc($no)} and $CONFIG_OPTTYPE_BIBLATEX{lc($no)} eq 'boolean') { $nov = Biber::Utils::map_boolean($nov, 'tostring'); } my $oo = Biber::Utils::expand_option($no, $nov, $CONFIG_BIBLATEX_NAME_OPTIONS{$no}->{OUTPUT}); foreach my $o ($oo->@*) { $pno{$o->[0]} = $o->[1]; } } } # Add the name hash to the options $pno{hash} = "[BDS]${nid}-PERNAMEHASH[/BDS]"; $xml->startTag([$xml_prefix, 'name'], map {$_ => $pno{$_}} sort keys %pno); foreach my $key (sort keys %names) { my $value = $names{$key}; my %un; if ($un) { %un = (uniquename => $value->[2]); } $xml->startTag([$xml_prefix, 'namepart'], type => $key, %un, initials => NFC(Biber::Utils::normalise_string_bblxml($value->[1]))); $xml->characters(NFC(Biber::Utils::normalise_string_bblxml($value->[0]))); $xml->endTag();# namepart } $xml->endTag();# names return; } =head2 name_to_bib Return standard bibtex data format for name =cut sub name_to_bib { my $self = shift; my $parts; my $namestring = ''; foreach my $np ('prefix', 'family', 'suffix', 'given') { if ($parts->{$np} = $self->get_namepart($np)) { $parts->{$np} =~ s/~/ /g; if ($self->was_stripped($np)) { $parts->{$np} = Biber::Utils::add_outer($parts->{$np}); } } } if (my $p = $parts->{prefix}) {$namestring .= "$p "}; if (my $f = $parts->{family}) {$namestring .= $f}; if (my $s= $parts->{suffix}) {$namestring .= ", $s"}; if (my $g= $parts->{given}) {$namestring .= ", $g"}; return $namestring; } =head2 name_to_xname Return extended bibtex data format for name =cut sub name_to_xname { my $self = shift; my $dm = Biber::Config->get_dm; my $parts; my @namestring; my $xns = Biber::Config->getoption('output_xnamesep'); foreach my $np (sort $dm->get_constant_value('nameparts')) {# list type so returns list if ($parts->{$np} = $self->get_namepart($np)) { $parts->{$np} =~ s/~/ /g; push @namestring, "$np$xns" . $parts->{$np}; } } # Name scope useprefix if (defined($self->get_useprefix)) {# could be 0 push @namestring, "useprefix$xns" . Biber::Utils::map_boolean($self->get_useprefix, 'tostring'); } # Name scope sortingnamekeytemplatename if (my $snks = $self->get_sortingnamekeytemplatename) { push @namestring, "sortingnamekeytemplatename$xns$snks"; } return join(', ', @namestring); } =head2 dump Dump Biber::Entry::Name object =cut sub dump { my $self = shift; return pp($self); } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Entry/Names.pm000444000153000001 731313205066061 20134 0ustar00vboxother000000000000package Biber::Entry::Names; use v5.24; use strict; use warnings; use parent qw(Class::Accessor); __PACKAGE__->follow_best_practice; no autovivification; use Data::Dump; use Data::Uniqid qw (suniqid); use Biber::Config; use Log::Log4perl qw( :no_extra_logdie_message ); my $logger = Log::Log4perl::get_logger('main'); # Names of simple package accessor attributes for those not created automatically # by the option scope in the .bcf __PACKAGE__->mk_accessors(qw ( id )); =encoding utf-8 =head1 NAME Biber::Entry::Names =head2 new Initialize a Biber::Entry::Names object =cut sub new { my $class = shift; return bless {namelist => [], id => suniqid}, $class; } =head2 TO_JSON Serialiser for JSON::XS::encode =cut # sub TO_JSON { # my $self = shift; # foreach my $n ($self->@*){ # $json->{$k} = $v; # } # return [ map {$_} $self->@* ]; # } =head2 notnull Test for an empty object =cut sub notnull { my $self = shift; my @arr = $self->{namelist}->@*; return $#arr > -1 ? 1 : 0; } =head2 names Return ref to array of all Biber::Entry::Name objects in object =cut sub names { my $self = shift; return $self->{namelist}; } =head2 add_name Add a Biber::Entry::Name object to the Biber::Entry::Names object =cut sub add_name { my $self = shift; my $name_obj = shift; push $self->{namelist}->@*, $name_obj; $name_obj->set_index($#{$self->{namelist}} + 1); return; } =head2 set_morenames Sets a flag to say that we had a "and others" in the data =cut sub set_morenames { my $self = shift; $self->{morenames} = 1; return; } =head2 get_morenames Gets the morenames flag =cut sub get_morenames { my $self = shift; return $self->{morenames} ? 1 : 0; } =head2 count_names Returns the number of Biber::Entry::Name objects in the object =cut sub count_names { my $self = shift; return scalar $self->{namelist}->@*; } =head2 nth_name Returns the nth Biber::Entry::Name object in the object or the last one if n > total names =cut sub nth_name { my $self = shift; my $n = shift; my $size = $self->{namelist}->@*; return $self->{namelist}[$n > $size ? $size-1 : $n-1]; } =head2 first_n_names Returns an array ref of Biber::Entry::Name objects containing only the first n Biber::Entry::Name objects or all names if n > total names =cut sub first_n_names { my $self = shift; my $n = shift; my $size = $self->{namelist}->@*; return [ $self->{namelist}->@[0 .. ($n > $size ? $size-1 : $n-1)] ]; } =head2 del_last_name Deletes the last Biber::Entry::Name object in the object =cut sub del_last_name { my $self = shift; pop($self->{namelist}->@*); # Don't want the return value of this! return; } =head2 last_name Returns the last Biber::Entry::Name object in the object =cut sub last_name { my $self = shift; return $self->{namelist}[-1]; } =head2 dump Dump a Biber::Entry::Names object for debugging purposes =cut sub dump { my $self = shift; dd($self); return; } 1; __END__ =head1 AUTHORS François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Input000755000153000001 013205066061 16370 5ustar00vboxother000000000000biblatex-biber-2.9/lib/Biber/Input/file000755000153000001 013205066062 17310 5ustar00vboxother000000000000biblatex-biber-2.9/lib/Biber/Input/file/biblatexml.pm000444000153000001 15714313205066061 22200 0ustar00vboxother000000000000package Biber::Input::file::biblatexml; use v5.24; use strict; use warnings; use Carp; use Biber::Annotation; use Biber::Constants; use Biber::DataModel; use Biber::Entries; use Biber::Entry; use Biber::Entry::Names; use Biber::Entry::Name; use Biber::Sections; use Biber::Section; use Biber::Utils; use Biber::Config; use Data::Uniqid qw ( suniqid ); use Encode; use File::Spec; use File::Slurper; use File::Temp; use Log::Log4perl qw(:no_extra_logdie_message); use List::AllUtils qw( uniq first ); use XML::LibXML; use XML::LibXML::Simple; use Data::Dump qw(dump); use Unicode::Normalize; use Unicode::GCString; use URI; my $logger = Log::Log4perl::get_logger('main'); my $orig_key_order = {}; my $BIBLATEXML_NAMESPACE_URI = 'http://biblatex-biber.sourceforge.net/biblatexml'; my $NS = 'bltx'; # Determine handlers from data model my $dm = Biber::Config->get_dm; my $handlers = { 'CUSTOM' => {'related' => \&_related}, 'field' => { 'default' => { 'code' => \&_literal, 'date' => \&_datetime, 'entrykey' => \&_literal, 'integer' => \&_literal, 'key' => \&_literal, 'literal' => \&_literal, 'range' => \&_range, 'verbatim' => \&_literal, 'uri' => \&_uri }, 'xsv' => { 'entrykey' => \&_xsv, 'keyword' => \&_xsv, 'option' => \&_xsv, } }, 'list' => { 'default' => { 'entrykey' => \&_list, 'key' => \&_list, 'literal' => \&_list, 'name' => \&_name } } }; =head2 extract_entries Main data extraction routine. Accepts a data source identifier (filename in this case), preprocesses the file and then looks for the passed keys, creating entries when it finds them and passes out an array of keys it didn't find. =cut sub extract_entries { my ($source, $keys) = @_; my $secnum = $Biber::MASTER->get_current_section; my $section = $Biber::MASTER->sections->get_section($secnum); my $bibentries = $section->bibentries; my $filename; my @rkeys = $keys->@*; my $tf; # Up here so that the temp file has enough scope to survive until we've # used it $logger->trace("Entering extract_entries() in driver 'biblatexml'"); # Get a reference to the correct sourcemap sections, if they exist my $smaps = []; # Maps are applied in order USER->STYLE->DRIVER if (defined(Biber::Config->getoption('sourcemap'))) { # User maps if (my $m = first {$_->{datatype} eq 'biblatexml' and $_->{level} eq 'user' } @{Biber::Config->getoption('sourcemap')} ) { push $smaps->@*, $m; } # Style maps # Allow multiple style maps from multiple \DeclareStyleSourcemap if (my @m = grep {$_->{datatype} eq 'biblatexml' and $_->{level} eq 'style' } @{Biber::Config->getoption('sourcemap')} ) { push $smaps->@*, @m; } # Driver default maps if (my $m = first {$_->{datatype} eq 'biblatexml' and $_->{level} eq 'driver'} @{Biber::Config->getoption('sourcemap')} ) { push $smaps->@*, $m; } } # If it's a remote data file, fetch it first if ($source =~ m/\A(?:http|ftp)(s?):\/\//xms) { $logger->info("Data source '$source' is a remote .xml - fetching ..."); if (my $cf = $REMOTE_MAP{$source}) { $logger->info("Found '$source' in remote source cache"); $filename = $cf; } else { if ($1) { # HTTPS # use IO::Socket::SSL qw(debug99); # useful for debugging SSL issues # We have to explicitly set the cert path because otherwise the https module # can't find the .pem when PAR::Packer'ed # Have to explicitly try to require Mozilla::CA here to get it into %INC below # It may, however, have been removed by some biber unpacked dists if (not exists($ENV{PERL_LWP_SSL_CA_FILE}) and not exists($ENV{PERL_LWP_SSL_CA_PATH}) and not defined(Biber::Config->getoption('ssl-nointernalca')) and eval {require Mozilla::CA}) { # we assume that the default CA file is in .../Mozilla/CA/cacert.pem (my $vol, my $dir, undef) = File::Spec->splitpath( $INC{"Mozilla/CA.pm"} ); $dir =~ s/\/$//; # splitpath sometimes leaves a trailing '/' $ENV{PERL_LWP_SSL_CA_FILE} = File::Spec->catpath($vol, "$dir/CA", 'cacert.pem'); } # fallbacks for, e.g., linux unless (exists($ENV{PERL_LWP_SSL_CA_FILE})) { foreach my $ca_bundle (qw{ /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt /etc/ssl/ca-bundle.pem }) { next if ! -e $ca_bundle; $ENV{PERL_LWP_SSL_CA_FILE} = $ca_bundle; last; } foreach my $ca_path (qw{ /etc/ssl/certs/ /etc/pki/tls/ }) { next if ! -d $ca_path; $ENV{PERL_LWP_SSL_CA_PATH} = $ca_path; last; } } if (defined(Biber::Config->getoption('ssl-noverify-host'))) { $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; } require LWP::Protocol::https; } require LWP::Simple; $tf = File::Temp->new(TEMPLATE => 'biber_remote_data_source_XXXXX', DIR => $Biber::MASTER->biber_tempdir, SUFFIX => '.xml'); # Pretend to be a browser otherwise some sites refuse the default LWP UA string $LWP::Simple::ua->agent('Mozilla/5.0'); my $retcode = LWP::Simple::getstore($source, $tf->filename); unless (LWP::Simple::is_success($retcode)) { biber_error("Could not fetch '$source' (HTTP code: $retcode)"); } $filename = $tf->filename; # cache any remote so it persists and so we don't fetch it again $REMOTE_MAP{$source} = $filename; } } else { # Need to get the filename so we increment # the filename count for preambles at the bottom of this sub my $trying_filename = $source; unless ($filename = locate_biber_file($source)) { biber_error("Cannot find file '$source'!") } } # Log that we found a data file $logger->info("Found BibLaTeXML data file '$filename'"); # Set up XML parser and namespace my $xml = File::Slurper::read_text($filename); $xml = NFD($xml);# Unicode NFD boundary my $bltxml = XML::LibXML->load_xml(string => $xml); my $xpc = XML::LibXML::XPathContext->new($bltxml); $xpc->registerNs($NS, $BIBLATEXML_NAMESPACE_URI); if ($section->is_allkeys) { if ($logger->is_debug()) {# performance tune $logger->debug("All citekeys will be used for section '$secnum'"); } # Loop over all entries, creating objects foreach my $entry ($xpc->findnodes("/$NS:entries/$NS:entry")) { if ($logger->is_debug()) {# performance tune $logger->debug('Parsing BibLaTeXML entry object ' . $entry->nodePath); } # If an entry has no key, ignore it and warn unless ($entry->hasAttribute('id')) { biber_warn("Invalid or undefined BibLaTeXML entry key in file '$filename', skipping ..."); next; } my $key = $entry->getAttribute('id'); # Check if this key has already been registered as a citekey alias, if # so, the key takes priority and we delete the alias if ($section->get_citekey_alias($key)) { biber_warn("Citekey alias '$key' is also a real entry key, skipping ..."); $section->get_citekey_alias($key); } # Any secondary keys? # We can't do this with a driver entry for the IDS field as this needs # an entry object creating first and the whole point of aliases is that # there is no entry object foreach my $id ($entry->findnodes("./$NS:ids/$NS:key")) { my $idstr = $id->textContent(); # Skip aliases which are also real entry keys if ($section->has_everykey($idstr)) { biber_warn("Citekey alias '$idstr' is also a real entry key, skipping ..."); next; } # Warn on conflicting aliases if (my $otherid = $section->get_citekey_alias($idstr)) { if ($otherid ne $key) { biber_warn("Citekey alias '$idstr' already has an alias '$otherid', skipping ..."); } } else { # Since this is allkeys, we are guaranteed that the real entry for the alias # will be available $section->set_citekey_alias($idstr, $key); if ($logger->is_debug()) {# performance tune $logger->debug("Citekey '$idstr' is an alias for citekey '$key'"); } } } # If we've already seen a case variant, warn if (my $okey = $section->has_badcasekey($key)) { biber_warn("Possible typo (case mismatch): '$key' and '$okey' in file '$filename', skipping '$key' ..."); } # If we've already seen this key, ignore it and warn if ($section->has_everykey($key)) { biber_warn("Duplicate entry key: '$key' in file '$filename', skipping ..."); next; } else { $section->add_everykey($key); } # Record a key->datasource name mapping for error reporting $section->set_keytods($key, $filename); create_entry($key, $entry, $source, $smaps, \@rkeys); # We do this as otherwise we have no way of determining the origing .bib entry order # We need this in order to do sorting=none + allkeys because in this case, there is no # "citeorder" because nothing is explicitly cited and so "citeorder" means .bib order push @{$orig_key_order->{$filename}}, $key; } # if allkeys, push all bibdata keys into citekeys (if they are not already there) # We are using the special "orig_key_order" array which is used to deal with the # situation when sorting=none and allkeys is set. We need an array rather than the # keys from the bibentries hash because we need to preserver the original order of # the .bib as in this case the sorting sub "citeorder" means "bib order" as there are # no explicitly cited keys $section->add_citekeys(@{$orig_key_order->{$filename}}); if ($logger->is_debug()) {# performance tune $logger->debug("Added all citekeys to section '$secnum': " . join(', ', $section->get_citekeys)); } } else { # loop over all keys we're looking for and create objects if ($logger->is_debug()) {# performance tune $logger->debug('Wanted keys: ' . join(', ', $keys->@*)); } foreach my $wanted_key ($keys->@*) { if ($logger->is_debug()) {# performance tune $logger->debug("Looking for key '$wanted_key' in BibLaTeXML file '$filename'"); } if (my @entries = $xpc->findnodes("/$NS:entries/$NS:entry[\@id='$wanted_key']")) { # Check to see if there is more than one entry with this key and warn if so if ($#entries > 0) { biber_warn("Found more than one entry for key '$wanted_key' in '$filename': " . join(',', map {$_->getAttribute('id')} @entries) . ' - skipping duplicates ...'); } my $entry = $entries[0]; if ($logger->is_debug()) {# performance tune $logger->debug("Found key '$wanted_key' in BibLaTeXML file '$filename'"); $logger->debug('Parsing BibLaTeXML entry object ' . $entry->nodePath); } # See comment above about the importance of the case of the key # passed to create_entry() # Skip creation if it's already been done, for example, via a citekey alias unless ($section->bibentries->entry_exists($wanted_key)) { # Record a key->datasource name mapping for error reporting $section->set_keytods($wanted_key, $filename); create_entry($wanted_key, $entry, $source, $smaps, \@rkeys); } # found a key, remove it from the list of keys we want @rkeys = grep {$wanted_key ne $_} @rkeys; } elsif ($xpc->findnodes("/$NS:entries/$NS:entry/$NS:id[text()='$wanted_key']")) { my $key = $xpc->findnodes("/$NS:entries/$NS:entry/\@id"); if ($logger->is_debug()) {# performance tune $logger->debug("Citekey '$wanted_key' is an alias for citekey '$key'"); } $section->set_citekey_alias($wanted_key, $key); # Make sure there is a real, cited entry for the citekey alias # just in case only the alias is cited unless ($section->bibentries->entry_exists($key)) { my $entry = $xpc->findnodes("/$NS:entries/$NS:entry/[\@id='$key']"); # Record a key->datasource name mapping for error reporting $section->set_keytods($key, $filename); create_entry($key, $entry, $source, $smaps, \@rkeys); $section->add_citekeys($key); } # found a key, remove it from the list of keys we want @rkeys = grep {$wanted_key ne $_} @rkeys; } if ($logger->is_debug()) {# performance tune $logger->debug('Wanted keys now: ' . join(', ', @rkeys)); } } } return @rkeys; } =head2 create_entry Create a Biber::Entry object from an entry found in a biblatexml data source =cut sub create_entry { my ($key, $entry, $datasource, $smaps, $rkeys) = @_; my $secnum = $Biber::MASTER->get_current_section; my $section = $Biber::MASTER->sections->get_section($secnum); my $dm = Biber::Config->get_dm; my $bibentries = $section->bibentries; my %newentries; # In case we create a new entry in a map # Datasource mapping applied in $smap order (USER->STYLE->DRIVER) foreach my $smap ($smaps->@*) { $smap->{map_overwrite} = $smap->{map_overwrite} // 0; # default my $level = $smap->{level}; MAP: foreach my $map (@{$smap->{map}}) { # Skip if this map element specifies a particular refsection and it is not this one if (exists($map->{refsection})) { next unless $secnum == $map->{refsection}; } # defaults to the entrytype unless changed below my $last_type = $entry->getAttribute('entrytype'); my $last_field = undef; my $last_fieldval = undef; my $cnerror; my @imatches; # For persisting parenthetical matches over several steps # Check pertype restrictions # Logic is "-(-P v Q)" which is equivalent to "P & -Q" but -Q is an array check so # messier to write than Q unless (not exists($map->{per_type}) or first {lc($_->{content}) eq $entry->type} @{$map->{per_type}}) { next; } # Check negated pertype restrictions if (exists($map->{per_nottype}) and first {lc($_->{content}) eq $entry->getAttribute('entrytype')} @{$map->{per_nottype}}) { next; } # Check per_datasource restrictions # Don't compare case insensitively - this might not be correct # Logic is "-(-P v Q)" which is equivalent to "P & -Q" but -Q is an array check so # messier to write than Q unless (not exists($map->{per_datasource}) or first {$_->{content} eq $datasource} @{$map->{per_datasource}}) { next; } # Set up any mapping foreach loop my @maploop = (''); if (my $foreach = $map->{map_foreach}) { # just a field name, make it XPATH if ($foreach !~ m|/|) { $foreach = "./bltx:$foreach"; } if (my $felist = $entry->findnodes($foreach)) { @maploop = split(/\s*,\s*/, $felist); } } foreach my $maploop (@maploop) { my $MAPUNIQVAL; # loop over mapping steps foreach my $step (@{$map->{map_step}}) { # entry deletion. Really only useful with allkeys or tool mode if ($step->{map_entry_null}) { if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$key): Ignoring entry completely"); } return 0; # don't create an entry at all } # new entry if (my $newkey = maploopreplace($step->{map_entry_new}, $maploop)) { my $newentrytype; unless ($newentrytype = maploopreplace($step->{map_entry_newtype}, $maploop)) { biber_warn("Source mapping (type=$level, key=$key): Missing type for new entry '$newkey', skipping step ..."); next; } if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$key): Creating new entry with key '$newkey'"); } my $newentry = XML::LibXML::Element->new("$NS:entry"); $newentry->setAttribute('id', NFC($newkey)); $newentry->setAttribute('entrytype', NFC($newentrytype)); # found a new entry key, remove it from the list of keys we want since we # have "found" it by creating it $rkeys->@* = grep {$newkey ne $_} $rkeys->@*; # for allkeys sections initially if ($section->is_allkeys) { $section->add_citekeys($newkey); } $newentries{$newkey} = $newentry; } # entry clone if (my $prefix = maploopreplace($step->{map_entry_clone}, $maploop)) { if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$key): cloning entry with prefix '$prefix'"); } # Create entry with no sourcemapping to avoid recursion create_entry("$prefix$key", $entry); # found a prefix clone key, remove it from the list of keys we want since we # have "found" it by creating it along with its clone parent $rkeys->@* = grep {"$prefix$key" ne $_} $rkeys->@*; # Need to add the clone key to the section if allkeys is set since all keys are cleared # for allkeys sections initially if ($section->is_allkeys) { $section->add_citekeys("$prefix$key"); } } # An entry created by map_entry_new previously can be the target for field setting # options # A newly created entry as target of operations doesn't make sense in all situations # so it's limited to being the target for field sets my $etarget; my $etargetkey; if ($etargetkey = maploopreplace($step->{map_entrytarget}, $maploop)) { unless ($etarget = $newentries{$etargetkey}) { biber_warn("Source mapping (type=$level, key=$key): Dynamically created entry target '$etargetkey' does not exist skipping step ..."); next; } } else { # default is that we operate on the same entry $etarget = $entry; $etargetkey = $key; } # Entrytype map if (my $typesource = maploopreplace($step->{map_type_source}, $maploop)) { $typesource = lc($typesource); unless ($etarget->getAttribute('entrytype') eq $typesource) { # Skip the rest of the map if this step doesn't match and match is final if ($step->{map_final}) { if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Entry type is '" . $etarget->getAttribute('entrytype') . "' but map wants '$typesource' and step has 'final' set, skipping rest of map ..."); } next MAP; } else { # just ignore this step if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Entry type is '" . $etarget->getAttribute('entrytype') . "' but map wants '$typesource', skipping step ..."); } next; } } # Change entrytype if requested $last_type = $etarget->getAttribute('entrytype'); my $t = lc(maploopreplace($step->{map_type_target}, $maploop)); if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Changing entry type from '$last_type' to $t"); } $etarget->setAttribute('entrytype', NFC($t)); } my $fieldcontinue = 0; my $xp_nfieldsource_s; my $xp_nfieldsource; my $xp_fieldsource_s; my $xp_fieldsource; # Negated source field map if ($xp_nfieldsource_s = _getpath(maploopreplace($step->{map_notfield}, $maploop))) { $xp_nfieldsource = XML::LibXML::XPathExpression->new($xp_nfieldsource_s); if ($etarget->exists($xp_nfieldsource)) { if ($step->{map_final}) { if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Field xpath '$xp_nfieldsource_s' exists and step has 'final' set, skipping rest of map ..."); } next MAP; } else { # just ignore this step if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Field xpath '$xp_nfieldsource_s' exists, skipping step ..."); } next; } } $fieldcontinue = 1; } # Field map if ($xp_fieldsource_s = _getpath(maploopreplace($step->{map_field_source}, $maploop))) { $xp_fieldsource = XML::LibXML::XPathExpression->new($xp_fieldsource_s); # key is a pseudo-field. It's guaranteed to exist so # just check if that's what's being asked for unless ($etarget->exists($xp_fieldsource)) { # Skip the rest of the map if this step doesn't match and match is final if ($step->{map_final}) { if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): No field xpath '$xp_fieldsource_s' and step has 'final' set, skipping rest of map ..."); } next MAP; } else { # just ignore this step if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): No field xpath '$xp_fieldsource_s', skipping step ..."); } next; } } $fieldcontinue = 1; } if ($fieldcontinue) { $last_field = $etarget->findnodes($xp_fieldsource)->get_node(1)->nodeName; $last_fieldval = $etarget->findvalue($xp_fieldsource); my $negmatch = 0; # Negated matches are a normal match with a special flag if (my $nm = $step->{map_notmatch}) { $step->{map_match} = $nm; $negmatch = 1; } # map fields to targets if (my $m = maploopreplace($step->{map_match}, $maploop)) { if (defined($step->{map_replace})) { # replace can be null # Can't modify entrykey if (lc($xp_fieldsource_s) eq './@id') { if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Field xpath '$xp_fieldsource_s' is entrykey- cannot remap the value of this field, skipping ..."); } next; } my $r = maploopreplace($step->{map_replace}, $maploop); if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Doing match/replace '$m' -> '$r' on field xpath '$xp_fieldsource_s'"); } unless (_changenode($etarget, $xp_fieldsource_s, ireplace($last_fieldval, $m, $r)), \$cnerror) { biber_warn("Source mapping (type=$level, key=$etargetkey): $cnerror"); } } else { # Now re-instate any unescaped $1 .. $9 to get round these being # dynamically scoped and being null when we get here from any # previous map_match # Be aware that imatch() uses m//g so @imatches can have multiple paren group # captures which might be useful $m =~ s/(?{map_final}) { if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Field xpath '$xp_fieldsource_s' does not match '$m' and step has 'final' set, skipping rest of map ..."); } next MAP; } else { # just ignore this step if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Field xpath '$xp_fieldsource_s' does not match '$m', skipping step ..."); } next; } } } } # Set to a different target if there is one if (my $xp_target_s = _getpath(maploopreplace($step->{map_field_target}, $maploop))) { my $xp_target = XML::LibXML::XPathExpression->new($xp_target_s); # Can't remap entry key pseudo-field if (lc($xp_target_s) eq './@id') { if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Field xpath '$xp_fieldsource_s' is entrykey - cannot map this to a new field as you must have an entrykey, skipping ..."); } next; } if ($etarget->exists($xp_target)) { if ($map->{map_overwrite} // $smap->{map_overwrite}) { if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Overwriting existing field xpath '$xp_target_s'"); } } else { if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Field xpath '$xp_fieldsource_s' is mapped to field xpath '$xp_target_s' but both are defined, skipping ..."); } next; } } unless (_changenode($etarget, $xp_target_s, $xp_fieldsource_s, \$cnerror)) { biber_warn("Source mapping (type=$level, key=$key): $cnerror"); } $etarget->findnodes($xp_fieldsource)->get_node(1)->unbindNode(); } } # field changes if (my $xp_node_s = _getpath(maploopreplace($step->{map_field_set}, $maploop))) { my $xp_node = XML::LibXML::XPathExpression->new($xp_node_s); # Deal with special tokens if ($step->{map_null}) { if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Deleting field xpath '$xp_node_s'"); } $etarget->findnodes($xp_node)->get_node(1)->unbindNode(); } else { if ($etarget->exists($xp_node)) { unless ($map->{map_overwrite} // $smap->{map_overwrite}) { if ($step->{map_final}) { # map_final is set, ignore and skip rest of step if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Field xpath '$xp_node_s' exists, overwrite is not set and step has 'final' set, skipping rest of map ..."); } next MAP; } else { # just ignore this step if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Field xpath '$xp_node_s' exists and overwrite is not set, skipping step ..."); } next; } } } # If append is set, keep the original value and append the new my $orig = $step->{map_append} ? $etarget->findvalue($xp_node) : ''; if ($step->{map_origentrytype}) { next unless $last_type; if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Setting xpath '$xp_node_s' to '${orig}${last_type}'"); } unless (_changenode($etarget, $xp_node_s, $orig . $last_type, \$cnerror)) { biber_warn("Source mapping (type=$level, key=$key): $cnerror"); } } elsif ($step->{map_origfieldval}) { next unless $last_fieldval; if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Setting field xpath '$xp_node_s' to '${orig}${last_fieldval}'"); } unless (_changenode($etarget, $xp_node_s, $orig . $last_fieldval, \$cnerror)) { biber_warn("Source mapping (type=$level, key=$etargetkey): $cnerror"); } } elsif ($step->{map_origfield}) { next unless $last_field; if ($logger->is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Setting field xpath '$xp_node_s' to '${orig}${last_field}'"); } unless (_changenode($etarget, $xp_node_s, $orig . $last_field, \$cnerror)) { biber_warn("Source mapping (type=$level, key=$etargetkey): $cnerror"); } } else { my $fv = maploopreplace($step->{map_field_value}, $maploop); # Now re-instate any unescaped $1 .. $9 to get round these being # dynamically scoped and being null when we get here from any # previous map_match $fv =~ s/(?is_debug()) {# performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Setting field xpath '$xp_node_s' to '${orig}${fv}'"); } unless (_changenode($etarget, $xp_node_s, $orig . $fv, \$cnerror)) { biber_warn("Source mapping (type=$level, key=$key): $cnerror"); } } } } } } } } # Need to also instantiate fields in any new entries created by map foreach my $e ($entry, values %newentries) { next unless $e; # newentry might be undef my $bibentry = new Biber::Entry; my $k = $e->getAttribute('id'); $bibentry->set_field('citekey', $k); if ($logger->is_debug()) {# performance tune $logger->debug("Creating entry with key '$k'"); } # We put all the fields we find modulo field aliases into the object. # Validation happens later and is not datasource dependent foreach my $f (uniq map { if (_norm($_->nodeName) eq 'names') { $_->getAttribute('type') } else { $_->nodeName()} } $e->findnodes('*')) { # We have to process local options as early as possible in order # to make them available for things that need them like name parsing if (_norm($f) eq 'options') { if (my $node = $entry->findnodes("./$NS:options")->get_node(1)) { process_entry_options($k, [ split(/\s*,\s*/, $node->textContent()) ]); } } # Now run any defined handler if ($dm->is_field(_norm($f))) { my $handler = _get_handler($f); $handler->($bibentry, $e, $f, $k); } } $bibentry->set_field('entrytype', $e->getAttribute('entrytype')); $bibentry->set_field('datatype', 'biblatexml'); $bibentries->add_entry($k, $bibentry); } return; } # Related entries sub _related { my ($bibentry, $entry, $f, $key) = @_; my $Srx = Biber::Config->getoption('xsvsep'); my $S = qr/$Srx/; my $node = $entry->findnodes("./$f")->get_node(1); foreach my $item ($node->findnodes("./$NS:list/$NS:item")) { $bibentry->set_datafield('related', [ split(/$S/, $item->getAttribute('ids')) ]); $bibentry->set_datafield('relatedtype', $item->getAttribute('type')); if (my $string = $item->getAttribute('string')) { $bibentry->set_datafield('relatedstring', $string); } if (my $string = $item->getAttribute('options')) { $bibentry->set_datafield('relatedoptions', [ split(/$S/, $item->getAttribute('relatedoptions')) ]); } } return; } # literal fields sub _literal { my ($bibentry, $entry, $f, $key) = @_; foreach my $node ($entry->findnodes("./$f")) { # eprint is special case if ($f eq "$NS:eprint") { $bibentry->set_datafield('eprinttype', $node->getAttribute('type')); if (my $ec = $node->getAttribute('class')) { $bibentry->set_datafield('eprintclass', $ec); } } else { $bibentry->set_datafield(_norm($f), $node->textContent()); } # generic annotation attribute if (my $string = $node->getAttribute('annotation')) { Biber::Annotation->set_annotation('field', $key, _norm($f), $string); } } return; } # xSV field sub _xsv { my ($bibentry, $entry, $f, $key) = @_; foreach my $node ($entry->findnodes("./$f")) { $bibentry->set_datafield(_norm($f), _split_list($node, $key, $f)); # generic annotation attribute if (my $string = $node->getAttribute('annotation')) { Biber::Annotation->set_annotation('field', $key, _norm($f), $string); } } return; } # uri fields sub _uri { my ($bibentry, $entry, $f, $key) = @_; my $node = $entry->findnodes("./$f")->get_node(1); my $value = $node->textContent(); # URL escape if it doesn't look like it already is # This is useful if we are generating URLs automatically with maps which may # contain UTF-8 from other fields unless ($value =~ /\%/) { $value = URI->new($value)->as_string; } $bibentry->set_datafield(_norm($f), $value); # generic annotation attribute if (my $string = $node->getAttribute('annotation')) { Biber::Annotation->set_annotation('field', $key, _norm($f), $string); } return; } # List fields sub _list { my ($bibentry, $entry, $f, $key) = @_; foreach my $node ($entry->findnodes("./$f")) { $bibentry->set_datafield(_norm($f), _split_list($node, $key, $f)); # generic annotation attribute if (my $string = $node->getAttribute('annotation')) { Biber::Annotation->set_annotation('field', $key, _norm($f), $string); } } return; } # Range fields sub _range { my ($bibentry, $entry, $f, $key) = @_; foreach my $node ($entry->findnodes("./$f")) { # List of ranges/values if (my @rangelist = $node->findnodes("./$NS:list/$NS:item")) { my $rl; foreach my $range (@rangelist) { push $rl->@*, _parse_range_list($range); } $bibentry->set_datafield(_norm($f), $rl); } } return; } # Date fields # NOTE - the biblatex options controlling era, circa and uncertain meta-information # output are in the .bcf but biber does not used them as it always outputs this information sub _datetime { my ($bibentry, $entry, $f, $key) = @_; my $secnum = $Biber::MASTER->get_current_section; my $section = $Biber::MASTER->sections->get_section($secnum); my $ds = $section->get_keytods($key); foreach my $node ($entry->findnodes("./$f")) { my $datetype = $node->getAttribute('type') // ''; $bibentry->set_field("${datetype}datesplit", 1); if (my $start = $node->findnodes("./$NS:start")) { # Date range my $end = $node->findnodes("./$NS:end"); # Start of range # Using high-level range parsing sub in order to get unspec if (my ($sdate, undef, undef, $unspec) = parse_date_range($bibentry, $datetype, $start->get_node(1)->textContent())) { # Save julian $bibentry->set_field($datetype . 'datejulian', 1) if $CONFIG_DATE_PARSERS{start}->julian; # Save circa information $bibentry->set_field($datetype . 'datecirca', 1) if $CONFIG_DATE_PARSERS{start}->circa; # Save uncertain date information $bibentry->set_field($datetype . 'dateuncertain', 1) if $CONFIG_DATE_PARSERS{start}->uncertain; # Date had EDTF 5.2.2 unspecified format # This does not differ for *enddate components as these are split into ranges # from non-ranges only if ($unspec) { $bibentry->set_field($datetype . 'dateunspecified', $unspec); } unless ($CONFIG_DATE_PARSERS{start}->missing('year')) { $bibentry->set_datafield($datetype . 'year', $sdate->year); # Save era date information $bibentry->set_field($datetype . 'era', lc($sdate->secular_era)); } $bibentry->set_datafield($datetype . 'month', $sdate->month) unless $CONFIG_DATE_PARSERS{start}->missing('month'); $bibentry->set_datafield($datetype . 'day', $sdate->day) unless $CONFIG_DATE_PARSERS{start}->missing('day'); # Save start season date information if (my $season = $CONFIG_DATE_PARSERS{start}->season) { $bibentry->set_field($datetype . 'season', $season); } # must be an hour if there is a time but could be 00 so use defined() unless ($CONFIG_DATE_PARSERS{start}->missing('time')) { $bibentry->set_datafield($datetype . 'hour', $sdate->hour); $bibentry->set_datafield($datetype . 'minute', $sdate->minute); $bibentry->set_datafield($datetype . 'second', $sdate->second); unless ($sdate->time_zone->is_floating) { # ignore floating timezones $bibentry->set_datafield($datetype . 'timezone', tzformat($sdate->time_zone->name)); } } } else { biber_warn("Datamodel: Entry '$key' ($ds): Invalid format '" . $start->get_node(1)->textContent() . "' of date field '$f' range start - ignoring", $bibentry); } # End of range my $edate = parse_date_end($end->get_node(1)->textContent()); if (defined($edate)) { # no parse error if ($edate) { # not an empty range # Save julian $bibentry->set_field($datetype . 'enddatejulian', 1) if $CONFIG_DATE_PARSERS{end}->julian; # Save circa information $bibentry->set_field($datetype . 'enddatecirca', 1) if $CONFIG_DATE_PARSERS{end}->circa; # Save uncertain date information $bibentry->set_field($datetype . 'enddateuncertain', 1) if $CONFIG_DATE_PARSERS{end}->uncertain; unless ($CONFIG_DATE_PARSERS{end}->missing('year')) { $bibentry->set_datafield($datetype . 'endyear', $edate->year); # Save era date information $bibentry->set_field($datetype . 'endera', lc($edate->secular_era)); } $bibentry->set_datafield($datetype . 'endmonth', $edate->month) unless $CONFIG_DATE_PARSERS{end}->missing('month'); $bibentry->set_datafield($datetype . 'endday', $edate->day) unless $CONFIG_DATE_PARSERS{end}->missing('day'); # Save end season date information if (my $season = $CONFIG_DATE_PARSERS{end}->season) { $bibentry->set_field($datetype . 'endseason', $season); } # must be an hour if there is a time but could be 00 so use defined() unless ($CONFIG_DATE_PARSERS{end}->missing('time')) { $bibentry->set_datafield($datetype . 'endhour', $edate->hour); $bibentry->set_datafield($datetype . 'endminute', $edate->minute); $bibentry->set_datafield($datetype . 'endsecond', $edate->second); unless ($edate->time_zone->is_floating) { # ignore floating timezones $bibentry->set_datafield($datetype . 'endtimezone', tzformat($edate->time_zone->name)); } } } else { # open ended range - edate is defined but empty $bibentry->set_datafield($datetype . 'endyear', ''); } } else { biber_warn("Entry '$key' ($ds): Invalid format '" . $end->get_node(1)->textContent() . "' of date field '$f' range end - ignoring", $bibentry); } } else { # Simple date # Using high-level range parsing sub in order to get unspec if (my ($sdate, undef, undef, $unspec) = parse_date_range($bibentry, $datetype, $node->textContent())) { # Save julian $bibentry->set_field($datetype . 'datejulian', 1) if $CONFIG_DATE_PARSERS{start}->julian; # Save circa information $bibentry->set_field($datetype . 'datecirca', 1) if $CONFIG_DATE_PARSERS{start}->circa; # Save uncertain date information $bibentry->set_field($datetype . 'dateuncertain', 1) if $CONFIG_DATE_PARSERS{start}->uncertain; # Date had EDTF 5.2.2 unspecified format # This does not differ for *enddate components as these are split into ranges # from non-ranges only if ($unspec) { $bibentry->set_field($datetype . 'dateunspecified', $unspec); } unless ($CONFIG_DATE_PARSERS{start}->missing('year')) { $bibentry->set_datafield($datetype . 'year', $sdate->year); # Save era date information $bibentry->set_field($datetype . 'era', lc($sdate->secular_era)); } $bibentry->set_datafield($datetype . 'month', $sdate->month) unless $CONFIG_DATE_PARSERS{start}->missing('month'); $bibentry->set_datafield($datetype . 'day', $sdate->day) unless $CONFIG_DATE_PARSERS{start}->missing('day'); # Save start season date information if (my $season = $CONFIG_DATE_PARSERS{start}->season) { $bibentry->set_field($datetype . 'season', $season); } # must be an hour if there is a time but could be 00 so use defined() unless ($CONFIG_DATE_PARSERS{start}->missing('time')) { $bibentry->set_datafield($datetype . 'hour', $sdate->hour); $bibentry->set_datafield($datetype . 'minute', $sdate->minute); $bibentry->set_datafield($datetype . 'second', $sdate->second); unless ($sdate->time_zone->is_floating) { # ignore floating timezones $bibentry->set_datafield($datetype . 'timezone', tzformat($sdate->time_zone->name)); } } } else { biber_warn("Entry '$key' ($ds): Invalid format '" . $node->textContent() . "' of date field '$f' - ignoring", $bibentry); } } } return; } # Name fields sub _name { my ($bibentry, $entry, $f, $key) = @_; my $un = Biber::Config->getblxoption('uniquename', $bibentry->get_field('entrytype'), $key); foreach my $node ($entry->findnodes("./$NS:names[\@type='$f']")) { my $names = new Biber::Entry::Names; # per-namelist options foreach my $nlo (keys $CONFIG_SCOPEOPT_BIBLATEX{NAMELIST}->%*) { if ($node->hasAttribute($nlo)) { my $nlov = $node->getAttribute($nlo); if ($CONFIG_OPTTYPE_BIBLATEX{$nlo} and $CONFIG_OPTTYPE_BIBLATEX{$nlo} eq 'boolean') { $nlov = map_boolean($nlov, 'tonum'); } my $oo = expand_option($nlo, $nlov, $CONFIG_BIBLATEX_NAMELIST_OPTIONS{$nlo}->{INPUT}); foreach my $o ($oo->@*) { my $method = 'set_' . $o->[0]; $names->$method($o->[1]); } } } my $numname = 1; foreach my $namenode ($node->findnodes("./$NS:name")) { my $useprefix; # Name list and higher scope useprefix option. We have to pass this into parsename # as the actual current scope value is needed to generate name objects if (defined($names->get_useprefix)) { $useprefix = $names->get_useprefix; } else { $useprefix = Biber::Config->getblxoption('useprefix', $bibentry->get_field('entrytype'), $key); } $names->add_name(parsename($namenode, $f, $key, $numname++, {useprefix => $useprefix, uniquename => ($un // 0)})); } # Deal with explicit "moreenames" in data source if ($node->getAttribute('morenames')) { $names->set_morenames; } $bibentry->set_datafield(_norm($f), $names); # generic annotation attribute if (my $string = $node->getAttribute('annotation')) { Biber::Annotation->set_annotation('field', $key, _norm($f), $string); } } return; } =head2 parsename Given a name node, this function returns a Biber::Entry::Name object Returns an object which internally looks a bit like this: { given => {string => 'John', initial => ['J']}, family => {string => 'Doe', initial => ['D']}, middle => {string => 'Fred', initial => ['F']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}, basenamestring => 'Doe', namestring => 'Doe, John Fred', nameinitstring => 'Doe_JF', gender => sm, useprefix => 1, sortingnamekeytemplatename => 'templatename' } =cut sub parsename { my ($node, $fieldname, $key, $count, $opts) = @_; if ($logger->is_debug()) {# performance tune $logger->debug('Parsing BibLaTeXML name object ' . $node->nodePath); } # generic annotation attribute - individual name scope if (my $string = $node->getAttribute('annotation')) { Biber::Annotation->set_annotation('item', $key, _norm($fieldname), $string, $count); } my %namec; foreach my $n ($dm->get_constant_value('nameparts')) { # list type so returns list # If there is a namepart node for this component ... if (my $npnode = $node->findnodes("./$NS:namepart[\@type='$n']")->get_node(1)) { # generic annotation attribute - namepart scope if (my $string = $npnode->getAttribute('annotation')) { Biber::Annotation->set_annotation('part', $key, _norm($fieldname), $string, $count, $n); } # name component with parts if (my @npnodes = $npnode->findnodes("./$NS:namepart")) { my @parts = map {$_->textContent()} @npnodes; $namec{$n} = join_name_parts(\@parts); if ($logger->is_debug()) {# performance tune $logger->debug("Found namepart '$n': " . $namec{$n}); } my @partinits; foreach my $part (@npnodes) { if (my $pi = $part->getAttribute('initial')) { push @partinits, $pi; } else { push @partinits, gen_initials($part->textContent()); } } $namec{"${n}-i"} = \@partinits; } # with no parts elsif (my $t = $npnode->textContent()) { $namec{$n} = $t; if ($logger->is_debug()) {# performance tune $logger->debug("Found namepart '$n': $t"); } if (my $ni = $node->getAttribute('initial')) { $namec{"${n}-i"} = [$ni]; } else { $namec{"${n}-i"} = [gen_initials($t)]; } } } } my %nps; foreach my $n ($dm->get_constant_value('nameparts')) { # list type so returns list $nps{$n} = {string => $namec{$n} // undef, initial => exists($namec{$n}) ? $namec{"${n}-i"} : undef}; } my $newname = Biber::Entry::Name->new( %nps, gender => $node->getAttribute('gender') ); # per-name options foreach my $no (keys $CONFIG_SCOPEOPT_BIBLATEX{NAME}->%*) { if ($node->hasAttribute($no)) { my $nov = $node->getAttribute($no); if ($CONFIG_OPTTYPE_BIBLATEX{$no} and $CONFIG_OPTTYPE_BIBLATEX{$no} eq 'boolean') { $nov = map_boolean($nov, 'tonum'); } my $oo = expand_option($no, $nov, $CONFIG_BIBLATEX_NAME_OPTIONS{$no}->{INPUT}); foreach my $o ($oo->@*) { my $method = 'set_' . $o->[0]; $newname->$method($o->[1]); } } } return $newname; } # parses a range and returns a ref to an array of start and end values sub _parse_range_list { my $rangenode = shift; my $start = ''; my $end = ''; if (my $s = $rangenode->findnodes("./$NS:start")) { $start = $s->get_node(1)->textContent(); } if (my $e = $rangenode->findnodes("./$NS:end")) { $end = $e->get_node(1)->textContent(); } return [$start, $end]; } # Splits a list field into an array ref sub _split_list { my ($node, $key, $f) = @_; if (my @list = $node->findnodes("./$NS:list/$NS:item")) { for (my $i = 0; $i <= $#list; $i++) { # generic annotation attribute if (my $string = $list[$i]->getAttribute('annotation')) { Biber::Annotation->set_annotation('item', $key, _norm($f), $string, $i+1); } } return [ map {$_->textContent()} @list ]; } else { return [ $node->textContent() ]; } } # normalise a node name as they have a namsespace and might not be lowercase sub _norm { my $name = lc(shift); $name =~ s/\A$NS://xms; return $name; } sub _get_handler { my $field = shift; if (my $h = $handlers->{CUSTOM}{_norm($field)}) { return $h; } else { return $handlers->{$dm->get_fieldtype(_norm($field))}{$dm->get_fieldformat(_norm($field)) || 'default'}{$dm->get_datatype(_norm($field))}; } } # Changes node $xp_target_s (XPATH 1.0) to $value in the biblatexml entry $e, puts errors # into $error. Quite complicated because of the various node types that can be changed and # also due to the requirements of creating new targets when then don't exist. sub _changenode { my ($e, $xp_target_s, $value, $error) = @_; # names are special and can be specified by just the string if ($dm->is_field($value)) { my $dmv = $dm->get_dm_for_field($value); if ($dmv->{fieldtype} eq 'list' and $dmv->{datatype} eq 'name') { $value = _getpath($value); } } # $value can be an XPATH or just a string. my $nodeval = 0; if ($value =~ m|/|) { $value = $e->findnodes($value)->get_node(1)->cloneNode(1); $nodeval = 1; } # target already exists if (my $n = $e->findnodes($xp_target_s)->get_node(1)) { # set attribute value if ($n->nodeType == XML_ATTRIBUTE_NODE) { if ($nodeval) { $$error = "Tried to replace '$xp_target_s' Atribute node with complex data"; return 0; } $n->setValue(NFC($value)); } # Set element elsif ($n->nodeType == XML_ELEMENT_NODE) { # if value is a node, remove target child nodes and replace with value child nodes if ($nodeval) { $n->removeChildNodes(); foreach my $cn ($value->childNodes) { $n->appendChild($cn); } } # value is just a string, replace target text content with value string else { $n->findnodes('./text()')->get_node(1)->setData(NFC($value)); } } # target is a text node, just replace string elsif ($n->nodeType == XML_TEXT_NODE) { if ($nodeval) { $$error = "Tried to replace '$xp_target_s' Text node with complex data"; return 0; } $n->setData(NFC($value)); } } else { my @nodes = split(m|/|, $xp_target_s =~ s|^\./||r); my $nodepath = '.'; my $nodeparent = '.'; for (my $i = 0; $i <= $#nodes; $i++) { my $node = $nodes[$i]; $nodepath .= "/$node"; unless ($e->findnodes($nodepath)) { my $parent = $e->findnodes($nodeparent)->get_node(1); # Element my $f; if (my ($np) = $node =~ m|^bltx:([^/]+)|) { # names are special $f = $np; if ($np =~ /names\[\@type\s*=\s*'(.+)'\]/) { $f = $1; } if ($dm->field_is_fieldtype('list', $f) and $dm->field_is_datatype('name', $f)) { my $newnode = $parent->appendChild(XML::LibXML::Element->new('names')); $newnode->setNamespace($BIBLATEXML_NAMESPACE_URI, 'bltx'); $newnode->setAttribute('type', $f); if ($i == $#nodes) { # terminal node if ($nodeval) { foreach my $cn ($value->childNodes) { $newnode->appendChild($cn); } } else { $$error = "Tried to map to complex target '$xp_target_s' with string value"; return 0; } } } else { my $newnode = $parent->appendChild(XML::LibXML::Element->new($node =~ s|^bltx:||r)); $newnode->setNamespace($BIBLATEXML_NAMESPACE_URI, 'bltx'); if ($i == $#nodes) { # terminal node $newnode->appendTextNode(NFC($value)); } } } # Attribute elsif ($node =~ m/^@/) { if ($i == $#nodes) { $parent->setAttribute($node =~ s|^@||r, NFC($value)); } } # Text elsif ($node =~ m/text\(\)$/) { if ($i == $#nodes) { $parent->appendTextNode(NFC($value)); } } } $nodeparent .= "/$node"; } } return 1; } sub _getpath { my $string = shift; return undef unless $string; my $dm = Biber::Config->get_dm; if ($string =~ m|/|) { return $string; # presumably already XPath } else { if ($dm->is_field($string)) { my $dms = $dm->get_dm_for_field($string); if ($dms->{fieldtype} eq 'list' and $dms->{datatype} eq 'name') { return "./bltx:names[\@type='$string']"; } else { return "./bltx:$string"; } } else { return $string; # not a field, presumably just a string value } } } 1; __END__ =pod =encoding utf-8 =head1 NAME Biber::Input::file::biblatexml - look in a BibLaTeXML file for an entry and create it if found =head1 DESCRIPTION Provides the extract_entries() method to get entries from a biblatexml data source and instantiate Biber::Entry objects for what it finds =head1 AUTHOR François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/lib/Biber/Input/file/bibtex.pm000444000153000001 21244413205066062 21327 0ustar00vboxother000000000000package Biber::Input::file::bibtex; use v5.24; use strict; use warnings; use sigtrap qw(handler TBSIG SEGV); use Carp; use Text::BibTeX qw(:nameparts :joinmethods :metatypes); use Text::BibTeX::Name; use Text::BibTeX::NameFormat; use Biber::Annotation; use Biber::Constants; use Biber::DataModel; use Biber::Entries; use Biber::Entry; use Biber::Entry::Names; use Biber::Entry::Name; use Biber::Sections; use Biber::Section; use Biber::Utils; use Biber::Config; use Encode; use File::Spec; use File::Slurper; use File::Temp; use Log::Log4perl qw(:no_extra_logdie_message); use List::AllUtils qw( :all ); use Scalar::Util qw(looks_like_number); use URI; use Unicode::Normalize; use Unicode::GCString; use XML::LibXML::Simple; my $logger = Log::Log4perl::get_logger('main'); state $cache; # state variable so it's persistent across calls to extract_entries() use vars qw($cache); =head2 init_cache Invalidate the T::B object cache. Used only in tests when e.g. we change the encoding settings and therefore must force a re-read of the data =cut sub init_cache { $cache = {}; } # Determine handlers from data model my $dm = Biber::Config->get_dm; my $handlers = { 'custom' => {'annotation' => \&_annotation}, 'field' => { 'default' => { 'code' => \&_literal, 'date' => \&_datetime, 'datepart' => \&_literal, 'entrykey' => \&_literal, 'integer' => \&_literal, 'key' => \&_literal, 'literal' => \&_literal, 'range' => \&_range, 'verbatim' => \&_verbatim, 'uri' => \&_uri }, 'xsv' => { 'entrykey' => \&_xsv, 'keyword' => \&_xsv, 'option' => \&_xsv, } }, 'list' => { 'default' => { 'key' => \&_list, 'literal' => \&_list, 'name' => \&_name, 'verbatim' => \&_list, 'uri' => \&_urilist } } }; =head2 TBSIG Signal handler to catch fatal Text::BibTex SEGFAULTS. It has bugs and we want to say at least something if it coredumps =cut sub TBSIG { my $sig = shift; $logger->logdie("Caught signal: $sig\nLikely your .bib has a very bad entry which causes libbtparse to crash: $!"); } =head2 extract_entries Main data extraction routine. Accepts a data source identifier, preprocesses the file and then looks for the passed keys, creating entries when it finds them and passes out an array of keys it didn't find. =cut sub extract_entries { my ($source, $keys) = @_; my $secnum = $Biber::MASTER->get_current_section; my $section = $Biber::MASTER->sections->get_section($secnum); my $filename; my @rkeys = $keys->@*; my $tf; # Up here so that the temp file has enough scope to survive until we've used it if ($logger->is_trace()) {# performance tune $logger->trace("Entering extract_entries() in driver 'bibtex'"); } # Get a reference to the correct sourcemap sections, if they exist my $smaps = []; # Maps are applied in order USER->STYLE->DRIVER if (defined(Biber::Config->getoption('sourcemap'))) { # User maps if (my $m = first {$_->{datatype} eq 'bibtex' and $_->{level} eq 'user' } Biber::Config->getoption('sourcemap')->@* ) { push $smaps->@*, $m; } # Style maps # Allow multiple style maps from multiple \DeclareStyleSourcemap if (my @m = grep {$_->{datatype} eq 'bibtex' and $_->{level} eq 'style' } Biber::Config->getoption('sourcemap')->@* ) { push $smaps->@*, @m; } # Driver default maps if (my $m = first {$_->{datatype} eq 'bibtex' and $_->{level} eq 'driver'} Biber::Config->getoption('sourcemap')->@* ) { push $smaps->@*, $m; } } # If it's a remote data file, fetch it first if ($source =~ m/\A(?:http|ftp)(s?):\/\//xms) { $logger->info("Data source '$source' is a remote BibTeX data source - fetching ..."); if (my $cf = $REMOTE_MAP{$source}) { $logger->info("Found '$source' in remote source cache"); $filename = $cf; } else { if ($1) { # HTTPS/FTPS # use IO::Socket::SSL qw(debug99); # useful for debugging SSL issues # We have to explicitly set the cert path because otherwise the https module # can't find the .pem when PAR::Packer'ed # Have to explicitly try to require Mozilla::CA here to get it into %INC below # It may, however, have been removed by some biber unpacked dists if (not exists($ENV{PERL_LWP_SSL_CA_FILE}) and not exists($ENV{PERL_LWP_SSL_CA_PATH}) and not defined(Biber::Config->getoption('ssl-nointernalca')) and eval {require Mozilla::CA}) { # we assume that the default CA file is in .../Mozilla/CA/cacert.pem (my $vol, my $dir, undef) = File::Spec->splitpath( $INC{"Mozilla/CA.pm"} ); $dir =~ s/\/$//; # splitpath sometimes leaves a trailing '/' $ENV{PERL_LWP_SSL_CA_FILE} = File::Spec->catpath($vol, "$dir/CA", 'cacert.pem'); } # fallbacks for, e.g., linux unless (exists($ENV{PERL_LWP_SSL_CA_FILE})) { foreach my $ca_bundle (qw{ /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt /etc/ssl/ca-bundle.pem }) { next if ! -e $ca_bundle; $ENV{PERL_LWP_SSL_CA_FILE} = $ca_bundle; last; } foreach my $ca_path (qw{ /etc/ssl/certs/ /etc/pki/tls/ }) { next if ! -d $ca_path; $ENV{PERL_LWP_SSL_CA_PATH} = $ca_path; last; } } if (defined(Biber::Config->getoption('ssl-noverify-host'))) { $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; } require LWP::Protocol::https; } require LWP::Simple; $tf = File::Temp->new(TEMPLATE => 'biber_remote_data_source_XXXXX', DIR => $Biber::MASTER->biber_tempdir, SUFFIX => '.bib'); # Pretend to be a browser otherwise some sites refuse the default LWP UA string $LWP::Simple::ua->agent('Mozilla/5.0'); my $retcode = LWP::Simple::getstore($source, $tf->filename); unless (LWP::Simple::is_success($retcode)) { biber_error("Could not fetch '$source' (HTTP code: $retcode)"); } $filename = $tf->filename; # cache any remote so it persists and so we don't fetch it again $REMOTE_MAP{$source} = $filename; } } else { # Need to get the filename even if using cache so we increment # the filename count for preambles at the bottom of this sub unless ($filename = locate_biber_file($source)) { biber_error("Cannot find '$source'!") } } # Text::BibTeX can't be controlled by Log4perl so we have to do something clumsy # We can't redirect STDERR to a variable as libbtparse doesnt' use PerlIO, just stdio # so it doesn't understand this. It does understand normal file redirection though as # that's standard stdio. # The Log4Perl setup outputs only to STDOUT so redirecting all STDERR like this is # ok since only libbtparse will be writing there # Don't do this if we are debugging or tracing because some errors in libbtparse cause # sudden death and can't be output as the read/output of the saved STDERR is never reached. # so, if debugging/tracing, output STDERR errors immediately. my $tberr; my $tberr_name; unless ($logger->is_debug() or $logger->is_trace()) { $tberr = File::Temp->new(TEMPLATE => 'biber_Text_BibTeX_STDERR_XXXXX', DIR => $Biber::MASTER->biber_tempdir); $tberr_name = $tberr->filename; open OLDERR, '>&', \*STDERR; open STDERR, '>', $tberr_name; } # Increment the number of times each datafile has been referenced # For example, a datafile might be referenced in more than one section. # Some things find this information useful, for example, setting preambles is global # and so we need to know if we've already saved the preamble for a datafile. $cache->{counts}{$filename}++; # Don't read the file again if it's already cached unless ($cache->{data}{$filename}) { if ($logger->is_debug()) {# performance tune $logger->debug("Caching data for BibTeX format file '$filename' for section $secnum"); } cache_data($filename); } else { if ($logger->is_debug()) {# performance tune $logger->debug("Using cached data for BibTeX format file '$filename' for section $secnum"); } } if ($section->is_allkeys) { if ($logger->is_debug()) {# performance tune $logger->debug("All citekeys will be used for section '$secnum'"); } # Loop over all entries, creating objects while (my ($key, $entry) = each $cache->{data}{$filename}->%*) { # Record a key->datasource name mapping for error reporting $section->set_keytods($key, $filename); unless (create_entry($key, $entry, $source, $smaps, \@rkeys)) { # if create entry returns false, remove the key from the cache $cache->{orig_key_order}{$filename}->@* = grep {$key ne $_} $cache->{orig_key_order}{$filename}->@*; } } # Loop over all aliases, creating data in section object # Since this is allkeys, we are guaranteed that the real entry for the alias # will be available while (my ($alias, $key) = each $cache->{data}{citekey_aliases}->%*) { $section->set_citekey_alias($alias, $key); } # If allkeys, push all bibdata keys into citekeys (if they are not already there). # We are using the special "orig_key_order" array which is used to deal with the # situation when sorting=none and allkeys is set. We need an array rather than the # keys from the bibentries hash because we need to preserve the original order of # the .bib as in this case the sorting sub "citeorder" means "bib order" as there are # no explicitly cited keys $section->add_citekeys($cache->{orig_key_order}{$filename}->@*); if ($logger->is_debug()) {# performance tune $logger->debug("Added all citekeys to section '$secnum': " . join(', ', $section->get_citekeys)); } # Special case when allkeys but also some dynamic set entries. These keys must also be # in the section or they will be missed on output. if ($section->has_dynamic_sets) { $section->add_citekeys($section->dynamic_set_keys->@*); if ($logger->is_debug()) {# performance tune $logger->debug("Added dynamic sets to section '$secnum': " . join(', ', $section->dynamic_set_keys->@*)); } } } else { # loop over all keys we're looking for and create objects if ($logger->is_debug()) {# performance tune $logger->debug('Text::BibTeX cache keys: ' . join(', ', keys $cache->{data}{$filename}->%*)); $logger->debug('Wanted keys: ' . join(', ', $keys->@*)); } foreach my $wanted_key ($keys->@*) { if ($logger->is_debug()) {# performance tune $logger->debug("Looking for key '$wanted_key' in Text::BibTeX cache"); } # Record a key->datasource name mapping for error reporting $section->set_keytods($wanted_key, $filename); if (my $entry = $cache->{data}{$filename}{$wanted_key}) { if ($logger->is_debug()) {# performance tune $logger->debug("Found key '$wanted_key' in Text::BibTeX cache"); } # Skip creation if it's already been done, for example, via a citekey alias unless ($section->bibentries->entry_exists($wanted_key)) { create_entry($wanted_key, $entry, $source, $smaps, \@rkeys); } # found a key, remove it from the list of keys we want @rkeys = grep {$wanted_key ne $_} @rkeys; } elsif (my $rk = $cache->{data}{citekey_aliases}{$wanted_key}) { $section->set_citekey_alias($wanted_key, $rk); # Make sure there is a real, cited entry for the citekey alias # just in case only the alias is cited. However, make sure that the real entry # is actually cited before adding to the section citekeys list in case this real # entry is only needed as an aliased Xref and shouldn't necessarily be in # the bibliography (minXrefs will take care of adding it there if necessary). unless ($section->bibentries->entry_exists($rk)) { if (my $entry = $cache->{data}{GLOBALDS}{$rk}) {# Look in cache of all datasource keys create_entry($rk, $entry, $source, $smaps, \@rkeys); if ($section->has_cited_citekey($wanted_key)) { $section->add_citekeys($rk); } } } # found an alias key, remove it from the list of keys we want @rkeys = grep {$wanted_key ne $_} @rkeys; } elsif (my $okey = $section->has_badcasekey($wanted_key)) { biber_warn("Possible typo (case mismatch) between citation and datasource keys: '$wanted_key' and '$okey' in file '$filename'"); } if ($logger->is_debug()) {# performance tune $logger->debug('Wanted keys now: ' . join(', ', @rkeys)); } } } unless ($logger->is_debug() or $logger->is_trace()) { open STDERR, '>&', \*OLDERR; close OLDERR; # Put any Text::BibTeX errors into the biber warnings/errors collections # We are parsing the libbtparse library error/warning strings a little here # This is not so bad as they have a clean structure (see error.c in libbtparse) open my $tbe, '<', $tberr_name; while (<$tbe>) { if (/error:/) { chomp; biber_error("BibTeX subsystem: $_"); } elsif (/warning:/) { chomp; biber_warn("BibTeX subsystem: $_"); } } close($tbe); } # Only push the preambles from the file if we haven't seen this data file before # and there are some preambles to push if ($cache->{counts}{$filename} < 2 and $cache->{preamble}{$filename}->@*) { push $Biber::MASTER->{preamble}->@*, $cache->{preamble}{$filename}->@*; } # Save comments if in tool mode if (Biber::Config->getoption('tool')) { if ($cache->{comments}{$filename}) { $Biber::MASTER->{comments} = $cache->{comments}{$filename}; } } return @rkeys; } =head2 create_entry Create a Biber::Entry object from a Text::BibTeX object Be careful in here, all T::B set methods are UTF-8/NFC boundaries so be careful to encode(NFC()) on calls. Windows won't handle UTF-8 in T::B btparse gracefully and will die. =cut sub create_entry { # We have to pass in $rkeys so that the new/clone operations can remove the new/clone # key from the list of wanted keys because new/cloned entries will never appear to the normal # key search loop my ($key, $entry, $datasource, $smaps, $rkeys) = @_; my $secnum = $Biber::MASTER->get_current_section; my $section = $Biber::MASTER->sections->get_section($secnum); if ( $entry->metatype == BTE_REGULAR ) { my %newentries; # In case we create a new entry in a map # Save entry and work on a clone so that modifications do not propagate to # other refsections my $saved_entry = $entry; $entry = $entry->clone; # Datasource mapping applied in $smap order (USER->STYLE->DRIVER) foreach my $smap ($smaps->@*) { $smap->{map_overwrite} = $smap->{map_overwrite} // 0; # default my $level = $smap->{level}; MAP: foreach my $map ($smap->{map}->@*) { # Skip if this map element specifies a particular refsection and it is not this one if (exists($map->{refsection})) { next unless $secnum == $map->{refsection}; } # Check pertype restrictions # Logic is "-(-P v Q)" which is equivalent to "P & -Q" but -Q is an array check so # messier to write than Q unless (not exists($map->{per_type}) or first {lc($_->{content}) eq $entry->type} $map->{per_type}->@*) { next; } # Check negated pertype restrictions if (exists($map->{per_nottype}) and first {lc($_->{content}) eq $entry->type} $map->{per_nottype}->@*) { next; } # Check per_datasource restrictions # Don't compare case insensitively - this might not be correct # Logic is "-(-P v Q)" which is equivalent to "P & -Q" but -Q is an array check so # messier to write than Q unless (not exists($map->{per_datasource}) or first {$_->{content} eq $datasource} $map->{per_datasource}->@*) { next; } my $last_type = $entry->type; # defaults to the entrytype unless changed below my $last_field = undef; my $last_fieldval = undef; my @imatches; # For persisting parenthetical matches over several steps # Set up any mapping foreach loop my @maploop = (''); if (my $foreach = $map->{map_foreach}) { if (my $dslist = $DATAFIELD_SETS{lc($foreach)}) { # datafield set list @maploop = $dslist->@*; } elsif (my $felist = $entry->get(lc($foreach))) { # datafield @maploop = split(/\s*,\s*/, $felist); } else { # explicit CSV @maploop = split(/\s*,\s*/, $foreach); } } foreach my $maploop (@maploop) { my $MAPUNIQVAL; # loop over mapping steps foreach my $step ($map->{map_step}->@*) { # entry deletion. Really only useful with allkeys or tool mode if ($step->{map_entry_null}) { if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$key): Ignoring entry completely"); } return 0; # don't create an entry at all } # new entry if (my $newkey = maploopreplace($step->{map_entry_new}, $maploop)) { # Now re-instate any unescaped $1 .. $9 to get round these being # dynamically scoped and being null when we get here from any # previous map_match $newkey =~ s/(?{map_entry_newtype}, $maploop)) { biber_warn("Source mapping (type=$level, key=$key): Missing type for new entry '$newkey', skipping step ..."); next; } if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$key): Creating new entry with key '$newkey'"); } my $newentry = Text::BibTeX::Entry->new(); $newentry->set_metatype(BTE_REGULAR); $newentry->set_key(encode('UTF-8', NFC($newkey))); $newentry->set_type(encode('UTF-8', NFC($newentrytype))); # found a new entry key, remove it from the list of keys we want since we # have "found" it by creating it if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$key): created '$newkey', removing from dependent list"); } $rkeys->@* = grep {$newkey ne $_} $rkeys->@*; # Need to add the clone key to the section if allkeys is set since all keys # are cleared for allkeys sections initially if ($section->is_allkeys) { $section->add_citekeys($newkey); } $newentries{$newkey} = $newentry; } # entry clone if (my $clonekey = maploopreplace($step->{map_entry_clone}, $maploop)) { # Now re-instate any unescaped $1 .. $9 to get round these being # dynamically scoped and being null when we get here from any # previous map_match $clonekey =~ s/(?is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$key): cloning entry with new key '$clonekey'"); } # found a clone key, remove it from the list of keys we want since we # have "found" it by creating it along with its clone parent if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$key): created '$clonekey', removing from dependent list"); } $rkeys->@* = grep {$clonekey ne $_} $rkeys->@*; # Need to add the clone key to the section if allkeys is set since all keys # are cleared for allkeys sections initially if ($section->is_allkeys) { $section->add_citekeys($clonekey); } $newentries{$clonekey} = $entry->clone; } # An entry created by map_entry_new or map_entry_clone previously can be # the target for field setting options # A newly created entry as target of operations doesn't make sense in all situations # so it's limited to being the target for field sets my $etarget; my $etargetkey; if ($etargetkey = maploopreplace($step->{map_entrytarget}, $maploop)) { # Now re-instate any unescaped $1 .. $9 to get round these being # dynamically scoped and being null when we get here from any # previous map_match $etargetkey =~ s/(?{map_type_source}, $maploop)) { $typesource = lc($typesource); unless ($etarget->type eq $typesource) { # Skip the rest of the map if this step doesn't match and match is final if ($step->{map_final}) { if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Entry type is '" . $etarget->type . "' but map wants '$typesource' and step has 'final' set, skipping rest of map ..."); } next MAP; } else { # just ignore this step if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Entry type is '" . $etarget->type . "' but map wants '$typesource', skipping step ..."); } next; } } # Change entrytype if requested $last_type = $etarget->type; my $t = lc(maploopreplace($step->{map_type_target}, $maploop)); if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Changing entry type from '$last_type' to $t"); } $etarget->set_type(encode('UTF-8', NFC($t))); } my $fieldcontinue = 0; my $fieldsource; my $nfieldsource; # Negated source field map if ($nfieldsource = maploopreplace($step->{map_notfield}, $maploop)) { $nfieldsource = lc($nfieldsource); if ($etarget->exists($nfieldsource)) { if ($step->{map_final}) { if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Field '$nfieldsource' exists and step has 'final' set, skipping rest of map ..."); } next MAP; } else { # just ignore this step if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Field '$nfieldsource' exists, skipping step ..."); } next; } } $fieldcontinue = 1; } # Field map if ($fieldsource = maploopreplace($step->{map_field_source}, $maploop)) { $fieldsource = lc($fieldsource); # key is a pseudo-field. It's guaranteed to exist so # just check if that's what's being asked for unless ($fieldsource eq 'entrykey' or $etarget->exists($fieldsource)) { # Skip the rest of the map if this step doesn't match and match is final if ($step->{map_final}) { if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): No field '$fieldsource' and step has 'final' set, skipping rest of map ..."); } next MAP; } else { # just ignore this step if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): No field '$fieldsource', skipping step ..."); } next; } } $fieldcontinue = 1; } if ($fieldcontinue) { $last_field = $fieldsource; $last_fieldval = $fieldsource eq 'entrykey' ? $etarget->key : $etarget->get($fieldsource); my $negmatch = 0; # Negated matches are a normal match with a special flag if (my $nm = $step->{map_notmatch}) { $step->{map_match} = $nm; $negmatch = 1; } # map fields to targets if (my $m = maploopreplace($step->{map_match}, $maploop)) { if (defined($step->{map_replace})) { # replace can be null # Can't modify entrykey if ($fieldsource eq 'entrykey') { if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Field '$fieldsource' is 'entrykey'- cannot remap the value of this field, skipping ..."); } next; } my $r = maploopreplace($step->{map_replace}, $maploop); if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Doing match/replace '$m' -> '$r' on field '$fieldsource'"); } $etarget->set($fieldsource, encode('UTF-8', NFC(ireplace($last_fieldval, $m, $r)))); } else { # Now re-instate any unescaped $1 .. $9 to get round these being # dynamically scoped and being null when we get here from any # previous map_match # Be aware that imatch() uses m//g so @imatches can have multiple paren group # captures which might be useful $m =~ s/(?{map_final}) { if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Field '$fieldsource' does not match '$m' and step has 'final' set, skipping rest of map ..."); } next MAP; } else { # just ignore this step if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Field '$fieldsource' does not match '$m', skipping step ..."); } next; } } } } # Set to a different target if there is one if (my $target = maploopreplace($step->{map_field_target}, $maploop)) { $target = lc($target); # Can't remap entry key pseudo-field if ($fieldsource eq 'entrykey') { if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Field '$fieldsource' is 'entrykey'- cannot map this to a new field as you must have an entrykey, skipping ..."); } next; } if ($etarget->exists($target)) { if ($map->{map_overwrite} // $smap->{map_overwrite}) { if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Overwriting existing field '$target'"); } } else { if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Field '$fieldsource' is mapped to field '$target' but both are defined, skipping ..."); } next; } } $etarget->set($target, encode('UTF-8', NFC($entry->get($fieldsource)))); $etarget->delete($fieldsource); } } # field changes if (my $field = maploopreplace($step->{map_field_set}, $maploop)) { $field = lc($field); # Deal with special tokens if ($step->{map_null}) { if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Deleting field '$field'"); } $etarget->delete($field); } else { if ($etarget->exists($field)) { unless ($map->{map_overwrite} // $smap->{map_overwrite}) { if ($step->{map_final}) { # map_final is set, ignore and skip rest of step if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Field '$field' exists, overwrite is not set and step has 'final' set, skipping rest of map ..."); } next MAP; } else { # just ignore this step if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Field '$field' exists and overwrite is not set, skipping step ..."); } next; } } } # If append is set, keep the original value and append the new my $orig = $step->{map_append} ? $etarget->get($field) : ''; if ($step->{map_origentrytype}) { next unless $last_type; if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Setting field '$field' to '${orig}${last_type}'"); } $etarget->set($field, encode('UTF-8', NFC($orig . $last_type))); } elsif ($step->{map_origfieldval}) { next unless $last_fieldval; if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Setting field '$field' to '${orig}${last_fieldval}'"); } $etarget->set($field, encode('UTF-8', NFC($orig . $last_fieldval))); } elsif ($step->{map_origfield}) { next unless $last_field; if ($logger->is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Setting field '$field' to '${orig}${last_field}'"); } $etarget->set($field, encode('UTF-8', NFC($orig . $last_field))); } else { my $fv = maploopreplace($step->{map_field_value}, $maploop); # Now re-instate any unescaped $1 .. $9 to get round these being # dynamically scoped and being null when we get here from any # previous map_match $fv =~ s/(?is_debug()) { # performance tune $logger->debug("Source mapping (type=$level, key=$etargetkey): Setting field '$field' to '${orig}${fv}'"); } $etarget->set($field, encode('UTF-8', NFC($orig . $fv))); } } } } } } } _create_entry($key, $entry); # reinstate original entry before modifications so that further refsections # have a clean slate $entry = $saved_entry; # Need to also instantiate fields in any new entries created by map while (my ($k, $e) = each %newentries) { _create_entry($k, $e); } } return 1; } sub _create_entry { my ($k, $e) = @_; return unless $e; # newentry might be undef my $secnum = $Biber::MASTER->get_current_section; my $section = $Biber::MASTER->sections->get_section($secnum); my $ds = $section->get_keytods($k); my $bibentry = Biber::Entry->new(); $bibentry->set_field('citekey', $k); if ($logger->is_debug()) {# performance tune $logger->debug("Creating biber Entry object with key '$k'"); } # Save pre-mapping data. Might be useful somewhere $bibentry->set_field('rawdata', $e->print_s); my $entrytype = $e->type; # We put all the fields we find modulo field aliases into the object # validation happens later and is not datasource dependent foreach my $f ($e->fieldlist) { # We have to process local options as early as possible in order # to make them available for things that need them like parsename() if ($f eq 'options') { my $value = $e->get($f); my $Srx = Biber::Config->getoption('xsvsep'); my $S = qr/$Srx/; process_entry_options($k, [ split(/$S/, $value) ]); } # Now run any defined handler if ($dm->is_field($f)) { my $handler = _get_handler($f); my $v = $handler->($bibentry, $e, $f, $k); # Don't set datafields with empty contents like 'language = {}' if (defined($v) and $e->get($f) ne '') { $bibentry->set_datafield($f, $v); } } elsif (Biber::Config->getoption('validate_datamodel')) { biber_warn("Datamodel: Entry '$k' ($ds): Field '$f' invalid in data model - ignoring", $bibentry); } } $bibentry->set_field('entrytype', $entrytype); $bibentry->set_field('datatype', 'bibtex'); if ($logger->is_debug()) {# performance tune $logger->debug("Adding entry with key '$k' to entry list"); } $section->bibentries->add_entry($k, $bibentry); return; } # HANDLERS # ======== # Data annotation fields sub _annotation { my ($bibentry, $entry, $field, $key) = @_; my $value = $entry->get($field); my $ann = quotemeta(Biber::Config->getoption('annotation_marker')); $field =~ s/$ann$//; foreach my $a (split(/\s*;\s*/, $value)) { my ($count, $part, $annotations) = $a =~ /^\s*(\d+)?:?([^=]+)?=(.+)/; if ($part) { Biber::Annotation->set_annotation('part', $key, $field, $annotations, $count, $part); } elsif ($count) { Biber::Annotation->set_annotation('item', $key, $field, $annotations, $count); } else { Biber::Annotation->set_annotation('field', $key, $field, $annotations); } } return; } # Literal fields sub _literal { my ($bibentry, $entry, $field, $key) = @_; my $value = $entry->get($field); # If we have already split some date fields into literal fields # like date -> year/month/day, don't overwrite them with explicit # year/month if ($field eq 'year') { return if $bibentry->get_datafield('year'); if ($value and not looks_like_number($value)and not $entry->get('sortyear')) { biber_warn("year field '$value' in entry '$key' is not an integer - this will probably not sort properly."); } } if ($field eq 'month') { return if $bibentry->get_datafield('month'); if ($value and not looks_like_number($value)) { biber_warn("month field '$value' in entry '$key' is not an integer - this will probably not sort properly."); } } # Deal with ISBN options if ($field eq 'isbn') { require Business::ISBN; my ($vol, $dir, undef) = File::Spec->splitpath( $INC{"Business/ISBN.pm"} ); $dir =~ s/\/$//; # splitpath sometimes leaves a trailing '/' # Just in case it is already set. We also need to fake this in tests or it will # look for it in the blib dir unless (exists($ENV{ISBN_RANGE_MESSAGE})) { $ENV{ISBN_RANGE_MESSAGE} = File::Spec->catpath($vol, "$dir/ISBN/", 'RangeMessage.xml'); } my $isbn = Business::ISBN->new($value); # Ignore invalid ISBNs if (not $isbn or not $isbn->is_valid) { biber_warn("ISBN '$value' in entry '$key' is invalid - run biber with '--validate_datamodel' for details."); return $value; } # Force to a specified format if (Biber::Config->getoption('isbn13')) { $isbn = $isbn->as_isbn13; $value = $isbn->isbn; } elsif (Biber::Config->getoption('isbn10')) { $isbn = $isbn->as_isbn10; $value = $isbn->isbn; } # Normalise if requested if (Biber::Config->getoption('isbn_normalise')) { $value = $isbn->as_string; } } # Try to sanitise months to biblatex requirements if ($field eq 'month') { return _hack_month($value); } # Rationalise any bcp47 style langids into babel/polyglossia names # biblatex will convert these back again when loading .lbx files # We need this until babel/polyglossia support proper bcp47 language/locales elsif ($field eq 'langid' and my $map = $LOCALE_MAP_R{$value}) { return $map; } else { return $value; } } # URI fields sub _uri { my ($bibentry, $entry, $field) = @_; my $value = $entry->get($field); return $value; } # xSV field form sub _xsv { my $Srx = Biber::Config->getoption('xsvsep'); my $S = qr/$Srx/; my ($bibentry, $entry, $field) = @_; return [ split(/$S/, $entry->get($field)) ]; } # Verbatim fields sub _verbatim { my ($bibentry, $entry, $field) = @_; my $value = $entry->get($field); return $value; } # Range fields # m-n -> [m, n] # m -> [m, undef] # m- -> [m, ''] # -n -> ['', n] # - -> ['', undef] sub _range { my ($bibentry, $entry, $field, $key) = @_; my $values_ref; my $value = $entry->get($field); my @values = split(/\s*[;,]\s*/, $value); # If there is a range sep, then we set the end of the range even if it's null # If no range sep, then the end of the range is undef foreach my $value (@values) { my $ovalue = $value; $value =~ s/~/ /g; # Some normalisation for malformed fields $value =~ m/\A\s*(\P{Pd}+)\s*\z/xms ||# Simple value without range $value =~ m/\A\s*(\{[^\}]+\}|[^\p{Pd} ]+)\s*(\p{Pd}+)\s*(\{[^\}]+\}|\P{Pd}*)\s*\z/xms || $value =~ m/\A\s*(.+)(\p{Pd}{2,})(.+)\s*\z/xms;# M-1--M-4 my $start = $1; my $end; if ($2) { $end = $3; } else { $end = undef; } $start =~ s/\A\{([^\}]+)\}\z/$1/; $end =~ s/\A\{([^\}]+)\}\z/$1/; if ($start) { push $values_ref->@*, [$start || '', $end]; } else { biber_warn("Range field '$field' in entry '$key' is malformed, falling back to literal", $bibentry); push $values_ref->@*, [$ovalue, undef]; } } return $values_ref; } # Names sub _name { my ($bibentry, $entry, $field, $key) = @_; my $secnum = $Biber::MASTER->get_current_section; my $section = $Biber::MASTER->sections->get_section($secnum); my $value = $entry->get($field); my $xnamesep = Biber::Config->getoption('xnamesep'); my @tmp = Text::BibTeX::split_list(NFC($value),# Unicode NFC boundary Biber::Config->getoption('namesep'), undef, undef, undef, {binmode => 'utf-8', normalization => 'NFD'}); my $useprefix = Biber::Config->getblxoption('useprefix', $bibentry->get_field('entrytype'), $key); my $un = Biber::Config->getblxoption('uniquename', $bibentry->get_field('entrytype'), $key); my $names = Biber::Entry::Names->new(); foreach my $name (@tmp) { # per-namelist options if ($name =~ m/^(\S+)\s*$xnamesep\s*(\S+)?$/) { my $nlo = lc($1); my $nlov = $2 // 1; # bare options are just boolean numerals if ($CONFIG_SCOPEOPT_BIBLATEX{NAMELIST}->{$nlo}) { if ($CONFIG_OPTTYPE_BIBLATEX{$nlo} and $CONFIG_OPTTYPE_BIBLATEX{$nlo} eq 'boolean') { $nlov = map_boolean($nlov, 'tonum'); } my $oo = expand_option($nlo, $nlov, $CONFIG_BIBLATEX_NAMELIST_OPTIONS{$nlo}->{INPUT}); foreach my $o ($oo->@*) { my $method = 'set_' . $o->[0]; $names->$method($o->[1]); } next; } } # Consecutive "and" causes Text::BibTeX::Name to segfault unless ($name) { biber_warn("Name in key '$key' is empty (probably consecutive 'and'): skipping name", $bibentry); $section->del_citekey($key); next; } my $nps = join('|', $dm->get_constant_value('nameparts')); my $no; # extended name format my $xnamesep = Biber::Config->getoption('xnamesep'); if ($name =~ m/(?:$nps)\s*$xnamesep/ and not Biber::Config->getoption('noxname')) { # Skip names that don't parse for some reason # uniquename defaults to 0 just in case we are in tool mode otherwise there are spurious # uninitialised warnings next unless $no = parsename_x($name, $field, {useprefix => $useprefix, uniquename => ($un // 0)}, $key); } else { # Normal bibtex name format # Check for malformed names in names which aren't completely escaped # Too many commas unless ($name =~ m/\A\{\X+\}\z/xms) { # Ignore these tests for escaped names my @commas = $name =~ m/,/g; if ($#commas > 1) { biber_warn("Name \"$name\" has too many commas: skipping name", $bibentry); $section->del_citekey($key); next; } # Consecutive commas cause Text::BibTeX::Name to segfault if ($name =~ /,,/) { biber_warn("Name \"$name\" is malformed (consecutive commas): skipping name", $bibentry); $section->del_citekey($key); next; } } # Skip names that don't parse for some reason # unique name defaults to 0 just in case we are in tool mode otherwise there are spurious # uninitialised warnings next unless $no = parsename($name, $field); } # Deal with implied "et al" in data source if (lc($no->get_rawstring) eq Biber::Config->getoption('others_string')) { $names->set_morenames; } else { $names->add_name($no) if $no; } } # Don't set if there were no valid names due to special errors above return $names->count_names ? $names : undef; } # Dates sub _datetime { my ($bibentry, $entry, $field, $key) = @_; my $datetype = $field =~ s/date\z//xmsr; my $date = $entry->get($field); my $secnum = $Biber::MASTER->get_current_section; my $section = $Biber::MASTER->sections->get_section($secnum); my $ds = $section->get_keytods($key); my ($sdate, $edate, $sep, $unspec) = parse_date_range($bibentry, $datetype, $date); # Date had EDTF 5.2.2 unspecified format # This does not differ for *enddate components as these are split into ranges # from non-ranges only if ($unspec) { $bibentry->set_field($datetype . 'dateunspecified', $unspec); } if (defined($sdate)) { # Start date was successfully parsed if ($sdate) { # Start date is an object not "0" # Did this entry get its datepart fields from splitting an EDTF date field? $bibentry->set_field("${datetype}datesplit", 1); # Some warnings for overwriting YEAR and MONTH from DATE if ($sdate->year and ($datetype . 'year' eq 'year') and $entry->get('year') and $sdate->year != $entry->get('year')) { biber_warn("Overwriting field 'year' with year value from field 'date' for entry '$key'", $bibentry); } if (not $CONFIG_DATE_PARSERS{start}->missing('month') and ($datetype . 'month' eq 'month') and $entry->get('month') and $sdate->month != $entry->get('month')) { biber_warn("Overwriting field 'month' with month value from field 'date' for entry '$key'", $bibentry); } # Save julian $bibentry->set_field($datetype . 'datejulian', 1) if $CONFIG_DATE_PARSERS{start}->julian; $bibentry->set_field($datetype . 'enddatejulian', 1) if $CONFIG_DATE_PARSERS{end}->julian; # Save circa information $bibentry->set_field($datetype . 'datecirca', 1) if $CONFIG_DATE_PARSERS{start}->circa; $bibentry->set_field($datetype . 'enddatecirca', 1) if $CONFIG_DATE_PARSERS{end}->circa; # Save uncertain date information $bibentry->set_field($datetype . 'dateuncertain', 1) if $CONFIG_DATE_PARSERS{start}->uncertain; $bibentry->set_field($datetype . 'enddateuncertain', 1) if $CONFIG_DATE_PARSERS{end}->uncertain; # Save start season date information if (my $season = $CONFIG_DATE_PARSERS{start}->season) { $bibentry->set_field($datetype . 'season', $season); } unless ($CONFIG_DATE_PARSERS{start}->missing('year')) { $bibentry->set_datafield($datetype . 'year', $sdate->year); # Save era date information $bibentry->set_field($datetype . 'era', lc($sdate->secular_era)); } $bibentry->set_datafield($datetype . 'month', $sdate->month) unless $CONFIG_DATE_PARSERS{start}->missing('month'); $bibentry->set_datafield($datetype . 'day', $sdate->day) unless $CONFIG_DATE_PARSERS{start}->missing('day'); # time unless ($CONFIG_DATE_PARSERS{start}->missing('time')) { $bibentry->set_datafield($datetype . 'hour', $sdate->hour); $bibentry->set_datafield($datetype . 'minute', $sdate->minute); $bibentry->set_datafield($datetype . 'second', $sdate->second); unless ($sdate->time_zone->is_floating) { # ignore floating timezones $bibentry->set_datafield($datetype . 'timezone', tzformat($sdate->time_zone->name)); } } } else { # open ended range - startdate is defined but empty $bibentry->set_datafield($datetype . 'year', ''); } # End date can be missing if ($sep) { if (defined($edate)) { # End date was successfully parsed if ($edate) { # End date is an object not "0" # Did this entry get its datepart fields from splitting an EDTF date field? $bibentry->set_field("${datetype}datesplit", 1); unless ($CONFIG_DATE_PARSERS{end}->missing('year')) { $bibentry->set_datafield($datetype . 'endyear', $edate->year); # Save era date information $bibentry->set_field($datetype . 'endera', lc($edate->secular_era)); } $bibentry->set_datafield($datetype . 'endmonth', $edate->month) unless $CONFIG_DATE_PARSERS{end}->missing('month'); $bibentry->set_datafield($datetype . 'endday', $edate->day) unless $CONFIG_DATE_PARSERS{end}->missing('day'); # Save end season date information if (my $season = $CONFIG_DATE_PARSERS{end}->season) { $bibentry->set_field($datetype . 'endseason', $season); } # must be an hour if there is a time but could be 00 so use defined() unless ($CONFIG_DATE_PARSERS{end}->missing('time')) { $bibentry->set_datafield($datetype . 'endhour', $edate->hour); $bibentry->set_datafield($datetype . 'endminute', $edate->minute); $bibentry->set_datafield($datetype . 'endsecond', $edate->second); unless ($edate->time_zone->is_floating) { # ignore floating timezones $bibentry->set_datafield($datetype . 'endtimezone', tzformat($edate->time_zone->name)); } } } else { # open ended range - enddate is defined but empty $bibentry->set_datafield($datetype . 'endyear', ''); } } else { biber_warn("Entry '$key' ($ds): Invalid format '$date' of end date field '$field' - ignoring", $bibentry); } } } else { biber_warn("Entry '$key' ($ds): Invalid format '$date' of date field '$field' - ignoring", $bibentry); } return; } # Bibtex list fields with listsep separator sub _list { my ($bibentry, $entry, $field) = @_; my $value = $entry->get($field); my @tmp = Text::BibTeX::split_list(NFC($value),# Unicode NFC boundary Biber::Config->getoption('listsep'), undef, undef, undef, {binmode => 'utf-8', normalization => 'NFD'}); @tmp = map { (remove_outer($_))[1] } @tmp; return [ @tmp ]; } # Bibtex uri lists sub _urilist { my ($bibentry, $entry, $field) = @_; my $value = $entry->get($field); # Unicode NFC boundary (passing to external library) my @tmp = Text::BibTeX::split_list(NFC($value), Biber::Config->getoption('listsep'), undef, undef, undef, {binmode => 'utf-8', normalization => 'NFD'}); return [ @tmp ]; } =head2 cache_data Caches file data into T::B objects indexed by the original datasource key, decoded into UTF8 =cut sub cache_data { my $filename = shift; my $secnum = $Biber::MASTER->get_current_section; my $section = $Biber::MASTER->sections->get_section($secnum); # Initialise this $cache->{preamble}{$filename} = []; # Convert/decode file my $pfilename = preprocess_file($filename); my $bib = Text::BibTeX::File->new(); $bib->open($pfilename, {binmode => 'utf-8', normalization => 'NFD'}) or biber_error("Cannot create Text::BibTeX::File object from $pfilename: $!"); # Log that we found a data file $logger->info("Found BibTeX data source '$filename'"); while ( my $entry = Text::BibTeX::Entry->new($bib) ) { if ( $entry->metatype == BTE_PREAMBLE ) { push $cache->{preamble}{$filename}->@*, $entry->value; next; } # Save comments for output in tool mode unless comment stripping is requested if ( $entry->metatype == BTE_COMMENT ) { if (Biber::Config->getoption('tool') and not Biber::Config->getoption('strip_comments') ) { push $cache->{comments}{$filename}->@*, process_comment($entry->value); } next; } # Ignore misc BibTeX entry types we don't care about next if ( $entry->metatype == BTE_MACRODEF or $entry->metatype == BTE_UNKNOWN ); # If an entry has no key, ignore it and warn unless ($entry->key) { biber_warn("Invalid or undefined BibTeX entry key in file '$pfilename', skipping ..."); next; } # Text::BibTeX >= 0.46 passes through all citekey bits, thus allowing UTF-8 keys my $key = $entry->key; # Check if this key has already been registered as a citekey alias, if # so, the key takes priority and we delete the alias if (exists($cache->{data}{citekey_aliases}{$key})) { biber_warn("Citekey alias '$key' is also a real entry key, skipping ..."); delete($cache->{data}{citekey_aliases}{$key}); } # Any secondary keys? # We can't do this with a driver dispatch for the IDS field as this needs # an entry object creating first and the whole point of aliases is that # there is no entry object if (my $ids = $entry->get('ids')) { my $Srx = Biber::Config->getoption('xsvsep'); my $S = qr/$Srx/; foreach my $id (split(/$S/, $ids)) { # Skip aliases which are also real entry keys if ($section->has_everykey($id)) { biber_warn("Citekey alias '$id' is also a real entry key, skipping ..."); next; } # Warn on conflicting aliases if (exists($cache->{data}{citekey_aliases}{$id})) { my $otherid = $cache->{data}{citekey_aliases}{$id}; if ($otherid ne $key) { biber_warn("Citekey alias '$id' already has an alias '$otherid', skipping ..."); } } else { $cache->{data}{citekey_aliases}{$id} = $key; if ($logger->is_debug()) {# performance tune $logger->debug("Citekey '$id' is an alias for citekey '$key'"); } } } } # If we've already seen a case variant, warn # This is case mismatch test of datasource entries with other datasource entries if (my $okey = $section->has_badcasekey($key)) { biber_warn("Possible typo (case mismatch) between datasource keys: '$key' and '$okey' in file '$filename'"); } # If we've already seen this key in a datasource, ignore it and warn unless user wants # duplicates if ($section->has_everykey($key) and not Biber::Config->getoption('noskipduplicates')) { biber_warn("Duplicate entry key: '$key' in file '$filename', skipping ..."); next; } else { if ($section->has_everykey($key)) { biber_warn("Duplicate entry key: '$key' in file '$filename'"); } $section->add_everykey($key); } # Bad entry unless ($entry->parse_ok) { biber_warn("Entry $key does not parse correctly"); next; } # Cache the entry so we don't have to read the file again on next pass. # Two reasons - So we avoid T::B macro redef warnings and speed # Create a global "all datasources" cache too as this is useful in places $cache->{data}{GLOBALDS}{$key} = $cache->{data}{$filename}{$key} = $entry; # We do this as otherwise we have no way of determining the original .bib entry order # We need this in order to do sorting=none + allkeys because in this case, there is no # "citeorder" because nothing is explicitly cited and so "citeorder" means .bib order push $cache->{orig_key_order}{$filename}->@*, $key; if ($logger->is_debug()) {# performance tune $logger->debug("Cached Text::BibTeX entry for key '$key' from BibTeX file '$filename'"); } } $bib->close; # If we don't do this, we can't unlink the temp file on Windows return; } =head2 preprocess_file Convert file to UTF-8 and potentially decode LaTeX macros to UTF-8 =cut sub preprocess_file { my $filename = shift; # Put the utf8 encoded file into the global biber tempdir # We have to do this in case we can't write to the location of the # .bib file my $td = $Biber::MASTER->biber_tempdir; (undef, undef, my $fn) = File::Spec->splitpath($filename); my $ufilename = File::Spec->catfile($td->dirname, "${fn}_$$.utf8"); # We read the file in the bib encoding and then output to UTF-8, even if it was already UTF-8, # just in case there was a BOM so we can delete it as it makes T::B complain # Might fail due to encountering characters invalid in the encoding so trap and die gracefully my $benc = Biber::Config->getoption('input_encoding'); my $buf; unless (eval{$buf = NFD(File::Slurper::read_text($filename, $benc))}) {# Unicode NFD boundary biber_error("Data file '$filename' cannot be read in encoding '$benc': $@"); } # strip UTF-8 BOM if it exists - this just makes T::B complain about junk characters $buf =~ s/\A\x{feff}//; # A MAC (CR only) format file with a comment in the first line will confuse # Text::BibTeX as it will just see one comment line and find no entries # So, if we find an initial comment line with a carriage return at the end, remove it. $buf =~ s/\A\s*\%[^\r]+\r//ms; File::Slurper::write_text($ufilename, NFC($buf));# Unicode NFC boundary my $lbuf = parse_decode($ufilename); if ($logger->is_trace()) {# performance tune $logger->trace("Buffer after decoding -> '$lbuf'"); } File::Slurper::write_text($ufilename, NFC($lbuf));# Unicode NFC boundary return $ufilename; } =head2 parse_decode Partially parse the .bib datasource and latex_decode the data contents. We do this because latex_decoding the entire buffer is difficult since such decoding is regexp based and since braces are used to protect data in .bib files, it makes it hard to do some parsing. =cut sub parse_decode { my $ufilename = shift; my $dmh = Biber::Config->get_dm_helpers; my $lbuf; my $bib = Text::BibTeX::File->new(); $bib->open($ufilename, {binmode => 'utf-8', normalization => 'NFD'}) or biber_error("Cannot create Text::BibTeX::File object from $ufilename: $!"); $logger->info("LaTeX decoding ..."); while ( my $entry = Text::BibTeX::Entry->new($bib) ) { if ( $entry->metatype == BTE_REGULAR ) { $lbuf .= '@' . $entry->type . '{' . $entry->key . ',' . "\n"; foreach my $f ($entry->fieldlist) { my $fv = $entry->get($f); # Don't decode verbatim fields if (not first {fc($f) eq fc($_)} $dmh->{verbs}->@*) { $fv = Biber::LaTeX::Recode::latex_decode($fv); } $lbuf .= " $f = {$fv},\n"; } $lbuf .= "\n" . '}' . "\n\n"; } elsif ($entry->metatype == BTE_PREAMBLE) { $lbuf .= '@PREAMBLE{"' . Biber::LaTeX::Recode::latex_decode($entry->value) . '"}' . "\n"; } elsif ($entry->metatype == BTE_COMMENT) { $lbuf .= '@COMMENT{' . Biber::LaTeX::Recode::latex_decode($entry->value) . '}' . "\n"; } elsif ($entry->metatype == BTE_MACRODEF) { $lbuf .= '@STRING{'; foreach my $f ($entry->fieldlist) { $lbuf .= $f . ' = {' . Biber::LaTeX::Recode::latex_decode($entry->get($f)) . '}'; } $lbuf .= "}\n"; } else { $lbuf .= Biber::LaTeX::Recode::latex_decode($entry->print_s); } } # We will read in the same .bib again later to do the real parsing # and since macro defs are global, need to reset them to avoid redef warnings Text::BibTeX::delete_all_macros(); return $lbuf; } =head2 parsename Given a name string, this function returns a Biber::Entry::Name object with all parts of the name resolved according to the BibTeX conventions. parsename('John Doe', 'author', 'key') returns an object which internally looks a bit like this: { given => {string => 'John', initial => ['J']}, family => {string => 'Doe', initial => ['D']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}, id => 32RS0Wuj0P, strip => {'given' => 0, 'family' => 0, 'prefix' => 0, 'suffix' => 0} } =cut sub parsename { my ($namestr, $fieldname) = @_; # First sanitise the namestring due to Text::BibTeX::Name limitations on whitespace $namestr =~ s/\A\s*|\s*\z//xms; # leading and trailing whitespace # Collapse internal whitespace and escaped spaces like in "Christina A. L.\ Thiele" $namestr =~ s/\s+|\\\s/ /g; $namestr =~ s/\A\{\{+([^\{\}]+)\}+\}\z/{$1}/xms; # Allow only one enveloping set of braces # If requested, try to correct broken initials with no space between them. # This can slightly mess up some other names like {{U.K. Government}} etc. # btparse can't do this so we do it before name parsing $namestr =~ s/(\w)\.(\w)/$1. $2/g if Biber::Config->getoption('fixinits'); my %namec; my $name = Text::BibTeX::Name->new({binmode => 'utf-8', normalization => 'NFD'}, $namestr); # Formats so we can get BibTeX compatible nbsp inserted my $l_f = Text::BibTeX::NameFormat->new('l', 0); my $f_f = Text::BibTeX::NameFormat->new('f', 0); my $p_f = Text::BibTeX::NameFormat->new('v', 0); my $s_f = Text::BibTeX::NameFormat->new('j', 0); $l_f->set_options(BTN_LAST, 0, BTJ_MAYTIE, BTJ_NOTHING); $f_f->set_options(BTN_FIRST, 0, BTJ_MAYTIE, BTJ_NOTHING); $p_f->set_options(BTN_VON, 0, BTJ_MAYTIE, BTJ_NOTHING); $s_f->set_options(BTN_JR, 0, BTJ_MAYTIE, BTJ_NOTHING); # Generate name parts $namec{family} = $name->format($l_f); $namec{given} = $name->format($f_f); $namec{prefix} = $name->format($p_f); $namec{suffix} = $name->format($s_f); # Use a copy of $name so that when we generate the # initials, we do so without certain things. This is easier than trying # hack robust initials code into btparse ... my $nd_namestr = strip_noinit($namestr); # Make initials with ties in between work. btparse doesn't understand this so replace with # spaces - this is fine as we are just generating initials $nd_namestr =~ s/\.~\s*/. /g; my $nd_name = Text::BibTeX::Name->new({binmode => 'utf-8', normalization => 'NFD'}, $nd_namestr, $fieldname); # Initials formats my $li_f = Text::BibTeX::NameFormat->new('l', 1); my $fi_f = Text::BibTeX::NameFormat->new('f', 1); my $pi_f = Text::BibTeX::NameFormat->new('v', 1); my $si_f = Text::BibTeX::NameFormat->new('j', 1); # Initials generated with forced tie so we can make an array $li_f->set_text(BTN_LAST, undef, undef, undef, ''); $fi_f->set_text(BTN_FIRST, undef, undef, undef, ''); $pi_f->set_text(BTN_VON, undef, undef, undef, ''); $si_f->set_text(BTN_JR, undef, undef, undef, ''); $li_f->set_options(BTN_LAST, 1, BTJ_FORCETIE, BTJ_NOTHING); $fi_f->set_options(BTN_FIRST, 1, BTJ_FORCETIE, BTJ_NOTHING); $pi_f->set_options(BTN_VON, 1, BTJ_FORCETIE, BTJ_NOTHING); $si_f->set_options(BTN_JR, 1, BTJ_FORCETIE, BTJ_NOTHING); $namec{'family-i'} = inits($nd_name->format($li_f)); $namec{'given-i'} = inits($nd_name->format($fi_f)); $namec{'prefix-i'} = inits($nd_name->format($pi_f)); $namec{'suffix-i'} = inits($nd_name->format($si_f)); # basic bibtex names have a fixed data model foreach my $np ('prefix', 'family', 'given', 'suffix') { if ($namec{$np}) { ($namec{"${np}-strippedflag"}, $namec{"${np}-stripped"}) = remove_outer($namec{$np}); } } my %nameparts; my $strip; foreach my $np ('prefix', 'family', 'given', 'suffix') { $nameparts{$np} = {string => $namec{"${np}-stripped"} // undef, initial => $namec{$np} ? $namec{"${np}-i"} : undef}; $strip->{$np} = $namec{"${np}-strippedflag"}; } # The "strip" entry tells us which of the name parts had outer braces # stripped during processing so we can add them back when printing the # .bbl so as to maintain maximum BibTeX compatibility return Biber::Entry::Name->new( %nameparts, strip => $strip ); } =head2 parsename_x Given a name string in extended format, this function returns a Biber::Entry::Name object with all parts of the name resolved according to the BibTeX conventions. parsename_x('given=John, family=Doe') returns an object which internally looks a bit like this: { given => {string => 'John', initial => ['J']}, family => {string => 'Doe', initial => ['D']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}, id => 32RS0Wuj0P, sortingnamekeytemplatename => 'template name', } =cut sub parsename_x { my ($namestr, $fieldname, $opts, $key) = @_; my $xnamesep = Biber::Config->getoption('xnamesep'); my %nps = map {$_ => 1} $dm->get_constant_value('nameparts'); my %namec; my %pernameopts; foreach my $np (split_xsv($namestr)) {# Can have x inside records so use Text::CSV my ($npn, $npv) = $np =~ m/^(.+)\s*$xnamesep\s*(.+)$/x; $npn = lc($npn); # per-name options if ($CONFIG_SCOPEOPT_BIBLATEX{NAME}->{$npn}) { if ($CONFIG_OPTTYPE_BIBLATEX{$npn} and $CONFIG_OPTTYPE_BIBLATEX{$npn} eq 'boolean') { $npv = map_boolean($npv, 'tonum'); } my $oo = expand_option($npn, $npv, $CONFIG_BIBLATEX_NAME_OPTIONS{$npn}->{INPUT}); foreach my $o ($oo->@*) { $pernameopts{$o->[0]} = $o->[1]; } next; } unless ($nps{$npn =~ s/-i$//r}) { biber_warn("Invalid namepart '$npn' found in extended name format name '$fieldname' in entry '$key', ignoring"); next; } if ($npn =~ m/-i$/) { $namec{$npn} = _split_initials($npv); } else { # Don't tie according to bibtex rules if the namepart is protected with braces if (has_outer($npv)) { $namec{$npn} = $npv; } else { $namec{$npn} = join_name_parts([split(/\s+/,$npv)]); } } } foreach my $np (keys %nps) { if (exists($namec{$np})) { # Generate any stripped information (my $s, $namec{$np}) = remove_outer($namec{$np}); # Protect spaces inside {} when splitting to produce intials my $part = $namec{$np}; if ($s) { $part = $namec{$np} =~ s/\s+/_/gr; } # strip noinit $part = strip_noinit($part); # Generate any initials which are missing if (not exists($namec{"${np}-i"})) { $namec{"${np}-i"} = [gen_initials(split(/[\s~]+/, $part))]; } } } my %nameparts; foreach my $n (keys %nps) { $nameparts{$n} = {string => $namec{$n} // undef, initial => exists($namec{$n}) ? $namec{"${n}-i"} : undef}; } # The "strip" entry tells us which of the name parts had outer braces # stripped during processing so we can add them back when printing the # .bbl so as to maintain maximum BibTeX compatibility return Biber::Entry::Name->new( %nameparts, %pernameopts ); } # Routine to try to hack month into the right biblatex format # Especially since we support remote .bibs which we potentially have no control over my %months = ( 'jan' => '1', 'feb' => '2', 'mar' => '3', 'apr' => '4', 'may' => '5', 'jun' => '6', 'jul' => '7', 'aug' => '8', 'sep' => '9', 'oct' => '10', 'nov' => '11', 'dec' => '12' ); sub _hack_month { my $in_month = shift; if (my ($m) = $in_month =~ m/\A\s*((?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec).*)\s*\z/i) { return $months{lc(Unicode::GCString->new($m)->substr(0,3)->as_string)}; } else { return $in_month; } } sub _get_handler { my $field = shift; if ($field =~ m/$CONFIG_META_MARKERS{annotation}$/) { return $handlers->{custom}{annotation}; } else { return $handlers->{$dm->get_fieldtype($field)}{$dm->get_fieldformat($field) || 'default'}{$dm->get_datatype($field)}; } } # "ab{cd}e" -> [a,b,cd,e] sub _split_initials { my $npv = shift; my @npv; my $ci = 0; my $acc; foreach my $c (split(/\b{gcb}/, $npv)) { # entering compound initial if ($c eq '{') { $ci = 1; } # exiting compound initial, push accumulator and reset elsif ($c eq '}') { $ci = 0; push @npv, $acc; $acc = ''; } else { if ($ci) { $acc .= $c; } else { push @npv, $c; } } } return \@npv; } 1; __END__ =pod =encoding utf-8 =head1 NAME Biber::Input::file::bibtex - look in a BibTeX file for an entry and create it if found =head1 DESCRIPTION Provides the extract_entries() method to get entries from a BibTeX data source and instantiate Biber::Entry objects for what it finds =head1 AUTHOR François Charette, C<< >> Philip Kime C<< >> =head1 BUGS Please report any bugs or feature requests on our Github tracker at L. =head1 COPYRIGHT & LICENSE Copyright 2009-2017 François Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =cut biblatex-biber-2.9/t000755000153000001 013205066062 13744 5ustar00vboxother000000000000biblatex-biber-2.9/t/tool-bltxml.t000444000153000001 1715513205066062 16574 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use Test::More tests => 2; use Test::Differences; unified_diff; use Text::Diff::Config; $Text::Diff::Config::Output_Unicode = 1; use Encode; use Biber; use Biber::Utils; use Biber::Output::biblatexml; use Log::Log4perl; use Unicode::Normalize; chdir("t/tdata"); no warnings 'utf8'; use utf8; # Set up Biber object my $biber = Biber->new( configfile => 'tool-testsort.conf'); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); my $outvar; $biber->set_output_obj(Biber::Output::biblatexml->new()); # Get reference to output object my $out = $biber->get_output_obj; # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('tool', 1); Biber::Config->setoption('output_resolve_xdata', 1); Biber::Config->setoption('output_resolve_crossrefs', 1); Biber::Config->setoption('output_format', 'biblatexml'); Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); Biber::Config->setoption('dsn', 'tool.bib'); # Set the output target $out->set_output_target($out->set_output_target_file(\$outvar, 1)); # THERE IS A CONFIG FILE BEING READ! # Now generate the information $ARGV[0] = 'tool.bib'; # fake this as we are not running through top-level biber program $biber->tool_mode_setup; $biber->prepare_tool; $out->output; my $main = $biber->datalists->get_lists_by_attrs(section => 99999, name => 'tool/global//global/global', type => 'entry', sortingtemplatename => 'tool', sortingnamekeytemplatename => 'global', labelprefix => '', uniquenametemplatename => 'global', labelalphanametemplatename => 'global')->[0]; my $bltxml1 = q| useprefix=false AAA BBB CCC DDD EEE REPlaCEDte early list test late early one two Some abstract %50 of which is useless i3Š Š title test 2003 Ellington Edward Paul New York London Macmillan A Note 2001 macmillanalias New York London Macmillan A Note 2001 macmillan:pubALIAS Macmillan New York London A Note London Edinburgh Mainsubtitle Maintitle Maintitleaddon Booktitle 1999 mvalias Mainsubtitle Maintitle Maintitleaddon 2004-04-25T14:34:00 2004-04-05T14:37:06 2004-04-25T14:34:00+05:00 2004-04-05T15:34:00+05:00 2004-04-25T14:34:00Z 2004-04-05T14:34:05Z 2004-04-25T14:34:00 2004-04-05T15:00:00 2017 |; eq_or_diff($outvar, encode_utf8($bltxml1), 'bltxml tool mode - 1'); is_deeply($main->get_keys, ['b1', 'macmillan', 'dt1', 'm1', 'macmillan:pub', 'macmillan:loc', 'mv1', NFD('i3Š'), 'xd1'], 'tool mode sorting'); biblatex-biber-2.9/t/extratitle.t000444000153000001 527713205066062 16466 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 14; use Test::Differences; unified_diff; use Biber; use Biber::Utils; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('extratitle.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('maxcitenames', 1); Biber::Config->setblxoption('maxbibnames', 1); # Now generate the information $biber->prepare; my $section = $biber->sections->get_section(0); my $main = $biber->datalists->get_list('custom/global//global/global'); my $bibentries = $section->bibentries; # Don't forget that the extratitle data is inserted after sorting eq_or_diff($main->get_extratitledata_for_key('L1'), '1', 'Same name, same title - 1'); eq_or_diff($main->get_extratitledata_for_key('L2'), '2', 'Same name, same title - 2'); eq_or_diff($main->get_extratitledata_for_key('L3'), '1', 'No name, same title - 1'); eq_or_diff($main->get_extratitledata_for_key('L4'), '2', 'No name, same title - 2'); ok(is_undef($main->get_extratitledata_for_key('L5')), 'No name, same title as with name - 1'); eq_or_diff($main->get_extratitledata_for_key('L6'), '1', 'No name, same shorttitle/title - 1'); eq_or_diff($main->get_extratitledata_for_key('L7'), '2', 'No name, same shorttitle/title - 2'); ok(is_undef($main->get_entryfield('L8', 'singletitle')), 'Singletitle test - 1'); ok(is_undef($main->get_entryfield('L9', 'singletitle')), 'Singletitle test - 2'); eq_or_diff($main->get_entryfield('L10', 'singletitle'), '1', 'Singletitle test - 3'); ok(is_undef($main->get_entryfield('L11', 'singletitle')), 'Singletitle test - 4'); ok(is_undef($main->get_entryfield('L12', 'singletitle')), 'Singletitle test - 5'); ok(is_undef($main->get_entryfield('L1', 'singletitle')), 'Singletitle test - 6'); ok(is_undef($main->get_entryfield('L5', 'singletitle')), 'Singletitle test - 7'); biblatex-biber-2.9/t/names.t000444000153000001 12714013205066062 15436 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 74; use Test::Differences; unified_diff; use Biber; use Biber::Utils; use Biber::Output::bbl; use Log::Log4perl; use Unicode::Normalize; use Encode; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('names.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('namesep', 'und'); # Testing custom name splitting string Biber::Config->setoption('others_string', 'andere'); # Testing custom implied "et al" Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); Biber::Config->setblxoption('mincitenames', 3); # Now generate the information $biber->prepare; my $out = $biber->get_output_obj; my $section = $biber->sections->get_section(0); my $main = $biber->datalists->get_list('custom/global//global/global'); my $bibentries = $section->bibentries; my $name1 = { given => {string => 'John', initial => ['J']}, family => {string => 'Doe', initial => ['D']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name2 = { given => {string => 'John', initial => ['J']}, family => {string => 'Doe', initial => ['D']}, prefix => {string => undef, initial => undef}, suffix => {string => 'Jr', initial => ['J']}}; my $name3 = { given => {string => 'Johann~Gottfried', initial => ['J', 'G']}, family => {string => 'Berlichingen zu~Hornberg', initial => ['B', 'z', 'H']}, prefix => {string => 'von', initial => ['v']}, suffix => {string => undef, initial => undef}}; my $name4 = { given => {string => 'Johann~Gottfried', initial => ['J', 'G']}, family => {string => 'Berlichingen zu~Hornberg', initial => ['B', 'z', 'H']}, prefix => {string => 'von', initial => ['v']}, suffix => {string => undef, initial => undef}}; my $name5 = { given => {string => undef, initial => undef}, family => {string => 'Robert and Sons, Inc.', initial => ['R']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name6 = { given => {string => 'ʿAbdallāh', initial => ['A']}, family => {string => 'al-Ṣāliḥ', initial => ['Ṣ']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name7 = { given => {string => 'Jean Charles~Gabriel', initial => ['J', 'C', 'G']}, family => {string => 'Vallée~Poussin', initial => ['V', 'P']}, prefix => {string => 'de~la', initial => ['d', 'l']}, suffix => {string => undef, initial => undef}}; my $name8 = { given => {string => 'Jean Charles Gabriel', initial => ['J']}, family => {string => 'Vallée~Poussin', initial => ['V', 'P']}, prefix => {string => 'de~la', initial => ['d', 'l']}, suffix => {string => undef, initial => undef}}; my $name9 = { given => {string => 'Jean Charles Gabriel {de la}~Vallée', initial => ['J', 'C', 'G', 'd', 'V']}, family => {string => 'Poussin', initial => ['P']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name10 = { given => {string => 'Jean Charles~Gabriel', initial => ['J', 'C', 'G']}, family => {string => 'Vallée Poussin', initial => ['V']}, prefix => {string => 'de~la', initial => ['d', 'l']}, suffix => {string => undef, initial => undef}}; my $name11 = { given => {string => 'Jean Charles Gabriel', initial => ['J']}, family => {string => 'Vallée Poussin', initial => ['V']}, prefix => {string => 'de~la', initial => ['d', 'l']}, suffix => {string => undef, initial => undef}}; my $name12 = { given => {string => 'Jean Charles~Gabriel', initial => ['J', 'C', 'G']}, family => {string => 'Poussin', initial => ['P']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name13 = { given => {string => 'Jean~Charles', initial => ['J', 'C']}, family => {string => 'Poussin Lecoq', initial => ['P']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name14 = { given => {string => 'J.~C.~G.', initial => ['J', 'C', 'G']}, family => {string => 'Vallée~Poussin', initial => ['V', 'P']}, prefix => {string => 'de~la', initial => ['d', 'l']}, suffix => {string => undef, initial => undef}}; # Note that the family initials are wrong because the prefix "El-" was not stripped # This is because the default noinit regexp only strips lower-case prefices to protect # hyphenated names my $name15 = { given => {string => 'E.~S.', initial => ['E', 'S']}, family => {string => 'El-{M}allah', initial => ['E-M']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name16 = { given => {string => 'E.~S.', initial => ['E', 'S']}, family => {string => '{K}ent-{B}oswell', initial => ['K-B']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name17 = { given => {string => 'A.~N.', initial => ['A', 'N']}, family => {string => 'Other', initial => ['O']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name18 = { given => {string => undef, initial => undef}, family => {string => 'British National Corpus', initial => ['B']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name18strip = { given => undef, family => 1, prefix => undef, suffix => undef }; my $name19 = { given => {string => 'Luis', initial => ['L']}, family => {string => 'Vázques{ de }Parga', initial => ['V']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $namex1 = { given => {string => 'James', initial => ['J']}, family => {string => 'Smithers~Jones', initial => ['S','J']}, prefix => {string => 'van~der', initial => ['v','d']}, suffix => {string => undef, initial => undef}}; my $l1 = q| \entry{L1}{book}{} \name{author}{1}{}{% {{hash=72287a68c1714cb1b9f4ab9e03a88b96}{% family={Adler}, familyi={A\bibinitperiod}, given={Alfred}, giveni={A\bibinitperiod}}}% } \strng{namehash}{72287a68c1714cb1b9f4ab9e03a88b96} \strng{fullhash}{72287a68c1714cb1b9f4ab9e03a88b96} \strng{bibnamehash}{72287a68c1714cb1b9f4ab9e03a88b96} \strng{authorbibnamehash}{72287a68c1714cb1b9f4ab9e03a88b96} \strng{authornamehash}{72287a68c1714cb1b9f4ab9e03a88b96} \strng{authorfullhash}{72287a68c1714cb1b9f4ab9e03a88b96} \field{sortinit}{A} \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b} \field{labelnamesource}{author} \endentry |; my $l2 = q| \entry{L2}{book}{} \name{author}{1}{}{% {{hash=1c867a2b5ceb243bab70afb18702dc04}{% family={Bull}, familyi={B\bibinitperiod}, given={Bertie\bibnamedelima B.}, giveni={B\bibinitperiod\bibinitdelim B\bibinitperiod}}}% } \strng{namehash}{1c867a2b5ceb243bab70afb18702dc04} \strng{fullhash}{1c867a2b5ceb243bab70afb18702dc04} \strng{bibnamehash}{1c867a2b5ceb243bab70afb18702dc04} \strng{authorbibnamehash}{1c867a2b5ceb243bab70afb18702dc04} \strng{authornamehash}{1c867a2b5ceb243bab70afb18702dc04} \strng{authorfullhash}{1c867a2b5ceb243bab70afb18702dc04} \field{sortinit}{B} \field{sortinithash}{276475738cc058478c1677046f857703} \field{labelnamesource}{author} \endentry |; my $l3 = q| \entry{L3}{book}{} \name{author}{1}{}{% {{hash=cecd18116c43ee86e5a136b6e0362948}{% family={Crop}, familyi={C\bibinitperiod}, given={C.\bibnamedelimi Z.}, giveni={C\bibinitperiod\bibinitdelim Z\bibinitperiod}}}% } \strng{namehash}{cecd18116c43ee86e5a136b6e0362948} \strng{fullhash}{cecd18116c43ee86e5a136b6e0362948} \strng{bibnamehash}{cecd18116c43ee86e5a136b6e0362948} \strng{authorbibnamehash}{cecd18116c43ee86e5a136b6e0362948} \strng{authornamehash}{cecd18116c43ee86e5a136b6e0362948} \strng{authorfullhash}{cecd18116c43ee86e5a136b6e0362948} \field{sortinit}{C} \field{sortinithash}{963e9d84a3da2344e8833203de5aed05} \field{labelnamesource}{author} \endentry |; my $l4 = q| \entry{L4}{book}{} \name{author}{1}{}{% {{hash=675883f3aca7c6069c0b154d47af4c86}{% family={Decket}, familyi={D\bibinitperiod}, given={Derek\bibnamedelima D}, giveni={D\bibinitperiod\bibinitdelim D\bibinitperiod}}}% } \strng{namehash}{675883f3aca7c6069c0b154d47af4c86} \strng{fullhash}{675883f3aca7c6069c0b154d47af4c86} \strng{bibnamehash}{675883f3aca7c6069c0b154d47af4c86} \strng{authorbibnamehash}{675883f3aca7c6069c0b154d47af4c86} \strng{authornamehash}{675883f3aca7c6069c0b154d47af4c86} \strng{authorfullhash}{675883f3aca7c6069c0b154d47af4c86} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{labelnamesource}{author} \endentry |; my $l5 = q| \entry{L5}{book}{} \name{author}{1}{}{% {{hash=c6b9d281cc1ff3f35570f76f463d4244}{% family={Eel}, familyi={E\\bibinitperiod}, given={Egbert}, giveni={E\\bibinitperiod}, prefix={von}, prefixi={v\\bibinitperiod}}}% } \strng{namehash}{c6b9d281cc1ff3f35570f76f463d4244} \strng{fullhash}{c6b9d281cc1ff3f35570f76f463d4244} \strng{bibnamehash}{c6b9d281cc1ff3f35570f76f463d4244} \strng{authorbibnamehash}{c6b9d281cc1ff3f35570f76f463d4244} \strng{authornamehash}{c6b9d281cc1ff3f35570f76f463d4244} \strng{authorfullhash}{c6b9d281cc1ff3f35570f76f463d4244} \field{sortinit}{v} \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b} \field{labelnamesource}{author} \endentry |; my $l6 = q| \entry{L6}{book}{} \name{author}{1}{}{% {{hash=dd96e3fc645eb4685988366f233403df}{% family={Frome}, familyi={F\\bibinitperiod}, given={Francis}, giveni={F\\bibinitperiod}, prefix={van\\bibnamedelimb der\\bibnamedelima valt}, prefixi={v\\bibinitperiod\\bibinitdelim d\\bibinitperiod\\bibinitdelim v\\bibinitperiod}}}% } \strng{namehash}{dd96e3fc645eb4685988366f233403df} \strng{fullhash}{dd96e3fc645eb4685988366f233403df} \strng{bibnamehash}{dd96e3fc645eb4685988366f233403df} \strng{authorbibnamehash}{dd96e3fc645eb4685988366f233403df} \strng{authornamehash}{dd96e3fc645eb4685988366f233403df} \strng{authorfullhash}{dd96e3fc645eb4685988366f233403df} \field{sortinit}{v} \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b} \field{labelnamesource}{author} \endentry |; my $l7 = q| \entry{L7}{book}{} \name{author}{1}{}{% {{hash=1e802cc32f10930a9567712b8febdf19}{% family={Gloom}, familyi={G\\bibinitperiod}, given={Gregory\\bibnamedelima R.}, giveni={G\\bibinitperiod\\bibinitdelim R\\bibinitperiod}, prefix={van}, prefixi={v\\bibinitperiod}}}% } \strng{namehash}{1e802cc32f10930a9567712b8febdf19} \strng{fullhash}{1e802cc32f10930a9567712b8febdf19} \strng{bibnamehash}{1e802cc32f10930a9567712b8febdf19} \strng{authorbibnamehash}{1e802cc32f10930a9567712b8febdf19} \strng{authornamehash}{1e802cc32f10930a9567712b8febdf19} \strng{authorfullhash}{1e802cc32f10930a9567712b8febdf19} \field{sortinit}{v} \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b} \field{labelnamesource}{author} \endentry |; my $l8 = q| \entry{L8}{book}{} \name{author}{1}{}{% {{hash=076a9b62b331eb2cdfba234d9ad7bca9}{% family={Henkel}, familyi={H\\bibinitperiod}, given={Henry\\bibnamedelima F.}, giveni={H\\bibinitperiod\\bibinitdelim F\\bibinitperiod}, prefix={van}, prefixi={v\\bibinitperiod}}}% } \strng{namehash}{076a9b62b331eb2cdfba234d9ad7bca9} \strng{fullhash}{076a9b62b331eb2cdfba234d9ad7bca9} \strng{bibnamehash}{076a9b62b331eb2cdfba234d9ad7bca9} \strng{authorbibnamehash}{076a9b62b331eb2cdfba234d9ad7bca9} \strng{authornamehash}{076a9b62b331eb2cdfba234d9ad7bca9} \strng{authorfullhash}{076a9b62b331eb2cdfba234d9ad7bca9} \field{sortinit}{v} \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b} \field{labelnamesource}{author} \endentry |; my $l9 = q| \entry{L9}{book}{} \name{author}{1}{}{% {{hash=1734924c4c55de5bb18d020c34a5249e}{% family={{Iliad Ipswich}}, familyi={I\bibinitperiod}, given={Ian}, giveni={I\bibinitperiod}}}% } \strng{namehash}{1734924c4c55de5bb18d020c34a5249e} \strng{fullhash}{1734924c4c55de5bb18d020c34a5249e} \strng{bibnamehash}{1734924c4c55de5bb18d020c34a5249e} \strng{authorbibnamehash}{1734924c4c55de5bb18d020c34a5249e} \strng{authornamehash}{1734924c4c55de5bb18d020c34a5249e} \strng{authorfullhash}{1734924c4c55de5bb18d020c34a5249e} \field{sortinit}{I} \field{sortinithash}{320bc8fe8101b9376f9f21cd507de0e8} \field{labelnamesource}{author} \endentry |; my $l10 = q| \entry{L10}{book}{} \name{author}{1}{}{% {{hash=37b4325752e394ddfb2fc810f6c88e27}{% family={Jolly}, familyi={J\\bibinitperiod}, given={James}, giveni={J\\bibinitperiod}, suffix={III}, suffixi={I\\bibinitperiod}}}% } \strng{namehash}{37b4325752e394ddfb2fc810f6c88e27} \strng{fullhash}{37b4325752e394ddfb2fc810f6c88e27} \strng{bibnamehash}{37b4325752e394ddfb2fc810f6c88e27} \strng{authorbibnamehash}{37b4325752e394ddfb2fc810f6c88e27} \strng{authornamehash}{37b4325752e394ddfb2fc810f6c88e27} \strng{authorfullhash}{37b4325752e394ddfb2fc810f6c88e27} \field{sortinit}{J} \field{sortinithash}{fce5f8d0bd05e8d93f3dbe21c78897ca} \field{labelnamesource}{author} \endentry |; my $l10a = q| \entry{L10a}{book}{} \name{author}{1}{}{% {{hash=264cb53d2295644c1c99523e254d9b0e}{% family={Pimentel}, familyi={P\\bibinitperiod}, given={Joseph\\bibnamedelima J.}, giveni={J\\bibinitperiod\\bibinitdelim J\\bibinitperiod}, suffix={Jr.}, suffixi={J\\bibinitperiod}}}% } \strng{namehash}{264cb53d2295644c1c99523e254d9b0e} \strng{fullhash}{264cb53d2295644c1c99523e254d9b0e} \strng{bibnamehash}{264cb53d2295644c1c99523e254d9b0e} \strng{authorbibnamehash}{264cb53d2295644c1c99523e254d9b0e} \strng{authornamehash}{264cb53d2295644c1c99523e254d9b0e} \strng{authorfullhash}{264cb53d2295644c1c99523e254d9b0e} \field{sortinit}{P} \field{sortinithash}{8d51b3d5b78d75b54308d706b9bbe285} \field{labelnamesource}{author} \endentry |; my $l11 = q| \entry{L11}{book}{} \name{author}{1}{}{% {{hash=c536dd808dc9193fda59ba1ff2afb38f}{% family={Kluster}, familyi={K\\bibinitperiod}, given={Kevin}, giveni={K\\bibinitperiod}, prefix={van}, prefixi={v\\bibinitperiod}, suffix={Jr.}, suffixi={J\\bibinitperiod}}}% } \strng{namehash}{c536dd808dc9193fda59ba1ff2afb38f} \strng{fullhash}{c536dd808dc9193fda59ba1ff2afb38f} \strng{bibnamehash}{c536dd808dc9193fda59ba1ff2afb38f} \strng{authorbibnamehash}{c536dd808dc9193fda59ba1ff2afb38f} \strng{authornamehash}{c536dd808dc9193fda59ba1ff2afb38f} \strng{authorfullhash}{c536dd808dc9193fda59ba1ff2afb38f} \field{sortinit}{v} \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b} \field{labelnamesource}{author} \endentry |; my $l12 = q| \entry{L12}{book}{} \name{author}{1}{}{% {{hash=6c883a8c1975ffff06f875bf366b3e47}{% family={Vall{é}e\\bibnamedelima Poussin}, familyi={V\\bibinitperiod\\bibinitdelim P\\bibinitperiod}, given={Charles\\bibnamedelimb Louis\\bibnamedelimb Xavier\\bibnamedelima Joseph}, giveni={C\\bibinitperiod\\bibinitdelim L\\bibinitperiod\\bibinitdelim X\\bibinitperiod\\bibinitdelim J\\bibinitperiod}, prefix={de\\bibnamedelima la}, prefixi={d\\bibinitperiod\\bibinitdelim l\\bibinitperiod}}}% } \strng{namehash}{6c883a8c1975ffff06f875bf366b3e47} \strng{fullhash}{6c883a8c1975ffff06f875bf366b3e47} \strng{bibnamehash}{6c883a8c1975ffff06f875bf366b3e47} \strng{authorbibnamehash}{6c883a8c1975ffff06f875bf366b3e47} \strng{authornamehash}{6c883a8c1975ffff06f875bf366b3e47} \strng{authorfullhash}{6c883a8c1975ffff06f875bf366b3e47} \field{sortinit}{d} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \true{uniqueprimaryauthor} \field{labelnamesource}{author} \endentry |; my $l13 = q| \entry{L13}{book}{} \name{author}{1}{}{% {{hash=5e79da6869afaf0d38e01285b494d555}{% family={Van\bibnamedelimb de\bibnamedelima Graaff}, familyi={V\bibinitperiod\bibinitdelim d\bibinitperiod\bibinitdelim G\bibinitperiod}, given={R.\bibnamedelimi J.}, giveni={R\bibinitperiod\bibinitdelim J\bibinitperiod}}}% } \strng{namehash}{5e79da6869afaf0d38e01285b494d555} \strng{fullhash}{5e79da6869afaf0d38e01285b494d555} \strng{bibnamehash}{5e79da6869afaf0d38e01285b494d555} \strng{authorbibnamehash}{5e79da6869afaf0d38e01285b494d555} \strng{authornamehash}{5e79da6869afaf0d38e01285b494d555} \strng{authorfullhash}{5e79da6869afaf0d38e01285b494d555} \field{sortinit}{V} \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b} \field{labelnamesource}{author} \endentry |; my $l14 = q| \entry{L14}{book}{} \name{author}{1}{}{% {{hash=2319907d9a5d5dd46da77879bdb7e609}{% family={St\bibnamedelima John-Mollusc}, familyi={S\bibinitperiod\bibinitdelim J\bibinithyphendelim M\bibinitperiod}, given={Oliver}, giveni={O\bibinitperiod}}}% } \strng{namehash}{2319907d9a5d5dd46da77879bdb7e609} \strng{fullhash}{2319907d9a5d5dd46da77879bdb7e609} \strng{bibnamehash}{2319907d9a5d5dd46da77879bdb7e609} \strng{authorbibnamehash}{2319907d9a5d5dd46da77879bdb7e609} \strng{authornamehash}{2319907d9a5d5dd46da77879bdb7e609} \strng{authorfullhash}{2319907d9a5d5dd46da77879bdb7e609} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{labelnamesource}{author} \endentry |; my $l15 = q| \entry{L15}{book}{} \name{author}{1}{}{% {{hash=b30b0fc69681fd11ad5d75a880124091}{% family={Gompel}, familyi={G\\bibinitperiod}, given={Roger\\bibnamedelima P.{\\,}G.}, giveni={R\\bibinitperiod\\bibinitdelim P\\bibinitperiod}, prefix={van}, prefixi={v\\bibinitperiod}}}% } \strng{namehash}{b30b0fc69681fd11ad5d75a880124091} \strng{fullhash}{b30b0fc69681fd11ad5d75a880124091} \strng{bibnamehash}{b30b0fc69681fd11ad5d75a880124091} \strng{authorbibnamehash}{b30b0fc69681fd11ad5d75a880124091} \strng{authornamehash}{b30b0fc69681fd11ad5d75a880124091} \strng{authorfullhash}{b30b0fc69681fd11ad5d75a880124091} \field{sortinit}{v} \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b} \field{labelnamesource}{author} \endentry |; my $l16 = q| \entry{L16}{book}{} \name{author}{1}{}{% {{hash=2b17c50dc666b9cc73d132da9ef08c7b}{% family={Gompel}, familyi={G\\bibinitperiod}, given={Roger\\bibnamedelima {P.\\,G.}}, giveni={R\\bibinitperiod\\bibinitdelim P\\bibinitperiod}, prefix={van}, prefixi={v\\bibinitperiod}}}% } \strng{namehash}{2b17c50dc666b9cc73d132da9ef08c7b} \strng{fullhash}{2b17c50dc666b9cc73d132da9ef08c7b} \strng{bibnamehash}{2b17c50dc666b9cc73d132da9ef08c7b} \strng{authorbibnamehash}{2b17c50dc666b9cc73d132da9ef08c7b} \strng{authornamehash}{2b17c50dc666b9cc73d132da9ef08c7b} \strng{authorfullhash}{2b17c50dc666b9cc73d132da9ef08c7b} \field{sortinit}{v} \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b} \field{labelnamesource}{author} \endentry |; my $l17 = q| \entry{L17}{book}{} \name{author}{1}{}{% {{hash=766d5329cf995fcc7c1cef19de2a2ae8}{% family={Lovecraft}, familyi={L\bibinitperiod}, given={Bill\bibnamedelima H.{\,}P.}, giveni={B\bibinitperiod\bibinitdelim H\bibinitperiod}}}% } \strng{namehash}{766d5329cf995fcc7c1cef19de2a2ae8} \strng{fullhash}{766d5329cf995fcc7c1cef19de2a2ae8} \strng{bibnamehash}{766d5329cf995fcc7c1cef19de2a2ae8} \strng{authorbibnamehash}{766d5329cf995fcc7c1cef19de2a2ae8} \strng{authornamehash}{766d5329cf995fcc7c1cef19de2a2ae8} \strng{authorfullhash}{766d5329cf995fcc7c1cef19de2a2ae8} \field{sortinit}{L} \field{sortinithash}{2c7981aaabc885868aba60f0c09ee20f} \field{labelnamesource}{author} \endentry |; my $l18 = q| \entry{L18}{book}{} \name{author}{1}{}{% {{hash=58620d2c7d6839bac23306c732c563fb}{% family={Lovecraft}, familyi={L\bibinitperiod}, given={Bill\bibnamedelima {H.\,P.}}, giveni={B\bibinitperiod\bibinitdelim H\bibinitperiod}}}% } \strng{namehash}{58620d2c7d6839bac23306c732c563fb} \strng{fullhash}{58620d2c7d6839bac23306c732c563fb} \strng{bibnamehash}{58620d2c7d6839bac23306c732c563fb} \strng{authorbibnamehash}{58620d2c7d6839bac23306c732c563fb} \strng{authornamehash}{58620d2c7d6839bac23306c732c563fb} \strng{authorfullhash}{58620d2c7d6839bac23306c732c563fb} \field{sortinit}{L} \field{sortinithash}{2c7981aaabc885868aba60f0c09ee20f} \field{labelnamesource}{author} \endentry |; my $l19 = q| \entry{L19}{book}{} \name{author}{1}{}{% {{hash=83caa52f21f97e572dd3267bdf62978a}{% family={Mustermann}, familyi={M\bibinitperiod}, given={Klaus-Peter}, giveni={K\bibinithyphendelim P\bibinitperiod}}}% } \strng{namehash}{83caa52f21f97e572dd3267bdf62978a} \strng{fullhash}{83caa52f21f97e572dd3267bdf62978a} \strng{bibnamehash}{83caa52f21f97e572dd3267bdf62978a} \strng{authorbibnamehash}{83caa52f21f97e572dd3267bdf62978a} \strng{authornamehash}{83caa52f21f97e572dd3267bdf62978a} \strng{authorfullhash}{83caa52f21f97e572dd3267bdf62978a} \field{sortinit}{M} \field{sortinithash}{cfd219b90152c06204fab207bc6c7cab} \field{labelnamesource}{author} \endentry |; my $l19a = q| \entry{L19a}{book}{} \name{author}{1}{}{% {{hash=0963f6904ccfeaac2770c5882a587001}{% family={Lam}, familyi={L\bibinitperiod}, given={Ho-Pun}, giveni={H\bibinithyphendelim P\bibinitperiod}}}% } \strng{namehash}{0963f6904ccfeaac2770c5882a587001} \strng{fullhash}{0963f6904ccfeaac2770c5882a587001} \strng{bibnamehash}{0963f6904ccfeaac2770c5882a587001} \strng{authorbibnamehash}{0963f6904ccfeaac2770c5882a587001} \strng{authornamehash}{0963f6904ccfeaac2770c5882a587001} \strng{authorfullhash}{0963f6904ccfeaac2770c5882a587001} \field{sortinit}{L} \field{sortinithash}{2c7981aaabc885868aba60f0c09ee20f} \field{labelnamesource}{author} \endentry |; my $l20 = q| \entry{L20}{book}{} \name{author}{1}{}{% {{hash=fdaa0936724be89ef8bd16cf02e08c74}{% family={Ford}, familyi={F\bibinitperiod}, given={{John Henry}}, giveni={J\bibinitperiod}}}% } \strng{namehash}{fdaa0936724be89ef8bd16cf02e08c74} \strng{fullhash}{fdaa0936724be89ef8bd16cf02e08c74} \strng{bibnamehash}{fdaa0936724be89ef8bd16cf02e08c74} \strng{authorbibnamehash}{fdaa0936724be89ef8bd16cf02e08c74} \strng{authornamehash}{fdaa0936724be89ef8bd16cf02e08c74} \strng{authorfullhash}{fdaa0936724be89ef8bd16cf02e08c74} \field{sortinit}{F} \field{sortinithash}{669c706c6f1fbf3b5a83d26f1d9e9e72} \field{labelnamesource}{author} \endentry |; my $l21 = q| \entry{L21}{book}{} \name{author}{1}{}{% {{hash=b3df6330af0651b93bce079a36dea339}{% family={Smith}, familyi={S\bibinitperiod}, given={{\v{S}}omeone}, giveni={\v{S}\bibinitperiod}}}% } \strng{namehash}{b3df6330af0651b93bce079a36dea339} \strng{fullhash}{b3df6330af0651b93bce079a36dea339} \strng{bibnamehash}{b3df6330af0651b93bce079a36dea339} \strng{authorbibnamehash}{b3df6330af0651b93bce079a36dea339} \strng{authornamehash}{b3df6330af0651b93bce079a36dea339} \strng{authorfullhash}{b3df6330af0651b93bce079a36dea339} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{labelnamesource}{author} \endentry |; my $l22u = q| \entry{L22}{book}{} \name{author}{1}{}{% {{hash=2273e0084ca97649d7edced9ce8d0ea3}{% family={{Š}mith}, familyi={Š\bibinitperiod}, given={Someone}, giveni={S\bibinitperiod}}}% } \strng{namehash}{2273e0084ca97649d7edced9ce8d0ea3} \strng{fullhash}{2273e0084ca97649d7edced9ce8d0ea3} \strng{bibnamehash}{2273e0084ca97649d7edced9ce8d0ea3} \strng{authorbibnamehash}{2273e0084ca97649d7edced9ce8d0ea3} \strng{authornamehash}{2273e0084ca97649d7edced9ce8d0ea3} \strng{authorfullhash}{2273e0084ca97649d7edced9ce8d0ea3} \field{sortinit}{Š} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{labelnamesource}{author} \endentry |; my $l22 = q| \entry{L22}{book}{} \name{author}{1}{}{% {{hash=2273e0084ca97649d7edced9ce8d0ea3}{% family={{\v{S}}mith}, familyi={\v{S}\bibinitperiod}, given={Someone}, giveni={S\bibinitperiod}}}% } \strng{namehash}{2273e0084ca97649d7edced9ce8d0ea3} \strng{fullhash}{2273e0084ca97649d7edced9ce8d0ea3} \strng{bibnamehash}{2273e0084ca97649d7edced9ce8d0ea3} \strng{authorbibnamehash}{2273e0084ca97649d7edced9ce8d0ea3} \strng{authornamehash}{2273e0084ca97649d7edced9ce8d0ea3} \strng{authorfullhash}{2273e0084ca97649d7edced9ce8d0ea3} \field{sortinit}{\v{S}} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \true{uniqueprimaryauthor} \field{labelnamesource}{author} \endentry |; my $l23 = q| \entry{L23}{book}{} \name{author}{1}{}{% {{hash=4389a3c0dc7da74487b50808ba9436ad}{% family={Smith}, familyi={S\bibinitperiod}, given={Šomeone}, giveni={Š\bibinitperiod}}}% } \strng{namehash}{4389a3c0dc7da74487b50808ba9436ad} \strng{fullhash}{4389a3c0dc7da74487b50808ba9436ad} \strng{bibnamehash}{4389a3c0dc7da74487b50808ba9436ad} \strng{authorbibnamehash}{4389a3c0dc7da74487b50808ba9436ad} \strng{authornamehash}{4389a3c0dc7da74487b50808ba9436ad} \strng{authorfullhash}{4389a3c0dc7da74487b50808ba9436ad} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{labelnamesource}{author} \endentry |; my $l24 = q| \entry{L24}{book}{} \name{author}{1}{}{% {{hash=e58b861545799d0eaf883402a882126e}{% family={Šmith}, familyi={Š\bibinitperiod}, given={Someone}, giveni={S\bibinitperiod}}}% } \strng{namehash}{e58b861545799d0eaf883402a882126e} \strng{fullhash}{e58b861545799d0eaf883402a882126e} \strng{bibnamehash}{e58b861545799d0eaf883402a882126e} \strng{authorbibnamehash}{e58b861545799d0eaf883402a882126e} \strng{authornamehash}{e58b861545799d0eaf883402a882126e} \strng{authorfullhash}{e58b861545799d0eaf883402a882126e} \field{sortinit}{Š} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{labelnamesource}{author} \endentry |; my $l25 = q| \entry{L25}{book}{} \name{author}{1}{}{% {{hash=7069367d4a4f37ffb0377e3830e98ed0}{% family={{American Psychological Association, Task Force on the Sexualization of Girls}}, familyi={A\bibinitperiod}}}% } \strng{namehash}{7069367d4a4f37ffb0377e3830e98ed0} \strng{fullhash}{7069367d4a4f37ffb0377e3830e98ed0} \strng{bibnamehash}{7069367d4a4f37ffb0377e3830e98ed0} \strng{authorbibnamehash}{7069367d4a4f37ffb0377e3830e98ed0} \strng{authornamehash}{7069367d4a4f37ffb0377e3830e98ed0} \strng{authorfullhash}{7069367d4a4f37ffb0377e3830e98ed0} \field{sortinit}{A} \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b} \field{labelnamesource}{author} \endentry |; my $l26 = q| \entry{L26}{book}{} \name{author}{1}{}{% {{hash=d176a8af5ce1c45cb06875c4433f2fe2}{% family={{Sci-Art Publishers}}, familyi={S\bibinitperiod}}}% } \strng{namehash}{d176a8af5ce1c45cb06875c4433f2fe2} \strng{fullhash}{d176a8af5ce1c45cb06875c4433f2fe2} \strng{bibnamehash}{d176a8af5ce1c45cb06875c4433f2fe2} \strng{authorbibnamehash}{d176a8af5ce1c45cb06875c4433f2fe2} \strng{authornamehash}{d176a8af5ce1c45cb06875c4433f2fe2} \strng{authorfullhash}{d176a8af5ce1c45cb06875c4433f2fe2} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{labelnamesource}{author} \endentry |; # Malformed anyway but a decent test my $l28 = q| \entry{L28}{book}{} \field{sortinit}{0} \field{sortinithash}{168ad0c7c5ed09f1d28c6675717b5b03} \warn{\item Name "Deux et al.,, O." is malformed (consecutive commas): skipping name} \endentry |; my $l29 = q| \entry{L29}{book}{} \name{author}{1}{}{% {{hash=59a5e43a502767d00e589eb29f863728}{% family={{U.S. Department of Health and Human Services, National Institute of Mental Health, National Heart, Lung and Blood Institute}}, familyi={U\bibinitperiod}}}% } \strng{namehash}{59a5e43a502767d00e589eb29f863728} \strng{fullhash}{59a5e43a502767d00e589eb29f863728} \strng{bibnamehash}{59a5e43a502767d00e589eb29f863728} \strng{authorbibnamehash}{59a5e43a502767d00e589eb29f863728} \strng{authornamehash}{59a5e43a502767d00e589eb29f863728} \strng{authorfullhash}{59a5e43a502767d00e589eb29f863728} \field{sortinit}{U} \field{sortinithash}{36a2444f5238e0dcf4bb59704df6624d} \field{labelnamesource}{author} \endentry |; my $l31 = q| \entry{L31}{book}{} \name{author}{1}{}{% {{hash=b43419361d83c9ab010e98aed1a83e35}{% family={{\~{Z}}elly}, familyi={\~{Z}\\bibinitperiod}, given={Arthur}, giveni={A\bibinitperiod}}}% } \name{editor}{1}{}{% {{hash=b43419361d83c9ab010e98aed1a83e35}{% family={{\~{Z}}elly}, familyi={\~{Z}\\bibinitperiod}, given={Arthur}, giveni={A\bibinitperiod}}}% } \name{translator}{1}{}{% {{hash=b43419361d83c9ab010e98aed1a83e35}{% family={{\~{Z}}elly}, familyi={\~{Z}\\bibinitperiod}, given={Arthur}, giveni={A\bibinitperiod}}}% } \strng{namehash}{b43419361d83c9ab010e98aed1a83e35} \strng{fullhash}{b43419361d83c9ab010e98aed1a83e35} \strng{bibnamehash}{b43419361d83c9ab010e98aed1a83e35} \strng{authorbibnamehash}{b43419361d83c9ab010e98aed1a83e35} \strng{authornamehash}{b43419361d83c9ab010e98aed1a83e35} \strng{authorfullhash}{b43419361d83c9ab010e98aed1a83e35} \strng{editorbibnamehash}{b43419361d83c9ab010e98aed1a83e35} \strng{editornamehash}{b43419361d83c9ab010e98aed1a83e35} \strng{editorfullhash}{b43419361d83c9ab010e98aed1a83e35} \strng{translatorbibnamehash}{b43419361d83c9ab010e98aed1a83e35} \strng{translatornamehash}{b43419361d83c9ab010e98aed1a83e35} \strng{translatorfullhash}{b43419361d83c9ab010e98aed1a83e35} \field{sortinit}{\~{Z}} \field{sortinithash}{156173bd08b075d7295bc3e0f4735a04} \true{uniqueprimaryauthor} \field{labelnamesource}{author} \endentry |; # Convert to NFC for testing sub tparsename { my $nps = Biber::Input::file::bibtex::parsename(@_)->{nameparts}; foreach my $np (keys $nps->%*) { next unless defined($nps->{$np}{string}); $nps->{$np}{string} = NFC($nps->{$np}{string}); my $npis; foreach my $npi ($nps->{$np}{initial}->@*) { push $npis->@*, NFC($npi); } $nps->{$np}{initial} = $npis; } return $nps; } sub tparsename_x { my $nps = Biber::Input::file::bibtex::parsename_x(@_)->{nameparts}; foreach my $np (keys $nps->%*) { next unless defined($nps->{$np}{string}); $nps->{$np}{string} = NFC($nps->{$np}{string}) || undef; my $npis; foreach my $npi ($nps->{$np}{initial}->@*) { push $npis->@*, NFC($npi); } $nps->{$np}{initial} = $npis; } return $nps; } # name parsing tests is_deeply(tparsename('John Doe', 'author'), $name1, 'parsename 1'); is_deeply(tparsename('Doe, Jr, John', 'author'), $name2, 'parsename 2'); is_deeply(tparsename('von Berlichingen zu Hornberg, Johann Gottfried', 'author'), $name3, 'parsename 3') ; is_deeply(tparsename('von Berlichingen zu Hornberg, Johann Gottfried', 'author'), $name4, 'parsename 4') ; is_deeply(tparsename('{Robert and Sons, Inc.}', 'author'), $name5, 'parsename 5') ; is_deeply(tparsename('al-Ṣāliḥ, ʿAbdallāh', 'author'), $name6, 'parsename 6') ; is_deeply(tparsename('Jean Charles Gabriel de la Vallée Poussin', 'author'), $name7, 'parsename 7'); is_deeply(tparsename('{Jean Charles Gabriel} de la Vallée Poussin', 'author'), $name8, 'parsename 8'); is_deeply(tparsename('Jean Charles Gabriel {de la} Vallée Poussin', 'author'), $name9, 'parsename 9'); is_deeply(tparsename('Jean Charles Gabriel de la {Vallée Poussin}', 'author'), $name10, 'parsename 10'); is_deeply(tparsename('{Jean Charles Gabriel} de la {Vallée Poussin}', 'author'), $name11, 'parsename 11'); is_deeply(tparsename('Jean Charles Gabriel Poussin', 'author'), $name12, 'parsename 12'); is_deeply(tparsename('Jean Charles {Poussin Lecoq}', 'author'), $name13, 'parsename 13'); is_deeply(tparsename('J. C. G. de la Vallée Poussin', 'author'), $name14, 'parsename 14'); is_deeply(tparsename('E. S. El-{M}allah', 'author'), $name15, 'parsename 15'); is_deeply(tparsename('E. S. {K}ent-{B}oswell', 'author'), $name16, 'parsename 16'); is_deeply(tparsename('Other, A.~N.', 'author'), $name17, 'parsename 17'); is_deeply(tparsename('{{{British National Corpus}}}', 'author'), $name18, 'parsename 18'); is_deeply(Biber::Input::file::bibtex::parsename('{{{British National Corpus}}}', 'author')->{strip}, $name18strip, 'parsename 18a'); is_deeply(tparsename('Vázques{ de }Parga, Luis', 'author'), $name19, 'parsename 19'); is_deeply(tparsename_x('family=Smithers Jones, prefix=van der, given=James, useprefix=true', 'author'), $namex1, 'parsename_x 1'); eq_or_diff(Biber::Input::file::bibtex::parsename_x('family=Smithers Jones, prefix=van der, given=James, useprefix=true', 'author')->{useprefix}, '1', 'parsename_x 2'); # name to bib tests eq_or_diff(Biber::Input::file::bibtex::parsename('John Doe', 'author')->name_to_bib, 'Doe, John', 'name_to_bib 1'); eq_or_diff(Biber::Input::file::bibtex::parsename('John van der Doe', 'author')->name_to_bib, 'van der Doe, John', 'name_to_bib 2'); eq_or_diff(Biber::Input::file::bibtex::parsename('Doe, Jr, John', 'author')->name_to_bib, 'Doe, Jr, John', 'name_to_bib 3'); eq_or_diff(Biber::Input::file::bibtex::parsename('von Doe, Jr, John', 'author')->name_to_bib, 'von Doe, Jr, John', 'name_to_bib 4'); eq_or_diff(Biber::Input::file::bibtex::parsename('John Alan Doe', 'author')->name_to_bib, 'Doe, John Alan', 'name_to_bib 5'); eq_or_diff(Biber::Input::file::bibtex::parsename('{Robert and Sons, Inc.}', 'author')->name_to_bib, '{Robert and Sons, Inc.}', 'name_to_bib 6'); eq_or_diff(NFC(Biber::Input::file::bibtex::parsename('Jean Charles Gabriel de la {Vallée Poussin}', 'author')->name_to_bib), 'de la {Vallée Poussin}, Jean Charles Gabriel', 'name_to_bib 7'); eq_or_diff(Biber::Input::file::bibtex::parsename('E. S. {K}ent-{B}oswell', 'author')->name_to_bib, '{K}ent-{B}oswell, E. S.', 'name_to_bib 8'); is_deeply(Biber::Input::file::bibtex::parsename_x('family=Smithers Jones, prefix=van der, given=James, useprefix=true', 'author')->name_to_bib, 'van der Smithers Jones, James', 'name_to_bib - 9'); # name to xname tests is_deeply(Biber::Input::file::bibtex::parsename('van der Smithers Jones, James', 'author')->name_to_xname, 'family=Smithers Jones, given=James, prefix=van der', 'name_to_xname - 1'); is_deeply(Biber::Input::file::bibtex::parsename_x('family=Smithers Jones, prefix=van der, given=James, useprefix=true', 'author')->name_to_xname, 'family=Smithers Jones, given=James, prefix=van der, useprefix=true', 'name_to_xname - 2'); # Full entry tests eq_or_diff( $out->get_output_entry('L1', $main), $l1, 'First Last') ; eq_or_diff( $out->get_output_entry('L2', $main), $l2, 'First Initial. Last') ; eq_or_diff( $out->get_output_entry('L3', $main), $l3, 'Initial. Initial. Last') ; eq_or_diff( $out->get_output_entry('L4', $main), $l4, 'First Initial Last') ; eq_or_diff( $out->get_output_entry('L5', $main), $l5, 'First prefix Last') ; eq_or_diff( $out->get_output_entry('L6', $main), $l6, 'First prefix prefix Last') ; eq_or_diff( $out->get_output_entry('L7', $main), $l7, 'First Initial. prefix Last') ; eq_or_diff( $out->get_output_entry('L8', $main), $l8, 'First Initial prefix Last') ; eq_or_diff( $out->get_output_entry('L9', $main), $l9, 'First {Last Last}') ; eq_or_diff( $out->get_output_entry('L10', $main), $l10, 'Last, Suffix, First') ; eq_or_diff( $out->get_output_entry('L10a', $main), $l10a, 'Last, Suffix, First Initial.') ; eq_or_diff( $out->get_output_entry('L11', $main), $l11, 'prefix Last, Suffix, First') ; eq_or_diff( $out->get_output_entry('L13', $main), $l13, 'Last Last Last, Initial. Initial.'); eq_or_diff( $out->get_output_entry('L14', $main), $l14, 'Last Last-Last, First'); eq_or_diff( $out->get_output_entry('L15', $main), $l15, 'First F.{\bibinitdelim }F. Last'); eq_or_diff( $out->get_output_entry('L16', $main), $l16, 'First {F.\bibinitdelim F.} Last'); eq_or_diff( $out->get_output_entry('L17', $main), $l17, 'Last, First {F.\bibinitdelim F.}'); eq_or_diff( $out->get_output_entry('L18', $main), $l18, 'Last, First F.{\bibinitdelim }F.'); eq_or_diff( $out->get_output_entry('L19', $main), $l19, 'Firstname with hyphen'); eq_or_diff( $out->get_output_entry('L19a', $main), $l19a, 'Short given name with hyphen'); eq_or_diff( $out->get_output_entry('L20', $main), $l20, 'Protected dual given name'); eq_or_diff( encode_utf8(NFC($out->get_output_entry('L22', $main))), encode_utf8($l22u), 'LaTeX encoded unicode family - 1'); eq_or_diff( NFC($out->get_output_entry('L23', $main)), $l23, 'Unicode given name'); eq_or_diff( NFC($out->get_output_entry('L24', $main)), $l24, 'Unicode family name'); eq_or_diff( $out->get_output_entry('L25', $main), $l25, 'Single string name'); eq_or_diff( $out->get_output_entry('L26', $main), $l26, 'Hyphen at brace level <> 0'); eq_or_diff($section->bibentry('L27')->get_field('author')->count_names, 1, 'Bad name with 3 commas'); eq_or_diff( $out->get_output_entry('L28', $main), $l28, 'Bad name with consecutive commas'); eq_or_diff( $out->get_output_entry('L29', $main), $l29, 'Escaped name with 3 commas'); # Checking visibility # Count does not include the "and others" as this "name" is deleted in the output driver eq_or_diff($bibentries->entry('V1')->get_field($bibentries->entry('V1')->get_labelname_info)->count_names, '2', 'Name count for "and others" - 1'); eq_or_diff($main->get_visible_cite($bibentries->entry('V1')->get_field($bibentries->entry('V1')->get_labelname_info)->get_id), '2', 'Visibility for "and others" - 1'); eq_or_diff($main->get_visible_cite($bibentries->entry('V2')->get_field($bibentries->entry('V2')->get_labelname_info)->get_id), '1', 'Visibility for "and others" - 2'); # A few tests depend on non UTF-8 output # Have to use a new biber object when trying to change encoding as this isn't # dealt with in ->prepare $biber->parse_ctrlfile('names.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Biber options Biber::Config->setoption('output_encoding', 'latin1'); # If you change the encoding options, you have to re-read the T::B data from the datasource # This won't happen unless you invalidate the T::B cache. Biber::Config->setblxoption('uniqueprimaryauthor', 1); Biber::Config->setoption('namesep', 'and'); # revert custom name sep Biber::Input::file::bibtex->init_cache; # Now generate the information $biber->prepare; $out = $biber->get_output_obj; $section = $biber->sections->get_section(0); $main = $biber->datalists->get_list('custom/global//global/global'); $bibentries = $section->bibentries; eq_or_diff(NFC($bibentries->entry('L21')->get_field($bibentries->entry('L21')->get_labelname_info)->nth_name(1)->get_namepart_initial('given')->[0]), 'Š', 'Terseinitials 1'); # Should be in NFD UTF-8 eq_or_diff( encode_utf8($out->get_output_entry('L12', $main)), encode_utf8($l12), 'First First First First prefix prefix Last Last') ; eq_or_diff( $out->get_output_entry('L21', $main), $l21, 'LaTeX encoded unicode given name'); eq_or_diff( $out->get_output_entry('L22', $main), $l22, 'LaTeX encoded unicode family name - 2'); eq_or_diff( $out->get_output_entry('L31', $main), $l31, 'LaTeX encoded unicode family name with tie char'); # uniqueprimaryauthor tests eq_or_diff($main->get_entryfield('upa1', 'uniqueprimaryauthor'), 1, 'Unique primary author - 1'); ok(is_undef($main->get_entryfield('upa2', 'uniqueprimaryauthor')), 'Unique primary author - 2'); ok(is_undef($main->get_entryfield('upa3', 'uniqueprimaryauthor')), 'Unique primary author - 3'); eq_or_diff($main->get_entryfield('upa4', 'uniqueprimaryauthor'), 1, 'Unique primary author - 4'); biblatex-biber-2.9/t/set-static.t000444000153000001 1363613205066061 16376 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 5; use Test::Differences; unified_diff; use Biber; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('set-static.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Now generate the information $biber->prepare; my $section = $biber->sections->get_section(0); my $main = $biber->datalists->get_list('nty/global//global/global'); my $main1 = $biber->datalists->get_list('none/global//global/global', 1); my $out = $biber->get_output_obj; # Notes that \set is in nty order due to sortsets=true in .bcf my $string1 = q| \entry{Static1}{set}{} \set{Static2,Static4,Static3} \field{sortinit}{B} \field{sortinithash}{276475738cc058478c1677046f857703} \field{annotation}{Some notes} \endentry |; my $string2 = q| \entry{Static2}{book}{} \inset{Static1} \name{author}{1}{}{% {{hash=43874d80d7ce68027102819f16c47df1}{% family={Bumble}, familyi={B\bibinitperiod}, given={Brian}, giveni={B\bibinitperiod}}}% } \strng{namehash}{43874d80d7ce68027102819f16c47df1} \strng{fullhash}{43874d80d7ce68027102819f16c47df1} \strng{bibnamehash}{43874d80d7ce68027102819f16c47df1} \strng{authorbibnamehash}{43874d80d7ce68027102819f16c47df1} \strng{authornamehash}{43874d80d7ce68027102819f16c47df1} \strng{authorfullhash}{43874d80d7ce68027102819f16c47df1} \field{sortinit}{B} \field{sortinithash}{276475738cc058478c1677046f857703} \field{labeldatesource}{year} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{annotation}{Some Blessed Note} \field{title}{Blessed Brains} \field{year}{2001} \endentry |; my $string3 = q| \entry{Static3}{book}{} \inset{Static1} \name{author}{1}{}{% {{hash=22dafa5cd57bb5dd7f3e3bab98fd539c}{% family={Dingle}, familyi={D\bibinitperiod}, given={Derek}, giveni={D\bibinitperiod}}}% } \strng{namehash}{22dafa5cd57bb5dd7f3e3bab98fd539c} \strng{fullhash}{22dafa5cd57bb5dd7f3e3bab98fd539c} \strng{bibnamehash}{22dafa5cd57bb5dd7f3e3bab98fd539c} \strng{authorbibnamehash}{22dafa5cd57bb5dd7f3e3bab98fd539c} \strng{authornamehash}{22dafa5cd57bb5dd7f3e3bab98fd539c} \strng{authorfullhash}{22dafa5cd57bb5dd7f3e3bab98fd539c} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{labeldatesource}{year} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{Castles and Crime} \field{year}{2002} \endentry |; my $string4 = q| \entry{Static4}{book}{} \inset{Static1} \name{author}{1}{}{% {{hash=da80091c8cd89e5269bd55af1bd5d2fa}{% family={Crenellation}, familyi={C\bibinitperiod}, given={Clive}, giveni={C\bibinitperiod}}}% } \strng{namehash}{da80091c8cd89e5269bd55af1bd5d2fa} \strng{fullhash}{da80091c8cd89e5269bd55af1bd5d2fa} \strng{bibnamehash}{da80091c8cd89e5269bd55af1bd5d2fa} \strng{authorbibnamehash}{da80091c8cd89e5269bd55af1bd5d2fa} \strng{authornamehash}{da80091c8cd89e5269bd55af1bd5d2fa} \strng{authorfullhash}{da80091c8cd89e5269bd55af1bd5d2fa} \field{sortinit}{C} \field{sortinithash}{963e9d84a3da2344e8833203de5aed05} \field{labeldatesource}{year} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{Dungeons, Dark and Dangerous} \field{year}{2005} \endentry |; # Labelyear is now here as skiplab is not set for this entry when cited in section # without citation of a set it is a member of my $string5 = q| \entry{Static2}{book}{} \name{author}{1}{}{% {{hash=43874d80d7ce68027102819f16c47df1}{% family={Bumble}, familyi={B\bibinitperiod}, given={Brian}, giveni={B\bibinitperiod}}}% } \strng{namehash}{43874d80d7ce68027102819f16c47df1} \strng{fullhash}{43874d80d7ce68027102819f16c47df1} \strng{bibnamehash}{43874d80d7ce68027102819f16c47df1} \strng{authorbibnamehash}{43874d80d7ce68027102819f16c47df1} \strng{authornamehash}{43874d80d7ce68027102819f16c47df1} \strng{authorfullhash}{43874d80d7ce68027102819f16c47df1} \field{sortinit}{1} \field{sortinithash}{2174f786c6195e7fe2ee1c229b416e29} \field{labeldatesource}{year} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{annotation}{Some Blessed Note} \field{title}{Blessed Brains} \field{year}{2001} \endentry |; eq_or_diff($out->get_output_entry('Static1', $main), $string1, 'Static set test 1'); eq_or_diff($out->get_output_entry('Static2', $main), $string2, 'Static set test 2'); eq_or_diff($out->get_output_entry('Static3', $main), $string3, 'Static set test 3'); eq_or_diff($out->get_output_entry('Static4', $main), $string4, 'Static set test 4'); eq_or_diff($out->get_output_entry('Static2', $main1, 1), $string5, 'Static set test 5'); biblatex-biber-2.9/t/tool.t000444000153000001 1574013205066061 15271 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use Test::More tests => 10; use Test::Differences; unified_diff; use Encode; use Biber; use Biber::Utils; use Biber::Output::bibtex; use Log::Log4perl; use Unicode::Normalize; use XML::LibXML; no warnings 'utf8'; use utf8; chdir("t/tdata"); my $conf = 'tool-testsort.conf'; # Set up schema my $CFxmlschema = XML::LibXML::RelaxNG->new(location => '../../data/schemata/config.rng'); # Set up Biber object my $biber = Biber->new(configfile => $conf); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->set_output_obj(Biber::Output::bibtex->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('tool', 1); Biber::Config->setoption('output_align', '1'); Biber::Config->setoption('output_resolve_xdata', 1); Biber::Config->setoption('output_resolve_crossrefs', 1); Biber::Config->setoption('output_format', 'bibtex'); Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # THERE IS A CONFIG FILE BEING READ! # Now generate the information $ARGV[0] = 'tool.bib'; # fake this as we are not running through top-level biber program $biber->tool_mode_setup; $biber->prepare_tool; my $main = $biber->datalists->get_lists_by_attrs(section => 99999, name => 'tool/global//global/global', type => 'entry', sortingtemplatename => 'tool', sortingnamekeytemplatename => 'global', labelprefix => '', uniquenametemplatename => 'global', labelalphanametemplatename => 'global')->[0]; my $out = $biber->get_output_obj; my $t1 = q|@UNPUBLISHED{i3Š, OPTIONS = {useprefix=false}, ABSTRACT = {Some abstract %50 of which is useless}, AUTHOR = {AAA and BBB and CCC and DDD and EEE}, INSTITUTION = {REPlaCEDte and early}, LISTA = {list test}, LISTB = {late and early}, LOCATION = {one and two}, DATE = {2003}, KEYWORDS = {keyword,keyword2,keyword3}, NOTE = {i3Š}, TITLE = {Š title}, USERB = {test}, } |; my $tx1 = q|@UNPUBLISHED{i3Š, OPTIONS = {useprefix=false}, ABSTRACT = {Some abstract %50 of which is useless}, AUTHOR = {family:AAA and family:BBB and family:CCC and family:DDD and family:EEE}, INSTITUTION = {REPlaCEDte and early}, LISTA = {list test}, LISTB = {late and early}, LOCATION = {one and two}, DATE = {2003}, KEYWORDS = {keyword,keyword2,keyword3}, NOTE = {i3Š}, TITLE = {Š title}, USERB = {test}, } |; my $t2 = q|@BOOK{xd1, AUTHOR = {Ellington, Edward Paul}, LOCATION = {New York and London}, PUBLISHER = {Macmillan}, DATE = {2001}, NOTE = {A Note}, } |; my $t3 = q|@BOOK{b1, LOCATION = {London and Edinburgh}, LOCATION+an = {1=ann1;2=ann2}, DATE = {1999}, MAINSUBTITLE = {Mainsubtitle}, MAINTITLE = {Maintitle}, MAINTITLEADDON = {Maintitleaddon}, TITLE = {Booktitle}, TITLE+an = {=ann1, ann2}, } |; my $t4 = q|@BOOK{dt1, DATE = {2004-04-25T14:34:00/2004-04-05T14:37:06}, EVENTDATE = {2004-04-25T14:34:00+05:00/2004-04-05T15:34:00+05:00}, ORIGDATE = {2004-04-25T14:34:00Z/2004-04-05T14:34:05Z}, URLDATE = {2004-04-25T14:34:00/2004-04-05T15:00:00}, } |; my $tc1 = ["\@COMMENT{Comment 1}\n", "\@COMMENT{Comment 2}\n", "\@COMMENT{jabref-meta: groupstree:\n0 AllEntriesGroup:;\n1 ExplicitGroup:Doktorandkurser\\;2\\;;\n2 KeywordGroup:Fra\x{30a}n ko\x{308}nsroll till genus\\;0\\;course\\;UCGS Fra\x{30a}n ko\x{308}nsrolltill genus\\;0\\;0\\;;\n2 KeywordGroup:Historiska och filosofiska perspektiv pa\x{30a} psykologi\\;0\\;course\\;Historiska och filosofiska perspektiv pa\x{30a} psykologi\\;0\\;0\\;;\n2 KeywordGroup:Kurs i introduktion\\;0\\;course\\;Kurs i introduktion\\;0\\;0\\;;\n2 KeywordGroup:Fenomenologi, ko\x{308}n och genus\\;0\\;course\\;UCGS Fenomenologi\\;0\\;0\\;;\n2 KeywordGroup:Quantitative Research Methods\\;0\\;course\\;QMR\\;0\\;0\\;;\n2 KeywordGroup:Multivariate Analysis\\;0\\;course\\;MVA\\;1\\;0\\;;\n}\n"]; # JOURNALTITLE->JOURNAL map in config. JOURNAL won't be output because it's # not a valid field. # DATE->YEAR map in config. YEAR won't be output because # it wasn't in the original datasource. my $m1 = q|@ARTICLE{m1, DATE = {2017}, } |; # NFD here because we are testing internals here and all internals expect NFD eq_or_diff(encode_utf8($out->get_output_entry(NFD('i3Š'))), encode_utf8($t1), 'tool mode - 1'); ok(is_undef($out->get_output_entry('loh')), 'tool mode - 2'); eq_or_diff($out->get_output_entry('xd1',), $t2, 'tool mode - 3'); eq_or_diff($out->get_output_entry('b1',), $t3, 'tool mode - 4'); eq_or_diff($out->get_output_entry('dt1',), $t4, 'tool mode - 5'); is_deeply($main->get_keys, ['b1', 'macmillan', 'dt1', 'm1', 'macmillan:pub', 'macmillan:loc', 'mv1', NFD('i3Š'), 'xd1'], 'tool mode sorting'); eq_or_diff($out->get_output_comments, $tc1, 'tool mode - 6'); Biber::Config->setoption('output_xname', 1); Biber::Config->setoption('output_xnamesep', ':'); $biber->tool_mode_setup; $biber->prepare_tool; $main = $biber->datalists->get_list(section => 99999, name => 'tool/global//global/global', type => 'entry', sortingtemplatename => 'tool', sortingnamekeytemplatename => 'global', labelprefix => '', uniquenametemplatename => 'global', labelalphanametemplatename => 'global'); $out = $biber->get_output_obj; eq_or_diff(encode_utf8($out->get_output_entry(NFD('i3Š'))), encode_utf8($tx1), 'tool mode - 7'); eq_or_diff($out->get_output_entry('m1',), $m1, 'tool mode - 8'); my $CFxmlparser = XML::LibXML->new(); # basic parse and XInclude processing my $CFxp = $CFxmlparser->parse_file($conf); # XPath context my $CFxpc = XML::LibXML::XPathContext->new($CFxp); # Validate against schema. Dies if it fails. $CFxmlschema->validate($CFxp); is($@, '', "Validation of $conf"); biblatex-biber-2.9/t/tool-bltxml-inout.t000444000153000001 1540113205066062 17720 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use Test::More tests => 1; use Test::Differences; unified_diff; use Text::Diff::Config; $Text::Diff::Config::Output_Unicode = 1; use Encode; use Biber; use Biber::Utils; use Biber::Output::biblatexml; use Log::Log4perl; use Unicode::Normalize; chdir("t/tdata"); no warnings 'utf8'; use utf8; # Set up Biber object my $biber = Biber->new( configfile => 'tool-test.conf'); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); my $outvar; $biber->set_output_obj(Biber::Output::biblatexml->new()); # Get reference to output object my $out = $biber->get_output_obj; # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('tool', 1); Biber::Config->setoption('output_resolve_xdata', 1); Biber::Config->setoption('output_resolve_crossrefs', 1); Biber::Config->setoption('output_format', 'biblatexml'); Biber::Config->setoption('input_format', 'biblatexml'); Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); Biber::Config->setoption('dsn', 'biblatexml.bltxml'); # Set the output target $out->set_output_target($out->set_output_target_file(\$outvar, 1)); # THERE IS A CONFIG FILE BEING READ! # Now generate the information $ARGV[0] = 'biblatexml.bltxml'; # fake this as we are not running through top-level biber program $biber->tool_mode_setup; $biber->prepare_tool; $out->output; my $main = $biber->datalists->get_lists_by_attrs(section => 99999, name => 'tool/global//global/global', type => 'entry', sortingtemplatename => 'tool', sortingnamekeytemplatename => 'global', labelprefix => '', uniquenametemplatename => 'global', labelalphanametemplatename => 'global')->[0]; my $bltxml1 = q| bltx1a1 bltx1a2 useprefix=false Brown John Булгаков Павел Георгиевич von Розенфельд Борис-ZZ Aбрамович von Aхмедов Ашраф Ахмедович Smith Paul Brown John russian Москва Наука 240 Somestring reprint Научно-биографическая литература Мухаммад ибн муса ал-Хорезми. Около 783 – около 850 usera userb userc userd a 1 10 30 34 198u 1990-05-16 1990-05-17 -356 1991~ |; # NFD here because we are testing internals here and all internals expect NFD eq_or_diff($outvar, encode_utf8($bltxml1), 'bltxml in and out tool mode - 1'); biblatex-biber-2.9/t/configfile.t000444000153000001 2767613205066062 16435 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; use Test::More tests => 10; use Test::Differences; unified_diff; use Biber; use Cwd qw(getcwd); use File::Spec; use Log::Log4perl; use Unicode::Normalize; use XML::LibXML; my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); chdir('t/tdata'); # Set up schema my $CFxmlschema = XML::LibXML::RelaxNG->new(location => '../../data/schemata/config.rng'); my $conf = 'biber-test.conf'; my $collopts = { level => 3, variable => 'non-ignorable', normalization => 'prenormalized', table => '/home/user/data/otherkeys.txt' }; my $noinit = [ {value => q/\b\p{Ll}{2}\p{Pd}/}, {value => q/[\x{2bf}\x{2018}]/} ]; my $nosort = [ { name => 'author', value => q/\A\p{L}{2}\p{Pd}/ }, { name => 'author', value => q/[\x{2bf}\x{2018}]/ }, { name => 'translator', value => q/[\x{2bf}\x{2018}]/ } ]; my $sourcemap = [ { datatype => "bibtex", level => "user", map => [ { map_step => [ { map_field_source => "usera", map_field_target => "userd" }, ], }, { map_step => [ { map_field_source => "TITLE", map_match => "High-Resolution Micromachined Interferometric Accelerometer", map_final => 1, }, { map_entry_null => 1 }, ], }, { map_step => [ { map_type_source => "ARTICLE", map_type_target => "CUSTOMB" }, ], per_datasource => [{ content => "doesnotexist.bib" }], }, { map_overwrite => 0, map_step => [ { map_field_set => "KEYWORDS", map_field_value => "keyw1, keyw2" }, { map_field_set => "TITLE", map_field_value => "Blah" }, ], per_datasource => [ { content => "examples.bib" }, { content => "doesnotexist.bib" }, ], per_type => [{ content => "ARTICLE" }, { content => "UNPUBLISHED" }], }, { map_step => [ { map_final => 1, map_type_source => "CONVERSATION", map_type_target => "CUSTOMC", }, { map_field_set => "VERBA", map_origentrytype => 1 }, { map_field_set => "VERBB", map_field_value => "somevalue" }, { map_field_set => "VERBC", map_field_value => "somevalue" }, ], }, { map_step => [{ map_type_source => "CHAT", map_type_target => "CUSTOMB" }], }, { map_step => [ { map_field_source => "USERB", map_final => 1 }, { map_field_set => "USERB", map_null => 1 }, { map_field_set => "USERE", map_field_value => NFD("a \x{160}tring") }, { map_field_set => "USERF", map_null => 1 }, ], per_datasource => [{ content => "examples.bib" }], per_type => [{ content => "MISC" }], }, { map_step => [ { map_field_set => "ABSTRACT", map_null => 1 }, { map_field_source => "CONDUCTOR", map_field_target => "NAMEA" }, { map_field_source => "GPS", map_field_target => "USERA" }, { map_field_source => "PARTICIPANT", map_field_target => "NAMEA" }, { map_field_source => "USERB", map_field_target => "USERD" }, ], per_datasource => [{ content => "examples.bib" }], }, { map_step => [ { map_field_source => "PUBMEDID", map_field_target => "EPRINT", map_final => 1, }, { map_field_set => "EPRINTTYPE", map_origfield => 1 }, { map_field_set => "USERD", map_field_value => "Some string of things", }, ], }, { map_step => [ { map_field_source => "LISTB", map_match => "\\A(\\S{2})", map_replace => "REP\$1CED", }, { map_field_source => "LISTB", map_match => "CED", map_replace => "ced" }, ], per_datasource => [{ content => "examples.bib" }], }, { map_step => [ { map_field_source => "TYPE", map_match => "resreport", map_final => "1" }, { map_field_set => "USERA", map_field_value => "a, b,c" } ], }, { map_step => [ { map_field_source => "TYPE", map_match => "resreport", map_final => "1" }, { map_entry_new => "loopkey:\$MAPLOOP:\$MAPUNIQ", map_entry_newtype => "book" }, { map_entrytarget => "loopkey:\$MAPLOOP:\$MAPUNIQVAL", map_field_set => "NOTE", map_field_value => "note"}, { map_entrytarget => "loopkey:\$MAPLOOP:\$MAPUNIQVAL", map_field_source => "NOTE", map_match => "note", map_replace => "NOTEreplaced"} ], map_foreach => "USERA", }, { map_step => [ { map_field_source => "ENTRYKEY", map_match => "snk1", map_final => "1" }, { map_field_source => "entrykey", map_match => "(.+)"}, { map_entry_clone => "clone-\$1" }, { map_entrytarget => "clone-snk1", map_field_set => "NOTE", map_field_value => "note" }, { map_entrytarget => "clone-snk1", map_field_set => "ADDENDUM", map_field_value => "add" }, { map_entrytarget => "clone-snk1", map_field_set => "NOTE", map_null => "1" }, ], }, { map_step => [{ map_field_source => "TYPE", map_match => "resreport", map_final => "1" }, { map_entry_new => "newtestkey", map_entry_newtype => "book" }, { map_entrytarget => "newtestkey", map_field_set => "NOTE", map_field_value => "note" }, { map_field_source => "NUMBER", map_match => "([A-Z]+)" }, { map_entrytarget => "newtestkey", map_field_set => "USERA", map_origfieldval => "1" }, { map_entrytarget => "newtestkey", map_field_set => "USERB", map_field_value => "\$1" }, { map_field_set => "LISTA", map_null => 1 }], per_type => [{ content => "REPORT" }], }, { map_step => [ { map_field_source => "LISTC", map_field_target => "INSTITUTION", map_match => "\\A(\\S{2})", map_replace => "REP\$1CED", }, { map_field_source => "LISTD", map_match => NFD("æøå"), map_replace => "abc", }, { map_field_set => "entrykey", map_null => 1 }, { map_field_source => "entrykey", map_field_target => "NOTE" }, { map_field_set => "NOTE", map_origfieldval => 1 }, ], per_type => [{ content => "UNPUBLISHED" }], }, { map_overwrite => 0, map_step => [{ map_field_set => "NOTE", map_field_value => "Overwrite note", map_final => 1}, { map_field_set => "TITLE", map_null => 1 }], per_type => [{ content => "ONLINE" }], }, { map_overwrite => 1, per_type => [{ content => "ONLINE" }], map_step => [{map_notfield => "EDITOR", map_field_set => "ADDENDUM", map_field_value =>"NF1" }] }, { map_overwrite => 1, per_type => [{ content => "ONLINE" }], map_step => [{map_notfield => "AUTHOR", map_final => 1}, {map_field_set => "USERB", map_field_value => "NF2"}] } ], map_overwrite => 1, }, { datatype => "bibtex", level => "driver", map => [ { map_step => [ { map_final => 1, map_type_source => "conference", map_type_target => "inproceedings", }, { map_final => 1, map_type_source => "electronic", map_type_target => "online", }, { map_final => 1, map_type_source => "www", map_type_target => "online" }, ], }, { map_step => [ { map_final => 1, map_type_source => "mastersthesis", map_type_target => "thesis", }, { map_field_set => "type", map_field_value => "mathesis" }, ], }, { map_step => [ { map_final => 1, map_type_source => "phdthesis", map_type_target => "thesis", }, { map_field_set => "type", map_field_value => "phdthesis" }, ], }, { map_step => [ { map_final => 1, map_type_source => "techreport", map_type_target => "report", }, { map_field_set => "type", map_field_value => "techreport" }, ], }, { map_step => [ { map_field_source => "hyphenation", map_field_target => "langid" }, { map_field_source => "address", map_field_target => "location" }, { map_field_source => "school", map_field_target => "institution" }, { map_field_source => "annote", map_field_target => "annotation" }, { map_field_source => "archiveprefix", map_field_target => "eprinttype", }, { map_field_source => "journal", map_field_target => "journaltitle" }, { map_field_source => "primaryclass", map_field_target => "eprintclass", }, { map_field_source => "key", map_field_target => "sortkey" }, { map_field_source => "pdf", map_field_target => "file" }, ], }, ], }, ]; # Set up Biber object my $biber = Biber->new( configfile => $conf, mincrossrefs => 7 ); $biber->parse_ctrlfile('general.bcf'); eq_or_diff(Biber::Config->getoption('mincrossrefs'), 7, 'Options 1 - from cmdline'); eq_or_diff(Biber::Config->getoption('configfile'), File::Spec->catfile($conf), 'Options 2 - from cmdline'); eq_or_diff(Biber::Config->getoption('sortlocale'), 'testlocale', 'Options 3 - from config file'); is_deeply(Biber::Config->getoption('collate_options'), $collopts, 'Options 4 - from config file'); is_deeply(Biber::Config->getoption('nosort'), $nosort, 'Options 5 - from config file'); is_deeply(Biber::Config->getoption('noinit'), $noinit, 'Options 6 - from config file'); is_deeply(Biber::Config->getoption('sortcase'), 0, 'Options 7 - from .bcf'); eq_or_diff(Biber::Config->getoption('decodecharsset'), 'base', 'Options 8 - from defaults'); # Here the result is a merge of the biblatex option from the .bcf and the option from # the biber config file as sourcemap is a special case is_deeply(Biber::Config->getoption('sourcemap'), $sourcemap, 'Options 9 - from config file'); my $CFxmlparser = XML::LibXML->new(); # basic parse and XInclude processing my $CFxp = $CFxmlparser->parse_file($conf); # XPath context my $CFxpc = XML::LibXML::XPathContext->new($CFxp); # Validate against schema. Dies if it fails. $CFxmlschema->validate($CFxp); is($@, '', "Validation of $conf"); biblatex-biber-2.9/t/related-entries.t000444000153000001 3423613205066062 17405 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 15; use Test::Differences; unified_diff; use Biber; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata") ; # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('related.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Now generate the information $biber->prepare; my $out = $biber->get_output_obj; my $main = $biber->datalists->get_list('none/global//global/global'); my $shs = $biber->datalists->get_list('shorthand/global//global/global', 0, 'list'); my $k1 = q| \entry{key1}{article}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=a517747c3d12f99244ae598910d979c5}{% family={Author}, familyi={A\bibinitperiod}}}% } \strng{namehash}{a517747c3d12f99244ae598910d979c5} \strng{fullhash}{a517747c3d12f99244ae598910d979c5} \strng{bibnamehash}{a517747c3d12f99244ae598910d979c5} \strng{authorbibnamehash}{a517747c3d12f99244ae598910d979c5} \strng{authornamehash}{a517747c3d12f99244ae598910d979c5} \strng{authorfullhash}{a517747c3d12f99244ae598910d979c5} \field{sortinit}{1} \field{sortinithash}{2174f786c6195e7fe2ee1c229b416e29} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{journaltitle}{Journal Title} \field{number}{5} \field{relatedtype}{reprintas} \field{shorthand}{RK1} \field{title}{Original Title} \field{volume}{12} \field{year}{1998} \field{dateera}{ce} \field{related}{78f825aaa0103319aaa1a30bf4fe3ada,3631578538a2d6ba5879b31a9a42f290} \field{pages}{125\bibrangedash 150} \range{pages}{26} \endentry |; my $k2 = q| \entry{key2}{inbook}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=a517747c3d12f99244ae598910d979c5}{% family={Author}, familyi={A\bibinitperiod}}}% } \list{location}{1}{% {Location}% } \list{publisher}{1}{% {Publisher}% } \strng{namehash}{a517747c3d12f99244ae598910d979c5} \strng{fullhash}{a517747c3d12f99244ae598910d979c5} \strng{bibnamehash}{a517747c3d12f99244ae598910d979c5} \strng{authorbibnamehash}{a517747c3d12f99244ae598910d979c5} \strng{authornamehash}{a517747c3d12f99244ae598910d979c5} \strng{authorfullhash}{a517747c3d12f99244ae598910d979c5} \field{sortinit}{2} \field{sortinithash}{cbff857e587bcb4635511624d773949e} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{booktitle}{Booktitle} \field{relatedstring}{First} \field{relatedtype}{reprintof} \field{shorthand}{RK2} \field{title}{Reprint Title} \field{year}{2009} \field{dateera}{ce} \field{related}{c2add694bf942dc77b376592d9c862cd} \field{pages}{34\bibrangedash 60} \range{pages}{27} \endentry |; my $kck1 = q| \entry{c2add694bf942dc77b376592d9c862cd}{article}{dataonly} \name{author}{1}{}{% {{hash=a517747c3d12f99244ae598910d979c5}{% family={Author}, familyi={A\bibinitperiod}}}% } \strng{namehash}{a517747c3d12f99244ae598910d979c5} \strng{fullhash}{a517747c3d12f99244ae598910d979c5} \strng{bibnamehash}{a517747c3d12f99244ae598910d979c5} \strng{authorbibnamehash}{a517747c3d12f99244ae598910d979c5} \strng{authornamehash}{a517747c3d12f99244ae598910d979c5} \strng{authorfullhash}{a517747c3d12f99244ae598910d979c5} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{clonesourcekey}{key1} \field{journaltitle}{Journal Title} \field{number}{5} \field{relatedtype}{reprintas} \field{shorthand}{RK1} \field{title}{Original Title} \field{volume}{12} \field{year}{1998} \field{related}{78f825aaa0103319aaa1a30bf4fe3ada,3631578538a2d6ba5879b31a9a42f290} \field{pages}{125\bibrangedash 150} \range{pages}{26} \endentry |; my $kck2 = q| \entry{78f825aaa0103319aaa1a30bf4fe3ada}{inbook}{dataonly} \name{author}{1}{}{% {{hash=a517747c3d12f99244ae598910d979c5}{% family={Author}, familyi={A\bibinitperiod}}}% } \list{location}{1}{% {Location}% } \list{publisher}{1}{% {Publisher}% } \strng{namehash}{a517747c3d12f99244ae598910d979c5} \strng{fullhash}{a517747c3d12f99244ae598910d979c5} \strng{bibnamehash}{a517747c3d12f99244ae598910d979c5} \strng{authorbibnamehash}{a517747c3d12f99244ae598910d979c5} \strng{authornamehash}{a517747c3d12f99244ae598910d979c5} \strng{authorfullhash}{a517747c3d12f99244ae598910d979c5} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{clonesourcekey}{key2} \field{booktitle}{Booktitle} \field{relatedstring}{First} \field{relatedtype}{reprintof} \field{shorthand}{RK2} \field{title}{Reprint Title} \field{year}{2009} \field{related}{c2add694bf942dc77b376592d9c862cd} \field{pages}{34\bibrangedash 60} \range{pages}{27} \endentry |; my $kck3 = q| \entry{3631578538a2d6ba5879b31a9a42f290}{inbook}{dataonly} \name{author}{1}{}{% {{hash=a517747c3d12f99244ae598910d979c5}{% family={Author}, familyi={A\bibinitperiod}}}% } \list{location}{1}{% {Location}% } \list{publisher}{1}{% {Publisher2}% } \strng{namehash}{a517747c3d12f99244ae598910d979c5} \strng{fullhash}{a517747c3d12f99244ae598910d979c5} \strng{bibnamehash}{a517747c3d12f99244ae598910d979c5} \strng{authorbibnamehash}{a517747c3d12f99244ae598910d979c5} \strng{authornamehash}{a517747c3d12f99244ae598910d979c5} \strng{authorfullhash}{a517747c3d12f99244ae598910d979c5} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{clonesourcekey}{key3} \field{booktitle}{Booktitle} \field{relatedtype}{translationof} \field{shorthand}{RK3} \field{title}{Reprint Title} \field{year}{2010} \field{related}{caf8e34be07426ae7127c1b4829983c1} \field{pages}{33\bibrangedash 57} \range{pages}{25} \endentry |; my $kck4 = q| \entry{caf8e34be07426ae7127c1b4829983c1}{inbook}{dataonly,useeditor=false,uniquename=false} \name{author}{1}{}{% {{hash=a517747c3d12f99244ae598910d979c5}{% family={Author}, familyi={A\bibinitperiod}}}% } \list{location}{1}{% {Location}% } \list{publisher}{1}{% {Publisher2}% } \strng{namehash}{a517747c3d12f99244ae598910d979c5} \strng{fullhash}{a517747c3d12f99244ae598910d979c5} \strng{bibnamehash}{a517747c3d12f99244ae598910d979c5} \strng{authorbibnamehash}{a517747c3d12f99244ae598910d979c5} \strng{authornamehash}{a517747c3d12f99244ae598910d979c5} \strng{authorfullhash}{a517747c3d12f99244ae598910d979c5} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{clonesourcekey}{key4} \field{booktitle}{Booktitle} \field{shorthand}{RK4} \field{title}{Orig Language Title} \field{year}{2011} \field{pages}{33\bibrangedash 57} \range{pages}{25} \endentry |; my $c1 = q| \entry{c1}{book}{} \field{sortinit}{3} \field{sortinithash}{a4b52e5432884761f50fb9571273b93e} \field{related}{9ab62b5ef34a985438bfdf7ee0102229} \endentry |; my $c2k = q| \entry{9ab62b5ef34a985438bfdf7ee0102229}{book}{dataonly} \field{clonesourcekey}{c2} \field{related}{0a3d72134fb3d6c024db4c510bc1605b} \endentry |; my $c3k = q| \entry{0a3d72134fb3d6c024db4c510bc1605b}{book}{dataonly} \field{clonesourcekey}{c3} \field{related}{9ab62b5ef34a985438bfdf7ee0102229} \endentry |; my $s1 = q| \entry{8ddf878039b70767c4a5bcf4f0c4f65e}{book}{dataonly,skipbib=false,usecustom=false} \name{author}{1}{}{% {{hash=a517747c3d12f99244ae598910d979c5}{% family={Author}, familyi={A\\bibinitperiod}}}% } \strng{namehash}{a517747c3d12f99244ae598910d979c5} \strng{fullhash}{a517747c3d12f99244ae598910d979c5} \strng{bibnamehash}{a517747c3d12f99244ae598910d979c5} \strng{authorbibnamehash}{a517747c3d12f99244ae598910d979c5} \strng{authornamehash}{a517747c3d12f99244ae598910d979c5} \strng{authorfullhash}{a517747c3d12f99244ae598910d979c5} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{clonesourcekey}{s1} \field{title}{Title 1} \endentry |; eq_or_diff( $out->get_output_entry('key1', $main), $k1, 'Related entry test 1' ) ; eq_or_diff( $out->get_output_entry('key2', $main), $k2, 'Related entry test 2' ) ; # Key k3 is used only to create a related entry clone but since it isn't cited itself # it shouldn't be in the .bbl eq_or_diff( $out->get_output_entry('key3', $main), undef, 'Related entry test 3' ) ; eq_or_diff( $out->get_output_entry('c2add694bf942dc77b376592d9c862cd', $main), $kck1, 'Related entry test 4' ) ; eq_or_diff( $out->get_output_entry('78f825aaa0103319aaa1a30bf4fe3ada', $main), $kck2, 'Related entry test 5' ) ; eq_or_diff( $out->get_output_entry('3631578538a2d6ba5879b31a9a42f290', $main), $kck3, 'Related entry test 6' ) ; eq_or_diff( $out->get_output_entry('caf8e34be07426ae7127c1b4829983c1', $main), $kck4, 'Related entry test 7' ) ; # Key k4 is used only to create a related entry clone but since it isn't cited itself # it shouldn't be in the .bbl eq_or_diff( $out->get_output_entry('key4', $main), undef, 'Related entry test 8' ) ; is_deeply($shs->get_keys, [ "key1", "key2", "caf8e34be07426ae7127c1b4829983c1", "78f825aaa0103319aaa1a30bf4fe3ada", "3631578538a2d6ba5879b31a9a42f290", "c2add694bf942dc77b376592d9c862cd", ], 'Related entry test 9'); # Testing circular dependencies eq_or_diff( $out->get_output_entry('c1', $main), $c1, 'Related entry test 10' ) ; eq_or_diff( $out->get_output_entry('9ab62b5ef34a985438bfdf7ee0102229', $main), $c2k, 'Related entry test 11' ) ; eq_or_diff( $out->get_output_entry('0a3d72134fb3d6c024db4c510bc1605b', $main), $c3k, 'Related entry test 12' ) ; # Testing custom relatedoptions eq_or_diff( $out->get_output_entry('8ddf878039b70767c4a5bcf4f0c4f65e', $main), $s1, 'Custom options - 1' ) ; my $un1 = q| \entry{kullback}{book}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=34c5bbf9876c37127c3abe4e7d7a7198}{% family={Kullback}, familyi={K\bibinitperiod}, given={Solomon}, giveni={S\bibinitperiod}, givenun=0}}% } \list{location}{1}{% {New York}% } \list{publisher}{1}{% {John Wiley \& Sons}% } \strng{namehash}{34c5bbf9876c37127c3abe4e7d7a7198} \strng{fullhash}{34c5bbf9876c37127c3abe4e7d7a7198} \strng{bibnamehash}{34c5bbf9876c37127c3abe4e7d7a7198} \strng{authorbibnamehash}{34c5bbf9876c37127c3abe4e7d7a7198} \strng{authornamehash}{34c5bbf9876c37127c3abe4e7d7a7198} \strng{authorfullhash}{34c5bbf9876c37127c3abe4e7d7a7198} \field{sortinit}{5} \field{sortinithash}{3c19c3776b658b3558e9e2e4840c01e2} \field{extradatescope}{year} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{langid}{english} \field{langidopts}{variant=american} \field{title}{Information Theory and Statistics} \field{year}{1959} \\endentry |; my $un2 = q| \entry{kullback:related}{book}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=34c5bbf9876c37127c3abe4e7d7a7198}{% family={Kullback}, familyi={K\bibinitperiod}, given={Solomon}, giveni={S\bibinitperiod}, givenun=0}}% } \list{location}{1}{% {New York}% } \list{publisher}{1}{% {Dover Publications}% } \strng{namehash}{34c5bbf9876c37127c3abe4e7d7a7198} \strng{fullhash}{34c5bbf9876c37127c3abe4e7d7a7198} \strng{bibnamehash}{34c5bbf9876c37127c3abe4e7d7a7198} \strng{authorbibnamehash}{34c5bbf9876c37127c3abe4e7d7a7198} \strng{authornamehash}{34c5bbf9876c37127c3abe4e7d7a7198} \strng{authorfullhash}{34c5bbf9876c37127c3abe4e7d7a7198} \field{sortinit}{6} \field{sortinithash}{57e57fb8451e7fcfa45d1e069f6d3136} \field{extradatescope}{year} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{annotation}{A reprint of the \texttt{kullback} entry. Note the format of the \texttt{related} and \texttt{relatedtype} fields} \field{langid}{english} \field{langidopts}{variant=american} \field{relatedtype}{origpubin} \field{title}{Information Theory and Statistics} \field{year}{1997} \field{related}{7963607e635f427aafeffbf28942c3bb} \endentry |; # uniquename in related entries eq_or_diff($out->get_output_entry('kullback', $main), $un1, 'Related uniquename - 1'); eq_or_diff($out->get_output_entry('kullback:related', $main), $un2, 'Related uniquename - 2'); biblatex-biber-2.9/t/sort-case.t000444000153000001 355413205066062 16175 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 2; use Biber; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata") ; my $S; # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('sort-case.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests Biber::Config->setoption('sortcase', 1); Biber::Config->setoption('sortupper', 1); Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); $S = { spec => [ [ {}, {'author' => {}}, ], ]}; my $main = $biber->datalists->get_list('custom/global//global/global'); $main->set_sortingtemplate($S); $biber->prepare; is_deeply($main->get_keys, ['CS1','CS3','CS2'], 'U::C case - 1'); $biber = Biber->new(noconf => 1); $biber->parse_ctrlfile('sort-case.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Global here is sortcase=0, sortupper=1 # title is sortcase=1, sortupper=0 # So, all names are the same and it depends on title $biber->prepare; $main = $biber->datalists->get_list('custom/global//global/global'); is_deeply($main->get_keys, ['CS3','CS2','CS1'], 'U::C case - 2'); biblatex-biber-2.9/t/bcfvalidation.t000444000153000001 132513205066062 17074 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 48; use XML::LibXML; use Biber; chdir('t'); # Validate all .bcfs used in tests # Set up schema my $CFxmlschema = XML::LibXML::RelaxNG->new(location => '../data/schemata/bcf.rng'); foreach my $bcf () { # Set up XML parser my $CFxmlparser = XML::LibXML->new(); # basic parse and XInclude processing my $CFxp = $CFxmlparser->parse_file($bcf); # XPath context my $CFxpc = XML::LibXML::XPathContext->new($CFxp); $CFxpc->registerNs('bcf', 'https://sourceforge.net/projects/biblatex'); # Validate against schema. Dies if it fails. $CFxmlschema->validate($CFxp); is($@, '', "Validation of $bcf"); } biblatex-biber-2.9/t/labelalpha.t000444000153000001 7315713205066062 16410 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 122; use Test::Differences; unified_diff; use Biber; use Biber::Utils; use Biber::Output::bbl; use Log::Log4perl; use Unicode::Normalize; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('labelalpha.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('maxalphanames', 1); Biber::Config->setblxoption('maxcitenames', 1); Biber::Config->setblxoption('labeldateparts', undef); # Now generate the information, saving per-entry options or they are deleted $biber->prepare; my $section = $biber->sections->get_section(0); my $main = $biber->datalists->get_list('custom/global//global/global'); my $bibentries = $section->bibentries; # Test with useprefix=false eq_or_diff($main->get_entryfield('prefix1', 'sortlabelalpha'), 'Vaa99', 'useprefix=0 so not in label'); # useprefix=true Biber::Config->setblxoption('useprefix', 1); $biber->prepare; eq_or_diff($main->get_entryfield('prefix1', 'sortlabelalpha'), 'vdVaa99', 'Default prefix settings entry prefix1 labelalpha'); eq_or_diff($main->get_entryfield('L1', 'sortlabelalpha'), 'Doe95', 'maxalphanames=1 minalphanames=1 entry L1 labelalpha'); ok(is_undef($main->get_extraalphadata_for_key('l1')), 'maxalphanames=1 minalphanames=1 entry L1 extraalpha'); eq_or_diff($main->get_entryfield('L2', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=1 minalphanames=1 entry L2 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L2'), '1', 'maxalphanames=1 minalphanames=1 entry L2 extraalpha'); eq_or_diff($main->get_entryfield('L3', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=1 minalphanames=1 entry L3 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L3'), '2', 'maxalphanames=1 minalphanames=1 entry L3 extraalpha'); eq_or_diff($main->get_entryfield('L4', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=1 minalphanames=1 entry L4 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L4'), '3', 'maxalphanames=1 minalphanames=1 entry L4 extraalpha'); eq_or_diff($main->get_entryfield('L5', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=1 minalphanames=1 entry L5 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L5'), '4', 'maxalphanames=1 minalphanames=1 entry L5 extraalpha'); eq_or_diff($main->get_entryfield('L6', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=1 minalphanames=1 entry L6 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L6'), '5', 'maxalphanames=1 minalphanames=1 entry L6 extraalpha'); eq_or_diff($main->get_entryfield('L7', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=1 minalphanames=1 entry L7 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L7'), '6', 'maxalphanames=1 minalphanames=1 entry L7 extraalpha'); eq_or_diff($main->get_entryfield('L8', 'sortlabelalpha'), 'Sha85', 'maxalphanames=1 minalphanames=1 entry L8 labelalpha'); ok(is_undef($main->get_extraalphadata_for_key('L8')), 'maxalphanames=1 minalphanames=1 entry L8 extraalpha'); ok(is_undef($main->get_extraalphadata_for_key('L9')), 'L9 extraalpha unset due to shorthand'); ok(is_undef($main->get_extraalphadata_for_key('L10')), 'L10 extraalpha unset due to shorthand'); eq_or_diff($main->get_extraalphadata_for_key('knuth:ct'), '1', 'YEAR with range needs label differentiating from individual volumes - 1'); eq_or_diff($main->get_extraalphadata_for_key('knuth:ct:a'), '2', 'YEAR with range needs label differentiating from individual volumes - 2'); eq_or_diff($main->get_extraalphadata_for_key('knuth:ct:b'), '1', 'YEAR with range needs label differentiating from individual volumes - 3'); eq_or_diff($main->get_extraalphadata_for_key('knuth:ct:c'), '2', 'YEAR with range needs label differentiating from individual volumes - 4'); eq_or_diff($main->get_entryfield('ignore1', 'sortlabelalpha'), 'OTo07', 'Default ignore'); eq_or_diff($main->get_entryfield('ignore2', 'sortlabelalpha'), 'De 07', 'Default no ignore spaces'); # reset options and regenerate information Biber::Config->setblxoption('maxalphanames', 2); Biber::Config->setblxoption('minalphanames', 1); Biber::Config->setblxoption('maxcitenames', 2); Biber::Config->setblxoption('mincitenames', 1); foreach my $k ($section->get_citekeys) { $bibentries->entry($k)->del_field('sortlabelalpha'); $bibentries->entry($k)->del_field('labelalpha'); $main->set_extraalphadata_for_key($k, undef); } $biber->prepare; $section = $biber->sections->get_section(0); $main = $biber->datalists->get_list('custom/global//global/global'); $bibentries = $section->bibentries; eq_or_diff($main->get_entryfield('L1', 'sortlabelalpha'), 'Doe95', 'maxalphanames=2 minalphanames=1 entry L1 labelalpha'); ok(is_undef($main->get_extraalphadata_for_key('l1')), 'maxalphanames=2 minalphanames=1 entry L1 extraalpha'); eq_or_diff($main->get_entryfield('L2', 'sortlabelalpha'), 'DA95', 'maxalphanames=2 minalphanames=1 entry L2 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L2'), '1', 'maxalphanames=2 minalphanames=1 entry L2 extraalpha'); eq_or_diff($main->get_entryfield('L3', 'sortlabelalpha'), 'DA95', 'maxalphanames=2 minalphanames=1 entry L3 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L3'), '2', 'maxalphanames=2 minalphanames=1 entry L3 extraalpha'); eq_or_diff($main->get_entryfield('L4', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=2 minalphanames=1 entry L4 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L4'), '1', 'maxalphanames=2 minalphanames=1 entry L4 extraalpha'); eq_or_diff($main->get_entryfield('L5', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=2 minalphanames=1 entry L5 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L5'), '2', 'maxalphanames=2 minalphanames=1 entry L5 extraalpha'); eq_or_diff($main->get_entryfield('L6', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=2 minalphanames=1 entry L6 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L6'), '3', 'maxalphanames=2 minalphanames=1 entry L6 extraalpha'); eq_or_diff($main->get_entryfield('L7', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=2 minalphanames=1 entry L7 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L7'), '4', 'maxalphanames=2 minalphanames=1 entry L7 extraalpha'); eq_or_diff($main->get_entryfield('L8', 'sortlabelalpha'), 'Sha85', 'maxalphanames=2 minalphanames=1 entry L8 labelalpha'); ok(is_undef($main->get_extraalphadata_for_key('L8')), 'maxalphanames=2 minalphanames=1 entry L8 extraalpha'); # reset options and regenerate information Biber::Config->setblxoption('maxalphanames', 2); Biber::Config->setblxoption('minalphanames', 2); Biber::Config->setblxoption('maxcitenames', 2); Biber::Config->setblxoption('mincitenames', 2); foreach my $k ($section->get_citekeys) { $bibentries->entry($k)->del_field('sortlabelalpha'); $bibentries->entry($k)->del_field('labelalpha'); $main->set_extraalphadata_for_key($k, undef); } $biber->prepare; $section = $biber->sections->get_section(0); $main = $biber->datalists->get_list('custom/global//global/global'); $bibentries = $section->bibentries; eq_or_diff($main->get_entryfield('L1', 'sortlabelalpha'), 'Doe95', 'maxalphanames=2 minalphanames=2 entry L1 labelalpha'); ok(is_undef($main->get_extraalphadata_for_key('l1')), 'maxalphanames=2 minalphanames=2 entry L1 extraalpha'); eq_or_diff($main->get_entryfield('L2', 'sortlabelalpha'), 'DA95', 'maxalphanames=2 minalphanames=2 entry L2 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L2'), '1', 'maxalphanames=2 minalphanames=2 entry L2 extraalpha'); eq_or_diff($main->get_entryfield('L3', 'sortlabelalpha'), 'DA95', 'maxalphanames=2 minalphanames=2 entry L3 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L3'), '2', 'maxalphanames=2 minalphanames=2 entry L3 extraalpha'); eq_or_diff($main->get_entryfield('L4', 'sortlabelalpha'), 'DA+95', 'maxalphanames=2 minalphanames=2 entry L4 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L4'), '1', 'maxalphanames=2 minalphanames=2 entry L4 extraalpha'); eq_or_diff($main->get_entryfield('L5', 'sortlabelalpha'), 'DA+95', 'maxalphanames=2 minalphanames=2 entry L5 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L5'), '2', 'maxalphanames=2 minalphanames=2 entry L5 extraalpha'); eq_or_diff($main->get_entryfield('L6', 'sortlabelalpha'), 'DS+95', 'maxalphanames=2 minalphanames=2 entry L6 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L6'), '1', 'maxalphanames=2 minalphanames=2 entry L6 extraalpha'); eq_or_diff($main->get_entryfield('L7', 'sortlabelalpha'), 'DS+95', 'maxalphanames=2 minalphanames=2 entry L7 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L7'), '2', 'maxalphanames=2 minalphanames=2 entry L7 extraalpha'); eq_or_diff($main->get_entryfield('L8', 'sortlabelalpha'), 'Sha85', 'maxalphanames=2 minalphanames=2 entry L8 labelalpha'); ok(is_undef($main->get_extraalphadata_for_key('L8')), 'maxalphanames=2 minalphanames=2 entry L8 extraalpha'); # reset options and regenerate information Biber::Config->setblxoption('maxalphanames', 3); Biber::Config->setblxoption('minalphanames', 1); Biber::Config->setblxoption('maxcitenames', 3); Biber::Config->setblxoption('mincitenames', 1); foreach my $k ($section->get_citekeys) { $bibentries->entry($k)->del_field('sortlabelalpha'); $bibentries->entry($k)->del_field('labelalpha'); $main->set_extraalphadata_for_key($k, undef); } $biber->prepare; $section = $biber->sections->get_section(0); $main = $biber->datalists->get_list('custom/global//global/global'); $bibentries = $section->bibentries; eq_or_diff($main->get_entryfield('L1', 'sortlabelalpha'), 'Doe95', 'maxalphanames=3 minalphanames=1 entry L1 labelalpha'); ok(is_undef($main->get_extraalphadata_for_key('L1')), 'maxalphanames=3 minalphanames=1 entry L1 extraalpha'); eq_or_diff($main->get_entryfield('L2', 'sortlabelalpha'), 'DA95', 'maxalphanames=3 minalphanames=1 entry L2 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L2'), '1', 'maxalphanames=3 minalphanames=1 entry L2 extraalpha'); eq_or_diff($main->get_entryfield('L3', 'sortlabelalpha'), 'DA95', 'maxalphanames=3 minalphanames=1 entry L3 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L3'), '2', 'maxalphanames=3 minalphanames=1 entry L3 extraalpha'); eq_or_diff($main->get_entryfield('L4', 'sortlabelalpha'), 'DAE95', 'maxalphanames=3 minalphanames=1 entry L4 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L4'), '1', 'maxalphanames=3 minalphanames=1 entry L4 extraalpha'); eq_or_diff($main->get_entryfield('L5', 'sortlabelalpha'), 'DAE95', 'maxalphanames=3 minalphanames=1 entry L5 labelalpha'); eq_or_diff($main->get_extraalphadata_for_key('L5'), '2', 'maxalphanames=3 minalphanames=1 entry L5 extraalpha'); eq_or_diff($main->get_entryfield('L6', 'sortlabelalpha'), 'DSE95', 'maxalphanames=3 minalphanames=1 entry L6 labelalpha'); ok(is_undef($main->get_extraalphadata_for_key('L6')), 'maxalphanames=3 minalphanames=1 entry L6 extraalpha'); eq_or_diff($main->get_entryfield('L7', 'sortlabelalpha'), 'DSJ95', 'maxalphanames=3 minalphanames=1 entry L7 labelalpha'); ok(is_undef($main->get_extraalphadata_for_key('L7')), 'maxalphanames=3 minalphanames=1 entry L7 extraalpha'); eq_or_diff($main->get_entryfield('L8', 'sortlabelalpha'), 'Sha85', 'maxalphanames=3 minalphanames=1 entry L8 labelalpha'); ok(is_undef($main->get_extraalphadata_for_key('L8')), 'maxalphanames=3 minalphanames=1 entry L8 extraalpha'); eq_or_diff($main->get_entryfield('LDN1', 'sortlabelalpha'), 'VUR89', 'Testing compound lastnames 1'); eq_or_diff($main->get_entryfield('LDN2', 'sortlabelalpha'), 'VU45', 'Testing compound lastnames 2'); eq_or_diff($main->get_entryfield('LDN3', 'sortlabelalpha'), 'VisvSJRu45', 'Testing with multiple pre and main and width/side override'); # reset options and regenerate information Biber::Config->setblxoption('maxalphanames', 4); Biber::Config->setblxoption('minalphanames', 4); Biber::Config->setblxoption('maxcitenames', 4); Biber::Config->setblxoption('mincitenames', 4); Biber::Config->setblxoption('labelalpha', 1); Biber::Config->setblxoption('labeldateparts', 1); foreach my $k ($section->get_citekeys) { $bibentries->entry($k)->del_field('sortlabelalpha'); $bibentries->entry($k)->del_field('labelalpha'); $main->set_extraalphadata_for_key($k, undef); } $biber->prepare; my $out = $biber->get_output_obj; $section = $biber->sections->get_section(0); $main = $biber->datalists->get_list('custom/global//global/global'); $bibentries = $section->bibentries; eq_or_diff($main->get_entryfield('L11', 'sortlabelalpha'), 'vRan22', 'prefix labelalpha 1'); eq_or_diff($main->get_entryfield('L12', 'sortlabelalpha'), 'vRvB2', 'prefix labelalpha 2'); # only the first name in the list is in the label due to namecount=1 eq_or_diff($main->get_entryfield('L13', 'sortlabelalpha'), 'vRa+-ksUnV', 'per-type labelalpha 1'); eq_or_diff($main->get_entryfield('L14', 'sortlabelalpha'), 'Alabel-ksUnW', 'per-type labelalpha 2'); eq_or_diff($main->get_entryfield('L15', 'sortlabelalpha'), 'AccBrClim', 'labelalpha disambiguation 1'); eq_or_diff($main->get_entryfield('L16', 'sortlabelalpha'), 'AccBaClim', 'labelalpha disambiguation 2'); eq_or_diff($main->get_entryfield('L16a', 'sortlabelalpha'), 'AccBaClim', 'labelalpha disambiguation 2a'); eq_or_diff($main->get_extraalphadata_for_key('L16'), '1', 'labelalpha disambiguation 2c'); eq_or_diff($main->get_extraalphadata_for_key('L16a'), '2', 'labelalpha disambiguation 2d'); eq_or_diff($main->get_entryfield('L17', 'sortlabelalpha'), 'AckBaClim', 'labelalpha disambiguation 3'); eq_or_diff($main->get_extraalphadata_for_key('L17a'), '2', 'custom labelalpha extradate 1'); eq_or_diff($main->get_entryfield('L18', 'sortlabelalpha'), 'AgChLa', 'labelalpha disambiguation 4'); eq_or_diff($main->get_entryfield('L19', 'sortlabelalpha'), 'AgConLe', 'labelalpha disambiguation 5'); eq_or_diff($main->get_entryfield('L20', 'sortlabelalpha'), 'AgCouLa', 'labelalpha disambiguation 6'); eq_or_diff($main->get_entryfield('L21', 'sortlabelalpha'), 'BoConEdb', 'labelalpha disambiguation 7'); eq_or_diff($main->get_entryfield('L22', 'sortlabelalpha'), 'BoConEm', 'labelalpha disambiguation 8'); eq_or_diff($main->get_entryfield('L23', 'sortlabelalpha'), 'Sa', 'labelalpha disambiguation 9'); # reset options and regenerate information Biber::Config->setblxoption('labelalphatemplate', { labelelement => [ { labelpart => [ { content => "labelname", substring_width => "vf", namessep => "/", substring_fixed_threshold => 2, substring_side => "left" }, ], order => 1, }, ], type => "unpublished", }, 'ENTRYTYPE', 'unpublished'); foreach my $k ($section->get_citekeys) { $bibentries->entry($k)->del_field('sortlabelalpha'); $bibentries->entry($k)->del_field('labelalpha'); $main->set_extraalphadata_for_key($k, undef); } $biber->prepare; $section = $biber->sections->get_section(0); $main = $biber->datalists->get_list('custom/global//global/global'); $bibentries = $section->bibentries; # "Agas" and not "Aga" because the Schmidt/Schnee below need 4 chars to disambiguate eq_or_diff($main->get_entryfield('L18', 'sortlabelalpha'), 'Agas/Cha/Laver', 'labelalpha disambiguation 10'); eq_or_diff($main->get_entryfield('L19', 'sortlabelalpha'), 'Agas/Con/Lendl', 'labelalpha disambiguation 11'); eq_or_diff($main->get_entryfield('L20', 'sortlabelalpha'), 'Agas/Cou/Laver', 'labelalpha disambiguation 12'); # reset options and regenerate information Biber::Config->setblxoption('labelalphatemplate', { labelelement => [ { labelpart => [ { content => "labelname", substring_width => "l", substring_side => "left" }, ], order => 1, }, ], type => "unpublished", }, 'ENTRYTYPE', 'unpublished'); foreach my $k ($section->get_citekeys) { $bibentries->entry($k)->del_field('sortlabelalpha'); $bibentries->entry($k)->del_field('labelalpha'); $main->set_extraalphadata_for_key($k, undef); } $biber->prepare; $section = $biber->sections->get_section(0); $main = $biber->datalists->get_list('custom/global//global/global'); $bibentries = $section->bibentries; eq_or_diff($main->get_entryfield('L18', 'sortlabelalpha'), 'AChL', 'labelalpha list disambiguation 1'); eq_or_diff($main->get_entryfield('L19', 'sortlabelalpha'), 'ACoL', 'labelalpha list disambiguation 2'); eq_or_diff($main->get_entryfield('L20', 'sortlabelalpha'), 'ACL', 'labelalpha list disambiguation 3'); eq_or_diff($main->get_entryfield('L21', 'sortlabelalpha'), 'BCEd', 'labelalpha list disambiguation 4'); eq_or_diff($main->get_entryfield('L22', 'sortlabelalpha'), 'BCE', 'labelalpha list disambiguation 5'); eq_or_diff($main->get_entryfield('L24', 'sortlabelalpha'), 'Z', 'labelalpha list disambiguation 6'); eq_or_diff($main->get_entryfield('L25', 'sortlabelalpha'), 'ZX', 'labelalpha list disambiguation 7'); eq_or_diff($main->get_entryfield('L26', 'sortlabelalpha'), 'ZX', 'labelalpha list disambiguation 8'); eq_or_diff(NFC($main->get_entryfield('title1', 'sortlabelalpha')), 'Tït', 'Title in braces with UTF-8 char - 1'); # reset options and regenerate information Biber::Config->setblxoption('maxalphanames', 3); Biber::Config->setblxoption('minalphanames', 1); Biber::Config->setblxoption('maxcitenames', 3); Biber::Config->setblxoption('mincitenames', 1); Biber::Config->setblxoption('labelalphatemplate', { labelelement => [ { labelpart => [ { content => "shorthand", final => 1 }, { content => "label" }, { content => "labelname", ifnames => 1, substring_side => "left", substring_width => 3, }, { content => "labelname", substring_side => "left", substring_width => 1 }, ], order => 1, }, { labelpart => [ { content => "year", substring_side => "right", substring_width => 2 }, ], order => 2, }, ], type => "global", }); foreach my $k ($section->get_citekeys) { $bibentries->entry($k)->del_field('sortlabelalpha'); $bibentries->entry($k)->del_field('labelalpha'); $main->set_extraalphadata_for_key($k, undef); } $biber->prepare; $section = $biber->sections->get_section(0); $main = $biber->datalists->get_list('custom/global//global/global'); $bibentries = $section->bibentries; eq_or_diff($main->get_entryfield('Schmidt2007', 'sortlabelalpha'), 'Sch+07', 'extraalpha ne extradate 1'); eq_or_diff($main->get_extraalphadata_for_key('Schmidt2007'), '1', 'extraalpha ne extradate 2'); eq_or_diff($main->get_entryfield('Schmidt2007a', 'sortlabelalpha'), 'Sch07', 'extraalpha ne extradate 3'); eq_or_diff($main->get_extraalphadata_for_key('Schmidt2007a'), '1', 'extraalpha ne extradate 4'); eq_or_diff($main->get_entryfield('Schnee2007', 'sortlabelalpha'), 'Sch+07', 'extraalpha ne extradate 5'); eq_or_diff($main->get_extraalphadata_for_key('Schnee2007'), '2', 'extraalpha ne extradate 6'); eq_or_diff($main->get_entryfield('Schnee2007a', 'sortlabelalpha'), 'Sch07', 'extraalpha ne extradate 7'); eq_or_diff($main->get_extraalphadata_for_key('Schnee2007a'), '2', 'extraalpha ne extradate 8'); Biber::Config->setblxoption('labelalphatemplate', { labelelement => [ { labelpart => [ { content => "citekey", substring_side => "left", substring_width => 3, uppercase => 1, }, ], order => 1, }, ], type => "global", }); foreach my $k ($section->get_citekeys) { $bibentries->entry($k)->del_field('sortlabelalpha'); $bibentries->entry($k)->del_field('labelalpha'); $main->set_extraalphadata_for_key($k, undef); } $biber->prepare; $section = $biber->sections->get_section(0); $main = $biber->datalists->get_list('custom/global//global/global'); $bibentries = $section->bibentries; eq_or_diff($main->get_entryfield('Schmidt2007', 'sortlabelalpha'), 'SCH', 'entrykey label 1'); Biber::Config->setblxoption('labelalphatemplate', { labelelement => [ { labelpart => [ { content => "labelyear", } ], order => 1, }, { labelpart => [ { content => "labelmonth", } ], order => 2, }, { labelpart => [ { content => "labelday", } ], order => 3, } ], type => "global", }); foreach my $k ($section->get_citekeys) { $bibentries->entry($k)->del_field('sortlabelalpha'); $bibentries->entry($k)->del_field('labelalpha'); $main->set_extraalphadata_for_key($k, undef); } $biber->prepare; $section = $biber->sections->get_section(0); $main = $biber->datalists->get_list('custom/global//global/global'); $bibentries = $section->bibentries; eq_or_diff($main->get_entryfield('labelstest', 'sortlabelalpha'), '200532', 'labeldate test - 1'); eq_or_diff($main->get_entryfield('padtest', 'labelalpha'), '\&Al\_\_{\textasciitilde}{\textasciitilde}T07', 'pad test - 1'); eq_or_diff($main->get_entryfield('padtest', 'sortlabelalpha'), '&Al__~~T07', 'pad test - 2'); my $lant = Biber::Config->getblxoption('labelalphanametemplate'); $lant->{global} = [ { namepart => "prefix", pre => 1, substring_compound => 1, substring_width => 2, use => 1, }, { namepart => "family", pre => undef, substring_compound => 1, substring_width => undef, use => undef, }]; Biber::Config->setblxoption('labelalphanametemplate', $lant); Biber::Config->setblxoption('labelalphatemplate', { labelelement => [ { labelpart => [ { content => "author", ifnames => 1, substring_side => "left", substring_width => 3, }, ], order => 1, }, { labelpart => [ { content => "title", substring_side => "left", substring_width => 4, }, ], order => 2, }, ], type => "global", }); foreach my $k ($section->get_citekeys) { $bibentries->entry($k)->del_field('sortlabelalpha'); $bibentries->entry($k)->del_field('labelalpha'); $main->set_extraalphadata_for_key($k, undef); } # The "o"s are ignored for width substring calculation - take note Biber::Config->setoption('nolabelwidthcount', [ {value => q/o+/} ] ); $biber->prepare; $section = $biber->sections->get_section(0); $main = $biber->datalists->get_list('custom/global//global/global'); $bibentries = $section->bibentries; eq_or_diff($main->get_entryfield('skipwidthtest1', 'sortlabelalpha'), 'OToolOToole', 'Skip width test - 1'); eq_or_diff($main->get_entryfield('prefix1', 'sortlabelalpha'), 'vadeVaaThin', 'compound and string length entry prefix1 labelalpha'); Biber::Config->setblxoption('labelalphatemplate', { labelelement => [ { labelpart => [ { content => "author", names => "2-7" }, ], order => 1, }, { labelpart => [ { content => ".", }, ], order => 2, }, { labelpart => [ { content => "editor", names => "--3" }, ], order => 3, }, { labelpart => [ { content => ".", }, ], order => 4, }, { labelpart => [ { content => "translator", names => "2", noalphaothers => "1" }, ], order => 5, }, { labelpart => [ { content => ".", }, ], order => 6, }, { labelpart => [ { content => "foreword", names => "3--" }, ], order => 7, }, { labelpart => [ { content => ".", }, ], order => 8, }, { labelpart => [ { content => "holder", names => "2-+" }, ], order => 9, }, ], type => "global", }); Biber::Config->setblxoption('minalphanames', 2); foreach my $k ($section->get_citekeys) { $bibentries->entry($k)->del_field('sortlabelalpha'); $bibentries->entry($k)->del_field('labelalpha'); $main->set_extraalphadata_for_key($k, undef); } $biber->prepare; $section = $biber->sections->get_section(0); $main = $biber->datalists->get_list('custom/global//global/global'); $bibentries = $section->bibentries; eq_or_diff($main->get_entryfield('rangetest1', 'sortlabelalpha'), 'WAXAYAZA.VEWEXE+.VTWT.XFYFZF.WH+', 'Name range test - 1'); Biber::Config->setblxoption('labelalphatemplate', { labelelement => [ { labelpart => [ { content => "author", ifnames => "3-", substring_side => "left", substring_width => 1, }, ], order => 1, }, { labelpart => [ { content => ".", }, ], order => 2, }, { labelpart => [ { content => "editor", ifnames => "-2", substring_side => "left", substring_width => 1, }, ], order => 3, }, { labelpart => [ { content => ".", }, ], order => 4, }, { labelpart => [ { content => "translator", ifnames => "4-6", namessep => "/", substring_side => "left", substring_width => 1, }, ], order => 5, }, ], type => "global", }); Biber::Config->setblxoption('maxalphanames', 10); Biber::Config->setblxoption('minalphanames', 10); foreach my $k ($section->get_citekeys) { $bibentries->entry($k)->del_field('sortlabelalpha'); $bibentries->entry($k)->del_field('labelalpha'); $main->set_extraalphadata_for_key($k, undef); } $biber->prepare; $section = $biber->sections->get_section(0); $main = $biber->datalists->get_list('custom/global//global/global'); $bibentries = $section->bibentries; eq_or_diff($main->get_entryfield('rangetest1', 'sortlabelalpha'), 'VWXYZ..V/W/X/Y/Z', 'Name range test - 2'); biblatex-biber-2.9/t/encoding.t000444000153000001 3314413205066062 16101 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 10; use Test::Differences; unified_diff; use Biber; use Biber::Utils; use Biber::Output::test; use Encode; use Log::Log4perl; use Unicode::Normalize; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); my $encode1 = q| \entry{testŠ}{book}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=06a47edae2e847800cfd78323a0e6be8}{% family={Encalcer}, familyi={E\bibinitperiod}, given={Edward}, giveni={E\bibinitperiod}, givenun=0}}% } \list{publisher}{1}{% {A press}% } \strng{namehash}{06a47edae2e847800cfd78323a0e6be8} \strng{fullhash}{06a47edae2e847800cfd78323a0e6be8} \strng{bibnamehash}{06a47edae2e847800cfd78323a0e6be8} \strng{authorbibnamehash}{06a47edae2e847800cfd78323a0e6be8} \strng{authornamehash}{06a47edae2e847800cfd78323a0e6be8} \strng{authorfullhash}{06a47edae2e847800cfd78323a0e6be8} \field{labelalpha}{Enc99} \field{sortinit}{E} \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e} \field{labeldatesource}{year} \true{singletitle} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{Šome title} \field{year}{1999} \endentry |; my $encode2 = q| \entry{test1}{book}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=06a47edae2e847800cfd78323a0e6be8}{% family={Encalcer}, familyi={E\bibinitperiod}, given={Edward}, giveni={E\bibinitperiod}, givenun=0}}% } \list{publisher}{1}{% {A press}% } \strng{namehash}{06a47edae2e847800cfd78323a0e6be8} \strng{fullhash}{06a47edae2e847800cfd78323a0e6be8} \strng{bibnamehash}{06a47edae2e847800cfd78323a0e6be8} \strng{authorbibnamehash}{06a47edae2e847800cfd78323a0e6be8} \strng{authornamehash}{06a47edae2e847800cfd78323a0e6be8} \strng{authorfullhash}{06a47edae2e847800cfd78323a0e6be8} \field{labelalpha}{Enc99} \field{sortinit}{E} \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e} \field{labeldatesource}{year} \true{singletitle} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{Söme title} \field{year}{1999} \endentry |; my $encode3 = q| \entry{test1}{book}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=06a47edae2e847800cfd78323a0e6be8}{% family={Encalcer}, familyi={E\bibinitperiod}, given={Edward}, giveni={E\bibinitperiod}, givenun=0}}% } \list{publisher}{1}{% {A press}% } \strng{namehash}{06a47edae2e847800cfd78323a0e6be8} \strng{fullhash}{06a47edae2e847800cfd78323a0e6be8} \strng{bibnamehash}{06a47edae2e847800cfd78323a0e6be8} \strng{authorbibnamehash}{06a47edae2e847800cfd78323a0e6be8} \strng{authornamehash}{06a47edae2e847800cfd78323a0e6be8} \strng{authorfullhash}{06a47edae2e847800cfd78323a0e6be8} \field{labelalpha}{Enc99} \field{sortinit}{E} \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e} \field{labeldatesource}{year} \true{singletitle} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{Żome title} \field{year}{1999} \endentry |; my $encode5 = q| \entry{test}{book}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=06a47edae2e847800cfd78323a0e6be8}{% family={Encalcer}, familyi={E\bibinitperiod}, given={Edward}, giveni={E\bibinitperiod}, givenun=0}}% } \list{publisher}{1}{% {A press}% } \strng{namehash}{06a47edae2e847800cfd78323a0e6be8} \strng{fullhash}{06a47edae2e847800cfd78323a0e6be8} \strng{bibnamehash}{06a47edae2e847800cfd78323a0e6be8} \strng{authorbibnamehash}{06a47edae2e847800cfd78323a0e6be8} \strng{authornamehash}{06a47edae2e847800cfd78323a0e6be8} \strng{authorfullhash}{06a47edae2e847800cfd78323a0e6be8} \field{labelalpha}{Enc99} \field{sortinit}{E} \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e} \field{labeldatesource}{year} \true{singletitle} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{à titlé} \field{year}{1999} \endentry |; my $encode6 = q| \entry{test}{book}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=06a47edae2e847800cfd78323a0e6be8}{% family={Encalcer}, familyi={E\bibinitperiod}, given={Edward}, giveni={E\bibinitperiod}, givenun=0}}% } \list{publisher}{1}{% {A press}% } \strng{namehash}{06a47edae2e847800cfd78323a0e6be8} \strng{fullhash}{06a47edae2e847800cfd78323a0e6be8} \strng{bibnamehash}{06a47edae2e847800cfd78323a0e6be8} \strng{authorbibnamehash}{06a47edae2e847800cfd78323a0e6be8} \strng{authornamehash}{06a47edae2e847800cfd78323a0e6be8} \strng{authorfullhash}{06a47edae2e847800cfd78323a0e6be8} \field{labelalpha}{Enc99} \field{sortinit}{E} \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e} \field{labeldatesource}{year} \true{singletitle} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{↑\`{a} titl\'{e}} \field{year}{1999} \endentry |; my $encode7 = q| \entry{test}{book}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=06a47edae2e847800cfd78323a0e6be8}{% family={Encalcer}, familyi={E\bibinitperiod}, given={Edward}, giveni={E\bibinitperiod}, givenun=0}}% } \list{publisher}{1}{% {A press}% } \strng{namehash}{06a47edae2e847800cfd78323a0e6be8} \strng{fullhash}{06a47edae2e847800cfd78323a0e6be8} \strng{bibnamehash}{06a47edae2e847800cfd78323a0e6be8} \strng{authorbibnamehash}{06a47edae2e847800cfd78323a0e6be8} \strng{authornamehash}{06a47edae2e847800cfd78323a0e6be8} \strng{authorfullhash}{06a47edae2e847800cfd78323a0e6be8} \field{labelalpha}{Enc99} \field{sortinit}{E} \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e} \field{labeldatesource}{year} \true{singletitle} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{{$\uparrow$}\`{a} titl\'{e}} \field{year}{1999} \endentry |; my $outvar; my $output; # Latin9 .bib -> UTF-8 .bbl $biber->parse_ctrlfile('encoding1.bcf'); $biber->set_output_obj(Biber::Output::test->new()); # Biber options Biber::Config->setoption('input_encoding', 'latin9'); Biber::Config->setoption('output_encoding', 'UTF-8'); # Now generate the information $biber->prepare; # Get reference to output object $output = $biber->get_output_obj; $output->set_output_target($output->set_output_target_file(\$outvar)); # Write the output to the target $output->output; eq_or_diff($outvar, encode(Biber::Config->getoption('output_encoding'), $encode1), 'latin9 .bib -> UTF-8 .bbl'); # UTF-8 .bib -> UTF-8 .bbl $biber->parse_ctrlfile('encoding2.bcf'); $biber->set_output_obj(Biber::Output::test->new()); # Biber options Biber::Config->setoption('input_encoding', 'UTF-8'); Biber::Config->setoption('output_encoding', 'UTF-8'); # Now generate the information $biber->prepare; # Get reference to output object $output = $biber->get_output_obj; $output->set_output_target($output->set_output_target_file(\$outvar)); # Write the output to the target $output->output; eq_or_diff($outvar, encode(Biber::Config->getoption('output_encoding'), $encode1), 'UTF-8 .bib -> UTF-8 .bbl'); # UTF-8 .bib -> latin1 .bbl $biber->parse_ctrlfile('encoding5.bcf'); $biber->set_output_obj(Biber::Output::test->new()); # Biber options Biber::Config->setoption('input_encoding', 'UTF-8'); Biber::Config->setoption('output_encoding', 'latin1'); # Now generate the information $biber->prepare; # Get reference to output object $output = $biber->get_output_obj; $output->set_output_target($output->set_output_target_file(\$outvar)); # Write the output to the target $output->output; eq_or_diff($outvar, encode(Biber::Config->getoption('output_encoding'), $encode5), 'UTF-8 .bib -> latin1 .bbl'); # UTF-8 .bib -> UTF-8 with --output_safechars $biber->parse_ctrlfile('encoding6.bcf'); $biber->set_output_obj(Biber::Output::test->new()); # Biber options Biber::Config->setoption('input_encoding', 'UTF-8'); Biber::Config->setoption('output_encoding', 'UTF-8'); Biber::Config->setoption('output_safechars', 1); # Now generate the information $biber->prepare; # Get reference to output object $output = $biber->get_output_obj; $output->set_output_target($output->set_output_target_file(\$outvar)); # Write the output to the target $output->output; eq_or_diff($outvar, encode(Biber::Config->getoption('output_encoding'), $encode6), 'UTF-8 .bib -> UTF-8 .bbl, safechars'); # UTF-8 .bib -> UTF-8 with --output_safechars and --bblcharsset=full $biber->parse_ctrlfile('encoding6.bcf'); $biber->set_output_obj(Biber::Output::test->new()); # Biber options Biber::Config->setoption('input_encoding', 'UTF-8'); Biber::Config->setoption('output_encoding', 'UTF-8'); Biber::Config->setoption('output_safechars', 1); Biber::LaTeX::Recode->init_sets('full', 'full'); # Need to do this to reset # Now generate the information $biber->prepare; # Get reference to output object $output = $biber->get_output_obj; $output->set_output_target($output->set_output_target_file(\$outvar)); # Write the output to the target $output->output; eq_or_diff($outvar, encode(Biber::Config->getoption('output_encoding'), $encode7), 'UTF-8 .bib -> UTF-8 .bbl, output_safecharsset=full'); # UTF-8 .bib -> Latin9 .bbl $biber->parse_ctrlfile('encoding2.bcf'); $biber->set_output_obj(Biber::Output::test->new()); # Biber options Biber::Config->setoption('output_safechars', 0); Biber::Config->setoption('input_encoding', 'UTF-8'); Biber::Config->setoption('output_encoding', 'latin9'); # Now generate the information $biber->prepare; # Get reference to output object $output = $biber->get_output_obj; $output->set_output_target($output->set_output_target_file(\$outvar)); # Write the output to the target $output->output; eq_or_diff($outvar, encode(Biber::Config->getoption('output_encoding'), $encode1), 'UTF-8 .bib -> latin9 .bbl'); # latin1 .bib -> cp1252 .bbl $biber->parse_ctrlfile('encoding3.bcf'); $biber->set_output_obj(Biber::Output::test->new()); # Biber options Biber::Config->setoption('input_encoding', 'latin1'); Biber::Config->setoption('output_encoding', 'cp1252'); # Now generate the information $biber->prepare; # Get reference to output object $output = $biber->get_output_obj; $output->set_output_target($output->set_output_target_file(\$outvar)); # Write the output to the target $output->output; eq_or_diff($outvar, encode(Biber::Config->getoption('output_encoding'), $encode2), 'latin1 .bib -> CP1252 .bbl'); # latin2 .bib -> latin3 .bbl $biber->parse_ctrlfile('encoding4.bcf'); $biber->set_output_obj(Biber::Output::test->new()); # Biber options Biber::Config->setoption('input_encoding', 'latin2'); Biber::Config->setoption('output_encoding', 'latin3'); # Now generate the information $biber->prepare; # Get reference to output object $output = $biber->get_output_obj; $output->set_output_target($output->set_output_target_file(\$outvar)); # Write the output to the target $output->output; eq_or_diff($outvar, encode(Biber::Config->getoption('output_encoding'), $encode3), 'latin2 .bib -> latin3 .bbl'); # latin2 .bib -> latin1 .bbl - should fail $biber->parse_ctrlfile('encoding4.bcf'); $biber->set_output_obj(Biber::Output::test->new()); # Biber options Biber::Config->setoption('input_encoding', 'latin2'); Biber::Config->setoption('output_encoding', 'latin1'); # Now generate the information $biber->prepare; # Get reference to output object $output = $biber->get_output_obj; $output->set_output_target($output->set_output_target_file(\$outvar)); # Write the output to the target # This test will generate encoding errors so redirect STDERR until it's done open OLDERR, '>&', \*STDERR; open STDERR, '>', '/dev/null'; $output->output; open STDERR, '>&', \*OLDERR; isnt($outvar, encode(Biber::Config->getoption('output_encoding'), $encode3), 'latin2 .bib -> latin1 .bbl failure'); # Custom encoding alias # latin1 .bib -> applemacce (MacRoman) .bbl $biber->parse_ctrlfile('encoding3.bcf'); $biber->set_output_obj(Biber::Output::test->new()); # Biber options Biber::Config->setoption('input_encoding', 'latin1'); Biber::Config->setoption('output_encoding', 'applemacce'); # Now generate the information $biber->prepare; # Get reference to output object $output = $biber->get_output_obj; $output->set_output_target($output->set_output_target_file(\$outvar)); # Write the output to the target $output->output; eq_or_diff($outvar, encode(Biber::Config->getoption('output_encoding'), $encode2), 'latin1 .bib -> applemacce (custom alias) .bbl'); biblatex-biber-2.9/t/datalists.t000444000153000001 3370113205066061 16301 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 15; use Test::Differences; unified_diff; use Biber; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata"); my $S; # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('datalists.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); my $main = $biber->datalists->get_lists_by_attrs(section => 0, name => 'lname', type => 'entry', sortingtemplatename => 'lname', sortingnamekeytemplatename => 'given', labelprefix => '', uniquenametemplatename => 'global', labelalphanametemplatename => 'global')->[0]; # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests Biber::Config->setoption('bcf', 'datalists.bcf'); # (re)generate informtion based on option settings $biber->prepare; my $section = $biber->sections->get_section(0); my $out = $biber->get_output_obj; is_deeply($biber->datalists->get_lists_by_attrs(section => 0, name => 'lname', type => 'entry', sortingtemplatename => 'lname', sortingnamekeytemplatename => 'global', labelprefix => '', uniquenametemplatename => 'global', labelalphanametemplatename => 'global')->[0]->get_keys, ['K11', 'K1', 'K2', 'K4', 'K3', 'K7', 'K8', 'K9', 'K10', 'K12', 'K5', 'K6'], 'List - name order'); is_deeply($biber->datalists->get_lists_by_attrs(section => 0, name => 'lyear', type => 'entry', sortingtemplatename => 'lyeard', sortingnamekeytemplatename => 'global', labelprefix => '', uniquenametemplatename => 'global', labelalphanametemplatename => 'global')->[0]->get_keys, ['K8', 'K9', 'K10', 'K4', 'K1', 'K11', 'K12', 'K2', 'K3', 'K6', 'K5', 'K7'], 'List - year order'); is_deeply($biber->datalists->get_lists_by_attrs(section => 0, name => 'ltitle', type => 'entry', sortingtemplatename => 'ltitle', sortingnamekeytemplatename => 'global', labelprefix => '', uniquenametemplatename => 'global', labelalphanametemplatename => 'global')->[0]->get_keys, ['K1', 'K7', 'K8', 'K9', 'K4', 'K10', 'K2', 'K11', 'K6', 'K5', 'K12', 'K3'], 'List - title order'); is_deeply($biber->datalists->get_lists_by_attrs(section => 0, name => 'lnamef1', type => 'entry', sortingtemplatename => 'lname', sortingnamekeytemplatename => 'global', labelprefix => '', uniquenametemplatename => 'global', labelalphanametemplatename => 'global')->[0]->get_keys, ['K11', 'K2', 'K4', 'K12', 'K5', 'K6'], 'List - name order (filtered) - 1'); is_deeply($biber->datalists->get_lists_by_attrs(section => 0, name => 'lnamef2', type => 'entry', sortingtemplatename => 'lname', sortingnamekeytemplatename => 'global', labelprefix => '', uniquenametemplatename => 'global', labelalphanametemplatename => 'global')->[0]->get_keys, ['K4'], 'List - name order (filtered) - 2'); is_deeply($biber->datalists->get_lists_by_attrs(section => 0, name => 'lnamef3', type => 'entry', sortingtemplatename => 'lname', sortingnamekeytemplatename => 'global', labelprefix => '', uniquenametemplatename => 'global', labelalphanametemplatename => 'global')->[0]->get_keys, ['K11', 'K1', 'K2', 'K7', 'K12', 'K5', 'K6'], 'List - name order (filtered) - 3'); is_deeply($biber->datalists->get_lists_by_attrs(section => 0, name => 'lnamef4', type => 'entry', sortingtemplatename => 'lname', sortingnamekeytemplatename => 'global', labelprefix => '', uniquenametemplatename => 'global', labelalphanametemplatename => 'global')->[0]->get_keys, ['K3'], 'List - name order (filtered) - 4'); is_deeply($biber->datalists->get_lists_by_attrs(section => 0, name => 'lnamef5', type => 'entry', sortingtemplatename => 'lname', sortingnamekeytemplatename => 'global', labelprefix => '', uniquenametemplatename => 'global', labelalphanametemplatename => 'global')->[0]->get_keys, ['K1', 'K3'], 'List - name order (filtered) - 5'); # Test list-local locale sorting is_deeply($biber->datalists->get_lists_by_attrs(section => 0, name => 'lnameswe', type => 'entry', sortingtemplatename => 'lnameswe', sortingnamekeytemplatename => 'global', labelprefix => '', uniquenametemplatename => 'global', labelalphanametemplatename => 'global')->[0]->get_keys, ['K11', 'K1', 'K2', 'K4', 'K3', 'K7', 'K8', 'K9', 'K10', 'K12', 'K6', 'K5'], 'List - name order (swedish)'); is_deeply($biber->datalists->get_lists_by_attrs(section => 0, name => 'ltitlespan', type => 'entry', sortingtemplatename => 'ltitlespan', sortingnamekeytemplatename => 'global', labelprefix => '', uniquenametemplatename => 'global', labelalphanametemplatename => 'global')->[0]->get_keys, ['K1', 'K4', 'K10', 'K7', 'K8', 'K9', 'K2', 'K11', 'K6', 'K5', 'K12', 'K3'], 'List - title order (spanish)'); # Test sortset-local locale sorting is_deeply($biber->datalists->get_lists_by_attrs(section => 0, name => 'ltitleset', type => 'entry', sortingtemplatename => 'ltitleset', sortingnamekeytemplatename => 'global', labelprefix => '', uniquenametemplatename => 'global', labelalphanametemplatename => 'global')->[0]->get_keys, ['K1', 'K7', 'K9', 'K8', 'K4', 'K10', 'K2', 'K11', 'K6', 'K5', 'K12', 'K3'], 'List - granular locale (spanish)'); # Testing sorting name key templates # Note that: # * K6 has an entry scope override which makes it sort with family first despite the # 'given' name key template using the given name first. # * K11 has a name list scope override which forces "a" literal first # * K12 has a name scope override which forces "Z" literal first is_deeply($biber->datalists->get_lists_by_attrs(section => 0, name => 'lname', type => 'entry', sortingtemplatename => 'lname', sortingnamekeytemplatename => 'given', labelprefix => '', uniquenametemplatename => 'global', labelalphanametemplatename => 'global')->[0]->get_keys, ['K11', 'K1', 'K2', 'K4', 'K3', 'K7', 'K5', 'K8', 'K9', 'K10', 'K12', 'K6'], 'List - sorting name key templates - 1'); my $K11 = q| \entry{K11}{book}{} \name{author}{1}{sortingnamekeytemplatename=snk1}{% {{hash=4edc280a0ef229f9c061e3b121b17482}{% family={Xanax}, familyi={X\bibinitperiod}, given={Xavier}, giveni={X\bibinitperiod}}}% } \list{location}{1}{% {Moscow}% } \list{publisher}{1}{% {Publisher}% } \strng{namehash}{4edc280a0ef229f9c061e3b121b17482} \strng{fullhash}{4edc280a0ef229f9c061e3b121b17482} \strng{bibnamehash}{4edc280a0ef229f9c061e3b121b17482} \strng{authorbibnamehash}{4edc280a0ef229f9c061e3b121b17482} \strng{authornamehash}{4edc280a0ef229f9c061e3b121b17482} \strng{authorfullhash}{4edc280a0ef229f9c061e3b121b17482} \field{sortinit}{a} \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{One} \field{year}{1983} \field{dateera}{ce} \endentry |; my $K12 = q| \entry{K12}{book}{} \name{author}{1}{}{% {{sortingnamekeytemplatename=snk2,hash=a846a485fc9cbb59b0ebeedd6ac637e4}{% family={Allen}, familyi={A\bibinitperiod}, given={Arthur}, giveni={A\bibinitperiod}}}% } \list{location}{1}{% {Moscow}% } \list{publisher}{1}{% {Publisher}% } \strng{namehash}{a846a485fc9cbb59b0ebeedd6ac637e4} \strng{fullhash}{a846a485fc9cbb59b0ebeedd6ac637e4} \strng{bibnamehash}{a846a485fc9cbb59b0ebeedd6ac637e4} \strng{authorbibnamehash}{a846a485fc9cbb59b0ebeedd6ac637e4} \strng{authornamehash}{a846a485fc9cbb59b0ebeedd6ac637e4} \strng{authorfullhash}{a846a485fc9cbb59b0ebeedd6ac637e4} \field{sortinit}{Z} \field{sortinithash}{156173bd08b075d7295bc3e0f4735a04} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{Two} \field{year}{1983} \field{dateera}{ce} \endentry |; eq_or_diff($out->get_output_entry('K11', $main), $K11, 'datalist output - 1'); eq_or_diff($out->get_output_entry('K12', $main), $K12, 'datalist output - 2'); # Testing dates is_deeply($biber->datalists->get_lists_by_attrs(section => 1, name => 'ldates', type => 'entry', sortingtemplatename => 'lyear', sortingnamekeytemplatename => 'global', labelprefix => '', uniquenametemplatename => 'global', labelalphanametemplatename => 'global')->[0]->get_keys, ['D3', 'D2', 'D1', 'D5', 'D4'], 'List - dates'); biblatex-biber-2.9/t/crossrefs.t000444000153000001 10024413205066062 16340 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 37; use Test::Differences; unified_diff; use Biber; use Biber::Constants; use Biber::Output::bbl; use Log::Log4perl; use Capture::Tiny qw(capture); use Biber::Utils; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); # Note stderr is output here so we can capture it and do a cyclic crossref test my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 1 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('crossrefs.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests $DATAFIELD_SETS{'nobtitle'} = ['booktitle']; # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); Biber::Config->setoption('nodieonerror', 1); # because there is a failing cyclic crossref check # Now generate the information my (undef, $stderr) = capture { $biber->prepare }; my $section0 = $biber->sections->get_section(0); my $main = $biber->datalists->get_list('nty/global//global/global'); my $section1 = $biber->sections->get_section(1); my $out = $biber->get_output_obj; # crossref field is included as the parent is included by being crossrefed >= mincrossrefs times my $cr1 = q| \entry{cr1}{inbook}{} \name{author}{1}{}{% {{hash=121b6dc164b5b619c81c670fbd823f12}{% family={Gullam}, familyi={G\bibinitperiod}, given={Graham}, giveni={G\bibinitperiod}}}% } \name{editor}{1}{}{% {{hash=c129df5593fdaa7475548811bfbb227d}{% family={Erbriss}, familyi={E\bibinitperiod}, given={Edgar}, giveni={E\bibinitperiod}}}% } \list{publisher}{1}{% {Grimble}% } \strng{namehash}{121b6dc164b5b619c81c670fbd823f12} \strng{fullhash}{121b6dc164b5b619c81c670fbd823f12} \strng{bibnamehash}{121b6dc164b5b619c81c670fbd823f12} \strng{authorbibnamehash}{121b6dc164b5b619c81c670fbd823f12} \strng{authornamehash}{121b6dc164b5b619c81c670fbd823f12} \strng{authorfullhash}{121b6dc164b5b619c81c670fbd823f12} \strng{editorbibnamehash}{c129df5593fdaa7475548811bfbb227d} \strng{editornamehash}{c129df5593fdaa7475548811bfbb227d} \strng{editorfullhash}{c129df5593fdaa7475548811bfbb227d} \field{sortinit}{G} \field{sortinithash}{5e8d2bf9d38de41b1528bd307546008f} \true{singletitle} \true{uniquetitle} \true{uniquework} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{booktitle}{Graphs of the Continent} \strng{crossref}{cr_m} \field{eprintclass}{SOMECLASS} \field{eprinttype}{SomEPrFiX} \field{origyear}{1955} \field{title}{Great and Good Graphs} \field{year}{1974} \field{origdateera}{ce} \endentry |; # crossref field is included as the parent is included by being crossrefed >= mincrossrefs times my $cr2 = q| \entry{cr2}{inbook}{} \name{author}{1}{}{% {{hash=2d51a96bc0a6804995b3a9ff350c3384}{% family={Fumble}, familyi={F\bibinitperiod}, given={Frederick}, giveni={F\bibinitperiod}}}% } \name{editor}{1}{}{% {{hash=c129df5593fdaa7475548811bfbb227d}{% family={Erbriss}, familyi={E\bibinitperiod}, given={Edgar}, giveni={E\bibinitperiod}}}% } \list{institution}{1}{% {Institution}% } \list{publisher}{1}{% {Grimble}% } \strng{namehash}{2d51a96bc0a6804995b3a9ff350c3384} \strng{fullhash}{2d51a96bc0a6804995b3a9ff350c3384} \strng{bibnamehash}{2d51a96bc0a6804995b3a9ff350c3384} \strng{authorbibnamehash}{2d51a96bc0a6804995b3a9ff350c3384} \strng{authornamehash}{2d51a96bc0a6804995b3a9ff350c3384} \strng{authorfullhash}{2d51a96bc0a6804995b3a9ff350c3384} \strng{editorbibnamehash}{c129df5593fdaa7475548811bfbb227d} \strng{editornamehash}{c129df5593fdaa7475548811bfbb227d} \strng{editorfullhash}{c129df5593fdaa7475548811bfbb227d} \field{sortinit}{F} \field{sortinithash}{669c706c6f1fbf3b5a83d26f1d9e9e72} \true{singletitle} \true{uniquetitle} \true{uniquework} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{booktitle}{Graphs of the Continent} \strng{crossref}{cr_m} \field{origyear}{1943} \field{title}{Fabulous Fourier Forms} \field{year}{1974} \field{origdateera}{ce} \endentry |; # This is included as it is crossrefed >= mincrossrefs times Notice lack of # singletitle, labelname and labelname hashes because the only name is # EDITOR and useeditor is false This is also why there is no # \true{uniquework} my $cr_m = q| \entry{cr_m}{book}{} \name{editor}{1}{}{% {{hash=c129df5593fdaa7475548811bfbb227d}{% family={Erbriss}, familyi={E\bibinitperiod}, given={Edgar}, giveni={E\bibinitperiod}}}% } \list{publisher}{1}{% {Grimble}% } \strng{editorbibnamehash}{c129df5593fdaa7475548811bfbb227d} \strng{editornamehash}{c129df5593fdaa7475548811bfbb227d} \strng{editorfullhash}{c129df5593fdaa7475548811bfbb227d} \field{sortinit}{G} \field{sortinithash}{5e8d2bf9d38de41b1528bd307546008f} \true{crossrefsource} \true{uniquetitle} \field{labeltitlesource}{title} \field{title}{Graphs of the Continent} \field{year}{1974} \endentry |; # crossref field is included as the parent is cited my $cr3 = q| \entry{cr3}{inbook}{} \name{author}{1}{}{% {{hash=2baf676a220704f6914223aefccaaa88}{% family={Aptitude}, familyi={A\bibinitperiod}, given={Arthur}, giveni={A\bibinitperiod}}}% } \name{editor}{1}{}{% {{hash=a1f5c22413396d599ec766725b226735}{% family={Monkley}, familyi={M\bibinitperiod}, given={Mark}, giveni={M\bibinitperiod}}}% } \list{publisher}{1}{% {Rancour}% } \strng{namehash}{2baf676a220704f6914223aefccaaa88} \strng{fullhash}{2baf676a220704f6914223aefccaaa88} \strng{bibnamehash}{2baf676a220704f6914223aefccaaa88} \strng{authorbibnamehash}{2baf676a220704f6914223aefccaaa88} \strng{authornamehash}{2baf676a220704f6914223aefccaaa88} \strng{authorfullhash}{2baf676a220704f6914223aefccaaa88} \strng{editorbibnamehash}{a1f5c22413396d599ec766725b226735} \strng{editornamehash}{a1f5c22413396d599ec766725b226735} \strng{editorfullhash}{a1f5c22413396d599ec766725b226735} \field{sortinit}{A} \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b} \true{singletitle} \true{uniquetitle} \true{uniquework} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{booktitle}{Beasts of the Burbling Burns} \strng{crossref}{crt} \field{eprinttype}{sometype} \field{origyear}{1934} \field{title}{Arrangements of All Articles} \field{year}{1996} \field{origdateera}{ce} \endentry |; # No crossref field as parent is not cited (mincrossrefs < 2) my $cr4 = q| \entry{cr4}{inbook}{} \name{author}{1}{}{% {{hash=50ef7fd3a1be33bccc5de2768b013836}{% family={Mumble}, familyi={M\bibinitperiod}, given={Morris}, giveni={M\bibinitperiod}}}% } \name{editor}{1}{}{% {{hash=6ea89bd4958743a20b70fe17647d6af5}{% family={Jermain}, familyi={J\bibinitperiod}, given={Jeremy}, giveni={J\bibinitperiod}}}% } \list{publisher}{1}{% {Pillsbury}% } \strng{namehash}{50ef7fd3a1be33bccc5de2768b013836} \strng{fullhash}{50ef7fd3a1be33bccc5de2768b013836} \strng{bibnamehash}{50ef7fd3a1be33bccc5de2768b013836} \strng{authorbibnamehash}{50ef7fd3a1be33bccc5de2768b013836} \strng{authornamehash}{50ef7fd3a1be33bccc5de2768b013836} \strng{authorfullhash}{50ef7fd3a1be33bccc5de2768b013836} \strng{editorbibnamehash}{6ea89bd4958743a20b70fe17647d6af5} \strng{editornamehash}{6ea89bd4958743a20b70fe17647d6af5} \strng{editorfullhash}{6ea89bd4958743a20b70fe17647d6af5} \field{sortinit}{M} \field{sortinithash}{cfd219b90152c06204fab207bc6c7cab} \true{singletitle} \true{uniquetitle} \true{uniquework} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{booktitle}{Vanquished, Victor, Vandal} \field{origyear}{1911} \field{title}{Enterprising Entities} \field{year}{1945} \field{origdateera}{ce} \endentry |; # cited as normal # No singletitle as useeditor is false my $crt = q| \entry{crt}{book}{} \name{editor}{1}{}{% {{hash=a1f5c22413396d599ec766725b226735}{% family={Monkley}, familyi={M\bibinitperiod}, given={Mark}, giveni={M\bibinitperiod}}}% } \list{publisher}{1}{% {Rancour}% } \strng{editorbibnamehash}{a1f5c22413396d599ec766725b226735} \strng{editornamehash}{a1f5c22413396d599ec766725b226735} \strng{editorfullhash}{a1f5c22413396d599ec766725b226735} \field{sortinit}{B} \field{sortinithash}{276475738cc058478c1677046f857703} \true{uniquetitle} \field{labeltitlesource}{title} \field{title}{Beasts of the Burbling Burns} \field{year}{1996} \endentry |; # various event fields inherited correctly my $cr6 = q| \entry{cr6}{inproceedings}{} \name{author}{1}{}{% {{hash=8ab39ee68c55046dc1f05d657fcefed9}{% family={Author}, familyi={A\bibinitperiod}, given={Firstname}, giveni={F\bibinitperiod}}}% } \name{editor}{1}{}{% {{hash=344a7f427fb765610ef96eb7bce95257}{% family={Editor}, familyi={E\bibinitperiod}}}% } \list{location}{1}{% {Address}% } \strng{namehash}{8ab39ee68c55046dc1f05d657fcefed9} \strng{fullhash}{8ab39ee68c55046dc1f05d657fcefed9} \strng{bibnamehash}{8ab39ee68c55046dc1f05d657fcefed9} \strng{authorbibnamehash}{8ab39ee68c55046dc1f05d657fcefed9} \strng{authornamehash}{8ab39ee68c55046dc1f05d657fcefed9} \strng{authorfullhash}{8ab39ee68c55046dc1f05d657fcefed9} \strng{editorbibnamehash}{344a7f427fb765610ef96eb7bce95257} \strng{editornamehash}{344a7f427fb765610ef96eb7bce95257} \strng{editorfullhash}{344a7f427fb765610ef96eb7bce95257} \field{sortinit}{A} \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b} \true{uniquetitle} \true{uniquework} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{booktitle}{Manual booktitle} \field{eventday}{21} \field{eventendday}{24} \field{eventendmonth}{8} \field{eventendyear}{2009} \field{eventmonth}{8} \field{eventtitle}{Title of the event} \field{eventyear}{2009} \field{title}{Title of inproceeding} \field{venue}{Location of event} \field{year}{2009} \field{pages}{123\bibrangedash} \range{pages}{-1} \endentry |; # Special fields inherited correctly my $cr7 = q| \entry{cr7}{inbook}{} \name{author}{1}{}{% {{hash=8ab39ee68c55046dc1f05d657fcefed9}{% family={Author}, familyi={A\bibinitperiod}, given={Firstname}, giveni={F\bibinitperiod}}}% } \name{bookauthor}{1}{}{% {{hash=91a1dd4aeed3c4ec29ca74c4e778be5f}{% family={Bookauthor}, familyi={B\bibinitperiod}, given={Brian}, giveni={B\bibinitperiod}}}% } \list{publisher}{1}{% {Publisher of proceeding}% } \strng{namehash}{8ab39ee68c55046dc1f05d657fcefed9} \strng{fullhash}{8ab39ee68c55046dc1f05d657fcefed9} \strng{bibnamehash}{8ab39ee68c55046dc1f05d657fcefed9} \strng{authorbibnamehash}{8ab39ee68c55046dc1f05d657fcefed9} \strng{authornamehash}{8ab39ee68c55046dc1f05d657fcefed9} \strng{authorfullhash}{8ab39ee68c55046dc1f05d657fcefed9} \strng{bookauthorbibnamehash}{91a1dd4aeed3c4ec29ca74c4e778be5f} \strng{bookauthornamehash}{91a1dd4aeed3c4ec29ca74c4e778be5f} \strng{bookauthorfullhash}{91a1dd4aeed3c4ec29ca74c4e778be5f} \field{sortinit}{A} \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b} \true{uniquetitle} \true{uniquework} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{booksubtitle}{Book Subtitle} \field{booktitle}{Book Title} \field{booktitleaddon}{Book Titleaddon} \field{title}{Title of Book bit} \field{year}{2010} \field{pages}{123\bibrangedash 126} \range{pages}{4} \verb{verbb} \verb String \endverb \endentry |; # Default inheritance supressed except for specified my $cr8 = q| \entry{cr8}{incollection}{} \name{author}{1}{}{% {{hash=3d449e56eb3ca1ae80dc99a18d689795}{% family={Smith}, familyi={S\bibinitperiod}, given={Firstname}, giveni={F\bibinitperiod}}}% } \strng{namehash}{3d449e56eb3ca1ae80dc99a18d689795} \strng{fullhash}{3d449e56eb3ca1ae80dc99a18d689795} \strng{bibnamehash}{3d449e56eb3ca1ae80dc99a18d689795} \strng{authorbibnamehash}{3d449e56eb3ca1ae80dc99a18d689795} \strng{authornamehash}{3d449e56eb3ca1ae80dc99a18d689795} \strng{authorfullhash}{3d449e56eb3ca1ae80dc99a18d689795} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \true{singletitle} \true{uniquetitle} \true{uniquework} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{booktitle}{Book Title} \field{title}{Title of Collection bit} \field{year}{2010} \field{pages}{1\bibrangedash 12} \range{pages}{12} \endentry |; # xref field is included as the parent is included by being crossrefed >= mincrossrefs times my $xr1 = q| \entry{xr1}{inbook}{} \name{author}{1}{}{% {{hash=e0ecc4fc668ee499d1afba44e1ac064d}{% family={Zentrum}, familyi={Z\bibinitperiod}, given={Zoe}, giveni={Z\bibinitperiod}}}% } \strng{namehash}{e0ecc4fc668ee499d1afba44e1ac064d} \strng{fullhash}{e0ecc4fc668ee499d1afba44e1ac064d} \strng{bibnamehash}{e0ecc4fc668ee499d1afba44e1ac064d} \strng{authorbibnamehash}{e0ecc4fc668ee499d1afba44e1ac064d} \strng{authornamehash}{e0ecc4fc668ee499d1afba44e1ac064d} \strng{authorfullhash}{e0ecc4fc668ee499d1afba44e1ac064d} \field{sortinit}{Z} \field{sortinithash}{156173bd08b075d7295bc3e0f4735a04} \true{singletitle} \true{uniquetitle} \true{uniquework} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{origyear}{1921} \field{title}{Moods Mildly Modified} \strng{xref}{xrm} \field{origdateera}{ce} \endentry |; # xref field is included as the parent is included by being crossrefed >= mincrossrefs times my $xr2 = q| \entry{xr2}{inbook}{} \name{author}{1}{}{% {{hash=6afa09374ecfd6b394ce714d2d9709c7}{% family={Instant}, familyi={I\bibinitperiod}, given={Ian}, giveni={I\bibinitperiod}}}% } \strng{namehash}{6afa09374ecfd6b394ce714d2d9709c7} \strng{fullhash}{6afa09374ecfd6b394ce714d2d9709c7} \strng{bibnamehash}{6afa09374ecfd6b394ce714d2d9709c7} \strng{authorbibnamehash}{6afa09374ecfd6b394ce714d2d9709c7} \strng{authornamehash}{6afa09374ecfd6b394ce714d2d9709c7} \strng{authorfullhash}{6afa09374ecfd6b394ce714d2d9709c7} \field{sortinit}{I} \field{sortinithash}{320bc8fe8101b9376f9f21cd507de0e8} \true{singletitle} \true{uniquetitle} \true{uniquework} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{origyear}{1926} \field{title}{Migraines Multiplying Madly} \strng{xref}{xrm} \field{origdateera}{ce} \endentry |; # This is included as it is xref'd >= minxrefs times Notice lack of singletitle, # labelname and labelname hashes because the only name is EDITOR and # useeditor is false my $xrm = q| \entry{xrm}{book}{} \name{editor}{1}{}{% {{hash=809950f9b59ae207092b909a19dcb27b}{% family={Prendergast}, familyi={P\bibinitperiod}, given={Peter}, giveni={P\bibinitperiod}}}% } \list{publisher}{1}{% {Mainstream}% } \strng{editorbibnamehash}{809950f9b59ae207092b909a19dcb27b} \strng{editornamehash}{809950f9b59ae207092b909a19dcb27b} \strng{editorfullhash}{809950f9b59ae207092b909a19dcb27b} \field{sortinit}{C} \field{sortinithash}{963e9d84a3da2344e8833203de5aed05} \true{xrefsource} \true{uniquetitle} \field{labeltitlesource}{title} \field{title}{Calligraphy, Calisthenics, Culture} \field{year}{1970} \endentry |; # xref field is included as the parent is cited my $xr3 = q| \entry{xr3}{inbook}{} \name{author}{1}{}{% {{hash=9788055665b9bb4b37c776c3f6b74f16}{% family={Normal}, familyi={N\bibinitperiod}, given={Norman}, giveni={N\bibinitperiod}}}% } \strng{namehash}{9788055665b9bb4b37c776c3f6b74f16} \strng{fullhash}{9788055665b9bb4b37c776c3f6b74f16} \strng{bibnamehash}{9788055665b9bb4b37c776c3f6b74f16} \strng{authorbibnamehash}{9788055665b9bb4b37c776c3f6b74f16} \strng{authornamehash}{9788055665b9bb4b37c776c3f6b74f16} \strng{authorfullhash}{9788055665b9bb4b37c776c3f6b74f16} \field{sortinit}{N} \field{sortinithash}{f7242c3ed3dc50029fca1be76c497c7c} \true{singletitle} \true{uniquetitle} \true{uniquework} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{origyear}{1923} \field{title}{Russian Regalia Revisited} \strng{xref}{xrt} \field{origdateera}{ce} \endentry |; # cited as normal # Note no singletitle as useeditor is false my $xrt = q| \entry{xrt}{book}{} \name{editor}{1}{}{% {{hash=bf7d6b02f3e073913e5bfe5059508dd5}{% family={Lunders}, familyi={L\bibinitperiod}, given={Lucy}, giveni={L\bibinitperiod}}}% } \list{publisher}{1}{% {Middling}% } \strng{editorbibnamehash}{bf7d6b02f3e073913e5bfe5059508dd5} \strng{editornamehash}{bf7d6b02f3e073913e5bfe5059508dd5} \strng{editorfullhash}{bf7d6b02f3e073913e5bfe5059508dd5} \field{sortinit}{K} \field{sortinithash}{9fd838a31ba64d981e8f44562bd33f89} \true{uniquetitle} \field{labeltitlesource}{title} \field{title}{Kings, Cork and Calculation} \field{year}{1977} \endentry |; # No crossref field as parent is not cited (mincrossrefs < 2) my $xr4 = q| \entry{xr4}{inbook}{} \name{author}{1}{}{% {{hash=7804ffef086c0c4686c235807f5cb502}{% family={Mistrel}, familyi={M\bibinitperiod}, given={Megan}, giveni={M\bibinitperiod}}}% } \strng{namehash}{7804ffef086c0c4686c235807f5cb502} \strng{fullhash}{7804ffef086c0c4686c235807f5cb502} \strng{bibnamehash}{7804ffef086c0c4686c235807f5cb502} \strng{authorbibnamehash}{7804ffef086c0c4686c235807f5cb502} \strng{authornamehash}{7804ffef086c0c4686c235807f5cb502} \strng{authorfullhash}{7804ffef086c0c4686c235807f5cb502} \field{sortinit}{M} \field{sortinithash}{cfd219b90152c06204fab207bc6c7cab} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{origyear}{1933} \field{title}{Lumbering Lunatics} \strng{xref}{xrn} \field{origdateera}{ce} \endentry |; # Missing keys in xref/crossref should be deleted during datasource parse # So these two should have no xref/crossref data in them my $mxr = q| \entry{mxr}{inbook}{} \name{author}{1}{}{% {{hash=7804ffef086c0c4686c235807f5cb502}{% family={Mistrel}, familyi={M\bibinitperiod}, given={Megan}, giveni={M\bibinitperiod}}}% } \strng{namehash}{7804ffef086c0c4686c235807f5cb502} \strng{fullhash}{7804ffef086c0c4686c235807f5cb502} \strng{bibnamehash}{7804ffef086c0c4686c235807f5cb502} \strng{authorbibnamehash}{7804ffef086c0c4686c235807f5cb502} \strng{authornamehash}{7804ffef086c0c4686c235807f5cb502} \strng{authorfullhash}{7804ffef086c0c4686c235807f5cb502} \field{sortinit}{M} \field{sortinithash}{cfd219b90152c06204fab207bc6c7cab} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{origyear}{1933} \field{title}{Lumbering Lunatics} \field{origdateera}{ce} \endentry |; my $mcr = q| \entry{mcr}{inbook}{} \name{author}{1}{}{% {{hash=7804ffef086c0c4686c235807f5cb502}{% family={Mistrel}, familyi={M\bibinitperiod}, given={Megan}, giveni={M\bibinitperiod}}}% } \strng{namehash}{7804ffef086c0c4686c235807f5cb502} \strng{fullhash}{7804ffef086c0c4686c235807f5cb502} \strng{bibnamehash}{7804ffef086c0c4686c235807f5cb502} \strng{authorbibnamehash}{7804ffef086c0c4686c235807f5cb502} \strng{authornamehash}{7804ffef086c0c4686c235807f5cb502} \strng{authorfullhash}{7804ffef086c0c4686c235807f5cb502} \field{sortinit}{M} \field{sortinithash}{cfd219b90152c06204fab207bc6c7cab} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{origyear}{1933} \field{title}{Lumbering Lunatics} \field{origdateera}{ce} \endentry |; my $ccr1 = q| \entry{ccr2}{book}{} \name{author}{1}{}{% {{hash=6268941b408d3263bddb208a54899ea9}{% family={Various}, familyi={V\bibinitperiod}, given={Vince}, giveni={V\bibinitperiod}}}% } \name{editor}{1}{}{% {{hash=cfee758a1c82df2e26af1985e061bb0a}{% family={Editor}, familyi={E\bibinitperiod}, given={Edward}, giveni={E\bibinitperiod}}}% } \strng{namehash}{6268941b408d3263bddb208a54899ea9} \strng{fullhash}{6268941b408d3263bddb208a54899ea9} \strng{bibnamehash}{6268941b408d3263bddb208a54899ea9} \strng{authorbibnamehash}{6268941b408d3263bddb208a54899ea9} \strng{authornamehash}{6268941b408d3263bddb208a54899ea9} \strng{authorfullhash}{6268941b408d3263bddb208a54899ea9} \strng{editorbibnamehash}{cfee758a1c82df2e26af1985e061bb0a} \strng{editornamehash}{cfee758a1c82df2e26af1985e061bb0a} \strng{editorfullhash}{cfee758a1c82df2e26af1985e061bb0a} \field{sortinit}{V} \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b} \true{uniquetitle} \true{uniquework} \field{labelnamesource}{author} \field{labeltitlesource}{title} \strng{crossref}{ccr1} \field{title}{Misc etc.} \field{year}{1923} \field{dateera}{ce} \endentry |; my $ccr2 = q| \entry{ccr3}{inbook}{} \name{bookauthor}{1}{}{% {{hash=6268941b408d3263bddb208a54899ea9}{% family={Various}, familyi={V\bibinitperiod}, given={Vince}, giveni={V\bibinitperiod}}}% } \name{editor}{1}{}{% {{hash=cfee758a1c82df2e26af1985e061bb0a}{% family={Editor}, familyi={E\bibinitperiod}, given={Edward}, giveni={E\bibinitperiod}}}% } \strng{bookauthorbibnamehash}{6268941b408d3263bddb208a54899ea9} \strng{bookauthornamehash}{6268941b408d3263bddb208a54899ea9} \strng{bookauthorfullhash}{6268941b408d3263bddb208a54899ea9} \strng{editorbibnamehash}{cfee758a1c82df2e26af1985e061bb0a} \strng{editornamehash}{cfee758a1c82df2e26af1985e061bb0a} \strng{editorfullhash}{cfee758a1c82df2e26af1985e061bb0a} \field{sortinit}{P} \field{sortinithash}{8d51b3d5b78d75b54308d706b9bbe285} \true{uniquetitle} \field{labeltitlesource}{title} \field{booktitle}{Misc etc.} \strng{crossref}{ccr2} \field{title}{Perhaps, Perchance, Possibilities?} \field{year}{1911} \field{dateera}{ce} \endentry |; # This is strange in what it gets from where but it shows information being inherited from two # sources my $ccr3 = q| \entry{ccr4}{inbook}{} \name{bookauthor}{1}{}{% {{hash=6268941b408d3263bddb208a54899ea9}{Various}{V\bibinitperiod}{Vince}{V\bibinitperiod}{}{}{}{}}% } \name{editor}{1}{}{% {{hash=cfee758a1c82df2e26af1985e061bb0a}{Editor}{E\bibinitperiod}{Edward}{E\bibinitperiod}{}{}{}{}}% } \field{sortinit}{V} \field{sortinithash}{4125bb4c3a0eb3eaee3ea6da32eb70c8} \field{labeltitlesource}{title} \field{booktitle}{Misc etc.} \field{title}{Stuff Concerning Varia} \field{year}{1911} \field{dateera}{ce} \endentry |; my $s1 = q| \entry{s1}{inbook}{} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \true{uniquetitle} \field{labeltitlesource}{title} \strng{crossref}{s2} \field{title}{Subtitle} \endentry |; my $xc2 = q| \entry{xc2}{inbook}{} \name{author}{1}{}{% {{hash=1a0f7d518cccdad859a74412ef956474}{% family={Crust}, familyi={C\\bibinitperiod}, given={Xavier}, giveni={X\\bibinitperiod}}}% } \name{bookauthor}{1}{}{% {{hash=1a0f7d518cccdad859a74412ef956474}{% family={Crust}, familyi={C\\bibinitperiod}, given={Xavier}, giveni={X\\bibinitperiod}}}% } \strng{namehash}{1a0f7d518cccdad859a74412ef956474} \strng{fullhash}{1a0f7d518cccdad859a74412ef956474} \strng{bibnamehash}{1a0f7d518cccdad859a74412ef956474} \strng{authorbibnamehash}{1a0f7d518cccdad859a74412ef956474} \strng{authornamehash}{1a0f7d518cccdad859a74412ef956474} \strng{authorfullhash}{1a0f7d518cccdad859a74412ef956474} \strng{bookauthorbibnamehash}{1a0f7d518cccdad859a74412ef956474} \strng{bookauthornamehash}{1a0f7d518cccdad859a74412ef956474} \strng{bookauthorfullhash}{1a0f7d518cccdad859a74412ef956474} \field{sortinit}{C} \field{sortinithash}{963e9d84a3da2344e8833203de5aed05} \true{xrefsource} \field{labelnamesource}{author} \field{booktitle}{Title} \endentry |; my $b1 = q| \entry{b1}{inbook}{} \field{sortinit}{2} \field{sortinithash}{cbff857e587bcb4635511624d773949e} \strng{crossref}{b2} \field{day}{3} \field{month}{3} \field{origmonth}{3} \field{origyear}{2004} \field{year}{2004} \field{dateera}{ce} \field{origdateera}{ce} \endentry |; # sup1 is here because it is crossref'ed twice by sup2 and sup3 which share # the author as a result. However, note that singletitle is true despite # the same author for three entries because two instance of the author # being present are by inheritance and singletitle tracking is suppressed # in this case because of the "suppress=singletitle" in the inheritance # definitions in the .bcf my $sup1 = q| \entry{sup1}{mvbook}{} \name{author}{1}{}{% {{hash=556c8dba145b472e6a8598d506f7cbe2}{% family={Smith}, familyi={S\\bibinitperiod}, given={Alan}, giveni={A\\bibinitperiod}}}% } \strng{namehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{fullhash}{556c8dba145b472e6a8598d506f7cbe2} \strng{bibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorbibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authornamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \true{crossrefsource} \true{singletitle} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{Title1} \endentry |; my $sup2 = q| \entry{sup2}{book}{} \name{author}{1}{}{% {{hash=556c8dba145b472e6a8598d506f7cbe2}{% family={Smith}, familyi={S\\bibinitperiod}, given={Alan}, giveni={A\\bibinitperiod}}}% } \strng{namehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{fullhash}{556c8dba145b472e6a8598d506f7cbe2} \strng{bibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorbibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authornamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \true{singletitle} \field{labelnamesource}{author} \field{labeltitlesource}{title} \strng{crossref}{sup1} \field{note}{Book sup2} \field{title}{Title1} \endentry |; eq_or_diff($out->get_output_entry('cr1', $main), $cr1, 'crossref test 1'); eq_or_diff($out->get_output_entry('cr2', $main), $cr2, 'crossref test 2'); eq_or_diff($out->get_output_entry('cr_m', $main), $cr_m, 'crossref test 3'); eq_or_diff($out->get_output_entry('cr3', $main), $cr3, 'crossref test 4'); eq_or_diff($out->get_output_entry('crt', $main), $crt, 'crossref test 5'); eq_or_diff($out->get_output_entry('cr4', $main), $cr4, 'crossref test 6'); eq_or_diff($section0->has_citekey('crn'), 0,'crossref test 7'); eq_or_diff($out->get_output_entry('cr6', $main), $cr6, 'crossref test (inheritance) 8'); eq_or_diff($out->get_output_entry('cr7', $main), $cr7, 'crossref test (inheritance) 9'); eq_or_diff($out->get_output_entry('cr8', $main), $cr8, 'crossref test (inheritance) 10'); eq_or_diff($out->get_output_entry('xr1', $main), $xr1, 'xref test 1'); eq_or_diff($out->get_output_entry('xr2', $main), $xr2, 'xref test 2'); eq_or_diff($out->get_output_entry('xrm', $main), $xrm, 'xref test 3'); eq_or_diff($out->get_output_entry('xr3', $main), $xr3, 'xref test 4'); eq_or_diff($out->get_output_entry('xrt', $main), $xrt, 'xref test 5'); eq_or_diff($out->get_output_entry('xr4', $main), $xr4, 'xref test 6'); eq_or_diff($section0->has_citekey('xrn'), 1,'xref test 7'); eq_or_diff($out->get_output_entry('mxr', $main), $mxr, 'missing xref test'); eq_or_diff($out->get_output_entry('mcr', $main), $mcr, 'missing crossef test'); eq_or_diff($section1->has_citekey('crn'), 0,'mincrossrefs reset between sections'); eq_or_diff($out->get_output_entry('ccr2', $main), $ccr1, 'cascading crossref test 1'); eq_or_diff($out->get_output_entry('ccr3', $main), $ccr2, 'cascading crossref test 2'); chomp $stderr; eq_or_diff($stderr, "ERROR - Circular inheritance between 'circ1'<->'circ2'\nERROR - Circular inheritance between 'circ3'<->'circ1'", 'Cyclic crossref error check'); eq_or_diff($section0->has_citekey('r1'), 1,'Recursive crossref test 1'); ok(defined($section0->bibentry('r1')),'Recursive crossref test 2'); eq_or_diff($section0->has_citekey('r2'), 0,'Recursive crossref test 3'); ok(defined($section0->bibentry('r2')),'Recursive crossref test 4'); eq_or_diff($section0->has_citekey('r3'), 0,'Recursive crossref test 5'); ok(defined($section0->bibentry('r3')),'Recursive crossref test 6'); eq_or_diff($section0->has_citekey('r4'), 0,'Recursive crossref test 7'); ok(defined($section0->bibentry('r4')),'Recursive crossref test 8'); eq_or_diff($out->get_output_entry('s1', $main), $s1, 'per-entry noinherit'); eq_or_diff($out->get_output_entry('xc2', $main), $xc2, 'Cascading xref+crossref'); eq_or_diff($out->get_output_entry('b1', $main), $b1, 'Blocking bad date inheritance'); eq_or_diff($out->get_output_entry('sup1', $main), $sup1, 'Suppressing singletitle tracking - 1'); eq_or_diff($out->get_output_entry('sup2', $main), $sup2, 'Suppressing singletitle tracking - 2'); eq_or_diff($section0->has_citekey('al2'), 0, 'mincrossref via alias'); biblatex-biber-2.9/t/sort-complex.t000444000153000001 2252013205066062 16743 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 9; use Test::Differences; unified_diff; use Biber; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('sort-complex.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Want to ignore SHORTHAND* fields for the first few tests Biber::Config->setoption('sourcemap', [ { datatype => "bibtex", level => "user", map => [ { map_step => [{ map_field_set => "SHORTHAND", map_null => 1 }, { map_field_set => "SORTSHORTHAND", map_null => 1 }] }]}]); # Biblatex options Biber::Config->setblxoption('labeldateparts', undef); # Now generate the information $biber->prepare; my $section = $biber->sections->get_section(0); my $bibentries = $section->bibentries; my $main = $biber->datalists->get_list('nyt/global//global/global'); my $shs = $biber->datalists->get_list('shorthand/global//global/global', 0, 'list'); my $out = $biber->get_output_obj; my $ss = { locale => 'en-US', spec => [ [ {}, {'presort' => {}} ], [ {'final' => 1}, {'sortkey' => {}} ], [ {}, {'labelalpha' => {}}, ], [ {}, {'sortname' => {}}, {'author' => {}}, {'editor' => {}}, {'translator' => {}}, {'sorttitle' => {}}, {'title' => {}} ], [ {}, {'sortyear' => {}}, {'year' => {}} ], [ {}, {'sorttitle' => {}}, {'title' => {}} ], [ {}, {'volume' => {}}, {'0' => {}}, ], ]}; my $l4 = q| \entry{L4}{book}{} \true{moreauthor} \true{morelabelname} \name{author}{1}{}{% {{hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}}}% } \list{location}{1}{% {Cambridge}% } \list{publisher}{1}{% {Another press}% } \strng{namehash}{6eb389989020e8246fee90ac93fcecbe} \strng{fullhash}{6eb389989020e8246fee90ac93fcecbe} \strng{bibnamehash}{6eb389989020e8246fee90ac93fcecbe} \strng{authorbibnamehash}{6eb389989020e8246fee90ac93fcecbe} \strng{authornamehash}{6eb389989020e8246fee90ac93fcecbe} \strng{authorfullhash}{6eb389989020e8246fee90ac93fcecbe} \field{labelalpha}{Doe\textbf{+}95} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{extraalpha}{2} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{Some title about sorting} \field{year}{1995} \endentry |; my $l1 = q| \entry{L1}{book}{} \name{author}{1}{}{% {{hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}}}% } \list{location}{1}{% {Cambridge}% } \list{publisher}{1}{% {A press}% } \strng{namehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{fullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{bibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorbibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \field{labelalpha}{Doe95} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{extraalpha}{1} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{Algorithms For Sorting} \field{year}{1995} \endentry |; my $l2 = q| \entry{L2}{book}{} \name{author}{1}{}{% {{hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}}}% } \list{location}{1}{% {Cambridge}% } \list{publisher}{1}{% {A press}% } \strng{namehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{fullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{bibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorbibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \field{labelalpha}{Doe95} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{extraalpha}{3} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{Sorting Algorithms} \field{year}{1995} \endentry |; my $l3 = q| \entry{L3}{book}{} \name{author}{1}{}{% {{hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}}}% } \list{location}{1}{% {Cambridge}% } \list{publisher}{1}{% {A press}% } \strng{namehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{fullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{bibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorbibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \field{labelalpha}{Doe95} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{extraalpha}{2} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{More and More Algorithms} \field{year}{1995} \endentry |; my $l5 = q| \entry{L5}{book}{} \true{moreauthor} \true{morelabelname} \name{author}{1}{}{% {{hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}}}% } \list{location}{1}{% {Cambridge}% } \list{publisher}{1}{% {Another press}% } \strng{namehash}{6eb389989020e8246fee90ac93fcecbe} \strng{fullhash}{6eb389989020e8246fee90ac93fcecbe} \strng{bibnamehash}{6eb389989020e8246fee90ac93fcecbe} \strng{authorbibnamehash}{6eb389989020e8246fee90ac93fcecbe} \strng{authornamehash}{6eb389989020e8246fee90ac93fcecbe} \strng{authorfullhash}{6eb389989020e8246fee90ac93fcecbe} \field{labelalpha}{Doe\textbf{+}95} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{extraalpha}{1} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{Some other title about sorting} \field{year}{1995} \endentry |; is_deeply( $main->get_sortingtemplate, $ss, 'sort template'); eq_or_diff( $out->get_output_entry('L4', $main), $l4, '\alphaothers set by "and others"'); eq_or_diff( $out->get_output_entry('L1', $main), $l1, 'bbl test 1'); eq_or_diff( $out->get_output_entry('L2', $main), $l2, 'bbl test 2'); eq_or_diff( $out->get_output_entry('L3', $main), $l3, 'bbl test 3'); eq_or_diff( $out->get_output_entry('L5', $main), $l5, 'bbl test 4'); is_deeply($main->get_keys, ['L5', 'L4', 'L1', 'L3', 'L2'], 'sortorder - 1'); # This would be the same as $main citeorder as both $main and $shs use same # global sort spec but here it's null because we've removed all shorthands using a map # above and the filter for the shorthand list only uses entries with SHORTHAND fields ... is_deeply($shs->get_keys , [], 'sortorder - 2'); # reset options and regenerate information Biber::Config->setoption('sourcemap', undef); # no longer ignore shorthand* # Need to reset all entries due to "skip if already in Entries" # clause in bibtex.pm. Need to clear the cache as we've modified the T::B objects # by the sourcemap. Need to clear everykeys otherwise we'll just skip the keys $bibentries->del_entries; $section->del_everykeys; Biber::Input::file::bibtex->init_cache; $biber->prepare; $section = $biber->sections->get_section(0); $shs = $biber->datalists->get_list('shorthand/global//global/global', 0, 'list'); # Sort by shorthand is_deeply($shs->get_keys, ['L1', 'L2', 'L3', 'L4', 'L5'], 'sortorder - 3'); biblatex-biber-2.9/t/dm-constraints.t000444000153000001 1413513205066061 17256 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 16; use Biber; use Biber::Output::bbl; use Biber::Utils; use Log::Log4perl; chdir("t/tdata"); use IPC::Run3; use File::Spec; use File::Which; my $perl = which('perl'); my $stdout; # This test will complain on the test linux servers as /usr/local/perl/bin/perl will not be # returned by "which perl" and so the following workaround will fail to find the ISBN messaged file. # Doesn't matter much but just in case when running "Build test" on the current test VMs, worth # remembering. # This is needed so that this env var is set to the runtime location of the message file and not # the test runtime as this is altered by Module::Build which sets up $INC{} differently run3 [ $perl, '-MBusiness::ISBN', '-e', 'print $INC{"Business/ISBN.pm"}' ], \undef, \$stdout, \undef; my ($vol, $dir, undef) = File::Spec->splitpath($stdout); $ENV{ISBN_RANGE_MESSAGE} = File::Spec->catpath($vol, "$dir/ISBN/", 'RangeMessage.xml'); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('dm-constraints.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); Biber::Config->setoption('validate_datamodel', 1); # Now generate the information $biber->prepare; my $section = $biber->sections->get_section(0); my $bibentries = $section->bibentries; my $c1 = [ "Datamodel: Entry 'c1' (dm-constraints.bib): Invalid entry type 'badtype' - defaulting to 'misc'" ]; my $c2 = [ "Datamodel: Entry 'c2' (dm-constraints.bib): Field 'badfield' invalid in data model - ignoring", "Datamodel: Entry 'c2' (dm-constraints.bib): Invalid field 'journaltitle' for entrytype 'eta'", "Datamodel: Entry 'c2' (dm-constraints.bib): Missing mandatory field 'author'" ]; my $c3 = [ "Datamodel: Entry 'c3' (dm-constraints.bib): Invalid format (integer) of field 'month' - ignoring field", "Datamodel: Entry 'c3' (dm-constraints.bib): Invalid value (pattern match fails) for field 'gender'" ]; my $c4 = [ "Datamodel: Entry 'c4' (dm-constraints.bib): Invalid value of field 'month' must be '<=12' - ignoring field", "Datamodel: Entry 'c4' (dm-constraints.bib): Invalid value of field 'field1' must be '>=5' - ignoring field" ]; # There would also have been a date+year constraint violation in the next test if # it weren't for the fact that the date processing in bibtex.pm already deals with this # and removed the year field my $c5 = [ "Overwriting field 'year' with year value from field 'date' for entry 'c5'", "Datamodel: Entry 'c5' (dm-constraints.bib): Constraint violation - none of fields (field5, field6) must exist when all of fields (field2, field3, field4) exist. Ignoring them." ]; my $c6 = [ "Datamodel: Entry 'c6' (dm-constraints.bib): Constraint violation - one of fields (field7, field8) must exist when all of fields (field1, field2) exist", "Datamodel: Entry 'c6' (dm-constraints.bib): Constraint violation - all of fields (field9, field10) must exist when all of fields (field5, field6) exist" ]; my $c7 = [ "Datamodel: Entry 'c7' (dm-constraints.bib): Missing mandatory field - one of 'fielda, fieldb' must be defined", "Datamodel: Entry 'c7' (dm-constraints.bib): Constraint violation - none of fields (field7) must exist when one of fields (field5, field6) exist. Ignoring them."]; my $c8 = [ "Datamodel: Entry 'c8' (dm-constraints.bib): Constraint violation - none of fields (field4) must exist when none of fields (field2, field3) exist. Ignoring them.", "Datamodel: Entry 'c8' (dm-constraints.bib): Constraint violation - one of fields (field10, field11) must exist when none of fields (field8, field9) exist", "Datamodel: Entry 'c8' (dm-constraints.bib): Constraint violation - all of fields (field12, field13) must exist when none of fields (field6) exist" ]; my $c10 = [ "Datamodel: Entry 'c10' (dm-constraints.bib): Invalid ISBN in value of field 'isbn'", "Datamodel: Entry 'c10' (dm-constraints.bib): Invalid ISSN in value of field 'issn'" ]; is_deeply($bibentries->entry('c1')->get_field('warnings'), $c1, 'Constraints test 1' ); is_deeply($bibentries->entry('c2')->get_field('warnings'), $c2, 'Constraints test 2' ); is_deeply($bibentries->entry('c3')->get_field('warnings'), $c3, 'Constraints test 3a' ); ok(is_undef($bibentries->entry('c3')->get_field('month')), 'Constraints test 3b' ); is_deeply($bibentries->entry('c4')->get_field('warnings'), $c4, 'Constraints test 4a' ); ok(is_undef($bibentries->entry('c4')->get_field('month')), 'Constraints test 4b' ); is_deeply($bibentries->entry('c5')->get_field('warnings'), $c5, 'Constraints test 5a' ); ok(is_undef($bibentries->entry('c5')->get_field('field5')), 'Constraints test 5b' ); ok(is_undef($bibentries->entry('c5')->get_field('field6')), 'Constraints test 5c' ); is_deeply($bibentries->entry('c6')->get_field('warnings'), $c6, 'Constraints test 6' ); is_deeply($bibentries->entry('c7')->get_field('warnings'), $c7, 'Constraints test 7a' ); ok(is_undef($bibentries->entry('c7')->get_field('field7')), 'Constraints test 7b' ); is_deeply($bibentries->entry('c8')->get_field('warnings'), $c8, 'Constraints test 8a' ); ok(is_undef($bibentries->entry('c8')->get_field('field4')), 'Constraints test 8b' ); ok(is_undef($bibentries->entry('c9')->get_field('warnings')), 'Constraints test 9' ); is_deeply($bibentries->entry('c10')->get_field('warnings'), $c10, 'Constraints test 10' ); biblatex-biber-2.9/t/sort-uc.t000444000153000001 566613205066062 15677 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 6; use Biber; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('sort-uc.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests Biber::Config->setoption('sortlocale', 'sv_SE.UTF-8'); # U::C Swedish tailoring $biber->prepare; my $section = $biber->sections->get_section(0); my $main = $biber->datalists->get_list('nty/global//global/global'); my $shs = $biber->datalists->get_list('shorthand/global//global/global', 0, 'list'); # Shorthands are sorted by shorthand (as per bcf) is_deeply($main->get_keys, ['LS6','LS5','LS2','LS1','LS3','LS4'], 'U::C tailoring - 1'); is_deeply($shs->get_keys, ['LS3', 'LS4','LS2','LS1'], 'U::C tailoring - 2'); # Set sorting of shorthands to global sorting default $shs->set_sortingtemplate(Biber::Config->getblxoption('sortingtemplate')); $shs->set_sortingtemplatename('global'); $biber->prepare; $section = $biber->sections->get_section(0); is_deeply($shs->get_keys, ['LS2', 'LS1','LS3','LS4'], 'U::C tailoring - 3'); # Descending name in Swedish collation $main->set_sortingtemplatename('dswe'); $biber->prepare; $section = $biber->sections->get_section(0); is_deeply($main->get_keys, ['LS3','LS4','LS1','LS2','LS5','LS6'], 'U::C tailoring descending - 1'); # Local lower before upper setting $main->set_sortingtemplatename('ll'); $biber->prepare; $section = $biber->sections->get_section(0); is_deeply($main->get_keys, ['LS5', 'LS6', 'LS4', 'LS3','LS2','LS1'], 'upper_before_lower locally false'); # Local case insensitive negates the sortupper being false as this no longer # means anything so it reverts to bib order for LS3 and LS4 # For this, have to reparse the .bcf otherwise the citekey order from previous # test is kept for things that are not sort distinguishable $biber->parse_ctrlfile('sort-uc.bcf'); $section = $biber->sections->get_section(0); $main = $biber->datalists->get_list('nty/global//global/global'); $biber->set_output_obj(Biber::Output::bbl->new()); $main->set_sortingtemplatename('ci'); $biber->prepare; is_deeply($main->get_keys, ['LS5', 'LS6','LS3', 'LS4','LS2','LS1'], 'sortcase locally false, upper_before_lower locally false'); biblatex-biber-2.9/t/dateformats.t000444000153000001 10375313205066062 16650 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 47; use Test::Differences; unified_diff; use Biber; use Biber::Output::bbl; use Biber::Utils; use Log::Log4perl; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('dateformats.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); Biber::Config->setoption('validate_datamodel', 1); # Biblatex options Biber::Config->setblxoption('labeldatespec', [ {content => 'date', type => 'field'} ]); Biber::Config->setblxoption('julian', 1); Biber::Config->setblxoption('julianstart', '0001-01-01'); # Now generate the information $biber->prepare; my $out = $biber->get_output_obj; my $section = $biber->sections->get_section(0); my $main = $biber->datalists->get_list('nty/global//global/global'); my $bibentries = $section->bibentries; my $l1 = [ "Entry 'L1' (dateformats.bib): Invalid format '1985-1030' of date field 'origdate' - ignoring", "Entry 'L1' (dateformats.bib): Invalid format '1.5.1998' of date field 'urldate' - ignoring" ]; my $l2 = [ "Entry 'L2' (dateformats.bib): Invalid format '1995-1230' of date field 'origdate' - ignoring" ]; my $l3 = [ "Entry 'L3' (dateformats.bib): Invalid format '1.5.1988' of date field 'urldate' - ignoring" ]; my $l4 = [ "Entry 'L4' (dateformats.bib): Invalid format '1995-1-04' of date field 'date' - ignoring", "Datamodel: Entry 'L4' (dateformats.bib): Missing mandatory field - one of 'date, year' must be defined" ]; my $l5 = [ "Entry 'L5' (dateformats.bib): Invalid format '1995-10-4' of date field 'date' - ignoring", "Datamodel: Entry 'L5' (dateformats.bib): Missing mandatory field - one of 'date, year' must be defined" ]; my $l6 = [ "Entry 'L6' (dateformats.bib): Invalid format '1996-13-03' of date field 'date' - ignoring", "Datamodel: Entry 'L6' (dateformats.bib): Missing mandatory field - one of 'date, year' must be defined"]; my $l7 = [ "Entry 'L7' (dateformats.bib): Invalid format '1996-10-35' of date field 'eventdate' - ignoring" ]; my $l11 = [ "Overwriting field 'year' with year value from field 'date' for entry 'L11'"]; my $l12 = [ "Overwriting field 'month' with month value from field 'date' for entry 'L12'" ]; my $l13c = q| \entry{L13}{book}{} \name{author}{2}{}{% {{hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}}}% {{hash=df9bf04cd41245e6d23ad7543e7fd90d}{% family={Abrahams}, familyi={A\bibinitperiod}, given={Albert}, giveni={A\bibinitperiod}}}% } \list{publisher}{1}{% {Oxford}% } \strng{namehash}{8c77336299b25bdada7bf8038f46722f} \strng{fullhash}{8c77336299b25bdada7bf8038f46722f} \strng{bibnamehash}{8c77336299b25bdada7bf8038f46722f} \strng{authorbibnamehash}{8c77336299b25bdada7bf8038f46722f} \strng{authornamehash}{8c77336299b25bdada7bf8038f46722f} \strng{authorfullhash}{8c77336299b25bdada7bf8038f46722f} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{day}{1} \field{endyear}{} \field{month}{1} \field{title}{Title 2} \field{year}{1996} \field{dateera}{ce} \endentry |; my $l14 = q| \entry{L14}{book}{} \name{author}{2}{}{% {{hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}}}% {{hash=df9bf04cd41245e6d23ad7543e7fd90d}{% family={Abrahams}, familyi={A\bibinitperiod}, given={Albert}, giveni={A\bibinitperiod}}}% } \list{publisher}{1}{% {Oxford}% } \strng{namehash}{8c77336299b25bdada7bf8038f46722f} \strng{fullhash}{8c77336299b25bdada7bf8038f46722f} \strng{bibnamehash}{8c77336299b25bdada7bf8038f46722f} \strng{authorbibnamehash}{8c77336299b25bdada7bf8038f46722f} \strng{authornamehash}{8c77336299b25bdada7bf8038f46722f} \strng{authorfullhash}{8c77336299b25bdada7bf8038f46722f} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{extradate}{3} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{day}{10} \field{endday}{12} \field{endmonth}{12} \field{endyear}{1996} \field{month}{12} \field{title}{Title 2} \field{year}{1996} \field{enddateera}{ce} \field{dateera}{ce} \endentry |; my $l15 = q| \entry{L15}{book}{} \name{author}{2}{}{% {{hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}}}% {{hash=df9bf04cd41245e6d23ad7543e7fd90d}{% family={Abrahams}, familyi={A\bibinitperiod}, given={Albert}, giveni={A\bibinitperiod}}}% } \list{publisher}{1}{% {Oxford}% } \strng{namehash}{8c77336299b25bdada7bf8038f46722f} \strng{fullhash}{8c77336299b25bdada7bf8038f46722f} \strng{bibnamehash}{8c77336299b25bdada7bf8038f46722f} \strng{authorbibnamehash}{8c77336299b25bdada7bf8038f46722f} \strng{authornamehash}{8c77336299b25bdada7bf8038f46722f} \strng{authorfullhash}{8c77336299b25bdada7bf8038f46722f} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{extradate}{4} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{Title 2} \warn{\item Datamodel: Entry 'L15' (dateformats.bib): Missing mandatory field - one of 'date, year' must be defined} \endentry |; my $l16 = q| \entry{L16}{proceedings}{} \name{editor}{2}{}{% {{hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}}}% {{hash=df9bf04cd41245e6d23ad7543e7fd90d}{% family={Abrahams}, familyi={A\bibinitperiod}, given={Albert}, giveni={A\bibinitperiod}}}% } \list{publisher}{1}{% {Oxford}% } \strng{namehash}{8c77336299b25bdada7bf8038f46722f} \strng{fullhash}{8c77336299b25bdada7bf8038f46722f} \strng{bibnamehash}{8c77336299b25bdada7bf8038f46722f} \strng{editorbibnamehash}{8c77336299b25bdada7bf8038f46722f} \strng{editornamehash}{8c77336299b25bdada7bf8038f46722f} \strng{editorfullhash}{8c77336299b25bdada7bf8038f46722f} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{extradate}{7} \field{extradatescope}{labelyear} \field{labeldatesource}{event} \field{labelnamesource}{editor} \field{labeltitlesource}{title} \field{eventday}{1} \field{eventmonth}{1} \field{eventyear}{1996} \field{title}{Title 2} \field{eventdateera}{ce} \warn{\item Datamodel: Entry 'L16' (dateformats.bib): Missing mandatory field - one of 'date, year' must be defined} \endentry |; my $l17 = q| \entry{L17}{proceedings}{} \name{editor}{2}{}{% {{hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}}}% {{hash=df9bf04cd41245e6d23ad7543e7fd90d}{% family={Abrahams}, familyi={A\bibinitperiod}, given={Albert}, giveni={A\bibinitperiod}}}% } \list{publisher}{1}{% {Oxford}% } \strng{namehash}{8c77336299b25bdada7bf8038f46722f} \strng{fullhash}{8c77336299b25bdada7bf8038f46722f} \strng{bibnamehash}{8c77336299b25bdada7bf8038f46722f} \strng{editorbibnamehash}{8c77336299b25bdada7bf8038f46722f} \strng{editornamehash}{8c77336299b25bdada7bf8038f46722f} \strng{editorfullhash}{8c77336299b25bdada7bf8038f46722f} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{extradate}{4} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{editor} \field{labeltitlesource}{title} \field{day}{10} \field{endday}{12} \field{endmonth}{12} \field{endyear}{1996} \field{eventday}{10} \field{eventendday}{12} \field{eventendmonth}{12} \field{eventendyear}{2004} \field{eventmonth}{12} \field{eventyear}{1998} \field{month}{12} \field{origday}{10} \field{origendday}{12} \field{origendmonth}{12} \field{origendyear}{1998} \field{origmonth}{12} \field{origyear}{1998} \field{pubstate}{inpress} \field{title}{Title 2} \field{year}{1996} \field{enddateera}{ce} \field{dateera}{ce} \field{eventenddateera}{ce} \field{eventdateera}{ce} \field{origenddateera}{ce} \field{origdateera}{ce} \endentry |; my $l17c = q| \entry{L17}{proceedings}{} \name{editor}{2}{}{% {{hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}}}% {{hash=df9bf04cd41245e6d23ad7543e7fd90d}{% family={Abrahams}, familyi={A\bibinitperiod}, given={Albert}, giveni={A\bibinitperiod}}}% } \list{publisher}{1}{% {Oxford}% } \strng{namehash}{8c77336299b25bdada7bf8038f46722f} \strng{fullhash}{8c77336299b25bdada7bf8038f46722f} \strng{bibnamehash}{8c77336299b25bdada7bf8038f46722f} \strng{editorbibnamehash}{8c77336299b25bdada7bf8038f46722f} \strng{editornamehash}{8c77336299b25bdada7bf8038f46722f} \strng{editorfullhash}{8c77336299b25bdada7bf8038f46722f} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{extradatescope}{labelyear} \field{labeldatesource}{orig} \field{labelnamesource}{editor} \field{labeltitlesource}{title} \field{day}{10} \field{endday}{12} \field{endmonth}{12} \field{endyear}{1996} \field{eventday}{10} \field{eventendday}{12} \field{eventendmonth}{12} \field{eventendyear}{2004} \field{eventmonth}{12} \field{eventyear}{1998} \field{month}{12} \field{origday}{10} \field{origendday}{12} \field{origendmonth}{12} \field{origendyear}{1998} \field{origmonth}{12} \field{origyear}{1998} \field{pubstate}{inpress} \field{title}{Title 2} \field{year}{1996} \field{enddateera}{ce} \field{dateera}{ce} \field{eventenddateera}{ce} \field{eventdateera}{ce} \field{origenddateera}{ce} \field{origdateera}{ce} \endentry |; my $l17e = q| \entry{L17}{proceedings}{} \name{editor}{2}{}{% {{hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}}}% {{hash=df9bf04cd41245e6d23ad7543e7fd90d}{% family={Abrahams}, familyi={A\bibinitperiod}, given={Albert}, giveni={A\bibinitperiod}}}% } \list{publisher}{1}{% {Oxford}% } \strng{namehash}{8c77336299b25bdada7bf8038f46722f} \strng{fullhash}{8c77336299b25bdada7bf8038f46722f} \strng{bibnamehash}{8c77336299b25bdada7bf8038f46722f} \strng{editorbibnamehash}{8c77336299b25bdada7bf8038f46722f} \strng{editornamehash}{8c77336299b25bdada7bf8038f46722f} \strng{editorfullhash}{8c77336299b25bdada7bf8038f46722f} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{extradatescope}{labelyear} \field{labeldatesource}{event} \field{labelnamesource}{editor} \field{labeltitlesource}{title} \field{day}{10} \field{endday}{12} \field{endmonth}{12} \field{endyear}{1996} \field{eventday}{10} \field{eventendday}{12} \field{eventendmonth}{12} \field{eventendyear}{2004} \field{eventmonth}{12} \field{eventyear}{1998} \field{month}{12} \field{origday}{10} \field{origendday}{12} \field{origendmonth}{12} \field{origendyear}{1998} \field{origmonth}{12} \field{origyear}{1998} \field{pubstate}{inpress} \field{title}{Title 2} \field{year}{1996} \field{enddateera}{ce} \field{dateera}{ce} \field{eventenddateera}{ce} \field{eventdateera}{ce} \field{origenddateera}{ce} \field{origdateera}{ce} \endentry |; is_deeply($bibentries->entry('L1')->get_field('warnings'), $l1, 'Date values test 1' ) ; ok(is_undef($bibentries->entry('L1')->get_field('origyear')), 'Date values test 1a - ORIGYEAR undef since ORIGDATE is bad' ) ; ok(is_undef($bibentries->entry('L1')->get_field('urlyear')), 'Date values test 1b - URLYEAR undef since URLDATE is bad' ) ; is_deeply($bibentries->entry('L2')->get_field('warnings'), $l2, 'Date values test 2' ) ; is_deeply($bibentries->entry('L3')->get_field('warnings'), $l3, 'Date values test 3' ) ; is_deeply($bibentries->entry('L4')->get_field('warnings'), $l4, 'Date values test 4' ) ; is_deeply($bibentries->entry('L5')->get_field('warnings'), $l5, 'Date values test 5' ) ; is_deeply($bibentries->entry('L6')->get_field('warnings'), $l6, 'Date values test 6' ) ; is_deeply($bibentries->entry('L7')->get_field('warnings'), $l7, 'Date values test 7' ) ; eq_or_diff($bibentries->entry('L8')->get_field('month'), '1', 'Date values test 8b - MONTH hacked to integer' ) ; ok(is_undef($bibentries->entry('L9')->get_field('warnings')), 'Date values test 9' ) ; ok(is_undef($bibentries->entry('L10')->get_field('warnings')), 'Date values test 10' ) ; is_deeply($bibentries->entry('L11')->get_field('warnings'), $l11, 'Date values test 11' ); eq_or_diff($bibentries->entry('L11')->get_field('year'), '1996', 'Date values test 11a - DATE overrides YEAR' ) ; is_deeply($bibentries->entry('L12')->get_field('warnings'), $l12, 'Date values test 12' ); eq_or_diff($bibentries->entry('L12')->get_field('month'), '1', 'Date values test 12a - DATE overrides MONTH' ) ; # it means something if endyear is defined but null ("1935-") ok(is_def_and_null($bibentries->entry('L13')->get_field('endyear')), 'Date values test 13 - range with no end' ) ; ok(is_undef($bibentries->entry('L13')->get_field('endmonth')), 'Date values test 13a - ENDMONTH undef for open-ended range' ) ; ok(is_undef($bibentries->entry('L13')->get_field('endday')), 'Date values test 13b - ENDDAY undef for open-ended range' ) ; eq_or_diff( $out->get_output_entry('L13', $main), $l13c, 'Date values test 13c - labelyear open-ended range' ) ; eq_or_diff( $out->get_output_entry('L14', $main), $l14, 'Date values test 14 - labelyear same as YEAR when ENDYEAR == YEAR') ; eq_or_diff( $out->get_output_entry('L15', $main), $l15, 'Date values test 15 - labelyear should be undef, no DATE or YEAR') ; # reset options and regenerate information Biber::Config->setblxoption('labeldatespec', [ {content => 'date', type => 'field'}, {content => 'eventdate', type => 'field'}, {content => 'origdate', type => 'field'} ]); $bibentries->del_entry('L17'); $bibentries->del_entry('L16'); $biber->prepare; $out = $biber->get_output_obj; eq_or_diff($bibentries->entry('L16')->get_labeldate_info->{field}{year}, 'eventyear', 'Date values test 16 - labelyear = EVENTYEAR when YEAR is (mistakenly) missing' ) ; eq_or_diff($out->get_output_entry('L16', $main), $l16, 'Date values test 16a - labelyear = EVENTYEAR value when YEAR is (mistakenly) missing' ); eq_or_diff($bibentries->entry('L17')->get_labeldate_info->{field}{year}, 'year', 'Date values test 17 - labelyear = YEAR' ) ; eq_or_diff($out->get_output_entry('L17', $main), $l17, 'Date values test 17a - labelyear = YEAR value when ENDYEAR is the same and ORIGYEAR is also present' ) ; # reset options and regenerate information Biber::Config->setblxoption('labeldatespec', [ {content => 'origdate', type => 'field'}, {content => 'date', type => 'field'}, {content => 'eventdate', type => 'field'} ]); $bibentries->del_entry('L17'); $biber->prepare; $out = $biber->get_output_obj; eq_or_diff($bibentries->entry('L17')->get_labeldate_info->{field}{year}, 'origyear', 'Date values test 17b - labelyear = ORIGYEAR' ) ; eq_or_diff($out->get_output_entry('L17', $main), $l17c, 'Date values test 17c - labelyear = ORIGYEAR value when ENDORIGYEAR is the same and YEAR is also present' ) ; # reset options and regenerate information Biber::Config->setblxoption('labeldatespec', [ {content => 'eventdate', type => 'field'}, {content => 'date', type => 'field'}, {content => 'origdate', type => 'field'} ], 'ENTRYTYPE', 'proceedings'); $bibentries->del_entry('L17'); $biber->prepare; $out = $biber->get_output_obj; eq_or_diff($bibentries->entry('L17')->get_labeldate_info->{field}{year}, 'eventyear', 'Date values test 17d - labelyear = EVENTYEAR' ) ; eq_or_diff($bibentries->entry('L17')->get_labeldate_info->{field}{source}, 'event', 'Date values test 17d - source = event' ) ; eq_or_diff($out->get_output_entry('L17', $main), $l17e, 'Date values test 17e - labelyear = ORIGYEAR-ORIGENDYEAR' ) ; # reset options and regenerate information Biber::Config->setblxoption('labeldatespec', [ {content => 'pubstate', type => 'field'} ], 'ENTRYTYPE', 'proceedings'); $bibentries->del_entry('L17'); $biber->prepare; $out = $biber->get_output_obj; eq_or_diff($bibentries->entry('L17')->get_labeldate_info->{field}{source}, 'pubstate', 'Source is non-date field'); my $era1 = q| \entry{era1}{article}{} \name{author}{1}{}{% {{hash=556c8dba145b472e6a8598d506f7cbe2}{% family={Smith}, familyi={S\\bibinitperiod}, given={Alan}, giveni={A\\bibinitperiod}}}% } \strng{namehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{fullhash}{556c8dba145b472e6a8598d506f7cbe2} \strng{bibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorbibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authornamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{journaltitle}{Journal Title} \field{month}{2} \field{origendyear}{219} \field{origyear}{221} \field{title}{Title} \field{year}{379} \field{dateera}{bce} \field{origenddateera}{bce} \field{origdateera}{bce} \endentry |; my $era2 = q| \entry{era2}{inproceedings}{} \name{author}{1}{}{% {{hash=556c8dba145b472e6a8598d506f7cbe2}{% family={Smith}, familyi={S\\bibinitperiod}, given={Alan}, giveni={A\\bibinitperiod}}}% } \strng{namehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{fullhash}{556c8dba145b472e6a8598d506f7cbe2} \strng{bibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorbibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authornamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{booktitle}{Book Title} \field{eventyear}{249} \field{origendyear}{44} \field{origyear}{49} \field{title}{Title} \field{year}{197} \field{dateera}{bce} \field{eventdateera}{bce} \field{origenddateera}{bce} \field{origdateera}{bce} \endentry |; my $era3 = q| \entry{era3}{inproceedings}{} \name{author}{1}{}{% {{hash=556c8dba145b472e6a8598d506f7cbe2}{% family={Smith}, familyi={S\\bibinitperiod}, given={Alan}, giveni={A\\bibinitperiod}}}% } \strng{namehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{fullhash}{556c8dba145b472e6a8598d506f7cbe2} \strng{bibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorbibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authornamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{booktitle}{Book Title} \field{eventday}{2} \field{eventmonth}{3} \field{eventyear}{250} \field{month}{2} \field{title}{Title} \field{year}{196} \field{dateera}{bce} \true{eventdatejulian} \field{eventdateera}{ce} \endentry |; my $era4 = q| \entry{era4}{inproceedings}{} \name{author}{1}{}{% {{hash=556c8dba145b472e6a8598d506f7cbe2}{% family={Smith}, familyi={S\\bibinitperiod}, given={Alan}, giveni={A\\bibinitperiod}}}% } \strng{namehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{fullhash}{556c8dba145b472e6a8598d506f7cbe2} \strng{bibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorbibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authornamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{booktitle}{Book Title} \field{eventyear}{1565} \field{origendyear}{1488} \field{origyear}{1487} \field{title}{Title} \field{urlendyear}{1490} \field{urlyear}{1487} \field{year}{1034} \true{datecirca} \field{dateera}{ce} \true{eventdateuncertain} \field{eventdateera}{ce} \true{origenddatecirca} \field{origenddateera}{ce} \field{origdateera}{ce} \true{urldatecirca} \field{urlenddateera}{ce} \field{urldateera}{ce} \endentry |; my $time1 = q| \entry{time1}{article}{} \name{author}{1}{}{% {{hash=556c8dba145b472e6a8598d506f7cbe2}{% family={Smith}, familyi={S\\bibinitperiod}, given={Alan}, giveni={A\\bibinitperiod}}}% } \strng{namehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{fullhash}{556c8dba145b472e6a8598d506f7cbe2} \strng{bibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorbibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authornamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{day}{3} \field{hour}{15} \field{journaltitle}{Journal Title} \field{minute}{0} \field{month}{1} \field{origday}{3} \field{orighour}{17} \field{origminute}{7} \field{origmonth}{1} \field{origsecond}{34} \field{origtimezone}{Z} \field{origyear}{2001} \field{second}{0} \field{title}{Title} \field{urlday}{3} \field{urlhour}{17} \field{urlminute}{7} \field{urlmonth}{1} \field{urlsecond}{34} \field{urltimezone}{+05\bibtzminsep 00} \field{urlyear}{2001} \field{year}{2001} \field{dateera}{ce} \field{origdateera}{ce} \field{urldateera}{ce} \endentry |; my $range1 = q| \entry{range1}{inproceedings}{} \name{author}{1}{}{% {{hash=556c8dba145b472e6a8598d506f7cbe2}{% family={Smith}, familyi={S\\bibinitperiod}, given={Alan}, giveni={A\\bibinitperiod}}}% } \strng{namehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{fullhash}{556c8dba145b472e6a8598d506f7cbe2} \strng{bibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorbibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authornamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{extradate}{1} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{booktitle}{Book Title} \field{endyear}{} \field{eventendyear}{} \field{eventyear}{1565} \field{origendyear}{} \field{origyear}{2000} \field{title}{Title} \field{urlendyear}{1034} \field{urlyear}{} \field{year}{1034} \true{enddateunknown} \field{dateera}{ce} \field{eventdateera}{ce} \field{origdateera}{ce} \true{urldateunknown} \field{urlenddateera}{ce} \endentry |; my $range2 = q| \entry{range2}{inproceedings}{} \name{author}{1}{}{% {{hash=556c8dba145b472e6a8598d506f7cbe2}{% family={Smith}, familyi={S\\bibinitperiod}, given={Alan}, giveni={A\\bibinitperiod}}}% } \strng{namehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{fullhash}{556c8dba145b472e6a8598d506f7cbe2} \strng{bibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorbibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authornamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{extradate}{2} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{booktitle}{Book Title} \field{endyear}{} \field{eventendyear}{1565} \field{eventyear}{} \field{origendyear}{2000} \field{origyear}{} \field{title}{Title} \field{urlendyear}{1034} \field{urlyear}{} \field{year}{1034} \true{enddateunknown} \field{dateera}{ce} \field{eventenddateera}{ce} \field{origenddateera}{ce} \true{urldateunknown} \field{urlenddateera}{ce} \endentry |; my $season1 = q| \entry{season1}{inproceedings}{} \name{author}{1}{}{% {{hash=556c8dba145b472e6a8598d506f7cbe2}{% family={Smith}, familyi={S\\bibinitperiod}, given={Alan}, giveni={A\\bibinitperiod}}}% } \strng{namehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{fullhash}{556c8dba145b472e6a8598d506f7cbe2} \strng{bibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorbibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authornamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{booktitle}{Book Title} \field{eventseason}{autumn} \field{eventyear}{2002} \field{season}{spring} \field{title}{Title} \field{year}{2003} \field{dateera}{ce} \field{eventdateera}{ce} \endentry |; my $unspec1 = q| \entry{unspec1}{inproceedings}{} \name{author}{1}{}{% {{hash=556c8dba145b472e6a8598d506f7cbe2}{% family={Smith}, familyi={S\\bibinitperiod}, given={Alan}, giveni={A\\bibinitperiod}}}% } \strng{namehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{fullhash}{556c8dba145b472e6a8598d506f7cbe2} \strng{bibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorbibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authornamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{booktitle}{Book Title} \field{endyear}{1999} \field{eventendyear}{1999} \field{eventyear}{1900} \field{origendmonth}{12} \field{origendyear}{1999} \field{origmonth}{1} \field{origyear}{1999} \field{title}{Title} \field{urlday}{1} \field{urlendday}{31} \field{urlendmonth}{1} \field{urlendyear}{1999} \field{urlmonth}{1} \field{urlyear}{1999} \field{year}{1990} \field{dateunspecified}{yearindecade} \field{enddateera}{ce} \field{dateera}{ce} \field{eventdateunspecified}{yearincentury} \field{eventenddateera}{ce} \field{eventdateera}{ce} \field{origdateunspecified}{monthinyear} \field{origenddateera}{ce} \field{origdateera}{ce} \field{urldateunspecified}{dayinmonth} \field{urlenddateera}{ce} \field{urldateera}{ce} \\endentry |; my $unspec2 = q| \entry{unspec2}{article}{} \name{author}{1}{}{% {{hash=556c8dba145b472e6a8598d506f7cbe2}{% family={Smith}, familyi={S\\bibinitperiod}, given={Alan}, giveni={A\\bibinitperiod}}}% } \strng{namehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{fullhash}{556c8dba145b472e6a8598d506f7cbe2} \strng{bibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorbibnamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authornamehash}{556c8dba145b472e6a8598d506f7cbe2} \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{day}{1} \field{endday}{31} \field{endmonth}{12} \field{endyear}{1999} \field{journaltitle}{Journal Title} \field{month}{1} \field{title}{Title} \field{year}{1999} \field{dateunspecified}{dayinyear} \field{enddateera}{ce} \field{dateera}{ce} \endentry |; Biber::Config->setblxoption('labeldatespec', [ {content => 'date', type => 'field'}, {content => 'eventdate', type => 'field'}, {content => 'origdate', type => 'field'}, {content => 'urldate', type => 'field'} ]); # Because datamodel valdidation saves warning fields $bibentries->del_entry('era1'); $bibentries->del_entry('era2'); $bibentries->del_entry('era3'); $bibentries->del_entry('era4'); $bibentries->del_entry('range1'); $bibentries->del_entry('range2'); $bibentries->del_entry('season1'); $bibentries->del_entry('time1'); $bibentries->del_entry('unspec1'); $bibentries->del_entry('unspec2'); $biber->prepare; $out = $biber->get_output_obj; # Test negative dates and eras eq_or_diff($out->get_output_entry('era1', $main), $era1, 'Date meta information - 1'); eq_or_diff($out->get_output_entry('era2', $main), $era2, 'Date meta information - 2'); eq_or_diff($out->get_output_entry('era3', $main), $era3, 'Date meta information - 3'); eq_or_diff($out->get_output_entry('era4', $main), $era4, 'Date meta information - 4'); # Test range markers eq_or_diff($out->get_output_entry('range1', $main), $range1, 'Range - 1'); eq_or_diff($out->get_output_entry('range2', $main), $range2, 'Range - 2'); # Test seasons eq_or_diff($out->get_output_entry('season1', $main), $season1, 'Seasons - 1'); # Test Unspecified format eq_or_diff($out->get_output_entry('unspec1', $main), $unspec1, 'Unspecified - 1'); eq_or_diff($out->get_output_entry('unspec2', $main), $unspec2, 'Unspecified - 2'); # Test times eq_or_diff($out->get_output_entry('time1', $main), $time1, 'Times - 1'); # Test open start dates when they are the labeldate eq_or_diff($bibentries->entry('open1')->get_field('labeldatesource'), '', 'Open - 1'); eq_or_diff($bibentries->entry('open2')->get_field('labeldatesource'), '', 'Open - 2'); # Test long year formats eq_or_diff($bibentries->entry('y1')->get_field('year'), '17000002', 'Extended years - 1'); eq_or_diff($bibentries->entry('y2')->get_field('year'), '-17000002', 'Extended years - 2'); eq_or_diff($bibentries->entry('y3')->get_field('year'), undef, 'Extended years - 3'); biblatex-biber-2.9/t/bibtex-aliases.t000444000153000001 1105613205066062 17205 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 24; use Test::Differences; unified_diff; use Biber; use Biber::Utils; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata") ; # Set up Biber object my $biber = Biber->new( noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('bibtex-aliases.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); Biber::Config->setoption('validate_datamodel', 1); # THERE IS A MAPPING SECTION IN THE .bcf BEING USED TO TEST USER MAPS TOO! # Now generate the information $biber->prepare; my $section = $biber->sections->get_section(0); my $bibentries = $section->bibentries; my $w1 = ["Datamodel: Entry 'alias2' (bibtex-aliases.bib): Field 'school' invalid in data model - ignoring", "Datamodel: Entry 'alias2' (bibtex-aliases.bib): Invalid entry type 'thing' - defaulting to 'misc'", "Datamodel: Entry 'alias2' (bibtex-aliases.bib): Invalid field 'institution' for entrytype 'misc'", ]; my $w2 = ["Datamodel: Entry 'alias4' (bibtex-aliases.bib): Invalid field 'author' for entrytype 'customa'", "Datamodel: Entry 'alias4' (bibtex-aliases.bib): Invalid field 'eprint' for entrytype 'customa'", "Datamodel: Entry 'alias4' (bibtex-aliases.bib): Invalid field 'eprinttype' for entrytype 'customa'", "Datamodel: Entry 'alias4' (bibtex-aliases.bib): Invalid field 'namea' for entrytype 'customa'", "Datamodel: Entry 'alias4' (bibtex-aliases.bib): Invalid field 'title' for entrytype 'customa'", ]; eq_or_diff($bibentries->entry('alias1')->get_field('entrytype'), 'thesis', 'Alias - 1' ); eq_or_diff($bibentries->entry('alias1')->get_field('type'), 'phdthesis', 'Alias - 2' ); is_deeply($bibentries->entry('alias1')->get_field('location'), ['Ivory Towers'], 'Alias - 3' ); eq_or_diff($bibentries->entry('alias1')->get_field('address'), undef, 'Alias - 4' ); eq_or_diff($bibentries->entry('alias2')->get_field('entrytype'), 'misc', 'Alias - 5' ); is_deeply($bibentries->entry('alias2')->get_field('warnings'), $w1, 'Alias - 6' ) ; eq_or_diff($bibentries->entry('alias2')->get_field('school'), undef, 'Alias - 7' ); eq_or_diff($bibentries->entry('alias3')->get_field('entrytype'), 'customb', 'Alias - 8' ); eq_or_diff($bibentries->entry('alias4')->get_field('entrytype'), 'customa', 'Alias - 9' ); eq_or_diff($bibentries->entry('alias4')->get_field('verba'), 'conversation', 'Alias - 10' ); eq_or_diff($bibentries->entry('alias4')->get_field('verbb'), 'somevalue', 'Alias - 11' ); eq_or_diff($bibentries->entry('alias4')->get_field('eprint'), 'anid', 'Alias - 12' ); eq_or_diff($bibentries->entry('alias4')->get_field('eprinttype'), 'pubmedid', 'Alias - 13' ); eq_or_diff($bibentries->entry('alias4')->get_field('userd'), 'Some string of things', 'Alias - 14' ); eq_or_diff($bibentries->entry('alias4')->get_field('pubmedid'), undef, 'Alias - 15' ); eq_or_diff($bibentries->entry('alias4')->get_field('namea')->nth_name(1)->get_namepart('given'), 'Sam', 'Alias - 16' ); is_deeply($bibentries->entry('alias4')->get_field('warnings'), $w2, 'Alias - 17' ) ; # Testing of .bcf field map match/replace ok(is_undef($bibentries->entry('alias5')->get_field('abstract')), 'Alias - 18' ); eq_or_diff($biber->_liststring('alias5', 'listb'), 'REPlaCEDte!early', 'Alias - 19'); eq_or_diff($biber->_liststring('alias5', 'institution'), 'REPlaCEDte!early', 'Alias - 20'); # Testing of no target but just field additions is_deeply($bibentries->entry('alias6')->get_field('keywords'), ['keyw1', 'keyw2'], 'Alias - 21' ); # Testing of no regexp match for field value is_deeply($bibentries->entry('alias7')->get_field('lista'), ['listaval'], 'Alias - 22' ); # Testing append overwrites eq_or_diff($bibentries->entry('alias7')->get_field('verbb'), 'val2val1', 'Alias - 23' ); eq_or_diff($bibentries->entry('alias7')->get_field('verbc'), 'val3val2val1', 'Alias - 24' ); biblatex-biber-2.9/t/set-dynamic.t000444000153000001 1472613205066061 16534 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 7; use Test::Differences; unified_diff; use Biber; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('set-dynamic.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Now generate the information $biber->prepare; my $section0 = $biber->sections->get_section(0); my $main0 = $biber->datalists->get_list('none/global//global/global'); my $sh0 = $biber->datalists->get_list('shorthand/global//global/global', 0, 'list'); my $section1 = $biber->sections->get_section(1); my $main1 = $biber->datalists->get_list('none/global//global/global', 1); my $sh1 = $biber->datalists->get_list('shorthand/global//global/global', 1, 'list'); my $out = $biber->get_output_obj; my $string1 = q| \entry{DynSet}{set}{} \set{Dynamic1,Dynamic2,Dynamic3} \field{sortinit}{1} \field{sortinithash}{2174f786c6195e7fe2ee1c229b416e29} \endentry |; my $string2 = q| \entry{Dynamic1}{book}{} \inset{DynSet} \name{author}{1}{}{% {{hash=252caa7921a061ca92087a1a52f15b78}{% family={Dynamism}, familyi={D\bibinitperiod}, given={Derek}, giveni={D\bibinitperiod}}}% } \strng{namehash}{252caa7921a061ca92087a1a52f15b78} \strng{fullhash}{252caa7921a061ca92087a1a52f15b78} \strng{bibnamehash}{252caa7921a061ca92087a1a52f15b78} \strng{authorbibnamehash}{252caa7921a061ca92087a1a52f15b78} \strng{authornamehash}{252caa7921a061ca92087a1a52f15b78} \strng{authorfullhash}{252caa7921a061ca92087a1a52f15b78} \field{sortinit}{8} \field{sortinithash}{07edf88d4ea82509b9c4b4d13f41c452} \field{labeldatesource}{year} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{annotation}{Some Dynamic Note} \field{shorthand}{d1} \field{title}{Doing Daring Deeds} \field{year}{2002} \endentry |; my $string3 = q| \entry{Dynamic2}{book}{} \inset{DynSet} \name{author}{1}{}{% {{hash=894a5fe6de820f5dcce84a65581667f4}{% family={Bunting}, familyi={B\bibinitperiod}, given={Brian}, giveni={B\bibinitperiod}}}% } \strng{namehash}{894a5fe6de820f5dcce84a65581667f4} \strng{fullhash}{894a5fe6de820f5dcce84a65581667f4} \strng{bibnamehash}{894a5fe6de820f5dcce84a65581667f4} \strng{authorbibnamehash}{894a5fe6de820f5dcce84a65581667f4} \strng{authornamehash}{894a5fe6de820f5dcce84a65581667f4} \strng{authorfullhash}{894a5fe6de820f5dcce84a65581667f4} \field{sortinit}{9} \field{sortinithash}{1dd72ab054147731c9d824b49aba0534} \field{labeldatesource}{year} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{shorthand}{d2} \field{title}{Beautiful Birthdays} \field{year}{2010} \endentry |; my $string4 = q| \entry{Dynamic3}{book}{} \inset{DynSet} \name{author}{1}{}{% {{hash=fc3cc97631ceaecdde2aee6cc60ab42b}{% family={Regardless}, familyi={R\bibinitperiod}, given={Roger}, giveni={R\bibinitperiod}}}% } \strng{namehash}{fc3cc97631ceaecdde2aee6cc60ab42b} \strng{fullhash}{fc3cc97631ceaecdde2aee6cc60ab42b} \strng{bibnamehash}{fc3cc97631ceaecdde2aee6cc60ab42b} \strng{authorbibnamehash}{fc3cc97631ceaecdde2aee6cc60ab42b} \strng{authornamehash}{fc3cc97631ceaecdde2aee6cc60ab42b} \strng{authorfullhash}{fc3cc97631ceaecdde2aee6cc60ab42b} \field{sortinit}{1} \field{sortinithash}{2174f786c6195e7fe2ee1c229b416e29} \field{labeldatesource}{year} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{shorthand}{d3} \field{title}{Reckless Ravishings} \field{year}{2000} \endentry |; # Labelyear is now here as skiplab is not set for this entry when cited in section # without citation of a set it is a member of my $string5 = q| \entry{Dynamic3}{book}{} \name{author}{1}{}{% {{hash=fc3cc97631ceaecdde2aee6cc60ab42b}{% family={Regardless}, familyi={R\bibinitperiod}, given={Roger}, giveni={R\bibinitperiod}}}% } \strng{namehash}{fc3cc97631ceaecdde2aee6cc60ab42b} \strng{fullhash}{fc3cc97631ceaecdde2aee6cc60ab42b} \strng{bibnamehash}{fc3cc97631ceaecdde2aee6cc60ab42b} \strng{authorbibnamehash}{fc3cc97631ceaecdde2aee6cc60ab42b} \strng{authornamehash}{fc3cc97631ceaecdde2aee6cc60ab42b} \strng{authorfullhash}{fc3cc97631ceaecdde2aee6cc60ab42b} \field{sortinit}{1} \field{sortinithash}{2174f786c6195e7fe2ee1c229b416e29} \field{labeldatesource}{year} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{shorthand}{d3} \field{title}{Reckless Ravishings} \field{year}{2000} \endentry |; # Make sure allkeys works with dynamic sets my @allkeys = qw(dynamic1 dynamic2 dynamic3 dynset elias1955 elias1955a elias1955b static1 static2 static3 static4); my @keys = sort map {lc()} $section0->get_citekeys; is_deeply( \@keys, \@allkeys, 'citekeys') ; eq_or_diff($out->get_output_entry('DynSet', $main0), $string1, 'Dynamic set test 1'); eq_or_diff($out->get_output_entry('Dynamic1', $main0), $string2, 'Dynamic set test 2'); eq_or_diff($out->get_output_entry('Dynamic2', $main0), $string3, 'Dynamic set test 3'); eq_or_diff($out->get_output_entry('Dynamic3', $main0), $string4, 'Dynamic set test 4'); eq_or_diff($out->get_output_entry('Dynamic3', $main1, 1), $string5, 'Dynamic set test 5'); eq_or_diff($out->get_output_entry('Dynamic1', $sh0), $string2, 'Dynamic set skipbiblist 1'); biblatex-biber-2.9/t/bibtex-output.t000444000153000001 662213205066062 17107 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use Test::More tests => 5; use Test::Differences; unified_diff; use Encode; use Biber; use Biber::Utils; use Biber::Output::bibtex; use Log::Log4perl; use Unicode::Normalize; chdir("t/tdata"); no warnings 'utf8'; use utf8; # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('output_resolve_xdata', 1); Biber::Config->setoption('output_resolve_crossrefs', 1); Biber::Config->setoption('output_format', 'bibtex'); Biber::Config->setoption('output_align', '1'); Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); $biber->parse_ctrlfile('bibtex-output.bcf'); $biber->set_output_obj(Biber::Output::bibtex->new()); # Now generate the information $biber->prepare_tool; my $main = $biber->datalists->get_list(Biber::Config->getblxoption('sortingtemplatename') . '/global//global/global', 99999, 'entry'); my $out = $biber->get_output_obj; my $b1 = q|@ARTICLE{murray, AUTHOR = {Hostetler, Michael J. and Wingate, Julia E. and Zhong, Chuan-Jian and Harris, Jay E. and Vachet, Richard W. and Clark, Michael R. and Londono, J. David and Green, Stephen J. and Stokes, Jennifer J. and Wignall, George D. and Glish, Gary L. and Porter, Marc D. and Evans, Neal D. and Murray, Royce W.}, ANNOTATION = {An \texttt{article} entry with \arabic{author} authors. By default, long author and editor lists are automatically truncated. This is configurable}, DATE = {1998}, INDEXTITLE = {Alkanethiolate gold cluster molecules}, JOURNALTITLE = {Langmuir}, LANGID = {english}, LANGIDOPTS = {variant=american}, NUMBER = {1}, PAGES = {17--30}, SHORTTITLE = {Alkanethiolate gold cluster molecules}, SUBTITLE = {Core and monolayer properties as a function of core size}, TITLE = {Alkanethiolate gold cluster molecules with core diameters from 1.5 to 5.2~nm}, VOLUME = {14}, } |; my $b2 = q|@BOOK{b1, LOCATION = {London and Edinburgh}, LOCATION+an = {1=ann1;2=ann2}, DATE = {1999}, MAINSUBTITLE = {Mainsubtitle}, MAINTITLE = {Maintitle}, MAINTITLEADDON = {Maintitleaddon}, TITLE = {Booktitle}, TITLE+an = {=ann1, ann2}, } |; my $b3 = q|@BOOK{xd1, AUTHOR = {Ellington, Edward Paul}, LOCATION = {New York and London}, PUBLISHER = {Macmillan}, DATE = {2001}, NOTE = {A Note}, } |; eq_or_diff($out->get_output_entry('murray',), $b1, 'bibtex output 1'); eq_or_diff($out->get_output_entry('b1',), $b2, 'bibtex output 2'); eq_or_diff($out->get_output_entry('xd1',), $b3, 'bibtex output 3'); ok(is_undef($out->get_output_entry('reese')), 'bibtex output 4'); is_deeply($main->get_keys, ['murray', 'kant:ku', 'b1', 'xd1'], 'bibtex output sorting'); biblatex-biber-2.9/t/utils.t000444000153000001 2251213205066062 15450 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8' ; use open qw/:std :utf8/; use Test::More tests => 78; use Test::Differences; unified_diff; use Biber; use Biber::Entry::Name; use Biber::Entry::Names; use Biber::Utils; use Biber::LaTeX::Recode; use Log::Log4perl; use IPC::Cmd qw( can_run ); use Cwd; use Unicode::Normalize; use Encode; my $cwd = getcwd; my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); # NFD/NFC calls below as we are accessing internal functions which assume NFD and results strings # which assume NFC. # File locating # Using File::Spec->canonpath() to normalise path separators so these tests work # on Windows/non-Windows # Absolute path eq_or_diff(File::Spec->canonpath(locate_biber_file("$cwd/t/tdata/general.bcf")), File::Spec->canonpath("$cwd/t/tdata/general.bcf"), 'File location - 1'); # Relative path eq_or_diff(File::Spec->canonpath(locate_biber_file('t/tdata/general.bcf')), File::Spec->canonpath('t/tdata/general.bcf'), 'File location - 2'); # Same place as control file Biber::Config->set_ctrlfile_path('t/tdata/general.bcf'); eq_or_diff(File::Spec->canonpath(locate_biber_file('t/tdata/examples.bib')), File::Spec->canonpath('t/tdata/examples.bib'), 'File location - 3'); # The \cM* is there because if cygwin picks up miktex kpsewhich, it will return a path # with a Ctrl-M on the end # Testing using a file guaranteed to be installed with any latex install SKIP: { skip "No LaTeX installation", 1 unless can_run('kpsewhich'); # using kpsewhich like(File::Spec->canonpath(locate_biber_file('plain.tex')), qr|plain.tex\cM*\z|, 'File location - 4'); } # In output_directory Biber::Config->setoption('output_directory', 't/tdata'); eq_or_diff(File::Spec->canonpath(locate_biber_file('general.bcf')), File::Spec->canonpath("t/tdata/general.bcf"), 'File location - 5'); # String normalising eq_or_diff(normalise_string('"a, b–c: d" ', 1), 'a bc d', 'normalise_string' ); Biber::Config->setoption('output_encoding', 'UTF-8'); eq_or_diff(NFC(normalise_string_underscore(latex_decode('\c Se\x{c}\"ok-\foo{a}, N\`i\~no $§+ :-) '), 0)), 'Şecöka_Nìño', 'normalise_string_underscore 1' ); eq_or_diff(normalise_string_underscore('{Foo de Bar, Graf Ludwig}', 1), 'Foo_de_Bar_Graf_Ludwig', 'normalise_string_underscore 3'); # LaTeX decoding/encoding # There is a "\x{131}\x{304}" but might look like nothing in current font eq_or_diff(NFC(latex_decode('Mu\d{h}ammad ibn M\=us\=a al-Khw\=arizm\={\i} \r{a}')), 'Muḥammad ibn Mūsā al-Khwārizmı̄ å', 'latex decode 1'); eq_or_diff(latex_decode('\alpha'), '\alpha', 'latex decode 2'); # no greek decoding by default eq_or_diff(latex_decode('\textless\textampersand'), '<&', 'latex decode 3'); # checking XML encoding bits eq_or_diff(latex_encode(NFD('Muḥammad ibn Mūsā al-Khwārizmī')), 'Mu\d{h}ammad ibn M\={u}s\={a} al-Khw\={a}rizm\={\i}', 'latex encode 1'); eq_or_diff(latex_encode(NFD('α')), 'α', 'latex encode 2'); # no greek encoding by default eq_or_diff(NFC(latex_decode("{M{\\'a}t{\\'e}}")), '{M{á}t{é}}', 'latex decode accent 1 (with explicit brace protection)'); eq_or_diff(NFC(latex_decode("{M\\'{a}t\\'{e}}")), '{Máté}', 'latex decode accent 2'); eq_or_diff(NFC(latex_decode("{M\\'at\\'e}")), '{Máté}', 'latex decode accent 3'); eq_or_diff(NFC(latex_decode("R{\\'egis}")), 'R{égis}', 'latex decode accent 4'); eq_or_diff(NFC(latex_decode("\\frac{a}{b}")), '\frac{a}{b}', 'latex decode accent 5'); eq_or_diff(NFC(latex_decode("\\textuppercase{\\'e}")), '\textuppercase{é}', 'latex decode accent 5'); eq_or_diff(NFC(latex_decode("\\DH{}and\\dj{}and\\'{c}, H.")), 'Ðandđandć, H.', 'latex reversing recoding test 1'); eq_or_diff(NFC(latex_decode("{\\DH{}and\\dj{}and\\'{c}, H.}")), '{Ðandđandć, H.}', 'latex reversing recoding test 2'); eq_or_diff(latex_encode(NFD('Ðandđandć, H.')), '\\DH{}and\\dj{}and\\\'{c}, H.', 'latex reversing recoding test 3'); eq_or_diff(latex_encode(NFD('{Ðandđandć, H.}')), '{\\DH{}and\\dj{}and\\\'{c}, H.}', 'latex reversing recoding test 4'); Biber::LaTeX::Recode->init_sets('full', 'full'); # Need to do this to reset eq_or_diff(NFC(latex_decode('{\"{U}}ber {\"{U}}berlegungen zur {\"{U}}berwindung des {\"{U}}bels')), '{Ü}ber {Ü}berlegungen zur {Ü}berwindung des {Ü}bels', 'latex decode 4 (with explicit brace protection)'); eq_or_diff(latex_decode('\alpha'), 'α', 'latex decode 4a'); # greek decoding with "full" eq_or_diff(NFC(latex_decode("\\'\\i")), 'ı́', 'latex decode 5'); # checking i/j with accents eq_or_diff(NFC(latex_decode("{\\'\\i}")), '{ı́}', 'latex decode 5a (with explicit brace protection)'); # checking i/j with accents eq_or_diff(NFC(latex_decode("\\^{\\j}")), 'ȷ̂', 'latex decode 6'); # checking i/j with accents eq_or_diff(NFC(latex_decode("\\u{\\i}")), 'ı̆', 'latex decode 7'); # checking i/j with accents eq_or_diff(NFC(latex_decode("\\u\\i")), 'ı̆', 'latex decode 8'); # checking i/j with accents eq_or_diff(latex_decode('\i'), 'ı', 'latex decode 9'); # checking dotless i eq_or_diff(latex_decode('\j'), 'ȷ', 'latex decode 10'); # checking dotless j eq_or_diff(latex_decode('\textdiv'), '÷', 'latex decode 11'); # checking multiple set for types eq_or_diff(latex_decode('--'), '--', 'latex decode 13'); # Testing raw eq_or_diff(latex_decode('\textdegree C'), '°C', 'latex decode 14'); eq_or_diff(latex_encode(NFD('α')), '{$\alpha$}', 'latex encode 3'); # greek encoding with "full" eq_or_diff(latex_encode(NFD('µ')), '{$\mu$}', 'latex encode 4'); # Testing symbols eq_or_diff(latex_encode(NFD('≄')), '{$\not\simeq$}', 'latex encode 5'); # Testing negated symbols eq_or_diff(latex_encode(NFD('Þ')), '\TH{}', 'latex encode 6'); # Testing preferred eq_or_diff(latex_encode('$'), '$', 'latex encode 7'); # Testing exclude eq_or_diff(latex_encode(NFD('–')), '--', 'latex encode 8'); # Testing raw eq_or_diff(latex_decode('a\-a'), 'a\-a', 'discretionary hyphens'); eq_or_diff(latex_encode(NFD('Åå')), '\r{A}\r{a}', 'latex encode 9'); eq_or_diff(latex_encode(NFD('a̍')), '\|{a}', 'latex encode 10'); eq_or_diff(latex_encode(NFD('ı̆')), '\u{\i{}}', 'latex encode 11'); eq_or_diff(latex_encode(NFD('®')), '\textregistered{}', 'latex encode 12'); eq_or_diff(latex_encode(NFD('©')), '{$\copyright$}', 'latex encode 13'); eq_or_diff(latex_encode(NFD('°C')), '\textdegree{}C', 'latex encode 13'); my @arrayA = qw/ a b c d e f c /; my @arrayB = qw/ c e /; my @AminusB = reduce_array(\@arrayA, \@arrayB); my @AminusBexpected = qw/ a b d f /; is_deeply(\@AminusB, \@AminusBexpected, 'reduce_array') ; eq_or_diff((remove_outer('{Some string}'))[0], 1, 'remove_outer - 1') ; eq_or_diff((remove_outer('{Some string}'))[1], 'Some string', 'remove_outer - 2') ; eq_or_diff(normalise_string_hash('Ä.~{\c{C}}.~{\c S}.'), 'Äc:Cc:S', 'normalise_string_lite' ) ; Biber::LaTeX::Recode->init_sets('base', 'full'); # Need to do this to reset eq_or_diff(latex_decode('\textdiv'), '\textdiv', 'latex different encode/decode sets 1'); eq_or_diff(latex_encode(NFD('÷')), '{$\\div$}', 'latex different encode/decode sets 2'); Biber::LaTeX::Recode->init_sets('null', 'full'); # Need to do this to reset eq_or_diff(latex_decode('\i'), '\i', 'latex null decode 1'); eq_or_diff(latex_encode(NFD('ı')), '\i{}', 'latex null encode 2'); eq_or_diff(rangelen([[10,15]]), 6, 'Rangelen test 1'); eq_or_diff(rangelen([[10,15],[47, 53]]), 13, 'Rangelen test 2'); eq_or_diff(rangelen([[10,15],[47, undef]]), 7, 'Rangelen test 3'); eq_or_diff(rangelen([[10,15],[47, '']]), -1, 'Rangelen test 4'); eq_or_diff(rangelen([[10,15],['', 35]]), -1, 'Rangelen test 5'); eq_or_diff(rangelen([[10,15],['', undef]]), -1, 'Rangelen test 6'); eq_or_diff(rangelen([[10,15],['XX', 'XXiv'],['i',10]]), 21, 'Rangelen test 7'); # This is nasty - it's U+2165 U+2160, U+217B to test unicode decomp eq_or_diff(rangelen([[10,15],['ⅥⅠ', 'ⅻ']]), 12, 'Rangelen test 8'); eq_or_diff(rangelen([['I-II', 'III-IV']]), -1, 'Rangelen test 9'); eq_or_diff(rangelen([[22,4],[123,7],[113,15]]), 11, 'Rangelen test 10'); # Test boolean mappings eq_or_diff(map_boolean('true', 'tonum'), 1, 'Boolean conversion - 1'); eq_or_diff(map_boolean('False', 'tonum'), 0, 'Boolean conversion - 2'); eq_or_diff(map_boolean(1, 'tostring'), 'true', 'Boolean conversion - 3'); eq_or_diff(map_boolean(0, 'tostring'), 'false', 'Boolean conversion - 4'); eq_or_diff(map_boolean(0, 'tonum'), 0, 'Boolean conversion - 5'); # Range parsing eq_or_diff(parse_range('1--2'), [1,2], 'Range parsing - 1'); eq_or_diff(parse_range('-2'), [1,2], 'Range parsing - 2'); eq_or_diff(parse_range('3-'), [3,undef], 'Range parsing - 3'); eq_or_diff(parse_range('5'), [1,5], 'Range parsing - 4'); eq_or_diff(parse_range('3--+'), [3,'+'], 'Range parsing - 5'); # split_xsv eq_or_diff([split_xsv('family=a, given=a b, given-i=a b c')], ['family=a', 'given=a b', 'given-i=a b c'], 'split_xsv - 1'); eq_or_diff([split_xsv('"family={Something, here}", given=b')], ['family={Something, here}', 'given=b'], 'split_xsv - 2'); biblatex-biber-2.9/t/uniqueness-nameparts.t000444000153000001 5271613205066062 20510 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 36; use Test::Differences; unified_diff; use Biber; use Biber::Utils; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('uniqueness-nameparts.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('uniquename', 2); # Now generate the information $biber->prepare; my $section = $biber->sections->get_section(0); my $bibentries = $section->bibentries; my $un1nlid = $bibentries->entry('un1')->get_field($bibentries->entry('un1')->get_labelname_info)->get_id; my $un1nid = $bibentries->entry('un1')->get_field($bibentries->entry('un1')->get_labelname_info)->nth_name(1)->get_id; my $un2nlid = $bibentries->entry('un2')->get_field($bibentries->entry('un2')->get_labelname_info)->get_id; my $un2nid = $bibentries->entry('un2')->get_field($bibentries->entry('un2')->get_labelname_info)->nth_name(1)->get_id; my $un3nlid = $bibentries->entry('un3')->get_field($bibentries->entry('un3')->get_labelname_info)->get_id; my $un3nid = $bibentries->entry('un3')->get_field($bibentries->entry('un3')->get_labelname_info)->nth_name(1)->get_id; my $un4nlid = $bibentries->entry('un4')->get_field($bibentries->entry('un4')->get_labelname_info)->get_id; my $un4nid = $bibentries->entry('un4')->get_field($bibentries->entry('un4')->get_labelname_info)->nth_name(1)->get_id; my $un5nlid = $bibentries->entry('un5')->get_field($bibentries->entry('un5')->get_labelname_info)->get_id; my $un5nid = $bibentries->entry('un5')->get_field($bibentries->entry('un5')->get_labelname_info)->nth_name(1)->get_id; my $un6nlid = $bibentries->entry('un6')->get_field($bibentries->entry('un6')->get_labelname_info)->get_id; my $un6nid = $bibentries->entry('un6')->get_field($bibentries->entry('un6')->get_labelname_info)->nth_name(1)->get_id; my $un7nlid = $bibentries->entry('un7')->get_field($bibentries->entry('un7')->get_labelname_info)->get_id; my $un7nid = $bibentries->entry('un7')->get_field($bibentries->entry('un7')->get_labelname_info)->nth_name(1)->get_id; my $out = $biber->get_output_obj; my $un1 = q| \entry{un1}{article}{} \name{author}{1}{}{% {{uniquename=1,uniquepart=middle,hash=329d8f9192ea3349d700160c9ddb505d}{% family={Smith}, familyi={S\bibinitperiod}, given={John}, giveni={J\bibinitperiod}, givenun=1, middle={Simon}, middlei={S\bibinitperiod}, middleun=1}}% } \strng{namehash}{329d8f9192ea3349d700160c9ddb505d} \strng{fullhash}{329d8f9192ea3349d700160c9ddb505d} \strng{bibnamehash}{329d8f9192ea3349d700160c9ddb505d} \strng{authorbibnamehash}{329d8f9192ea3349d700160c9ddb505d} \strng{authornamehash}{329d8f9192ea3349d700160c9ddb505d} \strng{authorfullhash}{329d8f9192ea3349d700160c9ddb505d} \field{labelalpha}{SmiJohSim} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{labelnamesource}{author} \endentry |; my $un2 = q| \entry{un2}{article}{} \name{author}{1}{}{% {{uniquename=2,uniquepart=middle,hash=7551114aede4ef69e4b3683039801706}{% family={Smith}, familyi={S\bibinitperiod}, given={John}, giveni={J\bibinitperiod}, givenun=1, middle={Alan}, middlei={A\bibinitperiod}, middleun=2}}% } \strng{namehash}{7551114aede4ef69e4b3683039801706} \strng{fullhash}{7551114aede4ef69e4b3683039801706} \strng{bibnamehash}{7551114aede4ef69e4b3683039801706} \strng{authorbibnamehash}{7551114aede4ef69e4b3683039801706} \strng{authornamehash}{7551114aede4ef69e4b3683039801706} \strng{authorfullhash}{7551114aede4ef69e4b3683039801706} \field{labelalpha}{SmiJohAla} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{labelnamesource}{author} \endentry |; my $un3 = q| \entry{un3}{article}{} \name{author}{1}{}{% {{uniquename=2,uniquepart=middle,hash=401aebda288799a7c757526242d8c9fc}{% family={Smith}, familyi={S\bibinitperiod}, given={John}, giveni={J\bibinitperiod}, givenun=1, middle={Arthur}, middlei={A\bibinitperiod}, middleun=2}}% } \strng{namehash}{401aebda288799a7c757526242d8c9fc} \strng{fullhash}{401aebda288799a7c757526242d8c9fc} \strng{bibnamehash}{401aebda288799a7c757526242d8c9fc} \strng{authorbibnamehash}{401aebda288799a7c757526242d8c9fc} \strng{authornamehash}{401aebda288799a7c757526242d8c9fc} \strng{authorfullhash}{401aebda288799a7c757526242d8c9fc} \field{labelalpha}{SmiJohArt} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{labelnamesource}{author} \endentry |; my $un4 = q| \entry{un4}{article}{} \name{author}{1}{}{% {{uniquename=1,uniquepart=given,hash=f6038a264619efefd49c7daac56424ca}{% family={Smith}, familyi={S\bibinitperiod}, given={Alan}, giveni={A\bibinitperiod}, givenun=1, middle={Simon}, middlei={S\bibinitperiod}, middleun=0}}% } \strng{namehash}{f6038a264619efefd49c7daac56424ca} \strng{fullhash}{f6038a264619efefd49c7daac56424ca} \strng{bibnamehash}{f6038a264619efefd49c7daac56424ca} \strng{authorbibnamehash}{f6038a264619efefd49c7daac56424ca} \strng{authornamehash}{f6038a264619efefd49c7daac56424ca} \strng{authorfullhash}{f6038a264619efefd49c7daac56424ca} \field{labelalpha}{SmiAlaSim} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{labelnamesource}{author} \endentry |; my $un1a = q| \entry{un1}{article}{} \name{author}{1}{}{% {{uniquename=1,uniquepart=middle,hash=329d8f9192ea3349d700160c9ddb505d}{% family={Smith}, familyi={S\bibinitperiod}, given={John}, giveni={J\bibinitperiod}, givenun=2, middle={Simon}, middlei={S\bibinitperiod}, middleun=1}}% } \strng{namehash}{329d8f9192ea3349d700160c9ddb505d} \strng{fullhash}{329d8f9192ea3349d700160c9ddb505d} \strng{bibnamehash}{329d8f9192ea3349d700160c9ddb505d} \strng{authorbibnamehash}{329d8f9192ea3349d700160c9ddb505d} \strng{authornamehash}{329d8f9192ea3349d700160c9ddb505d} \strng{authorfullhash}{329d8f9192ea3349d700160c9ddb505d} \field{labelalpha}{SmiJohSim} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{labelnamesource}{author} \endentry |; my $un2a = q| \entry{un2}{article}{} \name{author}{1}{}{% {{uniquename=2,uniquepart=middle,hash=7551114aede4ef69e4b3683039801706}{% family={Smith}, familyi={S\bibinitperiod}, given={John}, giveni={J\bibinitperiod}, givenun=2, middle={Alan}, middlei={A\bibinitperiod}, middleun=2}}% } \strng{namehash}{7551114aede4ef69e4b3683039801706} \strng{fullhash}{7551114aede4ef69e4b3683039801706} \strng{bibnamehash}{7551114aede4ef69e4b3683039801706} \strng{authorbibnamehash}{7551114aede4ef69e4b3683039801706} \strng{authornamehash}{7551114aede4ef69e4b3683039801706} \strng{authorfullhash}{7551114aede4ef69e4b3683039801706} \field{labelalpha}{SmiJohAla} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{labelnamesource}{author} \endentry |; my $un3a = q| \entry{un3}{article}{} \name{author}{1}{}{% {{uniquename=2,uniquepart=middle,hash=401aebda288799a7c757526242d8c9fc}{% family={Smith}, familyi={S\bibinitperiod}, given={John}, giveni={J\bibinitperiod}, givenun=2, middle={Arthur}, middlei={A\bibinitperiod}, middleun=2}}% } \strng{namehash}{401aebda288799a7c757526242d8c9fc} \strng{fullhash}{401aebda288799a7c757526242d8c9fc} \strng{bibnamehash}{401aebda288799a7c757526242d8c9fc} \strng{authorbibnamehash}{401aebda288799a7c757526242d8c9fc} \strng{authornamehash}{401aebda288799a7c757526242d8c9fc} \strng{authorfullhash}{401aebda288799a7c757526242d8c9fc} \field{labelalpha}{SmiJohArt} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{labelnamesource}{author} \endentry |; my $un4a = q| \entry{un4}{article}{} \name{author}{1}{}{% {{uniquename=2,uniquepart=given,hash=f6038a264619efefd49c7daac56424ca}{% family={Smith}, familyi={S\bibinitperiod}, given={Alan}, giveni={A\bibinitperiod}, givenun=2, middle={Simon}, middlei={S\bibinitperiod}, middleun=0}}% } \strng{namehash}{f6038a264619efefd49c7daac56424ca} \strng{fullhash}{f6038a264619efefd49c7daac56424ca} \strng{bibnamehash}{f6038a264619efefd49c7daac56424ca} \strng{authorbibnamehash}{f6038a264619efefd49c7daac56424ca} \strng{authornamehash}{f6038a264619efefd49c7daac56424ca} \strng{authorfullhash}{f6038a264619efefd49c7daac56424ca} \field{labelalpha}{SmiAlaSim} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{labelnamesource}{author} \endentry |; # because given is ignored and middle does not disambiguate even on full # extradate is calculated on "Smith" only my $un1b = q| \entry{un1}{article}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=329d8f9192ea3349d700160c9ddb505d}{% family={Smith}, familyi={S\bibinitperiod}, given={John}, giveni={J\bibinitperiod}, givenun=0, middle={Simon}, middlei={S\bibinitperiod}, middleun=0}}% } \strng{namehash}{329d8f9192ea3349d700160c9ddb505d} \strng{fullhash}{329d8f9192ea3349d700160c9ddb505d} \strng{bibnamehash}{329d8f9192ea3349d700160c9ddb505d} \strng{authorbibnamehash}{329d8f9192ea3349d700160c9ddb505d} \strng{authornamehash}{329d8f9192ea3349d700160c9ddb505d} \strng{authorfullhash}{329d8f9192ea3349d700160c9ddb505d} \field{labelalpha}{SmiJohSim} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{extradate}{5} \field{labelnamesource}{author} \endentry |; my $un2b = q| \entry{un2}{article}{} \name{author}{1}{}{% {{uniquename=2,uniquepart=middle,hash=7551114aede4ef69e4b3683039801706}{% family={Smith}, familyi={S\bibinitperiod}, given={John}, giveni={J\bibinitperiod}, givenun=0, middle={Alan}, middlei={A\bibinitperiod}, middleun=2}}% } \strng{namehash}{7551114aede4ef69e4b3683039801706} \strng{fullhash}{7551114aede4ef69e4b3683039801706} \strng{bibnamehash}{7551114aede4ef69e4b3683039801706} \strng{authorbibnamehash}{7551114aede4ef69e4b3683039801706} \strng{authornamehash}{7551114aede4ef69e4b3683039801706} \strng{authorfullhash}{7551114aede4ef69e4b3683039801706} \field{labelalpha}{SmiJohAla} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{labelnamesource}{author} \endentry |; my $un3b = q| \entry{un3}{article}{} \name{author}{1}{}{% {{uniquename=2,uniquepart=middle,hash=401aebda288799a7c757526242d8c9fc}{% family={Smith}, familyi={S\bibinitperiod}, given={John}, giveni={J\bibinitperiod}, givenun=0, middle={Arthur}, middlei={A\bibinitperiod}, middleun=2}}% } \strng{namehash}{401aebda288799a7c757526242d8c9fc} \strng{fullhash}{401aebda288799a7c757526242d8c9fc} \strng{bibnamehash}{401aebda288799a7c757526242d8c9fc} \strng{authorbibnamehash}{401aebda288799a7c757526242d8c9fc} \strng{authornamehash}{401aebda288799a7c757526242d8c9fc} \strng{authorfullhash}{401aebda288799a7c757526242d8c9fc} \field{labelalpha}{SmiJohArt} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{labelnamesource}{author} \endentry |; # because given is ignored and middle does not disambiguate even on full # extradate is calculated on "Smith" only my $un4b = q| \entry{un4}{article}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=f6038a264619efefd49c7daac56424ca}{% family={Smith}, familyi={S\bibinitperiod}, given={Alan}, giveni={A\bibinitperiod}, givenun=0, middle={Simon}, middlei={S\bibinitperiod}, middleun=0}}% } \strng{namehash}{f6038a264619efefd49c7daac56424ca} \strng{fullhash}{f6038a264619efefd49c7daac56424ca} \strng{bibnamehash}{f6038a264619efefd49c7daac56424ca} \strng{authorbibnamehash}{f6038a264619efefd49c7daac56424ca} \strng{authornamehash}{f6038a264619efefd49c7daac56424ca} \strng{authorfullhash}{f6038a264619efefd49c7daac56424ca} \field{labelalpha}{SmiAlaSim} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{extradate}{1} \field{labelnamesource}{author} \endentry |; # because given is ignored and middle does not disambiguate on full # extradate is calculated on "Smith" only my $un5 = q| \entry{un5}{article}{uniquenametemplatename=test3} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=74fba0d07ca65976bbff1034f9bb22e6}{% family={Smith}, familyi={S\bibinitperiod}, given={Arthur}, giveni={A\bibinitperiod}, givenun=0, middle={Simon}, middlei={S\bibinitperiod}, middleun=0}}% } \strng{namehash}{74fba0d07ca65976bbff1034f9bb22e6} \strng{fullhash}{74fba0d07ca65976bbff1034f9bb22e6} \strng{bibnamehash}{74fba0d07ca65976bbff1034f9bb22e6} \strng{authorbibnamehash}{74fba0d07ca65976bbff1034f9bb22e6} \strng{authornamehash}{74fba0d07ca65976bbff1034f9bb22e6} \strng{authorfullhash}{74fba0d07ca65976bbff1034f9bb22e6} \field{labelalpha}{SmiArtSim} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{extradate}{2} \field{labelnamesource}{author} \endentry |; # because given is ignored and middle does not disambiguate on init # extradate is calculated on "Smith" only my $un6 = q| \entry{un6}{article}{} \name{author}{1}{uniquenametemplatename=test4}{% {{uniquename=0,uniquepart=base,hash=8100e7d06d05938e91bf8863f5c20e33}{% family={Smith}, familyi={S\bibinitperiod}, given={Arthur}, giveni={A\bibinitperiod}, givenun=0, middle={Smythe}, middlei={S\bibinitperiod}, middleun=0}}% } \strng{namehash}{8100e7d06d05938e91bf8863f5c20e33} \strng{fullhash}{8100e7d06d05938e91bf8863f5c20e33} \strng{bibnamehash}{8100e7d06d05938e91bf8863f5c20e33} \strng{authorbibnamehash}{8100e7d06d05938e91bf8863f5c20e33} \strng{authornamehash}{8100e7d06d05938e91bf8863f5c20e33} \strng{authorfullhash}{8100e7d06d05938e91bf8863f5c20e33} \field{labelalpha}{SmiArtSmy} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{extradate}{3} \field{labelnamesource}{author} \\endentry |; # because there is nothing to disambiguate the base at all # extradate is calculated on "Smith" only my $un7 = q| \entry{un7}{article}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,uniquenametemplatename=test5,hash=c21736158273b6f2f368818459734e04}{% family={Smith}, familyi={S\bibinitperiod}, given={Arthur}, giveni={A\bibinitperiod}, givenun=0, middle={Smedley}, middlei={S\bibinitperiod}, middleun=0}}% } \strng{namehash}{c21736158273b6f2f368818459734e04} \strng{fullhash}{c21736158273b6f2f368818459734e04} \strng{bibnamehash}{c21736158273b6f2f368818459734e04} \strng{authorbibnamehash}{c21736158273b6f2f368818459734e04} \strng{authornamehash}{c21736158273b6f2f368818459734e04} \strng{authorfullhash}{c21736158273b6f2f368818459734e04} \field{labelalpha}{SmiArtSme} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \field{extradate}{4} \field{labelnamesource}{author} \endentry |; my $main = $biber->datalists->get_list('nty/global//global/global'); my $main1 = $biber->datalists->get_list('nty/global//test1/global'); my $main2 = $biber->datalists->get_list('nty/global//test2/global'); eq_or_diff($out->get_output_entry('un1', $main), $un1, 'Uniquename namepart - 1'); eq_or_diff($out->get_output_entry('un2', $main), $un2, 'Uniquename namepart - 2'); eq_or_diff($out->get_output_entry('un3', $main), $un3, 'Uniquename namepart - 3'); eq_or_diff($out->get_output_entry('un4', $main), $un4, 'Uniquename namepart - 4'); eq_or_diff($out->get_output_entry('un1', $main1), $un1a, 'Uniquename namepart - 5'); eq_or_diff($out->get_output_entry('un2', $main1), $un2a, 'Uniquename namepart - 6'); eq_or_diff($out->get_output_entry('un3', $main1), $un3a, 'Uniquename namepart - 7'); eq_or_diff($out->get_output_entry('un4', $main1), $un4a, 'Uniquename namepart - 8'); eq_or_diff($main2->get_namestring($un1nlid, $un1nid), 'SmithSimon', 'Uniquename metadata - 1'); is_deeply($main2->get_namestrings($un1nlid, $un1nid), ['Smith', 'SmithS', 'SmithSimon'], 'Uniquename metadata - 2'); is_deeply($main2->get_namedisschema($un1nlid, $un1nid), [['base', ['family']], ['middle', 'init'], ['middle', 'full']], 'Uniquename metadata - 3'); eq_or_diff($main2->get_namestring($un2nlid, $un2nid), 'SmithAlan', 'Uniquename metadata - 4'); is_deeply($main2->get_namestrings($un2nlid, $un2nid), ['Smith', 'SmithA', 'SmithAlan'], 'Uniquename metadata - 5'); is_deeply($main2->get_namedisschema($un2nlid, $un2nid), [['base', ['family']], ['middle', 'init'], ['middle', 'full']], 'Uniquename metadata - 6'); eq_or_diff($main2->get_namestring($un3nlid, $un3nid), 'SmithArthur', 'Uniquename metadata - 7'); is_deeply($main2->get_namestrings($un3nlid, $un3nid), ['Smith', 'SmithA', 'SmithArthur'], 'Uniquename metadata - 8'); is_deeply($main2->get_namedisschema($un3nlid, $un3nid), [['base', ['family']], ['middle', 'init'], ['middle', 'full']], 'Uniquename metadata - 9'); eq_or_diff($main2->get_namestring($un4nlid, $un4nid), 'SmithSimon', 'Uniquename metadata - 10'); is_deeply($main2->get_namestrings($un4nlid, $un4nid), ['Smith', 'SmithS', 'SmithSimon'], 'Uniquename metadata - 11'); is_deeply($main2->get_namedisschema($un4nlid, $un4nid), [['base', ['family']], ['middle', 'init'], ['middle', 'full']], 'Uniquename metadata - 12'); eq_or_diff($main2->get_namestring($un5nlid, $un5nid), 'SmithSimon', 'Uniquename metadata - 13'); is_deeply($main2->get_namestrings($un5nlid, $un5nid), ['Smith', 'SmithSimon'], 'Uniquename metadata - 14'); is_deeply($main2->get_namedisschema($un5nlid, $un5nid), [['base', ['family']], ['middle', 'fullonly']], 'Uniquename metadata - 15'); eq_or_diff($main2->get_namestring($un6nlid, $un6nid), 'SmithSmythe', 'Uniquename metadata - 16'); is_deeply($main2->get_namestrings($un6nlid, $un6nid), ['Smith', 'SmithS'], 'Uniquename metadata - 17'); is_deeply($main2->get_namedisschema($un6nlid, $un6nid), [['base', ['family']], ['middle', 'init']], 'Uniquename metadata - 18'); eq_or_diff($main2->get_namestring($un7nlid, $un7nid), 'Smith', 'Uniquename metadata - 19'); is_deeply($main2->get_namestrings($un7nlid, $un7nid), ['Smith'], 'Uniquename metadata - 20'); is_deeply($main2->get_namedisschema($un7nlid, $un7nid), [['base', ['family']]], 'Uniquename metadata - 21'); eq_or_diff($out->get_output_entry('un1', $main2), $un1b, 'Uniquename namepart - 9'); eq_or_diff($out->get_output_entry('un2', $main2), $un2b, 'Uniquename namepart - 10'); eq_or_diff($out->get_output_entry('un3', $main2), $un3b, 'Uniquename namepart - 11'); eq_or_diff($out->get_output_entry('un4', $main2), $un4b, 'Uniquename namepart - 12'); # Note that these are all being tested against $main2, not the default list eq_or_diff($out->get_output_entry('un5', $main2), $un5, 'Uniquename namepart - 13'); eq_or_diff($out->get_output_entry('un6', $main2), $un6, 'Uniquename namepart - 14'); eq_or_diff($out->get_output_entry('un7', $main2), $un7, 'Uniquename namepart - 15'); biblatex-biber-2.9/t/sort-order.t000444000153000001 1402113205066062 16404 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 14; use Biber; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('sort-order.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); Biber::Config->setblxoption('labeldateparts', undef); Biber::Config->setblxoption('labelalpha', 0); # (re)generate informtion based on option settings $biber->prepare; my $section = $biber->sections->get_section(0); my $main = $biber->datalists->get_list('none/global//global/global'); is_deeply($main->get_keys, ['L2','L3','L1B','L1','L4','L5','L1A','L7','L8','L6','L9'], 'citeorder'); $main->set_sortingtemplatename('nty'); $biber->set_output_obj(Biber::Output::bbl->new()); $biber->prepare; $section = $biber->sections->get_section(0); is_deeply($main->get_keys, ['L5','L1A','L1','L1B','L2','L3','L4','L8','L7','L6','L9'], 'nty'); $main->set_sortingtemplatename('nyt'); $biber->set_output_obj(Biber::Output::bbl->new()); $biber->prepare; $section = $biber->sections->get_section(0); is_deeply($main->get_keys, ['L5','L1A','L1','L1B','L2','L3','L4','L8','L7','L6','L9'], 'nyt'); $main->set_sortingtemplatename('nyvt'); $biber->set_output_obj(Biber::Output::bbl->new()); $biber->prepare; $section = $biber->sections->get_section(0); is_deeply($main->get_keys, ['L5','L1','L1A','L1B','L2','L3','L4','L8','L7','L6','L9'], 'nyvt'); # nyvt with volume padding $main->set_sortingtemplatename('nyvtvp'); $biber->set_output_obj(Biber::Output::bbl->new()); $biber->prepare; $section = $biber->sections->get_section(0); is_deeply($main->get_keys, ['L5','L1A','L1','L1B','L2','L3','L4','L8','L7','L6','L9'], 'nyvt with volume padding'); $main->set_sortingtemplatename('ynt'); $biber->set_output_obj(Biber::Output::bbl->new()); $biber->prepare; $section = $biber->sections->get_section(0); # Note that L5 is last because it has a final sortkey which maps to a large # int in sort fields is_deeply($main->get_keys, ['L3','L1B','L1A','L1','L4','L2','L8','L7','L6','L9','L5'], 'ynt'); $main->set_sortingtemplatename('yntys'); $biber->set_output_obj(Biber::Output::bbl->new()); $biber->prepare; $section = $biber->sections->get_section(0); # Note that L5 is last because it has a final sortkey which maps to a large # int in sort fields is_deeply($main->get_keys, ['L3','L1B','L1A','L1','L2','L4','L8','L7','L6','L9','L5'], 'ynt with year substring'); $main->set_sortingtemplatename('ydnt'); $biber->set_output_obj(Biber::Output::bbl->new()); $biber->prepare; $section = $biber->sections->get_section(0); # Note that L5 is first because it has a final sortkey which maps to a # large int in sort fields is_deeply($main->get_keys, ['L5','L9','L6','L7','L8','L2','L4','L1A','L1','L1B','L3'], 'ydnt'); $main->set_sortingtemplatename('anyt'); Biber::Config->setblxoption('labelalpha', 1); $biber->set_output_obj(Biber::Output::bbl->new()); $biber->prepare; $section = $biber->sections->get_section(0); is_deeply($main->get_keys, ['L1B','L1A','L1','L2','L3','L4','L5','L8','L7','L6','L9'], 'anyt'); Biber::Config->setblxoption('labelalpha', 0); $main->set_sortingtemplatename('anyvt'); Biber::Config->setblxoption('labelalpha', 1); $biber->set_output_obj(Biber::Output::bbl->new()); $biber->prepare; $section = $biber->sections->get_section(0); is_deeply($main->get_keys, ['L1B','L1','L1A','L2','L3','L4','L5','L8','L7','L6','L9'], 'anyvt'); $main->set_sortingtemplatename('ndty'); $biber->set_output_obj(Biber::Output::bbl->new()); $biber->prepare; $section = $biber->sections->get_section(0); is_deeply($main->get_keys, ['L9','L6','L7','L8','L5','L4','L3','L2','L1B','L1A','L1'], 'nty with descending n'); # Test nosort option $main->set_sortingtemplatename('t'); # Set nosort for tests, skipping "The " in titles so L7 should sort before L6 Biber::Config->setoption('nosort', [{ name => 'settitles', value => q/\AThe\s+/ }]); $biber->set_output_obj(Biber::Output::bbl->new()); $biber->prepare; $section = $biber->sections->get_section(0); is_deeply($main->get_keys, ['L1A','L1','L1B','L2','L3','L4','L5','L7','L6','L9','L8'], 'nosort 1'); # Testing sorting keys which have the same order as they were cited in the same \cite*{} cmd. # In this case, they will be tied on sorting=none and can be further sorted by other fields $main->set_sortingtemplatename('ny'); # Have to do a citekey deletion as we are not re-reading the .bcf which would do it for us # Otherwise, we have citekeys and allkeys which confuses fetch_data() $biber->set_output_obj(Biber::Output::bbl->new()); $biber->prepare; $section = $biber->sections->get_section(0); is_deeply($main->get_keys, ['L3','L2','L1B','L1','L4','L5','L1A','L7','L8','L6','L9'], 'sorting=none + year'); # Testing special case of sorting=none and allkeys because in this case "citeorder" means # bib order $main->set_sortingtemplatename('none'); # Have to do a citekey deletion as we are not re-reading the .bcf which would do it for us # Otherwise, we have citekeys and allkeys which confuses fetch_data() $section->del_citekeys; Biber::Config->reset_keyorder(0); $section->set_allkeys(1); $biber->set_output_obj(Biber::Output::bbl->new()); $biber->prepare; $section = $biber->sections->get_section(0); is_deeply($main->get_keys, ['L1','L1A','L1B','L2','L3','L4','L5','L6','L7','L8','L9'], 'sorting=none and allkeys'); biblatex-biber-2.9/t/extradate.t000444000153000001 1470013205066062 16271 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 39; use Test::Differences; unified_diff; use Biber; use Biber::Utils; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('extradate.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('maxcitenames', 1); Biber::Config->setblxoption('maxbibnames', 1); # Now generate the information $biber->prepare; my $section = $biber->sections->get_section(0); my $main = $biber->datalists->get_list('custom/global//global/global'); my $bibentries = $section->bibentries; eq_or_diff($main->get_extradatedata_for_key('L1'), '1', 'Entry L1 - one name, first in 1995'); eq_or_diff($main->get_extradatedata_for_key('L2'), '2', 'Entry L2 - one name, second in 1995'); eq_or_diff($main->get_extradatedata_for_key('L3'), '3', 'Entry L3 - one name, third in 1995'); eq_or_diff($main->get_extradatedata_for_key('L4'), '1', 'Entry L4 - two names, first in 1995'); eq_or_diff($main->get_extradatedata_for_key('L5'), '2', 'Entry L5 - two names, second in 1995'); eq_or_diff($main->get_extradatedata_for_key('L6'), '1', 'Entry L6 - two names, first in 1996'); eq_or_diff($main->get_extradatedata_for_key('L7'), '2', 'Entry L7 - two names, second in 1996'); eq_or_diff($main->get_extradatedata_for_key('nodate1'), '1', 'Same name, no year 1'); eq_or_diff($main->get_extradatedata_for_key('nodate2'), '2', 'Same name, no year 2'); ok(is_undef($main->get_extradatedata_for_key('L8')), 'Entry L8 - one name, only in year'); ok(is_undef($main->get_extradatedata_for_key('L9')), 'Entry L9 - No name, same year as another with no name'); ok(is_undef($main->get_extradatedata_for_key('L10')), 'Entry L10 - No name, same year as another with no name'); eq_or_diff($main->get_extradatedata_for_key('companion1'), '1', 'Entry companion1 - names truncated to same as another entry in same year'); eq_or_diff($main->get_extradatedata_for_key('companion2'), '2', 'Entry companion2 - names truncated to same as another entry in same year'); ok(is_undef($main->get_extradatedata_for_key('companion3')), 'Entry companion3 - one name, same year as truncated names'); eq_or_diff($main->get_extradatedata_for_key('vangennep'), '2', 'Entry vangennep - useprefix does makes it different'); eq_or_diff($main->get_extradatedata_for_key('gennep'), '1', 'Entry gennep - different from prefix name'); ok(is_undef($main->get_extradatedata_for_key('LY1')), 'Date range means no extradate - 1'); ok(is_undef($main->get_extradatedata_for_key('LY2')), 'Date range means no extradate - 2'); ok(is_undef($main->get_extradatedata_for_key('LY3')), 'Date range means no extradate - 3'); # Test for labeldatesource literal string eq_or_diff($bibentries->entry('nodate1')->get_field('labeldatesource'), 'nodate', 'Labeldatesource string - 1'); eq_or_diff($bibentries->entry('nodate2')->get_field('labeldatesource'), 'nodate', 'Labeldatesource string - 2'); # Testing different extradate scopes (granularity) extradate should be set # at year scope only in default setup so these two get different extradate # because they differ at month scope eq_or_diff($main->get_extradatedata_for_key('ed1'), '1', 'labelyear scope - 1'); eq_or_diff($main->get_extradatedata_for_key('ed2'), '2', 'labelyear scope - 2'); eq_or_diff($bibentries->entry('ed1')->get_field('extradatescope'), 'labelyear', 'labelyear scope - 1a'); # One of these has an open enddate ok(is_undef($main->get_extradatedata_for_key('ed7')), 'labelyear scope - 3'); ok(is_undef($main->get_extradatedata_for_key('ed8')), 'labelyear scope - 4'); # Switch to a month-in-year scope for extradate tracking Biber::Config->setblxoption('extradatespec', [['labelyear', 'year'],['labelmonth']]); $biber->prepare; $main = $biber->datalists->get_list('custom/global//global/global'); # Now extradate should be unset as the months differ ok(is_undef($main->get_extradatedata_for_key('ed1')), 'labelmonth scope - 1'); ok(is_undef($main->get_extradatedata_for_key('ed2')), 'labelmonth scope - 2'); eq_or_diff($bibentries->entry('ed1')->get_field('extradatescope'), 'labelmonth', 'labelmonth scope - 1a'); # But these have no months and are the same at labelyear so they should be set eq_or_diff($main->get_extradatedata_for_key('ed3'), '1', 'labelmonth scope - 3'); eq_or_diff($main->get_extradatedata_for_key('ed4'), '2', 'labelmonth scope - 4'); # Switch to a minute scope for extradate tracking Biber::Config->setblxoption('extradatespec', [['labelyear', 'year'], ['labelmonth'], ['labelday'], ['labelhour'], ['labelminute']]); $biber->prepare; $main = $biber->datalists->get_list('custom/global//global/global'); # extradate should be set as the minutes are the same eq_or_diff($main->get_extradatedata_for_key('ed5'), '1', 'labelminute scope - 1'); eq_or_diff($main->get_extradatedata_for_key('ed6'), '2', 'labelminute scope - 2'); eq_or_diff($bibentries->entry('ed5')->get_field('extradatescope'), 'labelhour', 'labelminute scope - 1a'); # But these have no times ok(is_undef($main->get_extradatedata_for_key('ed1')), 'labelminute scope - 3'); ok(is_undef($main->get_extradatedata_for_key('ed2')), 'labelminute scope - 4'); # Test not using label* which means that open enddates would not be # considered Biber::Config->setblxoption('extradatespec', [['year']]); $biber->prepare; $main = $biber->datalists->get_list('custom/global//global/global'); eq_or_diff($main->get_extradatedata_for_key('ed7'), '1', 'year scope - 1'); eq_or_diff($main->get_extradatedata_for_key('ed8'), '2', 'year scope - 2'); biblatex-biber-2.9/t/annotations.t000444000153000001 577013205066062 16634 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 1; use Test::Differences; unified_diff; use Biber; use Biber::Utils; use Biber::Output::bbl; use Log::Log4perl; use Unicode::Normalize; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); Biber::Config->setoption('annotation_marker', '-an'); # This is cached at load time so we need to alter the cache too $Biber::Config::CONFIG_META_MARKERS{annotation} = quotemeta(Biber::Config->getoption('annotation_marker')); $biber->parse_ctrlfile('annotations.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Now generate the information $biber->prepare; my $out = $biber->get_output_obj; my $section = $biber->sections->get_section(0); my $main = $biber->datalists->get_list('nty/global//global/global'); my $ann1 = q| \entry{ann1}{misc}{} \name{author}{3}{}{% {{hash=89a9e5097e11e595700540379c9b3a6b}{% family={Last1}, familyi={L\\bibinitperiod}, given={First1}, giveni={F\\bibinitperiod}}}% {{hash=7475b6b7b3c24a2ac6bd4d146cdc74dc}{% family={Last2}, familyi={L\\bibinitperiod}, given={First2}, giveni={F\\bibinitperiod}}}% {{hash=fd3dffa06a5d1f89c512841df1ccf4d0}{% family={Last3}, familyi={L\\bibinitperiod}, given={First3}, giveni={F\\bibinitperiod}}}% } \list{language}{2}{% {english}% {french}% } \strng{namehash}{90ae96c82de92e36949bc64254bbde0c} \strng{fullhash}{90ae96c82de92e36949bc64254bbde0c} \strng{bibnamehash}{90ae96c82de92e36949bc64254bbde0c} \strng{authorbibnamehash}{90ae96c82de92e36949bc64254bbde0c} \strng{authornamehash}{90ae96c82de92e36949bc64254bbde0c} \strng{authorfullhash}{90ae96c82de92e36949bc64254bbde0c} \field{sortinit}{L} \field{sortinithash}{2c7981aaabc885868aba60f0c09ee20f} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{The Title} \annotation{field}{language}{}{}{ann4} \annotation{field}{title}{}{}{one, two} \annotation{item}{author}{2}{}{corresponding} \annotation{item}{language}{1}{}{ann1} \annotation{item}{language}{2}{}{ann2, ann3} \annotation{part}{author}{1}{family}{student} \endentry |; eq_or_diff( $out->get_output_entry('ann1', $main), $ann1, 'Annotations - 1' ); biblatex-biber-2.9/t/names_x.t000444000153000001 2476413205066062 15755 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 21; use Test::Differences; unified_diff; use Biber; use Biber::Utils; use Biber::Output::bbl; use Log::Log4perl; use Unicode::Normalize; use Encode; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('names_x.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('namesep', 'und'); # Testing custom name splitting string Biber::Config->setoption('others_string', 'andere'); # Testing custom implied "et al" Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); Biber::Config->setblxoption('mincitenames', 3); # Now generate the information $biber->prepare; my $out = $biber->get_output_obj; my $section = $biber->sections->get_section(0); my $main = $biber->datalists->get_list('custom/global//global/global'); my $bibentries = $section->bibentries; my $name1 = { given => {string => 'John', initial => ['J']}, family => {string => 'Doe', initial => ['D']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name2 = { given => {string => 'John', initial => ['J']}, family => {string => 'Doe', initial => ['D']}, prefix => {string => undef, initial => undef}, suffix => {string => 'Jr', initial => ['J']}}; my $name3 = { given => {string => 'Johann~Gottfried', initial => ['J', 'G']}, family => {string => 'Berlichingen zu~Hornberg', initial => ['B', 'z', 'H']}, prefix => {string => 'von', initial => ['v']}, suffix => {string => undef, initial => undef}}; my $name4 = { given => {string => 'Johann~Gottfried', initial => ['J', 'G']}, family => {string => 'Berlichingen zu~Hornberg', initial => ['B', 'z', 'H']}, prefix => {string => 'von', initial => ['v']}, suffix => {string => undef, initial => undef}}; my $name5 = { given => {string => undef, initial => undef}, family => {string => 'Robert and Sons, Inc.', initial => ['R']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name6 = { given => {string => 'ʿAbdallāh', initial => ['A']}, family => {string => 'al-Ṣāliḥ', initial => ['Ṣ']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name7 = { given => {string => 'Jean Charles~Gabriel', initial => ['J', 'C', 'G']}, family => {string => 'Vallée~Poussin', initial => ['V', 'P']}, prefix => {string => 'de~la', initial => ['d', 'l']}, suffix => {string => undef, initial => undef}}; my $name8 = { given => {string => 'Jean Charles Gabriel', initial => ['J']}, family => {string => 'Vallée~Poussin', initial => ['V', 'P']}, prefix => {string => 'de~la', initial => ['d', 'l']}, suffix => {string => undef, initial => undef}}; my $name9 = { given => {string => 'Jean Charles Gabriel de la~Vallée', initial => ['J', 'C', 'G', 'd', 'V']}, family => {string => 'Poussin', initial => ['P']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name10 = { given => {string => 'Jean Charles~Gabriel', initial => ['J', 'C', 'G']}, family => {string => 'Vallée Poussin', initial => ['V']}, prefix => {string => 'de~la', initial => ['d', 'l']}, suffix => {string => undef, initial => undef}}; my $name11 = { given => {string => 'Jean Charles Gabriel', initial => ['J']}, family => {string => 'Vallée Poussin', initial => ['V']}, prefix => {string => 'de~la', initial => ['d', 'l']}, suffix => {string => undef, initial => undef}}; my $name12 = { given => {string => 'Jean Charles~Gabriel', initial => ['J', 'C', 'G']}, family => {string => 'Poussin', initial => ['P']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name13 = { given => {string => 'Jean~Charles', initial => ['J', 'C']}, family => {string => 'Poussin Lecoq', initial => ['P']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name14 = { given => {string => 'J.~C.~G.', initial => ['J', 'C', 'G']}, family => {string => 'Vallée~Poussin', initial => ['V', 'P']}, prefix => {string => 'de~la', initial => ['d', 'l']}, suffix => {string => undef, initial => undef}}; # Note that the family initials are wrong because the prefix "El-" was not stripped # This is because the default noinit regexp only strips lower-case prefices to protect # hyphenated names my $name15 = { given => {string => 'E.~S.', initial => ['E', 'S']}, family => {string => 'El-Mallah', initial => ['E-M']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name16 = { given => {string => 'E.~S.', initial => ['E', 'S']}, family => {string => 'Kent-Boswell', initial => ['K-B']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name17 = { given => {string => 'A.~N.', initial => ['A', 'N']}, family => {string => 'Other', initial => ['O']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name18 = { given => {string => undef, initial => undef}, family => {string => 'British National Corpus', initial => ['B']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name19 = { given => {string => 'Bill', initial => ['B']}, family => {string => 'Smith', initial => ['S']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; my $name19snks = 'test'; my $name20 = { given => {string => undef, initial => undef}, family => {string => 'Doe', initial => ['Do']}, prefix => {string => undef, initial => undef}, suffix => {string => undef, initial => undef}}; sub tparsename_x { my $nps = Biber::Input::file::bibtex::parsename_x(@_)->{nameparts}; foreach my $np (keys $nps->%*) { next unless defined($nps->{$np}{string}); $nps->{$np}{string} = NFC($nps->{$np}{string}) || undef; my $npis; foreach my $npi ($nps->{$np}{initial}->@*) { push $npis->@*, NFC($npi); } $nps->{$np}{initial} = $npis; } return $nps; } is_deeply(tparsename_x('given=John,family=Doe', 'author'), $name1, 'parsename_x 1'); is_deeply(tparsename_x('family=Doe, suffix=Jr, given=John, given-i=J', 'author'), $name2, 'parsename_x 2'); is_deeply(tparsename_x('prefix=von, family=Berlichingen zu Hornberg, given=Johann Gottfried', 'author'), $name3, 'parsename_x 3') ; is_deeply(tparsename_x('prefix=von, family=Berlichingen zu Hornberg, given=Johann Gottfried', 'author'), $name4, 'parsename_x 4') ; is_deeply(tparsename_x('"family={Robert and Sons, Inc.}"', 'author'), $name5, 'parsename_x 5') ; is_deeply(tparsename_x('family=al-Ṣāliḥ, given=ʿAbdallāh', 'author'), $name6, 'parsename_x 6') ; is_deeply(tparsename_x('given=Jean Charles Gabriel, prefix=de la, family=Vallée Poussin', 'author'), $name7, 'parsename_x 7'); is_deeply(tparsename_x('given={Jean Charles Gabriel}, prefix=de la, family=Vallée Poussin', 'author'), $name8, 'parsename_x 8'); is_deeply(tparsename_x('given=Jean Charles Gabriel de la Vallée, given-i=JCGdV, family=Poussin', 'author'), $name9, 'parsename_x 9'); is_deeply(tparsename_x('given=Jean Charles Gabriel, prefix=de la, family={Vallée Poussin}', 'author'), $name10, 'parsename_x 10'); is_deeply(tparsename_x('given={Jean Charles Gabriel}, prefix=de la, family={Vallée Poussin}', 'author'), $name11, 'parsename_x 11'); is_deeply(tparsename_x('given=Jean Charles Gabriel, family=Poussin', 'author'), $name12, 'parsename_x 12'); is_deeply(tparsename_x('given=Jean Charles, family={Poussin Lecoq}', 'author'), $name13, 'parsename_x 13'); is_deeply(tparsename_x('given=J. C. G., prefix=de la, family=Vallée Poussin', 'author'), $name14, 'parsename_x 14'); is_deeply(tparsename_x('given=E. S., family=El-Mallah', 'author'), $name15, 'parsename_x 15'); is_deeply(tparsename_x('given=E. S., family=Kent-Boswell', 'author'), $name16, 'parsename_x 16'); is_deeply(tparsename_x('family=Other, given=A.~N.', 'author'), $name17, 'parsename_x 17'); is_deeply(tparsename_x('family={British National Corpus}', 'author'), $name18, 'parsename_x 18'); is_deeply(tparsename_x('sortingnamekeytemplatename=test, family=Smith, given=Bill', 'author'), $name19, 'parsename_x 19'); eq_or_diff(Biber::Input::file::bibtex::parsename_x('sortingnamekeytemplatename=test, family=Smith, given=Bill', 'author')->{sortingnamekeytemplatename}, $name19snks, 'parsename_x 19a'); is_deeply(tparsename_x('family=Doe, family-i={Do}', 'author'), $name20, 'parsename_x 20'); biblatex-biber-2.9/t/xdata.t000444000153000001 1057213205066062 15414 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 5; use Test::Differences; unified_diff; use Biber; use Biber::Output::bbl; use Log::Log4perl; use Capture::Tiny qw(capture); use Encode; chdir("t/tdata") ; # USING CAPTURE - DEBUGGING PRINTS, DUMPS WON'T BE VISIBLE UNLESS YOU PRINT $stderr # AT THE END! # Set up Biber object my $biber = Biber->new(noconf => 1); # Note stderr is output here so we can capture it and do a cyclic crossref test my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 1 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('xdata.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); Biber::Config->setoption('nodieonerror', 1); # because there is a cyclic xdata check # Now generate the information my ($stdout, $stderr) = capture { $biber->prepare }; my $section = $biber->sections->get_section(0); my $main = $biber->datalists->get_list('nty/global//global/global'); my $out = $biber->get_output_obj; my $xd1 = q| \entry{xd1}{book}{} \name{author}{1}{}{% {{hash=51db4bfd331cba22959ce2d224c517cd}{% family={Ellington}, familyi={E\bibinitperiod}, given={Edward}, giveni={E\bibinitperiod}}}% } \list{location}{2}{% {New York}% {London}% } \list{publisher}{1}{% {Macmillan}% } \strng{namehash}{51db4bfd331cba22959ce2d224c517cd} \strng{fullhash}{51db4bfd331cba22959ce2d224c517cd} \strng{bibnamehash}{51db4bfd331cba22959ce2d224c517cd} \strng{authorbibnamehash}{51db4bfd331cba22959ce2d224c517cd} \strng{authornamehash}{51db4bfd331cba22959ce2d224c517cd} \strng{authorfullhash}{51db4bfd331cba22959ce2d224c517cd} \field{sortinit}{E} \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{note}{A Note} \field{year}{2007} \field{dateera}{ce} \endentry |; my $xd2 = q| \entry{xd2}{book}{} \name{author}{1}{}{% {{hash=68539e0ce4922cc4957c6cabf35e6fc8}{% family={Pillington}, familyi={P\bibinitperiod}, given={Peter}, giveni={P\bibinitperiod}}}% } \list{location}{2}{% {New York}% {London}% } \list{publisher}{1}{% {Routledge}% } \strng{namehash}{68539e0ce4922cc4957c6cabf35e6fc8} \strng{fullhash}{68539e0ce4922cc4957c6cabf35e6fc8} \strng{bibnamehash}{68539e0ce4922cc4957c6cabf35e6fc8} \strng{authorbibnamehash}{68539e0ce4922cc4957c6cabf35e6fc8} \strng{authornamehash}{68539e0ce4922cc4957c6cabf35e6fc8} \strng{authorfullhash}{68539e0ce4922cc4957c6cabf35e6fc8} \field{sortinit}{P} \field{sortinithash}{8d51b3d5b78d75b54308d706b9bbe285} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{abstract}{An abstract} \field{addendum}{Москва} \field{note}{A Note} \field{venue}{venue} \field{year}{2003} \field{dateera}{ce} \endentry |; # Test::Differences doesn't like utf8 unless it's encoded here eq_or_diff($out->get_output_entry('xd1', $main), $xd1, 'xdata test - 1'); eq_or_diff(encode_utf8($out->get_output_entry('xd2', $main)), encode_utf8($xd2), 'xdata test - 2'); # XDATA entries should not be output at all eq_or_diff($out->get_output_entry('macmillan', $main), undef, 'xdata test - 3'); eq_or_diff($out->get_output_entry('macmillan:pub', $main), undef, 'xdata test - 4'); chomp $stderr; eq_or_diff($stderr, "ERROR - Circular XDATA inheritance between 'loop'<->'loop:3'", 'Cyclic xdata error check'); #print $stdout; #print $stderr; biblatex-biber-2.9/t/biblatexml.t000444000153000001 1511013205066062 16427 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Text::Diff::Config; $Text::Diff::Config::Output_Unicode = 1; use Test::More tests => 5; use Test::Differences; unified_diff; use Biber; use Biber::Output::bbl; use Log::Log4perl; use Encode; chdir("t/tdata"); # Set up Biber object # THERE ARE MAPS IN THE BCF my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('biblatexml.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); Biber::Config->setoption('bcf', 'biblatexml.bcf'); # Now generate the information $biber->prepare; my $out = $biber->get_output_obj; my $section = $biber->sections->get_section(0); my $main = $biber->datalists->get_list('custom/global//global/global'); my $bibentries = $section->bibentries; my $l1 = q| \entry{bltx1}{misc}{useprefix=false} \true{moreauthor} \true{morelabelname} \name{author}{3}{useprefix=true}{% {{hash=633a0b6ab963c5f044b56f06c6091c27}{% family={Булгаков}, familyi={Б\\bibinitperiod}, given={Павел\\bibnamedelima Георгиевич}, giveni={П\\bibinitperiod\\bibinitdelim Г\\bibinitperiod}, prefix={von}, prefixi={v\\bibinitperiod}}}% {{useprefix=false,hash=0ffcce4df8f0d0eedf2c614091ba2355}{% family={РРозенфельд}, familyi={Р\\bibinitperiod}, given={Борис-ZZ\\bibnamedelima Aбрамович}, giveni={Б\\bibinithyphendelim Z\\bibinitperiod\\bibinitdelim A\\bibinitperiod}, prefix={von}, prefixi={v\\bibinitperiod}}}% {{hash=e708d5a31534e937578abf161c867a25}{% family={Aхмедов}, familyi={A\\bibinitperiod}, given={Ашраф\\bibnamedelima Ахмедович}, giveni={A\\bibinitperiod\\bibinitdelim А\\bibinitperiod}}}% } \name{foreword}{1}{}{% {{hash=0ee59e598dae22fac8e6d9d2df7e79ec}{% family={Brown}, familyi={B\\bibinitperiod}, given={John\\bibnamedelimb }, giveni={J\\bibinitperiod}}}% } \name{translator}{1}{}{% {{hash=b44eba830fe9817fbe8e53c82f1cbe04}{% family={Smith}, familyi={S\\bibinitperiod}, given={Paul}, giveni={P\\bibinitperiod}}}% } \list{language}{1}{% {russian}% } \list{location}{1}{% {Москва}% } \list{publisher}{1}{% {Наука}% } \strng{namehash}{835d3352054f77020fc38705080e4596} \strng{fullhash}{835d3352054f77020fc38705080e4596} \strng{bibnamehash}{835d3352054f77020fc38705080e4596} \strng{authorbibnamehash}{835d3352054f77020fc38705080e4596} \strng{authornamehash}{835d3352054f77020fc38705080e4596} \strng{authorfullhash}{835d3352054f77020fc38705080e4596} \strng{forewordbibnamehash}{0ee59e598dae22fac8e6d9d2df7e79ec} \strng{forewordnamehash}{0ee59e598dae22fac8e6d9d2df7e79ec} \strng{forewordfullhash}{0ee59e598dae22fac8e6d9d2df7e79ec} \strng{translatorbibnamehash}{b44eba830fe9817fbe8e53c82f1cbe04} \strng{translatornamehash}{b44eba830fe9817fbe8e53c82f1cbe04} \strng{translatorfullhash}{b44eba830fe9817fbe8e53c82f1cbe04} \field{sortinit}{v} \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{addendum}{userc} \field{eventday}{16} \field{eventendday}{17} \field{eventendmonth}{5} \field{eventendyear}{1990} \field{eventmonth}{5} \field{eventyear}{1990} \field{origyear}{356} \field{pagetotal}{240} \field{relatedstring}{Somestring} \field{relatedtype}{reprint} \field{series}{Научно-биографическая литература} \field{title}{Мухаммад ибн муса ал-Хорезми. Около 783 – около 850} \field{urlendyear}{} \field{urlyear}{1991} \field{userb}{usera} \field{userd}{userc} \field{usere}{a} \field{year}{1980} \field{dateunspecified}{yearindecade} \field{dateera}{ce} \field{eventenddateera}{ce} \field{eventdateera}{ce} \field{origdateera}{bce} \true{urldatecirca} \field{urldateera}{ce} \field{pages}{1\\bibrangedash 10\\bibrangessep 30\\bibrangedash 34} \range{pages}{15} \annotation{field}{author}{}{}{names-ann} \annotation{field}{language}{}{}{list-ann1} \annotation{field}{title}{}{}{field-ann1} \annotation{item}{author}{1}{}{name-ann1} \annotation{item}{author}{3}{}{name-ann2} \annotation{item}{language}{1}{}{item-ann1} \annotation{part}{author}{1}{given}{namepart-ann1} \annotation{part}{author}{2}{family}{namepart-ann2} \endentry |; my $l2 = q| \entry{loopkey:a}{book}{} \field{sortinit}{0} \field{sortinithash}{168ad0c7c5ed09f1d28c6675717b5b03} \endentry |; my $bltx1 = 'mm,,,von!Булгаков!Павел Георгиевич#РРозенфельд!Борис-ZZ Aбрамович!von#Aхмедов!Ашраф Ахмедович#+,1980,0,Мухаммад ибн муса ал-Хорезми. Около 783 – около 850'; # Test::Differences doesn't like utf8 unless it's encoded here eq_or_diff(encode_utf8($out->get_output_entry('bltx1', $main)), encode_utf8($l1), 'BibLaTeXML - 1'); eq_or_diff($section->get_citekey_alias('bltx1a1'), 'bltx1', 'Citekey aliases - 1'); eq_or_diff($section->get_citekey_alias('bltx1a2'), 'bltx1', 'Citekey aliases - 2'); eq_or_diff(encode_utf8($main->get_sortdata_for_key('bltx1')->[0]), encode_utf8($bltx1), 'useprefix at name list and name scope - 1' ); eq_or_diff(encode_utf8($out->get_output_entry('loopkey:a', $main)), encode_utf8($l2), 'BibLaTeXML automapcreate - 1'); biblatex-biber-2.9/t/basic-misc.t000444000153000001 11375213205066062 16351 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 69; use Test::Differences; unified_diff; use Biber; use Biber::Utils; use Biber::Output::bbl; use Log::Log4perl; use Unicode::Normalize; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(configfile => 'biber-test.conf'); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); # WARNING - the .bcf has special defs for URLS to test verbatim lists $biber->parse_ctrlfile('basic-misc.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); Biber::Config->setblxoption('uniquelist', 1); Biber::Config->setblxoption('maxcitenames', 3); Biber::Config->setblxoption('mincitenames', 1); Biber::Config->setblxoption('maxalphanames', 3); Biber::Config->setblxoption('minalphanames', 1); Biber::Config->setblxoption('maxbibnames', 10); Biber::Config->setblxoption('minbibnames', 7); Biber::Config->setoption('isbn_normalise', 1); Biber::Config->setoption('isbn13', 1); Biber::Config->setblxoption('uniquework', 1); # THERE IS A CONFIG FILE BEING READ TO TEST USER MAPS TOO! # Now generate the information $biber->prepare; my $out = $biber->get_output_obj; my $section = $biber->sections->get_section(0); my $main = $biber->datalists->get_list('nty/global//global/global'); my @keys = sort $section->get_citekeys; my @citedkeys = sort qw{ alias1 alias2 alias5 anon1 anon2 murray t1 kant:ku kant:kpv t2 shore u1 u2 us1 list1 isbn1 isbn2 markey ent1 verb1 over1}; # entry "loh" is missing as the biber.conf map removes it with map_entry_null my @allkeys = sort map {lc()} qw{ anon1 anon2 stdmodel aristotle:poetics vazques-de-parga t1 gonzalez averroes/bland laufenberg westfahl:frontier knuth:ct:a kastenholz averroes/hannes iliad luzzatto malinowski sorace knuth:ct:d britannica nietzsche:historie stdmodel:weinberg knuth:ct:b baez/article knuth:ct:e itzhaki jaffe padhye cicero stdmodel:salam reese averroes/hercz murray shore aristotle:physics massa aristotle:anima gillies set kowalik gaonkar springer geer hammond wormanx westfahl:space worman set:herrmann augustine gerhardt piccato hasan hyman stdmodel:glashow stdmodel:ps_sc kant:kpv companion almendro sigfridsson ctan baez/online aristotle:rhetoric pimentel00 pines knuth:ct:c moraux cms angenendt angenendtsk markey cotton vangennepx kant:ku nussbaum nietzsche:ksa1 vangennep knuth:ct angenendtsa spiegelberg bertram brandt set:aksin chiu nietzsche:ksa set:yoon maron coleridge tvonb t2 u1 u2 i1 i2 tmn1 tmn2 tmn3 tmn4 lne1 alias1 alias2 alias5 url1 ol1 pages1 pages2 pages3 pages4 pages5 pages6 pages7 pages8 us1 labelstest list1 sn1 pages9 isbn1 isbn2 snk1 clone-snk1 newtestkey ent1 avona rvonr verb1 over1 others1 others2}; my $u1 = q| \entry{u1}{misc}{} \name{author}{4}{uniquelist=4}{% {{uniquename=0,uniquepart=base,hash=e1faffb3e614e6c2fba74296962386b7}{% family={AAA}, familyi={A\bibinitperiod}}}% {{uniquename=0,uniquepart=base,hash=2bb225f0ba9a58930757a868ed57d9a3}{% family={BBB}, familyi={B\bibinitperiod}}}% {{uniquename=0,uniquepart=base,hash=defb99e69a9f1f6e06f15006b1f166ae}{% family={CCC}, familyi={C\bibinitperiod}}}% {{uniquename=0,uniquepart=base,hash=45054f47ac3305a2a33e9bcceadff712}{% family={DDD}, familyi={D\bibinitperiod}}}% } \strng{namehash}{b78abdc838d79b6576f2ed0021642766} \strng{fullhash}{b78abdc838d79b6576f2ed0021642766} \strng{bibnamehash}{b78abdc838d79b6576f2ed0021642766} \strng{authorbibnamehash}{b78abdc838d79b6576f2ed0021642766} \strng{authornamehash}{b78abdc838d79b6576f2ed0021642766} \strng{authorfullhash}{b78abdc838d79b6576f2ed0021642766} \field{labelalpha}{AAA\textbf{+}00} \field{sortinit}{A} \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b} \true{singletitle} \true{uniquework} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{note}{0} \field{title}{A title} \field{year}{2000} \field{dateera}{ce} \endentry |; eq_or_diff( $out->get_output_entry('u1', $main), $u1, 'uniquelist 1' ) ; is_deeply( \@keys, \@citedkeys, 'citekeys 1') ; is_deeply($biber->datalists->get_list('shorthand/global//global/global')->get_keys, [ 'kant:kpv', 'kant:ku' ], 'shorthands' ) ; # reset some options and re-generate information # Have to do a citekey deletion as we are not re-reading the .bcf which would do it for us # Otherwise, we have citekeys and allkeys which confuses fetch_data() $section->del_citekeys; $section->set_allkeys(1); $section->bibentries->del_entries; $section->del_everykeys; Biber::Input::file::bibtex->init_cache; $biber->prepare; $section = $biber->sections->get_section(0); my $bibentries = $section->bibentries; $out = $biber->get_output_obj; # Strip out loopkeys because they contain a variable key @keys = sort grep {$_ !~ m/^loopkey/} map {lc()} $section->get_citekeys; is_deeply( \@keys, \@allkeys, 'citekeys 2') ; my $murray1 = q| \entry{murray}{article}{} \name{author}{14}{}{% {{uniquename=0,uniquepart=base,hash=f1bafaf959660d1c3ca82d486ce5a651}{% family={Hostetler}, familyi={H\bibinitperiod}, given={Michael\bibnamedelima J.}, giveni={M\bibinitperiod\bibinitdelim J\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=de9f774c929dc661b4180b07f5eb62f3}{% family={Wingate}, familyi={W\bibinitperiod}, given={Julia\bibnamedelima E.}, giveni={J\bibinitperiod\bibinitdelim E\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=76100791c221471771c6bf1dbbc0975d}{% family={Zhong}, familyi={Z\bibinitperiod}, given={Chuan-Jian}, giveni={C\bibinithyphendelim J\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=34c410f87490dd022093780c69640413}{% family={Harris}, familyi={H\bibinitperiod}, given={Jay\bibnamedelima E.}, giveni={J\bibinitperiod\bibinitdelim E\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=a803710eddd16b95e91f420c0081985c}{% family={Vachet}, familyi={V\bibinitperiod}, given={Richard\bibnamedelima W.}, giveni={R\bibinitperiod\bibinitdelim W\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=38d1db37321ac524d14a116e74123685}{% family={Clark}, familyi={C\bibinitperiod}, given={Michael\bibnamedelima R.}, giveni={M\bibinitperiod\bibinitdelim R\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=969c673c8b05314f89a822ecfbead6af}{% family={Londono}, familyi={L\bibinitperiod}, given={J.\bibnamedelimi David}, giveni={J\bibinitperiod\bibinitdelim D\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=fc6cda30bdeb421b5b57ef2d1ce6f92b}{% family={Green}, familyi={G\bibinitperiod}, given={Stephen\bibnamedelima J.}, giveni={S\bibinitperiod\bibinitdelim J\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=69dcde2965d0ce8a53fae463355f36f5}{% family={Stokes}, familyi={S\bibinitperiod}, given={Jennifer\bibnamedelima J.}, giveni={J\bibinitperiod\bibinitdelim J\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=8cfed260a429843a4846ad8d83f9a09f}{% family={Wignall}, familyi={W\bibinitperiod}, given={George\bibnamedelima D.}, giveni={G\bibinitperiod\bibinitdelim D\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=71a4aee3f5124c9c94825634735417be}{% family={Glish}, familyi={G\bibinitperiod}, given={Gary\bibnamedelima L.}, giveni={G\bibinitperiod\bibinitdelim L\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=9406f7f2b15056febb90692ae05e8620}{% family={Porter}, familyi={P\bibinitperiod}, given={Marc\bibnamedelima D.}, giveni={M\bibinitperiod\bibinitdelim D\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=f8d80918767d0ce7f535453dc016c327}{% family={Evans}, familyi={E\bibinitperiod}, given={Neal\bibnamedelima D.}, giveni={N\bibinitperiod\bibinitdelim D\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=98688e58f25c10d275f9d15d31ba3396}{% family={Murray}, familyi={M\bibinitperiod}, given={Royce\bibnamedelima W.}, giveni={R\bibinitperiod\bibinitdelim W\bibinitperiod}, givenun=0}}% } \strng{namehash}{7ba00ed438c44a2270c14ba95a7fc011} \strng{fullhash}{61836f4684b2615842b68c26479f6ec2} \strng{bibnamehash}{bc09e680e2274ab94c57b58c4500dc45} \strng{authorbibnamehash}{bc09e680e2274ab94c57b58c4500dc45} \strng{authornamehash}{7ba00ed438c44a2270c14ba95a7fc011} \strng{authorfullhash}{61836f4684b2615842b68c26479f6ec2} \field{labelalpha}{Hos\textbf{+}98} \field{sortinit}{H} \field{sortinithash}{5f15a7bc777ad49ff15aa4d2831b1681} \true{singletitle} \true{uniquework} \field{labelnamesource}{author} \field{labeltitlesource}{shorttitle} \field{annotation}{An \texttt{article} entry with \arabic{author} authors. By default, long author and editor lists are automatically truncated. This is configurable} \field{indextitle}{Alkanethiolate gold cluster molecules} \field{journaltitle}{Langmuir} \field{langid}{english} \field{langidopts}{variant=american} \field{number}{1} \field{shorttitle}{Alkanethiolate gold cluster molecules} \field{subtitle}{Core and monolayer properties as a function of core size} \field{title}{Alkanethiolate gold cluster molecules with core diameters from 1.5 to 5.2~nm} \field{volume}{14} \field{year}{1998} \field{pages}{17\bibrangedash 30} \range{pages}{14} \keyw{keyw1,keyw2} \endentry |; my $murray2 = q| \entry{murray}{article}{} \name{author}{14}{}{% {{uniquename=0,uniquepart=base,hash=f1bafaf959660d1c3ca82d486ce5a651}{% family={Hostetler}, familyi={H\bibinitperiod}, given={Michael\bibnamedelima J.}, giveni={M\bibinitperiod\bibinitdelim J\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=de9f774c929dc661b4180b07f5eb62f3}{% family={Wingate}, familyi={W\bibinitperiod}, given={Julia\bibnamedelima E.}, giveni={J\bibinitperiod\bibinitdelim E\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=76100791c221471771c6bf1dbbc0975d}{% family={Zhong}, familyi={Z\bibinitperiod}, given={Chuan-Jian}, giveni={C\bibinithyphendelim J\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=34c410f87490dd022093780c69640413}{% family={Harris}, familyi={H\bibinitperiod}, given={Jay\bibnamedelima E.}, giveni={J\bibinitperiod\bibinitdelim E\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=a803710eddd16b95e91f420c0081985c}{% family={Vachet}, familyi={V\bibinitperiod}, given={Richard\bibnamedelima W.}, giveni={R\bibinitperiod\bibinitdelim W\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=38d1db37321ac524d14a116e74123685}{% family={Clark}, familyi={C\bibinitperiod}, given={Michael\bibnamedelima R.}, giveni={M\bibinitperiod\bibinitdelim R\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=969c673c8b05314f89a822ecfbead6af}{% family={Londono}, familyi={L\bibinitperiod}, given={J.\bibnamedelimi David}, giveni={J\bibinitperiod\bibinitdelim D\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=fc6cda30bdeb421b5b57ef2d1ce6f92b}{% family={Green}, familyi={G\bibinitperiod}, given={Stephen\bibnamedelima J.}, giveni={S\bibinitperiod\bibinitdelim J\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=69dcde2965d0ce8a53fae463355f36f5}{% family={Stokes}, familyi={S\bibinitperiod}, given={Jennifer\bibnamedelima J.}, giveni={J\bibinitperiod\bibinitdelim J\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=8cfed260a429843a4846ad8d83f9a09f}{% family={Wignall}, familyi={W\bibinitperiod}, given={George\bibnamedelima D.}, giveni={G\bibinitperiod\bibinitdelim D\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=71a4aee3f5124c9c94825634735417be}{% family={Glish}, familyi={G\bibinitperiod}, given={Gary\bibnamedelima L.}, giveni={G\bibinitperiod\bibinitdelim L\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=9406f7f2b15056febb90692ae05e8620}{% family={Porter}, familyi={P\bibinitperiod}, given={Marc\bibnamedelima D.}, giveni={M\bibinitperiod\bibinitdelim D\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=f8d80918767d0ce7f535453dc016c327}{% family={Evans}, familyi={E\bibinitperiod}, given={Neal\bibnamedelima D.}, giveni={N\bibinitperiod\bibinitdelim D\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=98688e58f25c10d275f9d15d31ba3396}{% family={Murray}, familyi={M\bibinitperiod}, given={Royce\bibnamedelima W.}, giveni={R\bibinitperiod\bibinitdelim W\bibinitperiod}, givenun=0}}% } \strng{namehash}{7ba00ed438c44a2270c14ba95a7fc011} \strng{fullhash}{61836f4684b2615842b68c26479f6ec2} \strng{bibnamehash}{bc09e680e2274ab94c57b58c4500dc45} \strng{authorbibnamehash}{bc09e680e2274ab94c57b58c4500dc45} \strng{authornamehash}{7ba00ed438c44a2270c14ba95a7fc011} \strng{authorfullhash}{61836f4684b2615842b68c26479f6ec2} \field{labelalpha}{Hos98} \field{sortinit}{H} \field{sortinithash}{5f15a7bc777ad49ff15aa4d2831b1681} \true{singletitle} \true{uniquework} \field{labelnamesource}{author} \field{labeltitlesource}{shorttitle} \field{annotation}{An \texttt{article} entry with \arabic{author} authors. By default, long author and editor lists are automatically truncated. This is configurable} \field{indextitle}{Alkanethiolate gold cluster molecules} \field{journaltitle}{Langmuir} \field{langid}{english} \field{langidopts}{variant=american} \field{number}{1} \field{shorttitle}{Alkanethiolate gold cluster molecules} \field{subtitle}{Core and monolayer properties as a function of core size} \field{title}{Alkanethiolate gold cluster molecules with core diameters from 1.5 to 5.2~nm} \field{volume}{14} \field{year}{1998} \field{pages}{17\bibrangedash 30} \range{pages}{14} \keyw{keyw1,keyw2} \endentry |; # This example wouldn't compile - it's just to test escaping my $t1 = q+ \entry{t1}{misc}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=858fcf9483ec29b7707a7dda2dde7a6f}{% family={Brown}, familyi={B\bibinitperiod}, given={Bill}, giveni={B\bibinitperiod}, givenun=0}}% } \strng{namehash}{858fcf9483ec29b7707a7dda2dde7a6f} \strng{fullhash}{858fcf9483ec29b7707a7dda2dde7a6f} \strng{bibnamehash}{858fcf9483ec29b7707a7dda2dde7a6f} \strng{authorbibnamehash}{858fcf9483ec29b7707a7dda2dde7a6f} \strng{authornamehash}{858fcf9483ec29b7707a7dda2dde7a6f} \strng{authorfullhash}{858fcf9483ec29b7707a7dda2dde7a6f} \field{labelalpha}{Bro92} \field{sortinit}{B} \field{sortinithash}{276475738cc058478c1677046f857703} \true{uniquework} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{10\% of [100] and 90% of $Normal_2$ | \& # things {$^{3}$}} \field{year}{1992} \field{pages}{100\bibrangedash} \range{pages}{-1} \keyw{primary,something,somethingelse} \endentry +; my $t2 = q| \entry{t2}{misc}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=858fcf9483ec29b7707a7dda2dde7a6f}{% family={Brown}, familyi={B\bibinitperiod}, given={Bill}, giveni={B\bibinitperiod}, givenun=0}}% } \strng{namehash}{858fcf9483ec29b7707a7dda2dde7a6f} \strng{fullhash}{858fcf9483ec29b7707a7dda2dde7a6f} \strng{bibnamehash}{858fcf9483ec29b7707a7dda2dde7a6f} \strng{authorbibnamehash}{858fcf9483ec29b7707a7dda2dde7a6f} \strng{authornamehash}{858fcf9483ec29b7707a7dda2dde7a6f} \strng{authorfullhash}{858fcf9483ec29b7707a7dda2dde7a6f} \field{labelalpha}{Bro94} \field{sortinit}{B} \field{sortinithash}{276475738cc058478c1677046f857703} \true{uniquework} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{Signs of W$\frac{o}{a}$nder} \field{year}{1994} \field{pages}{100\bibrangedash 108} \range{pages}{9} \endentry |; my $anon1 = q| \entry{anon1}{unpublished}{} \name{author}{1}{}{% {{hash=a66f357fe2fd356fe49959173522a651}{% family={AnonymousX}, familyi={A\bibinitperiod}}}% } \name{shortauthor}{1}{}{% {{uniquename=0,uniquepart=base,hash=9873a6cc65c553faa2b21aaad626fe4b}{% family={XAnony}, familyi={X\bibinitperiod}}}% } \strng{namehash}{9873a6cc65c553faa2b21aaad626fe4b} \strng{fullhash}{a66f357fe2fd356fe49959173522a651} \strng{bibnamehash}{9873a6cc65c553faa2b21aaad626fe4b} \strng{authorbibnamehash}{a66f357fe2fd356fe49959173522a651} \strng{authornamehash}{a66f357fe2fd356fe49959173522a651} \strng{authorfullhash}{a66f357fe2fd356fe49959173522a651} \strng{shortauthorbibnamehash}{9873a6cc65c553faa2b21aaad626fe4b} \strng{shortauthornamehash}{9873a6cc65c553faa2b21aaad626fe4b} \strng{shortauthorfullhash}{9873a6cc65c553faa2b21aaad626fe4b} \field{labelalpha}{XAn35} \field{sortinit}{A} \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b} \true{singletitle} \true{uniquework} \field{labelnamesource}{shortauthor} \field{labeltitlesource}{shorttitle} \field{langid}{english} \field{langidopts}{variant=american} \field{note}{anon1} \field{shorttitle}{Shorttitle} \field{title}{Title1} \field{year}{1835} \field{pages}{111\bibrangedash 118} \range{pages}{8} \keyw{arc} \endentry |; my $anon2 = q| \entry{anon2}{unpublished}{} \name{author}{1}{}{% {{hash=a0bccee4041bc840e14c06e5ba7f083c}{% family={AnonymousY}, familyi={A\bibinitperiod}}}% } \name{shortauthor}{1}{}{% {{uniquename=0,uniquepart=base,hash=f64c29e89ea49402b997956610b58ef6}{% family={YAnony}, familyi={Y\bibinitperiod}}}% } \strng{namehash}{f64c29e89ea49402b997956610b58ef6} \strng{fullhash}{a0bccee4041bc840e14c06e5ba7f083c} \strng{bibnamehash}{f64c29e89ea49402b997956610b58ef6} \strng{authorbibnamehash}{a0bccee4041bc840e14c06e5ba7f083c} \strng{authornamehash}{a0bccee4041bc840e14c06e5ba7f083c} \strng{authorfullhash}{a0bccee4041bc840e14c06e5ba7f083c} \strng{shortauthorbibnamehash}{f64c29e89ea49402b997956610b58ef6} \strng{shortauthornamehash}{f64c29e89ea49402b997956610b58ef6} \strng{shortauthorfullhash}{f64c29e89ea49402b997956610b58ef6} \field{labelalpha}{YAn39} \field{sortinit}{A} \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b} \true{singletitle} \true{uniquework} \field{labelnamesource}{shortauthor} \field{labeltitlesource}{shorttitle} \field{langid}{english} \field{langidopts}{variant=american} \field{note}{anon2} \field{shorttitle}{Shorttitle} \field{title}{Title2} \field{year}{1839} \field{pages}{1176\bibrangedash 1276} \range{pages}{101} \keyw{arc} \endentry |; my $url1 = q| \entry{url1}{misc}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=b2106a3dda6c5a4879a0cab37e9cca55}{% family={Alias}, familyi={A\bibinitperiod}, given={Alan}, giveni={A\bibinitperiod}, givenun=0}}% } \strng{namehash}{b2106a3dda6c5a4879a0cab37e9cca55} \strng{fullhash}{b2106a3dda6c5a4879a0cab37e9cca55} \strng{bibnamehash}{b2106a3dda6c5a4879a0cab37e9cca55} \strng{authorbibnamehash}{b2106a3dda6c5a4879a0cab37e9cca55} \strng{authornamehash}{b2106a3dda6c5a4879a0cab37e9cca55} \strng{authorfullhash}{b2106a3dda6c5a4879a0cab37e9cca55} \field{labelalpha}{Ali05} \field{sortinit}{A} \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b} \field{extraalpha}{4} \field{labelnamesource}{author} \field{year}{2005} \field{dateera}{ce} \verb{urlraw} \verb http://www.something.com/q=አ\endverb \verb{url} \verb http://www.something.com/q=%C3%A1%C5%A0 \endverb \lverb{urls}{2} \lverb http://www.something.com/q=%C3%A1%C5%A0 \lverb http://www.sun.com \endlverb \endentry |; my $list1 = q| \entry{list1}{book}{} \true{morelocation} \list{location}{2}{% {ÁAA}% {BBB}% } \field{sortinit}{} \field{sortinithash}{495dc9894017a8b12cafa9c619d10c0c} \endentry |; my $over1 = q| \entry{over1}{book}{} \field{sortinit}{} \field{sortinithash}{495dc9894017a8b12cafa9c619d10c0c} \field{userd}{thing} \endentry |; my $Worman_N = [ "Worman\x{10FFFD}WormanN" ] ; my $Gennep = [ "vanGennep\x{10FFFD}vanGennepA", "vanGennep\x{10FFFD}vanGennepJ" ] ; eq_or_diff( $out->get_output_entry('t1', $main), $t1, 'bbl entry with maths in title 1'); eq_or_diff( $bibentries->entry('shore')->get_field('month'), '3', 'default bib month macros'); ok( $bibentries->entry('t1')->has_keyword('primary'), 'Keywords test - 1'); ok( $bibentries->entry('t1')->has_keyword('something'), 'Keywords test - 2'); ok( $bibentries->entry('t1')->has_keyword('somethingelse'), 'Keywords test - 3'); eq_or_diff( $out->get_output_entry('t2', $main), $t2, 'bbl entry with maths in title 2'); is_deeply( $main->_get_uniquename('WormanN', 'global'), $Worman_N, 'uniquename count 1'); is_deeply( $main->_get_uniquename('vanGennep', 'global'), $Gennep, 'uniquename count 2'); eq_or_diff( $out->get_output_entry('murray', $main), $murray1, 'bbl with > maxcitenames'); eq_or_diff( $out->get_output_entry('missing1'), " \\missing{missing1}\n", 'missing citekey 1'); eq_or_diff( $out->get_output_entry('missing2'), " \\missing{missing2}\n", 'missing citekey 2'); Biber::Config->setblxoption('alphaothers', ''); Biber::Config->setblxoption('sortalphaothers', ''); # Have to do a citekey deletion as we are not re-reading the .bcf which would do it for us # Otherwise, we have citekeys and allkeys which confuses fetch_data() $section->del_citekeys; $section->bibentries->del_entries; $section->del_everykeys; Biber::Input::file::bibtex->init_cache; $biber->prepare; $section = $biber->sections->get_section(0); $main = $biber->datalists->get_list('nty/global//global/global'); $out = $biber->get_output_obj; eq_or_diff($out->get_output_entry('murray', $main), $murray2, 'bbl with > maxcitenames, empty alphaothers'); # Make sure namehash and fullhash are seperately generated eq_or_diff( $out->get_output_entry('anon1', $main), $anon1, 'namehash/fullhash 1' ) ; eq_or_diff( $out->get_output_entry('anon2', $main), $anon2, 'namehash/fullhash 2' ) ; # Testing of user field map ignores ok(is_undef($bibentries->entry('i1')->get_field('abstract')), 'map 1' ); eq_or_diff($bibentries->entry('i1')->get_field('userd'), 'test', 'map 2' ); ok(is_undef($bibentries->entry('i2')->get_field('userb')), 'map 3' ); eq_or_diff(NFC($bibentries->entry('i2')->get_field('usere')), 'a Štring', 'map 4' ); # Testing ot UTF8 match/replace eq_or_diff($biber->_liststring('i1', 'listd'), 'abc', 'map 5' ); # Testing of user field map match/replace eq_or_diff($biber->_liststring('i1', 'listb'), 'REPlacedte!early', 'map 6'); eq_or_diff($biber->_liststring('i1', 'institution'), 'REPlaCEDte!early', 'map 7'); # Testing of pseudo-field "entrykey" handling eq_or_diff($bibentries->entry('i1')->get_field('note'), 'i1', 'map 8' ); # Checking deletion of alsosets with value BMAP_NULL ok(is_undef($bibentries->entry('i2')->get_field('userf')), 'map 9' ); # Checking that the "misc" type-specific mapping to null takes precedence over global userb->userc ok(is_undef($bibentries->entry('i2')->get_field('userc')), 'map 10' ); # Make sure visibility doesn't exceed number of names. eq_or_diff($main->get_visible_bib($bibentries->entry('i2')->get_field($bibentries->entry('i2')->get_labelname_info)->get_id), '3', 'bib visibility - 1'); # Testing per_type and per_entry max/min* so reset globals to defaults Biber::Config->setblxoption('uniquelist', 0); Biber::Config->setblxoption('maxcitenames', 3); Biber::Config->setblxoption('mincitenames', 1); Biber::Config->setblxoption('maxitems', 3); Biber::Config->setblxoption('minitems', 1); Biber::Config->setblxoption('maxbibnames', 3); Biber::Config->setblxoption('minbibnames', 1); Biber::Config->setblxoption('maxalphanames', 3); Biber::Config->setblxoption('minalphanames', 1); Biber::Config->setblxoption('maxcitenames', 1, 'ENTRYTYPE', 'misc'); Biber::Config->setblxoption('maxbibnames', 2, 'ENTRYTYPE', 'unpublished'); Biber::Config->setblxoption('minbibnames', 2, 'ENTRYTYPE', 'unpublished'); # maxalphanames is set on tmn2 entry Biber::Config->setblxoption('minalphanames', 2, 'ENTRYTYPE', 'book'); # minitems is set on tmn3 entry Biber::Config->setblxoption('maxitems', 2, 'ENTRYTYPE', 'unpublished'); # Have to do a citekey deletion as we are not re-reading the .bcf which would do it for us # Otherwise, we have citekeys and allkeys which confuses fetch_data() $section->del_citekeys; $section->bibentries->del_entries; $section->del_everykeys; Biber::Input::file::bibtex->init_cache; $biber->prepare; $section = $biber->sections->get_section(0); $main = $biber->datalists->get_list('nty/global//global/global'); eq_or_diff($main->get_visible_cite($bibentries->entry('tmn1')->get_field($bibentries->entry('tmn1')->get_labelname_info)->get_id), '1', 'per_type maxcitenames - 1'); eq_or_diff($main->get_visible_cite($bibentries->entry('tmn2')->get_field($bibentries->entry('tmn2')->get_labelname_info)->get_id), '3', 'per_type maxcitenames - 2'); eq_or_diff($main->get_visible_bib($bibentries->entry('tmn3')->get_field($bibentries->entry('tmn3')->get_labelname_info)->get_id), '2', 'per_type bibnames - 3'); eq_or_diff($main->get_visible_bib($bibentries->entry('tmn4')->get_field($bibentries->entry('tmn4')->get_labelname_info)->get_id), '3', 'per_type bibnames - 4'); eq_or_diff($main->get_visible_alpha($bibentries->entry('tmn1')->get_field($bibentries->entry('tmn1')->get_labelname_info)->get_id), '3', 'per_type/entry alphanames - 1'); eq_or_diff($main->get_visible_alpha($bibentries->entry('tmn2')->get_field($bibentries->entry('tmn2')->get_labelname_info)->get_id), '2', 'per_type/entry alphanames - 2'); eq_or_diff($biber->_liststring('tmn1', 'institution'), 'A!B!C', 'per_type/entry items - 1'); eq_or_diff($biber->_liststring('tmn3', 'institution'), "A!B\x{10FFFD}", 'per_type/entry items - 2'); # Citekey alias testing eq_or_diff($section->get_citekey_alias('alias3'), 'alias1', 'Citekey aliases - 1'); ok(is_undef($section->get_citekey_alias('alias2')), 'Citekey aliases - 2'); eq_or_diff($section->get_citekey_alias('alias4'), 'alias2', 'Citekey aliases - 3'); # primary key 'alias5' is not cited but should be added anyway as cited alias 'alias6' needs it eq_or_diff($section->get_citekey_alias('alias6'), 'alias5', 'Citekey aliases - 4'); ok($bibentries->entry('alias5'), 'Citekey aliases - 5'); # URL encoding testing # Should be raw as encoding is done on output eq_or_diff(NFC($bibentries->entry('url1')->get_field('url')), 'http://www.something.com/q=áŠ', 'URL encoding - 1'); eq_or_diff($out->get_output_entry('url1', $main), $url1, 'URL encoding - 2' ) ; # map_final testing with map_field_set eq_or_diff($bibentries->entry('ol1')->get_field('note'), 'A note', 'map_final - 1'); eq_or_diff($bibentries->entry('ol1')->get_field('title'), 'Online1', 'map_final - 2'); # Test for tricky pages field is_deeply($bibentries->entry('pages1')->get_field('pages'), [[23, 24]], 'pages - 1'); is_deeply($bibentries->entry('pages2')->get_field('pages'), [[23, undef]], 'pages - 2'); is_deeply($bibentries->entry('pages3')->get_field('pages'), [['I-II', 'III-IV']], 'pages - 3'); is_deeply($bibentries->entry('pages4')->get_field('pages'), [[3,5]], 'pages - 4'); is_deeply($bibentries->entry('pages5')->get_field('pages'), [[42, '']], 'pages - 5'); is_deeply($bibentries->entry('pages6')->get_field('pages'), [['\bibstring{number} 42', undef]], 'pages - 6'); is_deeply($bibentries->entry('pages7')->get_field('pages'), [['\bibstring{number} 42', undef], [3,6], ['I-II',5 ]], 'pages - 7'); is_deeply($bibentries->entry('pages8')->get_field('pages'), [[10,15],['ⅥⅠ', 'ⅻ']], 'pages - 8'); is_deeply($bibentries->entry('pages9')->get_field('pages'), [['M-1','M-4']], 'pages - 9'); # Test for map levels, the user map makes this CUSTOMC and then style map makes it CUSTOMA eq_or_diff($bibentries->entry('us1')->get_field('entrytype'), 'customa', 'Map levels - 1'); # Test for "others" in lists eq_or_diff( $out->get_output_entry('list1', $main), $list1, 'Entry with others list' ) ; # source->target mapping with overwrite test eq_or_diff($out->get_output_entry('over1', $main), $over1, 'Overwrite test - 1'); my $isbn1 = q| \entry{isbn1}{misc}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=f6595ccb9db5f634e7bb242a3f78e5f9}{% family={Flummox}, familyi={F\bibinitperiod}, given={Fred}, giveni={F\bibinitperiod}, givenun=0}}% } \strng{namehash}{f6595ccb9db5f634e7bb242a3f78e5f9} \strng{fullhash}{f6595ccb9db5f634e7bb242a3f78e5f9} \strng{bibnamehash}{f6595ccb9db5f634e7bb242a3f78e5f9} \strng{authorbibnamehash}{f6595ccb9db5f634e7bb242a3f78e5f9} \strng{authornamehash}{f6595ccb9db5f634e7bb242a3f78e5f9} \strng{authorfullhash}{f6595ccb9db5f634e7bb242a3f78e5f9} \field{labelalpha}{Flu} \field{sortinit}{F} \field{sortinithash}{669c706c6f1fbf3b5a83d26f1d9e9e72} \field{extraalpha}{1} \field{labelnamesource}{author} \field{isbn}{978-0-8165-2066-4} \endentry |; my $isbn2 = q| \entry{isbn2}{misc}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=f6595ccb9db5f634e7bb242a3f78e5f9}{% family={Flummox}, familyi={F\bibinitperiod}, given={Fred}, giveni={F\bibinitperiod}, givenun=0}}% } \strng{namehash}{f6595ccb9db5f634e7bb242a3f78e5f9} \strng{fullhash}{f6595ccb9db5f634e7bb242a3f78e5f9} \strng{bibnamehash}{f6595ccb9db5f634e7bb242a3f78e5f9} \strng{authorbibnamehash}{f6595ccb9db5f634e7bb242a3f78e5f9} \strng{authornamehash}{f6595ccb9db5f634e7bb242a3f78e5f9} \strng{authorfullhash}{f6595ccb9db5f634e7bb242a3f78e5f9} \field{labelalpha}{Flu} \field{sortinit}{F} \field{sortinithash}{669c706c6f1fbf3b5a83d26f1d9e9e72} \field{extraalpha}{2} \field{labelnamesource}{author} \field{isbn}{978-0-8165-2066-4} \endentry |; # ISBN options tests eq_or_diff($out->get_output_entry('isbn1', $main), $isbn1, 'ISBN options - 1'); eq_or_diff($out->get_output_entry('isbn2', $main), $isbn2, 'ISBN options - 2'); my $new1 = q| \entry{newtestkey}{book}{} \field{sortinit}{} \field{sortinithash}{495dc9894017a8b12cafa9c619d10c0c} \field{note}{note} \field{usera}{RC-6947} \field{userb}{RC} \endentry |; my $clone1 = q| \entry{snk1}{book}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=83330b0520b5d4ea57529a23b404d43d}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}, givenun=0, prefix={von}, prefixi={v\bibinitperiod}, suffix={Jr}, suffixi={J\bibinitperiod}, suffixun=0}}% } \strng{namehash}{83330b0520b5d4ea57529a23b404d43d} \strng{fullhash}{83330b0520b5d4ea57529a23b404d43d} \strng{bibnamehash}{83330b0520b5d4ea57529a23b404d43d} \strng{authorbibnamehash}{83330b0520b5d4ea57529a23b404d43d} \strng{authornamehash}{83330b0520b5d4ea57529a23b404d43d} \strng{authorfullhash}{83330b0520b5d4ea57529a23b404d43d} \field{labelalpha}{vDoe} \field{sortinit}{v} \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b} \field{extraalpha}{2} \field{labelnamesource}{author} \endentry |; my $clone2 = q| \entry{clone-snk1}{book}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=83330b0520b5d4ea57529a23b404d43d}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}, givenun=0, prefix={von}, prefixi={v\bibinitperiod}, suffix={Jr}, suffixi={J\bibinitperiod}, suffixun=0}}% } \strng{namehash}{83330b0520b5d4ea57529a23b404d43d} \strng{fullhash}{83330b0520b5d4ea57529a23b404d43d} \strng{bibnamehash}{83330b0520b5d4ea57529a23b404d43d} \strng{authorbibnamehash}{83330b0520b5d4ea57529a23b404d43d} \strng{authornamehash}{83330b0520b5d4ea57529a23b404d43d} \strng{authorfullhash}{83330b0520b5d4ea57529a23b404d43d} \field{labelalpha}{vDoe} \field{sortinit}{v} \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b} \field{extraalpha}{1} \field{labelnamesource}{author} \field{addendum}{add} \endentry |; my $ent1 = q| \entry{ent1}{book}{} \name{author}{2}{sortingnamekeytemplatename=snks1}{% {{uniquename=0,uniquepart=base,hash=6b3653417f9aa97391c37cff5dfda7fa}{% family={Smith}, familyi={S\bibinitperiod}, given={Simon}, giveni={S\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,sortingnamekeytemplatename=snks2,hash=878a51e6f69e95562d15cb8a3ead5c95}{% family={Brown}, familyi={B\bibinitperiod}, given={Brian}, giveni={B\bibinitperiod}, givenun=0, prefix={de}, prefixi={d\bibinitperiod}}}% } \strng{namehash}{b2536a425d549b46de5f21c4d468050a} \strng{fullhash}{b2536a425d549b46de5f21c4d468050a} \strng{bibnamehash}{b2536a425d549b46de5f21c4d468050a} \strng{authorbibnamehash}{b2536a425d549b46de5f21c4d468050a} \strng{authornamehash}{b2536a425d549b46de5f21c4d468050a} \strng{authorfullhash}{b2536a425d549b46de5f21c4d468050a} \field{labelalpha}{SdB} \field{sortinit}{S} \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6} \true{singletitle} \field{labelnamesource}{author} \endentry |; my $verb1 = q| \entry{verb1}{book}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=cac5a25f503e71f5ef28f474e14007b6}{% family={Allright}, familyi={A\\bibinitperiod}, given={Arthur}, giveni={A\\bibinitperiod}, givenun=0}}% } \strng{namehash}{cac5a25f503e71f5ef28f474e14007b6} \strng{fullhash}{cac5a25f503e71f5ef28f474e14007b6} \strng{bibnamehash}{cac5a25f503e71f5ef28f474e14007b6} \strng{authorbibnamehash}{cac5a25f503e71f5ef28f474e14007b6} \strng{authornamehash}{cac5a25f503e71f5ef28f474e14007b6} \strng{authorfullhash}{cac5a25f503e71f5ef28f474e14007b6} \field{labelalpha}{All} \field{sortinit}{A} \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b} \true{singletitle} \field{labelnamesource}{author} \verb{verba} \verb \=y.\"a \endverb \endentry |; # clone test eq_or_diff($out->get_output_entry('snk1', $main), $clone1, 'Clone - 1'); eq_or_diff($out->get_output_entry('clone-snk1', $main), $clone2, 'Clone - 2'); # New entry map test eq_or_diff($out->get_output_entry('newtestkey', $main), $new1, 'New key mapping - 1'); # Should be three new ids in here with random keys is(3, scalar(grep {$_ =~ m/^loopkey:/} $section->get_citekeys), 'New key loop mapping - 1'); eq_or_diff($bibentries->entry([grep {$_ =~ m/^loopkey:/} $section->get_citekeys]->[0])->get_field('note'), 'NOTEreplaced', 'New key loop mapping - 2'); # notfield test eq_or_diff($bibentries->entry('markey')->get_field('addendum'), 'NF1', 'notfield - 1'); ok(is_undef($bibentries->entry('markey')->get_field('userb')), 'notfield - 2'); # Extended name format test eq_or_diff($out->get_output_entry('ent1', $main), $ent1, 'Extended name test - 1'); # Verbatim decode test eq_or_diff($out->get_output_entry('verb1', $main), $verb1, 'Decoding verbatim fields - 1'); biblatex-biber-2.9/t/skips.t000444000153000001 2406113205066062 15442 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 15; use Test::Differences; unified_diff; use Biber; use Biber::Utils; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata"); my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('skips.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Now generate the information $biber->prepare; my $out = $biber->get_output_obj; my $section = $biber->sections->get_section(0); my $main = $biber->datalists->get_list('custom/global//global/global'); my $shs = $biber->datalists->get_list('shorthands/global//global/global', 0, 'list'); my $bibentries = $section->bibentries; my $set1 = q| \entry{seta}{set}{} \set{set:membera,set:memberb,set:memberc} \field{labelalpha}{Doe10} \field{extraalpha}{1} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \endentry |; my $set2 = q| \entry{set:membera}{book}{} \inset{seta} \name{author}{1}{}{% {{hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}}}% } \strng{namehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{fullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{bibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorbibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{Set Member A} \field{year}{2010} \field{dateera}{ce} \keyw{key1,key2} \endentry |; my $set3 = q| \entry{set:memberb}{book}{} \inset{seta} \name{author}{1}{}{% {{hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}}}% } \strng{namehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{fullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{bibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorbibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{Set Member B} \field{year}{2010} \field{dateera}{ce} \endentry |; my $set4 = q| \entry{set:memberc}{book}{} \inset{seta} \name{author}{1}{}{% {{hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}}}% } \strng{namehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{fullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{bibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorbibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{Set Member C} \field{year}{2010} \field{dateera}{ce} \endentry |; my $noset1 = q| \entry{noseta}{book}{} \name{author}{1}{}{% {{hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}}}% } \strng{namehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{fullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{bibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorbibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \field{labelalpha}{Doe10} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{extradate}{2} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{extraalpha}{2} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{Stand-Alone A} \field{year}{2010} \field{dateera}{ce} \endentry |; my $noset2 = q| \entry{nosetb}{book}{} \name{author}{1}{}{% {{hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}}}% } \strng{namehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{fullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{bibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorbibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \field{labelalpha}{Doe10} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{extradate}{3} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{extraalpha}{3} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{Stand-Alone B} \field{year}{2010} \field{dateera}{ce} \endentry |; my $noset3 = q| \entry{nosetc}{book}{} \name{author}{1}{}{% {{hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}}}% } \strng{namehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{fullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{bibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorbibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \field{labelalpha}{Doe10} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{extradate}{4} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{extraalpha}{4} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{title}{Stand-Alone C} \field{year}{2010} \field{dateera}{ce} \endentry |; my $sk4 = q| \entry{skip4}{article}{dataonly} \name{author}{1}{}{% {{hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}}}% } \list{location}{1}{% {Cambridge}% } \list{publisher}{1}{% {A press}% } \strng{namehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{fullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{bibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorbibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{labeldatesource}{year} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{shorthand}{AWS} \field{title}{Algorithms Which Sort} \field{year}{1932} \endentry |; is_deeply($bibentries->entry('skip1')->get_field('options'), ['skipbib'], 'Passing skipbib through'); eq_or_diff($main->get_entryfield('skip2', 'labelalpha'), 'SA', 'Normal labelalpha'); eq_or_diff($bibentries->entry('skip2')->get_field($bibentries->entry('skip2')->get_labeldate_info->{field}{year}), '1995', 'Normal labelyear'); ok(is_undef($bibentries->entry('skip3')->get_field('labelalpha')), 'skiplab - no labelalpha'); eq_or_diff($bibentries->entry('skip3')->get_labeldate_info->{field}{source}, 'year', 'skiplab - no labelyear'); ok(is_undef($bibentries->entry('skip4')->get_field('labelalpha')), 'dataonly - no labelalpha'); eq_or_diff($out->get_output_entry('skip4', $main), $sk4, 'dataonly - checking output'); eq_or_diff($bibentries->entry('skip4')->get_labeldate_info->{field}{source}, 'year', 'dataonly - no labelyear'); eq_or_diff($out->get_output_entry('seta', $main), $set1, 'Set parent - with labels'); eq_or_diff($out->get_output_entry('set:membera', $main), $set2, 'Set member - no labels 1'); eq_or_diff($out->get_output_entry('set:memberb', $main), $set3, 'Set member - no labels 2'); eq_or_diff($out->get_output_entry('set:memberc', $main), $set4, 'Set member - no labels 3'); eq_or_diff($out->get_output_entry('noseta', $main), $noset1, 'Not a set member - extradate continues from set 1'); eq_or_diff($out->get_output_entry('nosetb', $main), $noset2, 'Not a set member - extradate continues from set 2'); eq_or_diff($out->get_output_entry('nosetc', $main), $noset3, 'Not a set member - extradate continues from set 3'); biblatex-biber-2.9/t/options.t000444000153000001 1521113205066062 16001 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8' ; use Test::More tests => 9; use Test::Differences; unified_diff; use Biber; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata") ; # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('options.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Testing customg xsv format sep Biber::Config->setoption('xsvsep', '\s*\|\s*'); # Biblatex options Biber::Config->setblxoption('labeldatespec', [ {content => 'date', type => 'field'} ]); # Now generate the information $biber->prepare; my $out = $biber->get_output_obj; my $section = $biber->sections->get_section(0); my $main = $biber->datalists->get_list('nty/global//global/global'); my $bibentries = $section->bibentries; my $dmv = [ [ {'presort' => {}}, {'mm' => {}}, ], [ {'sortkey' => {'final' => 1}} ], [ {'sortname' => {}}, {'author' => {}}, {'editor' => {}}, {'translator' => {}}, {'sorttitle' => {}}, {'title' => {}} ], [ {'sorttitle' => {}}, {'title' => {}} ], [ {'sortyear' => {}}, {'year' => {}} ], [ {'volume' => {}}, {'0000' => {}} ] ]; my $bln = [ {content => 'author'}, {content => 'editor'} ]; my $l1 = q| \entry{L1}{book}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}, givenun=0}}% } \list{publisher}{1}{% {Oxford}% } \strng{namehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{fullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{bibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorbibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{day}{5} \field{month}{4} \field{origday}{30} \field{origmonth}{10} \field{origyear}{1985} \field{title}{Title 1} \field{year}{1998} \field{dateera}{ce} \field{origdateera}{ce} \keyw{one,two,three} \endentry |; my $l2 = q| \entry{L2}{book}{maxcitenames=3,maxbibnames=3,maxitems=2} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=19eec87c959944d6d9c72434a42856ba}{% family={Edwards}, familyi={E\bibinitperiod}, given={Ellison}, giveni={E\bibinitperiod}, givenun=0}}% } \list{publisher}{1}{% {Oxford}% } \strng{namehash}{19eec87c959944d6d9c72434a42856ba} \strng{fullhash}{19eec87c959944d6d9c72434a42856ba} \strng{bibnamehash}{19eec87c959944d6d9c72434a42856ba} \strng{authorbibnamehash}{19eec87c959944d6d9c72434a42856ba} \strng{authornamehash}{19eec87c959944d6d9c72434a42856ba} \strng{authorfullhash}{19eec87c959944d6d9c72434a42856ba} \field{sortinit}{E} \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{day}{5} \field{month}{4} \field{title}{Title 2} \field{year}{1998} \field{dateera}{ce} \endentry |; my $l3 = q| \entry{L3}{book}{blah=10} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=490250da1f3b92580d97563dc96c6c84}{% family={Bluntford}, familyi={B\bibinitperiod}, given={Bunty}, giveni={B\bibinitperiod}, givenun=0}}% } \list{publisher}{1}{% {Oxford}% } \strng{namehash}{490250da1f3b92580d97563dc96c6c84} \strng{fullhash}{490250da1f3b92580d97563dc96c6c84} \strng{bibnamehash}{490250da1f3b92580d97563dc96c6c84} \strng{authorbibnamehash}{490250da1f3b92580d97563dc96c6c84} \strng{authornamehash}{490250da1f3b92580d97563dc96c6c84} \strng{authorfullhash}{490250da1f3b92580d97563dc96c6c84} \field{sortinit}{B} \field{sortinithash}{276475738cc058478c1677046f857703} \field{extradatescope}{labelyear} \field{labeldatesource}{} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{day}{5} \field{month}{4} \field{title}{Title 3} \field{year}{1999} \field{dateera}{ce} \endentry |; ok(Biber::Config->getblxoption('uniquename') == 1, "Single-valued option") ; is_deeply(Biber::Config->getblxoption('labelnamespec'), [ {content => 'author'} ], "Multi-valued options"); ok(Biber::Config->getoption('mincrossrefs') == 88, "Setting Biber options via control file"); ok(Biber::Config->getblxoption('useprefix', 'book') == 1 , "Per-type single-valued options"); is_deeply(Biber::Config->getblxoption('labelnamespec', 'book'), $bln, "Per-type multi-valued options"); eq_or_diff($bibentries->entry('L1')->get_labeldate_info->{field}{year}, 'year', 'Global labelyear setting' ) ; eq_or_diff( $out->get_output_entry('L1', $main), $l1, 'Global labelyear setting - labelyear should be YEAR') ; eq_or_diff( $out->get_output_entry('L2', $main), $l2, 'Entry-local biblatex option mappings - 1') ; eq_or_diff( $out->get_output_entry('L3', $main), $l3, 'Entry-local biblatex option mappings - 2') ; biblatex-biber-2.9/t/labelname.t000444000153000001 444513205066062 16215 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 4; use Test::Differences; unified_diff; use Biber; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); $biber->parse_ctrlfile("general.bcf"); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biblatex options Biber::Config->setblxoption('labelnamespec', [ {content => 'shortauthor'}, {content => 'author'}, {content => 'shorteditor'}, {content => 'editor'}, {content => 'translator'}]); Biber::Config->setblxoption('labelnamespec', [ {content => 'editor'}, {content => 'translator'}], 'ENTRYTYPE', 'book'); Biber::Config->setblxoption('labelnamespec', [ {content => 'namea'}, {content => 'author' }], 'ENTRYTYPE', 'misc'); # Now generate the information $biber->prepare; my $bibentries = $biber->sections->get_section(0)->bibentries; eq_or_diff($bibentries->entry('angenendtsa')->get_labelname_info, 'shortauthor', 'global shortauthor' ); eq_or_diff($bibentries->entry('stdmodel')->get_labelname_info, 'author', 'global author' ); eq_or_diff($bibentries->entry('aristotle:anima')->get_labelname_info, 'editor', 'type-specific editor' ); eq_or_diff($bibentries->entry('lne1')->get_labelname_info, 'namea', 'type-specific exotic name' ); biblatex-biber-2.9/t/full-bbl.t000444000153000001 234213205066062 15766 0ustar00vboxother000000000000# -*- cperl -*- use v5.24; use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More; if ($ENV{BIBER_DEV_TESTS}) { plan tests => 5; } else { plan skip_all => 'BIBER_DEV_TESTS not set'; } use IPC::Run3; use File::Temp; use File::Compare; use File::Which; my $perl = which('perl'); my $tmpfile = File::Temp->new(); #my $tmpfile = File::Temp->new(UNLINK => 0); my $bbl = $tmpfile->filename; my $stdout; my $stderr; run3 [ $perl, 'bin/biber', '--noconf', '--nolog', "--output-file=$bbl", 't/tdata/full-bbl.bcf' ], \undef, \$stdout, \$stderr; # say $stdout; # say $stderr; is($? >> 8, 0, 'Full test has zero exit status'); ok(compare($bbl, 't/tdata/full-bbl.bbl') == 0, 'Testing lossort case and sortinit for macros'); like($stdout, qr|WARN - Duplicate entry key: 'F1' in file 't/tdata/full-bbl\.bib', skipping \.\.\.|ms, 'Testing duplicate/case key warnings - 1'); like($stdout, qr|WARN - Possible typo \(case mismatch\) between datasource keys: 'f1' and 'F1' in file 't/tdata/full-bbl\.bib'|ms, 'Testing duplicate/case key warnings - 2'); like($stdout, qr|WARN - Possible typo \(case mismatch\) between citation and datasource keys: 'C1' and 'c1' in file 't/tdata/full-bbl\.bib'|ms, 'Testing duplicate/case key warnings - 3'); biblatex-biber-2.9/t/uniqueness.t000444000153000001 16103013205066062 16526 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 213; use Test::Differences; unified_diff; use Biber; use Biber::Utils; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('uniqueness1.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('maxcitenames', 1); Biber::Config->setblxoption('mincitenames', 1); Biber::Config->setblxoption('uniquename', 2); Biber::Config->setblxoption('uniquelist', 1); # Now generate the information $biber->prepare; my $section = $biber->sections->get_section(0); my $bibentries = $section->bibentries; my $main = $biber->datalists->get_list('nty/global//global/global'); # Basic uniquename and hash testing eq_or_diff($main->get_unsummary($bibentries->entry('un1')->get_field($bibentries->entry('un1')->get_labelname_info)->get_id,$bibentries->entry('un1')->get_field($bibentries->entry('un1')->get_labelname_info)->nth_name(1)->get_id), '2', 'Uniquename requiring full name expansion - 1'); eq_or_diff($main->get_unsummary($bibentries->entry('un2')->get_field($bibentries->entry('un2')->get_labelname_info)->get_id,$bibentries->entry('un2')->get_field($bibentries->entry('un2')->get_labelname_info)->nth_name(1)->get_id), '2', 'Uniquename requiring full name expansion - 2'); eq_or_diff($main->get_unsummary($bibentries->entry('un5')->get_field($bibentries->entry('un5')->get_labelname_info)->get_id,$bibentries->entry('un5')->get_field($bibentries->entry('un5')->get_labelname_info)->nth_name(1)->get_id), '2', 'Uniquename requiring full name expansion - 3'); eq_or_diff($main->get_unsummary($bibentries->entry('un3')->get_field($bibentries->entry('un2')->get_labelname_info)->get_id,$bibentries->entry('un3')->get_field($bibentries->entry('un2')->get_labelname_info)->nth_name(1)->get_id), '1', 'Uniquename requiring initials name expansion - 1'); eq_or_diff($main->get_unsummary($bibentries->entry('un4')->get_field($bibentries->entry('un4')->get_labelname_info)->get_id,$bibentries->entry('un4')->get_field($bibentries->entry('un4')->get_labelname_info)->nth_name(1)->get_id), '1', 'Uniquename requiring initials name expansion - 2'); ok(is_undef($main->get_unsummary($bibentries->entry('un4a')->get_field($bibentries->entry('un4a')->get_labelname_info)->get_id,$bibentries->entry('un4a')->get_field($bibentries->entry('un4a')->get_labelname_info)->nth_name(1)->get_id)), 'per-entry uniquename'); eq_or_diff($main->get_entryfield('un6', 'namehash'), 'f8169a157f8d9209961157b8d23902db', 'Namehash and fullhash - 1'); eq_or_diff($bibentries->entry('un6')->get_field('fullhash'), 'f8169a157f8d9209961157b8d23902db', 'Namehash and fullhash - 2'); eq_or_diff($main->get_entryfield('un7', 'namehash'), 'b33fbd3f3349d1536dbcc14664f2cbbd', 'Fullnamehash ignores SHORT* names - 1'); eq_or_diff($bibentries->entry('un7')->get_field('fullhash'), 'f8169a157f8d9209961157b8d23902db', 'Fullnamehash ignores SHORT* names - 2'); eq_or_diff($main->get_entryfield('test1', 'namehash'), '07df5c892ba1452776abee0a867591f2', 'Namehash and fullhash - 3'); eq_or_diff($bibentries->entry('test1')->get_field('fullhash'), '637292dd2997a74c91847f1ec5081a46', 'Namehash and fullhash - 4'); eq_or_diff($main->get_unsummary($bibentries->entry('untf1')->get_field($bibentries->entry('untf1')->get_labelname_info)->get_id,$bibentries->entry('untf1')->get_field($bibentries->entry('untf1')->get_labelname_info)->nth_name(2)->get_id), '2', 'Uniquename with full and repeat - 1'); eq_or_diff($main->get_unsummary($bibentries->entry('untf2')->get_field($bibentries->entry('untf2')->get_labelname_info)->get_id,$bibentries->entry('untf2')->get_field($bibentries->entry('untf2')->get_labelname_info)->nth_name(2)->get_id), '2', 'Uniquename with full and repeat - 2'); eq_or_diff($main->get_unsummary($bibentries->entry('untf3')->get_field($bibentries->entry('untf3')->get_labelname_info)->get_id,$bibentries->entry('untf3')->get_field($bibentries->entry('untf3')->get_labelname_info)->nth_name(2)->get_id), '2', 'Uniquename with full and repeat - 3'); # Prefix/suffix eq_or_diff($main->get_unsummary($bibentries->entry('sp1')->get_field($bibentries->entry('sp1')->get_labelname_info)->get_id,$bibentries->entry('sp1')->get_field($bibentries->entry('sp1')->get_labelname_info)->nth_name(1)->get_id), '0', 'Prefix/Suffix - 1'); eq_or_diff($main->get_unsummary($bibentries->entry('sp2')->get_field($bibentries->entry('sp2')->get_labelname_info)->get_id,$bibentries->entry('sp2')->get_field($bibentries->entry('sp2')->get_labelname_info)->nth_name(1)->get_id), '0', 'Prefix/Suffix - 2'); eq_or_diff($main->get_unsummary($bibentries->entry('sp3')->get_field($bibentries->entry('sp3')->get_labelname_info)->get_id,$bibentries->entry('sp3')->get_field($bibentries->entry('sp3')->get_labelname_info)->nth_name(1)->get_id), '0', 'Prefix/Suffix - 3'); eq_or_diff($main->get_unsummary($bibentries->entry('sp4')->get_field($bibentries->entry('sp4')->get_labelname_info)->get_id,$bibentries->entry('sp4')->get_field($bibentries->entry('sp4')->get_labelname_info)->nth_name(1)->get_id), '0', 'Prefix/Suffix - 4'); eq_or_diff($main->get_unsummary($bibentries->entry('sp5')->get_field($bibentries->entry('sp5')->get_labelname_info)->get_id,$bibentries->entry('sp5')->get_field($bibentries->entry('sp5')->get_labelname_info)->nth_name(1)->get_id), '0', 'Prefix/Suffix - 5'); eq_or_diff($main->get_unsummary($bibentries->entry('sp6')->get_field($bibentries->entry('sp6')->get_labelname_info)->get_id,$bibentries->entry('sp6')->get_field($bibentries->entry('sp6')->get_labelname_info)->nth_name(1)->get_id), '2', 'Prefix/Suffix - 6'); eq_or_diff($main->get_unsummary($bibentries->entry('sp7')->get_field($bibentries->entry('sp7')->get_labelname_info)->get_id,$bibentries->entry('sp7')->get_field($bibentries->entry('sp7')->get_labelname_info)->nth_name(1)->get_id), '2', 'Prefix/Suffix - 7'); eq_or_diff($main->get_unsummary($bibentries->entry('sp8')->get_field($bibentries->entry('sp8')->get_labelname_info)->get_id,$bibentries->entry('sp8')->get_field($bibentries->entry('sp8')->get_labelname_info)->nth_name(1)->get_id), '0', 'Prefix/Suffix - 8'); eq_or_diff($main->get_unsummary($bibentries->entry('sp9')->get_field($bibentries->entry('sp9')->get_labelname_info)->get_id,$bibentries->entry('sp9')->get_field($bibentries->entry('sp9')->get_labelname_info)->nth_name(1)->get_id), '0', 'Prefix/Suffix - 9'); ############################################################################# $biber = Biber->new(noconf => 1); $biber->parse_ctrlfile('uniqueness1.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('maxcitenames', 1); Biber::Config->setblxoption('mincitenames', 1); Biber::Config->setblxoption('uniquename', 1); Biber::Config->setblxoption('uniquelist', 1); # Now generate the information $biber->prepare; $section = $biber->sections->get_section(0); $bibentries = $section->bibentries; $main = $biber->datalists->get_list('nty/global//global/global'); eq_or_diff($main->get_unsummary($bibentries->entry('unt1')->get_field($bibentries->entry('unt1')->get_labelname_info)->get_id,$bibentries->entry('unt1')->get_field($bibentries->entry('unt1')->get_labelname_info)->nth_name(2)->get_id), '1', 'Uniquename with inits and repeat - 1'); eq_or_diff($main->get_unsummary($bibentries->entry('unt2')->get_field($bibentries->entry('unt2')->get_labelname_info)->get_id,$bibentries->entry('unt2')->get_field($bibentries->entry('unt2')->get_labelname_info)->nth_name(2)->get_id), '1', 'Uniquename with inits and repeat - 2'); eq_or_diff($main->get_unsummary($bibentries->entry('unt3')->get_field($bibentries->entry('unt3')->get_labelname_info)->get_id,$bibentries->entry('unt3')->get_field($bibentries->entry('unt3')->get_labelname_info)->nth_name(2)->get_id), '1', 'Uniquename with inits and repeat - 3'); eq_or_diff($main->get_unsummary($bibentries->entry('unt4')->get_field($bibentries->entry('unt4')->get_labelname_info)->get_id,$bibentries->entry('unt4')->get_field($bibentries->entry('unt4')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename with inits and repeat - 4'); eq_or_diff($main->get_unsummary($bibentries->entry('unt5')->get_field($bibentries->entry('unt5')->get_labelname_info)->get_id,$bibentries->entry('unt5')->get_field($bibentries->entry('unt5')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename with inits and repeat - 5'); ############################################################################# $biber = Biber->new(noconf => 1); $biber->parse_ctrlfile('uniqueness2.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('maxcitenames', 5); Biber::Config->setblxoption('mincitenames', 1); Biber::Config->setblxoption('uniquename', 2); Biber::Config->setblxoption('uniquelist', 1); # Now generate the information $biber->prepare; $section = $biber->sections->get_section(0); $bibentries = $section->bibentries; $main = $biber->datalists->get_list('nty/global//global/global'); # Hashes the same as uniquelist expansion expands to the whole list eq_or_diff($main->get_entryfield('unall3', 'namehash'), 'f1c5973adbc2e674fa4d98164c9ba5d5', 'Namehash and fullhash - 5'); eq_or_diff($bibentries->entry('unall3')->get_field('fullhash'), 'f1c5973adbc2e674fa4d98164c9ba5d5', 'Namehash and fullhash - 6'); ok(is_undef($main->get_uniquelist($bibentries->entry('unall3')->get_field($bibentries->entry('unall3')->get_labelname_info)->get_id)), 'Uniquelist edgecase - 1'); eq_or_diff($main->get_uniquelist($bibentries->entry('unall4')->get_field($bibentries->entry('unall4')->get_labelname_info)->get_id), '6', 'Uniquelist edgecase - 2'); ############################################################################# $biber = Biber->new(noconf => 1); $biber->parse_ctrlfile('uniqueness1.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('maxcitenames', 2); Biber::Config->setblxoption('mincitenames', 1); Biber::Config->setblxoption('uniquename', 1); Biber::Config->setblxoption('uniquelist', 0); # Now generate the information $biber->prepare; $bibentries = $biber->sections->get_section('0')->bibentries; $main = $biber->datalists->get_list('nty/global//global/global'); eq_or_diff($main->get_unsummary($bibentries->entry('test2')->get_field($bibentries->entry('test2')->get_labelname_info)->get_id,$bibentries->entry('test2')->get_field($bibentries->entry('test2')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename 0 due to mincitenames truncation'); ############################################################################# $biber = Biber->new(noconf => 1); $biber->parse_ctrlfile('uniqueness2.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('uniquename', 1); Biber::Config->setblxoption('uniquelist', 1); Biber::Config->setblxoption('maxcitenames', 1); Biber::Config->setblxoption('mincitenames', 1); # Now generate the information $biber->prepare; $bibentries = $biber->sections->get_section('0')->bibentries; $main = $biber->datalists->get_list('nty/global//global/global'); eq_or_diff($main->get_unsummary($bibentries->entry('un8')->get_field($bibentries->entry('un8')->get_labelname_info)->get_id,$bibentries->entry('un8')->get_field($bibentries->entry('un8')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename - 1'); eq_or_diff($main->get_unsummary($bibentries->entry('un8')->get_field($bibentries->entry('un8')->get_labelname_info)->get_id,$bibentries->entry('un8')->get_field($bibentries->entry('un8')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename - 2'); eq_or_diff($main->get_unsummary($bibentries->entry('un8')->get_field($bibentries->entry('un8')->get_labelname_info)->get_id,$bibentries->entry('un8')->get_field($bibentries->entry('un8')->get_labelname_info)->nth_name(3)->get_id), '1', 'Uniquename - 3'); eq_or_diff($main->get_unsummary($bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->get_id,$bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename - 4'); eq_or_diff($main->get_unsummary($bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->get_id,$bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename - 5'); eq_or_diff($main->get_unsummary($bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->get_id,$bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->nth_name(3)->get_id), '1', 'Uniquename - 6'); eq_or_diff($main->get_unsummary($bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->get_id,$bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->nth_name(4)->get_id), '0', 'Uniquename - 7'); eq_or_diff($main->get_unsummary($bibentries->entry('un10')->get_field($bibentries->entry('un10')->get_labelname_info)->get_id,$bibentries->entry('un10')->get_field($bibentries->entry('un10')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename - 8'); eq_or_diff($main->get_uniquelist($bibentries->entry('un8')->get_field($bibentries->entry('un8')->get_labelname_info)->get_id), '3', 'Uniquelist - 1'); eq_or_diff($main->get_uniquelist($bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->get_id), '3', 'Uniquelist - 2'); ok(is_undef($main->get_uniquelist($bibentries->entry('un10')->get_field($bibentries->entry('un10')->get_labelname_info)->get_id)), 'Uniquelist - 3'); eq_or_diff($main->get_uniquelist($bibentries->entry('unapa1')->get_field($bibentries->entry('unapa1')->get_labelname_info)->get_id), '3', 'Uniquelist - 4'); eq_or_diff($main->get_uniquelist($bibentries->entry('unapa2')->get_field($bibentries->entry('unapa2')->get_labelname_info)->get_id), '3', 'Uniquelist - 5'); ok(is_undef($main->get_uniquelist($bibentries->entry('others1')->get_field($bibentries->entry('others1')->get_labelname_info)->get_id)), 'Uniquelist - 6'); # These next two should have uniquelist undef as they are identical author lists and so # can't be disambiguated (and shouldn't be). ok(is_undef($main->get_uniquelist($bibentries->entry('unall1')->get_field($bibentries->entry('unall1')->get_labelname_info)->get_id)), 'Uniquelist - 7'); ok(is_undef($main->get_uniquelist($bibentries->entry('unall2')->get_field($bibentries->entry('unall2')->get_labelname_info)->get_id)), 'Uniquelist - 8'); # These all should have uniquelist=5 as even though two are identical, they still both # need disambiguating from the other one which differs in fifth place eq_or_diff($main->get_uniquelist($bibentries->entry('unall5')->get_field($bibentries->entry('unall5')->get_labelname_info)->get_id), '5', 'Uniquelist - 9'); eq_or_diff($main->get_uniquelist($bibentries->entry('unall6')->get_field($bibentries->entry('unall6')->get_labelname_info)->get_id), '5', 'Uniquelist - 10'); eq_or_diff($main->get_uniquelist($bibentries->entry('unall7')->get_field($bibentries->entry('unall7')->get_labelname_info)->get_id), '5', 'Uniquelist - 11'); # unall8/unall9 are the same (ul=5) and unall10 is superset of them (ul=6) # unall9a is ul=undef due to per-entry settings (would otherwise be ul=5) eq_or_diff($main->get_uniquelist($bibentries->entry('unall8')->get_field($bibentries->entry('unall8')->get_labelname_info)->get_id), '5', 'Uniquelist - 12'); eq_or_diff($main->get_uniquelist($bibentries->entry('unall9')->get_field($bibentries->entry('unall9')->get_labelname_info)->get_id), '5', 'Uniquelist - 13'); ok(is_undef($main->get_uniquelist($bibentries->entry('unall9a')->get_field($bibentries->entry('unall9a')->get_labelname_info)->get_id)), 'Per-entry Uniquelist - 1'); eq_or_diff($main->get_uniquelist($bibentries->entry('unall10')->get_field($bibentries->entry('unall10')->get_labelname_info)->get_id), '6', 'Uniquelist - 14'); # These next two should have uniquelist 5/6 as they need disambiguating in place 5 eq_or_diff($main->get_uniquelist($bibentries->entry('unall3')->get_field($bibentries->entry('unall3')->get_labelname_info)->get_id), '5', 'Uniquelist - 15'); eq_or_diff($main->get_uniquelist($bibentries->entry('unall4')->get_field($bibentries->entry('unall4')->get_labelname_info)->get_id), '6', 'Uniquelist - 16'); # Testing "et al" counting as a uniquelist position # ul01 = 3 # ul02 = 3 (because it will be "XXX and YYY and ZZZ et al" which disambiguated the list from # "XXX and YYY and ZZZ" eq_or_diff($main->get_uniquelist($bibentries->entry('ul01')->get_field($bibentries->entry('ul01')->get_labelname_info)->get_id), '3', 'Uniquelist - 17'); eq_or_diff($main->get_uniquelist($bibentries->entry('ul02')->get_field($bibentries->entry('ul02')->get_labelname_info)->get_id), '3', 'Uniquelist - 18'); ############################################################################# $biber = Biber->new(noconf => 1); $biber->parse_ctrlfile('uniqueness1.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('maxcitenames', 1); Biber::Config->setblxoption('mincitenames', 1); Biber::Config->setblxoption('uniquename', 2); Biber::Config->setblxoption('uniquelist', 1); # Now generate the information $biber->prepare; $bibentries = $biber->sections->get_section('0')->bibentries; $main = $biber->datalists->get_list('nty/global//global/global'); eq_or_diff($main->get_uniquelist($bibentries->entry('test3')->get_field($bibentries->entry('test3')->get_labelname_info)->get_id), '2', 'Uniquelist - 19'); eq_or_diff($main->get_unsummary($bibentries->entry('test3')->get_field($bibentries->entry('test3')->get_labelname_info)->get_id,$bibentries->entry('test3')->get_field($bibentries->entry('test3')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename - 9'); eq_or_diff($main->get_unsummary($bibentries->entry('test3')->get_field($bibentries->entry('test3')->get_labelname_info)->get_id,$bibentries->entry('test3')->get_field($bibentries->entry('test3')->get_labelname_info)->nth_name(2)->get_id), '2', 'Uniquename - 10'); eq_or_diff($main->get_uniquelist($bibentries->entry('test4')->get_field($bibentries->entry('test4')->get_labelname_info)->get_id), '2', 'Uniquelist - 20'); eq_or_diff($main->get_unsummary($bibentries->entry('test4')->get_field($bibentries->entry('test4')->get_labelname_info)->get_id,$bibentries->entry('test4')->get_field($bibentries->entry('test4')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename - 11'); eq_or_diff($main->get_unsummary($bibentries->entry('test4')->get_field($bibentries->entry('test4')->get_labelname_info)->get_id,$bibentries->entry('test4')->get_field($bibentries->entry('test4')->get_labelname_info)->nth_name(2)->get_id), '2', 'Uniquename - 12'); eq_or_diff($main->get_uniquelist($bibentries->entry('test5')->get_field($bibentries->entry('test5')->get_labelname_info)->get_id), '2', 'Uniquelist - 21'); eq_or_diff($main->get_unsummary($bibentries->entry('test5')->get_field($bibentries->entry('test5')->get_labelname_info)->get_id,$bibentries->entry('test5')->get_field($bibentries->entry('test5')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename - 13'); eq_or_diff($main->get_unsummary($bibentries->entry('test5')->get_field($bibentries->entry('test5')->get_labelname_info)->get_id,$bibentries->entry('test5')->get_field($bibentries->entry('test5')->get_labelname_info)->nth_name(2)->get_id), '1', 'Uniquename - 14'); ############################################################################# $biber = Biber->new(noconf => 1); $biber->parse_ctrlfile('uniqueness4.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('maxcitenames', 3); Biber::Config->setblxoption('mincitenames', 3); Biber::Config->setblxoption('uniquename', 6); Biber::Config->setblxoption('uniquelist', 1); Biber::Config->setblxoption('singletitle', 0); Biber::Config->setblxoption('labeldatespec', [ {content => 'date', type => 'field'}, {content => 'year', type => 'field'} ]); # Now generate the information $biber->prepare; $section = $biber->sections->get_section(0); $bibentries = $section->bibentries; $main = $biber->datalists->get_list('nty/global//global/global'); eq_or_diff($main->get_unsummary($bibentries->entry('us1')->get_field($bibentries->entry('us1')->get_labelname_info)->get_id,$bibentries->entry('us1')->get_field($bibentries->entry('us1')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename sparse - 1'); eq_or_diff($main->get_unsummary($bibentries->entry('us1')->get_field($bibentries->entry('us1')->get_labelname_info)->get_id,$bibentries->entry('us1')->get_field($bibentries->entry('us1')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 2'); eq_or_diff($main->get_unsummary($bibentries->entry('us2')->get_field($bibentries->entry('us2')->get_labelname_info)->get_id,$bibentries->entry('us2')->get_field($bibentries->entry('us2')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename sparse - 3'); eq_or_diff($main->get_unsummary($bibentries->entry('us2')->get_field($bibentries->entry('us2')->get_labelname_info)->get_id,$bibentries->entry('us2')->get_field($bibentries->entry('us2')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 4'); eq_or_diff($main->get_unsummary($bibentries->entry('us3')->get_field($bibentries->entry('us3')->get_labelname_info)->get_id,$bibentries->entry('us3')->get_field($bibentries->entry('us3')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename sparse - 5'); eq_or_diff($main->get_unsummary($bibentries->entry('us3')->get_field($bibentries->entry('us3')->get_labelname_info)->get_id,$bibentries->entry('us3')->get_field($bibentries->entry('us3')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 6'); eq_or_diff($main->get_unsummary($bibentries->entry('us4')->get_field($bibentries->entry('us4')->get_labelname_info)->get_id,$bibentries->entry('us4')->get_field($bibentries->entry('us4')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename sparse - 7'); eq_or_diff($main->get_unsummary($bibentries->entry('us4')->get_field($bibentries->entry('us4')->get_labelname_info)->get_id,$bibentries->entry('us4')->get_field($bibentries->entry('us4')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 8'); eq_or_diff($main->get_unsummary($bibentries->entry('us5')->get_field($bibentries->entry('us5')->get_labelname_info)->get_id,$bibentries->entry('us5')->get_field($bibentries->entry('us5')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename sparse - 9'); eq_or_diff($main->get_unsummary($bibentries->entry('us6')->get_field($bibentries->entry('us6')->get_labelname_info)->get_id,$bibentries->entry('us6')->get_field($bibentries->entry('us6')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename sparse - 10'); eq_or_diff($main->get_unsummary($bibentries->entry('us6')->get_field($bibentries->entry('us6')->get_labelname_info)->get_id,$bibentries->entry('us6')->get_field($bibentries->entry('us6')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 11'); eq_or_diff($main->get_unsummary($bibentries->entry('us6')->get_field($bibentries->entry('us6')->get_labelname_info)->get_id,$bibentries->entry('us6')->get_field($bibentries->entry('us6')->get_labelname_info)->nth_name(3)->get_id), '0', 'Uniquename sparse - 12'); eq_or_diff($main->get_unsummary($bibentries->entry('us7')->get_field($bibentries->entry('us7')->get_labelname_info)->get_id,$bibentries->entry('us7')->get_field($bibentries->entry('us7')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename sparse - 13'); eq_or_diff($main->get_unsummary($bibentries->entry('us7')->get_field($bibentries->entry('us7')->get_labelname_info)->get_id,$bibentries->entry('us7')->get_field($bibentries->entry('us7')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 14'); eq_or_diff($main->get_unsummary($bibentries->entry('us8')->get_field($bibentries->entry('us8')->get_labelname_info)->get_id,$bibentries->entry('us8')->get_field($bibentries->entry('us8')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename sparse - 15'); eq_or_diff($main->get_unsummary($bibentries->entry('us8')->get_field($bibentries->entry('us8')->get_labelname_info)->get_id,$bibentries->entry('us8')->get_field($bibentries->entry('us8')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 16'); eq_or_diff($main->get_unsummary($bibentries->entry('us9')->get_field($bibentries->entry('us9')->get_labelname_info)->get_id,$bibentries->entry('us9')->get_field($bibentries->entry('us9')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename sparse - 17'); eq_or_diff($main->get_unsummary($bibentries->entry('us9')->get_field($bibentries->entry('us9')->get_labelname_info)->get_id,$bibentries->entry('us9')->get_field($bibentries->entry('us9')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 18'); eq_or_diff($main->get_unsummary($bibentries->entry('us10')->get_field($bibentries->entry('us10')->get_labelname_info)->get_id,$bibentries->entry('us10')->get_field($bibentries->entry('us10')->get_labelname_info)->nth_name(1)->get_id), '1', 'Uniquename sparse - 19'); eq_or_diff($main->get_unsummary($bibentries->entry('us10')->get_field($bibentries->entry('us10')->get_labelname_info)->get_id,$bibentries->entry('us10')->get_field($bibentries->entry('us10')->get_labelname_info)->nth_name(2)->get_id), '1', 'Uniquename sparse - 20'); eq_or_diff($main->get_unsummary($bibentries->entry('us11')->get_field($bibentries->entry('us11')->get_labelname_info)->get_id,$bibentries->entry('us11')->get_field($bibentries->entry('us11')->get_labelname_info)->nth_name(1)->get_id), '1', 'Uniquename sparse - 21'); eq_or_diff($main->get_unsummary($bibentries->entry('us11')->get_field($bibentries->entry('us11')->get_labelname_info)->get_id,$bibentries->entry('us11')->get_field($bibentries->entry('us11')->get_labelname_info)->nth_name(2)->get_id), '1', 'Uniquename sparse - 22'); eq_or_diff($main->get_unsummary($bibentries->entry('us12')->get_field($bibentries->entry('us12')->get_labelname_info)->get_id,$bibentries->entry('us12')->get_field($bibentries->entry('us12')->get_labelname_info)->nth_name(1)->get_id), '2', 'Uniquename sparse - 23'); eq_or_diff($main->get_unsummary($bibentries->entry('us12')->get_field($bibentries->entry('us12')->get_labelname_info)->get_id,$bibentries->entry('us12')->get_field($bibentries->entry('us12')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 24'); eq_or_diff($main->get_unsummary($bibentries->entry('us13')->get_field($bibentries->entry('us13')->get_labelname_info)->get_id,$bibentries->entry('us13')->get_field($bibentries->entry('us13')->get_labelname_info)->nth_name(1)->get_id), '2', 'Uniquename sparse - 25'); eq_or_diff($main->get_unsummary($bibentries->entry('us13')->get_field($bibentries->entry('us13')->get_labelname_info)->get_id,$bibentries->entry('us13')->get_field($bibentries->entry('us13')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 26'); # maxcitenames/mincitenames is 3 in but us14 is still "et al" so it's a "different list eq_or_diff($main->get_unsummary($bibentries->entry('us14')->get_field($bibentries->entry('us14')->get_labelname_info)->get_id,$bibentries->entry('us14')->get_field($bibentries->entry('us14')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename sparse - 27'); eq_or_diff($main->get_unsummary($bibentries->entry('us14')->get_field($bibentries->entry('us14')->get_labelname_info)->get_id,$bibentries->entry('us14')->get_field($bibentries->entry('us14')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 28'); eq_or_diff($main->get_unsummary($bibentries->entry('us14')->get_field($bibentries->entry('us14')->get_labelname_info)->get_id,$bibentries->entry('us14')->get_field($bibentries->entry('us14')->get_labelname_info)->nth_name(3)->get_id), '0', 'Uniquename sparse - 29'); eq_or_diff($main->get_unsummary($bibentries->entry('us15')->get_field($bibentries->entry('us15')->get_labelname_info)->get_id,$bibentries->entry('us15')->get_field($bibentries->entry('us15')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename sparse - 30'); eq_or_diff($main->get_unsummary($bibentries->entry('us15')->get_field($bibentries->entry('us15')->get_labelname_info)->get_id,$bibentries->entry('us15')->get_field($bibentries->entry('us15')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 31'); eq_or_diff($main->get_unsummary($bibentries->entry('us15')->get_field($bibentries->entry('us15')->get_labelname_info)->get_id,$bibentries->entry('us15')->get_field($bibentries->entry('us15')->get_labelname_info)->nth_name(3)->get_id), '0', 'Uniquename sparse - 32'); eq_or_diff($main->get_unsummary($bibentries->entry('us16')->get_field($bibentries->entry('us16')->get_labelname_info)->get_id,$bibentries->entry('us16')->get_field($bibentries->entry('us16')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename sparse - 33'); eq_or_diff($main->get_unsummary($bibentries->entry('us16')->get_field($bibentries->entry('us16')->get_labelname_info)->get_id,$bibentries->entry('us16')->get_field($bibentries->entry('us16')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 34'); eq_or_diff($main->get_unsummary($bibentries->entry('us16')->get_field($bibentries->entry('us16')->get_labelname_info)->get_id,$bibentries->entry('us16')->get_field($bibentries->entry('us16')->get_labelname_info)->nth_name(3)->get_id), '0', 'Uniquename sparse - 35'); ok(is_undef($main->get_uniquelist($bibentries->entry('us16')->get_field($bibentries->entry('us16')->get_labelname_info)->get_id)), 'Uniquename sparse - 36'); eq_or_diff($main->get_unsummary($bibentries->entry('us17')->get_field($bibentries->entry('us17')->get_labelname_info)->get_id,$bibentries->entry('us17')->get_field($bibentries->entry('us17')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename sparse - 37'); eq_or_diff($main->get_unsummary($bibentries->entry('us17')->get_field($bibentries->entry('us17')->get_labelname_info)->get_id,$bibentries->entry('us17')->get_field($bibentries->entry('us17')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 38'); eq_or_diff($main->get_unsummary($bibentries->entry('us17')->get_field($bibentries->entry('us17')->get_labelname_info)->get_id,$bibentries->entry('us17')->get_field($bibentries->entry('us17')->get_labelname_info)->nth_name(3)->get_id), '0', 'Uniquename sparse - 39'); eq_or_diff($main->get_unsummary($bibentries->entry('us17')->get_field($bibentries->entry('us17')->get_labelname_info)->get_id,$bibentries->entry('us17')->get_field($bibentries->entry('us17')->get_labelname_info)->nth_name(4)->get_id), '0', 'Uniquename sparse - 40'); eq_or_diff($main->get_uniquelist($bibentries->entry('us17')->get_field($bibentries->entry('us17')->get_labelname_info)->get_id), '4', 'Uniquename sparse - 41'); eq_or_diff($main->get_unsummary($bibentries->entry('us18')->get_field($bibentries->entry('us18')->get_labelname_info)->get_id,$bibentries->entry('us18')->get_field($bibentries->entry('us18')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename sparse - 42'); eq_or_diff($main->get_unsummary($bibentries->entry('us19')->get_field($bibentries->entry('us19')->get_labelname_info)->get_id,$bibentries->entry('us19')->get_field($bibentries->entry('us19')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename sparse - 43'); ok(is_undef($main->get_uniquelist($bibentries->entry('us18')->get_field($bibentries->entry('us18')->get_labelname_info)->get_id)), 'Uniquename sparse - 44'); eq_or_diff($main->get_uniquelist($bibentries->entry('us19')->get_field($bibentries->entry('us19')->get_labelname_info)->get_id), '4', 'Uniquename sparse - 45'); ############################################################################# $biber = Biber->new(noconf => 1); $biber->parse_ctrlfile('uniqueness4.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('maxcitenames', 3); Biber::Config->setblxoption('mincitenames', 1); Biber::Config->setblxoption('uniquename', 6); Biber::Config->setblxoption('uniquelist', 1); Biber::Config->setblxoption('singletitle', 0); Biber::Config->setblxoption('labeldatespec', [ {content => 'date', type => 'field'}, {content => 'year', type => 'field'} ]); # Now generate the information $biber->prepare; $section = $biber->sections->get_section(0); $bibentries = $section->bibentries; $main = $biber->datalists->get_list('nty/global//global/global'); # maxcitenames/mincitenames = 3/1 so these will not truncate to the same list (since # us15 would not be truncated at all) and they therefore would not need disambiguating with # uniquename = 5 or 6 eq_or_diff($main->get_unsummary($bibentries->entry('us14')->get_field($bibentries->entry('us14')->get_labelname_info)->get_id,$bibentries->entry('us14')->get_field($bibentries->entry('us14')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename sparse - 46'); eq_or_diff($main->get_unsummary($bibentries->entry('us14')->get_field($bibentries->entry('us14')->get_labelname_info)->get_id,$bibentries->entry('us14')->get_field($bibentries->entry('us14')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 47'); eq_or_diff($main->get_unsummary($bibentries->entry('us14')->get_field($bibentries->entry('us14')->get_labelname_info)->get_id,$bibentries->entry('us14')->get_field($bibentries->entry('us14')->get_labelname_info)->nth_name(3)->get_id), '0', 'Uniquename sparse - 48'); eq_or_diff($main->get_unsummary($bibentries->entry('us15')->get_field($bibentries->entry('us15')->get_labelname_info)->get_id,$bibentries->entry('us15')->get_field($bibentries->entry('us15')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename sparse - 49'); eq_or_diff($main->get_unsummary($bibentries->entry('us15')->get_field($bibentries->entry('us15')->get_labelname_info)->get_id,$bibentries->entry('us15')->get_field($bibentries->entry('us15')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 50'); eq_or_diff($main->get_unsummary($bibentries->entry('us15')->get_field($bibentries->entry('us15')->get_labelname_info)->get_id,$bibentries->entry('us15')->get_field($bibentries->entry('us15')->get_labelname_info)->nth_name(3)->get_id), '0', 'Uniquename sparse - 51'); # eq_or_diff($main->get_unsummary($bibentries->entry('us20')->get_field($bibentries->entry('us20')->get_labelname_info)->get_id,$bibentries->entry('us20')->get_field($bibentries->entry('us20')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename sparse - 52'); eq_or_diff($main->get_unsummary($bibentries->entry('us21')->get_field($bibentries->entry('us21')->get_labelname_info)->get_id,$bibentries->entry('us21')->get_field($bibentries->entry('us21')->get_labelname_info)->nth_name(1)->get_id), '0', 'Uniquename sparse - 53'); eq_or_diff($main->get_unsummary($bibentries->entry('us22')->get_field($bibentries->entry('us22')->get_labelname_info)->get_id,$bibentries->entry('us22')->get_field($bibentries->entry('us22')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 54'); eq_or_diff($main->get_unsummary($bibentries->entry('us23')->get_field($bibentries->entry('us23')->get_labelname_info)->get_id,$bibentries->entry('us23')->get_field($bibentries->entry('us23')->get_labelname_info)->nth_name(1)->get_id), '2', 'Uniquename sparse - 55'); eq_or_diff($main->get_unsummary($bibentries->entry('us24')->get_field($bibentries->entry('us24')->get_labelname_info)->get_id,$bibentries->entry('us24')->get_field($bibentries->entry('us24')->get_labelname_info)->nth_name(1)->get_id), '2', 'Uniquename sparse - 56'); eq_or_diff($main->get_unsummary($bibentries->entry('us25')->get_field($bibentries->entry('us25')->get_labelname_info)->get_id,$bibentries->entry('us25')->get_field($bibentries->entry('us25')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 57'); ############################################################################# $biber = Biber->new(noconf => 1); $biber->parse_ctrlfile('uniqueness4.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('maxcitenames', 2); Biber::Config->setblxoption('mincitenames', 1); Biber::Config->setblxoption('uniquename', 6); Biber::Config->setblxoption('uniquelist', 1); Biber::Config->setblxoption('singletitle', 0); Biber::Config->setblxoption('labeldatespec', [ {content => 'date', type => 'field'}, {content => 'year', type => 'field'} ]); # Now generate the information $biber->prepare; $section = $biber->sections->get_section(0); $bibentries = $section->bibentries; $main = $biber->datalists->get_list('nty/global//global/global'); # maxcitenames/mincitenames = 2/1 so list are the same and need disambiguating but only in the first # name as the others are not visible eq_or_diff($main->get_unsummary($bibentries->entry('us14')->get_field($bibentries->entry('us14')->get_labelname_info)->get_id,$bibentries->entry('us14')->get_field($bibentries->entry('us14')->get_labelname_info)->nth_name(1)->get_id), '1', 'Uniquename sparse - 58'); eq_or_diff($main->get_unsummary($bibentries->entry('us14')->get_field($bibentries->entry('us14')->get_labelname_info)->get_id,$bibentries->entry('us14')->get_field($bibentries->entry('us14')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 59'); eq_or_diff($main->get_unsummary($bibentries->entry('us14')->get_field($bibentries->entry('us14')->get_labelname_info)->get_id,$bibentries->entry('us14')->get_field($bibentries->entry('us14')->get_labelname_info)->nth_name(3)->get_id), '0', 'Uniquename sparse - 60'); eq_or_diff($main->get_unsummary($bibentries->entry('us15')->get_field($bibentries->entry('us15')->get_labelname_info)->get_id,$bibentries->entry('us15')->get_field($bibentries->entry('us15')->get_labelname_info)->nth_name(1)->get_id), '1', 'Uniquename sparse - 61'); eq_or_diff($main->get_unsummary($bibentries->entry('us15')->get_field($bibentries->entry('us15')->get_labelname_info)->get_id,$bibentries->entry('us15')->get_field($bibentries->entry('us15')->get_labelname_info)->nth_name(2)->get_id), '0', 'Uniquename sparse - 62'); eq_or_diff($main->get_unsummary($bibentries->entry('us15')->get_field($bibentries->entry('us15')->get_labelname_info)->get_id,$bibentries->entry('us15')->get_field($bibentries->entry('us15')->get_labelname_info)->nth_name(3)->get_id), '0', 'Uniquename sparse - 63'); eq_or_diff($main->get_unsummary($bibentries->entry('us26')->get_field($bibentries->entry('us26')->get_labelname_info)->get_id,$bibentries->entry('us26')->get_field($bibentries->entry('us26')->get_labelname_info)->nth_name(1)->get_id), '1', 'Uniquename sparse - 64'); eq_or_diff($main->get_unsummary($bibentries->entry('us27')->get_field($bibentries->entry('us27')->get_labelname_info)->get_id,$bibentries->entry('us27')->get_field($bibentries->entry('us27')->get_labelname_info)->nth_name(1)->get_id), '2', 'Uniquename sparse - 65'); eq_or_diff($main->get_unsummary($bibentries->entry('us28')->get_field($bibentries->entry('us28')->get_labelname_info)->get_id,$bibentries->entry('us28')->get_field($bibentries->entry('us28')->get_labelname_info)->nth_name(1)->get_id), '2', 'Uniquename sparse - 66'); eq_or_diff($main->get_unsummary($bibentries->entry('us29')->get_field($bibentries->entry('us29')->get_labelname_info)->get_id,$bibentries->entry('us29')->get_field($bibentries->entry('us29')->get_labelname_info)->nth_name(1)->get_id), '1', 'Uniquename sparse - 67'); eq_or_diff($main->get_unsummary($bibentries->entry('us30')->get_field($bibentries->entry('us30')->get_labelname_info)->get_id,$bibentries->entry('us30')->get_field($bibentries->entry('us30')->get_labelname_info)->nth_name(1)->get_id), '1', 'Uniquename sparse - 68'); ############################################################################# $biber = Biber->new(noconf => 1); $biber->parse_ctrlfile('uniqueness5.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('maxcitenames', 1); Biber::Config->setblxoption('mincitenames', 1); Biber::Config->setblxoption('uniquename', 2); Biber::Config->setblxoption('uniquelist', 2); Biber::Config->setblxoption('singletitle', 0); Biber::Config->setblxoption('labeldatespec', [ {content => 'date', type => 'field'}, {content => 'year', type => 'field'} ]); # Now generate the information $biber->prepare; $section = $biber->sections->get_section(0); $bibentries = $section->bibentries; $main = $biber->datalists->get_list('nty/global//global/global'); ok(is_undef($main->get_uniquelist($bibentries->entry('uls1')->get_field($bibentries->entry('uls1')->get_labelname_info)->get_id)), 'Uniquelist strict - 1'); ok(is_undef($main->get_uniquelist($bibentries->entry('uls2')->get_field($bibentries->entry('uls2')->get_labelname_info)->get_id)), 'Uniquelist strict - 2'); eq_or_diff($main->get_uniquelist($bibentries->entry('uls3')->get_field($bibentries->entry('uls3')->get_labelname_info)->get_id), '2', 'Uniquelist strict - 3'); eq_or_diff($main->get_uniquelist($bibentries->entry('uls4')->get_field($bibentries->entry('uls4')->get_labelname_info)->get_id), '2', 'Uniquelist strict - 4'); eq_or_diff($main->get_uniquelist($bibentries->entry('uls5')->get_field($bibentries->entry('uls5')->get_labelname_info)->get_id), '2', 'Uniquelist strict - 5'); eq_or_diff($main->get_uniquelist($bibentries->entry('uls6')->get_field($bibentries->entry('uls6')->get_labelname_info)->get_id), '2', 'Uniquelist strict - 6'); ok(is_undef($main->get_uniquelist($bibentries->entry('uls7')->get_field($bibentries->entry('uls7')->get_labelname_info)->get_id)), 'Uniquelist strict - 7'); ############################################################################# $biber = Biber->new(noconf => 1); $biber->parse_ctrlfile('uniqueness5.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('maxcitenames', 3); Biber::Config->setblxoption('mincitenames', 2); Biber::Config->setblxoption('uniquename', 2); Biber::Config->setblxoption('uniquelist', 2); Biber::Config->setblxoption('singletitle', 0); Biber::Config->setblxoption('labeldatespec', [ {content => 'date', type => 'field'}, {content => 'year', type => 'field'} ]); # Now generate the information $biber->prepare; $section = $biber->sections->get_section(0); $bibentries = $section->bibentries; $main = $biber->datalists->get_list('nty/global//global/global'); ok(is_undef($main->get_uniquelist($bibentries->entry('uls8')->get_field($bibentries->entry('uls8')->get_labelname_info)->get_id)), 'Uniquelist strict - 8'); ok(is_undef($main->get_uniquelist($bibentries->entry('uls9')->get_field($bibentries->entry('uls9')->get_labelname_info)->get_id)),'Uniquelist strict - 9'); ok(is_undef($main->get_uniquelist($bibentries->entry('uls1')->get_field($bibentries->entry('uls1')->get_labelname_info)->get_id)),'Uniquelist strict - 10'); eq_or_diff($main->get_uniquelist($bibentries->entry('uls10')->get_field($bibentries->entry('uls10')->get_labelname_info)->get_id), '3', 'Uniquelist strict - 11'); eq_or_diff($main->get_uniquelist($bibentries->entry('uls11')->get_field($bibentries->entry('uls11')->get_labelname_info)->get_id), '3', 'Uniquelist strict - 12'); ok(is_undef($main->get_uniquelist($bibentries->entry('uls12')->get_field($bibentries->entry('uls12')->get_labelname_info)->get_id)), 'Uniquelist strict - 13'); ############################################################################# $biber = Biber->new(noconf => 1); $biber->parse_ctrlfile('uniqueness3.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('uniquename', 1); Biber::Config->setblxoption('uniquelist', 0); Biber::Config->setblxoption('singletitle', 1); Biber::Config->setblxoption('labeldatespec', [ {content => 'date', type => 'field'}, {content => 'year', type => 'field'} ]); # Now generate the information $biber->prepare; $section = $biber->sections->get_section(0); $bibentries = $section->bibentries; $main = $biber->datalists->get_list('nty/global//global/global'); eq_or_diff($main->get_extradatedata_for_key('ey1'), '1', 'Extrayear - 1'); eq_or_diff($main->get_extradatedata_for_key('ey2'), '2', 'Extrayear - 2'); eq_or_diff($main->get_extradatedata_for_key('ey3'), '1', 'Extrayear - 3'); eq_or_diff($main->get_extradatedata_for_key('ey4'), '2', 'Extrayear - 4'); eq_or_diff($main->get_extradatedata_for_key('ey5'), '1', 'Extrayear - 5'); eq_or_diff($main->get_extradatedata_for_key('ey6'), '2', 'Extrayear - 6'); ############################################################################# $biber = Biber->new(noconf => 1); $biber->parse_ctrlfile('uniqueness3.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('uniquename', 2); Biber::Config->setblxoption('uniquelist', 1); Biber::Config->setblxoption('singletitle', 1); Biber::Config->setblxoption('uniquetitle', 1); Biber::Config->setblxoption('uniquebaretitle', 1); Biber::Config->setblxoption('uniquework', 1); Biber::Config->setblxoption('labeldatespec', [ {content => 'date', type => 'field'}, {content => 'year', type => 'field'} ]); # Now generate the information $biber->prepare; $section = $biber->sections->get_section(0); $bibentries = $section->bibentries; $main = $biber->datalists->get_list('nty/global//global/global'); ok(is_undef($main->get_extradatedata_for_key('ey1')), 'Extrayear - 7'); ok(is_undef($main->get_extradatedata_for_key('ey2')), 'Extrayear - 8'); eq_or_diff($main->get_extradatedata_for_key('ey3'), '1', 'Extrayear - 9'); eq_or_diff($main->get_extradatedata_for_key('ey4'), '2', 'Extrayear - 10'); ok(is_undef($main->get_extradatedata_for_key('ey5')), 'Extrayear - 11'); ok(is_undef($main->get_extradatedata_for_key('ey6')), 'Extrayear - 12'); ok(is_undef($main->get_entryfield('ey1', 'singletitle')), 'singletitle - 1'); eq_or_diff($main->get_entryfield('ey2', 'singletitle'), '1', 'singletitle - 2'); ok(is_undef($main->get_entryfield('ey3', 'singletitle')), 'singletitle - 3'); ok(is_undef($main->get_entryfield('ey4', 'singletitle')), 'singletitle - 4'); eq_or_diff($main->get_entryfield('ey5', 'singletitle'), '1', 'singletitle - 5'); eq_or_diff($main->get_entryfield('ey6', 'singletitle'), '1', 'singletitle - 6'); ok(is_undef($main->get_entryfield('ey1', 'uniquetitle')), 'uniquetitle - 1'); eq_or_diff($main->get_entryfield('ey2', 'uniquetitle'), '1', 'uniquetitle - 2'); ok(is_undef($main->get_entryfield('ey3', 'uniquetitle')), 'uniquetitle - 3'); eq_or_diff($main->get_entryfield('ey4', 'uniquetitle'), '1', 'uniquetitle - 4'); ok(is_undef($main->get_entryfield('ey5', 'uniquetitle')), 'uniquetitle - 5'); eq_or_diff($main->get_entryfield('ey6', 'uniquetitle'), '1', 'uniquetitle - 6'); ok(is_undef($main->get_entryfield('ey7', 'uniquebaretitle')), 'uniquebaretitle - 1'); ok(is_undef($main->get_entryfield('ey8', 'uniquebaretitle')), 'uniquebaretitle - 2'); eq_or_diff($main->get_entryfield('ey9', 'uniquebaretitle'), '1', 'uniquebaretitle - 3'); ok(is_undef($main->get_entryfield('ey1', 'uniquework')), 'uniquework - 1'); eq_or_diff($main->get_entryfield('ey2', 'uniquework'), '1', 'uniquework - 2'); eq_or_diff($main->get_entryfield('ey3', 'uniquework'), '1', 'uniquework - 3'); eq_or_diff($main->get_entryfield('ey4', 'uniquework'), '1', 'uniquework - 4'); eq_or_diff($main->get_entryfield('ey5', 'uniquework'), '1', 'uniquework - 5'); eq_or_diff($main->get_entryfield('ey6', 'uniquework'), '1', 'uniquework - 6'); ############################################################################# $biber = Biber->new(noconf => 1); $biber->parse_ctrlfile('uniqueness3.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('uniquename', 0); Biber::Config->setblxoption('uniquelist', 0); Biber::Config->setblxoption('singletitle', 1); Biber::Config->setblxoption('uniquetitle', 0); Biber::Config->setblxoption('uniquework', 0); Biber::Config->setblxoption('labeldatespec', [ {content => 'date', type => 'field'}, {content => 'year', type => 'field'} ]); # Now generate the information $biber->prepare; $section = $biber->sections->get_section(0); $bibentries = $section->bibentries; $main = $biber->datalists->get_list('nty/global//global/global'); eq_or_diff($main->get_extradatedata_for_key('ey1'), '1', 'Extrayear - 13'); eq_or_diff($main->get_extradatedata_for_key('ey2'), '2', 'Extrayear - 14'); eq_or_diff($main->get_extradatedata_for_key('ey3'), '1', 'Extrayear - 15'); eq_or_diff($main->get_extradatedata_for_key('ey4'), '2', 'Extrayear - 16'); eq_or_diff($main->get_extradatedata_for_key('ey5'), '1', 'Extrayear - 17'); eq_or_diff($main->get_extradatedata_for_key('ey6'), '2', 'Extrayear - 18'); ############################################################################# # Testing uniquename = 3 $biber = Biber->new(noconf => 1); $biber->parse_ctrlfile('uniqueness2.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('uniquename', 3); Biber::Config->setblxoption('uniquelist', 1); # Now generate the information $biber->prepare; $section = $biber->sections->get_section(0); $bibentries = $section->bibentries; $main = $biber->datalists->get_list('nty/global//global/global'); eq_or_diff($main->get_unsummary($bibentries->entry('un8')->get_field($bibentries->entry('un8')->get_labelname_info)->get_id,$bibentries->entry('un8')->get_field($bibentries->entry('un8')->get_labelname_info)->nth_name(1)->get_id), '0', 'Forced init expansion - 1'); eq_or_diff($main->get_unsummary($bibentries->entry('un8')->get_field($bibentries->entry('un8')->get_labelname_info)->get_id,$bibentries->entry('un8')->get_field($bibentries->entry('un8')->get_labelname_info)->nth_name(2)->get_id), '0', 'Forced init expansion - 2'); eq_or_diff($main->get_unsummary($bibentries->entry('un8')->get_field($bibentries->entry('un8')->get_labelname_info)->get_id,$bibentries->entry('un8')->get_field($bibentries->entry('un8')->get_labelname_info)->nth_name(3)->get_id), '1', 'Forced init expansion - 3'); eq_or_diff($main->get_unsummary($bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->get_id,$bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->nth_name(1)->get_id), '0', 'Forced init expansion - 4'); eq_or_diff($main->get_unsummary($bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->get_id,$bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->nth_name(2)->get_id), '0', 'Forced init expansion - 5'); eq_or_diff($main->get_unsummary($bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->get_id,$bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->nth_name(3)->get_id), '1', 'Forced init expansion - 6'); eq_or_diff($main->get_unsummary($bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->get_id,$bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->nth_name(4)->get_id), '1', 'Forced init expansion - 7'); eq_or_diff($main->get_unsummary($bibentries->entry('un10')->get_field($bibentries->entry('un10')->get_labelname_info)->get_id,$bibentries->entry('un10')->get_field($bibentries->entry('un10')->get_labelname_info)->nth_name(1)->get_id), '1', 'Forced init expansion - 8'); ############################################################################# # Testing uniquename = 4 $biber = Biber->new(noconf => 1); $biber->parse_ctrlfile('uniqueness2.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('uniquename', 4); Biber::Config->setblxoption('uniquelist', 1); # Now generate the information $biber->prepare; $section = $biber->sections->get_section(0); $bibentries = $section->bibentries; $main = $biber->datalists->get_list('nty/global//global/global'); eq_or_diff($main->get_unsummary($bibentries->entry('un8')->get_field($bibentries->entry('un8')->get_labelname_info)->get_id,$bibentries->entry('un8')->get_field($bibentries->entry('un8')->get_labelname_info)->nth_name(1)->get_id), '2', 'Forced name expansion - 1'); eq_or_diff($main->get_unsummary($bibentries->entry('un8')->get_field($bibentries->entry('un8')->get_labelname_info)->get_id,$bibentries->entry('un8')->get_field($bibentries->entry('un8')->get_labelname_info)->nth_name(2)->get_id), '0', 'Forced name expansion - 2'); eq_or_diff($main->get_unsummary($bibentries->entry('un8')->get_field($bibentries->entry('un8')->get_labelname_info)->get_id,$bibentries->entry('un8')->get_field($bibentries->entry('un8')->get_labelname_info)->nth_name(3)->get_id), '1', 'Forced name expansion - 3'); eq_or_diff($main->get_unsummary($bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->get_id,$bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->nth_name(1)->get_id), '2', 'Forced name expansion - 4'); eq_or_diff($main->get_unsummary($bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->get_id,$bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->nth_name(2)->get_id), '0', 'Forced name expansion - 5'); eq_or_diff($main->get_unsummary($bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->get_id,$bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->nth_name(3)->get_id), '1', 'Forced name expansion - 6'); eq_or_diff($main->get_unsummary($bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->get_id,$bibentries->entry('un9')->get_field($bibentries->entry('un9')->get_labelname_info)->nth_name(4)->get_id), '1', 'Forced name expansion - 7'); eq_or_diff($main->get_unsummary($bibentries->entry('un10')->get_field($bibentries->entry('un10')->get_labelname_info)->get_id,$bibentries->entry('un10')->get_field($bibentries->entry('un10')->get_labelname_info)->nth_name(1)->get_id), '1', 'Forced name expansion - 8'); ############################################################################# $biber = Biber->new(noconf => 1); $biber->parse_ctrlfile('uniqueness6.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('uniquelist', 1); # Now generate the information $biber->prepare; $section = $biber->sections->get_section(0); $bibentries = $section->bibentries; $main = $biber->datalists->get_list('nty/global//global/global'); eq_or_diff($main->get_uniquelist($bibentries->entry('entry1a')->get_field($bibentries->entry('entry1a')->get_labelname_info)->get_id), '2', 'Uniquelist duplicates - 1'); eq_or_diff($main->get_uniquelist($bibentries->entry('entry1b')->get_field($bibentries->entry('entry1b')->get_labelname_info)->get_id), '2', 'Uniquelist duplicates - 2'); eq_or_diff($main->get_uniquelist($bibentries->entry('entry2a')->get_field($bibentries->entry('entry2a')->get_labelname_info)->get_id), '2', 'Uniquelist duplicates - 3'); eq_or_diff($main->get_uniquelist($bibentries->entry('entry2b')->get_field($bibentries->entry('entry2b')->get_labelname_info)->get_id), '2', 'Uniquelist duplicates - 4'); eq_or_diff($main->get_uniquelist($bibentries->entry('A')->get_field($bibentries->entry('A')->get_labelname_info)->get_id), '2', 'Uniquelist duplicates - 5'); eq_or_diff($main->get_uniquelist($bibentries->entry('B')->get_field($bibentries->entry('B')->get_labelname_info)->get_id), '2', 'Uniquelist duplicates - 6'); eq_or_diff($main->get_uniquelist($bibentries->entry('C')->get_field($bibentries->entry('C')->get_labelname_info)->get_id), '2', 'Uniquelist duplicates - 7'); biblatex-biber-2.9/t/sorting.t000444000153000001 4755413205066062 16012 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 51; use Test::Differences; unified_diff; use Biber; use Biber::Output::bbl; use Log::Log4perl; use Unicode::Normalize; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile("general.bcf"); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); my $yearoff1 = 'mm,,Knuth!Donald E.,Computers & Typesetting,1984,'; my $yearoff2 = 'mm,,Knuth!Donald E.,Computers & Typesetting,198,'; my $yearoff3 = 'mm,,Knuth!Donald E.,Computers & Typesetting,1984,'; my $yearoff4 = 'mm,,Knuth!Donald E.,Computers & Typesetting,984,'; my $yearoff5 = 'mm,,Knuth!Donald E.,Computers & Typesetting,1984,'; my $yearoff6 = 'mm,,Knuth!Donald E.,Computers & Typesetting,1984,'; my $yearoff7 = 'mm,,Knuth!Donald E.,Computers & Typesetting,198,'; my $yearoff8 = 'mm,,Knuth!Donald E.,Computers & Typesetting,1984,'; my $yearoff9 = 'mm,,Knuth!Donald E.,Computers & Typesetting,984,'; my $vol1 = 'mm,,Glashow!Sheldon,Partial Symmetries of Weak Interactions,1961,2200'; my $vol2 = 'mm,,Glashow!Sheldon,Partial Symmetries of Weak Interactions,1961,2200000'; my $vol3 = 'mm,,Glashow!Sheldon,Partial Symmetries of Weak Interactions,1961,ĐĐĐ22'; my $nty = 'mm,,Glashow!Sheldon,Partial Symmetries of Weak Interactions,1961,22'; my $nyt = 'mm,,Glashow!Sheldon,1961,Partial Symmetries of Weak Interactions,22'; my $nyvt = 'mm,,Glashow!Sheldon,1961,22,Partial Symmetries of Weak Interactions'; my $anyt_la = 'mm,Gla61,,Glashow!Sheldon,1961,Partial Symmetries of Weak Interactions,'; my $anyt = 'mm,,,Glashow!Sheldon,1961,Partial Symmetries of Weak Interactions,'; my $anyvt_la = 'mm,Gla61,,Glashow!Sheldon,1961,0022,Partial Symmetries of Weak Interactions'; my $anyvt_la2 = "mm,Hos+98,,Hostetler!Michael J.\x{10FFFD},1998,0014,Alkanethiolate gold cluster molecules with core diameters from 1.5 to 5.2 nm"; my $anyvt_la3 = "mm,HW98,,Hostetler!Michael J.#Wingate!Julia E.\x{10FFFD},1998,0014,Alkanethiolate gold cluster molecules with core diameters from 1.5 to 5.2 nm"; my $anyvt_la4 = "mm,HW+98,,Hostetler!Michael J.#Wingate!Julia E.\x{10FFFD},1998,0014,Alkanethiolate gold cluster molecules with core diameters from 1.5 to 5.2 nm"; my $anyvt = 'mm,,,Glashow!Sheldon,1961,0022,Partial Symmetries of Weak Interactions'; my $ynt = 'mm,,1961,Glashow!Sheldon,Partial Symmetries of Weak Interactions'; my $ydnt = 'mm,,1961,Glashow!Sheldon,Partial Symmetries of Weak Interactions'; my $sortinits = 'mm,,1961,Glashow!S,Partial Symmetries of Weak Interactions'; my $debug = 'stdmodel'; my $sk1 = 'mm,,AATESTKEY,AATESTKEY,AATESTKEY,AATESTKEY'; my $ps_sc = 'zs,,Partial Symmetries of Weak Interactions,,Partial Symmetries of Weak Interactions,Partial Symmetries of Weak Interactions'; my $noname = 'mm,,Partial Symmetries of Weak Interactions,Partial Symmetries of Weak Interactions,1961,22'; my $citeorder = '1'; my $lists1 = 'Marcel Dekker'; my $lists2 = 'Chichester'; my $lists3 = "IBM\x{10FFFD}"; my $lists4 = "IBM!HP\x{10FFFD}"; my $lists5 = 'IBM!HP!Sun!Sony'; my $dates1 = '1979,1,2000000,1980,4,8,1924,6,7,1924,7,9,1924,0002,5,192,2,3,1979,3,4,79,3,3'; my $edtypeclass1 = 'redactor,Jaffé!Philipp,Loewenfeld!Samuel#Kaltenbrunner!Ferdinand#Ewald!Paul'; my $prefix1 = 'mm,,Luzzatto!Moshe Ḥayyim,,,Lashon la-Ramḥal: u-vo sheloshah ḥiburim,2000,'; my $diacritic1 = 'mm,,Hasan!Alī,al-Hasan!ʿAlī,Hasan!Alī,Some title,2000,'; my $labels = '2005,3,2'; my $sn1 = ''; my $snk1 = 'mm,,John John!von!Doe!Jr,,,0'; my $ent1 = 'mm,,Smith#Brian,,,0'; my $others1 = 'mm,,Gauck!Joachim,,Title A,0'; my $others2 = 'mm,,Gauck!Joachim#+,,Title B,0'; # These have custom presort and also an exclusion on year and title set my $useprefix1 = 'ww,,von!Bobble!Terrence,,,0'; my $useprefix4 = 'ww,,Bobble!Terrence!von,,,0'; # These have namelist and name scope useprefix respectively my $useprefix2 = 'mm,,Animal!Alan!von,1998,Things,0'; my $useprefix3 = 'mm,,von!Rabble!Richard,1998,Things,0'; # Sorting data schemata my $ssd1 = [ { spec => "str", str => 1 }, { spec => "str", str => 1 }, { spec => "str", str => 1 }, { spec => "str", str => 1 }, { spec => "str", str => 1 }, { spec => "int", int => 1 }, ]; my $ssd2 = [ { int => 1, spec => "int" }, { int => 1, spec => "int" }, { int => 1, spec => "int" }, { int => 1, spec => "int" }, { int => 1, spec => "int" }, { int => 1, spec => "int" }, { int => 1, spec => "-int" }, { int => 1, spec => "int" }, { int => 1, spec => "int" }, { int => 1, spec => "int" }, { int => 1, spec => "int" }, { int => 1, spec => "int" }, { int => 1, spec => "int" }, { int => 1, spec => "int" }, { int => 1, spec => "int" }, { int => 1, spec => "int" }, { int => 1, spec => "int" }, { int => 1, spec => "int" }, { int => 1, spec => "-int" }, { int => 1, spec => "int" }, { int => 1, spec => "int" }, { int => 1, spec => "int" }, { int => 1, spec => "int" }, { int => 1, spec => "int" }, ]; Biber::Config->setblxoption('useprefix', 1); # regenerate information $biber->prepare; my $section = $biber->sections->get_section(0); my $bibentries = $section->bibentries; my $main = $biber->datalists->get_list('nyt/global//global/global'); eq_or_diff($main->get_sortdata_for_key('tvonb')->[0], $useprefix1, 'von with type-specific presort, exclusions and useprefix=true' ); eq_or_diff($main->get_sortdata_for_key('avona')->[0], $useprefix2, 'von with name list scope useprefix' ); eq_or_diff($main->get_sortdata_for_key('rvonr')->[0], $useprefix3, 'von with name scope useprefix' ); # Testing sorting data schema generation is_deeply($main->get_sortdataschema, $ssd1, 'Sorting data schemata - 1' ); # Explicit "and others" eq_or_diff($main->get_sortdata_for_key('others1')->[0], $others1, 'Explicit "and others" - 1' ); eq_or_diff($main->get_sortdata_for_key('others2')->[0], $others2, 'Explicit "and others" - 2' ); # Testing custom name sorting key my $SNK = Biber::Config->getblxoption('sortingnamekeytemplate'); $SNK->{global} = [ [{ type => 'namepart', value => 'given' }, { type => 'literal', value => ' ' }, { type => 'namepart', value => 'given' }], [{ type => 'namepart', value => 'prefix', use => 1}], [{ type => 'namepart', value => 'family'}], [{ type => 'namepart', value => 'suffix'}], [{ type => 'namepart', value => 'prefix', use => 0}] ]; Biber::Config->setblxoption('sortingnamekeytemplate', $SNK); $biber->prepare; eq_or_diff($main->get_sortdata_for_key('snk1')->[0], $snk1, 'Sorting name key - 1' ); eq_or_diff($main->get_sortdata_for_key('ent1')->[0], $ent1, 'Sorting name key - 2' ); # regenerate information Biber::Config->setblxoption('useprefix', 0); # Default name sorting key back again $SNK->{global} = [ [{ type => 'namepart', value => 'prefix', use => 1}], [{ type => 'namepart', value => 'family'}], [{ type => 'namepart', value => 'given' }], [{ type => 'namepart', value => 'suffix'}], [{ type => 'namepart', value => 'prefix', use => 0}] ]; Biber::Config->setblxoption('sortingnamekeytemplate', $SNK); $biber->prepare; eq_or_diff($main->get_sortdata_for_key('tvonb')->[0], $useprefix4, 'von with type-specific presort, exclusions and useprefix=false' ); # Testing nosort $main->set_sortingtemplatename('custom1'); Biber::Config->setoption('nosort', [ { name => 'author', value => q/\A\p{L}{2}\p{Pd}/ }, { name => 'author', value => q/[\x{2bf}\x{2018}]/ }, { name => 'translator', value => q/\A\p{L}{2}\p{Pd}/ }, { name => 'translator', value => q/[\x{2bf}\x{2018}]/ }, # type_title should be not used as there is an # explicit title nosort { name => 'type_title', value => q/\A.*/ }, { name => 'title', value => q/\A\p{L}{2}\p{Pd}/ } ]); Biber::Config->setoption('sortcase', '1'); # regenerate information $biber->prepare; eq_or_diff(NFC($main->get_sortdata_for_key('luzzatto')->[0]), $prefix1, 'Title with nosort' ); eq_or_diff(NFC($main->get_sortdata_for_key('hasan')->[0]), $diacritic1, 'Name with nosort' ); # Testing editor roles $main->set_sortingtemplatename('er'); Biber::Config->setoption('sortcase', 0); # regenerate information $biber->prepare; eq_or_diff(NFC($main->get_sortdata_for_key('jaffe')->[0]), $edtypeclass1, 'Editor type/class' ); # Testing sorting using various date fields $main->set_sortingtemplatename('dates1'); # regenerate information $biber->prepare; # Testing sorting data schema generation is_deeply($main->get_sortdataschema, $ssd2, 'Sorting data schemata - 2' ); eq_or_diff($main->get_sortdata_for_key('moraux')->[0], $dates1, 'Very contrived but thorough test of date sorting' ); # Testing max/minITEMS with sorting using list fields # publisher $main->set_sortingtemplatename('publisher'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('augustine')->[0], $lists1, 'max/minitems test 1 (publisher)' ); # location $main->set_sortingtemplatename('location'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('cotton')->[0], $lists2, 'max/minitems test 2 (location)' ); # institution $main->set_sortingtemplatename('institution'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('chiu')->[0], $lists3, 'max/minitems test 3 (institution)' ); # institution with minitems=2 Biber::Config->setblxoption('minitems', 2); $main->set_sortingtemplatename('institution'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('chiu')->[0], $lists4, 'max/minitems test 4 (institution - minitems=2)' ); # institution with maxitems=4, minitems=3 Biber::Config->setblxoption('maxitems', 4); Biber::Config->setblxoption('minitems', 3); $main->set_sortingtemplatename('institution'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('chiu')->[0], $lists5, 'max/minitems test 5 (institution - maxitems=4/minitems=3)' ); # nty with implicit default left, 4-digit year sort $main->set_sortingtemplatename('nty9'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('knuth:ct')->[0], $yearoff1, 'nty with default left offset, 4 digit year' ); # nty with left, 3-digit year sort, case sensitive $main->set_sortingtemplatename('nty1'); Biber::Config->setoption('sortcase', 1); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('knuth:ct')->[0], $yearoff2, 'nty with left offset, 3 digit year, case sensitive' ); # nty with left, 4-digit year sort, case sensitive $main->set_sortingtemplatename('nty2'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('knuth:ct')->[0], $yearoff3, 'nty with left offset, 4 digit year, case sensitive' ); # nty with right, 3-digit year sort $main->set_sortingtemplatename('nty3'); Biber::Config->setoption('sortcase', 0); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('knuth:ct')->[0], $yearoff4, 'nty with right offset, 3 digit year' ); # nty with right, 4-digit year sort $main->set_sortingtemplatename('nty4'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('knuth:ct')->[0], $yearoff5, 'nty with right offset, 4 digit year' ); # ntyd with left, 4-digit year sort $main->set_sortingtemplatename('ntyd1'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('knuth:ct')->[0], $yearoff6, 'ntyd with left offset, 4 digit year' ); # ntyd with left, 3-digit year sort $main->set_sortingtemplatename('ntyd2'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('knuth:ct')->[0], $yearoff7, 'ntyd with left offset, 3 digit year' ); # ntyd with right, 4-digit year sort $main->set_sortingtemplatename('ntyd3'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('knuth:ct')->[0], $yearoff8, 'ntyd with right offset, 4 digit year' ); # ntyd with right, 3-digit year sort $main->set_sortingtemplatename('ntyd4'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('knuth:ct')->[0], $yearoff9, 'ntyd with right offset, 3 digit year' ); # nty with right-padded vol $main->set_sortingtemplatename('nty5'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('stdmodel')->[0], $vol1, 'nty with right-padded vol' ); # nty with right-padded 7-char vol $main->set_sortingtemplatename('nty6'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('stdmodel')->[0], $vol2, 'nty with right-padded 7-char vol' ); # nty with left-padded 5-char using Unicode "Đ" as pad_char vol # Unicode char will be lowercase "đ" in sortstring $main->set_sortingtemplatename('nty7'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('stdmodel')->[0], $vol3, 'nty with left-padded 5-char "a" pad char vol' ); # nty $main->set_sortingtemplatename('nty'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('stdmodel')->[0], $nty, 'basic nty sort' ); eq_or_diff($main->get_sortdata_for_key('angenendtsk')->[0], $sk1, 'basic sortkey sort' ); # nyt $main->set_sortingtemplatename('nyt'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('stdmodel')->[0], $nyt, 'basic nyt sort' ); # nyvt $main->set_sortingtemplatename('nyvt'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('stdmodel')->[0], $nyvt, 'basic nyvt sort' ); # anyt with labelalpha Biber::Config->setblxoption('labelalpha', 1); $main->set_sortingtemplatename('anyt'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('stdmodel')->[0], $anyt_la, 'anyt sort (with labelalpha)' ); Biber::Config->setblxoption('labelalpha', 0); $bibentries->entry('stdmodel')->del_field('labelalpha'); $bibentries->entry('stdmodel')->del_field('sortlabelalpha'); $bibentries->entry('stdmodel:glashow')->del_field('labelalpha'); # it's a crossref so have to clear it here too $bibentries->entry('stdmodel:glashow')->del_field('sortlabelalpha'); # anyt without labelalpha # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('stdmodel')->[0], $anyt, 'anyt sort (without labelalpha)' ); # anyvt with labelalpha Biber::Config->setblxoption('labelalpha',1); $main->set_sortingtemplatename('anyvt'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('stdmodel')->[0], $anyvt_la, 'anyvt sort (with labelalpha)' ); eq_or_diff($main->get_sortdata_for_key('murray')->[0], $anyvt_la2, 'anyvt sort (> maxbibnames=3 minbibnames=1, with labelalpha and alphaothers)' ); Biber::Config->setblxoption('maxalphanames', 2); Biber::Config->setblxoption('minalphanames', 2); Biber::Config->setblxoption('maxbibnames', 2); Biber::Config->setblxoption('minbibnames', 2); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('murray')->[0], $anyvt_la4, 'anyvt sort (> maxbibnames=2 minbibnames=2, with labelalpha and alphaothers)' ); Biber::Config->setblxoption('alphaothers', ''); Biber::Config->setblxoption('sortalphaothers', ''); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('murray')->[0], $anyvt_la3, 'anyvt sort (> maxbibnames=2 minbibnames=2,with labelalpha and without alphaothers)' ); Biber::Config->setblxoption('labelalpha', 0); $bibentries->entry('stdmodel')->del_field('labelalpha'); $bibentries->entry('stdmodel')->del_field('sortlabelalpha'); $bibentries->entry('stdmodel:glashow')->del_field('labelalpha'); # it's a crossref so have to clear it here too $bibentries->entry('stdmodel:glashow')->del_field('sortlabelalpha'); $bibentries->entry('murray')->del_field('labelalpha'); $bibentries->entry('murray')->del_field('sortlabelalpha'); # anyvt without labelalpha # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('stdmodel')->[0], $anyvt, 'anyvt sort (without labelalpha)' ); # ynt $main->set_sortingtemplatename('ynt'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('stdmodel')->[0], $ynt, 'basic ynt sort' ); # ydnt $main->set_sortingtemplatename('ydnt'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('stdmodel')->[0], $ydnt, 'basic ydnt sort' ); $SNK = Biber::Config->getblxoption('sortingnamekey'); $SNK->{global} = [ [{ type => 'namepart', value => 'prefix', use => 1}], [{ type => 'namepart', value => 'family'}], [{ type => 'namepart', value => 'given', inits => 1}], [{ type => 'namepart', value => 'suffix'}], [{ type => 'namepart', value => 'prefix', use => 0}] ]; Biber::Config->setblxoption('sortingnamekeytemplate', $SNK); $biber->prepare; eq_or_diff($main->get_sortdata_for_key('stdmodel')->[0], $sortinits, 'sort first name inits only' ); $SNK = Biber::Config->getblxoption('sortingnamekey'); # Default back again $SNK->{global} = [ [{ type => 'namepart', value => 'prefix', use => 1}], [{ type => 'namepart', value => 'family'}], [{ type => 'namepart', value => 'given'}], [{ type => 'namepart', value => 'suffix'}], [{ type => 'namepart', value => 'prefix', use => 0}] ]; Biber::Config->setblxoption('sortingnamekeytemplate', $SNK); Biber::Config->setblxoption('labelalpha', 0); # debug $main->set_sortingtemplatename('ek'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('stdmodel')->[0], $debug, 'basic debug sort' ); # nty with use* all off Biber::Config->setblxoption('useauthor', 0); Biber::Config->setblxoption('useeditor', 0); Biber::Config->setblxoption('usetranslator', 0); $main->set_sortingtemplatename('nty'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('stdmodel')->[0], $noname, 'nty with use* all off' ); # nty with modified presort and short_circuit at title $main->set_sortingtemplatename('nty8'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('stdmodel:ps_sc')->[0], $ps_sc, 'nty with modified presort and short-circuit title' ); # citeorder sort $main->set_sortingtemplatename('none'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('stdmodel')->[0], $citeorder, 'citeorder' ); # labels sort $main->set_sortingtemplatename('label1'); # regenerate information $biber->prepare; eq_or_diff($main->get_sortdata_for_key('labelstest')->[0], $labels, 'date labels' ); # sortname sort $main->set_sortingtemplatename('name1'); Biber::Config->setblxoption('useauthor', 0); Biber::Config->setblxoption('useeditor', 0); Biber::Config->setblxoption('usetranslator', 0); Biber::Config->setblxoption('usenamea', 0); Biber::Config->setblxoption('useeditora', 0); $biber->prepare; # Testing that when no use settings are true, sortname is ignored eq_or_diff($main->get_sortdata_for_key('sn1')->[0], $sn1, 'Sortname - 1' ); biblatex-biber-2.9/t/labelalphaname.t000444000153000001 343213205066062 17216 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 5; use Test::Differences; unified_diff; use Biber; use Biber::Utils; use Biber::Output::bbl; use Log::Log4perl; use Unicode::Normalize; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('labelalphaname.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options # Now generate the information, saving per-entry options or they are deleted $biber->prepare; my $main = $biber->datalists->get_list('custom/global//global/global'); my $main1 = $biber->datalists->get_list('custom/global//global/test1'); eq_or_diff($main->get_labelalphadata_for_key('lant1'), 'Smi', 'labelalphaname global template'); eq_or_diff($main1->get_labelalphadata_for_key('lant1'), 'AS', 'labelalphaname dlist template'); eq_or_diff($main->get_labelalphadata_for_key('lant2'), 'ArSm', 'labelalphaname entry template'); eq_or_diff($main->get_labelalphadata_for_key('lant3'), 'ArtSmi', 'labelalphaname namelist template'); eq_or_diff($main->get_labelalphadata_for_key('lant4'), 'ArthSmit', 'labelalphaname name template'); biblatex-biber-2.9/t/full-bibtex.t000444000153000001 153113205066062 16503 0ustar00vboxother000000000000# -*- cperl -*- use v5.24; use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More; if ($ENV{BIBER_DEV_TESTS}) { plan tests => 2; } else { plan skip_all => 'BIBER_DEV_TESTS not set'; } use IPC::Run3; use File::Temp; use File::Compare; use File::Which; my $perl = which('perl'); my $tmpfile = File::Temp->new(); #my $tmpfile = File::Temp->new(UNLINK => 0); my $bib = $tmpfile->filename; my $stdout; my $stderr; run3 [ $perl, 'bin/biber', '--noconf', '--nolog', '--output-format=bibtex', "--output-file=$bib", '--output-align', 't/tdata/full-bibtex.bcf' ], \undef, \$stdout, \$stderr; say $stdout; # say $stderr; # is($? >> 8, 0, 'Full test has zero exit status'); # Now replace the model ref for comparison with the static test file ok(compare($bib, 't/tdata/full-bibtex_biber.bib') == 0, 'Testing non-toolmode bibtex output'); biblatex-biber-2.9/t/extratitleyear.t000444000153000001 417713205066061 17344 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 8; use Test::Differences; unified_diff; use Biber; use Biber::Utils; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('extratitleyear.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Now generate the information $biber->prepare; my $section = $biber->sections->get_section(0); my $main = $biber->datalists->get_list('custom/global//global/global'); my $bibentries = $section->bibentries; # Don't forget that the extratitleyear data is inserted after sorting eq_or_diff($main->get_extratitleyeardata_for_key('L1'), '1', 'Same title, same year'); eq_or_diff($main->get_extratitleyeardata_for_key('L2'), '2', 'Same title, same year'); ok(is_undef($main->get_extratitledata_for_key('L3')), 'No title, same year'); ok(is_undef($main->get_extratitleyeardata_for_key('L4')), 'Same title, different year'); ok(is_undef($main->get_extratitleyeardata_for_key('L5')), 'Different labeltitle, same year'); ok(is_undef($main->get_extratitleyeardata_for_key('LY1')), 'Different years due to range ends - 1'); ok(is_undef($main->get_extratitleyeardata_for_key('LY2')), 'Different years due to range ends - 1'); ok(is_undef($main->get_extratitleyeardata_for_key('LY3')), 'Different years due to range ends - 1'); biblatex-biber-2.9/t/full-dot.t000444000153000001 143213205066062 16014 0ustar00vboxother000000000000# -*- cperl -*- use v5.24; use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More; if ($ENV{BIBER_DEV_TESTS}) { plan tests => 2; } else { plan skip_all => 'BIBER_DEV_TESTS not set'; } use IPC::Run3; use File::Temp; use File::Compare; use File::Which; my $perl = which('perl'); my $tmpfile = File::Temp->new(); #my $tmpfile = File::Temp->new(UNLINK => 0); my $dot = $tmpfile->filename; my $stdout; my $stderr; run3 [ $perl, 'bin/biber', '--noconf', '--nolog', '-dot-include=section,field,xdata,crossref,xref,related', '--output-format=dot', "--output-file=$dot", 't/tdata/full-dot.bcf' ], \undef, \$stdout, \$stderr; #say $stdout; #say $stderr; is($? >> 8, 0, 'Full test has zero exit status'); ok(compare($dot, 't/tdata/full-dot.dot') == 0, 'Testing dot output'); biblatex-biber-2.9/t/full-bblxml.t000444000153000001 171713205066062 16514 0ustar00vboxother000000000000# -*- cperl -*- use v5.24; use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More; if ($ENV{BIBER_DEV_TESTS}) { plan tests => 2; } else { plan skip_all => 'BIBER_DEV_TESTS not set'; } use IPC::Run3; use File::Temp; use File::Compare; use File::Which; my $perl = which('perl'); my $tmpfile = File::Temp->new(); #my $tmpfile = File::Temp->new(UNLINK => 0); my $bblxml = $tmpfile->filename; my $stdout; my $stderr; run3 [ $perl, 'bin/biber', '--noconf', '--nolog', '--output-format=bblxml', "--output-file=$bblxml", '--validate-bblxml', 't/tdata/full-bblxml.bcf' ], \undef, \$stdout, \$stderr; # say $stdout; # say $stderr; is($? >> 8, 0, 'Full test has zero exit status'); # Now replace the model ref for comparison with the static test file run3 [ $perl, '-pi.bak', '-e', 's/(<\?xml-model href=")([^"]+)/$1full-bblxml.rng/', $bblxml ], \undef, \$stdout, \undef; ok(compare($bblxml, 't/tdata/full-bblxml.bblxml') == 0, 'Testing bblxml output'); biblatex-biber-2.9/t/sections-complex.t000444000153000001 3037213205066062 17607 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 68; use Test::Differences; unified_diff; use Biber; use Biber::Utils; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('sections-complex.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Biblatex options Biber::Config->setblxoption('maxcitenames', 1); Biber::Config->setblxoption('maxalphanames', 1); Biber::Config->setblxoption('labeldateparts', undef); # Now generate the information $biber->prepare; my $section0 = $biber->sections->get_section(0); my $bibentries0 = $section0->bibentries; my $main0 = $biber->datalists->get_list('custom/global//global/global'); my $section1 = $biber->sections->get_section(1); my $main1 = $biber->datalists->get_list('custom/global//global/global', 1); my $bibentries1 = $section1->bibentries; eq_or_diff($main0->get_entryfield('L1', 'sortlabelalpha'), 'Doe95', 'maxalphanames=1 minalphanames=1 entry L1 labelalpha'); ok(is_undef($main0->get_extraalphadata_for_key('L1')), 'maxalphanames=1 minalphanames=1 entry L1 extraalpha'); eq_or_diff($main0->get_entryfield('L2', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=1 minalphanames=1 entry L2 labelalpha'); eq_or_diff($main0->get_extraalphadata_for_key('L2'), '1', 'maxalphanames=1 minalphanames=1 entry L2 extraalpha'); eq_or_diff($main0->get_entryfield('L3', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=1 minalphanames=1 entry L3 labelalpha'); eq_or_diff($main0->get_extraalphadata_for_key('L3'), '2', 'maxalphanames=1 minalphanames=1 entry L3 extraalpha'); eq_or_diff($main0->get_entryfield('L4', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=1 minalphanames=1 entry L4 labelalpha'); eq_or_diff($main0->get_extraalphadata_for_key('L4'), '3', 'maxalphanames=1 minalphanames=1 entry L4 extraalpha'); eq_or_diff($main1->get_entryfield('L5', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=1 minalphanames=1 entry L5 labelalpha'); eq_or_diff($main1->get_extraalphadata_for_key('L5'), '1', 'maxalphanames=1 minalphanames=1 entry L5 extraalpha'); eq_or_diff($main1->get_entryfield('L6', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=1 minalphanames=1 entry L6 labelalpha'); eq_or_diff($main1->get_extraalphadata_for_key('L6'), '2', 'maxalphanames=1 minalphanames=1 entry L6 extraalpha'); eq_or_diff($main1->get_entryfield('L7', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=1 minalphanames=1 entry L7 labelalpha'); eq_or_diff($main1->get_extraalphadata_for_key('L7'), '3', 'maxalphanames=1 minalphanames=1 entry L7 extraalpha'); eq_or_diff($main1->get_entryfield('L8', 'sortlabelalpha'), 'Sha85', 'maxalphanames=1 minalphanames=1 entry L8 labelalpha'); ok(is_undef($main1->get_extraalphadata_for_key('L8')), 'maxalphanames=1 minalphanames=1 entry L8 extraalpha'); # reset options and regenerate information Biber::Config->setblxoption('maxcitenames', 2); Biber::Config->setblxoption('mincitenames', 1); Biber::Config->setblxoption('maxalphanames', 2); Biber::Config->setblxoption('minalphanames', 1); for (my $i=1; $i<5; $i++) { $bibentries0->entry("L$i")->del_field('sortlabelalpha'); $bibentries0->entry("L$i")->del_field('labelalpha'); $main0->set_extraalphadata_for_key("L$i", undef); } for (my $i=5; $i<9; $i++) { $bibentries1->entry("L$i")->del_field('sortlabelalpha'); $bibentries1->entry("L$i")->del_field('labelalpha'); $main1->set_extraalphadata_for_key("L$i", undef); } $biber->prepare; $section0 = $biber->sections->get_section(0); $bibentries0 = $section0->bibentries; $main0 = $biber->datalists->get_list('custom/global//global/global'); $section1 = $biber->sections->get_section(1); $main1 = $biber->datalists->get_list('custom/global//global/global', 1); $bibentries1 = $section1->bibentries; eq_or_diff($main0->get_entryfield('L1', 'sortlabelalpha'), 'Doe95', 'maxalphanames=2 minalphanames=1 entry L1 labelalpha'); ok(is_undef($main0->get_extraalphadata_for_key('L1')), 'maxalphanames=2 minalphanames=1 entry L1 extraalpha'); eq_or_diff($main0->get_entryfield('L2', 'sortlabelalpha'), 'DA95', 'maxalphanames=2 minalphanames=1 entry L2 labelalpha'); eq_or_diff($main0->get_extraalphadata_for_key('L2'), '1', 'maxalphanames=2 minalphanames=1 entry L2 extraalpha'); eq_or_diff($main0->get_entryfield('L3', 'sortlabelalpha'), 'DA95', 'maxalphanames=2 minalphanames=1 entry L3 labelalpha'); eq_or_diff($main0->get_extraalphadata_for_key('L3'), '2', 'maxalphanames=2 minalphanames=1 entry L3 extraalpha'); eq_or_diff($main0->get_entryfield('L4', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=2 minalphanames=1 entry L4 labelalpha'); ok(is_undef($main0->get_extraalphadata_for_key('L4')), 'maxalphanames=2 minalphanames=1 entry L4 extraalpha'); eq_or_diff($main1->get_entryfield('L5', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=2 minalphanames=1 entry L5 labelalpha'); eq_or_diff($main1->get_extraalphadata_for_key('L5'), '1', 'maxalphanames=2 minalphanames=1 entry L5 extraalpha'); eq_or_diff($main1->get_entryfield('L6', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=2 minalphanames=1 entry L6 labelalpha'); eq_or_diff($main1->get_extraalphadata_for_key('L6'), '2', 'maxalphanames=2 minalphanames=1 entry L6 extraalpha'); eq_or_diff($main1->get_entryfield('L7', 'sortlabelalpha'), 'Doe+95', 'maxalphanames=2 minalphanames=1 entry L7 labelalpha'); eq_or_diff($main1->get_extraalphadata_for_key('L7'), '3', 'maxalphanames=2 minalphanames=1 entry L7 extraalpha'); eq_or_diff($main1->get_entryfield('L8', 'sortlabelalpha'), 'Sha85', 'maxalphanames=2 minalphanames=1 entry L8 labelalpha'); ok(is_undef($main1->get_extraalphadata_for_key('L8')), 'maxalphanames=2 minalphanames=1 entry L8 extraalpha'); # reset options and regenerate information Biber::Config->setblxoption('maxcitenames', 2); Biber::Config->setblxoption('mincitenames', 2); Biber::Config->setblxoption('maxalphanames', 2); Biber::Config->setblxoption('minalphanames', 2); for (my $i=1; $i<5; $i++) { $bibentries0->entry("L$i")->del_field('sortlabelalpha'); $bibentries0->entry("L$i")->del_field('labelalpha'); $main0->set_extraalphadata_for_key("L$i", undef); } for (my $i=5; $i<9; $i++) { $bibentries1->entry("L$i")->del_field('sortlabelalpha'); $bibentries1->entry("L$i")->del_field('labelalpha'); $main1->set_extraalphadata_for_key("L$i", undef); } $biber->prepare; $section0 = $biber->sections->get_section(0); $bibentries0 = $section0->bibentries; $main0 = $biber->datalists->get_list('custom/global//global/global'); $section1 = $biber->sections->get_section(1); $main1 = $biber->datalists->get_list('custom/global//global/global', 1); $bibentries1 = $section1->bibentries; eq_or_diff($main0->get_entryfield('L1', 'sortlabelalpha'), 'Doe95', 'maxalphanames=2 minalphanames=2 entry L1 labelalpha'); ok(is_undef($main0->get_extraalphadata_for_key('L1')), 'maxalphanames=2 minalphanames=2 entry L1 extraalpha'); eq_or_diff($main0->get_entryfield('L2', 'sortlabelalpha'), 'DA95', 'maxalphanames=2 minalphanames=2 entry L2 labelalpha'); eq_or_diff($main0->get_extraalphadata_for_key('L2'), '1', 'maxalphanames=2 minalphanames=2 entry L2 extraalpha'); eq_or_diff($main0->get_entryfield('L3', 'sortlabelalpha'), 'DA95', 'maxalphanames=2 minalphanames=2 entry L3 labelalpha'); eq_or_diff($main0->get_extraalphadata_for_key('L3'), '2', 'maxalphanames=2 minalphanames=2 entry L3 extraalpha'); eq_or_diff($main0->get_entryfield('L4', 'sortlabelalpha'), 'DA+95', 'maxalphanames=2 minalphanames=2 entry L4 labelalpha'); ok(is_undef($main0->get_extraalphadata_for_key('L4')), 'maxalphanames=2 minalphanames=2 entry L4 extraalpha'); eq_or_diff($main1->get_entryfield('L5', 'sortlabelalpha'), 'DA+95', 'maxalphanames=2 minalphanames=2 entry L5 labelalpha'); ok(is_undef($main1->get_extraalphadata_for_key('L5')), 'maxalphanames=2 minalphanames=2 entry L5 extraalpha'); eq_or_diff($main1->get_entryfield('L6', 'sortlabelalpha'), 'DS+95', 'maxalphanames=2 minalphanames=2 entry L6 labelalpha'); eq_or_diff($main1->get_extraalphadata_for_key('L6'), '1', 'maxalphanames=2 minalphanames=2 entry L6 extraalpha'); eq_or_diff($main1->get_entryfield('L7', 'sortlabelalpha'), 'DS+95', 'maxalphanames=2 minalphanames=2 entry L7 labelalpha'); eq_or_diff($main1->get_extraalphadata_for_key('L7'), '2', 'maxalphanames=2 minalphanames=2 entry L7 extraalpha'); eq_or_diff($main1->get_entryfield('L8', 'sortlabelalpha'), 'Sha85', 'maxalphanames=2 minalphanames=2 entry L8 labelalpha'); ok(is_undef($main1->get_extraalphadata_for_key('L8')), 'maxalphanames=2 minalphanames=2 entry L8 extraalpha'); # reset options and regenerate information Biber::Config->setblxoption('maxcitenames', 3); Biber::Config->setblxoption('mincitenames', 1); Biber::Config->setblxoption('maxalphanames', 3); Biber::Config->setblxoption('minalphanames', 1); for (my $i=1; $i<5; $i++) { $bibentries0->entry("L$i")->del_field('sortlabelalpha'); $bibentries0->entry("L$i")->del_field('labelalpha'); $main0->set_extraalphadata_for_key("L$i", undef); } for (my $i=5; $i<9; $i++) { $bibentries1->entry("L$i")->del_field('sortlabelalpha'); $bibentries1->entry("L$i")->del_field('labelalpha'); $main1->set_extraalphadata_for_key("L$i", undef); } $biber->prepare; $section0 = $biber->sections->get_section(0); $bibentries0 = $section0->bibentries; $main0 = $biber->datalists->get_list('custom/global//global/global'); $section1 = $biber->sections->get_section(1); $main1 = $biber->datalists->get_list('custom/global//global/global', 1); $bibentries1 = $section1->bibentries; eq_or_diff($main0->get_entryfield('L1', 'sortlabelalpha'), 'Doe95', 'maxalphanames=3 minalphanames=1 entry L1 labelalpha'); ok(is_undef($main0->get_extraalphadata_for_key('L1')), 'maxalphanames=3 minalphanames=1 entry L1 extraalpha'); eq_or_diff($main0->get_entryfield('L2', 'sortlabelalpha'), 'DA95', 'maxalphanames=3 minalphanames=1 entry L2 labelalpha'); eq_or_diff($main0->get_extraalphadata_for_key('L2'), '1', 'maxalphanames=3 minalphanames=1 entry L2 extraalpha'); eq_or_diff($main0->get_entryfield('L3', 'sortlabelalpha'), 'DA95', 'maxalphanames=3 minalphanames=1 entry L3 labelalpha'); eq_or_diff($main0->get_extraalphadata_for_key('L3'), '2', 'maxalphanames=3 minalphanames=1 entry L3 extraalpha'); eq_or_diff($main0->get_entryfield('L4', 'sortlabelalpha'), 'DAE95', 'maxalphanames=3 minalphanames=1 entry L4 labelalpha'); ok(is_undef($main0->get_extraalphadata_for_key('L4')), 'maxalphanames=3 minalphanames=1 entry L4 extraalpha'); eq_or_diff($main1->get_entryfield('L5', 'sortlabelalpha'), 'DAE95', 'maxalphanames=3 minalphanames=1 entry L5 labelalpha'); ok(is_undef($main1->get_extraalphadata_for_key('L5')), 'maxalphanames=3 minalphanames=1 entry L5 extraalpha'); eq_or_diff($main1->get_entryfield('L6', 'sortlabelalpha'), 'DSE95', 'maxalphanames=3 minalphanames=1 entry L6 labelalpha'); ok(is_undef($main1->get_extraalphadata_for_key('L6')), 'maxalphanames=3 minalphanames=1 entry L6 extraalpha'); eq_or_diff($main1->get_entryfield('L7', 'sortlabelalpha'), 'DSJ95', 'maxalphanames=3 minalphanames=1 entry L7 labelalpha'); ok(is_undef($main1->get_extraalphadata_for_key('L7')), 'maxalphanames=3 minalphanames=1 entry L7 extraalpha'); eq_or_diff($main1->get_entryfield('L8', 'sortlabelalpha'), 'Sha85', 'maxalphanames=3 minalphanames=1 entry L8 labelalpha'); ok(is_undef($main1->get_extraalphadata_for_key('L8')), 'maxalphanames=3 minalphanames=1 entry L8 extraalpha'); ok(is_undef($bibentries0->entry('m1')->get_field('keywords')), 'map refsection - 1'); eq_or_diff($bibentries0->entry('m1')->get_field('title'), 'Film title 1', 'map refsection - 2'); eq_or_diff($bibentries1->entry('m1')->get_field('keywords'), ['thing'], 'map refsection- 3'); eq_or_diff($bibentries1->entry('m1')->get_field('title'), 'Film title 11', 'map refsection - 4'); biblatex-biber-2.9/t/remote-files.t000444000153000001 2143313205066062 16704 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8' ; use Test::More; use Test::Differences; unified_diff; if ($ENV{BIBER_DEV_TESTS}) { plan tests => 3; } else { plan skip_all => 'BIBER_DEV_TESTS not set'; } use Biber; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata") ; # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('remote-files.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); Biber::Config->setoption('quiet', 1); Biber::Config->setoption('nodieonerror', 1); # because the remote bibs might be messy # Now generate the information $biber->prepare; my $out = $biber->get_output_obj; my $section = $biber->sections->get_section(0); my $main = $biber->datalists->get_list('nty/global//global/global'); my $bibentries = $section->bibentries; my $cu1 = q| \entry{citeulike:8283461}{article}{} \name{author}{4}{}{% {{uniquename=0,uniquepart=base,hash=aba7750b7045425a3cf8573f7710ec18}{% family={Marazziti}, familyi={M\bibinitperiod}, given={D.}, giveni={D\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=1f2c257ff6c86cffeb33019b6d8598c5}{% family={Akiskal}, familyi={A\\bibinitperiod}, given={H.\bibnamedelimi S.}, giveni={H\bibinitperiod\bibinitdelim S\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=e1b1769dbb6e7d04008811b49cd745a9}{% family={Rossi}, familyi={R\bibinitperiod}, given={A.}, giveni={A\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=b1d8ec8b73d39a27898e50cfa3e3c676}{% family={Cassano}, familyi={C\bibinitperiod}, given={G.\bibnamedelimi B.}, giveni={G\bibinitperiod\bibinitdelim B\bibinitperiod}, givenun=0}}% } \strng{namehash}{7f19319e09aa3239f02eb31ec7a4aa8b} \strng{fullhash}{ee363ce5e21ebe022f83aae896dd47f9} \strng{bibnamehash}{7f19319e09aa3239f02eb31ec7a4aa8b} \strng{authorbibnamehash}{7f19319e09aa3239f02eb31ec7a4aa8b} \strng{authornamehash}{7f19319e09aa3239f02eb31ec7a4aa8b} \strng{authorfullhash}{ee363ce5e21ebe022f83aae896dd47f9} \field{sortinit}{M} \field{sortinithash}{cfd219b90152c06204fab207bc6c7cab} \field{extradatescope}{labelyear} \field{labeldatesource}{year} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{abstract}{{BACKGROUND}: The evolutionary consequences of love are so important that there must be some long-established biological process regulating it. Recent findings suggest that the serotonin ({5-HT}) transporter might be linked to both neuroticism and sexual behaviour as well as to obsessive-compulsive disorder ({OCD}). The similarities between an overvalued idea, such as that typical of subjects in the early phase of a love relationship, and obsession, prompted us to explore the possibility that the two conditions might share alterations at the level of the {5-HT} transporter. {METHODS}: Twenty subjects who had recently (within the previous 6 months) fallen in love, 20 unmedicated {OCD} patients and 20 normal controls, were included in the study. The {5-HT} transporter was evaluated with the specific binding of {3H}-paroxetine ({3H}-Par) to platelet membranes. {RESULTS}: The results showed that the density of {3H}-Par binding sites was significantly lower in subjects who had recently fallen in love and in {OCD} patients than in controls. {DISCUSSION}: The main finding of the present study is that subjects who were in the early romantic phase of a love relationship were not different from {OCD} patients in terms of the density of the platelet {5-HT} transporter, which proved to be significantly lower than in the normal controls. This would suggest common neurochemical changes involving the {5-HT} system, linked to psychological dimensions shared by the two conditions, perhaps at an ideational level.} \field{issn}{0033-2917} \field{journaltitle}{Psychological medicine} \field{month}{5} \field{number}{3} \field{title}{Alteration of the platelet serotonin transporter in romantic love.} \field{volume}{29} \field{year}{1999} \field{pages}{741\bibrangedash 745} \range{pages}{5} \verb{urlraw} \verb http://www.biomedexperts.com/Abstract.bme/10405096 \endverb \verb{url} \verb http://www.biomedexperts.com/Abstract.bme/10405096 \endverb \keyw{love,romantic} \endentry |; my $dl1 = q| \entry{AbdelbarH98}{article}{} \name{author}{2}{}{% {{uniquename=0,uniquepart=base,hash=14c582ce40292affd427311ca8e3bc9c}{% family={Abdelbar}, familyi={A\bibinitperiod}, given={A.M.}, giveni={A\bibinitperiod}, givenun=0}}% {{uniquename=0,uniquepart=base,hash=558ac9729b484b6f378e45a86582ea1d}{% family={Hedetniemi}, familyi={H\bibinitperiod}, given={S.M.}, giveni={S\bibinitperiod}, givenun=0}}% } \strng{namehash}{01599a4cb58316d64208b12a07741765} \strng{fullhash}{01599a4cb58316d64208b12a07741765} \strng{bibnamehash}{01599a4cb58316d64208b12a07741765} \strng{authorbibnamehash}{01599a4cb58316d64208b12a07741765} \strng{authornamehash}{01599a4cb58316d64208b12a07741765} \strng{authorfullhash}{01599a4cb58316d64208b12a07741765} \field{sortinit}{A} \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b} \field{extradatescope}{labelyear} \field{labeldatesource}{year} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{journaltitle}{Artificial Intelligence} \field{title}{Approximating {MAP}s for belief networks is {NP}-hard and other theorems} \field{volume}{102} \field{year}{1998} \field{pages}{21\bibrangedash 38} \range{pages}{18} \endentry |; my $ssl = q| \entry{merleau-ponty_philosophe_2010}{incollection}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=83d062f99d033839537243075d75bad2}{% family={Merleau-Ponty}, familyi={M\bibinithyphendelim P\bibinitperiod}, given={Maurice}, giveni={M\bibinitperiod}, givenun=0}}% } \name{editor}{1}{}{% {{hash=ff5f90046157eecef0c22da4dac6486e}{% family={Lefort}, familyi={L\bibinitperiod}, given={Claude}, giveni={C\bibinitperiod}}}% } \list{language}{1}{% {Fransk}% } \list{location}{1}{% {Paris}% } \list{publisher}{1}{% {Éditions Gallimard}% } \strng{namehash}{83d062f99d033839537243075d75bad2} \strng{fullhash}{83d062f99d033839537243075d75bad2} \strng{bibnamehash}{83d062f99d033839537243075d75bad2} \strng{authorbibnamehash}{83d062f99d033839537243075d75bad2} \strng{authornamehash}{83d062f99d033839537243075d75bad2} \strng{authorfullhash}{83d062f99d033839537243075d75bad2} \strng{editorbibnamehash}{ff5f90046157eecef0c22da4dac6486e} \strng{editornamehash}{ff5f90046157eecef0c22da4dac6486e} \strng{editorfullhash}{ff5f90046157eecef0c22da4dac6486e} \field{sortinit}{M} \field{sortinithash}{cfd219b90152c06204fab207bc6c7cab} \field{extradatescope}{labelyear} \field{labeldatesource}{year} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{booktitle}{Œuvres} \field{title}{Le philosophe et son ombre} \field{year}{2010} \field{pages}{1267\bibrangedash 1289} \range{pages}{23} \keyw{Husserl,Edmund,autrui,chair,constitution,intercorporéité,l'impensé,ouverture} \endentry |; eq_or_diff( $out->get_output_entry('citeulike:8283461', $main), $cu1, 'Fetch from citeulike') ; eq_or_diff( $out->get_output_entry('AbdelbarH98', $main), $dl1, 'Fetch from plain bib download') ; eq_or_diff( $out->get_output_entry('merleau-ponty_philosophe_2010', $main), $ssl, 'HTTPS test') ; biblatex-biber-2.9/t/sections.t000444000153000001 1047513205066062 16144 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 14; use Test::Differences; unified_diff; use Biber; use Biber::Constants; use Biber::Utils; use Biber::Output::bbl; use Unicode::Normalize; use Log::Log4perl; chdir("t/tdata"); my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('sections.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); Biber::Config->setoption('output_safechars', 1); # Now generate the information $biber->prepare; my $out = $biber->get_output_obj; my $section0 = $biber->sections->get_section(0); my $main0 = $biber->datalists->get_list('custom/global//global/global'); my $shs0 = $biber->datalists->get_list('shorthand/global//global/global', 0, 'list'); my $section1 = $biber->sections->get_section(1); my $main1 = $biber->datalists->get_list('custom/global//global/global', 1); my $shs1 = $biber->datalists->get_list('shorthand/global//global/global', 1, 'list'); my $section2 = $biber->sections->get_section(2); my $main2 = $biber->datalists->get_list('custom/global//global/global', 2); my $shs2 = $biber->datalists->get_list('shorthand/global//global/global', 2, 'list'); my $section3 = $biber->sections->get_section(3); my $main3 = $biber->datalists->get_list('custom/global//global/global', 3); my $shs3 = $biber->datalists->get_list('shorthand/global//global/global', 3, 'list'); # Internal UTF-8 before output is always NFD so have to NFD bits of this my $preamble = [ NFD('Štring for Preamble 1'), 'String for Preamble 2', 'String for Preamble 3', 'String for Preamble 4' ]; my $v = $Biber::Config::VERSION; if ($Biber::Config::BETA_VERSION) { $v .= ' (beta)'; } my $head = qq|% \$ biblatex auxiliary file \$ % \$ biblatex bbl format version $BBL_VERSION \$ % Do not modify the above lines! % % This is an auxiliary file used by the 'biblatex' package. % This file may safely be deleted. It will be recreated by % biber as required. % \\begingroup \\makeatletter \\\@ifundefined{ver\@biblatex.sty} {\\\@latex\@error {Missing 'biblatex' package} {The bibliography requires the 'biblatex' package.} \\aftergroup\\endinput} {} \\endgroup \\preamble{% \\v{S}tring for Preamble 1% String for Preamble 2% String for Preamble 3% String for Preamble 4% } |; my $tail = qq||; is_deeply($biber->get_preamble, $preamble, 'Preamble for all sections'); eq_or_diff($section0->bibentry('sect1')->get_field('note'), 'value1', 'Section 0 macro test'); # If macros were not reset between sections, this would give a macro redef error eq_or_diff($section1->bibentry('sect4')->get_field('note'), 'value2', 'Section 1 macro test'); is_deeply($main0->get_keys, ['sect1', 'sect2', 'sect3', 'sect8'], 'Section 0 citekeys'); is_deeply($shs0->get_keys, ['sect1', 'sect2', 'sect8'], 'Section 0 shorthands'); is_deeply($main1->get_keys, ['sect4', 'sect5'], 'Section 1 citekeys'); is_deeply($shs1->get_keys, ['sect4', 'sect5'], 'Section 1 shorthands'); is_deeply($main2->get_keys, ['sect1', 'sect6', 'sect7'], 'Section 2 citekeys'); is_deeply($shs2->get_keys, ['sect1', 'sect6', 'sect7'], 'Section 2 shorthands'); is_deeply([$section3->get_orig_order_citekeys], ['sect1', 'sect2', 'sectall1'], 'Section 3 citekeys'); eq_or_diff($out->get_output_section(0)->number, '0', 'Checking output sections - 1'); eq_or_diff($out->get_output_section(1)->number, '1', 'Checking output sections - 2'); eq_or_diff($out->get_output_section(2)->number, '2', 'Checking output sections - 3'); eq_or_diff($out->get_output_head, $head, 'Preamble output check with output_safechars'); biblatex-biber-2.9/t/set-legacy.t000444000153000001 1034213205066062 16343 0ustar00vboxother000000000000# -*- cperl -*- use strict; use warnings; use utf8; no warnings 'utf8'; use Test::More tests => 3; use Test::Differences; unified_diff; use Biber; use Biber::Output::bbl; use Log::Log4perl; chdir("t/tdata"); # Set up Biber object my $biber = Biber->new(noconf => 1); my $LEVEL = 'ERROR'; my $l4pconf = qq| log4perl.category.main = $LEVEL, Screen log4perl.category.screen = $LEVEL, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.utf8 = 1 log4perl.appender.Screen.Threshold = $LEVEL log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout |; Log::Log4perl->init(\$l4pconf); $biber->parse_ctrlfile('set-legacy.bcf'); $biber->set_output_obj(Biber::Output::bbl->new()); # Options - we could set these in the control file but it's nice to see what we're # relying on here for tests # Biber options Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); # Now generate the information $biber->prepare; my $section = $biber->sections->get_section(0); my $main = $biber->datalists->get_list('none/global//global/global'); my $out = $biber->get_output_obj; my $string1 = q| \entry{Elias1955}{set}{} \set{Elias1955a,Elias1955b} \field{sortinit}{1} \field{sortinithash}{2174f786c6195e7fe2ee1c229b416e29} \endentry |; my $string2 = q| \entry{Elias1955a}{article}{} \inset{Elias1955} \name{author}{1}{}{% {{hash=bdd4981ffb5a62685c993d6f9dec4c23}{% family={Elias}, familyi={E\bibinitperiod}, given={P.}, giveni={P\bibinitperiod}}}% } \strng{namehash}{bdd4981ffb5a62685c993d6f9dec4c23} \strng{fullhash}{bdd4981ffb5a62685c993d6f9dec4c23} \strng{bibnamehash}{bdd4981ffb5a62685c993d6f9dec4c23} \strng{authorbibnamehash}{bdd4981ffb5a62685c993d6f9dec4c23} \strng{authornamehash}{bdd4981ffb5a62685c993d6f9dec4c23} \strng{authorfullhash}{bdd4981ffb5a62685c993d6f9dec4c23} \field{labeldatesource}{year} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{issn}{0096-1000} \field{journaltitle}{IRE Transactions on Information Theory} \field{month}{3} \field{number}{1} \field{title}{Predictive coding--I} \field{volume}{1} \field{year}{1955} \field{pages}{16\bibrangedash 24} \range{pages}{9} \verb{doi} \verb 10.1109/TIT.1955.1055126 \endverb \warn{\item Field 'entryset' is no longer needed in set member entries in Biber - ignoring in entry 'Elias1955a'} \endentry |; my $string3 = q| \entry{Elias1955b}{article}{} \inset{Elias1955} \name{author}{1}{}{% {{hash=bdd4981ffb5a62685c993d6f9dec4c23}{% family={Elias}, familyi={E\bibinitperiod}, given={P.}, giveni={P\bibinitperiod}}}% } \strng{namehash}{bdd4981ffb5a62685c993d6f9dec4c23} \strng{fullhash}{bdd4981ffb5a62685c993d6f9dec4c23} \strng{bibnamehash}{bdd4981ffb5a62685c993d6f9dec4c23} \strng{authorbibnamehash}{bdd4981ffb5a62685c993d6f9dec4c23} \strng{authornamehash}{bdd4981ffb5a62685c993d6f9dec4c23} \strng{authorfullhash}{bdd4981ffb5a62685c993d6f9dec4c23} \field{labeldatesource}{year} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{issn}{0096-1000} \field{journaltitle}{IRE Transactions on Information Theory} \field{month}{3} \field{number}{1} \field{title}{Predictive coding--II} \field{volume}{1} \field{year}{1955} \field{pages}{24\bibrangedash 33} \range{pages}{10} \verb{doi} \verb 10.1109/TIT.1955.1055116 \endverb \warn{\item Field 'entryset' is no longer needed in set member entries in Biber - ignoring in entry 'Elias1955b'} \endentry |; eq_or_diff($out->get_output_entry('Elias1955', $main), $string1, 'Legacy set test 1'); eq_or_diff($out->get_output_entry('Elias1955a', $main), $string2, 'Legacy set test 2'); eq_or_diff($out->get_output_entry('Elias1955b', $main), $string3, 'Legacy set test 3'); biblatex-biber-2.9/t/tdata000755000153000001 013205066062 15041 5ustar00vboxother000000000000biblatex-biber-2.9/t/tdata/annotations.bib000444000153000001 41413205066062 20170 0ustar00vboxother000000000000@MISC{ann1, AUTHOR = {Last1, First1 and Last2, First2 and Last3, First3}, AUTHOR-an = {1:family=student;2=corresponding}, TITLE = {The Title}, TITLE-an = {=one, two}, LANGUAGE = {english and french}, LANGUAGE-an = {1=ann1; 2=ann2, ann3; =ann4} } biblatex-biber-2.9/t/tdata/full-bblxml.bcf000444000153000001 25144013205066062 20140 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 0 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 1 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 1 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 1 usetranslator 1 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender examples.bib shore stdmodel angenendt reese knuth:ct:b knuth:ct:c set:aksin presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort shorthand sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 sortshorthand shorthand shorthand biblatex-biber-2.9/t/tdata/biblatexml.bcf000444000153000001 25276513205066062 20056 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 1 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 3 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 labelnamespec shorteditor editor translator useeditor 0 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender biblatexml.bltxml * presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort sortkey labelalpha sortname author editor translator sorttitle title sortyear year volume 0 sorttitle title biblatex-biber-2.9/t/tdata/datalists.bib000444000153000001 435413205066062 17652 0ustar00vboxother000000000000@ARTICLE{K1, AUTHOR = {Aaron Adamson}, TITLE = {Artificial Advice}, PUBLISHER = {Aardvark Press}, LOCATION = {Arlington}, YEAR = {1995}, VERBA = {String} } @BOOK{K2, AUTHOR = {Brian Bully}, TITLE = {Lucid Lamas}, PUBLISHER = {Aardvark Press}, LOCATION = {Arlington}, YEAR = {1971}, } @PHDTHESIS{K3, ENTRYSUBTYPE = {rubbish}, AUTHOR = {Richard Radiator}, TITLE = {Zenos Things}, LOCATION = {Cambridge}, YEAR = {1953}, } @BOOK{K4, AUTHOR = {Linda Lucid}, TITLE = {Collation is cruel}, PUBLISHER = {Stuff and Nonesense Press}, LOCATION = {London}, YEAR = {1999}, KEYWORDS = {key1, key2} } @BOOK{K5, AUTHOR = {Slippery Zånny}, TITLE = {Silent Slippers}, PUBLISHER = {Footwear Folios}, LOCATION = {London}, YEAR = {1932}, } @BOOK{K6, OPTIONS = {nametemplates=global}, AUTHOR = {Slippery Zznny}, TITLE = {People Prefer Packages to Post}, PUBLISHER = {Terrible Typists}, LOCATION = {Grimsby}, YEAR = {1945}, } % In es_ES_trad, title comes after K4 as "ch" sorts between "c" and "d" @BOOK{K7, AUTHOR = {Simon Spaniard}, TITLE = {Collation is chilling}, YEAR = {1906} } % Testing locales at sortitem level % K8, K9, K10 all in in en_US % K9, K8, K10 when NOTE is es_ES_trad @BOOK{K8, AUTHOR = {Terrance Tremble}, TITLE = {Collation is chilling}, NOTE = {Collation is chilling}, KEYWORDS = {key1} } @BOOK{K9, AUTHOR = {Terrance Tremble}, TITLE = {Collation is chilling}, NOTE = {Collation is cruel}, KEYWORDS = {key1} } @BOOK{K10, AUTHOR = {Terrance Tremble}, TITLE = {Collation is cruel}, KEYWORDS = {key1} } % Testing dateparts as ints @BOOK{D1, DATE = {-0380} } @BOOK{D2, DATE = {-0385} } @BOOK{D3, DATE = {-0388} } @BOOK{D4, DATE = {2005} } @BOOK{D5, DATE = {0380} } biblatex-biber-2.9/t/tdata/sort-order.bcf000444000153000001 27142713205066062 20027 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender sort-order.bib L2 L3 L1B L1 L4 L5 L1A L7 L8 L6 L9 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 sortname author editor translator sorttitle title sorttitle title sortyear year 0000 presort sortkey sortname author editor translator sorttitle title sortyear year 0000 sorttitle title volume 0000 presort sortkey sortname author editor translator sorttitle title sortyear year 0000 volume 0000 sorttitle title presort sortkey sortname author editor translator sorttitle title sortyear year 0000 volume 0000 sorttitle title presort sortkey sortyear year 9999 sortname author editor translator sorttitle title sorttitle title presort sortkey sortyear year 9999 sortname author editor translator sorttitle title sorttitle title presort sortkey sortyear year 9999 sortname author editor translator sorttitle title sorttitle title presort labelalpha sortkey sortname author editor translator sorttitle title sortyear year 0000 sorttitle title presort labelalpha sortkey sortname author editor translator sorttitle title sortyear year 0000 volume 0000 sorttitle title title citeorder year citeorder biblatex-biber-2.9/t/tdata/labelalphaname.bib000444000153000001 54013205066062 20561 0ustar00vboxother000000000000@BOOK{lant1, AUTHOR = {Arthur Smith} } % per-entry @BOOK{lant2, OPTIONS = {labelalphanametemplatename=test2}, AUTHOR = {Arthur Smith} } % per-namelist @BOOK{lant3, AUTHOR = {labelalphanametemplatename=test3 and given=Arthur, family=Smith} } % per-name @BOOK{lant4, AUTHOR = {labelalphanametemplatename=test4, given=Arthur, family=Smith} } biblatex-biber-2.9/t/tdata/uniqueness-nameparts.bib000444000153000001 125513205066062 22046 0ustar00vboxother000000000000@ARTICLE {un1, AUTHOR = {given={John}, family={Smith}, middle={Simon}} } @ARTICLE {un2, AUTHOR = {given={John}, family={Smith}, middle={Alan}} } @ARTICLE {un3, AUTHOR = {given={John}, family={Smith}, middle={Arthur}} } @ARTICLE {un4, AUTHOR = {given={Alan}, family={Smith}, middle={Simon}} } % Per-entry @ARTICLE {un5, OPTIONS = {uniquenametemplatename=test3}, AUTHOR = {given={Arthur}, family={Smith}, middle={Simon}} } % Per-namelist @ARTICLE {un6, AUTHOR = {uniquenametemplatename=test4 and given={Arthur}, family={Smith}, middle={Smythe}} } % Per-name @ARTICLE {un7, AUTHOR = {uniquenametemplatename=test5, given={Arthur}, family={Smith}, middle={Smedley}} } biblatex-biber-2.9/t/tdata/tool-test.conf000444000153000001 21054113205066062 20042 0ustar00vboxother000000000000 testlocale 5 ARTICLE doesnotexist.bib examples.bib doesnotexist.bib ARTICLE UNPUBLISHED examples.bib MISC examples.bib examples.bib REPORT UNPUBLISHED ONLINE prefix family given prefix family given suffix prefix mm citeorder sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata day endday endmonth eventday eventendday eventendmonth eventmonth eventyear origday origendday origendmonth origmonth origyear urlday urlendday urlendmonth urlmonth urlyear abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished hyphenation indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label library mainsubtitle maintitle maintitleaddon nameaddon note number origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthand shorthandintro shortjournal shortseries shorttitle subtitle title titleaddon usera userb userc userd usere userf venue version volume volumes month year urlendyear endyear eventendyear origendyear sorttitle sortshorthand sortyear sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec shortauthor shorteditor translator sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref xdata ids entryset date eventdate origdate urldate doi eprint file verba verbb verbc url keywords related options relatedoptions pages execute with writer producer execproducer director abstractloc doubtfulauthor doubtfuldate titleisdescription newspaper urldescription abstracturl abstract annotation authortype bookpagination crossref entryset entrysubtype execute file gender hyphenation ids indextitle indexsorttitle isan ismn iswc keywords label library lista listb listc listd liste listf nameaddon options origday origendday origendmonth origendyear origmonth origyear origlocation origpublisher origtitle pagination presort related relatedtype relatedstring shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear usera userb userc userd usere userf verba verbb verbc xdata xref set entryset crossref article author journaltitle title day endday endmonth endyear month year addendum annotator commentator doi editor editora editorb editorc editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle language note number origlanguage pages pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear version volume bibnote note book author title day endday endmonth endyear month year addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes mvbook author title day endday endmonth endyear month year addendum afterword annotator commentator doi edition editor editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes inbook bookinbook suppbook author title booktitle day endday endmonth endyear month year addendum afterword annotator bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes booklet author editor title day endday endmonth endyear month year addendum chapter doi eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle titleaddon type url urlday urlendday urlendmonth urlendyear urlmonth urlyear collection reference editor title day endday endmonth endyear month year addendum afterword annotator chapter commentator doi edition editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes mvcollection mvreference author title day endday endmonth endyear month year addendum afterword annotator commentator doi edition editor editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes incollection suppcollection inreference author editor title booktitle day endday endmonth endyear month year addendum afterword annotator booksubtitle booktitleaddon chapter commentator doi edition editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes manual title day endday endmonth endyear month year addendum author chapter doi edition editor eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle titleaddon type url urlday urlendday urlendmonth urlendyear urlmonth urlyear version misc title day endday endmonth endyear day endday endmonth endyear month year addendum author doi editor eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle titleaddon type url urlday urlendday urlendmonth urlendyear urlmonth urlyear version online title url addendum author editor language month note organization pubstate subtitle titleaddon urlday urlendday urlendmonth urlendyear urlmonth urlyear version year patent author title number day endday endmonth endyear month year addendum doi eprint eprintclass eprinttype holder location note pubstate subtitle titleaddon type url urlday urlendday urlendmonth urlendyear urlmonth urlyear version periodical editor title day endday endmonth endyear month year addendum doi editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate series subtitle url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume mvproceedings editor title day endday endmonth endyear month year addendum doi eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear venue volumes proceedings editor title day endday endmonth endyear month year addendum chapter doi eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear venue volume volumes inproceedings author editor title booktitle day endday endmonth endyear month year addendum booksubtitle booktitleaddon chapter doi eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear venue volume volumes report author title type institution day endday endmonth endyear month year addendum chapter doi eprint eprintclass eprinttype isrn language location note number pages pagetotal pubstate subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear version thesis author title type institution day endday endmonth endyear month year addendum chapter doi eprint eprintclass eprinttype language location note pages pagetotal pubstate subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear unpublished author title day endday endmonth endyear month year addendum howpublished language location note pubstate subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author editor title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender biblatex-biber-2.9/t/tdata/full-dot.dot000444000153000001 12172513205066061 17503 0ustar00vboxother000000000000digraph Biberdata { compound = true; edge [ arrowhead=open ]; graph [ style=filled, rankdir=LR ]; node [ fontsize=10, fillcolor=white, style=filled, shape=box ]; subgraph "cluster_section0" { label="Section 0"; tooltip="Section 0"; fontsize="10"; fontname=serif; fillcolor="#fce3fa"; subgraph "cluster_section0/ccr1" { fontsize="10"; label="ccr1 (MVBOOK)"; tooltip="ccr1 (MVBOOK)"; fillcolor="#a0d0ff"; "section0/ccr1/author" [ label="AUTHOR" ] "section0/ccr1/editor" [ label="EDITOR" ] "section0/ccr1/title" [ label="TITLE" ] "section0/ccr1/year" [ label="YEAR" ] } subgraph "cluster_section0/ccr2" { fontsize="10"; label="ccr2 (BOOK)"; tooltip="ccr2 (BOOK)"; fillcolor="#a0d0ff"; "section0/ccr2/author" [ label="AUTHOR" ] "section0/ccr2/crossref" [ label="CROSSREF" ] "section0/ccr2/editor" [ label="EDITOR" ] "section0/ccr2/maintitle" [ label="MAINTITLE" ] "section0/ccr2/title" [ label="TITLE" ] "section0/ccr2/year" [ label="YEAR" ] } subgraph "cluster_section0/ccr3" { fontsize="10"; label="ccr3 (INBOOK)"; tooltip="ccr3 (INBOOK)"; fillcolor="#a0d0ff"; "section0/ccr3/author" [ label="AUTHOR" ] "section0/ccr3/bookauthor" [ label="BOOKAUTHOR" ] "section0/ccr3/booktitle" [ label="BOOKTITLE" ] "section0/ccr3/crossref" [ label="CROSSREF" ] "section0/ccr3/editor" [ label="EDITOR" ] "section0/ccr3/maintitle" [ label="MAINTITLE" ] "section0/ccr3/title" [ label="TITLE" ] "section0/ccr3/year" [ label="YEAR" ] } subgraph "cluster_section0/cr1" { fontsize="10"; label="cr1 (INBOOK)"; tooltip="cr1 (INBOOK)"; fillcolor="#a0d0ff"; "section0/cr1/author" [ label="AUTHOR" ] "section0/cr1/booktitle" [ label="BOOKTITLE" ] "section0/cr1/crossref" [ label="CROSSREF" ] "section0/cr1/editor" [ label="EDITOR" ] "section0/cr1/eprintclass" [ label="EPRINTCLASS" ] "section0/cr1/eprinttype" [ label="EPRINTTYPE" ] "section0/cr1/ids" [ label="IDS" ] "section0/cr1/origyear" [ label="ORIGYEAR" ] "section0/cr1/publisher" [ label="PUBLISHER" ] "section0/cr1/title" [ label="TITLE" ] "section0/cr1/year" [ label="YEAR" ] } subgraph "cluster_section0/cr2" { fontsize="10"; label="cr2 (INBOOK)"; tooltip="cr2 (INBOOK)"; fillcolor="#a0d0ff"; "section0/cr2/author" [ label="AUTHOR" ] "section0/cr2/booktitle" [ label="BOOKTITLE" ] "section0/cr2/crossref" [ label="CROSSREF" ] "section0/cr2/editor" [ label="EDITOR" ] "section0/cr2/institution" [ label="INSTITUTION" ] "section0/cr2/origyear" [ label="ORIGYEAR" ] "section0/cr2/publisher" [ label="PUBLISHER" ] "section0/cr2/title" [ label="TITLE" ] "section0/cr2/year" [ label="YEAR" ] } subgraph "cluster_section0/cr3" { fontsize="10"; label="cr3 (INBOOK)"; tooltip="cr3 (INBOOK)"; fillcolor="#a0d0ff"; "section0/cr3/author" [ label="AUTHOR" ] "section0/cr3/booktitle" [ label="BOOKTITLE" ] "section0/cr3/crossref" [ label="CROSSREF" ] "section0/cr3/editor" [ label="EDITOR" ] "section0/cr3/eprinttype" [ label="EPRINTTYPE" ] "section0/cr3/origyear" [ label="ORIGYEAR" ] "section0/cr3/publisher" [ label="PUBLISHER" ] "section0/cr3/title" [ label="TITLE" ] "section0/cr3/year" [ label="YEAR" ] } subgraph "cluster_section0/cr4" { fontsize="10"; label="cr4 (INBOOK)"; tooltip="cr4 (INBOOK)"; fillcolor="#a0d0ff"; "section0/cr4/author" [ label="AUTHOR" ] "section0/cr4/booktitle" [ label="BOOKTITLE" ] "section0/cr4/crossref" [ label="CROSSREF" ] "section0/cr4/editor" [ label="EDITOR" ] "section0/cr4/origyear" [ label="ORIGYEAR" ] "section0/cr4/publisher" [ label="PUBLISHER" ] "section0/cr4/title" [ label="TITLE" ] "section0/cr4/year" [ label="YEAR" ] } subgraph "cluster_section0/cr6" { fontsize="10"; label="cr6 (INPROCEEDINGS)"; tooltip="cr6 (INPROCEEDINGS)"; fillcolor="#a0d0ff"; "section0/cr6/author" [ label="AUTHOR" ] "section0/cr6/booktitle" [ label="BOOKTITLE" ] "section0/cr6/crossref" [ label="CROSSREF" ] "section0/cr6/editor" [ label="EDITOR" ] "section0/cr6/eventday" [ label="EVENTDAY" ] "section0/cr6/eventendday" [ label="EVENTENDDAY" ] "section0/cr6/eventendmonth" [ label="EVENTENDMONTH" ] "section0/cr6/eventendyear" [ label="EVENTENDYEAR" ] "section0/cr6/eventmonth" [ label="EVENTMONTH" ] "section0/cr6/eventtitle" [ label="EVENTTITLE" ] "section0/cr6/eventyear" [ label="EVENTYEAR" ] "section0/cr6/location" [ label="LOCATION" ] "section0/cr6/pages" [ label="PAGES" ] "section0/cr6/publisher" [ label="PUBLISHER" ] "section0/cr6/title" [ label="TITLE" ] "section0/cr6/venue" [ label="VENUE" ] "section0/cr6/year" [ label="YEAR" ] } subgraph "cluster_section0/cr6i" { fontsize="10"; label="cr6i (PROCEEDINGS)"; tooltip="cr6i (PROCEEDINGS)"; fillcolor="#deefff"; "section0/cr6i/author" [ label="AUTHOR" ] "section0/cr6i/editor" [ label="EDITOR" ] "section0/cr6i/eventday" [ label="EVENTDAY" ] "section0/cr6i/eventendday" [ label="EVENTENDDAY" ] "section0/cr6i/eventendmonth" [ label="EVENTENDMONTH" ] "section0/cr6i/eventendyear" [ label="EVENTENDYEAR" ] "section0/cr6i/eventmonth" [ label="EVENTMONTH" ] "section0/cr6i/eventtitle" [ label="EVENTTITLE" ] "section0/cr6i/eventyear" [ label="EVENTYEAR" ] "section0/cr6i/location" [ label="LOCATION" ] "section0/cr6i/publisher" [ label="PUBLISHER" ] "section0/cr6i/title" [ label="TITLE" ] "section0/cr6i/venue" [ label="VENUE" ] "section0/cr6i/year" [ label="YEAR" ] } subgraph "cluster_section0/cr7" { fontsize="10"; label="cr7 (INBOOK)"; tooltip="cr7 (INBOOK)"; fillcolor="#a0d0ff"; "section0/cr7/author" [ label="AUTHOR" ] "section0/cr7/bookauthor" [ label="BOOKAUTHOR" ] "section0/cr7/booksubtitle" [ label="BOOKSUBTITLE" ] "section0/cr7/booktitle" [ label="BOOKTITLE" ] "section0/cr7/booktitleaddon" [ label="BOOKTITLEADDON" ] "section0/cr7/crossref" [ label="CROSSREF" ] "section0/cr7/pages" [ label="PAGES" ] "section0/cr7/publisher" [ label="PUBLISHER" ] "section0/cr7/title" [ label="TITLE" ] "section0/cr7/verba" [ label="VERBA" ] "section0/cr7/year" [ label="YEAR" ] } subgraph "cluster_section0/cr7i" { fontsize="10"; label="cr7i (BOOK)"; tooltip="cr7i (BOOK)"; fillcolor="#deefff"; "section0/cr7i/author" [ label="AUTHOR" ] "section0/cr7i/publisher" [ label="PUBLISHER" ] "section0/cr7i/subtitle" [ label="SUBTITLE" ] "section0/cr7i/title" [ label="TITLE" ] "section0/cr7i/titleaddon" [ label="TITLEADDON" ] "section0/cr7i/verba" [ label="VERBA" ] "section0/cr7i/year" [ label="YEAR" ] } subgraph "cluster_section0/cr8" { fontsize="10"; label="cr8 (INCOLLECTION)"; tooltip="cr8 (INCOLLECTION)"; fillcolor="#a0d0ff"; "section0/cr8/author" [ label="AUTHOR" ] "section0/cr8/booksubtitle" [ label="BOOKSUBTITLE" ] "section0/cr8/booktitle" [ label="BOOKTITLE" ] "section0/cr8/booktitleaddon" [ label="BOOKTITLEADDON" ] "section0/cr8/crossref" [ label="CROSSREF" ] "section0/cr8/editor" [ label="EDITOR" ] "section0/cr8/pages" [ label="PAGES" ] "section0/cr8/publisher" [ label="PUBLISHER" ] "section0/cr8/title" [ label="TITLE" ] "section0/cr8/year" [ label="YEAR" ] } subgraph "cluster_section0/cr8i" { fontsize="10"; label="cr8i (COLLECTION)"; tooltip="cr8i (COLLECTION)"; fillcolor="#deefff"; "section0/cr8i/editor" [ label="EDITOR" ] "section0/cr8i/publisher" [ label="PUBLISHER" ] "section0/cr8i/subtitle" [ label="SUBTITLE" ] "section0/cr8i/title" [ label="TITLE" ] "section0/cr8i/titleaddon" [ label="TITLEADDON" ] "section0/cr8i/year" [ label="YEAR" ] } subgraph "cluster_section0/cr_m" { fontsize="10"; label="cr_m (BOOK)"; tooltip="cr_m (BOOK)"; fillcolor="#a0d0ff"; "section0/cr_m/editor" [ label="EDITOR" ] "section0/cr_m/publisher" [ label="PUBLISHER" ] "section0/cr_m/title" [ label="TITLE" ] "section0/cr_m/year" [ label="YEAR" ] } subgraph "cluster_section0/crn" { fontsize="10"; label="crn (BOOK)"; tooltip="crn (BOOK)"; fillcolor="#deefff"; "section0/crn/editor" [ label="EDITOR" ] "section0/crn/publisher" [ label="PUBLISHER" ] "section0/crn/title" [ label="TITLE" ] "section0/crn/year" [ label="YEAR" ] } subgraph "cluster_section0/crt" { fontsize="10"; label="crt (BOOK)"; tooltip="crt (BOOK)"; fillcolor="#a0d0ff"; "section0/crt/editor" [ label="EDITOR" ] "section0/crt/publisher" [ label="PUBLISHER" ] "section0/crt/title" [ label="TITLE" ] "section0/crt/year" [ label="YEAR" ] } subgraph "cluster_section0/macmillan" { fontsize="10"; label="macmillan (XDATA)"; tooltip="macmillan (XDATA)"; fillcolor="#deefff"; "section0/macmillan/location" [ label="LOCATION" ] "section0/macmillan/note" [ label="NOTE" ] "section0/macmillan/publisher" [ label="PUBLISHER" ] "section0/macmillan/xdata" [ label="XDATA" ] } subgraph "cluster_section0/macmillan:loc" { fontsize="10"; label="macmillan:loc (XDATA)"; tooltip="macmillan:loc (XDATA)"; fillcolor="#deefff"; "section0/macmillan:loc/location" [ label="LOCATION" ] "section0/macmillan:loc/note" [ label="NOTE" ] } subgraph "cluster_section0/macmillan:pub" { fontsize="10"; label="macmillan:pub (XDATA)"; tooltip="macmillan:pub (XDATA)"; fillcolor="#deefff"; "section0/macmillan:pub/publisher" [ label="PUBLISHER" ] } subgraph "cluster_section0/mcr" { fontsize="10"; label="mcr (INBOOK)"; tooltip="mcr (INBOOK)"; fillcolor="#a0d0ff"; "section0/mcr/author" [ label="AUTHOR" ] "section0/mcr/origyear" [ label="ORIGYEAR" ] "section0/mcr/title" [ label="TITLE" ] } subgraph "cluster_section0/mxr" { fontsize="10"; label="mxr (INBOOK)"; tooltip="mxr (INBOOK)"; fillcolor="#a0d0ff"; "section0/mxr/author" [ label="AUTHOR" ] "section0/mxr/origyear" [ label="ORIGYEAR" ] "section0/mxr/title" [ label="TITLE" ] } subgraph "cluster_section0/r1" { fontsize="10"; label="r1 (BOOK)"; tooltip="r1 (BOOK)"; fillcolor="#a0d0ff"; "section0/r1/crossref" [ label="CROSSREF" ] "section0/r1/year" [ label="YEAR" ] } subgraph "cluster_section0/r2" { fontsize="10"; label="r2 (BOOK)"; tooltip="r2 (BOOK)"; fillcolor="#deefff"; "section0/r2/crossref" [ label="CROSSREF" ] "section0/r2/year" [ label="YEAR" ] } subgraph "cluster_section0/r3" { fontsize="10"; label="r3 (BOOK)"; tooltip="r3 (BOOK)"; fillcolor="#deefff"; "section0/r3/crossref" [ label="CROSSREF" ] "section0/r3/year" [ label="YEAR" ] } subgraph "cluster_section0/r4" { fontsize="10"; label="r4 (BOOK)"; tooltip="r4 (BOOK)"; fillcolor="#deefff"; "section0/r4/year" [ label="YEAR" ] } subgraph "cluster_section0/xd1" { fontsize="10"; label="xd1 (BOOK)"; tooltip="xd1 (BOOK)"; fillcolor="#a0d0ff"; "section0/xd1/author" [ label="AUTHOR" ] "section0/xd1/location" [ label="LOCATION" ] "section0/xd1/note" [ label="NOTE" ] "section0/xd1/publisher" [ label="PUBLISHER" ] "section0/xd1/xdata" [ label="XDATA" ] "section0/xd1/year" [ label="YEAR" ] } subgraph "cluster_section0/xd2" { fontsize="10"; label="xd2 (BOOK)"; tooltip="xd2 (BOOK)"; fillcolor="#a0d0ff"; "section0/xd2/author" [ label="AUTHOR" ] "section0/xd2/location" [ label="LOCATION" ] "section0/xd2/note" [ label="NOTE" ] "section0/xd2/publisher" [ label="PUBLISHER" ] "section0/xd2/xdata" [ label="XDATA" ] "section0/xd2/year" [ label="YEAR" ] } subgraph "cluster_section0/xr1" { fontsize="10"; label="xr1 (INBOOK)"; tooltip="xr1 (INBOOK)"; fillcolor="#a0d0ff"; "section0/xr1/author" [ label="AUTHOR" ] "section0/xr1/origyear" [ label="ORIGYEAR" ] "section0/xr1/title" [ label="TITLE" ] "section0/xr1/xref" [ label="XREF" ] } subgraph "cluster_section0/xr2" { fontsize="10"; label="xr2 (INBOOK)"; tooltip="xr2 (INBOOK)"; fillcolor="#a0d0ff"; "section0/xr2/author" [ label="AUTHOR" ] "section0/xr2/origyear" [ label="ORIGYEAR" ] "section0/xr2/title" [ label="TITLE" ] "section0/xr2/xref" [ label="XREF" ] } subgraph "cluster_section0/xr3" { fontsize="10"; label="xr3 (INBOOK)"; tooltip="xr3 (INBOOK)"; fillcolor="#a0d0ff"; "section0/xr3/author" [ label="AUTHOR" ] "section0/xr3/origyear" [ label="ORIGYEAR" ] "section0/xr3/title" [ label="TITLE" ] "section0/xr3/xref" [ label="XREF" ] } subgraph "cluster_section0/xr4" { fontsize="10"; label="xr4 (INBOOK)"; tooltip="xr4 (INBOOK)"; fillcolor="#a0d0ff"; "section0/xr4/author" [ label="AUTHOR" ] "section0/xr4/origyear" [ label="ORIGYEAR" ] "section0/xr4/title" [ label="TITLE" ] "section0/xr4/xref" [ label="XREF" ] } subgraph "cluster_section0/xrm" { fontsize="10"; label="xrm (BOOK)"; tooltip="xrm (BOOK)"; fillcolor="#a0d0ff"; "section0/xrm/editor" [ label="EDITOR" ] "section0/xrm/publisher" [ label="PUBLISHER" ] "section0/xrm/title" [ label="TITLE" ] "section0/xrm/year" [ label="YEAR" ] } subgraph "cluster_section0/xrn" { fontsize="10"; label="xrn (BOOK)"; tooltip="xrn (BOOK)"; fillcolor="#deefff"; "section0/xrn/editor" [ label="EDITOR" ] "section0/xrn/publisher" [ label="PUBLISHER" ] "section0/xrn/title" [ label="TITLE" ] "section0/xrn/year" [ label="YEAR" ] } subgraph "cluster_section0/xrt" { fontsize="10"; label="xrt (BOOK)"; tooltip="xrt (BOOK)"; fillcolor="#a0d0ff"; "section0/xrt/editor" [ label="EDITOR" ] "section0/xrt/publisher" [ label="PUBLISHER" ] "section0/xrt/title" [ label="TITLE" ] "section0/xrt/year" [ label="YEAR" ] } } subgraph "cluster_section1" { label="Section 1"; tooltip="Section 1"; fontsize="10"; fontname=serif; fillcolor="#fce3fa"; subgraph "cluster_section1/3a6f1c6ad3f4a50f6687398580c09c7a" { fontsize="10"; label="3a6f1c6ad3f4a50f6687398580c09c7a (INBOOK)"; tooltip="3a6f1c6ad3f4a50f6687398580c09c7a (INBOOK)"; fillcolor="#a0d0ff"; "section1/3a6f1c6ad3f4a50f6687398580c09c7a/author" [ label="AUTHOR" ] "section1/3a6f1c6ad3f4a50f6687398580c09c7a/booktitle" [ label="BOOKTITLE" ] "section1/3a6f1c6ad3f4a50f6687398580c09c7a/location" [ label="LOCATION" ] "section1/3a6f1c6ad3f4a50f6687398580c09c7a/options" [ label="OPTIONS" ] "section1/3a6f1c6ad3f4a50f6687398580c09c7a/pages" [ label="PAGES" ] "section1/3a6f1c6ad3f4a50f6687398580c09c7a/publisher" [ label="PUBLISHER" ] "section1/3a6f1c6ad3f4a50f6687398580c09c7a/shorthand" [ label="SHORTHAND" ] "section1/3a6f1c6ad3f4a50f6687398580c09c7a/title" [ label="TITLE" ] "section1/3a6f1c6ad3f4a50f6687398580c09c7a/year" [ label="YEAR" ] } subgraph "cluster_section1/6f2d1cf3ca5bbe106109b92ffe78e890" { fontsize="10"; label="6f2d1cf3ca5bbe106109b92ffe78e890 (INBOOK)"; tooltip="6f2d1cf3ca5bbe106109b92ffe78e890 (INBOOK)"; fillcolor="#a0d0ff"; "section1/6f2d1cf3ca5bbe106109b92ffe78e890/author" [ label="AUTHOR" ] "section1/6f2d1cf3ca5bbe106109b92ffe78e890/booktitle" [ label="BOOKTITLE" ] "section1/6f2d1cf3ca5bbe106109b92ffe78e890/location" [ label="LOCATION" ] "section1/6f2d1cf3ca5bbe106109b92ffe78e890/options" [ label="OPTIONS" ] "section1/6f2d1cf3ca5bbe106109b92ffe78e890/pages" [ label="PAGES" ] "section1/6f2d1cf3ca5bbe106109b92ffe78e890/publisher" [ label="PUBLISHER" ] "section1/6f2d1cf3ca5bbe106109b92ffe78e890/related" [ label="RELATED" ] "section1/6f2d1cf3ca5bbe106109b92ffe78e890/relatedstring" [ label="RELATEDSTRING" ] "section1/6f2d1cf3ca5bbe106109b92ffe78e890/relatedtype" [ label="RELATEDTYPE" ] "section1/6f2d1cf3ca5bbe106109b92ffe78e890/shorthand" [ label="SHORTHAND" ] "section1/6f2d1cf3ca5bbe106109b92ffe78e890/title" [ label="TITLE" ] "section1/6f2d1cf3ca5bbe106109b92ffe78e890/year" [ label="YEAR" ] } subgraph "cluster_section1/8c785927ea6e2b441c387b1610e7c4b3" { fontsize="10"; label="8c785927ea6e2b441c387b1610e7c4b3 (ARTICLE)"; tooltip="8c785927ea6e2b441c387b1610e7c4b3 (ARTICLE)"; fillcolor="#a0d0ff"; "section1/8c785927ea6e2b441c387b1610e7c4b3/author" [ label="AUTHOR" ] "section1/8c785927ea6e2b441c387b1610e7c4b3/journaltitle" [ label="JOURNALTITLE" ] "section1/8c785927ea6e2b441c387b1610e7c4b3/number" [ label="NUMBER" ] "section1/8c785927ea6e2b441c387b1610e7c4b3/options" [ label="OPTIONS" ] "section1/8c785927ea6e2b441c387b1610e7c4b3/pages" [ label="PAGES" ] "section1/8c785927ea6e2b441c387b1610e7c4b3/related" [ label="RELATED" ] "section1/8c785927ea6e2b441c387b1610e7c4b3/relatedtype" [ label="RELATEDTYPE" ] "section1/8c785927ea6e2b441c387b1610e7c4b3/shorthand" [ label="SHORTHAND" ] "section1/8c785927ea6e2b441c387b1610e7c4b3/title" [ label="TITLE" ] "section1/8c785927ea6e2b441c387b1610e7c4b3/volume" [ label="VOLUME" ] "section1/8c785927ea6e2b441c387b1610e7c4b3/year" [ label="YEAR" ] } subgraph "cluster_1/set_DynSet" { label="DynSet (SET)"; tooltip="DynSet (SET)"; fontsize="10"; fontname=serif; fillcolor="#e3dadc"; subgraph "cluster_section1/Dynamic1" { fontsize="10"; label="Dynamic1 (BOOK)"; tooltip="Dynamic1 (BOOK)"; fillcolor="#a0d0ff"; "section1/Dynamic1/annotation" [ label="ANNOTATION" ] "section1/Dynamic1/author" [ label="AUTHOR" ] "section1/Dynamic1/shorthand" [ label="SHORTHAND" ] "section1/Dynamic1/title" [ label="TITLE" ] "section1/Dynamic1/year" [ label="YEAR" ] } } subgraph "cluster_1/set_DynSet" { label="DynSet (SET)"; tooltip="DynSet (SET)"; fontsize="10"; fontname=serif; fillcolor="#e3dadc"; subgraph "cluster_section1/Dynamic2" { fontsize="10"; label="Dynamic2 (BOOK)"; tooltip="Dynamic2 (BOOK)"; fillcolor="#a0d0ff"; "section1/Dynamic2/author" [ label="AUTHOR" ] "section1/Dynamic2/shorthand" [ label="SHORTHAND" ] "section1/Dynamic2/title" [ label="TITLE" ] "section1/Dynamic2/year" [ label="YEAR" ] } } subgraph "cluster_1/set_DynSet" { label="DynSet (SET)"; tooltip="DynSet (SET)"; fontsize="10"; fontname=serif; fillcolor="#e3dadc"; subgraph "cluster_section1/Dynamic3" { fontsize="10"; label="Dynamic3 (INBOOK)"; tooltip="Dynamic3 (INBOOK)"; fillcolor="#a0d0ff"; "section1/Dynamic3/author" [ label="AUTHOR" ] "section1/Dynamic3/bookauthor" [ label="BOOKAUTHOR" ] "section1/Dynamic3/booktitle" [ label="BOOKTITLE" ] "section1/Dynamic3/crossref" [ label="CROSSREF" ] "section1/Dynamic3/title" [ label="TITLE" ] "section1/Dynamic3/year" [ label="YEAR" ] } } subgraph "cluster_1/set_Static1" { label="Static1 (SET)"; tooltip="Static1 (SET)"; fontsize="10"; fontname=serif; fillcolor="#e3dadc"; subgraph "cluster_section1/Static2" { fontsize="10"; label="Static2 (BOOK)"; tooltip="Static2 (BOOK)"; fillcolor="#a0d0ff"; "section1/Static2/annotation" [ label="ANNOTATION" ] "section1/Static2/author" [ label="AUTHOR" ] "section1/Static2/title" [ label="TITLE" ] "section1/Static2/year" [ label="YEAR" ] } } subgraph "cluster_1/set_Static1" { label="Static1 (SET)"; tooltip="Static1 (SET)"; fontsize="10"; fontname=serif; fillcolor="#e3dadc"; subgraph "cluster_section1/Static3" { fontsize="10"; label="Static3 (BOOK)"; tooltip="Static3 (BOOK)"; fillcolor="#a0d0ff"; "section1/Static3/author" [ label="AUTHOR" ] "section1/Static3/title" [ label="TITLE" ] "section1/Static3/year" [ label="YEAR" ] } } subgraph "cluster_1/set_Static1" { label="Static1 (SET)"; tooltip="Static1 (SET)"; fontsize="10"; fontname=serif; fillcolor="#e3dadc"; subgraph "cluster_section1/Static4" { fontsize="10"; label="Static4 (INBOOK)"; tooltip="Static4 (INBOOK)"; fillcolor="#a0d0ff"; "section1/Static4/author" [ label="AUTHOR" ] "section1/Static4/bookauthor" [ label="BOOKAUTHOR" ] "section1/Static4/booktitle" [ label="BOOKTITLE" ] "section1/Static4/crossref" [ label="CROSSREF" ] "section1/Static4/title" [ label="TITLE" ] "section1/Static4/year" [ label="YEAR" ] } } subgraph "cluster_section1/c5f75a1df9f125e4e7fe7e342e355077" { fontsize="10"; label="c5f75a1df9f125e4e7fe7e342e355077 (INBOOK)"; tooltip="c5f75a1df9f125e4e7fe7e342e355077 (INBOOK)"; fillcolor="#a0d0ff"; "section1/c5f75a1df9f125e4e7fe7e342e355077/author" [ label="AUTHOR" ] "section1/c5f75a1df9f125e4e7fe7e342e355077/booktitle" [ label="BOOKTITLE" ] "section1/c5f75a1df9f125e4e7fe7e342e355077/location" [ label="LOCATION" ] "section1/c5f75a1df9f125e4e7fe7e342e355077/options" [ label="OPTIONS" ] "section1/c5f75a1df9f125e4e7fe7e342e355077/pages" [ label="PAGES" ] "section1/c5f75a1df9f125e4e7fe7e342e355077/publisher" [ label="PUBLISHER" ] "section1/c5f75a1df9f125e4e7fe7e342e355077/related" [ label="RELATED" ] "section1/c5f75a1df9f125e4e7fe7e342e355077/relatedstring" [ label="RELATEDSTRING" ] "section1/c5f75a1df9f125e4e7fe7e342e355077/relatedtype" [ label="RELATEDTYPE" ] "section1/c5f75a1df9f125e4e7fe7e342e355077/shorthand" [ label="SHORTHAND" ] "section1/c5f75a1df9f125e4e7fe7e342e355077/title" [ label="TITLE" ] "section1/c5f75a1df9f125e4e7fe7e342e355077/year" [ label="YEAR" ] } subgraph "cluster_section1/cr5" { fontsize="10"; label="cr5 (INBOOK)"; tooltip="cr5 (INBOOK)"; fillcolor="#a0d0ff"; "section1/cr5/author" [ label="AUTHOR" ] "section1/cr5/booktitle" [ label="BOOKTITLE" ] "section1/cr5/crossref" [ label="CROSSREF" ] "section1/cr5/editor" [ label="EDITOR" ] "section1/cr5/origyear" [ label="ORIGYEAR" ] "section1/cr5/publisher" [ label="PUBLISHER" ] "section1/cr5/title" [ label="TITLE" ] "section1/cr5/year" [ label="YEAR" ] } subgraph "cluster_section1/crn" { fontsize="10"; label="crn (BOOK)"; tooltip="crn (BOOK)"; fillcolor="#deefff"; "section1/crn/editor" [ label="EDITOR" ] "section1/crn/publisher" [ label="PUBLISHER" ] "section1/crn/title" [ label="TITLE" ] "section1/crn/year" [ label="YEAR" ] } subgraph "cluster_section1/rel1" { fontsize="10"; label="rel1 (ARTICLE)"; tooltip="rel1 (ARTICLE)"; fillcolor="#a0d0ff"; "section1/rel1/author" [ label="AUTHOR" ] "section1/rel1/journaltitle" [ label="JOURNALTITLE" ] "section1/rel1/number" [ label="NUMBER" ] "section1/rel1/pages" [ label="PAGES" ] "section1/rel1/related" [ label="RELATED" ] "section1/rel1/relatedtype" [ label="RELATEDTYPE" ] "section1/rel1/shorthand" [ label="SHORTHAND" ] "section1/rel1/title" [ label="TITLE" ] "section1/rel1/volume" [ label="VOLUME" ] "section1/rel1/year" [ label="YEAR" ] } subgraph "cluster_section1/rel2" { fontsize="10"; label="rel2 (INBOOK)"; tooltip="rel2 (INBOOK)"; fillcolor="#a0d0ff"; "section1/rel2/author" [ label="AUTHOR" ] "section1/rel2/booktitle" [ label="BOOKTITLE" ] "section1/rel2/location" [ label="LOCATION" ] "section1/rel2/pages" [ label="PAGES" ] "section1/rel2/publisher" [ label="PUBLISHER" ] "section1/rel2/related" [ label="RELATED" ] "section1/rel2/relatedstring" [ label="RELATEDSTRING" ] "section1/rel2/relatedtype" [ label="RELATEDTYPE" ] "section1/rel2/shorthand" [ label="SHORTHAND" ] "section1/rel2/title" [ label="TITLE" ] "section1/rel2/year" [ label="YEAR" ] } subgraph "cluster_section1/rel3" { fontsize="10"; label="rel3 (INBOOK)"; tooltip="rel3 (INBOOK)"; fillcolor="#a0d0ff"; "section1/rel3/author" [ label="AUTHOR" ] "section1/rel3/booktitle" [ label="BOOKTITLE" ] "section1/rel3/location" [ label="LOCATION" ] "section1/rel3/pages" [ label="PAGES" ] "section1/rel3/publisher" [ label="PUBLISHER" ] "section1/rel3/related" [ label="RELATED" ] "section1/rel3/relatedstring" [ label="RELATEDSTRING" ] "section1/rel3/relatedtype" [ label="RELATEDTYPE" ] "section1/rel3/shorthand" [ label="SHORTHAND" ] "section1/rel3/title" [ label="TITLE" ] "section1/rel3/year" [ label="YEAR" ] } subgraph "cluster_section1/rel4" { fontsize="10"; label="rel4 (INBOOK)"; tooltip="rel4 (INBOOK)"; fillcolor="#deefff"; "section1/rel4/author" [ label="AUTHOR" ] "section1/rel4/booktitle" [ label="BOOKTITLE" ] "section1/rel4/location" [ label="LOCATION" ] "section1/rel4/pages" [ label="PAGES" ] "section1/rel4/publisher" [ label="PUBLISHER" ] "section1/rel4/shorthand" [ label="SHORTHAND" ] "section1/rel4/title" [ label="TITLE" ] "section1/rel4/year" [ label="YEAR" ] } } "section0/ccr1/author" -> "section0/ccr2/author" [ penwidth="2.0", color="#7d7879", tooltip="ccr2/AUTHOR inherited via CROSSREF from ccr1/AUTHOR" ] "section0/ccr1/editor" -> "section0/ccr2/editor" [ penwidth="2.0", color="#7d7879", tooltip="ccr2/EDITOR inherited via CROSSREF from ccr1/EDITOR" ] "section0/ccr1/title" -> "section0/ccr2/maintitle" [ penwidth="2.0", color="#7d7879", tooltip="ccr2/MAINTITLE inherited via CROSSREF from ccr1/TITLE" ] "section0/ccr2/author" -> "section0/ccr3/author" [ penwidth="2.0", color="#7d7879", tooltip="ccr3/AUTHOR inherited via CROSSREF from ccr2/AUTHOR" ] "section0/ccr2/author" -> "section0/ccr3/bookauthor" [ penwidth="2.0", color="#7d7879", tooltip="ccr3/BOOKAUTHOR inherited via CROSSREF from ccr2/AUTHOR" ] "section0/ccr2/editor" -> "section0/ccr3/editor" [ penwidth="2.0", color="#7d7879", tooltip="ccr3/EDITOR inherited via CROSSREF from ccr2/EDITOR" ] "section0/ccr2/maintitle" -> "section0/ccr3/maintitle" [ penwidth="2.0", color="#7d7879", tooltip="ccr3/MAINTITLE inherited via CROSSREF from ccr2/MAINTITLE" ] "section0/ccr2/title" -> "section0/ccr3/booktitle" [ penwidth="2.0", color="#7d7879", tooltip="ccr3/BOOKTITLE inherited via CROSSREF from ccr2/TITLE" ] "section0/cr6i/editor" -> "section0/cr6/editor" [ penwidth="2.0", color="#7d7879", tooltip="cr6/EDITOR inherited via CROSSREF from cr6i/EDITOR" ] "section0/cr6i/eventday" -> "section0/cr6/eventday" [ penwidth="2.0", color="#7d7879", tooltip="cr6/EVENTDAY inherited via CROSSREF from cr6i/EVENTDAY" ] "section0/cr6i/eventendday" -> "section0/cr6/eventendday" [ penwidth="2.0", color="#7d7879", tooltip="cr6/EVENTENDDAY inherited via CROSSREF from cr6i/EVENTENDDAY" ] "section0/cr6i/eventendmonth" -> "section0/cr6/eventendmonth" [ penwidth="2.0", color="#7d7879", tooltip="cr6/EVENTENDMONTH inherited via CROSSREF from cr6i/EVENTENDMONTH" ] "section0/cr6i/eventendyear" -> "section0/cr6/eventendyear" [ penwidth="2.0", color="#7d7879", tooltip="cr6/EVENTENDYEAR inherited via CROSSREF from cr6i/EVENTENDYEAR" ] "section0/cr6i/eventmonth" -> "section0/cr6/eventmonth" [ penwidth="2.0", color="#7d7879", tooltip="cr6/EVENTMONTH inherited via CROSSREF from cr6i/EVENTMONTH" ] "section0/cr6i/eventtitle" -> "section0/cr6/eventtitle" [ penwidth="2.0", color="#7d7879", tooltip="cr6/EVENTTITLE inherited via CROSSREF from cr6i/EVENTTITLE" ] "section0/cr6i/eventyear" -> "section0/cr6/eventyear" [ penwidth="2.0", color="#7d7879", tooltip="cr6/EVENTYEAR inherited via CROSSREF from cr6i/EVENTYEAR" ] "section0/cr6i/location" -> "section0/cr6/location" [ penwidth="2.0", color="#7d7879", tooltip="cr6/LOCATION inherited via CROSSREF from cr6i/LOCATION" ] "section0/cr6i/publisher" -> "section0/cr6/publisher" [ penwidth="2.0", color="#7d7879", tooltip="cr6/PUBLISHER inherited via CROSSREF from cr6i/PUBLISHER" ] "section0/cr6i/venue" -> "section0/cr6/venue" [ penwidth="2.0", color="#7d7879", tooltip="cr6/VENUE inherited via CROSSREF from cr6i/VENUE" ] "section0/cr7i/author" -> "section0/cr7/bookauthor" [ penwidth="2.0", color="#7d7879", tooltip="cr7/BOOKAUTHOR inherited via CROSSREF from cr7i/AUTHOR" ] "section0/cr7i/publisher" -> "section0/cr7/publisher" [ penwidth="2.0", color="#7d7879", tooltip="cr7/PUBLISHER inherited via CROSSREF from cr7i/PUBLISHER" ] "section0/cr7i/subtitle" -> "section0/cr7/booksubtitle" [ penwidth="2.0", color="#7d7879", tooltip="cr7/BOOKSUBTITLE inherited via CROSSREF from cr7i/SUBTITLE" ] "section0/cr7i/title" -> "section0/cr7/booktitle" [ penwidth="2.0", color="#7d7879", tooltip="cr7/BOOKTITLE inherited via CROSSREF from cr7i/TITLE" ] "section0/cr7i/titleaddon" -> "section0/cr7/booktitleaddon" [ penwidth="2.0", color="#7d7879", tooltip="cr7/BOOKTITLEADDON inherited via CROSSREF from cr7i/TITLEADDON" ] "section0/cr7i/verba" -> "section0/cr7/verba" [ penwidth="2.0", color="#7d7879", tooltip="cr7/VERBA inherited via CROSSREF from cr7i/VERBA" ] "section0/cr8i/editor" -> "section0/cr8/editor" [ penwidth="2.0", color="#7d7879", tooltip="cr8/EDITOR inherited via CROSSREF from cr8i/EDITOR" ] "section0/cr8i/publisher" -> "section0/cr8/publisher" [ penwidth="2.0", color="#7d7879", tooltip="cr8/PUBLISHER inherited via CROSSREF from cr8i/PUBLISHER" ] "section0/cr8i/subtitle" -> "section0/cr8/booksubtitle" [ penwidth="2.0", color="#7d7879", tooltip="cr8/BOOKSUBTITLE inherited via CROSSREF from cr8i/SUBTITLE" ] "section0/cr8i/title" -> "section0/cr8/booktitle" [ penwidth="2.0", color="#7d7879", tooltip="cr8/BOOKTITLE inherited via CROSSREF from cr8i/TITLE" ] "section0/cr8i/titleaddon" -> "section0/cr8/booktitleaddon" [ penwidth="2.0", color="#7d7879", tooltip="cr8/BOOKTITLEADDON inherited via CROSSREF from cr8i/TITLEADDON" ] "section0/cr_m/editor" -> "section0/cr1/editor" [ penwidth="2.0", color="#7d7879", tooltip="cr1/EDITOR inherited via CROSSREF from cr_m/EDITOR" ] "section0/cr_m/editor" -> "section0/cr2/editor" [ penwidth="2.0", color="#7d7879", tooltip="cr2/EDITOR inherited via CROSSREF from cr_m/EDITOR" ] "section0/cr_m/publisher" -> "section0/cr1/publisher" [ penwidth="2.0", color="#7d7879", tooltip="cr1/PUBLISHER inherited via CROSSREF from cr_m/PUBLISHER" ] "section0/cr_m/publisher" -> "section0/cr2/publisher" [ penwidth="2.0", color="#7d7879", tooltip="cr2/PUBLISHER inherited via CROSSREF from cr_m/PUBLISHER" ] "section0/cr_m/title" -> "section0/cr1/booktitle" [ penwidth="2.0", color="#7d7879", tooltip="cr1/BOOKTITLE inherited via CROSSREF from cr_m/TITLE" ] "section0/cr_m/title" -> "section0/cr2/booktitle" [ penwidth="2.0", color="#7d7879", tooltip="cr2/BOOKTITLE inherited via CROSSREF from cr_m/TITLE" ] "section0/cr_m/year" -> "section0/cr1/year" [ penwidth="2.0", color="#7d7879", tooltip="cr1/YEAR inherited via CROSSREF from cr_m/YEAR" ] "section0/cr_m/year" -> "section0/cr2/year" [ penwidth="2.0", color="#7d7879", tooltip="cr2/YEAR inherited via CROSSREF from cr_m/YEAR" ] "section0/crn/editor" -> "section0/cr4/editor" [ penwidth="2.0", color="#7d7879", tooltip="cr4/EDITOR inherited via CROSSREF from crn/EDITOR" ] "section0/crn/publisher" -> "section0/cr4/publisher" [ penwidth="2.0", color="#7d7879", tooltip="cr4/PUBLISHER inherited via CROSSREF from crn/PUBLISHER" ] "section0/crn/title" -> "section0/cr4/booktitle" [ penwidth="2.0", color="#7d7879", tooltip="cr4/BOOKTITLE inherited via CROSSREF from crn/TITLE" ] "section0/crn/year" -> "section0/cr4/year" [ penwidth="2.0", color="#7d7879", tooltip="cr4/YEAR inherited via CROSSREF from crn/YEAR" ] "section0/crt/editor" -> "section0/cr3/editor" [ penwidth="2.0", color="#7d7879", tooltip="cr3/EDITOR inherited via CROSSREF from crt/EDITOR" ] "section0/crt/publisher" -> "section0/cr3/publisher" [ penwidth="2.0", color="#7d7879", tooltip="cr3/PUBLISHER inherited via CROSSREF from crt/PUBLISHER" ] "section0/crt/title" -> "section0/cr3/booktitle" [ penwidth="2.0", color="#7d7879", tooltip="cr3/BOOKTITLE inherited via CROSSREF from crt/TITLE" ] "section0/crt/year" -> "section0/cr3/year" [ penwidth="2.0", color="#7d7879", tooltip="cr3/YEAR inherited via CROSSREF from crt/YEAR" ] "section0/macmillan/location" -> "section0/xd1/location" [ penwidth="2.0", color="#2ca314", tooltip="xd1/LOCATION inherited via XDATA from macmillan/LOCATION" ] "section0/macmillan/note" -> "section0/xd1/note" [ penwidth="2.0", color="#2ca314", tooltip="xd1/NOTE inherited via XDATA from macmillan/NOTE" ] "section0/macmillan/publisher" -> "section0/xd1/publisher" [ penwidth="2.0", color="#2ca314", tooltip="xd1/PUBLISHER inherited via XDATA from macmillan/PUBLISHER" ] "section0/macmillan/xdata" -> "section0/xd1/xdata" [ penwidth="2.0", color="#2ca314", tooltip="xd1/XDATA inherited via XDATA from macmillan/XDATA" ] "section0/macmillan:loc/location" -> "section0/macmillan/location" [ penwidth="2.0", color="#2ca314", tooltip="macmillan/LOCATION inherited via XDATA from macmillan:loc/LOCATION" ] "section0/macmillan:loc/location" -> "section0/xd2/location" [ penwidth="2.0", color="#2ca314", tooltip="xd2/LOCATION inherited via XDATA from macmillan:loc/LOCATION" ] "section0/macmillan:loc/note" -> "section0/macmillan/note" [ penwidth="2.0", color="#2ca314", tooltip="macmillan/NOTE inherited via XDATA from macmillan:loc/NOTE" ] "section0/macmillan:loc/note" -> "section0/xd2/note" [ penwidth="2.0", color="#2ca314", tooltip="xd2/NOTE inherited via XDATA from macmillan:loc/NOTE" ] "section0/macmillan:pub/publisher" -> "section0/macmillan/publisher" [ penwidth="2.0", color="#2ca314", tooltip="macmillan/PUBLISHER inherited via XDATA from macmillan:pub/PUBLISHER" ] "section0/xr1/title" -> "section0/xrm/title" [ penwidth="2.0", style="dashed", color="#7d7879", ltail="cluster_section0/xr1", lhead="cluster_section0/xrm", tooltip="xr1 XREFS xrm" ] "section0/xr2/title" -> "section0/xrm/title" [ penwidth="2.0", style="dashed", color="#7d7879", ltail="cluster_section0/xr2", lhead="cluster_section0/xrm", tooltip="xr2 XREFS xrm" ] "section0/xr3/title" -> "section0/xrt/title" [ penwidth="2.0", style="dashed", color="#7d7879", ltail="cluster_section0/xr3", lhead="cluster_section0/xrt", tooltip="xr3 XREFS xrt" ] "section0/xr4/title" -> "section0/xrn/title" [ penwidth="2.0", style="dashed", color="#7d7879", ltail="cluster_section0/xr4", lhead="cluster_section0/xrn", tooltip="xr4 XREFS xrn" ] "section1/Dynamic2/author" -> "section1/Dynamic3/bookauthor" [ penwidth="2.0", color="#7d7879", tooltip="Dynamic3/BOOKAUTHOR inherited via CROSSREF from Dynamic2/AUTHOR" ] "section1/Dynamic2/author" -> "section1/Static4/bookauthor" [ penwidth="2.0", color="#7d7879", tooltip="Static4/BOOKAUTHOR inherited via CROSSREF from Dynamic2/AUTHOR" ] "section1/Dynamic2/title" -> "section1/Dynamic3/booktitle" [ penwidth="2.0", color="#7d7879", tooltip="Dynamic3/BOOKTITLE inherited via CROSSREF from Dynamic2/TITLE" ] "section1/Dynamic2/title" -> "section1/Static4/booktitle" [ penwidth="2.0", color="#7d7879", tooltip="Static4/BOOKTITLE inherited via CROSSREF from Dynamic2/TITLE" ] "section1/crn/editor" -> "section1/cr5/editor" [ penwidth="2.0", color="#7d7879", tooltip="cr5/EDITOR inherited via CROSSREF from crn/EDITOR" ] "section1/crn/publisher" -> "section1/cr5/publisher" [ penwidth="2.0", color="#7d7879", tooltip="cr5/PUBLISHER inherited via CROSSREF from crn/PUBLISHER" ] "section1/crn/title" -> "section1/cr5/booktitle" [ penwidth="2.0", color="#7d7879", tooltip="cr5/BOOKTITLE inherited via CROSSREF from crn/TITLE" ] "section1/crn/year" -> "section1/cr5/year" [ penwidth="2.0", color="#7d7879", tooltip="cr5/YEAR inherited via CROSSREF from crn/YEAR" ] "section1/3a6f1c6ad3f4a50f6687398580c09c7a/pages" -> "section1/8c785927ea6e2b441c387b1610e7c4b3/related" [ penwidth="2.0", color="#ad1741", ltail="cluster_section1/3a6f1c6ad3f4a50f6687398580c09c7a", lhead="cluster_section1/8c785927ea6e2b441c387b1610e7c4b3", tooltip="3a6f1c6ad3f4a50f6687398580c09c7a is a related entry of 8c785927ea6e2b441c387b1610e7c4b3" ] "section1/3a6f1c6ad3f4a50f6687398580c09c7a/pages" -> "section1/rel1/relatedtype" [ penwidth="2.0", color="#ad1741", ltail="cluster_section1/3a6f1c6ad3f4a50f6687398580c09c7a", lhead="cluster_section1/rel1", tooltip="3a6f1c6ad3f4a50f6687398580c09c7a is a related entry of rel1" ] "section1/6f2d1cf3ca5bbe106109b92ffe78e890/related" -> "section1/8c785927ea6e2b441c387b1610e7c4b3/related" [ penwidth="2.0", color="#ad1741", ltail="cluster_section1/6f2d1cf3ca5bbe106109b92ffe78e890", lhead="cluster_section1/8c785927ea6e2b441c387b1610e7c4b3", tooltip="6f2d1cf3ca5bbe106109b92ffe78e890 is a related entry of 8c785927ea6e2b441c387b1610e7c4b3" ] "section1/6f2d1cf3ca5bbe106109b92ffe78e890/related" -> "section1/rel1/relatedtype" [ penwidth="2.0", color="#ad1741", ltail="cluster_section1/6f2d1cf3ca5bbe106109b92ffe78e890", lhead="cluster_section1/rel1", tooltip="6f2d1cf3ca5bbe106109b92ffe78e890 is a related entry of rel1" ] "section1/8c785927ea6e2b441c387b1610e7c4b3/related" -> "section1/6f2d1cf3ca5bbe106109b92ffe78e890/related" [ penwidth="2.0", color="#ad1741", ltail="cluster_section1/8c785927ea6e2b441c387b1610e7c4b3", lhead="cluster_section1/6f2d1cf3ca5bbe106109b92ffe78e890", tooltip="8c785927ea6e2b441c387b1610e7c4b3 is a related entry of 6f2d1cf3ca5bbe106109b92ffe78e890" ] "section1/8c785927ea6e2b441c387b1610e7c4b3/related" -> "section1/c5f75a1df9f125e4e7fe7e342e355077/related" [ penwidth="2.0", color="#ad1741", ltail="cluster_section1/8c785927ea6e2b441c387b1610e7c4b3", lhead="cluster_section1/c5f75a1df9f125e4e7fe7e342e355077", tooltip="8c785927ea6e2b441c387b1610e7c4b3 is a related entry of c5f75a1df9f125e4e7fe7e342e355077" ] "section1/8c785927ea6e2b441c387b1610e7c4b3/related" -> "section1/rel2/related" [ penwidth="2.0", color="#ad1741", ltail="cluster_section1/8c785927ea6e2b441c387b1610e7c4b3", lhead="cluster_section1/rel2", tooltip="8c785927ea6e2b441c387b1610e7c4b3 is a related entry of rel2" ] "section1/8c785927ea6e2b441c387b1610e7c4b3/related" -> "section1/rel3/related" [ penwidth="2.0", color="#ad1741", ltail="cluster_section1/8c785927ea6e2b441c387b1610e7c4b3", lhead="cluster_section1/rel3", tooltip="8c785927ea6e2b441c387b1610e7c4b3 is a related entry of rel3" ] "section1/c5f75a1df9f125e4e7fe7e342e355077/related" -> "section1/8c785927ea6e2b441c387b1610e7c4b3/related" [ penwidth="2.0", color="#ad1741", ltail="cluster_section1/c5f75a1df9f125e4e7fe7e342e355077", lhead="cluster_section1/8c785927ea6e2b441c387b1610e7c4b3", tooltip="c5f75a1df9f125e4e7fe7e342e355077 is a related entry of 8c785927ea6e2b441c387b1610e7c4b3" ] "section1/c5f75a1df9f125e4e7fe7e342e355077/related" -> "section1/rel1/relatedtype" [ penwidth="2.0", color="#ad1741", ltail="cluster_section1/c5f75a1df9f125e4e7fe7e342e355077", lhead="cluster_section1/rel1", tooltip="c5f75a1df9f125e4e7fe7e342e355077 is a related entry of rel1" ] "section1/rel1/relatedtype" -> "section1/8c785927ea6e2b441c387b1610e7c4b3/related" [ style="dashed", penwidth="2.0", color="#ad1741", ltail="cluster_section1/rel1", lhead="cluster_section1/8c785927ea6e2b441c387b1610e7c4b3", tooltip="8c785927ea6e2b441c387b1610e7c4b3 is a clone of rel1" ] "section1/rel2/related" -> "section1/6f2d1cf3ca5bbe106109b92ffe78e890/related" [ style="dashed", penwidth="2.0", color="#ad1741", ltail="cluster_section1/rel2", lhead="cluster_section1/6f2d1cf3ca5bbe106109b92ffe78e890", tooltip="6f2d1cf3ca5bbe106109b92ffe78e890 is a clone of rel2" ] "section1/rel3/related" -> "section1/c5f75a1df9f125e4e7fe7e342e355077/related" [ style="dashed", penwidth="2.0", color="#ad1741", ltail="cluster_section1/rel3", lhead="cluster_section1/c5f75a1df9f125e4e7fe7e342e355077", tooltip="c5f75a1df9f125e4e7fe7e342e355077 is a clone of rel3" ] "section1/rel4/publisher" -> "section1/3a6f1c6ad3f4a50f6687398580c09c7a/pages" [ style="dashed", penwidth="2.0", color="#ad1741", ltail="cluster_section1/rel4", lhead="cluster_section1/3a6f1c6ad3f4a50f6687398580c09c7a", tooltip="3a6f1c6ad3f4a50f6687398580c09c7a is a clone of rel4" ] } biblatex-biber-2.9/t/tdata/uniqueness4.bib000444000153000001 656413205066061 20151 0ustar00vboxother000000000000% Smith and Smith @ARTICLE{us1, AUTHOR = {John Smith and Bert Smith}, YEAR = {1968} } % Reynolds and Plumb @ARTICLE{us2, AUTHOR = {Bill Reynolds and James Plumb}, YEAR = {1932} } % Plumb and Reynolds @ARTICLE{us3, AUTHOR = {Alan Plumb and Trevor Reynolds}, YEAR = {1945} } % Brown and Heretic @ARTICLE{us4, AUTHOR = {Basil Brown and Helen Heretic}, YEAR = {1984} } % Brown @ARTICLE{us5, AUTHOR = {Mary Brown}, YEAR = {1983} } % Prefect, Mangle and Loon @ARTICLE{us6, AUTHOR = {Peter Prefect and Martin Mangle and Leigh Loon}, YEAR = {1982} } % Prefect and Mangle @ARTICLE{us7, AUTHOR = {Russ Prefect and Graham Mangle}, YEAR = {1989} } % Jingle and Irate @ARTICLE{us8, AUTHOR = {Jeremy Jingle and Otto Irate}, YEAR = {1982} } % Jingle and Montle @ARTICLE{us9, AUTHOR = {Kevin Jingle and Barbara Montle}, YEAR = {1989} } % R. Red and G. Green @ARTICLE{us10, AUTHOR = {Richard Red and Graham Green}, YEAR = {1982} } % V. Red and M. Green @ARTICLE{us11, AUTHOR = {Victor Red and Mark Green}, YEAR = {1989} } % Simon Slip and Brass @ARTICLE{us12, AUTHOR = {Simon Slip and Bertie Brass}, YEAR = {1989} } % Steven Slip and Brass @ARTICLE{us13, AUTHOR = {Steven Slip and Bertie Brass}, YEAR = {1989} } % With maxnames/minnames=3, don't disambiguate the names in these lists as due to the "et al", % the lists are different in themselves % With maxnames=2/minnames=1, the lists are "the same" (Gurgle et al) so do disambiguate the % lists. % With maxnames=3/minnames=1, the lists are different (Gurgle et al, Gurgle, Splonk and Remedial) % so don't disambiguate % lists. % Gurgle, Splonk, Remdial et al @ARTICLE{us14, AUTHOR = {Peter Gurgle and Martin Splonk and Leigh Remedial and Trevor Argue}, YEAR = {1989} } % Gurgle, Splonk and Remedial @ARTICLE{us15, AUTHOR = {Alan Gurgle and Michael Splonk and Leigh Remedial}, YEAR = {1989} } % $ul = 3 and 4 @ARTICLE{us16, AUTHOR = {AAA and BBB and CCC}, YEAR = {1902} } @ARTICLE{us17, AUTHOR = {AAA and BBB and CCC and DDD}, YEAR = {1906} } % $ul = 3 and 4 % AAAA won't be disambiguated since the lists are therefore different @ARTICLE{us18, AUTHOR = {A. AAAA and BBBB and CCCC}, YEAR = {1902} } @ARTICLE{us19, AUTHOR = {B. AAAA and BBBB and CCCC and DDDD}, YEAR = {1906} } @ARTICLE{us20, AUTHOR = {Ulrich Schmitz}, YEAR = {1906} } @ARTICLE{us21, AUTHOR = {Ulrich Schmitz}, YEAR = {1934} } @ARTICLE{us22, AUTHOR = {Brian Cambell and Frank Schmitz}, YEAR = {1936} } @ARTICLE{us23, AUTHOR = {Oliver Oligarch}, YEAR = {1906} } @ARTICLE{us24, AUTHOR = {Otto Oligarch}, YEAR = {1934} } @ARTICLE{us25, AUTHOR = {Ian Ink and Peter Oligarch}, YEAR = {1936} } @ARTICLE{us26, AUTHOR = {Roger Meredith}, YEAR = {1936} } @ARTICLE{us27a, AUTHOR = {Roger Meredith}, YEAR = {1934} } @ARTICLE{us27, AUTHOR = {Alan Meredith}, YEAR = {1936} } @ARTICLE{us28, AUTHOR = {Andrew Meredith}, YEAR = {1936} } @ARTICLE{us29, AUTHOR = {Clive Creation and Peter Patronage}, YEAR = {1936} } @ARTICLE{us29a, AUTHOR = {Clive Creation and Peter Patronage}, YEAR = {1934} } @ARTICLE{us30, AUTHOR = {Liam Creation and Peter Patronage}, YEAR = {1932} } biblatex-biber-2.9/t/tdata/uniqueness3.bib000444000153000001 173713205066061 20145 0ustar00vboxother000000000000@ARTICLE{ey1, AUTHOR = {A. AAA and B. BBB and A. CCC and E. EEE}, TITLE = {Title1}, YEAR = {1968} } @ARTICLE{ey1a, AUTHOR = {A. AAA and B. BBB and A. CCC and E. EEE}, TITLE = {Title1}, YEAR = {1969} } @ARTICLE{ey2, AUTHOR = {A. AAA and B. BBB and A. CCC and D. DDD}, TITLE = {Title2}, YEAR = {1968} } @ARTICLE{ey3, AUTHOR = {A. MMM and B. NNN}, TITLE = {Title3}, YEAR = {1968} } @ARTICLE{ey4, AUTHOR = {A. MMM and B. NNN}, TITLE = {Title4}, YEAR = {1968} } @ARTICLE{ey5, AUTHOR = {Aaa ZZZ and Bbb VVV}, TITLE = {Title3}, YEAR = {1968} } @ARTICLE{ey6, AUTHOR = {Abb ZZZ and Bbb VVV}, TITLE = {Title6}, YEAR = {1968} } @ARTICLE{ey7, TITLE = {Titlea}, YEAR = {1968} } @ARTICLE{ey8, TITLE = {Titlea}, YEAR = {1968} } @ARTICLE{ey9, TITLE = {Titleb}, YEAR = {1968} } biblatex-biber-2.9/t/tdata/set-dynamic.bcf000444000153000001 25051413205066062 20136 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date year julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender sets.bib DynSet * sets.bib Dynamic3 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 citeorder shorthand shorthand biblatex-biber-2.9/t/tdata/encoding3.bcf000444000153000001 24535013205066061 17573 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date year julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 1 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 1 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 1 usetranslator 1 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender encoding3.bib * presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 biblatex-biber-2.9/t/tdata/full-bibtex.bcf000444000153000001 24561413205066062 20143 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 0 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 1 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 1 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 1 usetranslator 1 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender examples.bib westfahl:space kastenholz presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 citeorder biblatex-biber-2.9/t/tdata/full-dot.bib000444000153000001 2036013205066062 17423 0ustar00vboxother000000000000% Testing mincrossrefs. cr1 and cr2 crossrefs should trigger inclusion of cr_m and also % the crossref fields in both of them % Also a test of some aliases @INBOOK{cr1, AUTHOR = {Graham Gullam}, TITLE = {Great and Good Graphs}, ORIGDATE = {1955}, ARCHIVEPREFIX = {SomEPrFiX}, PRIMARYCLASS = {SOMECLASS}, CROSSREF = {cr_m}, IDS = {cr1a1,cr1a2} } @INBOOK{cr2, AUTHOR = {Frederick Fumble}, TITLE = {Fabulous Fourier Forms}, SCHOOL = {School}, INSTITUTION = {Institution}, ORIGDATE = {1943}, CROSSREF = {cr_m} } @BOOK{cr_m, EDITOR = {Edgar Erbriss}, TITLE = {Graphs of the Continent}, PUBLISHER = {Grimble}, YEAR = {1974} } % Testing explicit cite of crossref parent. Should trigger inclusion of child crossref field @INBOOK{cr3, AUTHOR = {Arthur Aptitude}, TITLE = {Arrangements of All Articles}, ORIGDATE = {1934}, ARCHIVEPREFIX = {SomEPrFiX}, EPRINTTYPE = {sometype}, CROSSREF = {crt} } @BOOK{crt, EDITOR = {Mark Monkley}, TITLE = {Beasts of the Burbling Burns}, PUBLISHER = {Rancour}, YEAR = {1996} } % Testing mincrossrefs not reached. cr4 is cited, cr5 isn't, therefore mincrossrefs (2) for % crn not reached @INBOOK{cr4, AUTHOR = {Morris Mumble}, TITLE = {Enterprising Entities}, ORIGDATE = {1911}, CROSSREF = {crn} } @INBOOK{cr5, AUTHOR = {Oliver Ordinary}, TITLE = {Questionable Quidities}, ORIGDATE = {1919}, CROSSREF = {crn} } @BOOK{crn, EDITOR = {Jeremy Jermain}, TITLE = {Vanquished, Victor, Vandal}, PUBLISHER = {Pillsbury}, YEAR = {1945} } % Testing inheritance of event information @PROCEEDINGS{cr6i, AUTHOR = {Spurious Author}, ADDRESS = {Address}, TITLE = {Title of proceeding}, EDITOR = {Editor}, PUBLISHER = {Publisher of proceeding}, EVENTDATE = {2009-08-21/2009-08-24}, EVENTTITLE = {Title of the event}, VENUE = {Location of event}, YEAR = {2009} } @INPROCEEDINGS{cr6, AUTHOR = {Author, Firstname}, CROSSREF = {cr6i}, PAGES = {123--}, TITLE = {Title of inproceeding}, BOOKTITLE = {Manual booktitle}, YEAR = {2009}, } % Testing inheritance of special fields (booktitle, bookauthor etc.) @BOOK{cr7i, AUTHOR = {Brian Bookauthor}, TITLE = {Book Title}, SUBTITLE = {Book Subtitle}, TITLEADDON = {Book Titleaddon}, PUBLISHER = {Publisher of proceeding}, YEAR = {2009}, VERBA = {String}, } @INBOOK{cr7, AUTHOR = {Author, Firstname}, CROSSREF = {cr7i}, PAGES = {123--126}, TITLE = {Title of Book bit}, YEAR = {2010} } % Testing supression of default inheritance @COLLECTION{cr8i, EDITOR = {Brian Editor}, TITLE = {Book Title}, SUBTITLE = {Book Subtitle}, TITLEADDON = {Book Titleaddon}, PUBLISHER = {Publisher of Collection}, YEAR = {2009} } @INCOLLECTION{cr8, AUTHOR = {Smith, Firstname}, CROSSREF = {cr8i}, PAGES = {1--12}, TITLE = {Title of Collection bit}, YEAR = {2010} } % Testing mincrossrefs. xr1 and xr2 xrefs should trigger inclusion of xrm and also % the xreffields in both of them @INBOOK{xr1, AUTHOR = {Zoe Zentrum}, TITLE = {Moods Mildly Modified}, ORIGDATE = {1921}, XREF = {xrm} } @INBOOK{xr2, AUTHOR = {Ian Instant}, TITLE = {Migraines Multiplying Madly}, ORIGDATE = {1926}, XREF = {xrm} } @BOOK{xrm, EDITOR = {Peter Prendergast}, TITLE = {Calligraphy, Calisthenics, Culture}, PUBLISHER = {Mainstream}, YEAR = {1970} } % Testing explicit cite of xref parent. Should trigger inclusion of child xref field @INBOOK{xr3, AUTHOR = {Norman Normal}, TITLE = {Russion Regalia Revisited}, ORIGDATE = {1923}, XREF = {xrt} } @BOOK{xrt, EDITOR = {Lucy Lunders}, TITLE = {Kings, Cork and Calculation}, PUBLISHER = {Middling}, YEAR = {1977} } % Testing mincrossrefs not reached. cr4 is cited, cr5 isn't, therefore mincrossrefs (2) for % crn not reached @INBOOK{xr4, AUTHOR = {Megan Mistrel}, TITLE = {Lumbering Lunatics}, ORIGDATE = {1933}, XREF = {xrn} } @INBOOK{xr5, AUTHOR = {Kenneth Kunrath}, TITLE = {Dreadful Dreary Days}, ORIGDATE = {1900}, XREF = {xrn} } @BOOK{xrn, EDITOR = {Victor Vivacious}, TITLE = {Examples of Excellent Exaggerations}, PUBLISHER = {Oxford}, YEAR = {1935} } % Testing missing xref @INBOOK{mxr, AUTHOR = {Megan Mistrel}, TITLE = {Lumbering Lunatics}, ORIGDATE = {1933}, XREF = {missing1} } % Testing missing crossref @INBOOK{mcr, AUTHOR = {Megan Mistrel}, TITLE = {Lumbering Lunatics}, ORIGDATE = {1933}, CROSSREF = {missing1} } % Testing cascading crossrefs @MVBOOK{ccr1, AUTHOR = {Vince Various}, EDITOR = {Edward Editor}, TITLE = {Stuff Concerning Varia}, DATE = {1934} } @BOOK{ccr2, TITLE = {Misc etc.}, DATE = {1923}, CROSSREF = {ccr1} } @INBOOK{ccr3, TITLE = {Perhaps, Perchance, Possibilities?}, DATE = {1911}, CROSSREF = {ccr2} } % Testing circular refs detection @BOOK{circ1, DATE = {1911}, CROSSREF = {circ3} } @BOOK{circ2, DATE = {1911}, CROSSREF = {circ1} } @BOOK{circ3, DATE = {1911}, CROSSREF = {circ2} } % Test of dependency calculations for non-cited entries @BOOK{r1, DATE = {1911}, CROSSREF = {r2} } @BOOK{r2, DATE = {1911}, CROSSREF = {r3} } @BOOK{r3, DATE = {1911}, CROSSREF = {r4} } @BOOK{r4, DATE = {1911}, } @XDATA{macmillan:pub, PUBLISHER = {Macmillan} } @XDATA{macmillan:loc, LOCATION = {New York and London}, NOTE = {A Note} } @XDATA{macmillan, XDATA = {macmillan:pub, macmillan:loc} } @BOOK{xd1, AUTHOR = {Edward Ellington}, DATE = {2007}, XDATA = {macmillan,missingxd} } @BOOK{xd2, AUTHOR = {Peter Pillington}, DATE = {2003}, PUBLISHER = {Routledge}, XDATA = {macmillan:loc, bltxxd1} } @SET{Static1, ENTRYSET = {Static2, Static3, Static4, missing1}, ANNOTATION = {Some notes} } @BOOK{Static2, AUTHOR = {Brian Bumble}, TITLE = {Blessed Brains}, YEAR = {2001}, ANNOTATION = {Some Blessed Note} } @BOOK{Static3, AUTHOR = {Clive Crenellation}, TITLE = {Castles and Crime}, YEAR = {2002} } @INBOOK{Static4, AUTHOR = {Derek Dingle}, TITLE = {Dungeons, Dark and Dangerous}, YEAR = {2005}, CROSSREF = {Dynamic2} } @BOOK{Dynamic1, AUTHOR = {Derek Dynamism}, TITLE = {Doing Daring Deeds}, YEAR = {2002}, ANNOTATION = {Some Dynamic Note}, SHORTHAND = {d1} } @BOOK{Dynamic2, AUTHOR = {Brian Bunting}, TITLE = {Beautiful Birthdays}, YEAR = {2010}, SHORTHAND = {d2} } @INBOOK{Dynamic3, AUTHOR = {Roger Regardless}, TITLE = {Reckless Ravishings}, YEAR = {2000}, CROSSREF = {Dynamic2} } % Related entry @ARTICLE{rel1, RELATED = {rel2,rel3,rel4}, RELATEDTYPE = {reprintas}, AUTHOR = {Author}, TITLE = {Original Title}, JOURNALTITLE = {Journal Title}, VOLUME = {12}, NUMBER = {5}, DATE = {1998}, PAGES = {125--150}, SHORTHAND = {RK1} } @INBOOK{rel2, RELATED = {rel1}, RELATEDTYPE = {reprintof}, RELATEDSTRING = {First}, AUTHOR = {Author}, TITLE = {Reprint Title}, BOOKTITLE = {Booktitle}, LOCATION = {Location}, PUBLISHER = {Publisher}, DATE = {2009}, PAGES = {34--60}, SHORTHAND = {RK2} } @INBOOK{rel3, RELATED = {rel1}, RELATEDTYPE = {reprintof}, RELATEDSTRING = {Second}, AUTHOR = {Author}, TITLE = {Reprint Title}, BOOKTITLE = {Booktitle}, LOCATION = {Location}, PUBLISHER = {Publisher2}, DATE = {2010}, PAGES = {33--57}, SHORTHAND = {RK3} } @INBOOK{rel4, AUTHOR = {Author}, TITLE = {Reprint Title}, BOOKTITLE = {Booktitle}, LOCATION = {Location}, PUBLISHER = {Publisher2}, DATE = {2011}, PAGES = {33--57}, SHORTHAND = {RK4} } biblatex-biber-2.9/t/tdata/sections1.bib000444000153000001 154313205066061 17566 0ustar00vboxother000000000000@PREAMBLE{"Štring for Preamble 1"} @STRING{STRING1 = {value1}} @ARTICLE{sect1, SHORTHAND = {AA}, AUTHOR = {Aaron Adamson}, TITLE = {Artificial Advice}, PUBLISHER = {Aardvark Press}, LOCATION = {Arlington}, VOLUME = {4}, YEAR = {1995}, NOTE = STRING1 } @ARTICLE{sect2, SHORTHAND = {BB}, AUTHOR = {Brian Britherthwaite}, TITLE = {Best Barnacled Boat Bottoms}, PUBLISHER = {British Bulldog Press}, LOCATION = {Bridlington}, YEAR = {2004}, } @ARTICLE{sectall1, AUTHOR = {Alan All}, TITLE = {Alternative Alternations}, PUBLISHER = {Average Aunt Press}, LOCATION = {Allertron}, YEAR = {2004}, } @PREAMBLE{"String for Preamble 2"}biblatex-biber-2.9/t/tdata/set-static.bcf000444000153000001 24712613205066062 20006 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date year julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 1 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender sets.bib Static2 Static1 sets.bib Static2 Static3 Static4 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 citeorder biblatex-biber-2.9/t/tdata/names.bib000444000153000001 526513205066062 16767 0ustar00vboxother000000000000@BOOK{L1, AUTHOR = {Alfred Adler}, } @BOOK{L2, AUTHOR = {Bertie B. Bull}, } @BOOK{L3, AUTHOR = {C. Z. Crop}, } @BOOK{L4, AUTHOR = {Derek D Decket}, } @BOOK{L5, AUTHOR = {Egbert von Eel}, } @BOOK{L6, AUTHOR = {Francis van der valt Frome}, } @BOOK{L7, AUTHOR = {Gregory R. van Gloom}, } @BOOK{L8, AUTHOR = {Henry F. van Henkel}, } @BOOK{L9, AUTHOR = {Ian {Iliad Ipswich}}, } @BOOK{L10, AUTHOR = {Jolly, III, James}, } @BOOK{L10a, AUTHOR = {Pimentel, Jr. ,Joseph J.}, } @BOOK{L11, AUTHOR = {van Kluster, Jr., Kevin}, } @BOOK{L12, AUTHOR = {Charles Louis Xavier Joseph de la Vall{\'e}e Poussin} } @BOOK{L13, AUTHOR = {Van de Graaff, R. J.} } @BOOK{L14, AUTHOR = {St John-Mollusc, Oliver} } @BOOK{L15, AUTHOR = {Roger P.{\,}G. van Gompel} } @BOOK{L16, AUTHOR = {Roger {P.\,G.} van Gompel} } @BOOK{L17, AUTHOR = {Lovecraft, Bill H.{\,}P.}, } @BOOK{L18, AUTHOR = {Lovecraft, Bill {H.\,P.}}, } @BOOK{L19, AUTHOR = {Mustermann, Klaus-Peter}, } @BOOK{L19a, AUTHOR = {Lam, Ho-Pun}, } @BOOK{L20, AUTHOR = {{John Henry} Ford}, } @BOOK{L21, AUTHOR = {{\v S}omeone Smith}, } @BOOK{L22, AUTHOR = {Someone {\v S}mith}, } @BOOK{L23, AUTHOR = {Šomeone Smith}, } @BOOK{L24, AUTHOR = {Someone Šmith}, } @BOOK{L25, AUTHOR = {{American Psychological Association, Task Force on the Sexualization of Girls}}, } @BOOK{L26, AUTHOR = {{Sci-Art Publishers}} } % Should skip the first name as it has too many commas @BOOK{L27, AUTHOR = {Smith, Jr., Bill, Lee und James Smith} } % This causes Text::BibTeX <=0.4 to segfault @BOOK{L28, AUTHOR = {Deux et al.,, O.} } % Should be ok as escaped. Text::BibTeX < 0.41 has a bug however and replaces % the third comma with a space. @BOOK{L29, AUTHOR = {{U.S. Department of Health and Human Services, National Institute of Mental Health, National Heart, Lung and Blood Institute}} } % The protected {M} causes problems for the btparse library so we strip this in biber @BOOK{L30, AUTHOR = {E. S. El-{M}allah} } % Make sure when we replace ties, we don't accidentally strip this ... @BOOK{L31, AUTHOR = {{\~ Z}elly, Arthur}, EDITOR = {{\~Z}elly, Arthur}, TRANSLATOR = {{\~{Z}}elly, Arthur} } % Checking visibility of "and others" (with custom "and" and "others") @BOOK{V1, AUTHOR = {Alan Author und Steven Secondauthor und andere}, } @BOOK{V2, AUTHOR = {Alan Author und andere}, } % Checking uniqueprimaryauthor @BOOK{upa1, AUTHOR = {Alan Miffed and Russel Beast} } @BOOK{upa2, AUTHOR = {Russel Beast and Alan Miffed} } @BOOK{upa3, AUTHOR = {Russel Beast and Brian Scorched} } @BOOK{upa4, AUTHOR = {Deutsch, J. Anthony and Deutsch, Diana}, } biblatex-biber-2.9/t/tdata/encoding4.bcf000444000153000001 24544213205066061 17576 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date year julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 1 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 1 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 1 usetranslator 1 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker datezeros autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender encoding4.bib * presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 biblatex-biber-2.9/t/tdata/sections.bcf000444000153000001 26062213205066062 17551 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 labelnamespec shorteditor editor translator useeditor 0 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender sections1.bib sections2.bib sect1 sect2 sect3 sections3.bib sect4 sect5 sections4.bib sections1.bib sect1 sect6 sect7 sect3 sectx sections1.bib * sect8 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort labelalpha sortkey sortname author editor translator sorttitle title sortyear year volume 0 sorttitle title shorthand shorthand shorthand shorthand shorthand biblatex-biber-2.9/t/tdata/labelalpha.bcf000444000153000001 26432113205066062 20007 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 1 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 1 usetranslator 1 useforeword 1 useholder 1 labelnamespec shorteditor editor translator useeditor 0 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family prefix family prefix suffix family given shorthand label labelname labelname year origday shorthand label labelname labelname year origday & labelname title year label labelname - title title labelname labelname labelname title labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender labelalpha.bib L1 L2 L3 L4 L5 L6 L7 L8 L9 L10 L11 L12 L13 L14 L15 L16 L16a L17 L17a L18 L19 L20 L21 L22 L23 L24 L25 L26 knuth:ct knuth:ct:a knuth:ct:b knuth:ct:c Schmidt2007 Schmidt2007a Schnee2007 Schnee2007a LDN1 LDN2 LDN3 title1 labelstest padtest ignore1 ignore2 skipwidthtest1 prefix1 rangetest1 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort sortkey labelalpha sortname author editor translator sorttitle title sortyear year sorttitle title volume 0 biblatex-biber-2.9/t/tdata/tool-testsort.conf000444000153000001 21065113205066061 20753 0ustar00vboxother000000000000 testlocale 5 ARTICLE doesnotexist.bib examples.bib doesnotexist.bib ARTICLE UNPUBLISHED examples.bib MISC examples.bib examples.bib REPORT UNPUBLISHED ONLINE prefix family given prefix family given suffix prefix mm author year sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata day endday endmonth eventday eventendday eventendmonth eventmonth eventyear origday origendday origendmonth origmonth origyear urlday urlendday urlendmonth urlmonth urlyear abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished hyphenation indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label library mainsubtitle maintitle maintitleaddon nameaddon note number origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthand shorthandintro shortjournal shortseries shorttitle subtitle title titleaddon usera userb userc userd usere userf venue version volume volumes month year urlendyear endyear eventendyear origendyear sorttitle sortshorthand sortyear sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec shortauthor shorteditor translator sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref xdata ids entryset date eventdate origdate urldate doi eprint file verba verbb verbc url keywords related options relatedoptions pages execute with writer producer execproducer director abstractloc doubtfulauthor doubtfuldate titleisdescription newspaper urldescription abstracturl abstract annotation authortype bookpagination crossref entryset entrysubtype execute file gender hyphenation ids indextitle indexsorttitle isan ismn iswc keywords label library lista listb listc listd liste listf nameaddon options origday origendday origendmonth origendyear origmonth origyear origlocation origpublisher origtitle pagination presort related relatedtype relatedstring shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear usera userb userc userd usere userf verba verbb verbc xdata xref set entryset crossref article author journaltitle title day endday endmonth endyear month year addendum annotator commentator doi editor editora editorb editorc editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle language note number origlanguage pages pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear version volume bibnote note book author title day endday endmonth endyear month year addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes mvbook author title day endday endmonth endyear month year addendum afterword annotator commentator doi edition editor editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes inbook bookinbook suppbook author title booktitle day endday endmonth endyear month year addendum afterword annotator bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes booklet author editor title day endday endmonth endyear month year addendum chapter doi eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle titleaddon type url urlday urlendday urlendmonth urlendyear urlmonth urlyear collection reference editor title day endday endmonth endyear month year addendum afterword annotator chapter commentator doi edition editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes mvcollection mvreference author title day endday endmonth endyear month year addendum afterword annotator commentator doi edition editor editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes incollection suppcollection inreference author editor title booktitle day endday endmonth endyear month year addendum afterword annotator booksubtitle booktitleaddon chapter commentator doi edition editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes manual title day endday endmonth endyear month year addendum author chapter doi edition editor eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle titleaddon type url urlday urlendday urlendmonth urlendyear urlmonth urlyear version misc title day endday endmonth endyear day endday endmonth endyear month year addendum author doi editor eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle titleaddon type url urlday urlendday urlendmonth urlendyear urlmonth urlyear version online title url addendum author editor language month note organization pubstate subtitle titleaddon urlday urlendday urlendmonth urlendyear urlmonth urlyear version year patent author title number day endday endmonth endyear month year addendum doi eprint eprintclass eprinttype holder location note pubstate subtitle titleaddon type url urlday urlendday urlendmonth urlendyear urlmonth urlyear version periodical editor title day endday endmonth endyear month year addendum doi editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate series subtitle url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume mvproceedings editor title day endday endmonth endyear month year addendum doi eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear venue volumes proceedings editor title day endday endmonth endyear month year addendum chapter doi eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear venue volume volumes inproceedings author editor title booktitle day endday endmonth endyear month year addendum booksubtitle booktitleaddon chapter doi eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear venue volume volumes report author title type institution day endday endmonth endyear month year addendum chapter doi eprint eprintclass eprinttype isrn language location note number pages pagetotal pubstate subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear version thesis author title type institution day endday endmonth endyear month year addendum chapter doi eprint eprintclass eprinttype language location note pages pagetotal pubstate subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear unpublished author title day endday endmonth endyear month year addendum howpublished language location note pubstate subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author editor title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender biblatex-biber-2.9/t/tdata/dm-constraints.bcf000444000153000001 16245713205066062 20676 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec author labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 1 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 1 usetranslator 1 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphanametemplate labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml eta etb etc etd misc season endseason eventseason eventendseason origseason origendseason urlseason urlendseason endyear year month day hour minute second timezone endmonth endday endhour endminute endsecond endtimezone eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone origendyear origyear origmonth origday orighour origminute origsecond origtimezone origendmonth origendday origendhour origendminute origendsecond origendtimezone urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished langid langidopts indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label library mainsubtitle maintitle maintitleaddon nameaddon note number origtitle pagetotal part relatedtype relatedstring reprinttitle series shorthand shorthandintro shortjournal shortseries shorttitle subtitle title titleaddon usera userb userc userd usere userf venue version volume volumes sorttitle sortshorthand sortyear sortkey presort entryset institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec shortauthor shorteditor translator sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref xdata ids date eventdate origdate urldate doi eprint file url verba verbb verbc keywords related options pages execute fielda fieldb field1 field2 field3 field4 field5 field6 field7 field8 field9 field10 field11 field12 field13 field14 abstract isbn issn gender eta author title day endday endmonth endyear month year etb etc etd author title day endday endmonth endyear month year month journaltitle fielda fieldb field1 field2 field3 field4 field5 field6 field7 field8 field9 field10 field11 field12 field13 field14 misc author title day endday endmonth endyear month year month journaltitle month eta author title etb author title journaltitle field1 field2 field3 field4 field5 field6 field1 field2 field7 field8 field5 field6 field9 field10 etc author title journaltitle field2 field3 field4 field5 field6 field7 field2 field3 field8 field9 field10 field11 field5 etd etc fielda fieldb etd author title journaltitle field2 field3 field4 field7 field5 field8 field9 field10 field11 field6 field12 field13 isbn issn date eventdate origdate urldate gender dm-constraints.bib c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort mm sortkey sortname author editor translator sorttitle title sortyear year sorttitle title volume 0 biblatex-biber-2.9/t/tdata/names_x.bib000444000153000001 271213205066062 17310 0ustar00vboxother000000000000@BOOK{L1, AUTHOR = {Alfred Adler}, } @BOOK{L2, AUTHOR = {Bertie B. Bull}, } @BOOK{L3, AUTHOR = {C. Z. Crop}, } @BOOK{L4, AUTHOR = {Derek D Decket}, } @BOOK{L5, AUTHOR = {Egbert von Eel}, } @BOOK{L6, AUTHOR = {Francis van der valt Frome}, } @BOOK{L7, AUTHOR = {Gregory R. van Gloom}, } @BOOK{L8, AUTHOR = {Henry F. van Henkel}, } @BOOK{L9, AUTHOR = {Ian {Iliad Ipswich}}, } @BOOK{L10, AUTHOR = {Jolly, III, James}, } @BOOK{L10a, AUTHOR = {Pimentel, Jr. ,Joseph J.}, } @BOOK{L11, AUTHOR = {van Kluster, Jr., Kevin}, } @BOOK{L12, AUTHOR = {Charles Louis Xavier Joseph de la Vall{\'e}e Poussin} } @BOOK{L13, AUTHOR = {Van de Graaff, R. J.} } @BOOK{L14, AUTHOR = {St John-Mollusc, Oliver} } @BOOK{L15, AUTHOR = {Roger P.{\,}G. van Gompel} } @BOOK{L16, AUTHOR = {Roger {P.\,G.} van Gompel} } @BOOK{L17, AUTHOR = {Lovecraft, Bill H.{\,}P.}, } @BOOK{L18, AUTHOR = {Lovecraft, Bill {H.\,P.}}, } @BOOK{L19, AUTHOR = {Mustermann, Klaus-Peter}, } @BOOK{L19a, AUTHOR = {Lam, Ho-Pun}, } @BOOK{L20, AUTHOR = {{John Henry} Ford}, } @BOOK{L21, AUTHOR = {{\v S}omeone Smith}, } @BOOK{L22, AUTHOR = {Someone {\v S}mith}, } @BOOK{L23, AUTHOR = {Šomeone Smith}, } @BOOK{L24, AUTHOR = {Someone Šmith}, } @BOOK{L25, AUTHOR = {{American Psychological Association, Task Force on the Sexualization of Girls}}, } @BOOK{L26, AUTHOR = {{Sci-Art Publishers}} } biblatex-biber-2.9/t/tdata/extratitle.bcf000444000153000001 25132213205066062 20104 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec shortauthor author shorteditor editor translator labeltitle 1 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 1 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 labelnamespec shorteditor editor translator useeditor 0 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender extratitle.bib L1 L2 L3 L4 L5 L6 L7 L8 L9 L10 L11 L12 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort sortkey labelalpha sortname author editor translator sorttitle title sortyear year volume 0 sorttitle title biblatex-biber-2.9/t/tdata/options.bib000444000153000001 101413205066062 17343 0ustar00vboxother000000000000@BOOK{L1, AUTHOR = {John Doe}, TITLE = {Title 1}, PUBLISHER = {Oxford}, ORIGDATE = {1985-10-30}, DATE = {1998-04-05}, KEYWORDS = {one|two|three} } % testing custom xsvsep @BOOK{L2, OPTIONS = {maxnames=3|maxitems=2|maxalphanames=10}, AUTHOR = {Ellison Edwards}, TITLE = {Title 2}, PUBLISHER = {Oxford}, DATE = {1998-04-05}, } @BOOK{L3, OPTIONS = {blah=10}, AUTHOR = {Bunty Bluntford}, TITLE = {Title 3}, PUBLISHER = {Oxford}, DATE = {1999-04-05}, } biblatex-biber-2.9/t/tdata/encoding1.bib000444000153000001 43713205066062 17507 0ustar00vboxother000000000000% -*- coding: latin-9-unix -*- % This is a latin9 encoded file (Notice the "LATIN CAPITAL LETTER S WITH CARON"). % The top line is a hint to Emacs to open in the right encoding @BOOK{test, YEAR = {1999}, AUTHOR = {Edward Encalcer}, TITLE = {ome title}, PUBLISHER = {A press} } biblatex-biber-2.9/t/tdata/xdata.bib000444000153000001 146013205066061 16755 0ustar00vboxother000000000000@XDATA{macmillan:pub, IDS = {macmillan:pubALIAS}, PUBLISHER = {Macmillan} } @XDATA{macmillan:loc, LOCATION = {New York and London}, NOTE = {A Note} } @XDATA{macmillan, IDS = {macmillanalias}, XDATA = {macmillan:pubALIAS, macmillan:loc} } @BOOK{xd1, AUTHOR = {Edward Ellington}, DATE = {2007}, XDATA = {macmillanalias, missingxd} } @BOOK{xd2, AUTHOR = {Peter Pillington}, DATE = {2003}, PUBLISHER = {Routledge}, XDATA = {macmillan:loc, bltxxd1} } % Loop detection test @XDATA{loop:1, NOTE = {Note} } @XDATA{loop:2, XDATA = {loop:3} } @XDATA{loop:3, XDATA = {loop} } @XDATA{loop, XDATA = {loop:1, loop:2} } @BOOK{xd3, AUTHOR = {Edward Ellington}, DATE = {1923}, XDATA = {loop} } biblatex-biber-2.9/t/tdata/full-bblxml.bblxml000444000153000001 12416513205066062 20671 0ustar00vboxother000000000000 set Aksın Özge Türkmen Hayati Artok Levent Çetinkaya Bekir Ni Chaoying Büyükgüngör Orhan Özkal Erhan 7aaa9902dc73909efd3430ad4f500984 f200c5838c3cfd950ab910e52e35e335 7aaa9902dc73909efd3430ad4f500984 7aaa9902dc73909efd3430ad4f500984 f200c5838c3cfd950ab910e52e35e335 7aaa9902dc73909efd3430ad4f500984 Aks\textbf{+}06 A d77c7cdd82ff690d4c3ef13216f92f0b author title Effect of immobilization on catalytic characteristics J. Organomet. Chem. 13 Effect of immobilization on catalytic characteristics of saturated Pd-N-heterocyclic carbenes in Mizoroki-Heck reactions 691 02 2006 3027 3036 Angenendt Arnold 9717d2d959a4b18727868ca7928c34b4 9717d2d959a4b18727868ca7928c34b4 9717d2d959a4b18727868ca7928c34b4 9717d2d959a4b18727868ca7928c34b4 9717d2d959a4b18727868ca7928c34b4 9717d2d959a4b18727868ca7928c34b4 Ang02 A d77c7cdd82ff690d4c3ef13216f92f0b author shorttitle A German article in a French journal. Apart from that, a typical article entry. Note the indextitle field In Honore Salvatoris Revue d'Histoire Ecclésiastique german In Honore Salvatoris In Honore Salvatoris -- Vom Sinn und Unsinn der Patrozinienkunde 97 2002 431 456 791 823 stdmodel:glashow stdmodel:weinberg stdmodel:salam Gla61 G 5e8d2bf9d38de41b1528bd307546008f A set entry with three members discussing the standard model of particle physics. stdmodel Glashow Sheldon eb3f242602109f5bdbeb41fdd990fcc0 eb3f242602109f5bdbeb41fdd990fcc0 eb3f242602109f5bdbeb41fdd990fcc0 eb3f242602109f5bdbeb41fdd990fcc0 eb3f242602109f5bdbeb41fdd990fcc0 eb3f242602109f5bdbeb41fdd990fcc0 G 5e8d2bf9d38de41b1528bd307546008f author title Nucl. Phys. Partial Symmetries of Weak Interactions 22 1961 579 Field 'entryset' is no longer needed in set member entries in Biber - ignoring in entry 'stdmodel:glashow' Knuth Donald E. Reading, Mass. Addison-Wesley fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 Knu86 K 9fd838a31ba64d981e8f44562bd33f89 1 author shorttitle The second volume of a five-volume book. Note the sorttitle and sortyear fields. Also note the indexsorttitle field TeX: The Program english variant=american Computers \& Typesetting : The Program B 1986 Knuth Donald E. Reading, Mass. Addison-Wesley fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 Knu86 K 9fd838a31ba64d981e8f44562bd33f89 2 author shorttitle The third volume of a five-volume book. Note the sorttitle and sortyear fields as well as the indextitle field METAFONTbook, The english variant=american Computers \& Typesetting METAFONTbook The METAFONTbook C 1986 Reese Trevor R. 7c73b571a33320e72d2d87ff821579fd 7c73b571a33320e72d2d87ff821579fd 7c73b571a33320e72d2d87ff821579fd 7c73b571a33320e72d2d87ff821579fd 7c73b571a33320e72d2d87ff821579fd 7c73b571a33320e72d2d87ff821579fd Ree58 R da6b42bd3ab22fee61abed031ee405f7 author title An article entry with a series and a volume field. Note the format of the series. If the value of the series field is an integer, this number is printed as an ordinal and the string *series is appended automatically William and Mary Quarterly english variant=american 3 Georgia in Anglo-Spanish Diplomacy, 1736-1739 15 1958 168 190 stdmodel Salam Abdus Svartholm Nils Stockholm Almquist \& Wiksell 5196fd7e08485dbc6a7dd05adc133fdf 5196fd7e08485dbc6a7dd05adc133fdf 5196fd7e08485dbc6a7dd05adc133fdf 5196fd7e08485dbc6a7dd05adc133fdf 5196fd7e08485dbc6a7dd05adc133fdf 5196fd7e08485dbc6a7dd05adc133fdf d0ec890e59163c24c111a08d2a4be982 d0ec890e59163c24c111a08d2a4be982 d0ec890e59163c24c111a08d2a4be982 S 322b1d5276f2f6c1bccdcd15920dbee6 author title Relativistic groups and analyticity Elementary particle theory Proceedings of the Eighth Nobel Symposium, May 19--25, 1968 Weak and Electromagnetic Interactions Aspenäsgarden, Lerum 1968 367 Field 'entryset' is no longer needed in set member entries in Biber - ignoring in entry 'stdmodel:salam' Shore Bradd 93f17724cbd884231ef39a73755ef5bb 93f17724cbd884231ef39a73755ef5bb 93f17724cbd884231ef39a73755ef5bb 93f17724cbd884231ef39a73755ef5bb 93f17724cbd884231ef39a73755ef5bb 93f17724cbd884231ef39a73755ef5bb Sho91 S 322b1d5276f2f6c1bccdcd15920dbee6 author title An article entry with series, volume, and number fields. Note the format of the series which is a localization key American Anthropologist 1 newseries Meaning Construction and Cultural Cognition Twice-Born, Once Conceived 93 3 1991 9 27 stdmodel Weinberg Steven 15e144c72b0b9d10db00ddc6d37a19e6 15e144c72b0b9d10db00ddc6d37a19e6 15e144c72b0b9d10db00ddc6d37a19e6 15e144c72b0b9d10db00ddc6d37a19e6 15e144c72b0b9d10db00ddc6d37a19e6 15e144c72b0b9d10db00ddc6d37a19e6 W ecb89ff85896a47dc313960773ac311d author title Phys. Rev. Lett. A Model of Leptons 19 1967 1264 Field 'entryset' is no longer needed in set member entries in Biber - ignoring in entry 'stdmodel:weinberg' set Aksın Özge Türkmen Hayati Artok Levent Çetinkaya Bekir Ni Chaoying Büyükgüngör Orhan Özkal Erhan 7aaa9902dc73909efd3430ad4f500984 f200c5838c3cfd950ab910e52e35e335 7aaa9902dc73909efd3430ad4f500984 7aaa9902dc73909efd3430ad4f500984 f200c5838c3cfd950ab910e52e35e335 7aaa9902dc73909efd3430ad4f500984 Aks\textbf{+}06 A d77c7cdd82ff690d4c3ef13216f92f0b author title Effect of immobilization on catalytic characteristics J. Organomet. Chem. 13 Effect of immobilization on catalytic characteristics of saturated Pd-N-heterocyclic carbenes in Mizoroki-Heck reactions 691 02 2006 3027 3036 Angenendt Arnold 9717d2d959a4b18727868ca7928c34b4 9717d2d959a4b18727868ca7928c34b4 9717d2d959a4b18727868ca7928c34b4 9717d2d959a4b18727868ca7928c34b4 9717d2d959a4b18727868ca7928c34b4 9717d2d959a4b18727868ca7928c34b4 Ang02 A d77c7cdd82ff690d4c3ef13216f92f0b author shorttitle A German article in a French journal. Apart from that, a typical article entry. Note the indextitle field In Honore Salvatoris Revue d'Histoire Ecclésiastique german In Honore Salvatoris In Honore Salvatoris -- Vom Sinn und Unsinn der Patrozinienkunde 97 2002 431 456 791 823 stdmodel:glashow stdmodel:weinberg stdmodel:salam Gla61 G 5e8d2bf9d38de41b1528bd307546008f A set entry with three members discussing the standard model of particle physics. stdmodel Glashow Sheldon eb3f242602109f5bdbeb41fdd990fcc0 eb3f242602109f5bdbeb41fdd990fcc0 eb3f242602109f5bdbeb41fdd990fcc0 eb3f242602109f5bdbeb41fdd990fcc0 eb3f242602109f5bdbeb41fdd990fcc0 eb3f242602109f5bdbeb41fdd990fcc0 G 5e8d2bf9d38de41b1528bd307546008f author title Nucl. Phys. Partial Symmetries of Weak Interactions 22 1961 579 Field 'entryset' is no longer needed in set member entries in Biber - ignoring in entry 'stdmodel:glashow' Knuth Donald E. Reading, Mass. Addison-Wesley fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 Knu86 K 9fd838a31ba64d981e8f44562bd33f89 1 author shorttitle The second volume of a five-volume book. Note the sorttitle and sortyear fields. Also note the indexsorttitle field TeX: The Program english variant=american Computers \& Typesetting : The Program B 1986 Knuth Donald E. Reading, Mass. Addison-Wesley fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 fcbea740aeb72b8e941e0d4aa9f6a9c6 Knu86 K 9fd838a31ba64d981e8f44562bd33f89 2 author shorttitle The third volume of a five-volume book. Note the sorttitle and sortyear fields as well as the indextitle field METAFONTbook, The english variant=american Computers \& Typesetting METAFONTbook The METAFONTbook C 1986 Reese Trevor R. 7c73b571a33320e72d2d87ff821579fd 7c73b571a33320e72d2d87ff821579fd 7c73b571a33320e72d2d87ff821579fd 7c73b571a33320e72d2d87ff821579fd 7c73b571a33320e72d2d87ff821579fd 7c73b571a33320e72d2d87ff821579fd Ree58 R da6b42bd3ab22fee61abed031ee405f7 author title An article entry with a series and a volume field. Note the format of the series. If the value of the series field is an integer, this number is printed as an ordinal and the string *series is appended automatically William and Mary Quarterly english variant=american 3 Georgia in Anglo-Spanish Diplomacy, 1736-1739 15 1958 168 190 stdmodel Salam Abdus Svartholm Nils Stockholm Almquist \& Wiksell 5196fd7e08485dbc6a7dd05adc133fdf 5196fd7e08485dbc6a7dd05adc133fdf 5196fd7e08485dbc6a7dd05adc133fdf 5196fd7e08485dbc6a7dd05adc133fdf 5196fd7e08485dbc6a7dd05adc133fdf 5196fd7e08485dbc6a7dd05adc133fdf d0ec890e59163c24c111a08d2a4be982 d0ec890e59163c24c111a08d2a4be982 d0ec890e59163c24c111a08d2a4be982 S 322b1d5276f2f6c1bccdcd15920dbee6 author title Relativistic groups and analyticity Elementary particle theory Proceedings of the Eighth Nobel Symposium, May 19--25, 1968 Weak and Electromagnetic Interactions Aspenäsgarden, Lerum 1968 367 Field 'entryset' is no longer needed in set member entries in Biber - ignoring in entry 'stdmodel:salam' Shore Bradd 93f17724cbd884231ef39a73755ef5bb 93f17724cbd884231ef39a73755ef5bb 93f17724cbd884231ef39a73755ef5bb 93f17724cbd884231ef39a73755ef5bb 93f17724cbd884231ef39a73755ef5bb 93f17724cbd884231ef39a73755ef5bb Sho91 S 322b1d5276f2f6c1bccdcd15920dbee6 author title An article entry with series, volume, and number fields. Note the format of the series which is a localization key American Anthropologist 1 newseries Meaning Construction and Cultural Cognition Twice-Born, Once Conceived 93 3 1991 9 27 stdmodel Weinberg Steven 15e144c72b0b9d10db00ddc6d37a19e6 15e144c72b0b9d10db00ddc6d37a19e6 15e144c72b0b9d10db00ddc6d37a19e6 15e144c72b0b9d10db00ddc6d37a19e6 15e144c72b0b9d10db00ddc6d37a19e6 15e144c72b0b9d10db00ddc6d37a19e6 W ecb89ff85896a47dc313960773ac311d author title Phys. Rev. Lett. A Model of Leptons 19 1967 1264 Field 'entryset' is no longer needed in set member entries in Biber - ignoring in entry 'stdmodel:weinberg' biblatex-biber-2.9/t/tdata/encoding6.bib000444000153000001 21613205066062 17507 0ustar00vboxother000000000000% This is a UTF-8 encoded file @BOOK{test, AUTHOR = {Edward Encalcer}, YEAR = {1999}, TITLE = {↑à titlé}, PUBLISHER = {A press} } biblatex-biber-2.9/t/tdata/skips.bib000444000153000001 304713205066062 17011 0ustar00vboxother000000000000@ARTICLE{skip1, OPTIONS = {skipbib}, AUTHOR = {John Doe}, SHORTHAND = {AFS}, TITLE = {Algorithms For Sorting}, PUBLISHER = {A press}, LOCATION = {Cambridge}, YEAR = {1994}, } @ARTICLE{skip2, OPTIONS = {skipbiblist}, SHORTHAND = {SA}, AUTHOR = {John Doe}, TITLE = {Sorting Algorithms}, PUBLISHER = {A press}, LOCATION = {Cambridge}, YEAR = {1995}, } @ARTICLE{skip3, OPTIONS = {skipbiblist,skiplab}, SHORTHAND = {SWA}, AUTHOR = {John Doe}, TITLE = {Sorting With Algorithms}, PUBLISHER = {A press}, LOCATION = {Cambridge}, YEAR = {1934}, } @ARTICLE{skip4, OPTIONS = {dataonly}, SHORTHAND = {AWS}, AUTHOR = {John Doe}, TITLE = {Algorithms Which Sort}, PUBLISHER = {A press}, LOCATION = {Cambridge}, YEAR = {1932}, } @SET{seta, ENTRYSET = {set:membera,set:memberb,set:memberc} } @BOOK{set:membera, KEYWORDS = {key1, key2}, AUTHOR = {Doe, John}, TITLE = {Set Member A}, DATE = {2010}, } @BOOK{set:memberb, AUTHOR = {Doe, John}, TITLE = {Set Member B}, DATE = {2010}, } @BOOK{set:memberc, AUTHOR = {Doe, John}, TITLE = {Set Member C}, DATE = {2010}, } @BOOK{noseta, AUTHOR = {Doe, John}, TITLE = {Stand-Alone A}, DATE = {2010}, } @BOOK{nosetb, AUTHOR = {Doe, John}, TITLE = {Stand-Alone B}, DATE = {2010}, } @BOOK{nosetc, AUTHOR = {Doe, John}, TITLE = {Stand-Alone C}, DATE = {2010}, } biblatex-biber-2.9/t/tdata/uniqueness6.bcf000444000153000001 24535213205066062 20212 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date year julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 1 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 1 uniquename 2 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 1 usetranslator 1 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender uniqueness6.bib * presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 biblatex-biber-2.9/t/tdata/dateformats.bib000444000153000001 1356113205066062 20213 0ustar00vboxother000000000000% WRONG - ORIGDATE is mistyped, URLDATE is just wrong % YEAR is messy and should be done by DATE but isn't wrong as such % Explicit MONTH is not checked @ARTICLE{L1, AUTHOR = {John Doe}, JOURNALTITLE = {Journal}, TITLE = {Title 1}, YEAR = {1995--1996}, MONTH = {14}, ORIGDATE = {1985-1030}, URLDATE = {1.5.1998}, } % WRONG - missing dash between month and day @BOOK{L2, AUTHOR = {John Doe}, TITLE = {Title 2}, PUBLISHER = {Oxford}, ORIGDATE = {1995-1230}, YEAR = {1991} } % WRONG - completely wrong date range format @BOOK{L3, AUTHOR = {John Doe}, TITLE = {Title 3}, PUBLISHER = {Oxford}, URL = {http://a/b/c}, URLDATE = {1.5.1988}, YEAR = {1854} } % WRONG - 1 digit month @BOOK{L4, AUTHOR = {John Doe and Albert Abrahams}, TITLE = {Title 1}, PUBLISHER = {Oxford}, DATE = {1995-1-04}, } % WRONG - 1 digit day @BOOK{L5, AUTHOR = {John Doe and Albert Abrahams}, TITLE = {Title 2}, PUBLISHER = {Oxford}, DATE = {1995-10-4}, } % WRONG - month out of bounds @BOOK{L6, AUTHOR = {John Doe and Albert Abrahams}, TITLE = {Title 1}, PUBLISHER = {Oxford}, DATE = {1996-13-03}, } % WRONG - day out of bounds @PROCEEDINGS{L7, EDITOR = {John Doe and Albert Abrahams}, TITLE = {Title 2}, PUBLISHER = {Oxford}, EVENTDATE = {1996-10-35}, YEAR = {1934} } % WRONG - MONTH not integer @ARTICLE{L8, AUTHOR = {Bill Shakespeare}, JOURNALTITLE = {Journal}, TITLE = {Works}, YEAR = {1985a}, MONTH = {january} } % OK @PROCEEDINGS{L9, EDITOR = {John Doe and Albert Abrahams}, TITLE = {Title 2}, PUBLISHER = {Oxford}, EVENTDATE = {1996-12-31}, YEAR = {1234} } % OK @PROCEEDINGS{L10, EDITOR = {John Doe and Albert Abrahams}, TITLE = {Title 2}, PUBLISHER = {Oxford}, EVENTDATE = {1996-01-01}, YEAR = {1239} } % WRONG - DATE and YEAR specified @BOOK{L11, AUTHOR = {John Doe and Albert Abrahams}, TITLE = {Title 2}, PUBLISHER = {Oxford}, DATE = {1996-01-01}, YEAR = {1998}, } % WRONG - DATE and MONTH specified @ARTICLE{L12, AUTHOR = {John Doe and Albert Abrahams}, JOURNALTITLE = {Journal}, TITLE = {Title 2}, DATE = {1996-01-01}, MONTH = {02}, } % OK - open-ended date @BOOK{L13, AUTHOR = {John Doe and Albert Abrahams}, TITLE = {Title 2}, PUBLISHER = {Oxford}, DATE = {1996-01-01/}, } % OK - ENDYEAR same as YEAR, labelyear should only have YEAR @BOOK{L14, AUTHOR = {John Doe and Albert Abrahams}, TITLE = {Title 2}, PUBLISHER = {Oxford}, DATE = {1996-12-10/1996-12-12}, } % OK - labelyear should be undef, no DATE or YEAR @BOOK{L15, AUTHOR = {John Doe and Albert Abrahams}, TITLE = {Title 2}, PUBLISHER = {Oxford}, } % MISSING YEAR/DATE @PROCEEDINGS{L16, EDITOR = {John Doe and Albert Abrahams}, TITLE = {Title 2}, PUBLISHER = {Oxford}, EVENTDATE = {1996-01-01}, } % OK - YEAR same as ENDYEAR, labelyear should only have YEAR @PROCEEDINGS{L17, PUBSTATE = {inpress}, EDITOR = {John Doe and Albert Abrahams}, TITLE = {Title 2}, PUBLISHER = {Oxford}, DATE = {1996-12-10/1996-12-12}, ORIGDATE = {1998-12-10/1998-12-12}, EVENTDATE = {1998-12-10/2004-12-12}, } % Testing extended dates @ARTICLE{era1, AUTHOR = {Alan Smith}, JOURNALTITLE = {Journal Title}, TITLE = {Title}, DATE = {-0379-02}, ORIGDATE = {-0221/-0219}, } @INPROCEEDINGS{era2, AUTHOR = {Alan Smith}, BOOKTITLE = {Book Title}, TITLE = {Title}, DATE = {-0197}, EVENTDATE = {-0249}, ORIGDATE = {-0049/-0044}, } @INPROCEEDINGS{era3, AUTHOR = {Alan Smith}, BOOKTITLE = {Book Title}, TITLE = {Title}, DATE = {-0196-02}, EVENTDATE = {0250-03-02}, } @INPROCEEDINGS{era4, AUTHOR = {Alan Smith}, BOOKTITLE = {Book Title}, TITLE = {Title}, DATE = {1034~}, EVENTDATE = {1565?}, URLDATE = {1487~/1490}, ORIGDATE = {1487/1488~}, } @INPROCEEDINGS{range1, AUTHOR = {Alan Smith}, BOOKTITLE = {Book Title}, TITLE = {Title}, DATE = {1034/unknown}, EVENTDATE = {1565/open}, ORIGDATE = {2000/}, URLDATE = {unknown/1034}, } @INPROCEEDINGS{range2, AUTHOR = {Alan Smith}, BOOKTITLE = {Book Title}, TITLE = {Title}, DATE = {1034/*}, EVENTDATE = {open/1565}, ORIGDATE = {/2000}, URLDATE = {*/1034}, } @INPROCEEDINGS{season1, AUTHOR = {Alan Smith}, BOOKTITLE = {Book Title}, TITLE = {Title}, DATE = {2003-21}, EVENTDATE = {2002-23}, } @ARTICLE{time1, AUTHOR = {Alan Smith}, JOURNALTITLE = {Journal Title}, TITLE = {Title}, DATE = {2001-01-03T15:00:00}, ORIGDATE = {2001-01-03T17:07:34Z}, URLDATE = {2001-01-03T17:07:34+05:00}, } % EDTF 5.2.2 tests @INPROCEEDINGS{unspec1, AUTHOR = {Alan Smith}, BOOKTITLE = {Book Title}, TITLE = {Title}, DATE = {199u}, EVENTDATE = {19uu}, ORIGDATE = {1999-uu}, URLDATE = {1999-01-uu} } @ARTICLE{unspec2, AUTHOR = {Alan Smith}, JOURNALTITLE = {Journal Title}, TITLE = {Title}, DATE = {1999-uu-uu}, } % EDTF 5.2.4 @ARTICLE{y1, AUTHOR = {Alan Smith}, JOURNALTITLE = {Journal Title}, TITLE = {Title}, DATE = {y17000002}, } @ARTICLE{y2, AUTHOR = {Alan Smith}, JOURNALTITLE = {Journal Title}, TITLE = {Title}, DATE = {y-17000002}, } @ARTICLE{y3, AUTHOR = {Alan Smith}, JOURNALTITLE = {Journal Title}, TITLE = {Title}, DATE = {y1700}, } @BOOK{open1, AUTHOR = {Bert Brown}, DATE = {/2004-01-01} } @BOOK{open2, AUTHOR = {Bert Brown}, DATE = {open/2004-01-01} } biblatex-biber-2.9/t/tdata/sort-case.bcf000444000153000001 24750213205066061 17623 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender sort-case.bib CS1 CS2 CS3 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort sortkey sortname author editor translator sorttitle title sortyear year sorttitle title volume 0 biblatex-biber-2.9/t/tdata/bibtex-aliases.bcf000444000153000001 25370413205066062 20621 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec author labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 1 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 1 usetranslator 1 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker datezeros autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename doesnotexist.bib bibtex-aliases.bib bibtex-aliases2.bib bibtex-aliases.bib bibtex-aliases.bib MISC REPORT REPORT UNPUBLISHED prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender bibtex-aliases.bib alias1 alias2 alias3 alias4 alias5 alias6 alias7 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 biblatex-biber-2.9/t/tdata/uniqueness1.bcf000444000153000001 24535213205066061 20204 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date year julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 1 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 1 uniquename 2 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 1 usetranslator 1 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender uniqueness1.bib * presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 biblatex-biber-2.9/t/tdata/extradate.bcf000444000153000001 25305713205066062 17707 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date nodate julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 labelnamespec shorteditor editor translator useeditor 0 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender extradate.bib L1 L2 L3 L4 L5 L6 L7 L8 L9 L10 LY1 LY2 LY3 companion1 companion2 companion3 vangennep gennep nodate1 nodate2 ed1 ed2 ed3 ed4 ed5 ed6 ed7 ed8 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort sortkey labelalpha sortname author editor translator sorttitle title sortyear year volume 0 sorttitle title biblatex-biber-2.9/t/tdata/full-bbl.bib000444000153000001 122613205066062 17354 0ustar00vboxother000000000000@BOOK{F1, IDS = {F1a}, SHORTHAND = {\emph{A}}, SORTSHORTHAND = {A}, AUTHOR = {John Doe}, TITLE = {The Fullness of Times}, YEAR = {1995} } % Duplicate key. Should be reported via a warning @MISC{F1, AUTHOR = {Frank Frill}, TITLE = {Dresses for Gentlemen}, YEAR = {1997} } % Mismatched cased key. Should be reported via a warning @BOOK{f1, AUTHOR = {Someone Else}, TITLE = {The Case of the Duplicitous Duplicate}, YEAR = {1996} } @MISC{c1, AUTHOR = {Benny Balgreen}, TITLE = {Names We Invent}, YEAR = {1900} }biblatex-biber-2.9/t/tdata/extratitleyear.bcf000444000153000001 25104313205066062 20765 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec shortauthor author shorteditor editor translator labeltitle 1 labeltitlespec shorttitle title labeltitleyear 1 labeldateparts 1 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 labelnamespec shorteditor editor translator useeditor 0 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender extratitleyear.bib L1 L2 L3 L4 L5 LY1 LY2 LY3 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort sortkey labelalpha sortname author editor translator sorttitle title sortyear year volume 0 sorttitle title biblatex-biber-2.9/t/tdata/crossrefs.bib000444000153000001 1514213205066062 17710 0ustar00vboxother000000000000% Testing mincrossrefs. cr1 and cr2 crossrefs should trigger inclusion of cr_m and also % the crossref fields in both of them % Also a test of some aliases @INBOOK{cr1, AUTHOR = {Graham Gullam}, TITLE = {Great and Good Graphs}, ORIGDATE = {1955}, ARCHIVEPREFIX = {SomEPrFiX}, PRIMARYCLASS = {SOMECLASS}, CROSSREF = {cr_m} } @INBOOK{cr2, AUTHOR = {Frederick Fumble}, TITLE = {Fabulous Fourier Forms}, SCHOOL = {School}, INSTITUTION = {Institution}, ORIGDATE = {1943}, CROSSREF = {cr_m} } @BOOK{cr_m, EDITOR = {Edgar Erbriss}, TITLE = {Graphs of the Continent}, PUBLISHER = {Grimble}, YEAR = {1974} } % Testing explicit cite of crossref parent. Should trigger inclusion of child crossref field @INBOOK{cr3, AUTHOR = {Arthur Aptitude}, TITLE = {Arrangements of All Articles}, ORIGDATE = {1934}, ARCHIVEPREFIX = {SomEPrFiX}, EPRINTTYPE = {sometype}, CROSSREF = {crt} } @BOOK{crt, EDITOR = {Mark Monkley}, TITLE = {Beasts of the Burbling Burns}, PUBLISHER = {Rancour}, YEAR = {1996} } % Testing mincrossrefs not reached. cr4 is cited, cr5 isn't, therefore mincrossrefs (2) for % crn not reached @INBOOK{cr4, AUTHOR = {Morris Mumble}, TITLE = {Enterprising Entities}, ORIGDATE = {1911}, CROSSREF = {crn} } @INBOOK{cr5, AUTHOR = {Oliver Ordinary}, TITLE = {Questionable Quidities}, ORIGDATE = {1919}, CROSSREF = {crn} } @BOOK{crn, EDITOR = {Jeremy Jermain}, TITLE = {Vanquished, Victor, Vandal}, PUBLISHER = {Pillsbury}, YEAR = {1945} } % Testing inheritance of event information @PROCEEDINGS{cr6i, AUTHOR = {Spurious Author}, ADDRESS = {Address}, TITLE = {Title of proceeding}, EDITOR = {Editor}, PUBLISHER = {Publisher of proceeding}, EVENTDATE = {2009-08-21/2009-08-24}, EVENTTITLE = {Title of the event}, VENUE = {Location of event}, YEAR = {2009} } @INPROCEEDINGS{cr6, AUTHOR = {Author, Firstname}, CROSSREF = {cr6i}, PAGES = {123--}, TITLE = {Title of inproceeding}, BOOKTITLE = {Manual booktitle}, YEAR = {2009}, } % Testing inheritance of special fields (booktitle, bookauthor etc.) @BOOK{cr7i, AUTHOR = {Brian Bookauthor}, TITLE = {Book Title}, SUBTITLE = {Book Subtitle}, TITLEADDON = {Book Titleaddon}, PUBLISHER = {Publisher of proceeding}, YEAR = {2009}, VERBA = {String}, } @INBOOK{cr7, AUTHOR = {Author, Firstname}, CROSSREF = {cr7i}, PAGES = {123--126}, TITLE = {Title of Book bit}, YEAR = {2010} } % Testing supression of default inheritance @COLLECTION{cr8i, EDITOR = {Brian Editor}, TITLE = {Book Title}, SUBTITLE = {Book Subtitle}, TITLEADDON = {Book Titleaddon}, PUBLISHER = {Publisher of Collection}, YEAR = {2009} } @INCOLLECTION{cr8, AUTHOR = {Smith, Firstname}, CROSSREF = {cr8i}, PAGES = {1--12}, TITLE = {Title of Collection bit}, YEAR = {2010} } % Testing minxrefs. xr1 and xr2 xrefs should trigger inclusion of xrm and also % the xref fields in both of them @INBOOK{xr1, AUTHOR = {Zoe Zentrum}, TITLE = {Moods Mildly Modified}, ORIGDATE = {1921}, XREF = {xrm} } @INBOOK{xr2, AUTHOR = {Ian Instant}, TITLE = {Migraines Multiplying Madly}, ORIGDATE = {1926}, XREF = {xrm} } @BOOK{xrm, EDITOR = {Peter Prendergast}, TITLE = {Calligraphy, Calisthenics, Culture}, PUBLISHER = {Mainstream}, YEAR = {1970} } % Testing explicit cite of xref parent. % Should not trigger inclusion of child xref field by minxrefs as parent is % also directly cited @INBOOK{xr3, AUTHOR = {Norman Normal}, TITLE = {Russian Regalia Revisited}, ORIGDATE = {1923}, XREF = {xrt} } @BOOK{xrt, EDITOR = {Lucy Lunders}, TITLE = {Kings, Cork and Calculation}, PUBLISHER = {Middling}, YEAR = {1977} } % Testing minxrefs reached. xr4 is cited, xr5 isn't, but minxrefs=1 so xrn % is included @INBOOK{xr4, AUTHOR = {Megan Mistrel}, TITLE = {Lumbering Lunatics}, ORIGDATE = {1933}, XREF = {xrn} } @INBOOK{xr5, AUTHOR = {Kenneth Kunrath}, TITLE = {Dreadful Dreary Days}, ORIGDATE = {1900}, XREF = {xrn} } @BOOK{xrn, EDITOR = {Victor Vivacious}, TITLE = {Examples of Excellent Exaggerations}, PUBLISHER = {Oxford}, YEAR = {1935} } % Testing missing xref @INBOOK{mxr, AUTHOR = {Megan Mistrel}, TITLE = {Lumbering Lunatics}, ORIGDATE = {1933}, XREF = {missing1} } % Testing missing crossref @INBOOK{mcr, AUTHOR = {Megan Mistrel}, TITLE = {Lumbering Lunatics}, ORIGDATE = {1933}, CROSSREF = {missing1} } % Testing cascading crossrefs @MVBOOK{ccr1, IDS = {ccr1alias}, AUTHOR = {Vince Various}, EDITOR = {Edward Editor}, TITLE = {Stuff Concerning Varia}, DATE = {1934} } % Test of cascading xref+crossref @MISC{xc1, AUTHOR = {Xavier Crust}, XREF = {xc2} } @INBOOK{xc2, AUTHOR = {Xavier Crust}, CROSSREF = {xc3} } @BOOK{xc3, AUTHOR = {Xavier Crust}, TITLE = {Title} } % using alias @BOOK{ccr2, TITLE = {Misc etc.}, DATE = {1923}, CROSSREF = {ccr1alias} } @INBOOK{ccr3, TITLE = {Perhaps, Perchance, Possibilities?}, DATE = {1911}, CROSSREF = {ccr2} } % Testing circular refs detection @BOOK{circ1, DATE = {1911}, CROSSREF = {circ3} } @BOOK{circ2, DATE = {1911}, CROSSREF = {circ1} } @BOOK{circ3, DATE = {1911}, CROSSREF = {circ2} } % Test of dependency calculations for non-cited entries @BOOK{r1, DATE = {1911}, CROSSREF = {r2} } @BOOK{r2, DATE = {1911}, CROSSREF = {r3} } @BOOK{r3, DATE = {1911}, CROSSREF = {r4} } @BOOK{r4, DATE = {1911}, } % Test of per-entry inheritance suppression @INBOOK{s1, OPTIONS = {noinherit=nobtitle}, TITLE = {Subtitle}, CROSSREF = {s2} } @BOOK{s2, TITLE = {Title} } % Test of blocking all datepart inhertance when child has any datepart @INBOOK{b1, DATE = {2004-03-03}, ORIGDATE = {2004-03}, CROSSREF = {b2} } @BOOK{b2, DATE = {2004-03-03/2005-08-09}, ORIGDATE = {2004-03/2005-08}, } % test of singletitle, uniquetitle and uniquework suppression @MVBOOK{sup1, AUTHOR = {Alan Smith}, TITLE = {Title1} } @BOOK{sup2, NOTE = {Book sup2}, CROSSREF = {sup1} } @BOOK{sup3, NOTE = {Book sup3}, CROSSREF = {sup1} } % Testing mincrossrefs via aliases @BOOK{al1, DATE = {1911}, CROSSREF = {alias2} } @BOOK{al2, IDS = {alias2}, DATE = {1911}, CROSSREF = {circ1} } biblatex-biber-2.9/t/tdata/encoding5.bcf000444000153000001 24535013205066062 17576 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date year julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 1 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 1 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 1 usetranslator 1 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender encoding5.bib * presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 biblatex-biber-2.9/t/tdata/sort-uc.bib000444000153000001 237113205066062 17253 0ustar00vboxother000000000000% Test of U::C tailoring - Swedish - in UCA, å and ä are sorted before z but should be after @BOOK{LS1, AUTHOR = {Slippery, Zänny}, TITLE = {Silent Slippers}, PUBLISHER = {Footwear Folios}, LOCATION = {London}, YEAR = {1932}, SHORTHAND = {SZä} } @BOOK{LS2, AUTHOR = {Slippery, Zznny}, TITLE = {People Prefer Packages to Post}, PUBLISHER = {Terrible Typists}, LOCATION = {Grimsby}, YEAR = {1945}, SHORTHAND = {SZå} } @BOOK{LS3, AUTHOR = {Slippery, Zönny}, TITLE = {Last Lingering Lemons}, PUBLISHER = {Fruit Folios}, LOCATION = {Catterick}, YEAR = {1966}, SHORTHAND = {SZo} } % Upper before lower false @BOOK{LS4, AUTHOR = {Slippery, Zönny}, TITLE = {last lingering lemons}, PUBLISHER = {Fruit Folios}, LOCATION = {Catterick}, YEAR = {1966}, SHORTHAND = {SZo} } @BOOK{LS5, AUTHOR = {Slippery, Zanny}, YEAR = {1989}, } % Surname is substring so should be first @BOOK{LS6, AUTHOR = {Slippery, Zan}, YEAR = {1988}, } biblatex-biber-2.9/t/tdata/encoding2.bcf000444000153000001 24544213205066062 17575 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date year julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 1 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 1 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 1 usetranslator 1 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker datezeros autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender encoding2.bib * presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 biblatex-biber-2.9/t/tdata/related.bcf000444000153000001 24672013205066062 17345 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 1 uniquename 2 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender related.bib key1 key2 c1 s2 kullback kullback:related presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 citeorder shorthand biblatex-biber-2.9/t/tdata/uniqueness2.bib000444000153000001 533013205066062 20136 0ustar00vboxother000000000000@ARTICLE{un8, AUTHOR = {Alan AAA and B. BBB and A. CCC}, } @ARTICLE{un9, AUTHOR = {Anthon AAA and B. BBB and B. CCC and A. DDD}, } @ARTICLE{un10, AUTHOR = {B. DDD}, } @ARTICLE{unapa1, AUTHOR = {Ireys, A. and Chernoff, A. and DeVet, A. and Kim, A.}, } @ARTICLE{unapa2, AUTHOR = {Ireys, A. and Chernoff, A. and Stein, A. and DeVet, A. and Silver, A.}, } @MISC{others1, AUTHOR = {NameA and NameB and others}, YEAR = {2011} } @MISC{others2, AUTHOR = {NameA and NameB and others}, YEAR = {2011} } % Two works by the same author list, should be no uniquelist @BOOK{unall1, AUTHOR = {Name11 and Name22 and Name33 and Name44 and Name55}, TITLE = {Title 1}, YEAR = {2011} } @BOOK{unall2, AUTHOR = {Name11 and Name22 and Name33 and Name44 and Name55}, TITLE = {Title 2}, YEAR = {2011} } % First namelist is subset of second, % maxnames=5 -> ul=undef and ul=6 respectively % maxnames=1 -> ul=5 and ul=6 respectively @BOOK{unall3, AUTHOR = {A111 and A222 and A333 and A444 and A555}, YEAR = {2011} } @BOOK{unall4, AUTHOR = {A111 and A222 and A333 and A444 and A555 and A666}, YEAR = {2011} } % Two lists with same authors, one differing in last place % ul=5 @BOOK{unall5, AUTHOR = {Name1 and Name2 and Name3 and Name4 and Name5}, TITLE = {Title 3}, YEAR = {2010} } % ul=5 @BOOK{unall6, AUTHOR = {Name1 and Name2 and Name3 and Name4 and Name5}, TITLE = {Title 5}, YEAR = {2010} } % ul=5 @BOOK{unall7, AUTHOR = {Name1 and Name2 and Name3 and Name4 and Name6}, TITLE = {Title 3}, YEAR = {2010} } % Two lists with same authors, one differing in being a superset. maxnames/minnames=1 % so the truncations are ambiguous, hence uniquelist is needed. % ul=5 @BOOK{unall8, AUTHOR = {Name1111 and Name2222 and Name3333 and Name4444 and Name5555}, TITLE = {Title 3}, YEAR = {2010} } % ul=5 @BOOK{unall9, AUTHOR = {Name1111 and Name2222 and Name3333 and Name4444 and Name5555}, TITLE = {Title 5}, YEAR = {2010} } % ul=undef (per-entry setting) @BOOK{unall9a, OPTIONS = {uniquelist=0}, AUTHOR = {Name1111 and Name2222 and Name3333 and Name4444 and Name5555}, TITLE = {Title 5}, YEAR = {2010} } % ul=6 @BOOK{unall10, AUTHOR = {Name1111 and Name2222 and Name3333 and Name4444 and Name5555 and Name6666}, TITLE = {Title 5}, YEAR = {2010} } % Testing "et al" counting as a uniquelist position % ul01 = 3 % ul02 = 3 (because it will be "XXX and YYY and ZZZ et al" which disambiguates the list from % "XXX and YYY and ZZZ" @ARTICLE{ul01, AUTHOR = {XXX and YYY and ZZZ}, } @ARTICLE{ul02, AUTHOR = {XXX and YYY and ZZZ and MMM and NNN}, } biblatex-biber-2.9/t/tdata/bibtex-output.bcf000444000153000001 24656713205066061 20550 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 0 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 1 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 1 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 1 usetranslator 1 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker datezeros autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender examples.bib murray kant:ku tool.bib b1 xd1 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 citeorder biblatex-biber-2.9/t/tdata/uniqueness5.bib000444000153000001 300713205066062 20140 0ustar00vboxother000000000000% maxnames=1, minnames=1 % both should be uniquelist=undef as the year disambiguates @ARTICLE{uls1, AUTHOR = {John Smith and Henry Jones}, YEAR = {2000} } @ARTICLE{uls2, AUTHOR = {John Smith and Sam Small}, YEAR = {2001} } % Should be uniquelist = 2 for both as the year is the same @ARTICLE{uls3, AUTHOR = {Henry Helarn and Brian Bonkers}, YEAR = {2000} } @ARTICLE{uls4, AUTHOR = {Henry Helarn and Michael Resin}, YEAR = {2000} } % uls5 and uls6 should all be uniquelist = 2 as same year but uls7 should be undef @ARTICLE{uls5, AUTHOR = {Robert Feld and Ian Ink}, YEAR = {2000} } @ARTICLE{uls6, AUTHOR = {Robert Feld and Brian Belt}, YEAR = {2000} } @ARTICLE{uls7, AUTHOR = {Robert Feld and Stanley Gibbons}, YEAR = {2001} } % maxnames=3, minnames=2 % uls8 and uls9 should all be undef as the year disambiguates @ARTICLE{uls8, AUTHOR = {Patrick Poodle and Robin Vessel and Marvin Eagle and Rupert Trendle}, YEAR = {2000} } @ARTICLE{uls9, AUTHOR = {Patrick Poodle and Robin Vessel and Jeremy Idle and Leigh Loog}, YEAR = {2001} } % uls10 and uls11 should be uniquelist = 3 and uls12 should be undef @ARTICLE{uls10, AUTHOR = {Vogel and Beast and Garble and Rook}, YEAR = {2000} } @ARTICLE{uls11, AUTHOR = {Vogel and Beast and Tremble and Bite}, YEAR = {2000} } @ARTICLE{uls12, AUTHOR = {Vogel and Beast and Acid and Squeeze}, YEAR = {2001} }biblatex-biber-2.9/t/tdata/extratitle.bib000444000153000001 167613205066062 20053 0ustar00vboxother000000000000@BOOK{L1, AUTHOR = {John Doe}, TITLE = {Title 1}, YEAR = {1995}, } @BOOK{L2, AUTHOR = {John Doe}, TITLE = {Title 1}, YEAR = {1996}, } @BOOK{L3, TITLE = {Title 2}, YEAR = {1995}, } @BOOK{L4, TITLE = {Title 2}, YEAR = {1995}, } @BOOK{L5, TITLE = {Title 1}, YEAR = {1995}, } @BOOK{L6, SHORTTITLE = {Title A}, TITLE = {Title 3}, YEAR = {1995}, } @BOOK{L7, TITLE = {Title A}, YEAR = {1995}, } @BOOK{L8, AUTHOR = {Billy Brown}, TITLE = {Title A}, YEAR = {1934} } @BOOK{L9, AUTHOR = {Billy Brown}, TITLE = {Title B}, YEAR = {1932} } @BOOK{L10, AUTHOR = {Clive Cautious}, TITLE = {Title A}, YEAR = {1946} } @BOOK{L11, TITLE = {Titular Titilation}, YEAR = {1946} } @BOOK{L12, YEAR = {1943} } biblatex-biber-2.9/t/tdata/sets.bib000444000153000001 354613205066061 16641 0ustar00vboxother000000000000@SET{Elias1955, ENTRYSET = {Elias1955aALIAS,Elias1955b}, CROSSREF = {Elias1955a} } % Also test of month hacking - should be forced to "03" by the bibtex driver @ARTICLE{Elias1955a, IDS = {Elias1955aALIAS}, AUTHOR = {Elias, P.}, TITLE = {Predictive coding--I}, JOURNAL = {IRE Transactions on Information Theory}, YEAR = {1955}, VOLUME = {1}, PAGES = {16-24}, NUMBER = {1}, MONTH = {March}, DOI = {10.1109/TIT.1955.1055126}, ENTRYSET = {Elias1955}, ISSN = {0096-1000}, } % Also test of month hacking - should be forced to "03" by the bibtex driver @ARTICLE{Elias1955b, AUTHOR = {Elias, P.}, TITLE = {Predictive coding--II}, JOURNAL = {IRE Transactions on Information Theory}, YEAR = {1955}, VOLUME = {1}, PAGES = {24-33}, NUMBER = {1}, MONTH = {Mar.}, DOI = {10.1109/TIT.1955.1055116}, ENTRYSET = {Elias1955}, ISSN = {0096-1000}, } @SET{Static1, ENTRYSET = {Static2alias, Static3, Static4, missing1}, ANNOTATION = {Some notes} } @BOOK{Static2, IDS = {Somealias, Static2alias}, AUTHOR = {Brian Bumble}, TITLE = {Blessed Brains}, YEAR = {2001}, ANNOTATION = {Some Blessed Note} } @BOOK{Static3, AUTHOR = {Derek Dingle}, TITLE = {Castles and Crime}, YEAR = {2002} } @BOOK{Static4, AUTHOR = {Clive Crenellation}, TITLE = {Dungeons, Dark and Dangerous}, YEAR = {2005} } @BOOK{Dynamic1, AUTHOR = {Derek Dynamism}, TITLE = {Doing Daring Deeds}, YEAR = {2002}, ANNOTATION = {Some Dynamic Note}, SHORTHAND = {d1} } @BOOK{Dynamic2, AUTHOR = {Brian Bunting}, TITLE = {Beautiful Birthdays}, YEAR = {2010}, SHORTHAND = {d2} } @BOOK{Dynamic3, IDS = {Dynamic3alias}, AUTHOR = {Roger Regardless}, TITLE = {Reckless Ravishings}, YEAR = {2000}, SHORTHAND = {d3} } biblatex-biber-2.9/t/tdata/dm-constraints.bib000444000153000001 604313205066061 20623 0ustar00vboxother000000000000% Not a valid type % Valid gender @BADTYPE{c1, AUTHOR = {Clive Constraint}, TITLE = {Limits of Things}, DATE = {2003-10-01}, GENDER = {sm} } % Completely nonexistent field and field (alias) not valid for this type % Testing a field valid for all entrytypes (ABSTRACT) % Testing missing mandatory field @ETA{c2, TITLE = {Limits of Things}, DATE = {2003-10-01}, BADFIELD = {Something}, JOURNAL = {Some journal}, ABSTRACT = {Some text} } % Datatype constraint - wrong month format % Randomly named field % Invalid gender @ETB{c3, AUTHOR = {Clive Constraint}, TITLE = {Limits of Things}, JOURNAL = {Some journal}, YEAR = {2003}, MONTH = {WRONG FORMAT}, FIELD1 = {7}, GENDER = {zz} } % Datatype constraint - wrong month format (range) % Randomly named field with custom range (integer) @ETB{c4, AUTHOR = {Clive Constraint}, TITLE = {Limits of Things}, JOURNAL = {Some journal}, YEAR = {2003}, MONTH = {14}, FIELD1 = {4} } % Conditional checks % XOR mandatory check - DATE and YEAR are both defined % all 2,3,4 -> none 5,6 (fail) @ETB{c5, AUTHOR = {Clive Constraint}, TITLE = {Limits of Things}, JOURNAL = {Some journal}, DATE = {2004-01-02}, YEAR = {2003}, FIELD2 = {a}, FIELD3 = {a}, FIELD4 = {a}, FIELD5 = {a}, FIELD6 = {a}, } % Conditional checks % all 2,3,4 -> none 5,6 (pass) (because antecedent is not satisfied) % all 1,2 -> one 7,8 (fail) % all 5,6 -> all 9,10 (fail) @ETB{c6, AUTHOR = {Clive Constraint}, TITLE = {Limits of Things}, JOURNAL = {Some journal}, YEAR = {2003}, FIELD1 = {8}, FIELD2 = {a}, FIELD3 = {a}, FIELD5 = {a}, FIELD6 = {a}, FIELD9 = {a} } % Conditional checks % one 2,3 -> none 4 (pass) % one 5,6 -> none 7 (fail) % one 2,3 -> all 8,9 (pass) % one 10,11 -> one 5 (pass) % Mandatory OR check - one of FIELDA or FIELDB must be present (fail) @ETC{c7, AUTHOR = {Clive Constraint}, TITLE = {Limits of Things}, JOURNAL = {Some journal}, YEAR = {2003}, FIELD2 = {a}, FIELD3 = {a}, FIELD5 = {a}, FIELD7 = {a}, FIELD8 = {a}, FIELD9 = {a}, FIELD11 = {a}, } % Conditional checks % none 2,3 -> none 4 (fail) % none 7 -> none 5 (pass) as antecedent is false % none 8,9 -> one 10,11 (fail) % none 6 -> all 12,13 (fail) % Mandatory OR check - one of FIELDA or FIELDB must be present % (both are, testing different from XOR) (pass) @ETD{c8, AUTHOR = {Clive Constraint}, TITLE = {Limits of Things}, JOURNAL = {Some journal}, YEAR = {2003}, FIELD4 = {a}, FIELD5 = {a}, FIELD7 = {a}, FIELD12 = {a}, FIELDA = {a}, FIELDB = {a}, } % ISBN and ISSN checks @MISC{c9, AUTHOR = {Fred Flummox}, ISBN = {90-70002-34-5}, ISSN = {0317-8471}, } @MISC{c10, AUTHOR = {Fred Flummox}, ISBN = {90-7002-34-5}, ISSN = {0317-8470}, } biblatex-biber-2.9/t/tdata/names_x.bcf000444000153000001 25036013205066061 17351 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 0 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 0 usetranslator 0 labelnamespec shorteditor editor translator useeditor 0 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender names_x.bib * presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort sortkey labelalpha sortname author editor translator sorttitle title sortyear year volume 0 sorttitle title biblatex-biber-2.9/t/tdata/options.bcf000444000153000001 24552513205066062 17422 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 88 minxrefs 2 sortcase 0 sortupper 1 alphaothers + labelalpha 0 labelnamespec author labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 1 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 labelnamespec author editor useprefix 1 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender options.bib * presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 biblatex-biber-2.9/t/tdata/encoding1.bcf000444000153000001 24544713205066062 17601 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date year julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 1 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 1 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 1 usetranslator 1 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker datezeros autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender encoding1.bib testŠ presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 biblatex-biber-2.9/t/tdata/sections3.bib000444000153000001 120513205066062 17564 0ustar00vboxother000000000000@STRING{STRING1 = {value2}} @BOOK{sect4, SHORTHAND = {DDDD}, AUTHOR = {Derek Ditherington and David Dumpton}, TITLE = {Dangerous Dames}, SUBTITLE = {Don't Dally Dude!}, PUBLISHER = {Dright and Drought Press}, LOCATION = {Dunbar}, YEAR = {2003}, NOTE = STRING1 } @BOOK{sect5, SHORTHAND = {EE}, SORTKEY = {aaaaaaa}, AUTHOR = {Edward E. Ethoxon}, TITLE = {Eating Evil Enemies}, PUBLISHER = {Ethical Encouragement Press}, LOCATION = {Edinburgh}, YEAR = {2007}, } biblatex-biber-2.9/t/tdata/skips.bcf000444000153000001 25204413205066061 17051 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date year julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 labelnamespec shorteditor editor translator useeditor 0 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender skips.bib skip1 skip2 skip3 skip4 seta noseta nosetb nosetc presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort sortkey labelalpha sortname author editor translator sorttitle title sortyear year volume 0 sorttitle title shorthand biblatex-biber-2.9/t/tdata/sections4.bib000444000153000001 104413205066061 17565 0ustar00vboxother000000000000@BOOK{sect6, SHORTHAND = {MMMM}, AUTHOR = {Michael Mumford and Millie Mutherington}, TITLE = {Malodourous Muffins}, PUBLISHER = {Ming and Mink Press}, LOCATION = {Manchester}, YEAR = {2003}, } @PREAMBLE{"String for Preamble 4"} @BOOK{sect7, SHORTHAND = {PP}, AUTHOR = {Percy Pilkington}, TITLE = {Perhaps Penguins Prance}, PUBLISHER = {Possible Prattle Press}, LOCATION = {Pimlico}, YEAR = {2007}, } biblatex-biber-2.9/t/tdata/remote-files.bcf000444000153000001 24667113205066062 20325 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 88 minxrefs 2 sortcase 0 sortupper 1 alphaothers + labelalpha 0 labelnamespec author labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date year julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 1 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 labelnamespec author editor useprefix 1 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender http://www.citeulike.org/bibtex/group/8082 http://people.cs.uu.nl/hansb/graphs-bib/definitions.bib http://people.cs.uu.nl/hansb/graphs-bib/papers.bib https://api.zotero.org/groups/9097/items/II22KQ7D?format=bibtex&limit=1 citeulike:8283461 AbdelbarH98 merleau-ponty_philosophe_2010 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 biblatex-biber-2.9/t/tdata/xdata.bcf000444000153000001 24553313205066062 17027 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender xdata.bib xdata.bltxml xd1 xd2 xd3 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 biblatex-biber-2.9/t/tdata/encoding6.bcf000444000153000001 24535013205066062 17577 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date year julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 1 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 1 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 1 usetranslator 1 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender encoding6.bib * presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 biblatex-biber-2.9/t/tdata/sort.bib000444000153000001 175013205066061 16645 0ustar00vboxother000000000000@BOOK{L1, SHORTHAND = {\emph{A}}, SORTSHORTHAND = {A}, AUTHOR = {John Doe}, TITLE = {Algorithms For Sorting}, PUBLISHER = {A press}, LOCATION = {Cambridge}, YEAR = {1995}, } @BOOK{L2, SHORTHAND = {B}, AUTHOR = {John Doe}, TITLE = {Sorting Algorithms}, PUBLISHER = {A press}, LOCATION = {Cambridge}, YEAR = {1995}, } @BOOK{L3, SHORTHAND = {C}, AUTHOR = {John Doe}, TITLE = {More and More Algorithms}, PUBLISHER = {A press}, LOCATION = {Cambridge}, YEAR = {1995}, } @BOOK{L4, SHORTHAND = {D}, AUTHOR = {John Doe and others}, TITLE = {Some title about sorting}, PUBLISHER = {Another press}, LOCATION = {Cambridge}, YEAR = {1995}, } @BOOK{L5, SHORTHAND = {E}, AUTHOR = {John Doe and others}, TITLE = {Some other title about sorting}, PUBLISHER = {Another press}, LOCATION = {Cambridge}, YEAR = {1995}, } biblatex-biber-2.9/t/tdata/dateformats.bcf000444000153000001 25127113205066061 20232 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 1 usetranslator 0 labelnamespec shorteditor editor translator useeditor 0 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker datezeros autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender dateformats.bib L1 L2 L3 L4 L5 L6 L7 L8 L9 L10 L11 L12 L13 L14 L15 L16 L17 era1 era2 era3 era4 range1 range2 season1 time1 unspec1 unspec2 y1 y2 y3 open1 open2 presort sortkey labelalpha sortname author editor translator sorttitle title sortyear year volume 0 sorttitle title biblatex-biber-2.9/t/tdata/uniqueness6.bib000444000153000001 75313205066062 20126 0ustar00vboxother000000000000@article {entry1a, author = {Smith and Johnson and Doe}, year = 2005 } @article {entry1b, author = {Smith and Johnson and Doe}, year = 2005 } @article {entry2a, author = {Smith and Koe and Edwards}, year = 2005 } @article {entry2b, author = {Smith and Koe and Edwards}, year = 2005 } @article{A, author={A and B and C and D and E and F and G}, year={2007}, } @article{B, author={A and X and Y}, year={2008}, } @article{C, author={A and B and C and D and E and F and G}, year={2009}, } biblatex-biber-2.9/t/tdata/uniqueness1.bib000444000153000001 631713205066061 20142 0ustar00vboxother000000000000@ARTICLE{un1, AUTHOR = {John AAA}, YEAR = {1994}, } % Always good to have a repeated labelname entry as this is often an edge case @ARTICLE{un1a, AUTHOR = {John AAA}, YEAR = {1999}, } @ARTICLE{un2, AUTHOR = {J. AAA}, YEAR = {1999}, } @ARTICLE{un3, AUTHOR = {K. AAA}, YEAR = {1939}, } @ARTICLE{un4, AUTHOR = {Edward AAA}, YEAR = {1934}, } @ARTICLE{un4a, OPTIONS = {uniquename=false}, AUTHOR = {Edward AAA}, YEAR = {1934}, } @ARTICLE{un5, AUTHOR = {Jane AAA}, YEAR = {1983}, } % uniquelist not set because it's not ambiguous with un1 with max/minnames=1 because % un1 is "AAA" and un6 is "AAA et al". @ARTICLE{un6, AUTHOR = {John AAA and Mike BBB}, YEAR = {1921}, } @ARTICLE{un7, SHORTAUTHOR = {Chaps}, AUTHOR = {John AAA and Mike BBB}, YEAR = {1921}, } % test2 should have un=0 because minnames makes Brian Jones invisible @BOOK{test1, AUTHOR = {Paul Smith and Brian Jones and Peter Brown}, YEAR = {1900} } @BOOK{test2, AUTHOR = {Henry Jones}, YEAR = {1903} } @MISC{test3, AUTHOR = {John Blether and John Doe}, DATE = {2011} } @MISC{test4, AUTHOR = {John Blether and Jane Doe}, DATE = {2011} } @MISC{test5, AUTHOR = {John Blether and Edward Doe}, DATE = {2011} } % Testing repeated entries for un=1 @MISC{unt1, AUTHOR = {Jeremy Alton and Alan Rattle}, TITLE = {Title}, DATE = {2011} } @MISC{unt2, AUTHOR = {Jeremy Alton and Andrew Rattle}, TITLE = {Title}, DATE = {2011} } @MISC{unt3, AUTHOR = {Jeremy Alton and Edward Rattle}, TITLE = {Title}, DATE = {2011} } @MISC{unt4, AUTHOR = {Meredith Williams}, TITLE = {Title}, DATE = {2011} } @MISC{unt5, AUTHOR = {Michael Williams}, TITLE = {Title}, DATE = {2011} } % Testing repeated entries for un=2 @MISC{untf1, AUTHOR = {Simon Monocle and Walter Ripple}, TITLE = {Title}, DATE = {2011} } @MISC{untf2, AUTHOR = {Simon Monocle and Walter Ripple}, TITLE = {Title}, DATE = {2011} } @MISC{untf3, AUTHOR = {Simon Monocle and William Ripple}, TITLE = {Title}, DATE = {2011} } % Testing prefices/suffices @MISC{sp1, AUTHOR = {Greaves, Jr., Percy L.}, TITLE = {Title}, DATE = {2011} } @MISC{sp2, AUTHOR = {Greaves, Jr., Percy L.}, TITLE = {Title2}, DATE = {2012} } @MISC{sp3, AUTHOR = {von Greaves, Jr., Percy L.}, TITLE = {Title1}, DATE = {2012} } @MISC{sp4, AUTHOR = {von Greaves, Jr., Percy L.}, TITLE = {Title2}, DATE = {2012} } % This counts as the same as sp1 and sp2 because of the useprefix=false @MISC{sp5, OPTIONS = {useprefix=false}, AUTHOR = {von Greaves, Jr., Percy L.}, TITLE = {Title2}, DATE = {2012} } @MISC{sp6, AUTHOR = {von Mises, Jr., Percy L.}, TITLE = {Title1}, DATE = {2010} } @MISC{sp7, AUTHOR = {von Mises, Jr., Paul L.}, TITLE = {Title1}, DATE = {2010} } @MISC{sp8, AUTHOR = {Ralley, Percy L.}, TITLE = {Title1}, DATE = {2010} } @MISC{sp9, AUTHOR = {Ralley, Jr., Percy L.}, TITLE = {Title1}, DATE = {2010} } biblatex-biber-2.9/t/tdata/bibtex-aliases.bib000444000153000001 253213205066061 20551 0ustar00vboxother000000000000@PHDTHESIS{alias1, AUTHOR = {Sammy Student}, TITLE = {Four Years Later}, INSTITUTION = {University of Life}, ADDRESS = {Ivory Towers}, DATE = {2003-10-01}, } % driver-defined default map to MISC @THING{alias2, AUTHOR = {Samuel Strange}, TITLE = {Entitled}, ADDRESS = {Ivory Towers}, SCHOOL = {University of West Grantham}, INSTITUTION = {University of East Grantham}, DATE = {2004-03-03}, } % User-defined map to CUSTOMB @CHAT{alias3, AUTHOR = {Samuel Strange}, TITLE = {Hello}, } % User-defined map to CUSTOMA plus some alsosets (see tests) @CONVERSATION{alias4, AUTHOR = {Samuel Strange}, TITLE = {Hello}, PARTICIPANT = {Sam Smith}, VERBC = {sometext}, PUBMEDID = {anid}, } % User-defined map of string replacements and null maps @UNPUBLISHED{alias5, ABSTRACT = {Some abstract %50 of which is useless}, AUTHOR = {AAA and BBB and CCC and DDD and EEE}, TITLE = {A title}, DATE = {2003}, USERB = {test}, LISTA = {list test}, LISTB = {late and early}, LISTC = {late and early}, } % No target, just field additions @MISC{alias6, AUTHOR = {Brian Broom}, TITLE = {Bristles} } % No regexp match % Also testing append mode @REPORT{alias7, LISTA = {listaval}, VERBA = {val1}, VERBB = {val2}, VERBC = {val3}, } biblatex-biber-2.9/t/tdata/sort-case.bib000444000153000001 45613205066062 17541 0ustar00vboxother000000000000% Test of U::C case sensitivity and case ordering @BOOK{CS1, AUTHOR = {Albert, Edwin}, TITLE = {TITLE} } @BOOK{CS2, AUTHOR = {albert, Edwin}, TITLE = {title} } @BOOK{CS3, AUTHOR = {Albert, edwin}, TITLE = {The title} } biblatex-biber-2.9/t/tdata/full-bbl.bcf000444000153000001 25072213205066061 17420 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 0 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 1 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 1 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 1 usetranslator 1 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender full-bbl.bib F1a C1 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort shorthand sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 sortshorthand shorthand biblatex-biber-2.9/t/tdata/extratitleyear.bib000444000153000001 123413205066062 20722 0ustar00vboxother000000000000@BOOK{L1, TITLE = {Title 1}, YEAR = {1995}, PUBLISHER = {puba} } @BOOK{L2, TITLE = {Title 1}, YEAR = {1995}, PUBLISHER = {pubb} } @BOOK{L3, AUTHOR = {Jim Smith}, YEAR = {1995}, } @BOOK{L4, TITLE = {Title 1}, YEAR = {1996}, } @BOOK{L5, SHORTTITLE = {Title A}, TITLE = {Title 1}, YEAR = {1995}, } @BOOK{LY1, AUTHOR = {Arthur Example}, DATE = {2006/2009}, TITLE = {Some title} } @BOOK{LY2, AUTHOR = {Arthur Example}, DATE = {2006}, TITLE = {Some title} } @BOOK{LY3, AUTHOR = {Arthur Example}, DATE = {2006/}, TITLE = {Some title} } biblatex-biber-2.9/t/tdata/extradate.bib000444000153000001 522713205066061 17642 0ustar00vboxother000000000000@BOOK{L1, AUTHOR = {John Doe}, TITLE = {Title 1}, PUBLISHER = {Oxford}, YEAR = {1995}, } @BOOK{L2, AUTHOR = {John Doe}, TITLE = {Title 2}, PUBLISHER = {Oxford}, YEAR = {1995}, } @BOOK{L3, AUTHOR = {John Doe}, TITLE = {Title 3}, PUBLISHER = {Oxford}, YEAR = {1995}, } @BOOK{L4, AUTHOR = {John Doe and Albert Abrahams}, TITLE = {Title 1}, PUBLISHER = {Oxford}, YEAR = {1995}, } @BOOK{L5, AUTHOR = {John Doe and Albert Abrahams}, TITLE = {Title 2}, PUBLISHER = {Oxford}, YEAR = {1995}, } @BOOK{L6, AUTHOR = {John Doe and Albert Abrahams}, TITLE = {Title 1}, PUBLISHER = {Oxford}, YEAR = {1996}, } @BOOK{L7, AUTHOR = {John Doe and Albert Abrahams}, TITLE = {Title 2}, PUBLISHER = {Oxford}, YEAR = {1996}, } @BOOK{L8, AUTHOR = {Bill Shakespeare}, TITLE = {Works}, PUBLISHER = {Oxford}, DATE = {1985}, } @BOOK{L9, TITLE = {Title with no author}, DATE = {1985}, } @BOOK{L10, TITLE = {Another title with no author}, DATE = {1985}, } @BOOK{companion1, AUTHOR = {Goossens, M. and Mittelbach, F. and Samarin, A.}, DATE = {1994}, TITLE = {Some title} } @BOOK{companion2, AUTHOR = {Goossens, M. and Mittelbach, F.}, YEAR = {1994}, TITLE = {Some title} } @BOOK{companion3, AUTHOR = {Goossens, M.}, DATE = {1994}, TITLE = {Some title} } @BOOK{vangennep, OPTIONS = {useprefix}, AUTHOR = {van Gennep, Arnold}, DATE = {1909}, TITLE = {Some title} } @BOOK{gennep, AUTHOR = {van Gennep, Arnold}, DATE = {1909}, TITLE = {Some title} } @BOOK{LY1, AUTHOR = {Arthur Example}, DATE = {2006/2009}, TITLE = {Some title} } @BOOK{LY2, AUTHOR = {Arthur Example}, DATE = {2006}, TITLE = {Some title} } @BOOK{LY3, AUTHOR = {Arthur Example}, DATE = {2006/}, TITLE = {Some title} } % Testing no date @BOOK{nodate1, AUTHOR = {Neil Nodate}, TITLE = {Testing}, } @BOOK{nodate2, AUTHOR = {Neil Nodate}, TITLE = {Testing 2}, } % Testing custom scopes for extradate @BOOK{ed1, AUTHOR = {Percival Prudent}, DATE = {2001-01-03} } @BOOK{ed2, AUTHOR = {Percival Prudent}, DATE = {2001-02-03} } @BOOK{ed3, AUTHOR = {Randolph Reluctant}, DATE = {2001} } @BOOK{ed4, AUTHOR = {Randolph Reluctant}, DATE = {2001} } @BOOK{ed5, AUTHOR = {Quentin Querulous}, DATE = {2001-01-03T15:00:00} } @BOOK{ed6, AUTHOR = {Quentin Querulous}, DATE = {2001-01-03T15:00:00} } @BOOK{ed7, AUTHOR = {Stephen Swarve}, DATE = {2001-01-03} } @BOOK{ed8, AUTHOR = {Stephen Swarve}, DATE = {2001-01-03/} } biblatex-biber-2.9/t/tdata/crossrefs.bcf000444000153000001 23764213205066061 17740 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 1 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 0 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 1 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 1 uniquebaretitle 0 uniquework 1 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker datezeros autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender crossrefs.bib cr1 cr2 cr3 cr4 cr6 cr7 cr8 crt xr1 xr2 xr3 xr4 xrt mxr mcr ccr1 ccr2 ccr3 ccr4 circ1 circ2 circ3 r1 s1 s2 xc1 b1 b2 sup2 sup3 al1 crossrefs.bib cr5 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 biblatex-biber-2.9/t/tdata/xdata.bltxml000444000153000001 123713205066062 17526 0ustar00vboxother000000000000 Москва bltxxd2 bltxxd3 An abstract venue biblatex-biber-2.9/t/tdata/encoding5.bib000444000153000001 21313205066062 17503 0ustar00vboxother000000000000% This is a UTF-8 encoded file @BOOK{test, AUTHOR = {Edward Encalcer}, YEAR = {1999}, TITLE = {à titlé}, PUBLISHER = {A press} } biblatex-biber-2.9/t/tdata/sort-uc.bcf000444000153000001 25271413205066062 17321 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 1 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender sort-uc.bib LS1 LS2 LS3 LS4 LS5 LS6 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort sortkey sortname author editor translator sorttitle title sortyear year sorttitle title volume 0 presort sortkey sortname author editor translator sorttitle title title title shorthand shorthand biblatex-biber-2.9/t/tdata/basic-misc.bcf000444000153000001 25262213205066062 17735 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 0 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 1 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 1 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 1 usetranslator 1 uniquetitle 1 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker datezeros autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix family given mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute urls abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender examples.bib examples.bib murray t1 t2 kant:ku kant:kpv shore missing1 missing2 anon1 anon2 u1 u2 alias1 alias2 alias6 us1 list1 isbn1 isbn2 issn1 markey ent1 verb1 over1 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 sortshorthand shorthand shorthand biblatex-biber-2.9/t/tdata/related.bib000444000153000001 471213205066062 17300 0ustar00vboxother000000000000@ARTICLE{key1, IDS = {key1alias}, RELATED = {key2,key3,missing1}, RELATEDTYPE = {reprintas}, AUTHOR = {Author}, TITLE = {Original Title}, JOURNALTITLE = {Journal Title}, VOLUME = {12}, NUMBER = {5}, DATE = {1998}, PAGES = {125--150}, SHORTHAND = {RK1} } @INBOOK{key2, RELATED = {key1alias}, RELATEDTYPE = {reprintof}, RELATEDSTRING = {First}, AUTHOR = {Author}, TITLE = {Reprint Title}, BOOKTITLE = {Booktitle}, LOCATION = {Location}, PUBLISHER = {Publisher}, DATE = {2009}, PAGES = {34--60}, SHORTHAND = {RK2} } @INBOOK{key3, RELATED = {key4}, RELATEDTYPE = {translationof}, AUTHOR = {Author}, TITLE = {Reprint Title}, BOOKTITLE = {Booktitle}, LOCATION = {Location}, PUBLISHER = {Publisher2}, DATE = {2010}, PAGES = {33--57}, SHORTHAND = {RK3} } @INBOOK{key4, OPTIONS = {useeditor=false,uniquename=false}, AUTHOR = {Author}, TITLE = {Orig Language Title}, BOOKTITLE = {Booktitle}, LOCATION = {Location}, PUBLISHER = {Publisher2}, DATE = {2011}, PAGES = {33--57}, SHORTHAND = {RK4} } @BOOK{c1, RELATED = {c2}, } @BOOK{c2, RELATED = {c3, missing2}, } @BOOK{c3, RELATED = {c2, missing3}, } % Test custom relatedoptions @BOOK{s1, AUTHOR = {Author}, title = {Title 1} } @BOOK{s2, AUTHOR = {Author}, TITLE = {Title 2}, RELATED = {s1}, RELATEDSTRING = {Related Book:}, RELATEDOPTIONS = {dataonly,skipbib=false,usecustom=false} } @BOOK{kullback, AUTHOR = {Kullback, Solomon}, TITLE = {Information Theory and Statistics}, YEAR = 1959, PUBLISHER = {John Wiley \& Sons}, LOCATION = {New York}, LANGID = {english}, LANGIDOPTS = {variant=american}, } @BOOK{kullback:related, AUTHOR = {Kullback, Solomon}, TITLE = {Information Theory and Statistics}, YEAR = 1997, PUBLISHER = {Dover Publications}, LOCATION = {New York}, LANGID = {english}, LANGIDOPTS = {variant=american}, RELATED = {kullback}, RELATEDTYPE = {origpubin}, ANNOTATION = {A reprint of the \texttt{kullback} entry. Note the format of the \texttt{related} and \texttt{relatedtype} fields}, } biblatex-biber-2.9/t/tdata/encoding2.bib000444000153000001 21713205066062 17504 0ustar00vboxother000000000000% This is a UTF-8 encoded file @BOOK{testŠ, YEAR = {1999}, AUTHOR = {Edward Encalcer}, TITLE = {Šome title}, PUBLISHER = {A press} } biblatex-biber-2.9/t/tdata/uniqueness2.bcf000444000153000001 24535213205066062 20206 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date year julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 1 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 1 uniquename 2 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 1 usetranslator 1 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender uniqueness2.bib * presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 biblatex-biber-2.9/t/tdata/datalists.bltxml000444000153000001 224313205066061 20412 0ustar00vboxother000000000000 Xavier Xanax One Moscow Publisher 1983 Arthur Allen Two Moscow Publisher 1983 biblatex-biber-2.9/t/tdata/uniqueness5.bcf000444000153000001 24535213205066062 20211 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date year julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 1 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 1 uniquename 2 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 1 usetranslator 1 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender uniqueness5.bib * presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 biblatex-biber-2.9/t/tdata/sections-complex.bcf000444000153000001 25275413205066061 21224 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 labelnamespec shorteditor editor translator useeditor 0 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename MOVIE prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender labelalpha.bib L1 L2 L3 L4 m1 labelalpha.bib L5 L6 L7 L8 m1 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort sortkey labelalpha sortname author editor translator sorttitle title sortyear year volume 0 sorttitle title biblatex-biber-2.9/t/tdata/full-bibtex_biber.bib000444000153000001 506213205066062 21237 0ustar00vboxother000000000000@INCOLLECTION{westfahl:space, AUTHOR = {Westfahl, Gary}, ANNOTATION = {A cross-referenced article from a \texttt{collection}. This is an \texttt{incollection} entry with a \texttt{crossref} field. Note the \texttt{subtitle} and \texttt{indextitle} fields}, CROSSREF = {westfahl:frontier}, INDEXTITLE = {True Frontier, The}, LANGID = {english}, LANGIDOPTS = {variant=american}, PAGES = {55--65}, SUBTITLE = {Confronting and Avoiding the Realities of Space in American Science Fiction Films}, TITLE = {The True Frontier}, } @ARTICLE{kastenholz, ABSTRACT = {The computation of ionic solvation free energies from atomistic simulations is a surprisingly difficult problem that has found no satisfactory solution for more than 15 years. The reason is that the charging free energies evaluated from such simulations are affected by very large errors. One of these is related to the choice of a specific convention for summing up the contributions of solvent charges to the electrostatic potential in the ionic cavity, namely, on the basis of point charges within entire solvent molecules (M scheme) or on the basis of individual point charges (P scheme). The use of an inappropriate convention may lead to a charge-independent offset in the calculated potential, which depends on the details of the summation scheme, on the quadrupole-moment trace of the solvent molecule, and on the approximate form used to represent electrostatic interactions in the system. However, whether the M or P scheme (if any) represents the appropriate convention is still a matter of on-going debate. The goal of the present article is to settle this long-standing controversy by carefully analyzing (both analytically and numerically) the properties of the electrostatic potential in molecular liquids (and inside cavities within them).}, AUTHOR = {Kastenholz, M. A. and H{ü}nenberger, Philippe H.}, ANNOTATION = {An \texttt{article} entry with an \texttt{eid} and a \texttt{doi} field. Note that the \textsc{doi} is transformed into a clickable link if \texttt{hyperref} support has been enabled}, DATE = {2006}, DOI = {10.1063/1.2172593}, EID = {124106}, INDEXTITLE = {Computation of ionic solvation free energies}, JOURNALTITLE = {J.~Chem. Phys.}, LANGID = {english}, LANGIDOPTS = {variant=american}, SUBTITLE = {I. The electrostatic potential in molecular liquids}, TITLE = {Computation of methodology\hyphen independent ionic solvation free energies from molecular simulations}, VOLUME = {124}, } biblatex-biber-2.9/t/tdata/annotations.bcf000444000153000001 23376413205066061 20265 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 0 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec gregorianstart controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv julian useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker datezeros autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix labelalphanametemplatename uniquenametemplatename sortingnamekeytemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender annotations.bib ann1 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 biblatex-biber-2.9/t/tdata/biber-test.conf000444000153000001 16235713205066061 20162 0ustar00vboxother000000000000 testlocale 5 prefix family given prefix family shorthand label labelname labelname year doesnotexist.bib examples.bib doesnotexist.bib ARTICLE UNPUBLISHED examples.bib MISC examples.bib examples.bib REPORT UNPUBLISHED ONLINE ONLINE ONLINE sf,sm,sn,pf,pm,pn,pp prefix,family,suffix,given boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata day endday endmonth eventday eventendday eventendmonth eventmonth eventyear origday origendday origendmonth origmonth origyear urlday urlendday urlendmonth urlmonth urlyear abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished hyphenation indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label library mainsubtitle maintitle maintitleaddon nameaddon note number origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthand shorthandintro shortjournal shortseries shorttitle subtitle title titleaddon usera userb userc userd usere userf venue version volume volumes month year urlendyear endyear eventendyear origendyear sorttitle sortshorthand sortyear sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec shortauthor shorteditor translator sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref xdata ids entryset date eventdate origdate urldate doi eprint file verba verbb verbc url keywords related options relatedoptions pages execute with writer producer execproducer director abstractloc doubtfulauthor doubtfuldate titleisdescription newspaper urldescription abstracturl abstract annotation authortype bookpagination crossref entryset entrysubtype execute file gender hyphenation ids indextitle indexsorttitle isan ismn iswc keywords label library lista listb listc listd liste listf nameaddon options origday origendday origendmonth origendyear origmonth origyear origlocation origpublisher origtitle pagination presort related relatedtype relatedstring shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear usera userb userc userd usere userf verba verbb verbc xdata xref set entryset crossref article author journaltitle title day endday endmonth endyear month year addendum annotator commentator doi editor editora editorb editorc editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle language note number origlanguage pages pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear version volume bibnote note book author title day endday endmonth endyear month year addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes mvbook author title day endday endmonth endyear month year addendum afterword annotator commentator doi edition editor editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes inbook bookinbook suppbook author title booktitle day endday endmonth endyear month year addendum afterword annotator bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes booklet author editor title day endday endmonth endyear month year addendum chapter doi eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle titleaddon type url urlday urlendday urlendmonth urlendyear urlmonth urlyear collection reference editor title day endday endmonth endyear month year addendum afterword annotator chapter commentator doi edition editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes mvcollection mvreference author title day endday endmonth endyear month year addendum afterword annotator commentator doi edition editor editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes incollection suppcollection inreference author editor title booktitle day endday endmonth endyear month year addendum afterword annotator booksubtitle booktitleaddon chapter commentator doi edition editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle titleaddon translator url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume volumes manual title day endday endmonth endyear month year addendum author chapter doi edition editor eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle titleaddon type url urlday urlendday urlendmonth urlendyear urlmonth urlyear version misc title day endday endmonth endyear day endday endmonth endyear month year addendum author doi editor eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle titleaddon type url urlday urlendday urlendmonth urlendyear urlmonth urlyear version online title url addendum author editor language month note organization pubstate subtitle titleaddon urlday urlendday urlendmonth urlendyear urlmonth urlyear version year patent author title number day endday endmonth endyear month year addendum doi eprint eprintclass eprinttype holder location note pubstate subtitle titleaddon type url urlday urlendday urlendmonth urlendyear urlmonth urlyear version periodical editor title day endday endmonth endyear month year addendum doi editora editorb editorc editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate series subtitle url urlday urlendday urlendmonth urlendyear urlmonth urlyear volume mvproceedings editor title day endday endmonth endyear month year addendum doi eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear venue volumes proceedings editor title day endday endmonth endyear month year addendum chapter doi eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear venue volume volumes inproceedings author editor title booktitle day endday endmonth endyear month year addendum booksubtitle booktitleaddon chapter doi eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear venue volume volumes report author title type institution day endday endmonth endyear month year addendum chapter doi eprint eprintclass eprinttype isrn language location note number pages pagetotal pubstate subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear version thesis author title type institution day endday endmonth endyear month year addendum chapter doi eprint eprintclass eprinttype language location note pages pagetotal pubstate subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear unpublished author title day endday endmonth endyear month year addendum howpublished language location note pubstate subtitle titleaddon url urlday urlendday urlendmonth urlendyear urlmonth urlyear article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author editor title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender biblatex-biber-2.9/t/tdata/full-bbl.bbl000444000153000001 716413205066062 17366 0ustar00vboxother000000000000% $ biblatex auxiliary file $ % $ biblatex bbl format version 2.9 $ % Do not modify the above lines! % % This is an auxiliary file used by the 'biblatex' package. % This file may safely be deleted. It will be recreated by % biber as required. % \begingroup \makeatletter \@ifundefined{ver@biblatex.sty} {\@latex@error {Missing 'biblatex' package} {The bibliography requires the 'biblatex' package.} \aftergroup\endinput} {} \endgroup \refsection{0} \datalist[entry]{custom/global//global/global} \entry{F1}{book}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}, givenun=0}}% } \strng{namehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{fullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{bibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorbibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \field{labelalpha}{\emph{A}} \field{sortinit}{A} \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b} \true{singletitle} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{shorthand}{\emph{A}} \field{title}{The Fullness of Times} \field{year}{1995} \endentry \enddatalist \datalist[list]{shorthand/global//global/global} \entry{F1}{book}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}, givenun=0}}% } \strng{namehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{fullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{bibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorbibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \field{labelalpha}{\emph{A}} \field{sortinit}{A} \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b} \true{singletitle} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{shorthand}{\emph{A}} \field{title}{The Fullness of Times} \field{year}{1995} \endentry \enddatalist \datalist[entry]{nty/global//global/global} \entry{F1}{book}{} \name{author}{1}{}{% {{uniquename=0,uniquepart=base,hash=bd051a2f7a5f377e3a62581b0e0f8577}{% family={Doe}, familyi={D\bibinitperiod}, given={John}, giveni={J\bibinitperiod}, givenun=0}}% } \strng{namehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{fullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{bibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorbibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577} \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577} \field{labelalpha}{\emph{A}} \field{sortinit}{D} \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8} \true{singletitle} \field{labelnamesource}{author} \field{labeltitlesource}{title} \field{shorthand}{\emph{A}} \field{title}{The Fullness of Times} \field{year}{1995} \endentry \enddatalist \keyalias{F1a}{F1} \missing{C1} \endrefsection \endinput biblatex-biber-2.9/t/tdata/general.bcf000444000153000001 33203113205066062 17331 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec author labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date year julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 1 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 1 usetranslator 1 usenamea 1 useeditora 1 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix family given mm ww year title sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender examples.bib stdmodel knuth:ct angenendtsk angenendtsa stdmodel:glashow stdmodel:ps_sc murray aristotle:anima aristotle:rhetoric augustine cotton chiu moraux jaffe luzzatto hasan t1 tvonb lne1 labelstest sn1 snk1 ent1 avona rvonr others1 others2 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort sortkey sortname author editor translator sorttitle title sorttitle title year volume presort sortkey sortname author editor translator sorttitle title sorttitle title year volume presort sortkey sortname author editor translator sorttitle title sorttitle title year volume presort sortkey sortname author editor translator sorttitle title sorttitle title year volume presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume presort sortkey sortname author editor translator sorttitle title sorttitle title year volume presort sortkey sortname author editor translator sorttitle title sorttitle title year volume presort sortkey sortname author editor translator sorttitle title sorttitle title year volume presort sortkey sortname author editor translator sorttitle title sorttitle title year volume presort sortkey sortname author editor translator sorttitle title sorttitle title year volume presort sortkey sortname author editor translator sorttitle title sortyear year sorttitle title volume 0 presort labelalpha sortkey sortname author editor translator sorttitle title sortyear year sorttitle title sorttitle presort labelalpha sortkey sortname author editor translator sorttitle title sortyear year volume sorttitle title presort sortkey sortname author editor translator sorttitle title sortyear year volume sorttitle title presort sortkey sortname author editor translator sorttitle title editor translator sorttitle title labelyear volume year month day endyear endmonth endday origyear origmonth origday origendyear origendmonth origendday eventendyear eventendmonth eventendday eventyear eventmonth eventday urlendyear urlendmonth urlendday urlyear urlmonth urlday editoratype editor editora publisher location institution presort sortkey sortyear labelyear 9999 sortname author editor translator sorttitle title sorttitle title presort sortkey sortyear labelyear 9999 sortname author editor translator sorttitle title sorttitle title entrykey labelyear labelmonth labelday sortname author citeorder biblatex-biber-2.9/t/tdata/datalists.bcf000444000153000001 26603013205066062 17711 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 1 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix given family a family Z family mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender datalists.bib datalists.bltxml K1 K2 K3 K4 K5 K6 K7 K8 K9 K10 K11 K12 datalists.bib D1 D2 D3 D4 D5 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 citeorder author author year year title title title note publisher publisher verba key2 thesis key1 verba rubbish author verba rubbish biblatex-biber-2.9/t/tdata/sort-order.bib000444000153000001 470313205066062 17760 0ustar00vboxother000000000000@ARTICLE{L1, AUTHOR = {Aaron Adamson}, TITLE = {Artificial Advice}, PUBLISHER = {Aardvark Press}, LOCATION = {Arlington}, VOLUME = {4}, YEAR = {1995}, } @ARTICLE{L1A, AUTHOR = {Aaron Adamson}, TITLE = {Anarchic Ambidexstrous Anomalies}, PUBLISHER = {Aardvark Press}, LOCATION = {Arlington}, VOLUME = {40}, YEAR = {1995}, } @ARTICLE{L1B, AUTHOR = {Aaron Adazki}, TITLE = {Average Attitudes Are Awful}, PUBLISHER = {Aardvark Press}, LOCATION = {Arlington}, YEAR = {1984}, } @ARTICLE{L2, AUTHOR = {Brian Britherthwaite}, TITLE = {Best Barnacled Boat Bottoms}, PUBLISHER = {British Bulldog Press}, LOCATION = {Bridlington}, YEAR = {2004}, } @ARTICLE{L3, AUTHOR = {Clive Clumberton}, TITLE = {Clumsy Cultural Caveats}, SUBTITLE = {Counter-cultural Concepts}, PUBLISHER = {Clapp and Clopp Press}, LOCATION = {Cambridge}, YEAR = {1914}, } @BOOK{L4, AUTHOR = {Derek Ditherington and David Dumpton}, TITLE = {Dangerous Dames}, SUBTITLE = {Don't Dally Dude!}, PUBLISHER = {Dright and Drought Press}, LOCATION = {Dunbar}, YEAR = {2003}, } @BOOK{L5, SORTKEY = {aaaaaaa}, AUTHOR = {Edward E. Ethoxon}, TITLE = {Eating Evil Enemies}, PUBLISHER = {Ethical Encouragement Press}, LOCATION = {Edinburgh}, YEAR = {2007}, } @BOOK{L6, AUTHOR = {Richard F. Rank}, TITLE = {Ruminating on Rhubarb}, PUBLISHER = {Red, Raw and Raucous}, LOCATION = {edinburgh}, YEAR = {2011}, } @BOOK{L7, AUTHOR = {Peter Pettigrew}, TITLE = {The Pretending Peanuts Pout}, PUBLISHER = {Nut Press}, LOCATION = {Edinburgh}, YEAR = {2010}, } @BOOK{L8, AUTHOR = {Lawrence Langour}, TITLE = {Why Walnuts Won't}, PUBLISHER = {Nut Press}, LOCATION = {Edinburgh}, YEAR = {2009}, } @BOOK{L9, AUTHOR = {Steven Sensible}, TITLE = {Sorting Sucks Eggs}, PUBLISHER = {Yolk Enterprises}, LOCATION = {London} } biblatex-biber-2.9/t/tdata/sections2.bib000444000153000001 104013205066061 17557 0ustar00vboxother000000000000@ARTICLE{sect3, AUTHOR = {Clive Clumberton}, TITLE = {Clumsy Cultural Caveats}, SUBTITLE = {Counter-cultural Concepts}, PUBLISHER = {Clapp and Clopp Press}, LOCATION = {Cambridge}, YEAR = {1914}, } @ARTICLE{sect8, SHORTHAND = {JJ}, AUTHOR = {Jimmy Johnson}, TITLE = {Jovial Jamborees}, PUBLISHER = {Jasper and Jiff}, LOCATION = {Johannesburg}, YEAR = {1938}, } @PREAMBLE{"String for Preamble 3"}biblatex-biber-2.9/t/tdata/tool.bib000444000153000001 407713205066062 16641 0ustar00vboxother000000000000@UNPUBLISHED{i3Š, OPTIONS = {useprefix=false}, ABSTRACT = {Some abstract %50 of which is useless}, AUTHOR = {AAA and BBB and CCC and DDD and EEE}, TITLE = {Š title}, DATE = {2003}, USERB = {test}, LOCATION = {one and two}, LISTA = {list test}, LISTB = {late and early}, LISTC = {late and early}, KEYWORDS = {keyword, keyword2,keyword3}, } @COMMENT{Comment 1} @BOOK{xd1, AUTHOR = {Edward Paul Ellington}, XDATA = {macmillanalias, missingxd} } @XDATA{macmillan, IDS = {macmillanalias}, YEAR = {2001}, XDATA = {macmillan:pubALIAS, macmillan:loc} } @COMMENT{ Comment 2 } @XDATA{macmillan:pub, IDS = {macmillan:pubALIAS}, PUBLISHER = {Macmillan} } @XDATA{macmillan:loc, LOCATION = {New York and London}, NOTE = {A Note} } @COMMENT{jabref-meta: groupstree: 0 AllEntriesGroup:; 1 ExplicitGroup:Doktorandkurser\;2\;; 2 KeywordGroup:Från könsroll till genus\;0\;course\;UCGS Från könsrolltill genus\;0\;0\;; 2 KeywordGroup:Historiska och filosofiska perspektiv på psykologi\;0\;course\;Historiska och filosofiska perspektiv på psykologi\;0\;0\;; 2 KeywordGroup:Kurs i introduktion\;0\;course\;Kurs i introduktion\;0\;0\;; 2 KeywordGroup:Fenomenologi, kön och genus\;0\;course\;UCGS Fenomenologi\;0\;0\;; 2 KeywordGroup:Quantitative Research Methods\;0\;course\;QMR\;0\;0\;; 2 KeywordGroup:Multivariate Analysis\;0\;course\;MVA\;1\;0\;; } @BOOK{b1, TITLE = {Booktitle}, TITLE+an = {=ann1, ann2}, LOCATION = {London and Edinburgh}, LOCATION+an = {1=ann1; 2=ann2}, YEAR = {1999}, CROSSREF = {mvalias} } @MVBOOK{mv1, IDS = {mvalias}, TITLE = {Maintitle}, SUBTITLE = {Mainsubtitle}, TITLEADDON = {Maintitleaddon} } % Test reconstructing datetimes @BOOK{dt1, DATE = {2004-04-25T14:34:00/2004-04-05T14:37:06}, ORIGDATE = {2004-04-25T14:34:00Z/2004-04-05T14:34:05Z}, EVENTDATE = {2004-04-25T14:34:00+05:00/2004-04-05T15:34:00+05:00}, URLDATE = {2004-04-25T14:34:00/2004-04-05T15:00:00} } @ARTICLE{m1, DATE = {2017}, JOURNALTITLE = {A Journal}, } biblatex-biber-2.9/t/tdata/labelalphaname.bcf000444000153000001 26141313205066062 20647 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 1 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 1 usetranslator 1 useforeword 1 useholder 1 labelnamespec shorteditor editor translator useeditor 0 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family given family given family given family given family shorthand label labelname labelname year origday shorthand label labelname labelname year origday & labelname title year label labelname - title title labelname labelname labelname title labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender labelalphaname.bib lant1 lant2 lant3 lant4 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort sortkey labelalpha sortname author editor translator sorttitle title sortyear year sorttitle title volume 0 biblatex-biber-2.9/t/tdata/uniqueness4.bcf000444000153000001 25021713205066061 20203 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date year julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 1 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 1 uniquename 2 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 1 usetranslator 1 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender uniqueness4.bib us1 us2 us3 us4 us5 us6 us7 us8 us9 us10 us11 us12 us13 us14 us15 us16 us17 us18 us19 us20 us21 us22 us23 us24 us25 us26 us27 us27a us28 us29 us29a us30 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 biblatex-biber-2.9/t/tdata/uniqueness-nameparts.bcf000444000153000001 25203213205066061 22104 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date year julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 1 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 1 uniquename 2 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 1 usetranslator 1 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family given middle shorthand label labelname labelname year labelyear year prefix family given middle prefix family given middle prefix family given middle family middle family middle family middle prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,middle,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender uniqueness-nameparts.bib un1 un2 un3 un4 un5 un6 un7 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 biblatex-biber-2.9/t/tdata/uniqueness3.bcf000444000153000001 24620313205066062 20203 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date year julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 1 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 1 uniquename 2 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 1 usetranslator 1 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender uniqueness3.bib ey1 ey1a ey2 ey3 ey4 ey5 ey6 ey7 ey8 ey9 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 biblatex-biber-2.9/t/tdata/full-dot.bcf000444000153000001 25303113205066062 17444 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 0 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 1 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 1 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 1 usetranslator 1 translit uniquenametemplate datamodel labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename uniqueprimaryauthor uniquetitle uniquebaretitle uniquework singletitle defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename uniqueprimaryauthor uniquetitle uniquebaretitle uniquework singletitle useprefix skipbib skiplos skipbiblist skiplab dataonly labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender full-dot.bib cr1 cr2 cr3 cr4 cr6 cr7 cr8 crt xr1 xr2 xr3 xr4 xrt mxr mcr ccr1 ccr2 ccr3 ccr4 r1 xd1 xd2 full-dot.bib DynSet cr5 Static1 Static2 Dynamic1 rel1 rel2 rel3 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 shorthand shorthand biblatex-biber-2.9/t/tdata/biblatexml.bltxml000444000153000001 737613205066062 20562 0ustar00vboxother000000000000 useprefix=false bltx1a1 bltx1a2 Павел Георгиевич Булгаков von Борис-ZZ Aбрамович Розенфельд von Ашраф Ахмедович Aхмедов Paul Smith John Brown John Brown Мухаммад ибн муса ал-Хорезми. Около 783 – около 850 Москва Наука russian Научно-биографическая литература usera userb userc userd a 198u -0356 1990-05-16 1990-05-17 1991~ 240 1 10 30 34 biblatex-biber-2.9/t/tdata/sort-complex.bcf000444000153000001 25144013205066062 20354 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 1 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 labelnamespec shorteditor editor translator useeditor 0 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender sort.bib L1 L2 L3 L4 L5 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort sortkey labelalpha sortname author editor translator sorttitle title sortyear year sorttitle title volume 0 shorthand biblatex-biber-2.9/t/tdata/examples.bib000444000153000001 17037113205066062 17543 0ustar00vboxother000000000000@STRING{anch-ie = {Angew.~Chem. Int.~Ed.} } @STRING{cup = {Cambridge University Press} } @STRING{dtv = {Deutscher Taschenbuch-Verlag} } @STRING{hup = {Harvard University Press} } @STRING{jams = {J.~Amer. Math. Soc.} } @STRING{jchph = {J.~Chem. Phys.} } @STRING{jomch = {J.~Organomet. Chem.} } @STRING{pup = {Princeton University Press} } @InCollection{westfahl:space, crossref = {westfahl:frontier}, langid = {english}, langidopts = {variant=american}, author = {Westfahl, Gary}, indextitle = {True Frontier, The}, title = {The True Frontier}, subtitle = {Confronting and Avoiding the Realities of Space in American Science Fiction Films}, pages = {55--65}, annotation = {A cross-referenced article from a \texttt{collection}. This is an \texttt{incollection} entry with a \texttt{crossref} field. Note the \texttt{subtitle} and \texttt{indextitle} fields} } @Set{set, crossref = {set:herrmann}, entryset = {set:herrmann,set:aksin,set:yoon}, annotation = {A \texttt{set} entry with three members. Note the \texttt{entryset} and \texttt{crossref} fields. The cross-reference must point to the first member of the set} } @Set{stdmodel, crossref = {stdmodel:glashow}, entryset = {stdmodel:glashow,stdmodel:weinberg,stdmodel:salam}, annotation = {A \texttt{set} entry with three members discussing the standard model of particle physics.} } @Set{stdmodel:ps_sc, presort = {zs}, crossref = {stdmodel:glashow}, entryset = {stdmodel:glashow,stdmodel:weinberg,stdmodel:salam}, annotation = {A \texttt{set} entry with three members discussing the standard model of particle physics. Note the \texttt{entryset} and \texttt{crossref} fields. The cross-reference must point to the first member of the set} } @Article{angenendt, langid = {german}, author = {Angenendt, Arnold}, indextitle = {In Honore Salvatoris}, title = {In Honore Salvatoris~-- Vom Sinn und Unsinn der Patrozinienkunde}, shorttitle = {In Honore Salvatoris}, journaltitle = {Revue d'Histoire Eccl{\'e}siastique}, volume = {97}, year = {2002}, pages = {431--456, 791--823}, annotation = {A German article in a French journal. Apart from that, a typical \texttt{article} entry. Note the \texttt{indextitle} field} } @Article{angenendtsk, sortkey = {AATESTKEY}, langid = {german}, author = {Angenendt, Arnold}, indextitle = {In Honore Salvatoris}, title = {In Honore Salvatoris~-- Vom Sinn und Unsinn der Patrozinienkunde}, shorttitle = {In Honore Salvatoris}, journaltitle = {Revue d'Histoire Eccl{\'e}siastique}, volume = {97}, year = {2002}, pages = {431--456, 791--823}, annotation = {A German article in a French journal. Apart from that, a typical \texttt{article} entry. Note the \texttt{indextitle} field} } @Article{angenendtsa, langid = {german}, shortauthor = {AA}, author = {Angenendt, Arnold}, indextitle = {In Honore Salvatoris}, title = {In Honore Salvatoris~-- Vom Sinn und Unsinn der Patrozinienkunde}, shorttitle = {In Honore Salvatoris}, journaltitle = {Revue d'Histoire Eccl{\'e}siastique}, volume = {97}, year = {2002}, pages = {431--456, 791--823}, annotation = {A German article in a French journal. Apart from that, a typical \texttt{article} entry. Note the \texttt{indextitle} field} } @Article{baez/article, langid = {english}, langidopts = {variant=american}, author = {Baez, John C. and Lauda, Aaron D.}, title = {Higher-Dimensional Algebra V: 2-Groups}, journaltitle = {Theory and Applications of Categories}, volume = {12}, version = {3}, date = {2004}, pages = {423--491}, eprint = {math/0307200v3}, eprinttype = {arxiv}, annotation = {An \texttt{article} with \texttt{eprint} and \texttt{eprinttype} fields. Note that the arXiv reference is transformed into a clickable link if \texttt{hyperref} support has been enabled. Compare \texttt{baez\slash online} which is the same item given as an \texttt{online} entry} } @Article{bertram, langid = {english}, langidopts = {variant=american}, author = {Bertram, Aaron and Wentworth, Richard}, title = {Gromov invariants for holomorphic maps on Riemann surfaces}, shorttitle = {Gromov invariants}, journaltitle = jams, volume = {9}, number = {2}, year = {1996}, pages = {529--571}, annotation = {An \texttt{article} entry with a \texttt{volume} and a \texttt{number} field} } @Article{gillies, langid = {english}, langidopts = {variant=british}, author = {Gillies, Alexander}, title = {Herder and the Preparation of Goethe's Idea of World Literature}, journaltitle = {Publications of the English Goethe Society}, volume = {9}, series = {newseries}, year = {1933}, pages = {46--67}, annotation = {An \texttt{article} entry with a \texttt{series} and a \texttt{volume} field. Note that format of the \texttt{series} field in the database file} } @Article{kastenholz, langid = {english}, langidopts = {variant=american}, author = {Kastenholz, M. A. and H{\"u}nenberger, Philippe H.}, indextitle = {Computation of ionic solvation free energies}, title = {Computation of methodology\hyphen independent ionic solvation free energies from molecular simulations}, subtitle = {I. The electrostatic potential in molecular liquids}, journaltitle = jchph, volume = {124}, eid = {124106}, year = {2006}, doi = {10.1063/1.2172593}, annotation = {An \texttt{article} entry with an \texttt{eid} and a \texttt{doi} field. Note that the \textsc{doi} is transformed into a clickable link if \texttt{hyperref} support has been enabled}, abstract = {The computation of ionic solvation free energies from atomistic simulations is a surprisingly difficult problem that has found no satisfactory solution for more than 15 years. The reason is that the charging free energies evaluated from such simulations are affected by very large errors. One of these is related to the choice of a specific convention for summing up the contributions of solvent charges to the electrostatic potential in the ionic cavity, namely, on the basis of point charges within entire solvent molecules (M scheme) or on the basis of individual point charges (P scheme). The use of an inappropriate convention may lead to a charge-independent offset in the calculated potential, which depends on the details of the summation scheme, on the quadrupole-moment trace of the solvent molecule, and on the approximate form used to represent electrostatic interactions in the system. However, whether the M or P scheme (if any) represents the appropriate convention is still a matter of on-going debate. The goal of the present article is to settle this long-standing controversy by carefully analyzing (both analytically and numerically) the properties of the electrostatic potential in molecular liquids (and inside cavities within them).} } @Article{murray, langid = {english}, langidopts = {variant=american}, author = {Hostetler, Michael J. and Wingate, Julia E. and Zhong, Chuan-Jian and Harris, Jay E. and Vachet, Richard W. and Clark, Michael R. and Londono, J. David and Green, Stephen J. and Stokes, Jennifer J. and Wignall, George D. and Glish, Gary L. and Porter, Marc D. and Evans, Neal D. and Murray, Royce W.}, indextitle = {Alkanethiolate gold cluster molecules}, title = {Alkanethiolate gold cluster molecules with core diameters from 1.5 to 5.2~nm}, subtitle = {Core and monolayer properties as a function of core size}, shorttitle = {Alkanethiolate gold cluster molecules}, journaltitle = {Langmuir}, volume = {14}, number = {1}, year = {1998}, pages = {17--30}, annotation = {An \texttt{article} entry with \arabic{author} authors. By default, long author and editor lists are automatically truncated. This is configurable} } @Article{reese, langid = {english}, langidopts = {variant=american}, author = {Reese, Trevor R.}, title = {Georgia in Anglo-Spanish Diplomacy, 1736-1739}, journaltitle = {William and Mary Quarterly}, volume = {15}, series = {3}, year = {1958}, pages = {168--190}, annotation = {An \texttt{article} entry with a \texttt{series} and a \texttt{volume} field. Note the format of the series. If the value of the \texttt{series} field is an integer, this number is printed as an ordinal and the string \enquote*{series} is appended automatically} } @Article{set:aksin, entryset = {set}, author = {Aks{\i}n, {\"O}zge and T{\"u}rkmen, Hayati and Artok, Levent and {\c{C}}etinkaya, Bekir and Ni, Chaoying and B{\"u}y{\"u}kg{\"u}ng{\"o}r, Orhan and {\"O}zkal, Erhan}, indextitle = {Effect of immobilization on catalytic characteristics}, title = {Effect of immobilization on catalytic characteristics of saturated Pd-N-heterocyclic carbenes in Mizoroki-Heck reactions}, journaltitle = jomch, volume = {691}, number = {13}, year = {2006}, month = {02}, pages = {3027--3036} } @Article{set:herrmann, entryset = {set}, author = {Herrmann, Wolfgang A. and {\"O}fele, Karl and Schneider, Sabine K. and Herdtweck, Eberhardt and Hoffmann, Stephan D.}, indextitle = {Carbocyclic carbene as an efficient catalyst, A}, title = {A carbocyclic carbene as an efficient catalyst ligand for C--C coupling reactions}, journaltitle = anch-ie, volume = {45}, number = {23}, year = {2006}, pages = {3859--3862} } @Article{set:yoon, entryset = {set}, author = {Yoon, Myeong S. and Ryu, Dowook and Kim, Jeongryul and Ahn, Kyo Han}, indextitle = {Palladium pincer complexes}, title = {Palladium pincer complexes with reduced bond angle strain: efficient catalysts for the Heck reaction}, journaltitle = {Organometallics}, volume = {25}, number = {10}, year = {2006}, pages = {2409--2411} } @Article{shore, author = {Shore, Bradd}, title = {Twice-Born, Once Conceived}, subtitle = {Meaning Construction and Cultural Cognition}, journaltitle = {American Anthropologist}, volume = {93}, series = {newseries}, number = {1}, date = {1991-03}, pages = {9--27}, annotation = {An \texttt{article} entry with \texttt{series}, \texttt{volume}, and \texttt{number} fields. Note the format of the \texttt{series} which is a localization key} } @Article{sigfridsson, langid = {english}, langidopts = {variant=american}, author = {Sigfridsson, Emma and Ryde, Ulf}, indextitle = {Methods for deriving atomic charges}, title = {Comparison of methods for deriving atomic charges from the electrostatic potential and moments}, journaltitle = {Journal of Computational Chemistry}, volume = {19}, number = {4}, year = {1998}, doi = {10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P}, pages = {377--395}, annotation = {An \texttt{article} entry with \texttt{volume}, \texttt{number}, and \texttt{doi} fields. Note that the \textsc{doi} is transformed into a clickable link if \texttt{hyperref} support has been enabled}, abstract = { Four methods for deriving partial atomic charges from the quantum chemical electrostatic potential (CHELP, CHELPG, Merz-Kollman, and RESP) have been compared and critically evaluated. It is shown that charges strongly depend on how and where the potential points are selected. Two alternative methods are suggested to avoid the arbitrariness in the point-selection schemes and van der Waals exclusion radii: CHELP-BOW, which also estimates the charges from the electrostatic potential, but with potential points that are Boltzmann-weighted after their occurrence in actual simulations using the energy function of the program in which the charges will be used, and CHELMO, which estimates the charges directly from the electrostatic multipole moments. Different criteria for the quality of the charges are discussed.} } @Article{spiegelberg, langid = {german}, sorttitle = {Intention und Intentionalitat in der Scholastik, bei Brentano und Husserl}, indexsorttitle = {Intention und Intentionalitat in der Scholastik, bei Brentano und Husserl}, author = {Spiegelberg, Herbert}, title = {\mkbibquote{Intention} und \mkbibquote{Intentionalit{\"a}t} in der Scholastik, bei Brentano und Husserl}, shorttitle = {Intention und Intentionalit{\"a}t}, journaltitle = {Studia Philosophica}, volume = {29}, year = {1969}, pages = {189--216}, annotation = {An \texttt{article} entry. Note the \texttt{sorttitle} and \texttt{indexsorttitle} fields and the markup of the quotes in the database file} } @Article{springer, langid = {english}, langidopts = {variant=british}, author = {Springer, Otto}, title = {Mediaeval Pilgrim Routes from Scandinavia to Rome}, shorttitle = {Mediaeval Pilgrim Routes}, journaltitle = {Mediaeval Studies}, volume = {12}, year = {1950}, pages = {92--122}, annotation = {A plain \texttt{article} entry} } @Article{stdmodel:glashow, entryset = {stdmodel}, author = {Glashow, Sheldon}, title = {Partial Symmetries of Weak Interactions}, journaltitle = {Nucl.~Phys.}, volume = {22}, year = {1961}, pages = {579\psqq} } @Article{stdmodel:weinberg, entryset = {stdmodel}, author = {Weinberg, Steven}, title = {A Model of Leptons}, journaltitle = {Phys.~Rev.~Lett.}, volume = {19}, year = {1967}, pages = {1264\psqq} } @Book{aristotle:anima, keywords = {primary}, langid = {english}, langidopts = {variant=british}, author = {Aristotle}, editor = {Hicks, Robert Drew}, title = {De Anima}, publisher = cup, location = {Cambridge}, year = {1907}, annotation = {A \texttt{book} entry with an \texttt{author} and an \texttt{editor}} } @Book{aristotle:physics, keywords = {primary}, langid = {english}, langidopts = {variant=american}, author = {Aristotle}, translator = {Wicksteed, P. H. and Cornford, F. M.}, title = {Physics}, shorttitle = {Physics}, publisher = {G. P. Putnam}, location = {New York}, year = {1929}, annotation = {A \texttt{book} entry with a \texttt{translator} field} } @Book{aristotle:poetics, keywords = {primary}, langid = {english}, langidopts = {variant=british}, author = {Aristotle}, editor = {Lucas, D. W.}, title = {Poetics}, shorttitle = {Poetics}, series = {Clarendon Aristotle}, publisher = {Clarendon Press}, location = {Oxford}, year = {1968}, annotation = {A \texttt{book} entry with an \texttt{author} and an \texttt{editor} as well as a \texttt{series} field} } @Book{aristotle:rhetoric, keywords = {primary}, langid = {english}, langidopts = {variant=british}, sorttitle = {Rhetoric of Aristotle}, author = {Aristotle}, editor = {Cope, Edward Meredith}, commentator = {Cope, Edward Meredith}, indextitle = {Rhetoric of Aristotle, The}, title = {The Rhetoric of Aristotle with a commentary by the late Edward Meredith Cope}, shorttitle = {Rhetoric}, volumes = {3}, publisher = cup, year = {1877}, annotation = {A commented edition. Note the concatenation of the \texttt{editor} and \texttt{commentator} fields as well as the \texttt{volumes}, \texttt{sorttitle}, and \texttt{indextitle} fields} } @Book{augustine, langid = {english}, langidopts = {variant=british}, author = {Augustine, Robert L.}, title = {Heterogeneous catalysis for the synthetic chemist}, shorttitle = {Heterogeneous catalysis}, publisher = {Marcel Dekker}, location = {New York}, year = {1995}, annotation = {A plain \texttt{book} entry} } @Book{averroes/bland, keywords = {primary}, langid = {english}, langidopts = {variant=american}, author = {Averroes}, editor = {Bland, Kalman P.}, translator = {Bland, Kalman P.}, indextitle = {Epistle on the Possibility of Conjunction, The}, title = {The Epistle on the Possibility of Conjunction with the Active Intellect by Ibn Rushd with the Commentary of Moses Narboni}, shorttitle = {Possibility of Conjunction}, series = {Moreshet: Studies in Jewish History, Literature and Thought}, number = {7}, publisher = {Jewish Theological Seminary of America}, location = {New York}, year = {1982}, annotation = {A \texttt{book} entry with a \texttt{series} and a \texttt{number}. Note the concatenation of the \texttt{editor} and \texttt{translator} fields as well as the \texttt{indextitle} field} } @Book{averroes/hannes, keywords = {primary}, langid = {german}, sorttitle = {Uber die Moglichkeit der Conjunktion}, indexsorttitle = {Uber die Moglichkeit der Conjunktion}, author = {Averroes}, editor = {Hannes, Ludwig}, translator = {Hannes, Ludwig}, annotator = {Hannes, Ludwig}, indextitle = {{\"U}ber die M{\"o}glichkeit der Conjunktion}, title = {Des Averro{\"e}s Abhandlung: \mkbibquote{{\"U}ber die M{\"o}glichkeit der Conjunktion} oder \mkbibquote{{\"U}ber den materiellen Intellekt}}, shorttitle = {M{\"o}glichkeit der Conjunktion}, publisher = {C.~A. Kaemmerer}, location = {Halle an der Saale}, year = {1892}, annotation = {An annotated edition. Note the concatenation of the \texttt{editor}, \texttt{translator}, and \texttt{annotator} fields. Also note the \texttt{shorttitle}, \texttt{indextitle}, \texttt{sorttitle}, and \texttt{indexsorttitle} fields} } @Book{averroes/hercz, keywords = {primary}, langid = {german}, indexsorttitle = {Drei Abhandlungen uber die Conjunction}, author = {Averroes}, editor = {Hercz, J.}, translator = {Hercz, J.}, indextitle = {Drei Abhandlungen {\"u}ber die Conjunction}, title = {Drei Abhandlungen {\"u}ber die Conjunction des separaten Intellects mit dem Menschen}, subtitle = {Von Averroes (Vater und Sohn), aus dem Arabischen {\"u}bersetzt von Samuel Ibn Tibbon}, shorttitle = {Drei Abhandlungen}, publisher = {S.~Hermann}, location = {Berlin}, year = {1869}, annotation = {A \texttt{book} entry. Note the concatenation of the \texttt{editor} and \texttt{translator} fields as well as the \texttt{indextitle} and \texttt{indexsorttitle} fields} } @Book{cicero, langid = {german}, author = {Cicero, Marcus Tullius}, editor = {Blank-Sangmeister, Ursula}, translator = {Blank-Sangmeister, Ursula}, afterword = {Thraede, Klaus}, indextitle = {De natura deorum}, title = {De natura deorum. {\"U}ber das Wesen der G{\"o}tter}, shorttitle = {De natura deorum}, language = {langlatin and langgerman}, publisher = {Reclam}, location = {Stuttgart}, year = {1995}, annotation = {A bilingual edition of Cicero's \emph{De natura deorum}, with a German translation. Note the format of the \texttt{language} field in the database file, the concatenation of the \texttt{editor} and \texttt{translator} fields, and the \texttt{afterword} field} } @Book{coleridge, langid = {english}, langidopts = {variant=british}, author = {Coleridge, Samuel Taylor}, editor = {Coburn, Kathleen and Engell, James and Bate, W. Jackson}, indextitle = {Biographia literaria}, title = {Biographia literaria, or Biographical sketches of my literary life and opinions}, shorttitle = {Biographia literaria}, maintitle = {The collected works of Samuel Taylor Coleridge}, part = {2}, volume = {7}, series = {Bollingen Series}, number = {75}, publisher = {Routledge and Kegan Paul}, location = {London}, year = {1983}, annotation = {One (partial) volume of a multivolume book. This is a \texttt{book} entry with a \texttt{volume} and a \texttt{part} field which explicitly refers to the second (physical) part of the seventh (logical) volume. Also note the \texttt{series} and \texttt{number} fields} } @Book{companion, langid = {english}, langidopts = {variant=american}, sorttitle = {LaTeX Companion}, author = {Goossens, Michel and Mittelbach, Frank and Samarin, Alexander}, indextitle = {LaTeX Companion, The}, title = {The LaTeX Companion}, shorttitle = {LaTeX Companion}, edition = {1}, publisher = {Addison-Wesley}, location = {Reading, Mass.}, year = {1994}, annotation = {A book with three authors. Note the formatting of the author list. By default, only the first name is reversed in the bibliography} } @Book{cotton, langid = {english}, langidopts = {variant=british}, author = {Cotton, Frank Albert and Wilkinson, Geoffrey and Murillio, Carlos A. and Bochmann, Manfred}, title = {Advanced inorganic chemistry}, edition = {6}, publisher = {Wiley}, location = {Chichester}, year = {1999}, annotation = {A \texttt{book} entry with \arabic{author} authors and an \texttt{edition} field. By default, long \texttt{author} and \texttt{editor} lists are automatically truncated. This is configurable} } @Book{gerhardt, langid = {english}, langidopts = {variant=american}, sorttitle = {Federal Appointments Process}, author = {Gerhardt, Michael J.}, indextitle = {Federal Appointments Process, The}, title = {The Federal Appointments Process}, subtitle = {A Constitutional and Historical Analysis}, shorttitle = {Federal Appointments Process}, publisher = {Duke University Press}, location = {Durham and London}, year = {2000}, annotation = {This is a \texttt{book} entry. Note the format of the \texttt{location} field as well as the \texttt{sorttitle} and \texttt{indextitle} fields} } @Book{gonzalez, langid = {english}, langidopts = {variant=american}, sorttitle = {Ghost of John Wayne and Other Stories}, author = {Gonzalez, Ray}, indextitle = {Ghost of John Wayne and Other Stories, The}, title = {The Ghost of John Wayne and Other Stories}, shorttitle = {Ghost of John Wayne}, publisher = {The University of Arizona Press}, location = {Tucson}, year = {2001}, isbn = {0-816-52066-6}, annotation = {A collection of short stories. This is a \texttt{book} entry. Note the \texttt{sorttitle} and \texttt{indextitle} fields in the database file. There's also an \texttt{isbn} field} } @Book{hammond, langid = {english}, langidopts = {variant=british}, sorttitle = {Basics of crystallography and diffraction}, author = {Hammond, Christopher}, indextitle = {Basics of crystallography and diffraction, The}, title = {The basics of crystallography and diffraction}, shorttitle = {Crystallography and diffraction}, publisher = {International Union of Crystallography and Oxford University Press}, location = {Oxford}, year = {1997}, annotation = {A \texttt{book} entry. Note the \texttt{sorttitle} and \texttt{indextitle} fields as well as the format of the \texttt{publisher} field} } @Book{iliad, langid = {german}, sorttitle = {Ilias}, author = {Homer}, translator = {Schadewaldt, Wolfgang}, introduction = {Latacz, Joachim}, indextitle = {Ilias, Die}, title = {Die Ilias}, shorttitle = {Ilias}, edition = {3}, publisher = {Artemis \& Winkler}, location = {D{\"u}sseldorf and Z{\"u}rich}, year = {2004}, annotation = {A German translation of the \emph{Iliad}. Note the \texttt{translator} and \texttt{introduction} fields and the format of the \texttt{location} field in the database file. Also note the \texttt{sorttitle} and \texttt{indextitle} fields} } @Book{knuth:ct, langid = {english}, langidopts = {variant=american}, sortyear = {1984-0}, sorttitle = {Computers & Typesetting}, indexsorttitle = {Computers & Typesetting}, author = {Knuth, Donald E.}, title = {Computers \& Typesetting}, volumes = {5}, publisher = {Addison-Wesley}, location = {Reading, Mass.}, date = {1984/1986}, annotation = {A five-volume book cited as a whole. This is a \texttt{book} entry, note the \texttt{volumes} field} } @Book{knuth:ct:a, langid = {english}, langidopts = {variant=american}, sortyear = {1984-1}, sorttitle = {Computers & Typesetting A}, indexsorttitle = {The TeXbook}, author = {Knuth, Donald E.}, indextitle = {\TeX book, The}, title = {The \TeX book}, shorttitle = {\TeX book}, maintitle = {Computers \& Typesetting}, volume = {A}, publisher = {Addison-Wesley}, location = {Reading, Mass.}, year = {1984}, annotation = {The first volume of a five-volume book. Note the \texttt{sorttitle} and \texttt{sortyear} fields. We want this volume to be listed after the entry referring to the entire five-volume set. Also note the \texttt{indextitle} and \texttt{indexsorttitle} fields} } @Book{knuth:ct:b, langid = {english}, langidopts = {variant=american}, sortyear = {1984-2}, sorttitle = {Computers & Typesetting B}, indexsorttitle = {TeX: The Program}, author = {Knuth, Donald E.}, title = {\TeX: The Program}, shorttitle = {\TeX}, maintitle = {Computers \& Typesetting}, volume = {B}, publisher = {Addison-Wesley}, location = {Reading, Mass.}, year = {1986}, annotation = {The second volume of a five-volume book. Note the \texttt{sorttitle} and \texttt{sortyear} fields. Also note the \texttt{indexsorttitle} field} } @Book{knuth:ct:c, langid = {english}, langidopts = {variant=american}, sortyear = {1984-3}, sorttitle = {Computers & Typesetting C}, author = {Knuth, Donald E.}, indextitle = {METAFONTbook, The}, title = {The METAFONTbook}, shorttitle = {METAFONTbook}, maintitle = {Computers \& Typesetting}, volume = {C}, publisher = {Addison-Wesley}, location = {Reading, Mass.}, year = {1986}, annotation = {The third volume of a five-volume book. Note the \texttt{sorttitle} and \texttt{sortyear} fields as well as the \texttt{indextitle} field} } @Book{knuth:ct:d, langid = {english}, langidopts = {variant=american}, sortyear = {1984-4}, sorttitle = {Computers & Typesetting D}, author = {Knuth, Donald E.}, title = {METAFONT: The Program}, shorttitle = {METAFONT}, maintitle = {Computers \& Typesetting}, volume = {D}, publisher = {Addison-Wesley}, location = {Reading, Mass.}, year = {1986}, annotation = {The fourth volume of a five-volume book. Note the \texttt{sorttitle} and \texttt{sortyear} fields} } @Book{knuth:ct:e, langid = {english}, langidopts = {variant=american}, sortyear = {1984-5}, sorttitle = {Computers & Typesetting E}, author = {Knuth, Donald E.}, title = {Computer Modern Typefaces}, maintitle = {Computers \& Typesetting}, volume = {E}, publisher = {Addison-Wesley}, location = {Reading, Mass.}, year = {1986}, annotation = {The fifth volume of a five-volume book. Note the \texttt{sorttitle} and \texttt{sortyear} fields} } @Book{malinowski, langid = {english}, langidopts = {variant=british}, author = {Malinowski, Bronis{\l}aw}, title = {Argonauts of the Western Pacific}, subtitle = {An account of native enterprise and adventure in the Archipelagoes of Melanesian New Guinea}, shorttitle = {Argonauts}, edition = {8}, publisher = {Routledge and Kegan Paul}, location = {London}, year = {1972}, annotation = {This is a \texttt{book} entry. Note the format of the \texttt{publisher} and \texttt{edition} fields as well as the \texttt{subtitle} field} } @Book{maron, langid = {english}, langidopts = {variant=american}, author = {Maron, Monika}, translator = {Brigitte Goldstein}, title = {Animal Triste}, shorttitle = {Animal Triste}, publisher = {University of Nebraska Press}, location = {Lincoln}, year = {2000}, origlanguage = {german}, annotation = {An English translation of a German novel with a French title. In other words: a \texttt{book} entry with a \texttt{translator} field. Note the \texttt{origlanguage} field which is concatenated with the \texttt{translator}} } @Book{massa, langid = {english}, langidopts = {variant=british}, author = {Werner Massa}, title = {Crystal structure determination}, edition = {2}, publisher = {Spinger}, location = {Berlin}, year = {2004}, annotation = {A \texttt{book} entry with an \texttt{edition} field} } @Book{nietzsche:ksa, langid = {german}, sortyear = {1988-00-000}, sorttitle = {Werke-00-000}, indexsorttitle = {Samtliche Werke}, author = {Nietzsche, Friedrich}, editor = {Colli, Giorgio and Montinari, Mazzino}, title = {S{\"a}mtliche Werke}, subtitle = {Kritische Studienausgabe}, volumes = {15}, edition = {2}, publisher = dtv # { and Walter de Gruyter}, location = {M{\"u}nchen and Berlin and New York}, year = {1988}, annotation = {The critical edition of Nietzsche's works. This is a \texttt{book} entry referring to a 15-volume work as a whole. Note the \texttt{volumes} field and the format of the \texttt{publisher} and \texttt{location} fields in the database file. Also note the \texttt{sorttitle} and \texttt{sortyear} fields which are used to fine-tune the sorting order of the bibliography. We want this item listed first in the bibliography} } @Book{nietzsche:ksa1, langid = {german}, sortyear = {1988-01-000}, sorttitle = {Werke-01-000}, indexsorttitle = {Samtliche Werke I}, author = {Nietzsche, Friedrich}, bookauthor = {Nietzsche, Friedrich}, editor = {Colli, Giorgio and Montinari, Mazzino}, indextitle = {S{\"a}mtliche Werke I}, title = {Die Geburt der Trag{\"o}die. Unzeitgem{\"a}{\ss}e Betrachtungen I--IV. Nachgelassene Schriften 1870--1973}, shorttitle = {S{\"a}mtliche Werke I}, maintitle = {S{\"a}mtliche Werke}, mainsubtitle = {Kritische Studienausgabe}, volume = {1}, edition = {2}, publisher = dtv # { and Walter de Gruyter}, location = {M{\"u}nchen and Berlin and New York}, year = {1988}, annotation = {A single volume from the critical edition of Nietzsche's works. This \texttt{book} entry explicitly refers to the first volume only. Note the \texttt{title} and \texttt{maintitle} fields. Also note the \texttt{sorttitle} and \texttt{sortyear} fields. We want this entry to be listed after the entry referring to the entire edition} } @Book{nussbaum, keywords = {secondary}, langid = {english}, langidopts = {variant=american}, sorttitle = {Aristotle's De Motu Animalium}, indexsorttitle = {Aristotle's De Motu Animalium}, author = {Nussbaum, Martha}, title = {Aristotle's \mkbibquote{De Motu Animalium}}, publisher = pup, location = {Princeton}, year = {1978}, annotation = {A \texttt{book} entry. Note the \texttt{sorttitle} and \texttt{indexsorttitle} fields and the markup of the quotes in the database file} } @Book{piccato, langid = {english}, langidopts = {variant=american}, author = {Piccato, Pablo}, title = {City of Suspects}, subtitle = {Crime in Mexico City, 1900--1931}, shorttitle = {City of Suspects}, publisher = {Duke University Press}, location = {Durham and London}, year = {2001}, annotation = {This is a \texttt{book} entry. Note the format of the \texttt{location} field in the database file} } @Book{vangennep, options = {useprefix}, langid = {french}, sorttitle = {Rites de passage}, author = {van Gennep, Arnold}, indextitle = {Rites de passage, Les}, title = {Les rites de passage}, shorttitle = {Rites de passage}, publisher = {Nourry}, location = {Paris}, year = {1909}, annotation = {A \texttt{book} entry. Note the format of the printed name and compare the \texttt{useprefix} option in the \texttt{options} field as well as \texttt{brandt} and \texttt{geer}} } @Book{vangennepx, langid = {french}, author = {van Gennep, Jean}, title = {Il a neigé à Port-au-Prince}, publisher = {Alhambra}, location = {Montréal}, year = {1999} } @Book{vazques-de-parga, langid = {spanish}, sorttitle = {Peregrinaciones a Santiago de Compostela}, author = {V{\'a}zques{ de }Parga, Luis and Lacarra, Jos{\'e} Mar{\'i}a and Ur{\'i}a R{\'i}u, Juan}, indextitle = {Peregrinaciones a Santiago de Compostela, Las}, title = {Las Peregrinaciones a Santiago de Compostela}, shorttitle = {Peregrinaciones}, volumes = {3}, publisher = {Iberdrola}, location = {Pamplona}, year = {1993}, note = {Ed. facs. de la realizada en 1948--49}, annotation = {A multivolume book cited as a whole. This is a \texttt{book} entry with \texttt{volumes}, \texttt{note}, \texttt{sorttitle}, and \texttt{indextitle} fields} } @Book{worman, langid = {english}, langidopts = {variant=american}, sorttitle = {Cast of Character}, author = {Worman, Nancy}, indextitle = {Cast of Character, The}, title = {The Cast of Character}, subtitle = {Style in Greek Literature}, shorttitle = {Cast of Character}, publisher = {University of Texas Press}, location = {Austin}, year = {2002}, annotation = {A \texttt{book} entry. Note the \texttt{sorttitle} and \texttt{indextitle} fields} } @Book{wormanx, langid = {english}, langidopts = {variant=american}, sorttitle = {Someone did it again}, author = {Worman, Nana}, indextitle = {Someone did it again}, title = {Someone did it again}, publisher = {University of Nowhere Press}, location = {Somewhere}, year = {2009} } @Collection{britannica, options = {useeditor=false}, label = {EB}, langid = {english}, langidopts = {variant=british}, sorttitle = {Encyclop{\ae}dia Britannica}, editor = {Preece, Warren E.}, indextitle = {Encyclop{\ae}dia Britannica, The New}, title = {The New Encyclop{\ae}dia Britannica}, shorttitle = {Encyclop{\ae}dia Britannica}, volumes = {32}, edition = {15}, publisher = {Encyclop{\ae}dia Britannica}, location = {Chicago, Ill.}, year = {2003}, annotation = {This is a \texttt{collection} entry for an encyclopedia. Note the \texttt{useeditor} option in the \texttt{options} field as well as the \texttt{sorttitle} field. We want this entry to be cited and alphabetized by title even though there is an editor. In addition to that, we want the title to be alphabetized under \enquote*{E} rather than \enquote*{T}. Also note the \texttt{label} field which is provided for author-year citation styles} } @Collection{gaonkar, langid = {english}, langidopts = {variant=american}, editor = {Gaonkar, Dilip Parameshwar}, title = {Alternative Modernities}, publisher = {Duke University Press}, location = {Durham and London}, year = {2001}, isbn = {0-822-32714-7}, annotation = {This is a \texttt{collection} entry. Note the format of the \texttt{location} field in the database file as well as the \texttt{isbn} field} } @Collection{jaffe, editor = {Jaff{\'e}, Philipp}, editora = {Loewenfeld, Samuel and Kaltenbrunner, Ferdinand and Ewald, Paul}, editoratype = {redactor}, indextitle = {Regesta Pontificum Romanorum}, title = {Regesta Pontificum Romanorum ab condita ecclesia ad annum post Christum natum \textsc{mcxcviii}}, shorttitle = {Regesta Pontificum Romanorum}, volumes = {2}, edition = {2}, location = {Leipzig}, date = {1885/1888}, annotation = {A \texttt{collection} entry with \texttt{edition} and \texttt{volumes} fields. Note the \texttt{editortype} field handling the redactor} } @Collection{westfahl:frontier, langid = {english}, langidopts = {variant=american}, editor = {Westfahl, Gary}, title = {Space and Beyond}, subtitle = {The Frontier Theme in Science Fiction}, booktitle = {Space and Beyond}, booksubtitle = {The Frontier Theme in Science Fiction}, publisher = {Greenwood}, location = {Westport, Conn. and London}, year = {2000}, annotation = {This is a \texttt{collection} entry. Note the format of the \texttt{location} field as well as the \texttt{subtitle} and \texttt{booksubtitle} fields} } @InBook{kant:kpv, shorthand = {KpV}, langid = {german}, author = {Kant, Immanuel}, bookauthor = {Kant, Immanuel}, title = {Kritik der praktischen Vernunft}, shorttitle = {Kritik der praktischen Vernunft}, booktitle = {Kritik der praktischen Vernunft. Kritik der Urtheilskraft}, maintitle = {Kants Werke. Akademie Textausgabe}, volume = {5}, publisher = {Walter de Gruyter}, location = {Berlin}, year = {1968}, pages = {1--163}, annotation = {An edition of Kant's \emph{Collected Works}, volume five. This is an \texttt{inbook} entry which explicitly refers to the \emph{Critique of Practical Reason} only, not to the entire fifth volume. Note the \texttt{author} and \texttt{bookauthor} fields in the database file. By default, the \texttt{bookauthor} is omitted if the values of the \texttt{author} and \texttt{bookauthor} fields are identical} } @InBook{kant:ku, shorthand = {KU}, langid = {german}, author = {Kant, Immanuel}, bookauthor = {Kant, Immanuel}, title = {Kritik der Urtheilskraft}, booktitle = {Kritik der praktischen Vernunft. Kritik der Urtheilskraft}, maintitle = {Kants Werke. Akademie Textausgabe}, volume = {5}, publisher = {Walter de Gruyter}, location = {Berlin}, year = {1968}, pages = {165--485}, annotation = {An edition of Kant's \emph{Collected Works}, volume five. This is an \texttt{inbook} entry which explicitly refers to the \emph{Critique of Judgment} only, not to the entire fifth volume} } @InBook{nietzsche:historie, langid = {german}, sortyear = {1988-01-243}, sorttitle = {Werke-01-243}, indexsorttitle = {Vom Nutzen und Nachtheil der Historie fur das Leben}, author = {Nietzsche, Friedrich}, bookauthor = {Nietzsche, Friedrich}, editor = {Colli, Giorgio and Montinari, Mazzino}, indextitle = {Vom Nutzen und Nachtheil der Historie f{\"u}r das Leben}, title = {Unzeitgem{\"a}sse Betrachtungen. Zweites St{\"u}ck}, subtitle = {Vom Nutzen und Nachtheil der Historie f{\"u}r das Leben}, shorttitle = {Vom Nutzen und Nachtheil der Historie}, booktitle = {Die Geburt der Trag{\"o}die. Unzeitgem{\"a}{\ss}e Betrachtungen I--IV. Nachgelassene Schriften 1870--1973}, maintitle = {S{\"a}mtliche Werke}, mainsubtitle = {Kritische Studienausgabe}, volume = {1}, publisher = dtv # { and Walter de Gruyter}, location = {M{\"u}nchen and Berlin and New York}, year = {1988}, pages = {243--334}, annotation = {A single essay from the critical edition of Nietzsche's works. This \texttt{inbook} entry explicitly refers to an essay found in the first volume. Note the \texttt{title}, \texttt{booktitle}, and \texttt{maintitle} fields. Also note the \texttt{sorttitle} and \texttt{sortyear} fields. We want this entry to be listed after the entry referring to the entire first volume} } @InCollection{brandt, options = {useprefix=false}, langid = {german}, indexsorttitle = {Nordischen Lander von der Mitte des 11. Jahrhunderts bis 1448}, author = {von Brandt, Ahasver and Erich Hoffmann}, editor = {Ferdinand Seibt}, indextitle = {Nordischen L{\"a}nder von der Mitte des 11.~Jahrhunderts bis 1448, Die}, title = {Die nordischen L{\"a}nder von der Mitte des 11.~Jahrhunderts bis 1448}, shorttitle = {Die nordischen L{\"a}nder}, booktitle = {Europa im Hoch- und Sp{\"a}tmittelalter}, series = {Handbuch der europ{\"a}ischen Geschichte}, number = {2}, publisher = {Klett-Cotta}, location = {Stuttgart}, year = {1987}, pages = {884--917}, annotation = {An \texttt{incollection} entry with a \texttt{series} and a \texttt{number}. Note the format of the printed name and compare the \texttt{useprefix} option in the \texttt{options} field as well as \texttt{vangennep}. Also note the \texttt{indextitle, and \texttt{indexsorttitle} fields}} } @InCollection{hyman, keywords = {secondary}, langid = {english}, langidopts = {variant=american}, author = {Arthur Hyman}, editor = {O'Meara, Dominic J.}, indextitle = {Aristotle's Theory of the Intellect}, title = {Aristotle's Theory of the Intellect and its Interpretation by Averroes}, shorttitle = {Aristotle's Theory of the Intellect}, booktitle = {Studies in Aristotle}, series = {Studies in Philosophy and the History of Philosophy}, number = {9}, publisher = {The Catholic University of America Press}, location = {Washington, D.C.}, year = {1981}, pages = {161--191}, annotation = {An \texttt{incollection} entry with a \texttt{series} and \texttt{number} field} } @InCollection{pines, keywords = {secondary}, langid = {english}, langidopts = {variant=american}, author = {Pines, Shlomo}, editor = {Twersky, Isadore}, indextitle = {Limitations of Human Knowledge According to Al-Farabi, ibn Bajja, and Maimonides, The}, title = {The Limitations of Human Knowledge According to Al-Farabi, ibn Bajja, and Maimonides}, shorttitle = {Limitations of Human Knowledge}, booktitle = {Studies in Medieval Jewish History and Literature}, publisher = hup, location = {Cambridge, Mass.}, year = {1979}, pages = {82--109}, annotation = {A typical \texttt{incollection} entry. Note the \texttt{indextitle} field} } @InProceedings{moraux, keywords = {secondary}, langid = {french}, indexsorttitle = {De Anima dans la tradition grecque}, author = {Moraux, Paul}, editor = {Lloyd, G. E. R. and Owen, G. E. L.}, indextitle = {\emph{De Anima} dans la tradition gr{\`e}cque, Le}, title = {Le \emph{De Anima} dans la tradition gr{\`e}cque}, subtitle = {Quelques aspects de l'interpretation du trait{\'e}, de Theophraste {\`a} Themistius}, shorttitle = {\emph{De Anima} dans la tradition gr{\`e}cque}, booktitle = {Aristotle on Mind and the Senses}, booktitleaddon = {Proceedings of the Seventh Symposium Aristotelicum (1975)}, publisher = cup, location = {Cambridge}, date = {1979-01-02/1980-04-08}, origdate = {1924-06-07/1924-07-09}, eventdate = {1924-02-03/1924-02-05}, urldate = {1979-03-03/1979-03-04}, url = {http://some/thing}, pages = {281--324}, annotation = {This is a typical \texttt{inproceedings} entry. Note the \texttt{booksubtitle}, \texttt{shorttitle}, \texttt{indextitle}, and \texttt{indexsorttitle} fields} } @InProceedings{stdmodel:salam, entryset = {stdmodel}, author = {Salam, Abdus}, editor = {Svartholm, Nils}, title = {Weak and Electromagnetic Interactions}, booktitle = {Elementary particle theory}, booksubtitle = {Relativistic groups and analyticity}, booktitleaddon = {Proceedings of the Eighth Nobel Symposium, May 19--25, 1968}, venue = {Aspen{\"a}sgarden, Lerum}, publisher = {Almquist \& Wiksell}, location = {Stockholm}, year = {1968}, pages = {367\psqq} } @Manual{cms, label = {CMS}, langid = {english}, langidopts = {variant=american}, sorttitle = {Chicago Manual of Style}, indextitle = {Chicago Manual of Style, The}, title = {The Chicago Manual of Style}, subtitle = {The Essential Guide for Writers, Editors, and Publishers}, shorttitle = {Chicago Manual of Style}, edition = {15}, publisher = {University of Chicago Press}, location = {Chicago, Ill.}, year = {2003}, isbn = {0-226-10403-6}, annotation = {This is a \texttt{manual} entry without an \texttt{author} or \texttt{editor}. Note the \texttt{label} field in the database file which is provided for author-year citation styles. Also note the \texttt{sorttitle} and \texttt{indextitle} fields. By default, all entries without an \texttt{author} or \texttt{editor} are alphabetized by \texttt{title} but we want this entry to be alphabetized under \enquote*{C} rather than \enquote*{T}. There's also an \texttt{isbn} field} } @Online{baez/online, langid = {english}, langidopts = {variant=american}, author = {Baez, John C. and Lauda, Aaron D.}, title = {Higher-Dimensional Algebra V: 2-Groups}, version = {3}, date = {2004-10-27}, eprint = {math/0307200v3}, eprinttype = {arxiv}, annotation = {An \texttt{online} reference from arXiv. Note the \texttt{eprint} and \texttt{eprinttype} fields. Also note that the arXiv reference is transformed into a clickable link if \texttt{hyperref} support has been enabled. Compare \texttt{baez\slash article} which is the same item given as an \texttt{article} entry with eprint information} } @Online{ctan, label = {CTAN}, langid = {english}, langidopts = {variant=american}, title = {CTAN}, subtitle = {The Comprehensive TeX Archive Network}, year = {2006}, url = {http://www.ctan.org}, urldate = {2006-10-01}, annotation = {This is an \texttt{online} entry. The \textsc{url}, which is given in the \texttt{url} field, is transformed into a clickable link if \texttt{hyperref} support has been enabled. Note the format of the \texttt{urldate} field (\texttt{yyyy-mm-dd}) in the database file. It is also possible to use the fields \texttt{urlday}\slash \texttt{urlmonth}\slash \texttt{urlyear} instead. Also note the \texttt{label} field which may be used as a fallback by citation styles which need an \texttt{author} and\slash or a \texttt{year}} } @Online{itzhaki, langid = {english}, langidopts = {variant=american}, author = {Itzhaki, Nissan}, title = {Some remarks on 't Hooft's S-matrix for black holes}, version = {1}, date = {1996-03-11}, eprint = {hep-th/9603067}, eprinttype = {arxiv}, annotation = {An \texttt{online} reference from arXiv. Note the \texttt{eprint} and \texttt{eprinttype} fields. Also note that the arXiv reference is transformed into a clickable link if \texttt{hyperref} support has been enabled}, abstract = {We discuss the limitations of 't Hooft's proposal for the black hole S-matrix. We find that the validity of the S-matrix implies violation of the semi-classical approximation at scales large compared to the Planck scale. We also show that the effect of the centrifugal barrier on the S-matrix is crucial even for large transverse distances.} } @Online{markey, langid = {english}, langidopts = {variant=american}, sorttitle = {Tame the Beast}, author = {Markey, Nicolas}, title = {Tame the BeaST}, subtitle = {The B to X of BibTeX}, version = {1.3}, url = {http://tug.ctan.org/tex-archive/info/bibtex/tamethebeast/ttb_en.pdf}, urldate = {2006-10-01}, annotation = {An \texttt{online} entry for a tutorial. Note the format of the \texttt{date} field (\texttt{yyyy-mm-dd}) in the database file. It is also possible to use the fields \texttt{day}\slash \texttt{month}\slash \texttt{year} instead.} } @Patent{almendro, langid = {german}, author = {Almendro, Jos{\'e} L. and Mart{\'i}n, Jacinto and S{\'a}nchez, Alberto and Nozal, Fernando}, title = {Elektromagnetisches Signalhorn}, number = {EU-29702195U}, location = {countryes and countryfr and countryuk and countryde}, year = {1998}, annotation = {This is a \texttt{patent} entry with a \texttt{location} field. The number is given in the \texttt{number} field. Note the format of the \texttt{location} field in the database file. Compare \texttt{laufenberg}, \texttt{sorace}, and \texttt{kowalik}} } @Patent{kowalik, langid = {french}, author = {Kowalik, F. and Isard, M.}, indextitle = {Estimateur d'un d{\'e}faut de fonctionnement}, title = {Estimateur d'un d{\'e}faut de fonctionnement d'un modulateur en quadrature et {\'e}tage de modulation l'utilisant}, type = {patreqfr}, number = {9500261}, date = {1995-01-11}, annotation = {This is a \texttt{patent} entry for a French patent request with a full date. The number is given in the \texttt{number} field. Note the format of the \texttt{type} and \texttt{date} fields in the database file. Compare \texttt{almendro}, \texttt{laufenberg}, and \texttt{sorace}} } @Patent{laufenberg, langid = {german}, author = {Laufenberg, Xaver and Eynius, Dominique and Suelzle, Helmut and Usbeck, Stephan and Spaeth, Matthias and Neuser-Hoffmann, Miriam and Myrzik, Christian and Schmid, Manfred and Nietfeld, Franz and Thiel, Alexander and Braun, Harald and Ebner, Norbert}, holder = {{Robert Bosch GmbH} and {Daimler Chrysler AG} and {Bayerische Motoren Werke AG}}, title = {Elektrische Einrichtung und Betriebsverfahren}, type = {patenteu}, number = {1700367}, location = {countryde and countrywo}, date = {2006-09-13}, annotation = {This is a \texttt{patent} entry with a \texttt{holder} field. Note the format of the \texttt{type} and \texttt{location} fields in the database file. Compare \texttt{almendro}, \texttt{sorace}, and \texttt{kowalik}}, abstract = {The invention relates to an electric device comprising a generator, in particular for use in the vehicle electric system of a motor vehicle and a controller for controlling the generator voltage. The device is equipped with a control zone, in which the voltage is controlled and zones, in which the torque is controlled. The invention also relates to methods for operating a device of this type.}, file = {http://v3.espacenet.com/textdoc?IDX=EP1700367} } @Patent{sorace, langid = {english}, langidopts = {variant=american}, author = {Sorace, Ronald E. and Reinhardt, Victor S. and Vaughn, Steven A.}, holder = {{Hughes Aircraft Company}}, title = {High-Speed Digital-to-RF Converter}, type = {patentus}, number = {5668842}, date = {1997-09-16}, annotation = {This is a \texttt{patent} entry with a \texttt{holder} field. Note the format of the \texttt{type} and \texttt{date} fields in the database file. Compare \texttt{almendro}, \texttt{laufenberg}, and \texttt{kowalik}} } @Report{chiu, langid = {english}, langidopts = {variant=american}, sorttitle = {Hybrid Hierarchical Model of a Multiple Virtual Storage (MVS) Operating System}, author = {Chiu, Willy W. and Chow, We Min}, indextitle = {Hybrid Hierarchical Model, A}, title = {A Hybrid Hierarchical Model of a Multiple Virtual Storage (MVS) Operating System}, institution = {IBM and HP and Sun and Sony}, type = {resreport}, number = {RC-6947}, year = {1978}, annotation = {This is a \texttt{report} entry for a research report. Note the format of the \texttt{type} field in the database file which uses a localization key. The number of the report is given in the \texttt{number} field. Also note the \texttt{sorttitle} and \texttt{indextitle} fields} } @Report{padhye, langid = {english}, langidopts = {variant=american}, sorttitle = {A Stochastic Model of TCP Reno Congestion Avoidance and Control}, author = {Padhye, Jitendra and Firoiu, Victor and Towsley, Don}, indextitle = {Stochastic Model of TCP Reno Congestion Avoidance and Control, A}, title = {A Stochastic Model of TCP Reno Congestion Avoidance and Control}, institution = {University of Massachusetts}, type = {techreport}, number = {99-02}, location = {Amherst, Mass.}, year = {1999}, annotation = {This is a \texttt{report} entry for a technical report. Note the format of the \texttt{type} field in the database file which uses a localization key. The number of the report is given in the \texttt{number} field. Also note the \texttt{sorttitle} and \texttt{indextitle} fields}, abstract = {The steady state performance of a bulk transfer TCP flow (i.e. a flow with a large amount of data to send, such as FTP transfers) may be characterized by three quantities. The first is the send rate, which is the amount of data sent by the sender in unit time. The second is the throughput, which is the amount of data received by the receiver in unit time. Note that the throughput will always be less than or equal to the send rate due to losses. Finally, the number of non-duplicate packets received by the receiver in unit time gives us the goodput of the connection. The goodput is always less than or equal to the throughput, since the receiver may receive two copies of the same packet due to retransmissions by the sender. In a previous paper, we presented a simple model for predicting the steady state send rate of a bulk transfer TCP flow as a function of loss rate and round trip time. In this paper, we extend that work in two ways. First, we analyze the performance of bulk transfer TCP flows using more precise, stochastic analysis. Second, we build upon the previous analysis to provide both an approximate formula as well as a more accurate stochastic model for the steady state throughput of a bulk transfer TCP flow.}, file = {ftp://gaia.cs.umass.edu/pub/Padhey99-markov.ps} } @Thesis{geer, options = {useprefix=false}, langid = {english}, langidopts = {variant=british}, author = {de Geer, Ingrid}, title = {Earl, Saint, Bishop, Skald~-- and Music}, subtitle = {The Orkney Earldom of the Twelfth Century. A Musicological Study}, institution = {Uppsala Universitet}, type = {phdthesis}, location = {Uppsala}, year = {1985}, annotation = {This is a typical \texttt{thesis} entry for a PhD thesis. Note the \texttt{type} field in the database file which uses a localization key. Also note the format of the printed name and compare the \texttt{useprefix} option in the \texttt{options} field as well as \texttt{vangennep}} } @Thesis{loh, langid = {english}, langidopts = {variant=american}, author = {Loh, Nin C.}, title = {High-Resolution Micromachined Interferometric Accelerometer}, institution = {Massachusetts Institute of Technology}, type = {mathesis}, location = {Cambridge, Mass.}, year = {1992}, annotation = {This is a typical \texttt{thesis} entry for an MA thesis. Note the \texttt{type} field in the database file which uses a localization key} } @Thesis{Pimentel00, author = {Pimentel, Jr.,Joseph J.}, title = {Sociolinguistic Reflections of Privatization and Globalization: The {Arabic} of {Egyptian} newspaper advertisements}, school = {University of Michigan}, year = {2000}, } @Book{luzzatto, author = {Luzzatto, Moshe Ḥayyim}, title = {ha-Lashon la-Ramḥal: u-vo sheloshah ḥiburim}, location = {Yerushalayim}, publisher = {Makhon Ramḥal}, year = {2000} } % Without braces round this prefixed lastname, T::B::N fails to get % the lastname on Windows for some reason @BOOK{hasan, author = {{al-Hasan}, ʿAlī}, editor = {{al-Hasan}, ʿAlī}, translator = {{al-Hasan}, ʿAlī}, title = {Some title}, publisher = {Some press}, year = {2000}, } % This also tests auto-escaping of some LaTeX specials chars like "%" @MISC{t1, KEYWORDS = { primary, something,somethingelse}, AUTHOR = {Bill Brown}, TITLE = {10\% of [100] and 90% of $Normal_2$ | \& # things {$^{3}$}}, YEAR = 1992, PAGES = {100--} } % SORTNAME should not be output @MISC{t2, AUTHOR = {Bill Brown}, SORTNAME = {Bill Brown}, TITLE = {Signs of W$\frac{o}{a}$nder}, YEAR = {1994}, PAGES = {100--108} } % useprefix tests @MISC{tvonb, AUTHOR = {Terrence von Bobble}, TITLE = {Things}, YEAR = {1997} } @BOOK{avona, AUTHOR = {useprefix=false and Alan von Animal}, TITLE = {Things}, YEAR = {1998} } @BOOK{rvonr, AUTHOR = {useprefix=false and useprefix=true, given=Richard, prefix=von, family=Rabble}, TITLE = {Things}, YEAR = {1998} } % fullhash and namehash should be different for these two @UNPUBLISHED{anon1, AUTHOR = {AnonymousX}, TITLE = {Title1}, YEAR = {1835}, SHORTAUTHOR = {XAnony}, SHORTTITLE = {Shorttitle}, KEYWORDS = {arc}, PAGES = {111--118}, LANGID = {english}, LANGIDOPTS = {variant=american}, } @UNPUBLISHED{anon2, AUTHOR = {AnonymousY}, TITLE = {Title2}, YEAR = {1839}, PAGES = {1176--1276}, SHORTAUTHOR = {YAnony}, SHORTTITLE = {Shorttitle}, KEYWORDS = {arc}, LANGID = {en}, LANGIDOPTS = {variant=american}, } % Testing uniquelist % Testing field with zero value @MISC{u1, AUTHOR = {AAA and BBB and CCC and DDD}, TITLE = {A title}, NOTE = {0}, DATE = {2000} } @MISC{u2, AUTHOR = {AAA and BBB and CCC and DDD and EEE}, TITLE = {A title}, DATE = {2003} } % Testing ignore @UNPUBLISHED{i1, ABSTRACT = {Some abstract %50 of which is useless}, AUTHOR = {AAA and BBB and CCC and DDD and EEE}, TITLE = {A title}, DATE = {2003}, USERB = {test}, LISTA = {list test}, LISTB = {late and early}, LISTC = {late and early}, LISTD = {æøå}, } @MISC{i2, USERB = {Some text & some bad chars}, USERF = {Something to lose in an alsoset}, AUTHOR = {AAA and BBB and CCC}, TITLE = {A title}, DATE = {2005} } % Testing per_type and per_entry max/min*names @MISC{tmn1, AUTHOR = {AAA and BBB and CCC}, TITLE = {A title}, INSTITUTION = {A and B and C}, DATE = {2005} } @BOOK{tmn2, OPTIONS = {maxalphanames = 2}, AUTHOR = {AAA and BBB and CCC}, TITLE = {A title}, DATE = {2005} } @UNPUBLISHED{tmn3, OPTIONS = {minitems=2}, AUTHOR = {AAA and BBB and CCC}, INSTITUTION = {A and B and C}, TITLE = {A title}, DATE = {2005} } @UNPUBLISHED{tmn4, OPTIONS = {maxbibnames=4}, AUTHOR = {AAA and BBB and CCC}, TITLE = {A title}, DATE = {2005} } % Test of duplicate skipping @UNPUBLISHED{tmn4, AUTHOR = {ZZZ} } % Testing exotic labelnames @MISC{lne1, AUTHOR = {AAA and BBB and CCC}, NAMEA = {ZZZ}, TITLE = {A title}, DATE = {2005} } % Testing citekey aliases @MISC{alias1, AUTHOR = {Alan Alias}, DATE = {2005}, IDS = {alias2, alias3} } @MISC{alias2, AUTHOR = {Alan Alias}, DATE = {2005}, IDS = {alias4} } @MISC{alias5, AUTHOR = {Alan Alias}, DATE = {2005}, IDS = {alias6} } % Testing url encoding @MISC{url1, AUTHOR = {Alan Alias}, DATE = {2005}, URL = {http://www.something.com/q=áŠ}, URLS = {http://www.something.com/q=አand http://www.sun.com} } @ONLINE{ol1, AUTHOR = {Oliver Online}, TITLE = {Online1}, NOTE = {A note} } @MISC{pages1, PAGES = {23--24} } @MISC{pages2, PAGES = {23} } @MISC{pages3, PAGES = {{I-II}---{III-IV}} } @MISC{pages4, PAGES = { 3 -- 5 }, } @MISC{pages5, PAGES = {42--}, } @MISC{pages6, PAGES = {\bibstring{number} 42}, } @MISC{pages7, PAGES = {\bibstring{number} 42, 3 --- 6, {I-II}--5}, } @MISC{pages8, PAGES = {10-15, ⅥⅠ-ⅻ}, } @MISC{pages9, PAGES = {M-1--M-4}, } % Testing user->style maps @CONVERSATION{us1, AUTHOR = {Test}, } @BOOK{labelstest, AUTHOR = {AAA and BBB and CCC}, TITLE = {A title}, DATE = {2005-03-02} } % Note the UTF8 char so we test Text::BibTeX::split_list utf-8 returns @BOOK{list1, LOCATION = {ÁAA and BBB and others} } @BOOK{sn1, SORTNAME = {ZZZ}, AUTHOR = {AAA} } % ISBN tests % Also test empty fields @MISC{isbn1, AUTHOR = {given=Fred, family=Flummox}, ISBN = {0816520666}, INSTITUTION = {}, LANGUAGE = {} } @MISC{isbn2, AUTHOR = {Fred Flummox}, ISBN = {9780816520664} } % Sorting name key tests @BOOK{snk1, AUTHOR = {von Doe, Jr, John} } % Extended name format test @BOOK{ent1, AUTHOR = {sortingnamekeytemplatename=snks1 and Simon Smith and family=Brown, prefix=de, given=Brian, sortingnamekeytemplatename=snks2}, } % Decode verbatim test @BOOK{verb1, AUTHOR = {Arthur Allright}, VERBA = {\=y.\"a} } % source->target overwrite @BOOK{over1, USERA = {thing}, USERD = {A} } % Test sorting of explicit "and others" @BOOK{others1, AUTHOR = {Gauck, Joachim}, TITLE = {Title A}, } @BOOK{others2, AUTHOR = {Gauck, Joachim and others}, TITLE = {Title B}, } biblatex-biber-2.9/t/tdata/encoding3.bib000444000153000001 44113205066062 17504 0ustar00vboxother000000000000% -*- coding: latin-1-unix -*- % This is a latin1 encoded file (Notice the "LATIN SMALL LETTER O WITH DIAERESIS"). % The top line is a hint to Emacs to open in the right encoding @BOOK{test1, YEAR = {1999}, AUTHOR = {Edward Encalcer}, TITLE = {Sme title}, PUBLISHER = {A press} } biblatex-biber-2.9/t/tdata/names.bcf000444000153000001 25036413205066062 17027 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 0 labeldatespec date julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 1 useauthor 1 useeditor 0 usetranslator 0 labelnamespec shorteditor editor translator useeditor 0 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender names.bib * presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 presort sortkey labelalpha sortname author editor translator sorttitle title sortyear year volume 0 sorttitle title biblatex-biber-2.9/t/tdata/encoding4.bib000444000153000001 44313205066062 17507 0ustar00vboxother000000000000% -*- coding: latin-2-unix -*- % This is a latin2 encoded file (Notice the "LATIN CAPITAL LETTER Z WITH DOT ABOVE"). % The top line is a hint to Emacs to open in the right encoding @BOOK{test1, YEAR = {1999}, AUTHOR = {Edward Encalcer}, TITLE = {ome title}, PUBLISHER = {A press} } biblatex-biber-2.9/t/tdata/labelalpha.bib000444000153000001 1771213205066062 17771 0ustar00vboxother000000000000@BOOK{L1, AUTHOR = {John Doe}, TITLE = {Title 1}, PUBLISHER = {Oxford}, YEAR = {1995}, } @BOOK{L2, AUTHOR = {John Doe and Albert Abrahams}, TITLE = {Title 2}, PUBLISHER = {Oxford}, YEAR = {1995}, } @BOOK{L3, AUTHOR = {John Doe and Albert Abrahams}, TITLE = {Title 3}, PUBLISHER = {Oxford}, YEAR = {1995}, } @BOOK{L4, AUTHOR = {John Doe and Albert Abrahams and Ernie Edwards}, TITLE = {Title 4}, PUBLISHER = {Oxford}, YEAR = {1995}, } @BOOK{L5, AUTHOR = {John Doe and Albert Abrahams and Ernie Edwards}, TITLE = {Title 5}, PUBLISHER = {Oxford}, YEAR = {1995}, } @BOOK{L6, AUTHOR = {John Doe and Simon Smith and Ernie Edwards}, TITLE = {Title 6}, PUBLISHER = {Oxford}, YEAR = {1995}, } @BOOK{L7, AUTHOR = {John Doe and Simon Smith and James Jones}, TITLE = {Title 7}, PUBLISHER = {Oxford}, YEAR = {1995}, } @BOOK{L8, AUTHOR = {Bill Shakespeare}, TITLE = {Works}, PUBLISHER = {Oxford}, DATE = {1985/1992}, } % For these two, the shorthand should prevent extraalpha being set for them as % they are disambiguated by their shorthands and labelalpha is true @BOOK{L9, SHORTHAND = {SS1}, AUTHOR = {Sam Smiley}, TITLE = {Works}, PUBLISHER = {Oxford}, YEAR = {1922}, } @BOOK{L10, SHORTHAND = {SS2}, AUTHOR = {Sam Smiley}, TITLE = {UnWorks}, PUBLISHER = {Oxford}, YEAR = {1922}, } % prefix in label @BOOK{L11, AUTHOR = {Carl von Rancour}, TITLE = {UnWorks}, YEAR = {1922}, } @BOOK{L12, AUTHOR = {Carl von Rancour and Russel von Bile}, TITLE = {UnWorks}, ORIGDATE = {1922-03-21}, } % per-type labeltemplate @MISC{L13, AUTHOR = {Carl von Rancour and Russel von Bile}, TITLE = {UnVorks}, YEAR = {1987}, } @MISC{L14, LABEL = {Alabel}, AUTHOR = {Carl von Rancour and Russel von Bile}, TITLE = {UnWorks}, YEAR = {1989}, } % disambiguation of labelparts @UNPUBLISHED{L15, AUTHOR = {Alan Acckerman and Bert Briff and Clive Climben}, TITLE = {Title}, YEAR = {1989}, } @BOOKLET{L16, AUTHOR = {Alan Acckerman and Bert Baff and Clive Climbi}, TITLE = {Title}, YEAR = {1990}, } @BOOKLET{L16a, AUTHOR = {Alan Acckerman and Bert Baff and Clive Climbi}, TITLE = {Title2}, YEAR = {1990}, } @REPORT{L17, AUTHOR = {Alan Ackkerman and Bert Baff and Clive Climbi}, TITLE = {Title}, YEAR = {1911}, } @REPORT{L17a, AUTHOR = {Alan Ackkerman and Bert Baff and Clive Climbi}, TITLE = {Title2}, YEAR = {1911}, } @UNPUBLISHED{L18, AUTHOR = {Agassi and Chang and Laver}, TITLE = {Title}, YEAR = {1911}, } @UNPUBLISHED{L19, AUTHOR = {Agassi and Connors and Lendl}, TITLE = {Title}, YEAR = {1911}, } @UNPUBLISHED{L20, AUTHOR = {Agassi and Courier and Laver}, TITLE = {Title}, YEAR = {1911}, } @UNPUBLISHED{L21, AUTHOR = {Borg and Connors and Edberg}, TITLE = {Title}, YEAR = {1911}, } @UNPUBLISHED{L22, AUTHOR = {Borg and Connors and Emerson}, TITLE = {Title}, YEAR = {1911}, } @UNPUBLISHED{L23, AUTHOR = {Sanchez-Vicario, Bill}, TITLE = {Title}, YEAR = {1900}, } @UNPUBLISHED{L24, AUTHOR = {Zaa}, TITLE = {Title}, YEAR = {1900}, } @UNPUBLISHED{L25, AUTHOR = {Zoo and Xaa}, TITLE = {Title}, YEAR = {1900}, } @UNPUBLISHED{L26, AUTHOR = {Zoo and Xaa}, TITLE = {Title}, YEAR = {1901}, } @BOOK{LDN1, AUTHOR = {Vela, Luis and Ura Ru, Juan}, TITLE = {Title}, YEAR = {1889}, } @CUSTOMA{LDN2, OPTIONS = {labelalphanametemplatename=customa}, AUTHOR = {Vela, Luis and Ura Ru, Juan}, TITLE = {Title}, YEAR = {1845}, } @CUSTOMD{LDN3, OPTIONS = {labelalphanametemplatename=customd}, AUTHOR = {Vela, Luis and given={Ura Ru}, family={Juan}, suffix={Sr}, prefix={von}}, TITLE = {Title}, YEAR = {1845}, } % Some examples from biblatex examples file of collection plus individual volumes % The date ranges should be handled differently by extradate and extraalpha @BOOK{knuth:ct, langid = {english}, langidopts = {variant=american}, sortyear = {1984-0}, sorttitle = {Computers & Typesetting}, indexsorttitle = {Computers & Typesetting}, author = {Knuth, Donald E.}, title = {Computers \& Typesetting}, volumes = {5}, publisher = {Addison-Wesley}, location = {Reading, Mass.}, date = {1984/1986}, annotation = {A five-volume book cited as a whole. This is a \texttt{book} entry, note the \texttt{volumes} field} } @BOOK{knuth:ct:a, langid = {english}, langidopts = {variant=american}, sortyear = {1984-1}, sorttitle = {Computers & Typesetting A}, indexsorttitle = {The TeXbook}, author = {Knuth, Donald E.}, indextitle = {\TeX book, The}, title = {The \TeX book}, shorttitle = {\TeX book}, maintitle = {Computers \& Typesetting}, volume = {A}, publisher = {Addison-Wesley}, location = {Reading, Mass.}, date = {1984}, annotation = {The first volume of a five-volume book. Note the \texttt{sorttitle} and \texttt{sortyear} fields. We want this volume to be listed after the entry referring to the entire five-volume set. Also note the \texttt{indextitle} and \texttt{indexsorttitle} fields} } @BOOK{knuth:ct:b, langid = {english}, langidopts = {variant=american}, sortyear = {1986-1}, sorttitle = {Computers & Typesetting B}, indexsorttitle = {TeX: The Program}, author = {Knuth, Donald E.}, title = {\TeX: The Program}, shorttitle = {\TeX}, maintitle = {Computers \& Typesetting}, volume = {B}, publisher = {Addison-Wesley}, location = {Reading, Mass.}, date = {1986}, annotation = {The second volume of a five-volume book. Note the \texttt{sorttitle} and \texttt{sortyear} fields. Also note the \texttt{indexsorttitle} field} } @BOOK{knuth:ct:c, langid = {english}, langidopts = {variant=american}, sortyear = {1986-2}, sorttitle = {Computers & Typesetting C}, author = {Knuth, Donald E.}, indextitle = {METAFONTbook, The}, title = {The METAFONTbook}, shorttitle = {METAFONTbook}, maintitle = {Computers \& Typesetting}, volume = {C}, publisher = {Addison-Wesley}, location = {Reading, Mass.}, date = {1986}, annotation = {The third volume of a five-volume book. Note the \texttt{sorttitle} and \texttt{sortyear} fields as well as the \texttt{indextitle} field} } @PHDTHESIS{Schmidt2007a, author = {C. Schmidt}, year = {2007}, } @INPROCEEDINGS{Schmidt2007, author = {C. Schmidt and XXX and YYY and ZZZ}, year = {2007}, } @PHDTHESIS{Schnee2007a, author = {D. Schnee}, year = {2007}, } @ARTICLE{Schnee2007, author = {D. Schnee and XXX and YYY and ZZZ}, year = {2007}, } @CUSTOMB{title1, author = {D. Schnee and XXX and YYY and ZZZ}, title = {{T\"i{tle} in Braces with char}}, year = {2007}, } @BOOK{labelstest, AUTHOR = {AAA and BBB and CCC}, TITLE = {A title}, DATE = {2005-03-02} } @CUSTOMC{padtest, AUTHOR = {Alan Al}, TITLE = {T}, YEAR = {2007}, } @ARTICLE{ignore1, AUTHOR = {O'Toole, Alexander}, YEAR = {2007}, } @CUSTOMA{ignore2, OPTIONS = {labelalphanametemplatename=customa}, AUTHOR = {De Long, Alexander}, YEAR = {2007}, } @ARTICLE{skipwidthtest1, AUTHOR = {O'Toole, Henry}, TITLE = {O'Toole}, YEAR = {2007}, } @ARTICLE{prefix1, AUTHOR = {Alan van der Vaar}, TITLE = {Thing}, YEAR = {1999}, } @ARTICLE{rangetest1, AUTHOR = {VA and WA and XA and YA and ZA}, EDITOR = {VE and WE and XE and YE and ZE}, TRANSLATOR = {VT and WT and XT and YT and ZT}, FOREWORD = {VF and WF and XF and YF and ZF}, HOLDER = {VH and WH and XH and YH and ZH} } @MOVIE{m1, AUTHOR = {Frank Fake}, TITLE = {Film title 1} } biblatex-biber-2.9/t/tdata/set-legacy.bcf000444000153000001 24561313205066061 17761 0ustar00vboxother000000000000 output_encoding utf8 input_encoding utf8 debug 0 mincrossrefs 2 minxrefs 2 sortcase 0 sortupper 1 alphaothers \textbf{+} labelalpha 0 labelnamespec shortauthor author shorteditor editor translator labeltitle 0 labeltitlespec shorttitle title labeltitleyear 0 labeldateparts 1 labeldatespec date year julian 0 gregorianstart 1582-10-15 maxalphanames 3 maxbibnames 3 maxcitenames 3 maxitems 3 minalphanames 1 minbibnames 1 mincitenames 1 minitems 1 singletitle 0 sortalphaothers + sortlocale english sortingtemplatename nty sortsets 0 uniquelist 0 uniquename 0 uniqueprimaryauthor 0 uniquetitle 0 uniquebaretitle 0 uniquework 0 useprefix 0 useauthor 1 useeditor 0 usetranslator 0 translit datamodel uniquenametemplate labelalphanametemplate labelalphatemplate inheritance sortingnamekeytemplate sortingtemplate extradatespec labelnamespec labeltitlespec labeldatespec controlversion alphaothers sortalphaothers presort texencoding bibencoding sortingtemplatename sortlos sortlocale language babel autolang backrefsetstyle block date datelabel urldate eventdate origdate alldates autocite notetype refsection refsegment citereset backrefstyle arxiv gregorianstart useafterword julian useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor debug loadfiles safeinputenc sortcase sortupper terseinits firstinits sortfirstinits giveninits sortgiveninits abbreviate dateabbrev clearlang indexing sortcites sortsets hyperref backref pagetracker citecounter citetracker ibidtracker idemtracker opcittracker loccittracker parentracker autopunct punctfont labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniqueprimaryauthor uniquetitle uniquebaretitle uniquework defernumbers bibwarn useprefix defernums isbn url doi eprint related dashed mergedate mincrossrefs maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames maxparens alphaothers sortalphaothers presort useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing labelnumber labelalpha labeltitle labeltitleyear labeldateparts labelyear uniquelist uniquename singletitle uniquetitle uniquebaretitle uniquework useprefix skipbib skiplos skipbiblist skiplab dataonly translit labelalphatemplate sortexclusion labelnamespec labeltitlespec labeldatespec maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames nametemplates useafterword useannotator useauthor usebookauthor usecommentator useeditor useeditora useeditorb useeditorc useforeword useholder useintroduction usenamea usenameb usenamec usetranslator useshortauthor useshorteditor indexing uniquelist uniquename useprefix skipbib skiplos skipbiblist skiplab dataonly sortingnamekeytemplatename presort noinherit maxnames minnames maxbibnames minbibnames maxcitenames mincitenames maxitems minitems maxalphanames minalphanames labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename nametemplates useprefix sortingnamekeytemplatename labelalphanametemplatename uniquenametemplatename prefix family shorthand label labelname labelname year labelyear year prefix family given prefix family given suffix prefix mm sf,sm,sn,pf,pm,pn,pp family,given,prefix,suffix boolean,integer,string,xml article artwork audio bibnote book bookinbook booklet collection commentary customa customb customc customd custome customf inbook incollection inproceedings inreference image jurisdiction legal legislation letter manual misc movie music mvcollection mvreference mvproceedings mvbook online patent performance periodical proceedings reference report review set software standard suppbook suppcollection thesis unpublished video xdata number volume volumes abstract addendum annotation booksubtitle booktitle booktitleaddon chapter edition eid entrysubtype eprintclass eprinttype eventtitle eventtitleaddon gender howpublished indexsorttitle indextitle isan isbn ismn isrn issn issue issuesubtitle issuetitle iswc journalsubtitle journaltitle label langid langidopts library mainsubtitle maintitle maintitleaddon nameaddon note origtitle pagetotal part relatedstring relatedtype reprinttitle series shorthandintro subtitle title titleaddon usera userb userc userd usere userf venue version shorthand shortjournal shortseries shorttitle sortyear sorttitle sortshorthand sortkey presort institution lista listb listc listd liste listf location organization origlocation origpublisher publisher afterword annotator author bookauthor commentator editor editora editorb editorc foreword holder introduction namea nameb namec translator shortauthor shorteditor sortname authortype editoratype editorbtype editorctype editortype bookpagination nameatype namebtype namectype origlanguage pagination pubstate type language crossref xref date endyear year month day hour minute second timezone season endmonth endday endhour endminute endsecond endtimezone endseason eventdate eventendyear eventyear eventmonth eventday eventhour eventminute eventsecond eventtimezone eventseason eventendmonth eventendday eventendhour eventendminute eventendsecond eventendtimezone eventendseason origdate origendyear origyear origmonth origday orighour origminute origsecond origtimezone origseason origendmonth origendday origendhour origendminute origendsecond origendtimezone origendseason urldate urlendyear urlyear urlmonth urlday urlhour urlminute urlsecond urltimezone urlseason urlendmonth urlendday urlendhour urlendminute urlendsecond urlendtimezone urlendseason doi eprint file verba verbb verbc url xdata ids entryset related keywords options relatedoptions pages execute abstract annotation authortype bookpagination crossref day endday endhour endminute endmonth endseason endsecond endtimezone endyear entryset entrysubtype execute file gender hour ids indextitle indexsorttitle isan ismn iswc keywords label langid langidopts library lista listb listc listd liste listf minute month nameaddon options origday origendday origendhour origendminute origendmonth origendseason origendsecond origendtimezone origendyear orighour origminute origmonth origseason origsecond origtimezone origyear origlocation origpublisher origtitle pagination presort related relatedoptions relatedstring relatedtype season second shortauthor shorteditor shorthand shorthandintro shortjournal shortseries shorttitle sortkey sortname sortshorthand sorttitle sortyear timezone url urlday urlendday urlendhour urlendminute urlendmonth urlendsecond urlendtimezone urlendyear urlhour urlminute urlmonth urlsecond urltimezone urlyear usera userb userc userd usere userf verba verbb verbc xdata xref year set entryset crossref article addendum annotator author commentator doi editor editora editorb editorc editortype editoratype editorbtype editorctype eid eprint eprintclass eprinttype issn issue issuetitle issuesubtitle journalsubtitle journaltitle language note number origlanguage pages pubstate series subtitle title titleaddon translator version volume bibnote note book author addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location maintitle maintitleaddon mainsubtitle note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvbook addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage pagetotal publisher pubstate series subtitle title titleaddon translator volume volumes inbook bookinbook suppbook addendum afterword annotator author booktitle bookauthor booksubtitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage part publisher pages pubstate series subtitle title titleaddon translator volume volumes booklet addendum author chapter doi editor editortype eprint eprintclass eprinttype howpublished language location note pages pagetotal pubstate subtitle title titleaddon type collection reference addendum afterword annotator chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages pagetotal part publisher pubstate series subtitle title titleaddon translator volume volumes mvcollection mvreference addendum afterword annotator author commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location note number origlanguage publisher pubstate subtitle title titleaddon translator volume volumes incollection suppcollection inreference addendum afterword annotator author booksubtitle booktitle booktitleaddon chapter commentator doi edition editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype foreword introduction isbn language location mainsubtitle maintitle maintitleaddon note number origlanguage pages part publisher pubstate series subtitle title titleaddon translator volume volumes manual addendum author chapter doi edition editor editortype eprint eprintclass eprinttype isbn language location note number organization pages pagetotal publisher pubstate series subtitle title titleaddon type version misc addendum author doi editor editortype eprint eprintclass eprinttype howpublished language location note organization pubstate subtitle title titleaddon type version online addendum author editor editortype language note organization pubstate subtitle title titleaddon version patent addendum author doi eprint eprintclass eprinttype holder location note number pubstate subtitle title titleaddon type version periodical addendum doi editor editora editorb editorc editortype editoratype editorbtype editorctype eprint eprintclass eprinttype issn issue issuesubtitle issuetitle language note number pubstate season series subtitle title volume mvproceedings addendum doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location note number organization pagetotal publisher pubstate series subtitle title titleaddon venue volumes proceedings addendum chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages pagetotal part publisher pubstate series subtitle title titleaddon venue volume volumes inproceedings addendum author booksubtitle booktitle booktitleaddon chapter doi editor editortype eprint eprintclass eprinttype eventday eventendday eventendmonth eventendyear eventmonth eventyear eventtitle eventtitleaddon isbn language location mainsubtitle maintitle maintitleaddon note number organization pages part publisher pubstate series subtitle title titleaddon venue volume volumes report addendum author chapter doi eprint eprintclass eprinttype institution isrn language location note number pages pagetotal pubstate subtitle title titleaddon type version thesis addendum author chapter doi eprint eprintclass eprinttype institution language location note pages pagetotal pubstate subtitle title titleaddon type unpublished addendum author howpublished language location note pubstate subtitle title titleaddon article book inbook bookinbook suppbook booklet collection incollection suppcollection manual misc mvbook mvcollection online patent periodical suppperiodical proceedings inproceedings reference inreference report set thesis unpublished date year set entryset crossref article author journaltitle title book mvbook mvcollection mvreference author title inbook bookinbook suppbook author title booktitle booklet author editor title collection reference editor title incollection suppcollection inreference author editor title booktitle manual title misc title online title url patent author title number periodical editor title proceedings mvproceedings editor title inproceedings author title booktitle report author title type institution thesis author title type institution unpublished author title isbn issn ismn date eventdate origdate urldate gender sets.bib Elias1955 presort sortkey sortname author editor translator sorttitle title sorttitle title sortyear year volume 0 citeorder biblatex-biber-2.9/doc000755000153000001 013205066062 14246 5ustar00vboxother000000000000biblatex-biber-2.9/doc/biber.tex000444000153000001 40707613205066062 16266 0ustar00vboxother000000000000\documentclass{ltxdockit} \usepackage{btxdockit} \usepackage[british]{babel} \usepackage[strict=true,autostyle=true]{csquotes} \usepackage{ifthen} \usepackage{fontspec} \usepackage{tikz} \usepackage{graphicx} \usepackage{booktabs} \usepackage{fixfoot} \usepackage{color} \usepackage{listings} \usepackage{metalogo} \usepackage{colortbl} \usepackage[retainmissing]{MnSymbol} \setmainfont[Ligatures=TeX]{CMU Serif} \setsansfont[Ligatures=TeX]{CMU Sans Serif} \setmonofont{CMU Typewriter Text} \def\BibLaTeX{\textsc{Bib}\latex} \def\BibTeX{\textsc{Bib}\kern-.08em \TeX} \renewcommand{\labelitemii}{$\circ$} \newcommand*{\biber}{Biber\xspace} \newcommand*{\biblatex}{Biblatex\xspace} \MakeAutoQuote{«}{»} \gdef\biberversion{2.9} % BIBER VERSION \gdef\biblatexversion{3.8} % BIBLATEX VERSION % colour for tables \definecolor{Gray}{gray}{0.85} \newcolumntype{a}{>{\columncolor{Gray}}l} % Set up tikz things \usetikzlibrary{shapes.geometric} \usetikzlibrary{arrows} \usetikzlibrary{fit} \usetikzlibrary{calc} \tikzstyle{file} = [rectangle, black, very thick, draw=blue, fill=blue!20, minimum width=6em, minimum height=3em, align=center] \tikzstyle{funit} = [rectangle, rounded corners=1ex, black, very thick, shape border rotate=-90, draw=green, fill=green!20, minimum size=3em, align=center] % colours for the .dot examples \xdefinecolor{centry}{HTML}{A0D0FF} \xdefinecolor{ncentry}{HTML}{DEEFFF} \xdefinecolor{doentry}{HTML}{FDFFD9} \xdefinecolor{section}{HTML}{FCE3FA} \xdefinecolor{set}{HTML}{E3DADC} \xdefinecolor{related}{HTML}{AD1741} \xdefinecolor{clone}{HTML}{AD1741} \xdefinecolor{crossref}{HTML}{7D7879} \xdefinecolor{xref}{HTML}{7D7879} \xdefinecolor{xdata}{HTML}{2CA314} \DeclareFixedFootnote{\tpb}{Binary maintained by third party. See README in binary download directory for this platform for support/contact details. Usually, the binary maintainer is also the binary build provider for \TeX Live.} \titlepage{% title={biber}, subtitle={A backend bibliography processor for biblatex}, url={http://biblatex-biber.sourceforge.net}, author={Philip Kime, François Charette}, email={Philip@kime.org.uk, firmicus@ankabut.net}, revision={biber \biberversion\ (biblatex \biblatexversion)}, date={\today}} \hypersetup{% pdftitle={biber}, pdfsubject={A backend bibliography processor for biblatex}, pdfauthor={Philip Kime}, pdfkeywords={biblatex, bibliography}} % Control list spacing \usepackage{enumitem} \setdescription{noitemsep} \setenumerate{noitemsep} \setitemize{noitemsep} \def\biberex#1{\hbox{\hspace{-4em}\texttt{\small \detokenize{#1}}}} \begin{document} \definecolor{grey}{rgb}{0.7,0.7,0.7} \printtitlepage \tableofcontents \section{Important Changes}\label{special} Please see the \verb+Changes+ file which accompanies \biber\ for the details on changes in each version. This section is just for important things like incompatible changes which users should be aware of. \minisec{2.6} When outputting \bibtex\ data in tool mode (\opt{--tool}), \biber now follows a full internal processing chain involving the data model. In previous versions, \bibtex output would just output the raw \bibtex input data, only allowing for some re-formatting options and therefore no tool mode conversions from other formats into \bibtex format were possible. This change has some normalisation consequences: \begin{itemize} \item Dates are normalised into \bibfield{DATE} fields. Legacy \bibfield{YEAR} fields are never output in \bibtex format data output. \item Fields which are not defined in the data model described in the default \file{biber-tool.conf} are ignored and are neither read nor output. If custom fields are required, they should be defined in the data model by using a custom tool mode config file (see below). \end{itemize} \minisec{1.9} \biber no longer checks the environment for locales to use for sorting. This was always rather against the spirit of \tex since it means that the same document might look different when compiled by different people. However, \biblatex now passes Babel/Polyglossia language identifiers (or real locale identifiers if you prefer) in the \file{.bcf} and \biber can use these to set the sorting locale globally or on a per-sortscheme basis. This is better than using environment variables since Babel/Polyglossia are more \latex relevant language environments anyway. \minisec{1.8} Various option name changes. Old names are retained for backwards compatibility. See the output of the \opt{--help} option. \minisec{1.0} The \opt{--validate-structure} option is now called \opt{--validate-datamodel} \minisec{0.9.9} The output format option \opt{--graph} has been moved to a new option \opt{--output-format}. The option \opt{--graph} should now be specified as \opt{--output-format=dot} and the \linebreak\opt{--dot-include} option should be used to specify the elements to include in the DOT output. For example: \begin{verbatim} biber --graph=section,field \end{verbatim} \noindent is now: \begin{verbatim} biber --output-format=dot --dot-include=section,field \end{verbatim} \minisec{1.8} \textcolor{red}{Several option names have changed}. Several options have changed names to facilitate better semantic classification of options. The previous names are supported as legacy aliases. See the \opt{--help} output of the \biber command. \minisec{0.9.8} \textcolor{red}{The \opt{sourcemap} option syntax has changed}.The syntax was too confusing. It is now simplified and more powerful. It is uses a sequential processing model to apply mappings to an entry. See section \ref{ref:map}. \minisec{0.9.7} \textcolor{red}{The user config file has a completely new format}.The reason for this is that the older \verb+Config::General+ format could not be extended to deal with more sophisticated features like per-datasource restrictions. An XML format is much better and in fact easier to understand. The old format of the \opt{map} option (now called \opt{sourcemap}) was rather confusing because of limitations in the old config file format. Please see section \ref{ref:map} and convert your config files to the new format. \minisec{0.9.6} \textcolor{red}{Matching of citation keys and datasource entry keys is now \emph{case-sensitive}}. This is to enforce consistency across the entire Bib\latex\ and \biber\ processing chain. All of the usual referencing mechanisms in \latex\ are case-sensitive and so is the matching in Bib\latex\ of citations to entries in the \texttt{.bbl} file generated by \biber. It is inconsistent and messy to enforce case-insensitivity in only \biber's matching of citations keys to datasource entry keys. If \biber\ detects what looks like a case mismatch between citation keys, it will warn you. \noindent \textcolor{red}{Summary of warnings/errors is now a new format}. When \biber\ finishes writing the \verb+.bbl+, it gives a summary count of errors/warnings. It used to do this in the same format as Bib\TeX, for compatibility. Now it uses a more consistent and easier to parse format which matches all other \biber\ messages. Please note if you need to support \biber\ in an external tool. I have updated the notes on AUC\TeX\ support below to reflect this. \section{Introduction}\label{int} \subsection{About} \biber\ is conceptually a \BibTeX\ replacement for \biblatex. It is written in Perl with the aim of providing a customised and sophisticated data preparation backend for \biblatex. You do \emph{not} need to install Perl to use \biber---binaries are provided for many operating systems via the main \TeX\ distributions (\TeX Live, Mac\TeX, MiK\TeX) and also via download from SourceForge. Functionally, \biber\ offers a superset of \BibTeX's capabilities but is tightly coupled with \biblatex\ and cannot be used as a stand-alone tool with standard \verb+.bst+ styles. \biber's primary role is to support \biblatex\ by performing the following tasks: \begin{itemize} \item Parsing data from datasources \item Processing cross-references, entry sets, related entries \item Generating data for name, name list and name/year disambiguation \item Structural validation according to \biblatex\ data model \item Sorting reference lists \item Outputting data to a \verb+.bbl+ for \biblatex\ to consume \end{itemize} \biber\ also has the ability to output different formats than \file{.bbl} and can, for example, output a new \bibtex\ file which contains only cited entries from the datasources (using the \opt{--output-format=bibtex} option). There is also a «,very thick] (mapp); \node[funit] (dyn) [below of=mapp,node distance=6em] {Instantiate dynamic sets and\\related entries} edge [<-,very thick] (mapp); \node[funit] (xdata) [below of=dyn,node distance=6em] {Process XDATA} edge [<-,very thick] (dyn); \node[funit] (crossrefs) [below of=xdata,node distance=6em] {Process cross-references and\\sets} edge [<-,very thick] (xdata); \node[funit] (validate) [below of=crossrefs,node distance=6em] {Validate data model} edge [<-,very thick] (crossrefs); \node[funit] (pre) [below of=validate,node distance=6em] {Resolve label* fields\\generate hashes\\enforce mincrossrefs} edge [<-,very thick] (validate); \node[funit] (unique) [right of=decode,node distance=16em] {Generate uniqueness data}; \draw[->,very thick] (pre.east) -- ($ (pre.east) + (2em,0) $) -- ($ (unique.west) - (2em,0) $) -- (unique.west); \node[funit] (visible) [below of=unique,node distance=6em] {Generate name visibility data} edge [<-,very thick] (unique); \node[funit] (post) [below of=visible,node distance=6em] {Generate more hashes and\\labels} edge [<-,very thick] (visible); \node[funit] (sort) [below of=post,node distance=6em] {Perform sorting} edge [<-,very thick] (post); \node[funit] (output) [below of=sort,node distance=6em] {Construct output objects} edge [<-,very thick] (sort); \node[funit] (encode) [below of=output,node distance=6em] {Encode to output encoding} edge [<-,very thick] (output); \node[file] (bbl) [below of=encode,node distance=8em] {output file} edge [<-,very thick] (encode); \end{tikzpicture} \caption{Overview of \biber's main functional units} \label{fig:overview} \end{figure} It may be useful to know something about the different routes a datasource entry can take as it passes through \biber. \begin{enumerate} \item\label{list:cited} All cited entries which are subsequently found in a datasource are instantiated in the internal \biber\ data model. \item Some uncited entries on which cited entries depend are instantiated in the internal \biber\ data model: \begin{itemize} \item Entries with entrytype \bibtype{XDATA} which are referenced from cited entries. \item Entries mentioned in the \bibfield{CROSSREF} or \bibfield{XREF} field of a cited entry (unless they are also cited themselves in which case they are already instantiated as per item \ref{list:cited} above). \item Clones of entries mentioned as a «related» entry of a cited entry. \item Members of sets, either explicit \bibtype{SET} entrytype entries or dynamic sets. \end{itemize} \item Some uncited but instantiated entries are promoted to cited status so that they make it into the output: \begin{itemize} \item Entries instantiated by being members of a set. \item Entries instantiated by being mentioned as a \bibfield{CROSSREF} are promoted to cited status if \bibfield{CROSSREF}'ed or \bibfield{XREF}'ed at least \opt{mincrosref} times. \item Clones of entries mentioned as a «related» entry of a cited entry. \end{itemize} \item Some of these auto-cited entries have the «dataonly» option set on them so that \biblatex\ will only use them for data and will not output them to the bibliography: \begin{itemize} \item Clones of entries mentioned as a «related» entry of a cited entry. \end{itemize} \end{enumerate} \subsection{Performance} \biber\ can't really be compared with \BibTeX\ in any meaningful way performance-wise. \biber\ is written in Perl and does a \emph{great} deal more than \BibTeX\ which is written in C. One of \biber's test cases is a 2150 entry, 15,000 line \verb+.bib+ file which references a 630 entry macros file with a resulting 160 or so page (A4) formatted bibliography. This takes \biber\ just under 30 seconds to process on a reasonable computer. This is perfectly acceptable, especially for a batch program. \subsection{Acknowledgements} François Charette originally wrote a first modest version of \biber. Philip Kime joined in the development in 2009 and is largely responsible for making it what it is today. \section{Use} Firstly, please note that \biber\ will \emph{not} attempt to sanitise the content of \BibTeX\ datasources. That is, don't expect it to auto-escape any \TeX\ special characters like «\verb+&+» or «\verb+%+» which it finds in, for example, your \bibfield{TITLE} fields. It used to do this in earlier versions in some cases but as of version 0.9, it doesn't because it's fraught with problems and leads to inconsistent expectations and behaviour between different datasource types. In your \BibTeX\ data sources, please make sure your entries are legal \TeX\ code. Running \opt{biber --help} will display all options and description of each and is the primary source of usage information. \biber\ returns an exit code of 0 on success or 1 if there was an error. Most \biber\ options can be specified in long or short format. When mentioning options below, they are referred to as «\opt{long form|short form}» when an option has both a long and short form. As usual with such options, when the option requires an argument, the long form is followed by an equals sign «\verb+=+» and then the argument, the short form is followed by a space and then the argument. For example, the \opt{--configfile|-g} option can be given in two ways: \begin{verbatim} biber --configfile=somefile.conf biber -g somefile.conf \end{verbatim} With the \opt{backend=biber} option, \biblatex\ switches its backend interface and passes all options and information relevant to \biber's operation in a control file with extension \verb+.bcf+\footnote{\biblatex\ Control File}. This is conceptually equivalent to the \verb+.aux+ file which \latex\ uses to pass information to \BibTeX. The \verb+.bcf+ file is XML and contains many options and settings which configure how \biber\ is to process the bibliography and generate the \verb+.bbl+ file. The usual way to call \biber\ is simply with the \verb+.bcf+ file as the only argument. \biblatex\ always writes the control file with a \verb+.bcf+ extension. Specifying the «\verb+.bcf+» extension to \biber\ is optional. Assuming a control file called \verb+test.bcf+, the following two commands are equivalent: \begin{verbatim} biber test.bcf biber test \end{verbatim} \noindent Figure \ref{fig:biber-mdf} is a graphical overview of the data flow for data model information. See Figure \ref{fig:overview} for a more complete overview of \biber's processing steps. \begin{figure}[!htpb] \centering\small \begin{tikzpicture} \node[file] (dsfile) {datasource}; \node[funit] (remap) [below of=dsfile, node distance=8em] {remap} edge [<-,dashed] (dsfile); \node[file] (docremap) [left of=dsfile, node distance=15em] {document data model mapping\\from \texttt{.bcf}} edge [->,dashed] (remap); \node[file] (defaultremap) [left of=remap, node distance=15em] {default data model mapping\\from \texttt{.bcf}} edge [->,dashed] (remap); \node[file] (conf) [below of=remap, node distance=7em] {data model mapping\\from \biber\ config file} edge [->,dashed] (remap); \node[funit] (parser) [right of=remap, node distance=8em] {parser} edge [<-,very thick] (remap); \node[funit] (validation) [right of=parser, node distance=8em] {validation} edge [<-,very thick] (parser); \node[file] (hard) [above of=validation, node distance=8em] {\biblatex\ data\\model from \texttt{.bcf}} edge [->,dashed] (parser) edge [->,dashed] (remap) edge [->,dashed] (validation); \node[file] (bbl) [below of=validation, node distance=8em] {output file} edge [<-,very thick] (validation); \end{tikzpicture} \caption{Model data flow in \biber} \label{fig:biber-mdf} \end{figure} \bigskip \subsection{Options and config file}\label{conffile} \biblatex\ options which \biber\ needs to know about are passed via the \verb+.bcf+ file. See Table \ref{tab:bltxopts} for the \biblatex\ options which \biber\ uses and also for the scopes which are supported for each option. \biber\ also has its own options which are set using the following resource chain, given in decreasing precedence order:\\[2ex] \begin{table} \begin{center} \small \begin{tabular}{lllll} \toprule \biblatex\ option & Global & Per-type & Per-entry\\ \midrule alphaothers & \checkmark & \checkmark & \\ dataonly & & \checkmark & \checkmark\\ inheritance & \checkmark & & \\ labelalpha & \checkmark & \checkmark & \\ labelalphatemplate & \checkmark & \checkmark & \\ labeldate & \checkmark & \checkmark & \\ labeldatespec & \checkmark & \checkmark & \\ labelnamespec & \checkmark & \checkmark & \\ labelnumber & \checkmark & \checkmark & \\ labeltitle & \checkmark & \checkmark & \\ labeltitleyear & \checkmark & \checkmark & \\ maxalphanames & \checkmark & \checkmark & \checkmark\\ maxbibnames & \checkmark & \checkmark & \checkmark\\ maxcitenames & \checkmark & \checkmark & \checkmark\\ maxitems & \checkmark & \checkmark & \checkmark\\ minalphanames & \checkmark & \checkmark & \checkmark\\ minbibnames & \checkmark & \checkmark & \checkmark\\ mincitenames & \checkmark & \checkmark & \checkmark\\ minitems & \checkmark & \checkmark & \checkmark\\ presort & \checkmark & \checkmark & \checkmark\\ singletitle & \checkmark & \checkmark & \\ skipbib & & \checkmark & \checkmark\\ skiplab & & \checkmark & \checkmark\\ skiplos & & \checkmark & \checkmark\\ sortalphaothers & \checkmark & \checkmark & \\ sortexclusion & & \checkmark & \\ sortfirstinits & \checkmark & & \\ sorting & \checkmark & & \\ uniquelist & \checkmark & \checkmark & \checkmark\\ uniquename & \checkmark & \checkmark & \checkmark\\ useauthor & \checkmark & \checkmark & \checkmark\\ useeditor & \checkmark & \checkmark & \checkmark\\ useprefix & \checkmark & \checkmark & \checkmark\\ usetranslator & \checkmark & \checkmark & \checkmark\\ \bottomrule \end{tabular} \end{center} \caption{\biblatex\ options which \biber\ uses} \label{tab:bltxopts} \end{table} \noindent command line options $\rightarrow$\\ \hspace*{1em}\verb+biber.conf+ file $\rightarrow$\\ \hspace*{2em}\verb+.bcf+ file$\rightarrow$\\ \hspace*{3em}\biber\ hard-coded defaults\\[2ex] \noindent Users do not need to care directly about the contents or format of the \verb+.bcf+ file as this is generated from the options which they specify via \biblatex. The config file is a place to set commonly used command-line options and also to set options which cannot be set on the command line. The configuration file is by default called \verb+biber.conf+ but this can be changed using the \opt{--configfile|-g} option. Unless \opt{--configfile|-g} is used, the config file is looked for in the following places, in decreasing order of preference:\\[2ex] \noindent \verb+biber.conf+ in the current directory $\rightarrow$\\ \hspace*{1em}\verb+$HOME/.biber.conf+ $\rightarrow$\\ \hspace*{2em}\verb+$XDG_CONFIG_HOME/biber/biber.conf+ $\rightarrow$\\ \hspace*{3em}\verb+$HOME/Library/biber/biber.conf+ (Mac OSX only)\\ \hspace*{3em}\verb+$APPDATA/biber.conf+ (Windows only) $\rightarrow$\\ \hspace*{4em}the output of «\verb+kpsewhich biber.conf+» (if available on the system)\\[2ex] \noindent The config file is XML. Here Below is an example config file which displays the \biber\ defaults: \begin{lstlisting}[language=xml] 0 0 base 0 0 UTF-8 and 0 and 0 0 0 0 others 0 UTF-8 upper bbl 2 0 0 0 0 base 0 true true false false 0 0 0 0 0 \s*,\s* \end{lstlisting} \noindent In practice, the most commonly used options will be set via \biblatex\ macros in your document and automatically passed to \biber\ via the \verb+.bcf+ file. Certain options apply only to \biber\ and can only be set in the config file, particularly the more complex options. Most options are simple tags. Exceptions are the \opt{nosort}, \opt{noinit} and \opt{collate-options} options which are slightly more complex and can have sub-options as shown. A much more complex option is the \opt{sourcemap} option which is not set by default and which is described in section \ref{ref:map}. \subsubsection{The \texttt{output-format} option}\label{ref:of} \biber\ is able to output formats other than \file{.bbl} files for \biblatex\ to consume. It is also able to output other formats such as \file{DOT} for visualisation of entry dependencies (see section \ref{ref:vis}), the experimental \verb+biblatexml+ XML format, \bibtex\ \file{.bib} files and an XML version of the \file{.bbl} format with extension \file{.bblxml}. \file{.bib} output is possible in tool mode, when you are converting an entire datasource file independently of any particular document (see section \ref{ref:tool}). It is also useful when you want, instead of a \file{.bbl}, a new \file{.bib} file containing only the cited entries from a document so that you can, for example, send a minimally complete package for typesetting to someone. To do this, you would, after the first \latex run, call \biber like this: \begin{verbatim} biber --output-format=bibtex test.bcf \end{verbatim} \noindent This would result in a new \file{.bib} file called \file{test\_biber.bib} containing all cited entries in \file{test.tex}, in citation order, formatted according to the various \opt{ouput-*} options. You could of course also perform more processing like source mapping (see section \ref{ref:map}), reencoding (see section \ref{ref:enc}) etc. using more command line options or a config file. The \file{.bblxml} format for output is an XML version of the \file{.bbl}. It cannot be read by \biblatex\ but contains the same information as in the \file{.bbl} and may be useful if you want to transform a document bibliography into some other format since XML is a well-supported transformation format (using, for example, XSLT). By default, when choosing \file{.bblxml} output with the option \opt{--output-format=bblxml}, a RelaxNG XML schema is also generated (unless the \opt{--no-bblxml-schema} is used). This schema is derived from the active datamodel in the document (passed in the \file{.bcf} from \biblatex) and is placed in the same directory as the \file{.bblxml} output file. The extension of the schema is \file{.rng}. The option \opt{--validate-bblxml} may be used to validate the \file{.bblxml} against the schema. \subsubsection{The \texttt{sourcemap} option}\label{ref:map} The datasource drivers implement a mapping from datasource entrytypes and fields into the \biblatex\ data model. If you want to override or augment the driver mappings you can use the \opt{sourcemap} option which makes it possible to, for example, have a datasource with non-standard entrytypes or fields and to have these automatically mapped into other entrytypes/fields without modifying your datasource. Essentially, this alters the source data stream which \biber\ uses to build the internal \biblatex\ data model and is an automatic way of editing the datasource as it is read by \biber. Source mappings can be defined at different «levels» which are applied in a defined order. See the \biblatex\ manual regarding these macros:\\[2ex] \noindent \texttt{user}-level maps defined with \cmd{DeclareSourcemap}$\rightarrow$\\ \hspace*{1em}\texttt{user}-level maps defined in the \biber\ config file (described below)$\rightarrow$\\ \hspace*{2em}\texttt{style}-level maps defined with \cmd{DeclareStyleSourcemap}$\rightarrow$\\ \hspace*{3em}\texttt{driver}-level maps defined with \cmd{DeclareDriverSourcemap}\\[2ex] The \opt{sourcemap} option can only be set in the config file and not on the command line as it has a complex structure. This option allows you to perform various datasource mapping tasks which can be useful for pre-processing data which you do not generate yourself: \begin{itemize} \item Map datasource entrytypes to different entrytypes. \item Map datasource fields to different fields. \item Add new fields to an entry \item Remove fields from an entry \item Modify the contents of a field using standard Perl regular expression match and replace. \item Restrict any of the above operations to entries coming from particular datasources which you defined in \verb+\addresource{}+ macros. \item Restrict any of the above operations to entries only of a certain entrytype. \end{itemize} \noindent There is in fact, more flexibility than the above suggests, examples will show this below. The format of the \opt{sourcemap} option section in the config file is described below, followed by examples which will make things clearer. Items in \textcolor{red}{red} are not literal, they are descriptive meta-values which are explained in the accompanying text. Items in \textcolor{blue}{blue} are optional within their parent section or element. The general structure is: \lstset{showspaces=false} \lstset{showstringspaces=false} \begin{lstlisting}[language=xml,escapechar=+,mathescape=true] ... $\vdots$ ... $\vdots$ ... $\vdots$ ... \end{lstlisting} \noindent Here, \textcolor{red}{\texttt{driver$_1$}}\ldots \textcolor{red}{\texttt{driver$_n$}} are the names of valid \biber\ data source drivers (see section \ref{dsd}). One thing to note here is the \opt{map\_overwrite} attribute. This boolean attribute determines whether, for this driver mapping section, you may overwrite existing fields when adding new fields or mapping them. This attribute can be overridden on a per-map basis, see below. A warning will be issued either way saying whether an existing field will or will not be overwritten. If omitted, it defaults to «0». The \opt{map} elements are processed in sequence and contain a number of \opt{map\_step}s which are also processed in sequence. Each \opt{map\_step} allows you to do a particular thing or combination of things: \begin{itemize} \item Change the entrytype of an entry \item Change the name of a field \item Add extra fields the entry \item Change the contents of a field \end{itemize} \noindent These facilities are explained in more detail below, with examples. A \opt{map} element looks like this: \begin{lstlisting}[language=xml,escapechar=+,mathescape=true] +\textcolor{blue}{\textcolor{red}{datasource}}+ +\textcolor{blue}{\textcolor{red}{entrytype}}+ +\textcolor{blue}{\textcolor{red}{entrytype}}+ \end{lstlisting}%| <- sometimes emacs highlighting needs this \begin{itemize} \item If there are any \textcolor{red}{\texttt{datasource}}s named in \textcolor{blue}{\texttt{per\_datasource}} elements, this mapping only applies to entries coming from the named \textcolor{red}{\texttt{datasource}}s. There can be multiple \textcolor{blue}{\texttt{per\_datasource}} elements each specifying one of the datasource names given in a \biblatex\ \verb+\addbibresource+ macro. \item If there are any \textcolor{red}{\texttt{entrytypes}}s named in \textcolor{blue}{\texttt{per\_type}} elements, this mapping only applies to entries of the named \textcolor{red}{\texttt{entrytypes}}s. \item If there are any \textcolor{red}{\texttt{entrytypes}}s named in \textcolor{blue}{\texttt{per\_nottype}} elements, this mapping only applies to entries not of the named \textcolor{red}{\texttt{entrytypes}}s. \item The \texttt{map\_overwrite} attribute can be used to override the value for this attribute set on the parent \opt{maps} element. If omitted, it defaults to the parent \opt{maps} attribute value. \item The \texttt{map\_foreach} attribute loops over all \cmd{step}s in this \cmd{map}, setting the special variable \verb+$MAPLOOP+ to each of the comma-separated values contained in \textcolor{red}{\texttt{loopval}}. \textcolor{red}{\texttt{loopval}} can either be the name of a datafield set defined with \biblatex's \cmd{DeclareDatafieldSet}, a datasource field which contains a comma-separated values list or an explicit comma-separated values list itself (and \textcolor{red}{\texttt{loopval}} is determined in that order). This allows the user to repeat a group of \opt{map\_step}s for each value of \textcolor{red}{\texttt{loopval}}. The special variable \verb+$MAPUNIQ+ may also be used in the \opt{map\_step}s to generate a random unique string. This can be useful when creating keys for new entries. The special variable \verb+$MAPUNIQVAL+ may be used the \opt{map\_step}s to refer to the value of the last random unique string generated with \verb+$MAPUNIQ+. \end{itemize} \noindent Each \opt{map\_step} is looked at in turn and compared with the datasource entry being processed. A \opt{map\_step} works like this: \begin{itemize} \item If \textcolor{blue}{\texttt{map\_entry\_new}} is set, a new entry is created with the entry key \textcolor{red}{\texttt{newentrykey}} and the entry type \textcolor{red}{\texttt{newentrykeytype}} given in the option \textcolor{blue}{\texttt{map\_entry\_newtype}}. This entry is only in-scope during the processing of the current entry and can be referenced by \textcolor{red}{\texttt{newentrykey}} given as the value to \textcolor{blue}{\texttt{map\_entrytarget}}. In \textcolor{red}{\texttt{newentrykey}}, you may use standard Perl regular expression backreferences to captures from a previous \textcolor{blue}{\texttt{map\_match}} step. \item When a \textcolor{blue}{\texttt{map\_field\_set}} step has \textcolor{blue}{\texttt{map\_entrytarget}} set to the entrykey of an entry created by \textcolor{blue}{\texttt{map\_entry\_new}}, the target for the field set will be the \textcolor{blue}{\texttt{map\_entrytarget}} entry rather than the entry being currently processed. This allows users to create new entries and set fields in them. \item If \textcolor{blue}{\texttt{map\_entry\_null}} is set, processing of the \opt{map} immediately terminates and the current entry is not created. It is as if it did not exist in the datasource. Obviously, you should select the entries which you want to apply this to using prior mapping steps. \item If \textcolor{blue}{\texttt{map\_entry\_clone}} is set, a clone of the entry is created with an entry key \textcolor{red}{\texttt{clonekey}}. Obviously this may cause labelling problems in author/year styles etc. and should be used with care. The cloned entry is in-scope during the processing of the current entry and can be modified by passing its key as the value to \textcolor{blue}{\texttt{map\_entrytarget}}. In \textcolor{red}{\texttt{clonekey}}, you may use standard Perl regular expression backreferences to captures from a previous \textcolor{blue}{\texttt{map\_match}} step. \item Change the \textcolor{red}{\texttt{source-entrytype}} to \textcolor{red}{\texttt{target-entrytype}}, if defined. If \textcolor{blue}{\texttt{map\_final}} is set then if the entrytype of the entry is not \textcolor{red}{\texttt{source-entrytype}}, processing of this \opt{map} immediately terminates. \item Change the \textcolor{red}{\texttt{source-field}} to \textcolor{red}{\texttt{target-field}}, if defined. If \textcolor{blue}{\texttt{map\_final}} is set, then if there is no \textcolor{red}{\texttt{source-field}} field in the entry, processing of this \opt{map} immediately terminates. \item If \textcolor{blue}{\texttt{map\_notfield}} is used then only apply the step if the \textcolor{red}{\texttt{source-field}} does not exist. \item If \textcolor{blue}{\texttt{map\_match}} is defined but \textcolor{blue}{\texttt{map\_replace}} is not, only apply the step if the \textcolor{red}{\texttt{source-field}} matches \textcolor{blue}{\texttt{map\_match}}. You can use parentheses as usual to capture parts of the match and can then use these later when setting a \textcolor{blue}{\texttt{map\_field\_value}}. \item \textcolor{blue}{\texttt{map\_notmatch}} is the same as \textcolor{blue}{\texttt{map\_match}} but with the logic reversed. \item Perform a Perl regular expression match and replace on the value of \textcolor{red}{\texttt{source-field}} if \textcolor{blue}{\texttt{map\_match}} and \textcolor{blue}{\texttt{map\_replace}} are defined. You may use (and almost certainly will want to use) parentheses for back-references in \textcolor{blue}{\texttt{map\_replace}}. Do not quote the regular expressions in any special (i.e. non-Perly) way---it's not necessary. \item If \textcolor{blue}{\texttt{map\_field\_set}} is defined, then its value is \textcolor{red}{\texttt{set-field}} which will be set to a value specified by further attributes. If \textcolor{blue}{\texttt{map\_overwrite}} is false for this step and the field to set already exists then the map step is ignored. If \textcolor{blue}{\texttt{map\_final}} is also set on this step, then processing of the parent map stops at this point. If \textcolor{blue}{\texttt{map\_append}} is set, then the value to set is appended to the current value of \textcolor{red}{\texttt{set-field}}. The value to set is specified by a mandatory one and only one of the following attributes: \begin{itemize} \item \textcolor{blue}{\texttt{map\_field\_value}} --- The \textcolor{red}{\texttt{set-field}} is set to \textcolor{red}{\texttt{set-value}} \item \textcolor{blue}{\texttt{map\_null}} --- The field is ignored, as if it did not exist in the datasource \item \textcolor{blue}{\texttt{map\_origentrytype}} --- The \textcolor{red}{\texttt{set-field}} is set to the most recently mentioned \textcolor{red}{\texttt{source-entrytype}} name. \item \textcolor{blue}{\texttt{map\_origfield}} --- The \textcolor{red}{\texttt{set-field}} is set to the most recently mentioned \textcolor{red}{\texttt{source-field}} name \item \textcolor{blue}{\texttt{map\_origfieldval}} --- The \textcolor{red}{\texttt{set-field}} is set to the most recently mentioned \textcolor{red}{\texttt{source-field}} value \end{itemize} \end{itemize} \noindent With \bibtex\ datasources, you can specify the pseudo-field «entrykey» for \textcolor{red}{\texttt{source-field}} which is the citation key of the entry. Naturally, this «field» cannot be changed (used as \textcolor{red}{\texttt{set-field}}, \textcolor{red}{\texttt{target-field}} or changed using \textcolor{blue}{\texttt{map\_replace}}). Note that for XML datasources like BibLaTeXML, the names of fields and entrytypes are matched in a case sensitive manner. For all other datasource types, entrytype and field name matching is case insensitive. \noindent Here are some examples: \begin{lstlisting}[language=xml,escapechar=+,mathescape=true] example1.bib example2.bib \end{lstlisting} \noindent This would add a \bibfield{KEYWORDS} field with value «\verb+keyw1, keyw2+» and set the \bibfield{NOTE} field to citation key for the entry to all entries which are found in either the \verb+examples1.bib+ or \verb+examples2.bib+ files. This assumes that the \biblatex\ source contains \verb+\addresource{example1.bib}+ and \verb+\addresource{example2.bib}+. \begin{lstlisting}[language=xml,escapechar=+,mathescape=true] \end{lstlisting} \noindent Copy the \bibfield{TITLE} field to the \bibfield{NOTE} field unless the \bibfield{NOTE} field already exists. \begin{lstlisting}[language=xml,escapechar=:,mathescape=true] \end{lstlisting} \noindent For any entry with an \bibfield{AUTHOR} field, try to set \bibfield{SORTNAME} to the same as \bibfield{AUTHOR}. If this fails because \bibfield{SORTNAME} already exists, stop, otherwise truncate \bibfield{SORTNAME} to just the first name in the name list. \begin{lstlisting}[language=xml,escapechar=+,mathescape=true] \end{lstlisting} \noindent Any \bibtype{CHAT} entrytypes would become \bibtype{CUSTOMA} entrytypes and would automatically have a \bibfield{TYPE} field set to «CHAT» unless the \bibfield{TYPE} field already exists in the entry (because \opt{map\_overwrite} is false). This mapping applies only to entries of type \bibtype{CHAT} since the first step has \opt{map\_final} set and so if the \opt{map\_type\_source} does not match the entry, processing of this \opt{map} immediately terminates. \begin{lstlisting}[language=xml,escapechar=+,mathescape=true] examples.bib ARTICLE BOOK \end{lstlisting} \noindent Any entries of entrytype \bibfield{ARTICLE} or \bibfield{BOOK} from the «examples.bib» datasource would have their \bibfield{ABSTRACT} fields removed and a \bibfield{NOTE} field added with value «Auto-created this field». \begin{lstlisting}[language=xml,escapechar=:,mathescape=true] \end{lstlisting} \noindent This removes \bibfield{ABSTRACT} fields from any entry, changes \bibfield{CONDUCTOR} fields to \bibfield{NAMEA} fields and changes \bibfield{GPS} fields to \bibfield{USERA} fields \begin{lstlisting}[language=xml,escapechar=:,mathescape=true] \end{lstlisting} \noindent Applies only to entries with \bibfield{PUBMED} fields and maps \bibfield{PUBMEDID} fields to \bibfield{EPRINT} fields, sets the \bibfield{EPRINTTYPE} field to «PUBMEDID» and also sets the \bibfield{USERD} field to the string «Some string of things». \begin{lstlisting}[language=xml,escapechar=:,mathescape=true] \end{lstlisting} \noindent Here, the contents of the \bibfield{SERIES} field have leading numbers stripped and the remainder of the contents lowercased. \begin{lstlisting}[language=xml,escapechar=:,mathescape=true] \end{lstlisting} \noindent Here, if for an entry, the \bibfield{TITLE} field matches a particular regular expression, we set a special keyword so we can, for example, make a references section just for certain items. \begin{lstlisting}[language=xml,escapechar=:,mathescape=true] \end{lstlisting} \noindent If an entry has a \bibfield{LISTA} field which matches regular expression «regexp», then it is removed. \begin{lstlisting}[language=xml,escapechar=:,mathescape=true] \end{lstlisting} \noindent Here, we use multiple match/replace for the same field to regularise some inconstant name variants. Bear in mind that match/replace processing within a \opt{map} element is sequential and the changes from a previous match/replace are already committed. \begin{lstlisting}[language=xml,escapechar=;,mathescape=true] \end{lstlisting} \noindent Only applies to entries with an \bibfield{AUTHOR} field matching «Doe,». First the \bibfield{AUTHOR} field is copied to both the \bibfield{SHORTAUTHOR} and \bibfield{SORTNAME} fields, overwriting them if they already exist. Then, these two new fields are modified to canonicalise a particular name, which presumably has some variants in the datasource. \begin{lstlisting}[language=xml,escapechar=;,mathescape=true] \end{lstlisting} \noindent Any entry with a \bibfield{TITLE} field matching «A Title» will be completely ignored. \bigskip \minisec{Other datasource types} For datasources other than \BibTeX, (e.g. \verb+biblatexml+), the source entrytypes and fields are usually very differently modelled and named. \noindent Here we use a loop to apply a regular expression replacement to several fields: \begin{lstlisting}[language=xml,escapechar=;,mathescape=true] \end{lstlisting} \bigskip \subsubsection{The \texttt{inheritance} option}\label{inheritance} The \opt{inheritance} option defines the inheritance rules for data inheritance between entries using, for example, \bibtex's \bibfield{CROSSREF} field. The default setup for this is defined by \biblatex and is passed in the \file{.bcf} file. Defining inheritance rules in the \biber configuration file is rarely something you would want to do with one notably exceptional case being when using \biber in tool mode where you might want to «materialise» special inheritance rules (see section \ref{ref:tool}). Here we define the format of the config file inheritance section, should you need to understand or modify it. Items in \textcolor{red}{red} are not literal, they are descriptive meta-values which are explained in the accompanying text. Items in \textcolor{blue}{blue} are optional within their parent section or element. \begin{lstlisting}[language=xml,escapechar=+,mathescape=true] $\vdots$ $\vdots$ $\vdots$ $\vdots$ \end{lstlisting} \begin{itemize} \item The \texttt{defaults} section specifies the default inheritance rules which are not otherwise covered by a specific \texttt{inherit} rule. \texttt{inherit\_all} specifies that by default a \textcolor{red}{\texttt{target}} inherits all fields from a \textcolor{red}{\texttt{source}}. \texttt{override\_target} specifies that by default an existing \textcolor{red}{\texttt{target}} field will be overwritten by a \textcolor{red}{\texttt{source}} field it already exists in the \textcolor{red}{\texttt{target}}. A \texttt{type\_pair} element specifies the defaults for a particular \textcolor{red}{\texttt{source}} and \textcolor{red}{\texttt{target}} entrytype combination. \textcolor{red}{\texttt{source}} or \textcolor{red}{\texttt{target}} can take the value «\texttt{*}» which is a wildcard representing all possible entrytypes. \item An \texttt{inherit} element specifies how one or more \textcolor{red}{\texttt{source}} fields are inherited by one more \textcolor{red}{\texttt{source}}/\textcolor{red}{\texttt{target}} pairs which are specified in one or more \texttt{type\_pair} elements within the same \texttt{inherit} element. \textcolor{blue}{\texttt{override\_target}} can be specified on a per-field basis as can the \textcolor{blue}{\texttt{skip}} attribute which indicates that a particular \texttt{field} is not to be inherited by the \textcolor{red}{\texttt{target}}. \end{itemize} % Here is an example: \begin{lstlisting}[language=xml,escapechar=+,mathescape=true] \end{lstlisting} % Here we can see that the default is to inherit all fields from the \textcolor{red}{\texttt{source}} and not to override existing \textcolor{red}{\texttt{target}} fields if they already exist. Then we see that for some combinations of \textcolor{red}{\texttt{source}}s and \textcolor{red}{\texttt{target}}s, the \bibfield{AUTHOR} field is inherited from the \textcolor{red}{\texttt{source}} and also the \bibfield{AUTHOR} field in the \textcolor{red}{\texttt{source}} is inherited as the \bibfield{BOOKAUTHOR} field in the \textcolor{red}{\texttt{target}}. The second \texttt{inherit} element says that \bibfield{INBOOK} and \bibfield{INCOLLECTION} entries never inherit the \bibfield{INTRODUCTION} field from any \textcolor{red}{\texttt{source}}. In general, it is probably best to copy the default \biblatex inheritance rules and modify them to your needs. See section \ref{ref:tool}. \bigskip \subsubsection{The \texttt{noinit} option}\label{noinit} The value of the \opt{noinit} option can only be set in the config file and not on the command line. This is because the values are Perl regular expressions and would need special quoting to set on the command line. This can get a bit tricky on some OSes (like Windows) so it's safer to set them in the config file. \opt{noinit} allows you to ignore parts of a name when generating initials. This is done using Perl regular expressions which specify what to ignore. You can specific multiple regular expressions and they will be removed from the name before it is passed to the initials generating system. For example, this option can be used to ignore diacritic marks and prefices in names which should not be considered when sorting. Given (the default): \begin{lstlisting}[language=xml] \end{lstlisting} \noindent and the \BibTeX\ datasource entry: \begin{verbatim} AUTHOR = {{al-Hasan}, ʿAlī}, \end{verbatim} \noindent the initials for the last name will be «H» and not «a-H». The initial for the first name will be «A» as the diacritic is also ignored. This is tricky in general as you cannot often determine the difference between a name with a prefix and a hyphenated name with only, say, two chars in the first part such as «Ho-Pun». You can adjust this option for your individual cases. By default, only lowercased prefices are looked for so as to avoid breaking things like «Ho-Pun» where you want the initials to be «H.-P.», for example. See the Perl regular expression manual page for details of the regular expression syntax\footnote{\url{http://perldoc.perl.org/perlre.html}}. \subsubsection{The \texttt{nolabel} option}\label{nolabel} The value of the \opt{nolabel} option can only be set in the config file and not on the command line. This is because the values are Perl regular expressions and would need special quoting to set on the command line. This can get a bit tricky on some OSes (like Windows) so it's safer to set them in the config file. \opt{nolabel} allows you to ignore elements of a field when generating labels. This is done using Perl regular expressions which specify what to ignore. You can specific multiple regular expressions and they will be removed from a field before it is passed to the label generating system. For example, this option can be used to ignore control, punctuation, symbol and separator characters when generation labels. Given (the default): \begin{lstlisting}[language=xml] \end{lstlisting} \noindent and the \BibTeX\ datasource entry with default label generation definition (see \biblatex\ documentation for \cmd{DeclareLabelalphaTemplate}): \begin{verbatim} AUTHOR = {O'Toole, Alexander}, \end{verbatim} \noindent Then the label for the name will be <> as the apostrophe is ignored by the label generation routine. See the Perl regular expression manual page for details of the regular expression syntax\footnote{\url{http://perldoc.perl.org/perlre.html}}. \subsubsection{The \texttt{nolabelwidthcount} option}\label{nolabelwidthcount} The value of the \opt{nolabelwidthcount} option can only be set in the config file and not on the command line. This is because the values are Perl regular expressions and would need special quoting to set on the command line. This can get a bit tricky on some OSes (like Windows) so it's safer to set them in the config file. \opt{nolabelwidthcount} allows you to ignore elements of a field when generating fixed-width substrings of labels. This is done using Perl regular expressions which specify what to ignore. You can specific multiple regular expressions and they will be removed from a field before it is passed to the label generating system. For example, this option can be used to ignore punctuation characters when generating substrings for labels. Note that in this example we reset \opt{nolabel} because by default this removes punctuation characters. Given: \begin{lstlisting}[language=xml] \end{lstlisting} \noindent and the \BibTeX\ datasource entry with default label generation definition (see \biblatex\ documentation for \cmd{DeclareLabelalphaTemplate}): \begin{verbatim} AUTHOR = {O'Toole, Alexander}, \end{verbatim} \noindent Then the label for the name will be <> as the apostrophe is ignored by the substring generation routine. See the Perl regular expression manual page for details of the regular expression syntax\footnote{\url{http://perldoc.perl.org/perlre.html}}. \bigskip \subsubsection{The \texttt{sorting} option}\label{sorting} The \opt{sorting} option defines the sorting rules for the bibliography lists. \biblatex allows multiple sorting specifications referenced by name as it can print bibliography information as many times as the user wishes with different filtering and sorting. This is normally handled by macros in \biblatex which write the XML sorting specification(s) to the \file{.bcf} file for \biber to read but there may be occasions (usually when using \biber in «tool» mode (see section\ref{ref:tool}) when you need to specify the global sorting specification directly in a \biber config file. This section documents the XML format of the sorting specification. Items in \textcolor{red}{red} are not literal, they are descriptive meta-values which are explained in the accompanying text. Items in \textcolor{blue}{blue} are optional within their parent section or element. See also the \texttt{nosort} option in section \ref{nosort}. \begin{lstlisting}[language=xml,escapechar=+,mathescape=true] +\textcolor{red}{string}+ +\textcolor{blue}{}+ +\textcolor{blue}{\textcolor{red}{field}}+ $\vdots$ +\textcolor{blue}{}+ +\textcolor{red}{field|literal|citeorder}+ $\vdots$ $\vdots$ \end{lstlisting} Sorting in \biber is a sophisticated procedure of building up a sorting object for an entry based on a sorting scheme template, the general form of which is shown above. The sorting routine first traverses every entry in the bibliography list and generates a sorting object based on the sorting scheme. When this is done, it sorts the entries according to the sorting objects it has generated for each entry. A sorting specification must be named with the \textcolor{red}{schemename} attribute. In «tool» mode, this must be set to \texttt{tool}. Otherwise, it is a name referenced by a \biblatex refcontext \texttt{sorting} option. A sorting specification is comprised of a number of \texttt{sort} elements. Sorting is essentially a process of comparing whatever information is in the \textcolor{red}{n}th \texttt{sort} element collected for every entry (otherwise known as «multi-field» sorting). Within a \texttt{sort} element, there can be any number of \texttt{sortitem} elements which describe what information to look for in the entry in order to construct this part of the sorting object; either a field, a literal string or the special «citeorder» pseudo-field. When generating the sorting information for an entry, within each \texttt{sort} element, the first \texttt{sortitem} to return a non-empty value for the bibliography entry is used and the rest of the \texttt{sortitem}s in the \texttt{sort} are skipped. A \texttt{sortitem} essentially looks for a piece of information in the entry and adds this to the sorting object. If it is looking for a \textcolor{red}{\texttt{field}}, then the field must exist in the entry. If it does not, the \texttt{sortitem} is skipped. If the \textcolor{red}{\texttt{field}} does exist, it is added to the sorting object for the entry after being modified by the attributes of the \texttt{sortitem}. Once a \texttt{sortitem} has returned the contents of a \textcolor{red}{\texttt{field}}, you can use the \textcolor{blue}{substring\_side} (default «left» if any other \textcolor{blue}{substring} attributes are set) and \textcolor{blue}{substring\_width} (default «4» if any other \textcolor{blue}{substring} attributes are set) attributes to truncate the contents of the \textcolor{red}{\texttt{field}} by reducing it to a substring taken from the left or right side of the string and of a number of (UTF-8) characters of your choice. You can also pad the \textcolor{red}{\texttt{field}} with repeated arbitrary characters on either side using the \textcolor{blue}{pad\_side} (default «left» if any other \textcolor{blue}{pad} attributes are set), \textcolor{blue}{pad\_width} (default «4» if any other \textcolor{blue}{pad} attributes are set) and \textcolor{blue}{pad\_char} (default «0»---the digit zero if any other \textcolor{blue}{pad} attributes are set) attributes. A \texttt{sortitem} which is neither a known bibliography sorting field nor the special «citeorder» string is treated as a literal string to add to the sorting object. Naturally, such a \texttt{sortitem} always «finds» something to add to the sorting object and so it should never have any other \texttt{sortitem}s after it within the \texttt{sort} section as they will never be considered. The «citeorder» \texttt{sortitem} value has a special meaning. It requests a sort based on the lexical order of the actual citations. For entries cited in \biblatex within the same citation command like: \begin{lstlisting}[style=latex]{} \cite{one,two} \end{lstlisting} % there is a distinction between the lexical order and the semantic order. Here «one» and «two» have the same semantic order but a unique lexical order. The semantic order only matters if you specify further sorting to disambiguate entries with the same semantic order. For example, this is the definition of the \biblatex \opt{none} sorting scheme: \begin{lstlisting}[language=xml,escapechar=+,mathescape=true] mm citeorder \end{lstlisting} % This sorts the bibliography purely lexically by the order of the keys in the citation commands. In the example above, it sorts entry «one» before «two». However, suppose that you consider «one» and «two» to have the same order (semantic order) since they are cited at the same time and want to further sort these by year. Suppose «two» has an earlier \bibfield{YEAR} than «one»: \begin{lstlisting}[language=xml,escapechar=+,mathescape=true] mm citeorder year \end{lstlisting} % This sorts «two» before «one», even though lexically, «one» would sort before «two». This is possible because the semantic order can be disambiguated by the further sorting on year. With the standard \biblatex \opt{none} sorting scheme, the lexical order and semantic order are identical because there is nothing further to disambiguate them. This means that you can use «citeorder» just like any other \texttt{sortitem} value, choosing how to further sort entries cited at the same time (in the same citation command). Both \texttt{sort} and \texttt{sortitem} elements have a mandatory \texttt{order} attribute which should start at «1» and increase for each further element. Order numbers for \texttt{sortitem} elements within a \texttt{sort} element always begin with «1» and don't increase between \texttt{sort} elements. Once a \texttt{sortitem} element has added something to the sorting object (or all \texttt{sortitem} elements within a \texttt{sort} have been processed, regardless of whether anything was added to the sort object for the entry), some attributes are applied to the information added and the next \texttt{sort} element is processed. These attributes on the \texttt{sort} element further determine how any sorting specification added by the \texttt{sortitem} elements will be used in the sorting. If the \texttt{sort} element has the \textcolor{blue}{\texttt{final}} attribute set to «1», then if any \texttt{sortitem} within the \texttt{sort} returned a non-empty string to add to the sorting object, the construction of the sorting object for the entry ceases at this point and no more \texttt{sort} elements are processed. This is used typically to make sure that master sorting keys such as those specified with the \bibfield{SORTKEY} field, if found, are the only thing used to construct the sorting object. The \texttt{sort} element may further specify that the information at \texttt{order} «\textcolor{red}{n}» should be sorted in ascending order or descending order (default «ascending»), whether case should be considered when sorting (default depends on the \biber\ \opt{sortcase} option which defaults to true) and whether uppercase characters should be sorted before lower (default depends on the \biber\ «sortupper» option which defaults to true). Finally, there are two special sorting section elements to consider. The \texttt{presort} element is mandatory and specifies a literal \textcolor{red}{string} to add to the very beginning of all sorting objects for all entries. This is useful when combined with the fact that you may specify an optional \textcolor{blue}{\texttt{type}} attribute which specifies a particular entry type for the presort \textcolor{red}{string} specified. Using this mechanism, you can sort, for example, all \bibfield{ARTICLE} entries before all \bibfield{BOOK} entries and then all other types of entry: \begin{lstlisting}[language=xml,escapechar=+,mathescape=true] aa bb mm $\vdots$ \end{lstlisting} % This makes it easy to divide a bibliography by type of entry. The optional \textcolor{blue}{\texttt{sortexclusion}} element allows you to exclude fields from consideration by \texttt{sortitem} on a per-type basis. For example, if you wanted to ignore the \bibfield{YEAR} field of any \bibfield{REPORT} entry types because they are not reliably populated with data representing a year, you could do: \begin{lstlisting}[language=xml,escapechar=+,mathescape=true] $\vdots$ year $\vdots$ \end{lstlisting} % It is much easier to see how intuitive this all is if you look at a standard sorting scheme definition. Below is the default \biblatex sorting scheme which appears in the \file{.bcf} when you run \biblatex with no \opt{sorting} option. This is fully documented and described in the \biblatex manual along with the \latex macros which generate this XML in the \file{.bcf}: \begin{lstlisting}[language=xml,escapechar=+,mathescape=true] mm presort sortkey sortname author editor translator sorttitle title sortyear year sorttitle title volume 0000 \end{lstlisting} \bigskip \subsubsection{The \texttt{nosort} option}\label{nosort} The value of the \opt{nosort} option can only be set in the config file and not on the command line. This is because the values are Perl regular expressions and would need special quoting to set on the command line. This can get a bit tricky on some OSes (like Windows) so it's safer to set them in the config file. In any case, it's unlikely you would want to set them for particular \biber\ runs; they would more likely be set as your personal default and thus they would naturally be set in the config file anyway. \opt{nosort} allows you to ignore parts of a field for sorting. This is done using Perl regular expressions which specify what to ignore in a field. You can specify as many patterns as you like for a specific field. Datasource field sets defined using \cmd{DeclareDatafieldSet} in \biblatex are also recognised as valid values and so it is possible to specify \opt{nosort} regular expressions for arbitrary sets of fields. \biblatex defines as standard two sets as shown in Table \ref{tab:nst}. \begin{table} \begin{center} \small \begin{tabular}{ll} \toprule Set & Fields\\ \midrule setnames & author\\ & afterword\\ & annotator\\ & bookauthor\\ & commentator\\ & editor\\ & editora\\ & editorb\\ & editorc\\ & foreword\\ & holder\\ & introduction\\ & namea\\ & nameb\\ & namec\\ & shortauthor\\ & shorteditor\\ & translator\\ settitles & booktitle\\ & eventtitle\\ & issuetitle\\ & journaltitle\\ & maintitle\\ & origtitle\\ & title\\ \bottomrule \end{tabular} \end{center} \caption{Default \biblatex\ datafield sets} \label{tab:nst} \end{table} For example, this option can be used to ignore some diacritic marks and prefices in names which should not be considered when sorting. Given (the default): \begin{lstlisting}[language=xml] \end{lstlisting} \noindent and the \BibTeX\ datasource entry: \begin{verbatim} AUTHOR = {{al-Hasan}, ʿAlī}, \end{verbatim} \noindent the prefix «al-» and the diacritic «ʿ» will not be considered when sorting. See the Perl regular expression manual page for details of the regular expression syntax\footnote{\url{http://perldoc.perl.org/perlre.html}}. You may specify any number of \opt{option} elements. If a \opt{nosort} option is found for a specific field, it will override any option for a type which also covers that field. Here is another example. Suppose you wanted to ignore «The» at the beginning of a \bibfield{TITLE} field when sorting, you could add this to your \verb+biber.conf+: \begin{lstlisting}[language=xml] \end{lstlisting} \noindent If you wanted to do this for all title fields listed in Table \ref{tab:nst}, then you would do this: \begin{lstlisting}[language=xml] \end{lstlisting} \noindent \textbf{Note:} \opt{nosort} can be specified for most fields but not for things like dates and special fields as that wouldn't make much sense. \bigskip \subsubsection{The \texttt{collate-options} option} The \opt{collate-options} option has format similar to \opt{nosort}. See Section \ref{coll} for details about the option, here is an example of a config file setting: \begin{lstlisting}[language=xml] \end{lstlisting} \bigskip \subsection{Unicode} \biber uses NFD UTF-8 internally. All data is converted to NFD UTF-8 when read. If UTF-8 output is requested (to \file{.bbl} for example), the UTF-8 will always be NFC. \bigskip \subsection{Input/Output File Locations} \subsubsection{Control file}\label{loc:cf} The control file is normally passed as the only argument to \biber. It is searched for in the following locations, in decreasing order of priority:\\[2ex] \noindent Absolute filename $\rightarrow$\\ \hspace*{1em}In the \opt{--input-directory}, if specified$\rightarrow$\\ \hspace*{2em}In the \opt{--output-directory}, if specified$\rightarrow$\\ \hspace*{3em}Relative to current directory$\rightarrow$\\ \hspace*{4em}Using \verb+kpsewhich+, if available \subsubsection{Data sources} Local datasources of type «file» are searched for in the following locations, in decreasing order of priority:\\[2ex] \noindent Absolute filename $\rightarrow$\\ \hspace*{1em}In the \opt{--input-directory}, if specified$\rightarrow$\\ \hspace*{2em}In the \opt{--output-directory}, if specified$\rightarrow$\\ \hspace*{3em}Relative to current directory$\rightarrow$\\ \hspace*{4em}In the same directory as the control file$\rightarrow$\\ \hspace*{5em}Using \verb+kpsewhich+ for supported formats, if available\\[2ex] \noindent Remote file datasources (beginning with \verb+http://+ or \verb+ftp://+) are retrieved to a temp file and processed as normal. Users do not specify explicitly the bibliography database files; they are passed in the \verb+.bcf+ control file, which is constructed from the \biblatex\ «\verb+\addbibresource{}+» macros. \subsection{Logfile} By default, the logfile for \biber\ will be named \verb+\jobname.blg+, so, if you run \begin{verbatim} biber test.bcf \end{verbatim} \noindent then the logfile will be called «\verb+test.blg+». Like the \verb+.bbl+ output file, it will be created in the \opt{--output-directory|-c}, if this option is defined. You can override the logfile name by using the \opt{--logfile} option: \begin{verbatim} biber --logfile=lfname test.bcf \end{verbatim} \noindent results in a logfile called «\verb+lfname.blg+».\\ \noindent \textbf{Warning}: be careful if you are expecting \biber\ to write to directories which you don't have appropriate permissions to. This is more commonly an issue on non-Windows OSes. For example, if you rely on \verb+kpsewhich+ to find your database files which are in system \TeX\ directories, you may well not have write permission there so \biber\ will not be able to write the \verb+.bbl+. Use the \opt{--output-file|-O} option to specify the location to write the \verb+.bbl+ to in such cases. \subsection{Collation and Localisation}\label{coll} \biber\ takes care of collating the bibliography for \biblatex. It writes entries to the \verb+.bbl+ file sorted by a completely customisable set of rules which are passed in the \verb+.bcf+ file by \biblatex. \biber\ uses the Perl \verb+Unicode::Collate+ module for collation which implements the full UCA (Unicode Collation Algorithm). It also has CLDR (Common Locale Data Repository) tailoring to deal with cases which are not covered by the UCA. The locale used for collating a particular field in the bibliography is determined by the following resource chain which is given in decreasing precedence order:\\[2ex] \noindent\opt{--collate-options|-c} (e.g. \opt{-c 'locale => "de\_DE"'}) $\rightarrow$\\ \hspace*{1em}\opt{--sortlocale|-l} $\rightarrow$\\ \hspace*{2em}\biblatex per-sortset \opt{locale} option $\rightarrow$\\ \hspace*{3em}\biblatex per-sortscheme \opt{locale} option$\rightarrow$\\ \hspace*{4em}\biblatex global sortlocale option\\ \noindent The locale will be used to look for a collation tailoring for that locale. It will generate an informational warning if it finds none. This is not a problem as most standard collation cases are covered by the standard UCA and many locales neither have nor need any special collation tailoring. \biblatex passes sortscheme-specific sorting locales and its global sorting locale in the \file{.bcf}. \biber uses these locales automatically to tailor sorting at various levels of granularity (see \biblatex docs for the \cmd{DeclareSortingScheme} macro). \biblatex can be configured to automatically pass as locale the language setting from Babel or Polyglossia in which case \biber tries to match this to a sensible locale. See the Appendix, section \ref{localemap} for the mapping. If you want to sort using a specific locale not listed in \ref{localemap}, specify this locale exactly in your \latex source as the \biblatex \opt{sortlocale} option, as the optional argument to \cmd{DeclareSortingScheme} macro or as an optional argument to the \biblatex \cmd{sort} macro according to the desired granularity. For example, if you want to use traditional Spanish for sorting a reference list, you need to specify \verb+es_ES_trad+ directly instead of using the «spanish» string because the Babel/Polyglossia «spanish» language identifier by default maps to the modern \verb+es_ES+ locale (which doesn't include sort tailoring for «ch» in Spanish). Collation is by default case sensitive. You can turn this off globally using the \biber\ option \opt{--sortcase=false} or from \biblatex\ using its option\linebreak[4]\opt{sortcase=false}. The option can also be defined per-field so you can sort some fields case sensitively and others case insensitively. See the \biblatex\ manual. By default, \biber\ collates uppercase before lower. You can reverse this globally for all sorting using the \biber\ option \opt{--sortupper=false} or from\linebreak[4]\biblatex\ by using its option \opt{sortupper=false}. The option can also be defined per-field so you can sort some fields uppercase before lower and others lower before upper. See the \biblatex\ manual. Be aware though that some locales rightly enforce a particular setting for this (for example, Danish). You will be able to override it but \biber\ will warn you if you do. There are in fact many options to \verb+Unicode::Collate+ which can tailor the collation in various ways in addition to the locale tailoring which is automatically performed. Users should see the the documentation to the module for the various options, most of which the vast majority of users will never need\footnote{For details on the various options, see \url{http://search.cpan.org/search?query=Unicode\%3A\%3ACollate&mode=all}}. Options are passed using the \opt{--collate-options|-c} option as a single quoted string, each option separated by comma, each key and value separated by «\verb+=>+». See examples. \textbf{Note:} \biber\ sets the Unicode collation option «variable» to «non-ignorable». Effectively, this means that punctuation is not ignored when sorting. The default setting is to ignore such «variable weight» elements. Sorting bibliographies is slightly more specialised than collating general text and punctuation often matters. In case you want the UCA default behaviour, see examples. Since \biber always normalises into NFD when reading data in, no normalisation is requested with Unicode collation («normalization» option is set to «prenormalized» by default) as this saves some time. \subsubsection{Examples} \biberex{biber} \noindent Call \biber\ using all settings from the \verb+.bcf+ generated from the \latex\ run. Case sensitive UCA sorting is performed taking the locale for tailoring from the \file{.bcf} if \biber's \opt{sortlocale} option is not used to override the \verb+.bcf+ \biberex{biber --sortlocale=de_DE_phonebook} \noindent Override any locale setting in the \verb+.bcf+ \biberex{biber --sortcase=false} \noindent Case insensitive sorting. \biberex{biber --sortupper=false --collate-options="backwards => 2"} \noindent Collate lowercase before upper and collate French accents in reverse order at UCA level 2. \biberex{biber --collate-options="variable => 'shifted'"} \noindent Use the UCA default setting for variable weight punctuation (which is to ignore it for sorting, effectively). \subsection{Encoding of files}\label{ref:enc} \biber\ takes care of re-encoding the datasource data as necessary. In normal use, \biblatex\ passes its \opt{bibencoding} option value to \biber\ via the \verb+.bcf+ file and this corresponds to the \biber \opt{--input-encoding|e} option. \biblatex also passes the value of its \opt{texencoding} option (which maps to \biber's \opt{--output-encoding|-E} option) the default value of which depends on which \TeX\ engine and encoding packages you are using (see \biblatex\ manual for details). \noindent \biber\ performs the following tasks: \begin{enumerate} \item Decodes the datasource into UTF-8 if it is not UTF-8 already \item Decodes \latex\ character macros in the datasource into UTF-8 \item Encodes the output so that the \verb+.bbl+ is in the encoding that \opt{--output-encoding|-E} specifies \item Warns if it is asked to output to the \verb+.bbl+ any UTF-8 decoded \latex\ character macros which are not in the \opt{--output-encoding|-E} encoding. Replaces with a suitable \latex\ macro \end{enumerate} \noindent Normally, you do not need to set the encoding options on the \biber\ command line as they are passed in the \verb+.bcf+ via the information in your \biblatex\ environment. However, you can override the \verb+.bcf+ settings with the command line. The resource chain for encoding settings is, in decreasing order of preference:\\[2ex] \noindent\opt{--input-encoding|-e} and \opt{--output-encoding|-E} $\rightarrow$\\ \hspace*{1em}\biber\ config file $\rightarrow$\\ \hspace*{2em}\verb+.bcf+ control file \subsubsection{\latex\ macro decoding}\label{ldecode} \noindent As mentioned above, \biber\ always converts as much as possible, including \latex\ character macros, into UTF-8. This is important for two main reasons. Firstly, this allows you to have, for example: \begin{lstlisting}[style=bibtex, columns=fixed]{} @BOOK{key1, Author = {\"{O}leg Smith} } @BOOK{key2, Author = {Öleg Smith} } \end{lstlisting} % Here, because \biber decodes the macros into UTF-8, it knows that both books are by the same author because it's clear that the names are now the same. Secondly, this allows \biber to output normalised latex macros when a user selects \opt{--output-encoding=ascii} etc. This means that the many \biblatex comparison macros used in styles can deal with comparisons of fields containing macros reliably. The macro to UTF-8 conversion uses the decoding set specified with the \opt{--decodecharsset}, see below. To disable all macro to UTF-8 conversion, you can specify the virtual «null» set as a value for \opt{--decodecharsset} or \opt{output-safecharsset}. This effectively turns off macro to UTF-8 decoding or encoding respectively. If you are using PDF\latex\ and \verb+\usepackage[utf8]{inputenc}+, it is possible that the UTF-8 characters resulting from \biber's internal \latex\ character macro decoding break \verb+inputenc+. This is because \verb+inputenc+ does not implement all of UTF-8, only a commonly used subset. An example--if you had \verb+\DJ+ in your \verb+.bib+ datasource, \biber\ decodes this correctly to «Đ» and this breaks \verb+inputenc+ because it doesn't understand that UTF-8 character. The real solution here is to switch to a \TeX\ engine with full UTF-8 support like \XeTeX\ or Lua\TeX\ as these don't use or need \verb+inputenc+. However, you can also try the \opt{--output-safechars} option which will try to convert any UTF-8 chars into \latex\ macros on output. For information on the \opt{--output-safechars} option, see section \ref{lencode}. \bigskip \subsubsection{\latex\ macro encoding}\label{lencode} The opposite of decoding; converting UTF-8 characters into \latex\ macros. You can force this with the \opt{--output-safechars} option which will do a generally good job of making your \verb+.bbl+ plain ASCII. It can be useful in certain edge cases where your bibliography introduces characters which can't be handled by your main document. See section \ref{ldecode} above for an example such case. A common use case for \latex\ macro encoding is when the bibliography datasource is not ASCII but the \verb+.tex+ file is and so this case is automated for you: if the \biblatex\ option «\opt{texencoding}» (which corresponds to the \biber\ option «\opt{--output-encoding|-E}») is set to an ASCII encoding («\verb+ascii+» or «\verb+x-ascii+») and «\opt{--input-encoding|-e}» is not ASCII, \biber\ will automatically set \opt{--output-safechars}. Since \biber always decodes into UTF-8 internally, if the \opt{--output-encoding|-E} option is not set to UTF-8, \biber will automatically replace any characters which will not encode in the output encoding with equivalent \tex macros. You will also receive a warning about this. See also the \opt{biber --help} output for the \opt{--output-safecharsset} and \linebreak[4]\opt{--decodecharsset} options which can customise the set of conversion rules to use. The builtin sets of characters and macros which \biber\ maps during encoding and decoding are documented\footnote{\url{https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/\biberversion/documentation/utf8-macro-map.html}}. It is possible to provide a customised encode/decode mapping file using the \opt{--recodedata} option. It must adhere to the format of the default data file for reencoding which is \file{recode\_data.xml} located in the same Perl install directory as \biber's \file{Recode.pm} module. Of course it is easier to find this in the \biber\ source tree. It is most likely that if you want to use a custom mapping file, you would copy the default file and edit it, removing some things and perhaps defining some custom recoding sets for use with \opt{--output-safecharsset} and \opt{--decodecharsset}. Be careful to classify the entries using the correct «type» attribute in the XML file as this determines how the macro is treated by the code that does the replacement. Just copy a similar type of macro from the default recoding data file if you are adding new entries, which is unlikely as the file is quite comprehensive. There is only one other thing to note. The «preferred» attribute tells \biber\ to use a specific \latex\ macro when mapping from UTF-8, just in case there is more than one mapping from UTF-8 for a particular character. It's unlikely you will need to use this. \bigskip \subsubsection{Examples} \biberex{biber} \noindent Set \opt{input-encoding} and \opt{output-encoding} from the config file or \verb+.bcf+ \biberex{biber --output-encoding=latin2} \noindent Encode the \verb+.bbl+ as latin2, overriding the \verb+.bcf+ \biberex{biber --output-safechars} \noindent Set \opt{input-encoding} and \opt{output-encoding} from the config file or \verb+.bcf+. Force encoding of UTF-8 chars to \latex\ macros using default conversion set \biberex{biber --output-encoding=ascii} \noindent Encode the \verb+.bbl+ as ascii, overriding the \verb+.bcf+. Automatically sets \opt{--output-safechars} to force UTF-8 to \latex\ macro conversion \biberex{biber --output-encoding=ascii --output-safecharsset=full} \noindent Encode the \verb+.bbl+ as ascii, overriding the \verb+.bcf+. Automatically sets \opt{--output-safechars} to force UTF-8 to \latex\ macro conversion using the full set of conversions \biberex{biber --decodecharsset=full} \noindent Set \opt{input-encoding} and \opt{output-encoding} from the config file or \verb+.bcf+. Use the full \latex\ macro to UTF-8 conversion set because you have some more obscure character macros in your \verb+.bib+ datasource which you want to sort correctly \biberex{biber --recodedata=/tmp/recode.xml --decodecharsset=special} \noindent Specify a user-defined reencoding data file which defines a new reencoding set «special» and use this set for decoding \latex\ macros to UTF-8. \biberex{biber -u} \noindent Shortcut alias for \opt{biber --input-encoding=UTF-8} \biberex{biber -U} \noindent Shortcut alias for \opt{biber --output-encoding=UTF-8} \subsection{List and Name Separators} With traditional \bibtex, the name and list field separator «and» is hard-coded. The \texttt{btparse} C library and therefore \biber\ allows the use of any fixed string, subject to the same rules as «and» (not at the beginning or end of the name/list, whitespace must surround the string etc.). This is settable using the options \opt{listsep} and \opt{namesep}, both of which default to the usual «and». You can also change the default final name in a list which implies «et al». In \bibtex, this is by default the English «others» which is the \biber\ default also. Don't try to put any whitespace in these strings, this is ignored by \texttt{btparse} anyway. Perhaps you prefer your \file{.bib} in more obvious German---set \opt{--namesep=und} and \opt{--others-string=andere} and then you can do: \begin{verbatim} @BOOK{key, AUTHOR = {Hans Harman und Barbara Blaupunkt und andere}, } \end{verbatim} \noindent Bear in mind that these are global settings and apply to all entries in the \bibtex\ data format read by \biber. Also bear in mind that this is very unportable as all \bibtex\ input/output programs rely on the hard-coded «and» and «others». Hopefully this will change as these two hard-coded English terms look really rather bad in the context of multilingual bibliographies. \bigskip \subsection{Extended Name Format} \label{biber:xname} The parsing rules for \bibtex names are rather archaic and not suited to many international name formats. \biber supports an extended name format which allows explicit specification of the parts of names. This allows the use of custom name parts apart from the four standard \bibtex parts. Extended name formats are supported in all name fields and can be used along with the usual \bibtex name format. Recognition of extended name format can be disabled with the \biber option \opt{--noxname} in case you do not need the extended format and the auto-detection causes problems with normal name parsing. The separator \verb+=+ which comes between the namepart names and values is customisable with the \biber option \opt{--xnamesep}. Here is an example: \begin{verbatim} AUTHOR = {Hans Harman and Simon de Beumont} AUTHOR = {given=Hans, family=Harman and given=Simon, prefix=de, family=Beumont} \end{verbatim} % These two name specifications are equivalent but the extended format explicitly names the parts. The supported parts are those specified by the \biblatex data mode constant \opt{nameparts}, the default value of which is: \begin{verbatim} \DeclareDatamodelConstant[type=list]{nameparts}{prefix,family,suffix,given} \end{verbatim} % As with traditional \bibtex name parsing, initials are automatically generated but it is also possible to specify these explicitly: \begin{verbatim} AUTHOR = {given=Jean, prefix=de la, prefix-i=d, family=Rousse} AUTHOR = {given={Jean Pierre Simon}, given-i=JPS} \end{verbatim} % Initials are specified by adding the suffix \verb+-i+ to the namepart name. Compound parts may be protected with braces: \begin{verbatim} AUTHOR = {given={Jean Pierre}} \end{verbatim} % If a namepart contains a comma, the whole namepart should be protected with quotes: \begin{verbatim} AUTHOR = {"family={Robert and Sons, Inc.}"} \end{verbatim} % Traditional \bibtex name formats and the extended form may be used together: \begin{verbatim} AUTHOR = {Hans Harman and given=Simon, prefix=de, family=Beumont} \end{verbatim} % Per-namelist and per-name options may be specified in the extended name format: \begin{verbatim} AUTHOR = {namelistopt=true and Hans Harman and given=Simon, family=Beumont, nameopt=true} \end{verbatim} \bigskip \subsection{Editor Integration} Visit \url{http://tex.stackexchange.com/questions/154751/} for a comprehensive overview on \biber integration in most editors. \subsection{\BibTeX\ macros and the \texttt{MONTH} field} \BibTeX\ defines macros for month abbreviations like «\verb+jan+», «\verb+feb+» etc. \biber\ also does this, defining them as numbers since that is what \biblatex\ wants. In case you are also defining these yourself (although if you are only using \biblatex, there isn't much point), you will get macro redefinition warnings from the \verb+btparse+ library. You can turn off \biber's macro definitions to avoid this by using the option \opt{--nostdmacros}. \biber\ will look at any \bibfield{MONTH} field in a \BibTeX\ data source and if it's not a number as \biblatex\ expects (because it wasn't one of the macros as mentioned above or these macros were disabled by \opt{--nostdmacros}), it will try to turn it into the right number in the \verb+.bbl+. If you only use \biblatex\ with your \BibTeX\ datasource files, you should probably make any \bibfield{MONTH} fields be the numbers which \biblatex\ expects. \subsection{\biber\ datasource drivers}\label{dsd} \biber\ uses a modular datasource driver model to provide access to supported datasources. The drivers are responsible for mapping driver entrytypes and fields to the \biblatex\ data model according to a data model specification in the \biblatex\ file \file{blx-dm.def}. The data model can be changed using \biblatex\ macros in case you would like to, for example, use your own entrytype or field names or perhaps have \biber\ do some validation on your datasources (see the \biblatex\ manual). Data model mapping is an imprecise art and the drivers are the necessarily the most messy parts of \biber. Most datasource models are not designed with typesetting in mind and are usually not fine-grained enough to provide the sorts of information that \biblatex\ needs. \biber\ does its best to obtain as much meaningful information from a datasource as possible. Currently supported datasources drivers are: \begin{itemize} \item \BibTeX\ --- \BibTeX\ data files \item \verb+biblatexml+ --- Experimental \biblatex\ XML format \end{itemize} \subsection{Visualising the Output}\label{ref:vis} The option \opt{--output-format=dot} will cause \biber\ to write a GraphViz\footnote{\url{http://www.graphviz.org}} \verb+.dot+ file instead of a \verb+.bbl+. This file graphs the bibliographic data as it exists after all processing. You can transform this file using the \verb+dot+ program from GraphViz to generate a high quality graphical representation of the data in a format of your choice. A good output format choice with \verb+dot+ is SVG\footnote{Scalable Vector Graphics} which can be viewed in any modern web browser. This format has the advantage of tooltips and \biber\ uses these to give you more information on connections between entries: hover the cursor on an arrow in the output and it will tell you what it means. To output in SVG, use this command after installing GraphViz: \begin{verbatim} dot -Tsvg .dot -o .svg \end{verbatim} \noindent The \opt{--dot-include} option takes a comma delimited string as argument. The elements of this string define the information to include in the \verb+.dot+ output graph. The valid sub-options are shown in Table \ref{tab:graphopts}. If the \opt{--dot-include} option is not given then the default setting is implicitly used, which is: \begin{verbatim} --dot-include=crossref,section,xdata,xref \end{verbatim} \begin{table} \begin{center} \small \begin{tabular}{ll} \toprule Sub-option & Description\\ \midrule crossref & Show crossreference relationships\\ field & Show fields within entries\\ related & Show related entries and clones\\ section & Show sections\\ xdata & Show XDATA relationships\\ xref & Show XREF relationships\\ \bottomrule \end{tabular} \end{center} \caption{Valid sub-options for the \texttt{dot-include} option} \label{tab:graphopts} \end{table} \begin{figure}[!htpb] \centering\small \begin{tikzpicture} \node[rectangle, black, draw=black, fill=centry, align=center] (centry) { ()\\\\Cited entry}; \node[rectangle, black, draw=black, fill=ncentry, align=center] (ncentry) [right of=centry, node distance=11em] { ()\\\\Uncited entry}; \node[rectangle, black, draw=black, fill=doentry, align=center] (doentry) [right of=ncentry, node distance=11em] { ()\\\\dataonly entry}; \node[rectangle, black, draw=black, fill=section, align=center] (section) [below of=centry, node distance=5em] {Section \\\\Section}; \node[rectangle, black, draw=black, fill=set, align=center] (set) [right of=section, node distance=11em] { (SET)\\\\Entry set}; % CROSSREF \node[black] (cr1) [below of=section, node distance=6em] {A}; \node[black] (cr2) [right of=cr1, node distance=20em] {B}; \path (cr1) edge [->, color=crossref, very thick] node[auto, black] {B inherits by CROSSREF from A} (cr2); % XREF \node[black] (xr1) [below of=cr1, node distance=5em] {A}; \node[black] (xr2) [right of=xr1, node distance=20em] {B}; \path (xr1) edge [->, color=xref, style=dashed, very thick] node[auto, black] {B inherits by XREF from A} (xr2); % XDATA \node[black] (xd1) [below of=xr1, node distance=5em] {A}; \node[black] (xd2) [right of=xd1, node distance=20em] {B}; \path (xd1) edge [->, color=xdata, very thick] node[auto, black] {B inherits by XDATA from A} (xd2); % RELATED \node[black] (re1) [below of=xd1, node distance=5em] {A}; \node[black] (re2) [right of=re1, node distance=20em] {B}; \path (re1) edge [->, color=related, very thick] node[auto, black] {A is a related entry of B} (re2); % CLONE \node[black] (c1) [below of=re1, node distance=5em] {A}; \node[black] (c2) [right of=c1, node distance=20em] {B}; \path (c1) edge [->, color=clone, style=dashed, very thick] node[auto, black] {B is a clone of A} (c2); \end{tikzpicture} \caption{Key to \texttt{.dot} output format} \label{fig:graphkey} \end{figure} \bigskip \subsection{Tool Mode}\label{ref:tool} \biber\ can run in «tool» mode which is enabled with the \opt{--tool} command-line only option. In this mode, \biber is called: \opt{biber --tool }. Tool mode is a datasource rather than document oriented mode intended for transformations and modifications of datasources. It does not read a \file{.bcf} but instead, it reads all entries from the file «datasource», applies any changes specified in the command-line options and \biber\ config file and writes the resulting datasource out to a new file, defaulting to a \bibtex file called «\file{\_bibertool.bib}» if the options \opt{output-file} and \opt{output-format} are not specified. Tool mode is useful if you need to programatically change your datasource using the semantics provided by \biber or if you would like to convert your data to a different format. For example, you could choose to reencode your datasource by turning all UTF-8 characters into \latex\ macros: \begin{verbatim} biber --tool --output-encoding=ascii file.bib \end{verbatim} \noindent This would output a copy of \file{file.bib} called \file{file\_bibertool.bib} with all UTF-8 chars changed to \latex macros (because when the output is ASCII and the input encoding is not (it is by default UTF-8), then the \opt{--output-safechars} option is automatically enabled). If you utilise the \biber\ config file, you can set up a complex set of mappings to transform your datasource however you wish in a semantic manner much more robust than just textual search/replace. You can also use the \opt{--output-resolve} meta-option which will process any \bibfield{XDATA} fields/entries, entry aliases and inheritance rules mentioned in the config file (see below). Sometimes, you might wish to output fields which are \bibtex macros, that is, you might want this: \begin{lstlisting}[style=bibtex, columns=fixed]{} @Entrytype{key, Field = something, } \end{lstlisting} % instead of this: \begin{lstlisting}[style=bibtex, columns=fixed]{} @Entrytype{key, Field = {something}, } \end{lstlisting} % That is, you might not want the output field in braces or quotes as this prevents \bibtex interpreting the field value as a macro. Use the \opt{--output-macro-fields} option to specify a comma-separated list of fields whose values you wish to output without any \bibtex quoting. You can have spaces between the items in the field list but then you must enclose the whole option value in quotes. For example, these two will do the same thing: \begin{verbatim} biber --tool --output-macro_fields=month,publisher biber --tool --output-macro_fields='month, publisher' \end{verbatim} Tool mode also allows some reformatting of the \file{.bib} file. The option \opt{--tool-fieldcase} can be used to force the entrytype and fieldnames to upper, lower or title case. The option \opt{--tool-indent} can be used to customise the indentation of fields. The option \opt{output-align} can be used to align all field values neatly. See the \biber\ \opt{--help} output for documentation and defaults. For example, the command: \begin{verbatim} biber --tool --output-fieldcase=title --output-indent=4 \ --output-align file.bib \end{verbatim} % results in \file{.bib} entries which look like this: \begin{lstlisting}[style=bibtex, columns=fixed]{} @Entrytype{key, Author = {...}, Title = {...}, Publisher = {...}, Year = {...}, } \end{lstlisting} % another example: \begin{verbatim} biber --tool --output-fieldcase=upper --output-indent=2 file.bib \end{verbatim} % results in entries like this: \begin{lstlisting}[style=bibtex]{} @ENTRYTYPE{key, AUTHOR = {...}, TITLE = {...}, PUBLISHER = {...}, YEAR = {...}, } \end{lstlisting} % Here is an example using the \biber config file to specify all options. This example uses tool mode to reformat the \file{.bib} and also to do some transformations using the source map functionality. Suppose \file{test.bib} contains the following: \begin{lstlisting}[style=bibtex]{} @book{book1, author = {Doe,J.P.}, title = {Ökologische Enterprises}, year = {2013} } \end{lstlisting} % Further suppose that the \file{biber-tool.conf} contains the following: \begin{lstlisting}[language=xml,escapechar=;,mathescape=true] title ascii 1 \end{lstlisting} % Now you can run \biber like this: \begin{verbatim} biber --tool --configfile=biber-tool.conf test.bib \end{verbatim} % The result will be in \file{test\_bibertool.bib} and will look like this: \begin{lstlisting}[style=bibtex, columns=fixed]{} @Book{book1, Author = {Doe, John Paul}, Title = {\"{O}kologische Enterprises}, Year = {2013}, } \end{lstlisting} % Tool mode is a versatile way of performing many different operations on a \file{.bib} file. By using the config file and tool mode, we have: \begin{itemize} \item Consistently indented and aligned the entry, normalising fields and entrytype to title case \item Normalised the \bibfield{AUTHOR} field name using regular expressions \item Converted UTF-8 characters to \latex macros, and made the output pure ASCII \end{itemize} If you do not specify any configuration file to use in tool mode, \biber will by default look for a config file in the usual way (see section \ref{conffile}) with the only difference that if no config file is found, it will use the default \file{biber-tool.conf} which is located in the \biber install tree in the same location as the \file{Config.pm} file. This default config file contains the default \biblatex source mappings for \bibtex datasources and also the default inheritance rules for \bibfield{CROSSREF} processing. This means that when you use the \opt{--output-resolve} meta-option, inheritance processing is performed on the entries and the results of this are «materialised» in the output. For example, consider a \file{test.bib} file: \begin{lstlisting}[style=bibtex, columns=fixed]{} @BOOK{xd1, AUTHOR = {Edward Ellington}, DATE = {2007}, XDATA = {macmillanalias} } @XDATA{macmillan, IDS = {macmillanalias}, XDATA = {macmillan:pubALIAS, macmillan:loc} } @XDATA{macmillan:pub, IDS = {macmillan:pubALIAS}, PUBLISHER = {Macmillan} } @XDATA{macmillan:loc, LOCATION = {New York and London}, NOTE = {A Note} } @BOOK{b1, TITLE = {Booktitle}, CROSSREF = {mvalias} } @MVBOOK{mv1, IDS = {mvalias}, TITLE = {Maintitle}, SUBTITLE = {Mainsubtitle}, TITLEADDON = {Maintitleaddon} } \end{lstlisting} % Running \biber as: \begin{verbatim} biber --tool --output-resolve test.bib \end{verbatim} % The result of this would be a file \file{test\_bibertool.bib} with contents: \begin{lstlisting}[style=bibtex, columns=fixed]{} @BOOK{xd1, AUTHOR = {Edward Ellington}, DATE = {2007}, LOCATION = {New York and London}, NOTE = {A Note}, PUBLISHER = {Macmillan}, } @XDATA{macmillan, LOCATION = {New York and London}, NOTE = {A Note}, PUBLISHER = {Macmillan}, } @XDATA{macmillan:pub, PUBLISHER = {Macmillan}, } @XDATA{macmillan:loc, LOCATION = {New York and London}, NOTE = {A Note}, } @BOOK{b1, MAINSUBTITLE = {Mainsubtitle}, MAINTITLE = {Maintitle}, MAINTITLEADDON = {Maintitleaddon}, TITLE = {Booktitle}, } @MVBOOK{mv1, SUBTITLE = {Mainsubtitle}, TITLE = {Maintitle}, TITLEADDON = {Maintitleaddon}, } \end{lstlisting} % Notice here that: \begin{itemize} \item \bibfield{XDATA} references have been resolved completely for entry \texttt{xd1} \item \bibfield{CROSSREF} inheritance has been resolved according to the default \biblatex inheritance rules for entry \texttt{b1} \item Entry key aliases have been resolved as required in order to perform these tasks \end{itemize} Tool mode can also be used to convert between datasource formats. For example, if you wish to covert a \bibtex format data file to the experimental \texttt{biblatexml} XML format, you can do: \begin{verbatim} biber --tool --output-format=biblatexml file.bib \end{verbatim} \noindent This will output a file \file{file\_bibertool.bltxml} by default. The applicability of the various output options depends on the output format as shown in table \ref{tab:outopts} where dash means that the options has no relevance for the output format. The order of the fields when writing \bibtex data is controlled by the \opt{--output-field-order} option. This is a comma-separated list of fields or field classes and fields will be output to entries in the order specified. Any unspecified fields will be output in sorted order after the specified fields. The field classes are: \begin{description} \item[names] All name fields \item[lists] All non-name list fields \item[dates] All date fields \end{description} % For the default value, run \biber with the \opt{--help} option and see the documentation for the option. \opt{--output-listsep}, \opt{output-namesep} and \opt{output-xnamesep} can be used to customise separators on output and their default values are the same as their input option counterparts \opt{--listsep}, \opt{--namesep} and \opt{--xnamesep}. The option \opt{--output-xname} can be used to specify that the extended name format (see section \ref{biber::xname}) is to be used to output names. \opt{--output-annotation-marker} can be used to specify the annotation marker to write for annotated fields on output. See the Data Annotation feature documentation in the \biblatex manual. \begin{table} \begin{center} \small \begin{tabular}{lllll} \toprule & \multicolumn{4}{c}{\emph{Output format}}\\ \emph{Option} & bibtex & biblatexml & bbl & dot\\ \midrule output-align & \checkmark & - & - & -\\ output-annotation-marker & \checkmark & - & - & -\\ output-indent & \checkmark & \checkmark & - & -\\ output-field-order & \checkmark & - & - & -\\ output-fieldcase & \checkmark & - & - & -\\ output-listsep & \checkmark & - & - & -\\ output-macro-fields & \checkmark & - & - & -\\ output-namesep & \checkmark & - & - & -\\ output-resolve-xdata & \checkmark & \checkmark & - & -\\ output-resolve-crossrefs & \checkmark & \checkmark & - & -\\ output-resolve-sets & \checkmark & \checkmark & - & -\\ output-xname & \checkmark & - & - & -\\ output-xnamesep & \checkmark & - & - & -\\ \bottomrule \end{tabular} \end{center} \caption{Applicability of the output options} \label{tab:outopts} \end{table} \bigskip \subsubsection{Customising Tool Mode Inheritance Resolution} The default \file{biber-tool.conf} contains, as mentioned above, the default \biblatex \bibfield{CROSSREF} inheritance setup and \bibtex source mappings so that tool mode resolution works as expected. Of course it is possible to customise these. In \biblatex, this is accomplished by the \cmd{DeclareDataInheritance} macros which write appropriate XML into the \file{.bcf} file. Since no \file{.bcf} file is used in tool mode, the desired configuration must be put into a \biber config file. The source mapping XML specification is given in section \ref{ref:map}. The inheritance XML specification is given in section \ref{inheritance}. It is recommended to copy the default \file{biber-tool.conf} file, modify this and then use it as your own \file{biber.conf} file or pass it explicitly using the \opt{--configfile|-g} option. You can determine the location of the default tool mode config file by using the \opt{--tool-config} option which will show you the location of the config file and exit. \subsubsection{Customising Tool Mode Sorting} A sorting scheme called «tool» can be defined in the config file in order to sort the entries in tool mode output. See section \ref{sorting} for the format of the config file sorting specification. By default, in tool mode the sorting scheme is the same as the \biblatex \texttt{none} scheme, that is, no sorting is performed. The sorting locale in tool mode defaults to «\texttt{en\_US}» if you do not use \biber's \opt{sortlocale} option. \bigskip \section{Binaries}\label{binaries} \biber\ is a Perl application which relies heavily on quite a few modules. It is packaged as a stand-alone binary using the excellent \verb+PAR::Packer+ module which can pack an entire Perl tree plus dependencies into one file which acts as a stand-alone binary and is indistinguishable from such to the end user. You can also simply download the Perl source and run it as a normal Perl program which requires you to have a working Perl 5.24+ installation and the ability to install the pre-requisite modules. You would typically only do this if you wanted to keep up with all the bleeding-edge git commits before they had been packaged as a binary. Almost all users will not want to do this and should use the binaries from their \TeX\ distribution or downloaded directly from SourceForge in case they need to use a more recent binary than is included in their \TeX\ distribution. The binary distributions of \biber\ are made using the Perl \verb+PAR::Packer+ module. They can be used as a normal binary but have some behaviour which is worth noting: \begin{itemize} \item Don't be worried by the size of the binaries. \verb+PAR::Packer+ essentially constructs a self-extracting archive which unpacks the needed files first. \item On the first run of a new version (that is, with a specific hash), they actually unpack themselves to a temporary location which varies by operating system. This unpacking can take a little while and only happens on the first run of a new version. \textbf{Please don't kill the process if it seems to take some time to do anything on the first run of a new binary}. If you do, it will not unpack everything and it will almost certainly break \biber. You will then have to delete your binary cache (see section \ref{bc} below) and re-run the \biber\ executable again for the first time to allow it to unpack properly. \end{itemize} \subsection{Binary Caches}\label{bc} \verb+PAR::Packer+ works by unpacking the required files to a cache location. It only does this on the first run of a binary by computing a hash of the binary and comparing it with the cache directory name which contains the hash. So, if you run several versions of a binary, you will end up with several cached trees which are never used. This is particularly true if you are regularly testing new versions of the \biber\ binary. It is a good idea to delete the caches for older binaries as they are not needed and can take up a fair bit of space. The caches are located in a temporary location which varies from OS to OS. The cache name is:\\[1ex] \noindent\verb+par-/cache-+ (Linux/Unix/OSX)\\ \verb+par-\cache-+ (Windows)\\[1ex] \noindent The temp location is not always obvious but these are sensible places to look (where \verb+*+ can vary depending on username): \begin{itemize} \item \verb+/var/folders/*/*/*/+ (OSX, local GUI login shell) \item \verb+/var/tmp/+ (OSX (remote ssh login shell), Unix) \item \verb+/tmp/+ (Linux) \item \verb+C:\Documents and Settings\\Local Settings\Temp+ (Windows/Cygwin) \item \verb+C:\Windows\Temp+ (Windows) \end{itemize} \noindent To clean up, you can just remove the whole \verb+par-+ directory/folder and then run the current binary again. You can see the active cache by running biber with the \texttt{--cache} option which will print the current cache location and exit. \subsection{Binary Architectures} Binaries are available for many architectures, directly on SourceForge and also via \TeX Live: \begin{itemize} \item \verb+darwin_x86_64+ \item \verb+darwin_x86_i386+ \item \verb+linux_x86_32+ \item \verb+linux_x86_64+ \item \verb+MSWin32+ \item \verb+MSWin64+ \item \verb+cygwin32+\tpb \item \verb+freebsd_x86+\tpb \item \verb+freebsd_amd64+\tpb \item \verb+solaris_i386+\tpb \item \verb+solaris_x86_64+\tpb \end{itemize} \noindent If you want to run development versions, they are usually only regularly updated for the core architectures which are not flagged as third-party built above. If you want to regularly run the latest development version, you should probably git clone the relevant branch and run \biber\ as a pure Perl program directly. \subsection{Installing} These instructions only apply to manually downloaded binaries. If \biber\ came with your \TeX\ distribution just use it as normal. Download the binary appropriate to you OS/arch\footnote{\url{https://sourceforge.net/projects/biblatex-biber}}. Below I assume it's on your desktop. You have to move the binary to somewhere in you command-line or \TeX\ utility path so that it can be found. If you know how to do this, just ignore the rest of this section which contains some instructions for users who are not sure about this. \subsubsection{OSX} If you are using the \TeX Live Mac\TeX\ distribution: \begin{verbatim} sudo mv ~/Desktop/biber /usr/texbin/ sudo chmod +x /usr/texbin/biber \end{verbatim} \noindent If you are using the MacPorts \TeX Live distribution: \begin{verbatim} sudo mv ~/Desktop/biber /opt/local/bin/ sudo chmod +x /opt/local/bin/biber \end{verbatim} \noindent The «\verb+sudo+» commands will prompt you for your password. \subsubsection{Windows} The easiest way is to just move the executable into your \verb+C:\Windows+ directory since that is always in your path. A more elegant way is to put it somewhere in your \TeX\ distribution that is already in your path. For example if you are using MiK\TeX: \begin{verbatim} C:\Program Files\MiKTeX 2.9\miktex\bin\ \end{verbatim} \subsubsection{Unix/Linux} \begin{verbatim} sudo mv ~/Desktop/biber /usr/local/bin/biber sudo chmod +x /usr/local/bin/biber \end{verbatim} \noindent Make sure \verb+/usr/local/bin+ is in your PATH. Search Google for «set PATH linux» if unsure about this. There are many pages about this, for example: \url{http://www.cyberciti.biz/faq/unix-linux-adding-path/} \subsection{Building} Instructions for those who want/need to build an executable from the Perl version. For this, you will need to have Perl 5.24+ with the following modules (best installed in this order): \begin{itemize} \item \verb+Module::Build+ and all dependencies \item All \biber\ pre-requisites \item \verb+PAR::Packer+ and all dependencies \end{itemize} \noindent \biber\ is very specific in some cases about module versions and sometimes depends on recent fixes. You can see if you have the \biber\ Perl dependencies by the usual \verb+Module::Build+ command: \begin{verbatim} perl ./Build.PL \end{verbatim} \noindent run at the root of the \biber\ Perl distribution directory. Normally, the build procedure for the binaries is as follows\footnote{On Unix-like systems, you may need to specify a full path to the scripts e.g. \texttt{./Build}}: \begin{itemize} \item Get the \biber\ source tree from SF and put it on the architecture you are building for \item cd to the root of the source tree \item \verb+perl Build.PL+ (this will check your module dependencies) \item If you are missing dependencies, you will be informed and then you should run \verb+Build installdeps+ (may need to run this with sudo on Unix-like systems) \item Run the test suite with \verb+Build test+ \item Install with \verb+Build install+ (may need to run this with sudo on Unix-like systems) \item \verb+cd dist/+ \item \verb+build.sh+ (\verb+build.bat+ on Windows) \end{itemize} \noindent This leaves a binary called «\verb+biber-+» (also with a «\verb+.exe+» extension on Windows/Cygwin) in your current directory. The important part is constructing the information for the build script. There are two things that need to be configured, both of which are required by the \verb+PAR::Packer+ module: \begin{enumerate} \item A list of modules/libraries to include in the binary which are not automatically detected by the \verb+PAR::Packer+ dependency scanner \item A list of extra files to include in the binary which are not automatically detected by the \verb+PAR::Packer+ dependency scanner \end{enumerate} \noindent To build \biber\ for a new architecture you need to define these two things as part of constructing new build scripts: \begin{itemize} \item Make a new sub-folder in the \verb+dist+ directory named after the architecture you are building for. \item Copy the \verb+biber.files+ file from an existing build architecture into this directory. \item For all of the files with absolute pathnames in there (that is, ones we are not pulling from the \biber\ tree itself), locate these files in your Perl installation tree and put the correct path in the file. \item Copy the build script from a similar architecture (i.e. Windows/non-Windows \ldots) to your new architecture directory. \item Change the \opt{--link} options to point to where the required libraries reside on your system. \item Change the \opt{--output} option to name the resulting binary for your architecture. \item Run the build script \end{itemize} \noindent The \opt{--link} options can be a little tricky sometimes. It is usually best to build without them once and then run \verb+ldd+\footnote{\texttt{otool} on OSX and \texttt{depends.exe} on Windows} on the binary to see which version/location of a library you should link to. You can also try just running the binary and it should complain about missing libraries and where it expected to find them. Put missing library paths into \opt{--link} options. The \opt{--module} options are the same for all architectures and do not need to be modified. On architectures which have or can have case-insensitive file systems, you should use the build script from either Windows or OSX as a reference as these include a step to copy the main \biber\ script to a new name before packing the binary. This is required as otherwise a spurious error is reported to the user on first run of the binary due to a name collision when it unpacks itself. See the \verb+PAR+ wiki page\footnote{\url{http://par.perl.org/wiki/Main_Page}} for FAQs and help on building with \verb+PAR::Packer+. Take special note of the FAQs on including libraries with the packed binary\footnote{\url{http://par.perl.org/wiki/FAQ}, section entitled «My PAR executable needs some dynamic libraries»}. \subsubsection{Testing a binary build} You can test a binary that you have created by copying it to a machine which preferably doesn't have \verb+perl+ at all on it. Running the binary with no arguments will unpack it in the background and display the help. To really test it without having \latex\ available, get the two quick test files from SourceForge\footnote{\url{https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/testfiles}}, put them in a directory and run \biber\ in that directory like this: \begin{verbatim} biber --validate-control --convert-control test \end{verbatim} \noindent This will run \biber\ normally on the test files plus it will also perform an XSLT transform on the \verb+.bcf+ and leave an HTML representation of it in the same directory thus testing the links to the XML and XSLT libraries as well as the \BibTeX\ parsing libraries. The output should look something like this (may be differences of \biber\ version and locale of course but there should be no errors or warnings). \begin{verbatim} INFO - This is Biber 2.9 INFO - Logfile is 'test.blg' INFO - BibLaTeX control file 'test.bcf' validates INFO - Converted BibLaTeX control file 'test.bcf' to 'test.bcf.html' INFO - Reading 'test.bcf' INFO - Found 1 citekeys in bib section 0 INFO - Processing bib section 0 INFO - Looking for BibTeX format file 'test.bib' for section 0 INFO - Found BibTeX data file 'test.bib' INFO - Decoding LaTeX character macros into UTF-8 INFO - Sorting list 'nyt/global' keys INFO - No sort tailoring available for locale 'en_GB.UTF-8' INFO - Sorting list 'shorthands/global' keys INFO - No sort tailoring available for locale 'en_GB.UTF-8' INFO - Writing 'test.bbl' with encoding 'UTF-8' INFO - Output to test.bbl \end{verbatim} \noindent There should now be these new files in the directory: \begin{verbatim} test.bcf.html test.blg test.bbl \end{verbatim} \appendix \section{Appendix} \subsection{Babel/Polyglossia language to Locale mapping}\label{localemap} \begin{center} \footnotesize \begin{tabular}{alalalal} \toprule Language & Locale & Language & Locale & Language & Locale & Language & Locale\\ \midrule acadian & \texttt{fr\_CA} & divehi & \texttt{dv\_MV} & latin & \texttt{la\_Latn} & sanskrit & \texttt{sa\_IN}\\ american & \texttt{en\_US} & dutch & \texttt{nl\_NL} & latvian & \texttt{lv\_LV} & scottish & \texttt{gd\_GB}\\ australian & \texttt{en\_AU} & english & \texttt{en\_US} & lithuanian & \texttt{lt\_LT} & serbian & \texttt{sr\_Latn}\\ afrikaans & \texttt{af\_ZA} & esperanto & \texttt{eo\_001} & lowersorbian & \texttt{dsb\_DE} & serbianc & \texttt{sr\_Cyrl}\\ albanian & \texttt{sq\_AL} & estonian & \texttt{et\_EE} & lsorbian & \texttt{dsb\_DE} & slovak & \texttt{sk\_SK}\\ amharic & \texttt{am\_ET} & ethiopia & \texttt{am\_ET} & magyar & \texttt{hu\_HU} & slovene & \texttt{sl\_SI}\\ arabic & \texttt{ar\_001} & farsi & \texttt{fa\_IR} & malay & \texttt{id\_ID} & slovenian & \texttt{sl\_SI}\\ armenian & \texttt{hy\_AM} & finnish & \texttt{fi\_FI} & malayalam & \texttt{ml\_IN} & spanish & \texttt{es\_ES}\\ asturian & \texttt{ast\_ES} & francais & \texttt{fr\_FR} & marathi & \texttt{mr\_IN} & swedish & \texttt{sv\_SE}\\ austrian & \texttt{de\_AT} & french & \texttt{fr\_FR} & meyalu & \texttt{id\_ID} & syriac & \texttt{syc}\\ bahasa & \texttt{id\_ID} & frenchle & \texttt{fr\_FR} & mongolian & \texttt{mn\_Cyrl} & tamil & \texttt{ta\_IN}\\ bahasai & \texttt{id\_ID} & friulan & \texttt{fur\_IT} & naustrian & \texttt{de\_AT} & telugu & \texttt{te\_IN}\\ bahasam & \texttt{id\_ID} & galician & \texttt{gl\_ES} & newzealand & \texttt{en\_US} & thai & \texttt{th\_TH}\\ basque & \texttt{eu\_ES} & german & \texttt{de\_DE} & ngerman & \texttt{de\_DE} & thaicjk & \texttt{th\_TH}\\ bengali & \texttt{bn\_BD} & germanb & \texttt{de\_DE} & nko & \texttt{ha\_NG} & tibetan & \texttt{bo\_CN}\\ bgreek & \texttt{el\_GR} & greek & \texttt{el\_GR} & norsk & \texttt{nb\_NO} & turkish & \texttt{tr\_TR}\\ brazil & \texttt{pt\_BR} & hebrew & \texttt{he\_IL} & nynorsk & \texttt{nn\_NO} & turkmen & \texttt{tk\_TM}\\ brazilian & \texttt{pt\_BR} & hindi & \texttt{hi\_IN} & occitan & \texttt{oc\_FR} & ukrainian & \texttt{uk\_UA}\\ breton & \texttt{br\_FR} & ibygreek & \texttt{el\_CY} & piedmontese & \texttt{pms\_IT} & urdu & \texttt{ur\_IN}\\ british & \texttt{en\_GB} & icelandic & \texttt{is\_IS} & pinyin & \texttt{pny} & UKenglish & \texttt{en\_GB}\\ bulgarian & \texttt{bg\_BG} & indon & \texttt{id\_ID} & polish & \texttt{pl\_PL} & uppersorbian & \texttt{hsb\_DE}\\ canadian & \texttt{en\_US} & indonesia & \texttt{id\_ID} & polutonikogreek & \texttt{el\_GR} & USenglish & \texttt{en\_US}\\ canadien & \texttt{fr\_CA} & interlingua & \texttt{ia\_FR} & portuges & \texttt{pt\_PT} & usorbian & \texttt{hsb\_DE}\\ catalan & \texttt{ca\_ES} & irish & \texttt{ga\_IE} & portuguese & \texttt{pt\_PT} & vietnamese & \texttt{vi\_VN}\\ coptic & \texttt{cop} & italian & \texttt{it\_IT} & romanian & \texttt{ro\_RO} & welsh & \texttt{cy\_GB}\\ croatian & \texttt{hr\_HR} & japanese & \texttt{ja\_JP} & romansh & \texttt{rm\_CH}\\ czech & \texttt{cs\_CZ} & kannada & \texttt{kn\_IN} & russian & \texttt{ru\_RU}\\ danish & \texttt{da\_DK} & lao & \texttt{lo\_LA} & samin & \texttt{se\_NO}\\ \bottomrule \end{tabular} \end{center} \end{document}