├── .github └── workflows │ └── main.yml ├── .gitignore ├── BUILDERS.README ├── Build.PL ├── Changes ├── LICENSE ├── MANIFEST ├── MANIFEST.SKIP ├── README.md ├── RELEASE ├── TODO.org ├── bin └── biber ├── data ├── bcf.xsl ├── biber-tool.conf ├── gen_latin.pl ├── schemata │ ├── bcf.rnc │ ├── bcf.rng │ ├── config.rnc │ ├── config.rng │ └── texmap.rnc └── texmap.xsl ├── dist ├── MSWIN32 │ └── build.bat ├── MSWIN64 │ └── build.bat ├── build-env-local.sh ├── build-universal.sh ├── build.sh ├── cygwin32 │ └── build.sh ├── cygwin64 │ └── build.sh ├── darwin_arm64 │ └── build.sh ├── darwin_x86_64 │ └── build.sh ├── darwinlegacy_x86_64 │ └── build.sh ├── empty_tree.sh ├── freebsd_amd64 │ ├── biber.files │ └── build.sh ├── freebsd_i386 │ ├── biber.files │ └── build.sh ├── linux-musl_x86_64 │ └── build.sh ├── linux_aarch64 │ └── build.sh ├── linux_armel │ ├── biber.files │ └── build.sh ├── linux_x86_32 │ ├── build.sh │ └── striprpath.sh ├── linux_x86_64 │ └── build.sh ├── obsolete │ └── darwin_x86_i386 │ │ └── build.sh ├── re-package.sh ├── solaris_x86_64 │ ├── biber.files │ └── build.sh └── xsl-transform.pl ├── doc └── biber.tex ├── etc ├── TUG-10-2019.pdf ├── TUG-10-2019.tex ├── biber-tb-final.tex ├── bibtex.g ├── btparse.notes ├── definitions.bib ├── papers.bib ├── parser.dlg ├── test.tex ├── tugboat.bib ├── tugboat.def └── tugtest.tex ├── htdocs ├── biber.css ├── castor.png └── index.html ├── lib ├── Biber.pm └── Biber │ ├── Annotation.pm │ ├── CodePage.pm │ ├── Config.pm │ ├── Constants.pm │ ├── DataList.pm │ ├── DataLists.pm │ ├── DataModel.pm │ ├── Date │ └── Format.pm │ ├── Entries.pm │ ├── Entry.pm │ ├── Entry │ ├── Name.pm │ └── Names.pm │ ├── Input │ └── file │ │ ├── biblatexml.pm │ │ └── bibtex.pm │ ├── Internals.pm │ ├── LaTeX │ ├── Recode.pm │ └── recode_data.xml │ ├── LangTag.pm │ ├── LangTags.pm │ ├── Output │ ├── base.pm │ ├── bbl.pm │ ├── bblxml.pm │ ├── biblatexml.pm │ ├── bibtex.pm │ └── dot.pm │ ├── Section.pm │ ├── Sections.pm │ ├── UCollate.pm │ └── Utils.pm ├── t ├── annotations.t ├── basic-misc.t ├── bcfvalidation.t ├── biblatexml.t ├── bibtex-aliases.t ├── bibtex-output.t ├── configfile.t ├── crossrefs.t ├── datalists.t ├── dateformats.t ├── dm-constraints.t ├── encoding.t ├── extradate.t ├── extratitle.t ├── extratitleyear.t ├── full-bbl.t ├── full-bibtex.t ├── full-dot.t ├── labelalpha.t ├── labelalphaname.t ├── labelname.t ├── langtags.t ├── maps.t ├── names.t ├── names_x.t ├── options.t ├── related-entries.t ├── remote-files.t ├── sections-complex.t ├── sections.t ├── set-dynamic.t ├── set-legacy.t ├── set-static.t ├── skips.t ├── skipsg.t ├── sort-case.t ├── sort-complex.t ├── sort-names.t ├── sort-order.t ├── sort-uc.t ├── sorting.t ├── tdata │ ├── annotations.bcf │ ├── annotations.bib │ ├── basic-misc.bcf │ ├── biber-test.conf │ ├── biblatexml.bcf │ ├── biblatexml.bltxml │ ├── bibtex-aliases.bcf │ ├── bibtex-aliases.bib │ ├── bibtex-output.bcf │ ├── crossrefs.bcf │ ├── crossrefs.bib │ ├── datalists.bcf │ ├── datalists.bib │ ├── datalists.bltxml │ ├── dateformats.bcf │ ├── dateformats.bib │ ├── dm-constraints.bcf │ ├── dm-constraints.bib │ ├── encoding1.bcf │ ├── encoding1.bib │ ├── encoding2.bcf │ ├── encoding2.bib │ ├── encoding3.bcf │ ├── encoding3.bib │ ├── encoding4.bcf │ ├── encoding4.bib │ ├── encoding5.bcf │ ├── encoding5.bib │ ├── encoding6.bcf │ ├── encoding6.bib │ ├── examples.bib │ ├── extradate.bcf │ ├── extradate.bib │ ├── extratitle.bcf │ ├── extratitle.bib │ ├── extratitleyear.bcf │ ├── extratitleyear.bib │ ├── full-bbl.bbl │ ├── full-bbl.bcf │ ├── full-bbl.bib │ ├── full-bibtex.bcf │ ├── full-bibtex_biber.bib │ ├── full-dot.bcf │ ├── full-dot.bib │ ├── full-dot.dot │ ├── general.bcf │ ├── labelalpha.bcf │ ├── labelalpha.bib │ ├── labelalphaname.bcf │ ├── labelalphaname.bib │ ├── maps.bcf │ ├── maps.bib │ ├── names.bcf │ ├── names.bib │ ├── names_x.bcf │ ├── names_x.bib │ ├── options.bcf │ ├── options.bib │ ├── related.bcf │ ├── related.bib │ ├── remote-files.bcf │ ├── sections-complex.bcf │ ├── sections.bcf │ ├── sections1.bib │ ├── sections2.bib │ ├── sections3.bib │ ├── sections4.bib │ ├── set-dynamic.bcf │ ├── set-legacy.bcf │ ├── set-static.bcf │ ├── sets.bib │ ├── skips.bcf │ ├── skips.bib │ ├── skipsg.bcf │ ├── skipsg.bib │ ├── sort-case.bcf │ ├── sort-case.bib │ ├── sort-complex.bcf │ ├── sort-names.bcf │ ├── sort-names.bib │ ├── sort-order.bcf │ ├── sort-order.bib │ ├── sort-uc.bcf │ ├── sort-uc.bib │ ├── sort.bib │ ├── tool-test.conf │ ├── tool-testconfig.conf │ ├── tool-testsort.conf │ ├── tool.bib │ ├── translit.bcf │ ├── translit.bib │ ├── truncation.bcf │ ├── truncation.bib │ ├── uniqueness-nameparts.bcf │ ├── uniqueness-nameparts.bib │ ├── uniqueness1.bcf │ ├── uniqueness1.bib │ ├── uniqueness2.bcf │ ├── uniqueness2.bib │ ├── uniqueness3.bcf │ ├── uniqueness3.bib │ ├── uniqueness4.bcf │ ├── uniqueness4.bib │ ├── uniqueness5.bcf │ ├── uniqueness5.bib │ ├── uniqueness6.bcf │ ├── uniqueness6.bib │ ├── uniqueness7.bcf │ ├── uniqueness7.bib │ ├── xdata.bcf │ ├── xdata.bib │ └── xdata.bltxml ├── tool-bltxml-inout.t ├── tool-bltxml.t ├── tool-config.t ├── tool.t ├── translit.t ├── truncation.t ├── uniqueness-nameparts.t ├── uniqueness.t ├── utils.t └── xdata.t ├── testfiles ├── Unicode-bib-files.zip ├── Unicode-tests-preserved-NF.zip ├── test.bcf ├── test.bib ├── test.tex └── testCP.pl └── visual.pl /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Biber CI 2 | 3 | env: 4 | URL: https://www.cpan.org/src/5.0/perl-5.32.0.tar.gz 5 | MAKEFLAGS: -j2 6 | BIBER_DEV_TESTS: 1 7 | 8 | # Controls when the action will run. 9 | on: 10 | schedule: 11 | - cron: "0 2 * * *" 12 | 13 | # Allows you to run this workflow manually from the Actions tab 14 | workflow_dispatch: 15 | 16 | jobs: 17 | test: 18 | runs-on: ubuntu-latest 19 | steps: 20 | - name: Install Perl 21 | run: | 22 | echo Downloading and compiling in [$PWD] from [$URL] 23 | 24 | mkdir perlsource 25 | wget -nc $URL 26 | tar -xf $(basename $URL) --strip-components=1 --directory=perlsource 27 | 28 | pushd perlsource 29 | bash +x ./Configure -sde -Dprefix="$RUNNER_WORKSPACE/localperl" 30 | test -f Makefile 31 | make 32 | make install 33 | popd 34 | 35 | - name: Set ENV 36 | run: | 37 | echo "$RUNNER_WORKSPACE/localperl/bin" >> $GITHUB_PATH 38 | echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RUNNER_WORKSPACE/localperl/lib" >> $GITHUB_ENV 39 | 40 | - name: Checkout 41 | uses: actions/checkout@v2 42 | 43 | - name: Install Biber Dependencies Without Test 44 | run: | 45 | cpan -T Module::Build 46 | perl Build.PL 47 | ./Build installdeps --cpan_client "cpan -T" 48 | 49 | - name: Run biber tests 50 | run: | 51 | ./Build test 52 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | !*.bib 2 | !*.aux 3 | !*.bcf 4 | !*.bbl 5 | doc/*.pdf 6 | doc/*.aux 7 | doc/*.out 8 | doc/*.synctex 9 | auto 10 | MYMETA.yml 11 | MYMETA.json 12 | META.yml 13 | META.json 14 | Build 15 | .vscode 16 | blib/ 17 | _build/ 18 | dist/*/biber-* 19 | dist/*/scancache 20 | t/tdata/*.rng 21 | t/tdata/*.bbl 22 | t/tdata/*.blg 23 | testfiles/test.bcf.html 24 | testfiles/test.blg 25 | testfiles/test.bbl 26 | dist/build-env-cmds 27 | *_flymake* 28 | *~ 29 | .auctex-auto 30 | -------------------------------------------------------------------------------- /Build.PL: -------------------------------------------------------------------------------- 1 | 2 | use strict; 3 | use warnings; 4 | use utf8; 5 | 6 | require Module::Build; 7 | my $class = Module::Build->subclass 8 | ( 9 | class => 'My::Builder', 10 | code => q{ 11 | 12 | sub ACTION_test { 13 | my $self = shift; 14 | $ENV{'LANG'} = 'C'; # set LANG to something known for tests 15 | $self->SUPER::ACTION_test; 16 | } 17 | 18 | sub ACTION_docs { 19 | my $self = shift; 20 | $self->depends_on('code'); 21 | $self->depends_on('manpages'); # skip html on perls where it's enabled 22 | } 23 | 24 | } 25 | ); 26 | 27 | my $builder = $class->new( 28 | dist_name => 'biblatex-biber', 29 | license => 'perl', 30 | dist_author => 'Philip Kime ', 31 | dist_abstract => 'Biber is a much-augmented bibtex replacement for biblatex users', 32 | dist_version_from => 'lib/Biber/Config.pm', 33 | test_requires => { 34 | 'Test::More' => 0, 35 | 'Test::Differences' => 0, 36 | 'File::Which' => 0 37 | }, 38 | add_to_cleanup => [ 'biber-*' ], 39 | configure_requires => { 'Module::Build' => 0.38 }, 40 | build_requires => { 41 | 'Config::AutoConf' => '0.15', 42 | 'ExtUtils::LibBuilder' => '0.02' 43 | }, 44 | requires => { 45 | 'autovivification' => 0, 46 | 'Class::Accessor' => 0, 47 | 'Data::Dump' => 0, 48 | 'Data::Compare' => 0, 49 | 'Data::Uniqid' => 0, 50 | 'DateTime::Format::Builder' => 0, 51 | 'DateTime::Calendar::Julian' => 0, 52 | 'File::Slurper' => 0, 53 | 'IPC::Cmd' => 0, 54 | 'IPC::Run3' => 0, 55 | 'List::AllUtils' => 0, 56 | 'List::MoreUtils' => 0, 57 | 'List::MoreUtils::XS' => 0, 58 | 'Mozilla::CA' => '20160104', 59 | 'Regexp::Common' => 0, 60 | 'Log::Log4perl' => 0, 61 | 'Unicode::Collate' => '1.29', 62 | 'Unicode::Normalize' => '1.26', 63 | 'Unicode::LineBreak' => '2019.001', 64 | 'Unicode::GCString' => 0, 65 | 'Encode::Locale' => 0, 66 | 'Encode::EUCJPASCII' => 0, 67 | 'Encode::JIS2K' => 0, 68 | 'Encode::HanExtra' => 0, 69 | 'Parse::RecDescent' => 0, 70 | 'PerlIO::utf8_strict' => 0, 71 | 'XML::LibXML' => 1.70, 72 | 'XML::LibXML::Simple' => 0, 73 | 'XML::LibXSLT' => 0, 74 | 'XML::Writer' => 0, 75 | 'Sort::Key' => 0, 76 | 'Storable' => 0, 77 | 'Text::CSV' => 0, 78 | 'Text::CSV_XS' => 0, 79 | 'Text::Roman' => 0, 80 | 'IO::String' => 0, 81 | 'URI' => 0, 82 | 'Text::Balanced' => 0, 83 | 'Text::BibTeX' => '0.88', 84 | 'LWP::UserAgent' => 0, 85 | 'LWP::Protocol::https' => 0, 86 | 'Business::ISBN' => 0, 87 | 'Business::ISSN' => 0, 88 | 'Business::ISMN' => 0, 89 | 'Lingua::Translit' => '0.28', 90 | 'perl' => '5.32.0' 91 | }, 92 | script_files => [ glob( "bin/*" ) ], 93 | data_files => {'data/schemata/config.rnc' => 'lib/Biber/config.rnc', 94 | 'data/schemata/config.rng' => 'lib/Biber/config.rng', 95 | 'data/schemata/bcf.rnc' => 'lib/Biber/bcf.rnc', 96 | 'data/schemata/bcf.rng' => 'lib/Biber/bcf.rng', 97 | 'data/biber-tool.conf' => 'lib/Biber/biber-tool.conf', 98 | 'lib/Biber/LaTeX/recode_data.xml' => 'lib/Biber/LaTeX/recode_data.xml', 99 | 'data/bcf.xsl' => 'lib/Biber/bcf.xsl' } 100 | ); 101 | 102 | $builder->add_build_element('data'); 103 | $builder->create_build_script(); 104 | -------------------------------------------------------------------------------- /MANIFEST.SKIP: -------------------------------------------------------------------------------- 1 | ^MANIFEST\.SKIP 2 | ^t/_moredata 3 | ^t/3rdparty 4 | ^_build 5 | ^_playground 6 | ^Build 7 | ^Build\.bat 8 | ^Makefile\.PL 9 | ^META\.yml 10 | ^blib 11 | ^\.git 12 | ^htdocs 13 | ^dist 14 | ^README\.win 15 | ^etc 16 | \.swp$ 17 | ^MYMETA\.yml$ 18 | ^MYMETA\.json$ 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OVERVIEW 2 | 3 | Biber is a sophisticated bibliography processing backend for the LaTeX 4 | biblatex package. It supports an unsurpassed feature set for automated 5 | conformance to complex bibliography style requirements such as labelling, 6 | sorting and name handling. It has comprehensive Unicode support. 7 | 8 | **Please note**--the default download for all platforms is 64-bit. Please 9 | look in the files section for the correct 32-bit platform instead of 10 | using the default download button if you want 32-bit. 11 | 12 | ## REQUIREMENTS 13 | 14 | Biber is written in Perl with the aim of providing a customised and 15 | sophisticated data preparation backend for biblatex. 16 | 17 | You do not need to install Perl to use biber--binaries are provided for many 18 | operating systems via the main TeX distributions (TeXLive, MacTeX, MiKTeX) 19 | and also via download from SourceForge. 20 | 21 | You only need a Perl installation to use biber in one of the following 22 | cases: 23 | 24 | - A binary version is not available for your OS/platform. 25 | - You wish to keep up with all of the bleeding-edge git commits before they are packaged into a binary. 26 | 27 | For the vast majority of users, using the latest binary for the OS/platform 28 | you are using will be what you want to do. For details on the requirements 29 | for installing the Perl program version, please see the biber PDF documentation. 30 | 31 | The git repository for Biber is kept on github: 32 | 33 | [https://github.com/plk/biber](https://github.com/plk/biber) 34 | 35 | ## INSTALLING 36 | 37 | If you wish to install from the source, make sure you have permissions to 38 | install Perl modules, get the source and from the top-level source 39 | directory, do: 40 | 41 | ``` 42 | perl Build.PL 43 | ./Build installdeps 44 | ./Build install 45 | ``` 46 | 47 | biber should now be available in your path, run `biber --version` to verify. 48 | 49 | ## USEFUL ENVIRONMENT VARIABLES 50 | 51 | There are a few environment variables for `biber` which are useful sometimes: 52 | 53 | ### ISBN_RANGE_MESSAGE 54 | 55 | `biber` uses the Perl `Business::ISBN::Data` module to verify ISBNs. This relies 56 | on a data file called `RangeMessage.xml` which comes with the module and which 57 | is packaged with `biber`. This can be updated quite regularly and the packaged 58 | version might be several months old. If you find yourself needing an updated 59 | version of this file (e.g. you have ISBN validation errors when using `biber`s 60 | `--validate-datamodel` option), then you can download a recent version from 61 | here: 62 | [https://www.isbn-international.org/range_file_generation](https://www.isbn-international.org/range_file_generation) 63 | and point to the location with this environment variable. 64 | 65 | ### PAR_GLOBAL_TMPDIR 66 | 67 | When a new version of the binary version of `biber` first runs, it unpacks 68 | itself to location which is OS dependent but usually some sort of temporary 69 | location (which you can see with `biber --cache`). Sometimes, this causes 70 | problems because the OS might clean up files in the default location or you 71 | might not have permissions to unpack `biber` to the default location. You can 72 | use this environment variable to set the location of the unpack cache. 73 | 74 | ## SUPPORT AND DOCUMENTATION 75 | 76 | After installing, `biber --help` will give you the basic documentation. 77 | 78 | The latest PDF documentation can be found here: 79 | 80 | [https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber](https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber) 81 | 82 | More information, bugfix releases, forums and bug tracker are available at: 83 | 84 | [https://github.com/plk/biber](https://github.com/plk/biber) 85 | 86 | ## BUILDING 87 | 88 | If you wish to build you own binary, see the main biber PDF documentation 89 | and particularly the included BUILDERS.README file 90 | The PDF documentation is in the `documentation` folder for the release on 91 | Sourceforge. 92 | 93 | ## LICENCE 94 | 95 | Copyright 2009-2024 François Charette and Philip Kime, all rights reserved. 96 | 97 | This module is free software. You can redistribute it and/or 98 | modify it under the terms of the Artistic License 2.0. 99 | 100 | This program is distributed in the hope that it will be useful, 101 | but without any warranty; without even the implied warranty of 102 | merchantability or fitness for a particular purpose. 103 | -------------------------------------------------------------------------------- /RELEASE: -------------------------------------------------------------------------------- 1 | * If first release in a new year, update copyright and licensing in files 2 | * Change content, if necessary, of README.md 3 | * Change version string in and content of "Changes" file 4 | * Change version strings in doc and update volatile doc info (e.g. compat matrix) 5 | * Update testfiles/* 6 | * Update main html page 7 | * Update "TODO" file 8 | * Change version string and beta flag in "Config.pm" 9 | * Change $BCF_VERSION/$BBL_VERSION in Constants.pm if necessary 10 | * "perl Build.PL" and "Build dist" to update YAML/JSON 11 | * Run test suite and make sure it passes cleanly 12 | * Commit and tag with version number 13 | * Create new github release from tag so that builders can subscribe to know when a 14 | new release is made (no need to attach artefacts, it automatically does this) 15 | * Move "current" to version number on SF 16 | * Create "current" folder using SF GUI 17 | * Create a new empty version tree for new version, use the dist/empty_tree.sh script: 18 | empty_tree.sh current 19 | * Build binaries from release and upload to SF to new version folder using 20 | "current" as release 21 | * Build universal binary for MacOS using ./dist/build-universal.sh current master biber 0 0 1 22 | * scp htdocs/*.html philkime,biblatex-biber@web.sourceforge.net:htdocs/ 23 | * Inform builders of binaries to update 24 | * Associate new defaults with new binaries and change labels 25 | * Update SF main page, news, add new README in web interface at root, if needed 26 | * run dist/re-package.sh which creates the files needed for CTAN release 27 | * upload biber source archive to /biblio/biber/base 28 | * Upload platform binary archives to 29 | biblio/biber/biber-linux 30 | biblio/biber/biber-macos 31 | biblio/biber/biber-windows 32 | -------------------------------------------------------------------------------- /data/gen_latin.pl: -------------------------------------------------------------------------------- 1 | #!/opt/local/bin/perl 2 | use v5.16; 3 | use strict; 4 | use warnings; 5 | 6 | # First get the latest DUCET allkeys.txt and pass it as the first argument 7 | 8 | # Modify the ranges as per the Unicode standard you are using. Currently Unicode 7.0 9 | 10 | # NOT USED ANY MORE - because allkeys.txt in U::C is precompiled ans is faster than using 11 | # an uncompiled latinkeys.txt a tenth of the size anyway. 12 | 13 | my $latin_ranges = [ 14 | ['0000', '007F'], # ASCII 15 | ['0080', '00FF'], # Latin-1 Supplement 16 | ['0100', '017F'], # Latin Extended-A 17 | ['0180', '024F'], # Latin Extended-B 18 | ['0250', '02AF'], # IPA Extensions 19 | ['1D00', '1D7F'], # Phonetic Extensions 20 | ['1D80', '1DBF'], # Phonetic Extensions Supplement 21 | ['1E00', '1EFF'], # Latin Extended Additional 22 | ['2070', '209F'], # Superscripts and Subscripts 23 | ['2100', '214F'], # Letterlike Symbols 24 | ['2460', '24FF'], # Enclosed Alphanumerics 25 | ['2C60', '2C7F'], # Latin Extended-C 26 | ['A720', 'A7FF'], # Latin Extended-D 27 | ['FB00', 'FB4F'], # Latin Ligatures 28 | ['1D400', '1D7FF'], # Mathematical Alphanumeric Symbols 29 | ['1F100', '1F1FF'], # Enclosed Alphanumeric Supplement 30 | ]; 31 | 32 | 33 | while (<>) { 34 | # match header lines 35 | print if m/^$/; 36 | print if m/^[\#\@]/; 37 | # match only single byte lines as no latin chars are double-byte anyway 38 | if (m/^([A-F0-9]+)\s+\;/) { 39 | print if check_range($1); 40 | } 41 | } 42 | 43 | 44 | # Convert to decimal to do the range checks 45 | sub check_range { 46 | my $c = shift; 47 | foreach my $range (@$latin_ranges) { 48 | if (hex($c) >= hex($range->[0]) and 49 | hex($c) <= hex($range->[1])) { 50 | return 1; 51 | } 52 | } 53 | return 0; 54 | } 55 | -------------------------------------------------------------------------------- /data/schemata/texmap.rnc: -------------------------------------------------------------------------------- 1 | start = 2 | element texmap { 3 | element maps { 4 | # CSV list of sets 5 | attribute set { text }, 6 | attribute type { "accents" | "letters" | "diacritics" | "punctuation" | "symbols" | "negatedsymbols" | "superscripts" | "cmdsuperscripts" | "dings" | "greek" }, 7 | map+ 8 | }+, 9 | element encode_exclude { 10 | element char { text }+ 11 | } 12 | } 13 | 14 | 15 | map = element map { 16 | element from { 17 | attribute preferred {"1"}?,# preferred encoding form if more than one 18 | attribute raw {"1"}?,# use the encoding form "as is" in replacement - no extra envs/braces etc. 19 | text 20 | }, 21 | element to { 22 | attribute hex { text }, 23 | text } 24 | } 25 | # Copyright 2012-2025 Philip Kime, all rights reserved. 26 | 27 | # This code is free software. You can redistribute it and/or 28 | # modify it under the terms of the Artistic License 2.0. 29 | 30 | # This program is distributed in the hope that it will be useful, 31 | # but without any warranty; without even the implied warranty of 32 | # merchantability or fitness for a particular purpose. 33 | -------------------------------------------------------------------------------- /dist/MSWIN32/build.bat: -------------------------------------------------------------------------------- 1 | :: The COPY/DEL steps are so that the packed biber main script is not 2 | :: called "biber" as on case-insensitive file systems, this clashes with 3 | :: the Biber lib directory and generates a (harmless) warning on first run. 4 | 5 | :: XML::LibXSLT has a workaround for LibXSLT.dll conflicting with libxslt.dll on 6 | :: windows due to case-insensitivity. The Makefile.PL for XML::LibXSLT forces its 7 | :: .dll to end in ".xs.dll" which avoids the conflict but breaks when packaged with pp. 8 | :: Since strawberry perl includes its own libxslt with a non-default name, it is therefore 9 | :: safe to use the default XML::LibXSLT .dll name which does work when packed with pp. 10 | :: To do this, you have to install your own XML::LibXSLT in strawberry perl: 11 | :: edit the Makefile.PL, line 195 or thereabouts and change it to: 12 | :: 13 | :: $config{DLEXT} = 'dll' if ($is_Win32); 14 | :: 15 | :: then build and install as usual (this seems ok with the included 16 | :: XML::LibXSLT with strawberry perl 5.16 for some reason) 17 | 18 | :: Have to explicitly include the Input* modules as the names of these are dynamically 19 | :: constructed in the code so Par::Packer can't auto-detect them. 20 | :: Same with some of the output modules. 21 | 22 | :: Unicode::Collate is bundled with perl but is often updated and this is a critical module 23 | :: for biber. There are some parts of this module which must be explicitly bundled by pp. 24 | :: Unfortunately, updates to the module go into site_perl and we must bundle the right version 25 | :: and so we check if there are any newer versions than came with the version of perl we are using 26 | :: by looking to see if there is a site_perl directory for the module. If there is, we use that 27 | :: version. 28 | 29 | set UCPATH=C:/strawberry/perl/lib/Unicode/Collate 30 | 31 | IF exist C:\strawberry\perl\site\lib\Unicode\Collate\ (set UCPATH=C:/strawberry/perl/site/lib/Unicode/Collate) 32 | 33 | ECHO USING Unicode::Collate at: %UCPATH% 34 | 35 | COPY C:\strawberry\perl\site\bin\biber %TEMP%\biber-MSWIN32 36 | 37 | SET PAR_VERBATIM=1 38 | 39 | CALL pp ^ 40 | --module=deprecate ^ 41 | --module=Biber::Input::file::bibtex ^ 42 | --module=Biber::Input::file::biblatexml ^ 43 | --module=Biber::Output::dot ^ 44 | --module=Biber::Output::bbl ^ 45 | --module=Biber::Output::bblxml ^ 46 | --module=Biber::Output::bibtex ^ 47 | --module=Biber::Output::biblatexml ^ 48 | --module=Pod::Simple::TranscodeSmart ^ 49 | --module=Pod::Simple::TranscodeDumb ^ 50 | --module=List::MoreUtils::XS ^ 51 | --module=List::SomeUtils::XS ^ 52 | --module=List::MoreUtils::PP ^ 53 | --module=HTTP::Status ^ 54 | --module=HTTP::Date ^ 55 | --module=Encode:: ^ 56 | --module=IO::Socket::SSL ^ 57 | --module=IO::String ^ 58 | --module=PerlIO::utf8_strict ^ 59 | --module=File::Find::Rule ^ 60 | --module=Text::CSV_XS ^ 61 | --module=DateTime ^ 62 | --module=Win32::Unicode ^ 63 | --link=C:\WINDOWS\system32\libbtparse.dll ^ 64 | --link=C:\strawberry\c\bin\libxslt-1_.dll ^ 65 | --link=C:\strawberry\c\bin\libexslt-0_.dll ^ 66 | --link=C:\strawberry\c\bin\zlib1_.dll ^ 67 | --link=C:\strawberry\c\bin\libxml2-2_.dll ^ 68 | --link=C:\strawberry\c\bin\libiconv-2_.dll ^ 69 | --link=C:\strawberry\c\bin\libssl-1_1_.dll ^ 70 | --link=C:\strawberry\c\bin\libcrypto-1_1_.dll ^ 71 | --link=C:\strawberry\c\bin\liblzma-5_.dll ^ 72 | --addfile="../../data/biber-tool.conf;lib/Biber/biber-tool.conf" ^ 73 | --addfile="../../data/schemata/config.rnc;lib/Biber/config.rnc" ^ 74 | --addfile="../../data/schemata/config.rng;lib/Biber/config.rng" ^ 75 | --addfile="../../data/schemata/bcf.rnc;lib/Biber/bcf.rnc" ^ 76 | --addfile="../../data/schemata/bcf.rng;lib/Biber/bcf.rng" ^ 77 | --addfile="../../lib/Biber/LaTeX/recode_data.xml;lib/Biber/LaTeX/recode_data.xml" ^ 78 | --addfile="../../data/bcf.xsl;lib/Biber/bcf.xsl" ^ 79 | --addfile="%UCPATH%/Locale;lib/Unicode/Collate/Locale" ^ 80 | --addfile="%UCPATH%/CJK;lib/Unicode/Collate/CJK" ^ 81 | --addfile="%UCPATH%/allkeys.txt;lib/Unicode/Collate/allkeys.txt" ^ 82 | --addfile="%UCPATH%/keys.txt;lib/Unicode/Collate/keys.txt" ^ 83 | --addfile="C:/strawberry/perl/vendor/lib/Mozilla/CA/cacert.pem;lib/Mozilla/CA/cacert.pem" ^ 84 | --addfile="C:/strawberry/perl/site/lib/Business/ISBN/RangeMessage.xml;lib/Business/ISBN/RangeMessage.xml" ^ 85 | --cachedeps=scancache ^ 86 | --output=biber-MSWIN32.exe ^ 87 | %TEMP%\biber-MSWIN32 88 | 89 | DEL %TEMP%\biber-MSWIN32 90 | -------------------------------------------------------------------------------- /dist/MSWIN64/build.bat: -------------------------------------------------------------------------------- 1 | :: The COPY/DEL steps are so that the packed biber main script is not 2 | :: called "biber" as on case-insensitive file systems, this clashes with 3 | :: the Biber lib directory and generates a (harmless) warning on first run. 4 | 5 | :: XML::LibXSLT has a workaround for LibXSLT.dll conflicting with libxslt.dll on 6 | :: windows due to case-insensitivity. The Makefile.PL for XML::LibXSLT forces its 7 | :: .dll to end in ".xs.dll" which avoids the conflict but breaks when packaged with pp. 8 | :: Since strawberry perl includes its own libxslt with a non-default name, it is therefore 9 | :: safe to use the default XML::LibXSLT .dll name which does work when packed with pp. 10 | :: To do this, you have to install your own XML::LibXSLT in strawberry perl: 11 | :: edit the Makefile.PL, line 195 or thereabouts and change it to: 12 | :: 13 | :: $config{DLEXT} = 'dll' if ($is_Win32); 14 | :: 15 | :: then build and install as usual (this seems ok with the included 16 | :: XML::LibXSLT with strawberry perl 5.16 for some reason) 17 | 18 | :: Have to explicitly include the Input* modules as the names of these are dynamically 19 | :: constructed in the code so Par::Packer can't auto-detect them. 20 | :: Same with some of the output modules. 21 | 22 | :: Unicode::Collate is bundled with perl but is often updated and this is a critical module 23 | :: for biber. There are some parts of this module which must be explicitly bundled by pp. 24 | :: Unfortunately, updates to the module go into site_perl and we must bundle the right version 25 | :: and so we check if there are any newer versions than came with the version of perl we are using 26 | :: by looking to see if there is a site_perl directory for the module. If there is, we use that 27 | :: version. 28 | 29 | set UCPATH=C:/strawberry/perl/lib/Unicode/Collate 30 | 31 | IF exist C:\strawberry\perl\site\lib\Unicode\Collate\ (set UCPATH=C:/strawberry/perl/site/lib/Unicode/Collate) 32 | 33 | ECHO USING Unicode::Collate at: %UCPATH% 34 | 35 | COPY C:\strawberry\perl\site\bin\biber %TEMP%\biber-MSWIN64 36 | 37 | SET PAR_VERBATIM=1 38 | 39 | CALL pp ^ 40 | --module=deprecate ^ 41 | --module=Biber::Input::file::bibtex ^ 42 | --module=Biber::Input::file::biblatexml ^ 43 | --module=Biber::Output::dot ^ 44 | --module=Biber::Output::bbl ^ 45 | --module=Biber::Output::bblxml ^ 46 | --module=Biber::Output::bibtex ^ 47 | --module=Biber::Output::biblatexml ^ 48 | --module=Pod::Simple::TranscodeSmart ^ 49 | --module=Pod::Simple::TranscodeDumb ^ 50 | --module=List::MoreUtils::XS ^ 51 | --module=List::SomeUtils::XS ^ 52 | --module=List::MoreUtils::PP ^ 53 | --module=HTTP::Status ^ 54 | --module=HTTP::Date ^ 55 | --module=Encode:: ^ 56 | --module=IO::Socket::SSL ^ 57 | --module=IO::String ^ 58 | --module=PerlIO::utf8_strict ^ 59 | --module=File::Find::Rule ^ 60 | --module=Text::CSV_XS ^ 61 | --module=DateTime ^ 62 | --module=Win32::Unicode ^ 63 | --link=C:\strawberry\c\bin\libbtparse.dll ^ 64 | --link=C:\strawberry\c\bin\libxslt-1__.dll ^ 65 | --link=C:\strawberry\c\bin\libexslt-0__.dll ^ 66 | --link=C:\strawberry\c\bin\zlib1__.dll ^ 67 | --link=C:\strawberry\c\bin\libxml2-2__.dll ^ 68 | --link=C:\strawberry\c\bin\libiconv-2__.dll ^ 69 | --link=C:\strawberry\c\bin\libssl-1_1-x64__.dll ^ 70 | --link=C:\strawberry\c\bin\libcrypto-1_1-x64__.dll ^ 71 | --link=C:\strawberry\c\bin\liblzma-5__.dll ^ 72 | --addfile="../../data/biber-tool.conf;lib/Biber/biber-tool.conf" ^ 73 | --addfile="../../data/schemata/config.rnc;lib/Biber/config.rnc" ^ 74 | --addfile="../../data/schemata/config.rng;lib/Biber/config.rng" ^ 75 | --addfile="../../data/schemata/bcf.rnc;lib/Biber/bcf.rnc" ^ 76 | --addfile="../../data/schemata/bcf.rng;lib/Biber/bcf.rng" ^ 77 | --addfile="../../lib/Biber/LaTeX/recode_data.xml;lib/Biber/LaTeX/recode_data.xml" ^ 78 | --addfile="../../data/bcf.xsl;lib/Biber/bcf.xsl" ^ 79 | --addfile="%UCPATH%/Locale;lib/Unicode/Collate/Locale" ^ 80 | --addfile="%UCPATH%/CJK;lib/Unicode/Collate/CJK" ^ 81 | --addfile="%UCPATH%/allkeys.txt;lib/Unicode/Collate/allkeys.txt" ^ 82 | --addfile="%UCPATH%/keys.txt;lib/Unicode/Collate/keys.txt" ^ 83 | --addfile="C:/strawberry/perl/vendor/lib/Mozilla/CA/cacert.pem;lib/Mozilla/CA/cacert.pem" ^ 84 | --addfile="C:/strawberry/perl/site/lib/Business/ISBN/RangeMessage.xml;lib/Business/ISBN/RangeMessage.xml" ^ 85 | --cachedeps=scancache ^ 86 | --output=biber-MSWIN64.exe ^ 87 | %TEMP%\biber-MSWIN64 88 | 89 | DEL %TEMP%\biber-MSWIN64 90 | -------------------------------------------------------------------------------- /dist/build-env-local.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This modifies things on the build servers. Things like PAR::Packer etc. versions. 3 | # build-env-local.sh [[osx10.5] [osx10.6] | [osxen]] [[w32] [w64] | [win]] [[l32] [l64] | [linux]] 4 | 5 | me=$(whoami) 6 | if [ "$me" = "root" ]; then 7 | echo "You should be logged on as the vbox user to do this!" 8 | exit 1 9 | fi 10 | 11 | function vmon { 12 | VM=$(pgrep -f -- "-startvm bbf-$1") 13 | if [ ! -z "$VM" ]; then 14 | echo "Biber build farm VM already running with PID: $VM" 15 | else 16 | nohup VBoxHeadless --startvm bbf-$1 & 17 | fi 18 | } 19 | 20 | function vmoff { 21 | VBoxManage controlvm bbf-$1 savestate 22 | } 23 | 24 | # get dir of script 25 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 26 | 27 | # Things to do on each server. In an external file ignored by git 28 | . $DIR/build-env-cmds 29 | 30 | # Build farm OSX 64-bit intel LECAGY (10.5 6 | # 7 | # ./build-universal.sh current master biber 0 0 1 8 | # 9 | # is a SF subdir of /home/frs/project/biblatex-biber/ 10 | # is a git branch to checkout on the build farm servers 11 | # is the name of the biber binary to use for the release. 12 | # is a boolean which says to just build and stop without uploading 13 | # is a boolean which says to delete the scancache 14 | # is a boolean which says to not codesign OSX binary 15 | 16 | BASE=~/extcode/biber 17 | DOCDIR=$BASE/doc 18 | BINDIR=$BASE/dist 19 | XSLDIR=$BASE/data 20 | RELEASE=${1:-"development"} 21 | BRANCH=${2:-"dev"} 22 | BINARYNAME=${3:-"biber"} 23 | JUSTBUILD=${4:-"0"} 24 | DSCANCACHE=${5:-"0"} 25 | CODESIGN=${6:-"1"} 26 | 27 | 28 | # Set scancache deletion if requested 29 | if [ "$DSCANCACHE" = "1" ]; then 30 | echo "Deleting scan caches before builds"; 31 | SCANCACHE="rm -f scancache;" 32 | fi 33 | 34 | cd $BASE 35 | git checkout $BRANCH 36 | git pull 37 | perl ./Build.PL 38 | ./Build installdeps 39 | ./Build install 40 | cd $BINDIR/darwin_arm64 41 | $SCANCACHE./build.sh 42 | ~/bin/pp_osx_codesign_fix biber-darwin_arm64 43 | cd $BASE 44 | ./Build realclean 45 | 46 | cd $BINDIR/darwin_arm64 47 | \rm -rf biber-darwin_arm64.tar.gz 48 | 49 | if [ "$CODESIGN" = "1" ]; then 50 | echo "Signing binary" 51 | security unlock-keychain -p $(10.5 by manipulating macports 8 | # flags and SDKs. It doesn't work. You need a real 10.5 box/VM. 9 | # 10 | # Have to explicitly include the Input* modules as the names of these are dynamically 11 | # constructed in the code so Par::Packer can't auto-detect them. 12 | # Same with some of the output modules. 13 | 14 | # Unicode::Collate is bundled with perl but is often updated and this is a critical module 15 | # for biber. There are some parts of this module which must be explicitly bundled by pp. 16 | # Unfortunately, updates to the module go into site_perl and we must bundle the right version 17 | # and so we check if there are any newer versions than came with the version of perl we are using 18 | # by looking to see if there is a site_perl directory for the module. If there is, we use that 19 | # version. 20 | 21 | declare -r perlv='5.26' 22 | declare ucpath="/opt/local/lib/perl5/${perlv}/Unicode/Collate" 23 | 24 | # Unicode::Collate has a site_perl version so has been updated since this 25 | # perl was released 26 | if [ -d "/opt/local/lib/perl5/site_perl/${perlv}/darwin-thread-multi-2level/Unicode/Collate" ] 27 | then 28 | ucpath="/opt/local/lib/perl5/site_perl/${perlv}/darwin-thread-multi-2level/Unicode/Collate" 29 | fi 30 | 31 | echo "USING Unicode::Collate at: ${ucpath}" 32 | 33 | cp /opt/local/libexec/perl5.26/sitebin/biber /tmp/biber-darwin 34 | 35 | PAR_VERBATIM=1 pp \ 36 | --unicode \ 37 | --module=deprecate \ 38 | --module=Biber::Input::file::bibtex \ 39 | --module=Biber::Input::file::biblatexml \ 40 | --module=Biber::Output::dot \ 41 | --module=Biber::Output::bbl \ 42 | --module=Biber::Output::bblxml \ 43 | --module=Biber::Output::bibtex \ 44 | --module=Biber::Output::biblatexml \ 45 | --module=Pod::Simple::TranscodeSmart \ 46 | --module=Pod::Simple::TranscodeDumb \ 47 | --module=List::MoreUtils::XS \ 48 | --module=List::SomeUtils::XS \ 49 | --module=List::MoreUtils::PP \ 50 | --module=HTTP::Status \ 51 | --module=HTTP::Date \ 52 | --module=Encode:: \ 53 | --module=IO::Socket::SSL \ 54 | --module=IO::String \ 55 | --module=PerlIO::utf8_strict \ 56 | --module=File::Find::Rule \ 57 | --module=Text::CSV_XS \ 58 | --module=DateTime \ 59 | --link=/opt/local/lib/libz.1.dylib \ 60 | --link=/opt/local/lib/libiconv.2.dylib \ 61 | --link=/opt/local/libexec/perl5.26/sitebin/libbtparse.dylib \ 62 | --link=/opt/local/lib/libxml2.2.dylib \ 63 | --link=/opt/local/lib/libxslt.1.dylib \ 64 | --link=/opt/local/lib/libssl.1.0.0.dylib \ 65 | --link=/opt/local/lib/libcrypto.1.0.0.dylib \ 66 | --link=/opt/local/lib/libgdbm.4.dylib \ 67 | --link=/opt/local/lib/libexslt.0.dylib \ 68 | --link=/opt/local/lib/liblzma.5.dylib \ 69 | --link=/opt/local/lib/libintl.8.dylib \ 70 | --addfile="../../data/biber-tool.conf;lib/Biber/biber-tool.conf" \ 71 | --addfile="../../data/schemata/config.rnc;lib/Biber/config.rnc" \ 72 | --addfile="../../data/schemata/config.rng;lib/Biber/config.rng" \ 73 | --addfile="../../data/schemata/bcf.rnc;lib/Biber/bcf.rnc" \ 74 | --addfile="../../data/schemata/bcf.rng;lib/Biber/bcf.rng" \ 75 | --addfile="../../lib/Biber/LaTeX/recode_data.xml;lib/Biber/LaTeX/recode_data.xml" \ 76 | --addfile="../../data/bcf.xsl;lib/Biber/bcf.xsl" \ 77 | --addfile="${ucpath}/Locale;lib/Unicode/Collate/Locale" \ 78 | --addfile="${ucpath}/CJK;lib/Unicode/Collate/CJK;lib/Unicode/Collate/CJK" \ 79 | --addfile="${ucpath}/allkeys.txt;lib/Unicode/Collate/allkeys.txt" \ 80 | --addfile="${ucpath}/keys.txt;lib/Unicode/Collate/keys.txt" \ 81 | --addfile="/opt/local/lib/perl5/site_perl/${perlv}/Mozilla/CA/cacert.pem;lib/Mozilla/CA/cacert.pem" \ 82 | --addfile="/opt/local/lib/perl5/site_perl/${perlv}/Business/ISBN/RangeMessage.xml;lib/Business/ISBN/RangeMessage.xml" \ 83 | --addfile="/opt/local/lib/perl5/site_perl/${perlv}/darwin-thread-multi-2level/auto/Unicode/LineBreak/LineBreak.bundle;lib/auto/Unicode/LineBreak/LineBreak.bundle" \ 84 | --cachedeps=scancache \ 85 | --output=biber-darwin_x86_i386 \ 86 | /tmp/biber-darwin 87 | 88 | \rm -f /tmp/biber-darwin 89 | -------------------------------------------------------------------------------- /dist/re-package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Collect all binaries and re-package for CTAN 4 | # re-package.sh 5 | # 6 | # ./re-package.sh 2.19 current 7 | 8 | declare -r ROOT='/tmp/biber-repack' 9 | 10 | mkdir -p ${ROOT} 11 | cd ${ROOT} 12 | declare VER=$1 13 | declare RELEASE=${2:-"current"} 14 | declare PACKAGEEXT="" 15 | declare PLATFORMS=("linux_x86_32" "linux_x86_64" "MSWIN64" "MSWIN32" "darwinlegacy_x86_64" "darwin_universal") 16 | declare METAPLATFORMS=("linux" "linux" "windows" "windows" "macos" "macos") 17 | declare SFPLATFORMS=("Linux" "Linux" "Windows" "Windows" "MacOS" "MacOS") 18 | declare EXTS=("tar.gz" "tar.gz" "zip" "zip" "tar.gz" "tar.gz") 19 | 20 | if [ -z "$VER" ]; then 21 | echo "Must provide a version e.g. 're-package.sh 2.19'" 22 | exit 1 23 | fi 24 | 25 | function create-readme { 26 | cat <$2 27 | These are biber binaries for the $1 platform(s), released under: 28 | Perl Artistic License, version 2 29 | 30 | See https://ctan.org/pkg/biber for documentation, sources, and all else. 31 | EOF 32 | } 33 | 34 | # Binaries 35 | for i in "${!PLATFORMS[@]}"; do 36 | PLATFORM=${PLATFORMS[i]} 37 | METAPLATFORM=${METAPLATFORMS[i]} 38 | # CTAN requires top-level dir in lowercase 39 | SFPLATFORM=${SFPLATFORMS[i]} 40 | EXT=${EXTS[i]} 41 | if [ ! -e biber$PACKAGEEXT-$METAPLATFORM/biber$PACKAGEEXT-$VER-$PLATFORM.$EXT ]; then 42 | echo -n "Retrieving $PLATFORM ... " 43 | mkdir biber$PACKAGEEXT-$METAPLATFORM 2>/dev/null 44 | /opt/homebrew/bin/wget --content-disposition --level=0 -c https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/$RELEASE/binaries/$SFPLATFORM/biber$PACKAGEEXT-$PLATFORM.$EXT -O biber$PACKAGEEXT-$METAPLATFORM/biber$PACKAGEEXT-$VER-$PLATFORM.$EXT >/dev/null 2>&1 45 | [ $? -eq 0 ] || exit 1 46 | create-readme $METAPLATFORM biber$PACKAGEEXT-$METAPLATFORM/README 47 | echo "done" 48 | fi 49 | done 50 | 51 | SMETAPLATFORMS=($(printf "%s\n" "${METAPLATFORMS[@]}" | sort -u)) 52 | for i in "${!SMETAPLATFORMS[@]}"; do 53 | SMETAPLATFORM=${SMETAPLATFORMS[i]} 54 | echo -n "Packaging $SMETAPLATFORM ... " 55 | tar zcf biber$PACKAGEEXT-$SMETAPLATFORM.tgz biber$PACKAGEEXT-$SMETAPLATFORM 56 | \rm -rf biber$PACKAGEEXT-$SMETAPLATFORM 57 | echo "done" 58 | done 59 | 60 | # base 61 | if [ ! -e biber$PACKAGEEXT-base.tgz ]; then 62 | echo -n "Packaging base ... " 63 | mkdir biber$PACKAGEEXT 2>/dev/null 64 | cd biber$PACKAGEEXT 65 | mkdir source 66 | mkdir documentation 67 | /opt/homebrew/bin/wget --content-disposition --level=0 -c https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/$RELEASE/biblatex-biber.tar.gz -O source/biblatex-biber$PACKAGEEXT.tar.gz >/dev/null 2>&1 68 | [ $? -eq 0 ] || exit 1 69 | /opt/homebrew/bin/wget --content-disposition --level=0 -c https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/$RELEASE/documentation/biber.pdf -O documentation/biber$PACKAGEEXT.pdf >/dev/null 2>&1 70 | [ $? -eq 0 ] || exit 1 71 | /opt/homebrew/bin/wget --content-disposition --level=0 -c https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/$RELEASE/Changes -O documentation/Changes >/dev/null 2>&1 72 | [ $? -eq 0 ] || exit 1 73 | /opt/homebrew/bin/wget --content-disposition --level=0 -c https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/$RELEASE/documentation/utf8-macro-map.html -O documentation/utf8-macro-map.html >/dev/null 2>&1 74 | [ $? -eq 0 ] || exit 1 75 | /opt/homebrew/bin/wget --content-disposition --level=0 -c https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/README.md -O README.md >/dev/null 2>&1 76 | cd .. 77 | tar zcf biber$PACKAGEEXT-base.tgz biber$PACKAGEEXT 78 | \rm -rf biber$PACKAGEEXT 79 | echo "done" 80 | fi 81 | -------------------------------------------------------------------------------- /dist/solaris_x86_64/biber.files: -------------------------------------------------------------------------------- 1 | ../biber/data/biber-tool.conf;lib/Biber/biber-tool.conf 2 | ../biber/data/schemata/config.rnc;lib/Biber/config.rnc 3 | ../biber/data/schemata/config.rng;lib/Biber/config.rng 4 | ../biber/data/schemata/bcf.rnc;lib/Biber/bcf.rnc 5 | ../biber/data/schemata/bcf.rng;lib/Biber/bcf.rng 6 | ../biber/lib/Biber/LaTeX/recode_data.xml;lib/Biber/LaTeX/recode_data.xml 7 | ../biber/data/bcf.xsl;lib/Biber/bcf.xsl 8 | ../biber/data/latinkeys.txt;lib/Unicode/Collate/latinkeys.txt 9 | /usr/perl5/5.24/lib/site_perl/5.24/i86pc-solaris-thread-multi-64/Unicode/Collate/Locale;lib/Unicode/Collate/Locale 10 | /usr/perl5/5.24/lib/site_perl/5.24/i86pc-solaris-thread-multi-64/Unicode/Collate/CJK;lib/Unicode/Collate/CJK 11 | /usr/perl5/5.24/lib/site_perl/5.24/i86pc-solaris-thread-multi-64/Unicode/Collate/allkeys.txt;lib/Unicode/Collate/allkeys.txt 12 | /usr/perl5/5.24/lib/site_perl/5.24/i86pc-solaris-thread-multi-64/Unicode/Collate/keys.txt;lib/Unicode/Collate/keys.txt 13 | /usr/perl5/5.24/lib/site_perl/5.24/Mozilla/CA/cacert.pem;lib/Mozilla/CA/cacert.pem 14 | /usr/perl5/5.24/lib/5.24/i86pc-solaris-thread-multi-64/PerlIO;lib/PerlIO 15 | /usr/perl5/5.24/lib/5.24/i86pc-solaris-thread-multi-64/auto/PerlIO;lib/auto/PerlIO 16 | /usr/perl5/5.24/lib/site_perl/5.24/Business/ISBN/RangeMessage.xml;lib/Business/ISBN/RangeMessage.xml 17 | -------------------------------------------------------------------------------- /dist/solaris_x86_64/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Have to explicitly include the Input* modules as the names of these are dynamically 4 | # constructed in the code so Par::Packer can't auto-detect them. 5 | # Same with some of the output modules. 6 | 7 | PAR_VERBATIM=1 /usr/perl5/5.24/bin/pp \ 8 | --unicode \ 9 | --module=deprecate \ 10 | --module=Biber::Input::file::bibtex \ 11 | --module=Biber::Input::file::biblatexml \ 12 | --module=Biber::Output::dot \ 13 | --module=Biber::Output::bbl \ 14 | --module=Biber::Output::bblxml \ 15 | --module=Biber::Output::bibtex \ 16 | --module=Biber::Output::biblatexml \ 17 | --module=Pod::Simple::TranscodeSmart \ 18 | --module=Pod::Simple::TranscodeDumb \ 19 | --module=List::MoreUtils::XS \ 20 | --module=List::SomeUtils::XS \ 21 | --module=List::MoreUtils::PP \ 22 | --module=HTTP::Status \ 23 | --module=HTTP::Date \ 24 | --module=Encode:: \ 25 | --module=File::Find::Rule \ 26 | --module=IO::Socket::SSL \ 27 | --module=IO::String \ 28 | --module=PerlIO::utf8_strict \ 29 | --module=Text::CSV_XS \ 30 | --module=DateTime \ 31 | --link=/usr/perl5/5.24/lib/libbtparse.so \ 32 | --link=/usr/lib/amd64/libxml2.so.2 \ 33 | --link=/usr/lib/amd64/libz.so.1 \ 34 | --link=/usr/lib/amd64/libxslt.so.1 \ 35 | --link=/usr/lib/amd64/libexslt.so.0 \ 36 | --link=/usr/lib/amd64/libssl.so.0.9.8 \ 37 | --link=/usr/lib/amd64/libcrypto.so.0.9.8 \ 38 | --addlist=biber.files \ 39 | --cachedeps=scancache \ 40 | --output=biber-solaris_x86_64 \ 41 | /usr/perl5/5.24/bin/biber 42 | -------------------------------------------------------------------------------- /dist/xsl-transform.pl: -------------------------------------------------------------------------------- 1 | #!/opt/local/bin/perl 2 | 3 | use XML::LibXML; 4 | use XML::LibXSLT; 5 | use Carp; 6 | 7 | my $xslt = XML::LibXSLT->new(); 8 | 9 | my $xml = $ARGV[0]; 10 | my $xsl = $ARGV[1]; 11 | 12 | croak "No XML file given" unless $xml; 13 | croak "No XSL file given" unless $xsl; 14 | 15 | croak "Can't find XML file" unless -e $xml; 16 | croak "Can't find XSL file" unless -e $xsl; 17 | 18 | my $style = XML::LibXML->load_xml( location => $xsl, no_cdata=>1 ); 19 | my $data = XML::LibXML->load_xml(location => $xml); 20 | my $stylesheet = $xslt->parse_stylesheet($style); 21 | my $out = $stylesheet->transform($data); 22 | $stylesheet->output_file($out, $xml . '.html'); 23 | 24 | -------------------------------------------------------------------------------- /etc/TUG-10-2019.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plk/biber/5a08af00293def408a373b25fcc3a0d8e7c2b441/etc/TUG-10-2019.pdf -------------------------------------------------------------------------------- /etc/btparse.notes: -------------------------------------------------------------------------------- 1 | To regenerate grammar using old PCCTS, get version 1.33 from here: 2 | 3 | http://www.polhode.com/pccts133mr.zip 4 | 5 | and compile by adding this to makefile: 6 | 7 | COPT=-DPCCTS_USE_STDARG 8 | 9 | -------------------------------------------------------------------------------- /etc/parser.dlg: -------------------------------------------------------------------------------- 1 | << 2 | /* parser.dlg -- DLG Description of scanner 3 | * 4 | * Generated from: bibtex.g 5 | * 6 | * Terence Parr, Will Cohen, and Hank Dietz: 1989-1994 7 | * Purdue University Electrical Engineering 8 | * With AHPCRC, University of Minnesota 9 | * ANTLR Version 1.33 10 | */ 11 | 12 | #include 13 | #define ANTLR_VERSION 133 14 | 15 | #define ZZCOL 16 | #define USER_ZZSYN 17 | 18 | #include "config.h" 19 | #include "btparse.h" 20 | #include "attrib.h" 21 | #include "lex_auxiliary.h" 22 | #include "error.h" 23 | #include "my_dmalloc.h" 24 | 25 | extern char * InputFilename; /* for zzcr_ast call in pccts/ast.c */ 26 | #include "antlr.h" 27 | #include "ast.h" 28 | #include "tokens.h" 29 | #include "dlgdef.h" 30 | LOOKAHEAD 31 | void zzerraction() 32 | { 33 | (*zzerr)("invalid token"); 34 | zzadvance(); 35 | zzskip(); 36 | } 37 | >> 38 | 39 | 40 | %%START 41 | 42 | @ 43 | << 44 | NLA = 1; 45 | >> 46 | 47 | \@ 48 | << 49 | NLA = AT; 50 | at_sign (); 51 | >> 52 | 53 | \n 54 | << 55 | NLA = 3; 56 | newline (); 57 | >> 58 | 59 | \%~[\n]*\n 60 | << 61 | NLA = COMMENT; 62 | comment (); 63 | >> 64 | 65 | [\ \r\t]+ 66 | << 67 | NLA = 5; 68 | zzskip (); 69 | >> 70 | 71 | ~[\@\n\ \r\t]+ 72 | << 73 | NLA = 6; 74 | toplevel_junk (); 75 | >> 76 | 77 | 78 | %%LEX_ENTRY 79 | 80 | @ 81 | << 82 | NLA = 1; 83 | >> 84 | 85 | \n 86 | << 87 | NLA = 7; 88 | newline (); 89 | >> 90 | 91 | \%~[\n]*\n 92 | << 93 | NLA = COMMENT; 94 | comment (); 95 | >> 96 | 97 | [\ \r\t]+ 98 | << 99 | NLA = 8; 100 | zzskip (); 101 | >> 102 | 103 | [0-9]+ 104 | << 105 | NLA = NUMBER; 106 | >> 107 | 108 | [a-z0-9\!\$\&\*\+\-\.\/\:\;\<\>\?\[\]\^\_\`\|]+ 109 | << 110 | NLA = NAME; 111 | name (); 112 | >> 113 | 114 | \{ 115 | << 116 | NLA = LBRACE; 117 | lbrace (); 118 | >> 119 | 120 | \} 121 | << 122 | NLA = RBRACE; 123 | rbrace (); 124 | >> 125 | 126 | \( 127 | << 128 | NLA = ENTRY_OPEN; 129 | lparen (); 130 | >> 131 | 132 | \) 133 | << 134 | NLA = ENTRY_CLOSE; 135 | rparen (); 136 | >> 137 | 138 | = 139 | << 140 | NLA = EQUALS; 141 | >> 142 | 143 | \# 144 | << 145 | NLA = HASH; 146 | >> 147 | 148 | , 149 | << 150 | NLA = COMMA; 151 | >> 152 | 153 | \" 154 | << 155 | NLA = 18; 156 | start_string ('"'); 157 | >> 158 | 159 | 160 | %%LEX_STRING 161 | 162 | @ 163 | << 164 | NLA = 1; 165 | >> 166 | 167 | \n~[\n\{\}\(\)\"\\]* 168 | << 169 | NLA = 19; 170 | check_runaway_string (); 171 | >> 172 | 173 | [\r\t] 174 | << 175 | NLA = 20; 176 | zzreplchar (' '); zzmore (); 177 | >> 178 | 179 | \{ 180 | << 181 | NLA = 21; 182 | open_brace (); 183 | >> 184 | 185 | \} 186 | << 187 | NLA = 22; 188 | close_brace (); 189 | >> 190 | 191 | \( 192 | << 193 | NLA = 23; 194 | lparen_in_string (); 195 | >> 196 | 197 | \) 198 | << 199 | NLA = 24; 200 | rparen_in_string (); 201 | >> 202 | 203 | \" 204 | << 205 | NLA = STRING; 206 | quote_in_string (); 207 | >> 208 | 209 | ~[\n\{\}\(\)\"]+ 210 | << 211 | NLA = 26; 212 | zzmore (); 213 | >> 214 | 215 | %% 216 | -------------------------------------------------------------------------------- /etc/test.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \usepackage{fontspec} 3 | \usepackage{biblatex} 4 | \addbibresource{definitions.bib} 5 | \addbibresource{papers.bib} 6 | \begin{document} 7 | \nocite{*} 8 | \printbibliography 9 | \end{document} 10 | -------------------------------------------------------------------------------- /etc/tugtest.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \usepackage{fontspec} 3 | \usepackage{biblatex} 4 | \addbibresource{tugboat.bib} 5 | \begin{document} 6 | \nocite{*} 7 | \printbibliography 8 | \end{document} 9 | -------------------------------------------------------------------------------- /htdocs/biber.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: auto; 3 | width: 720px; 4 | background-color:#DBB692; 5 | background-image: url(castor.png); 6 | background-position: top center; 7 | background-repeat: no-repeat; 8 | font-family: verdana, helvetica, arial, sans-serif; 9 | font-size: 12pt; 10 | color: black; 11 | margin-top: 0px; padding-top: 310px; 12 | padding-bottom: 3em; 13 | } 14 | a { text-decoration:none; border-bottom: 1px dotted #E5E5E5; } 15 | a:link, a:visited { color: #A52A2A; } 16 | a:hover { text-decoration: none; border-bottom: 1px dotted transparent; } 17 | p, address { 18 | margin-bottom: 0em; 19 | margin-top: .5em; 20 | } 21 | address { 22 | margin-top: 2em; 23 | font-size: 8pt; 24 | } 25 | p#sflogo { margin-top: 2em; } 26 | td#contact { width: 430px; } 27 | 28 | 29 | 30 | div { width: 600px; } 31 | div.menu { 32 | width: 600px; 33 | background-color: #7B2900; 34 | font-size: 10pt; 35 | line-height: 2em; 36 | margin: 0px; 37 | padding: 0px; 38 | } 39 | div.menu p { 40 | margin: 0px; 41 | padding: 0px; 42 | margin-left: 20px; 43 | padding-top: 2px; 44 | padding-bottom: 1px; 45 | } 46 | div.menu a, div.menu a:link, div.menu a:visited { 47 | padding-right: 2em; 48 | text-decoration: none; 49 | font-weight: normal; 50 | color: #BFBFBF; 51 | border: 1px solid transparent; 52 | } 53 | div.menu a#current { border: 1px solid transparent; } 54 | div.menu a:hover { border: 1px solid #BFBFBF; } 55 | div.menu a:hover#current { border: 1px solid transparent; } 56 | 57 | pre { 58 | margin: 0px; 59 | padding: 0px; 60 | margin-top: 2em; 61 | font-size: 10pt; 62 | padding: .5em; 63 | border: 1px dashed #DBB692; 64 | background-color: #ffffff; 65 | line-height: 1em; 66 | width: 700px; 67 | } 68 | pre.small { font-size: 8pt } 69 | 70 | div.biber-output p a { color: black; text-decoration: none; } 71 | div.biber-output p a:hover { text-decoration: underline; } 72 | p#biber-reference { font-size: 8pt; text-align: right; } 73 | -------------------------------------------------------------------------------- /htdocs/castor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plk/biber/5a08af00293def408a373b25fcc3a0d8e7c2b441/htdocs/castor.png -------------------------------------------------------------------------------- /lib/Biber/DataLists.pm: -------------------------------------------------------------------------------- 1 | package Biber::DataLists; 2 | use v5.24; 3 | use strict; 4 | use warnings; 5 | 6 | =encoding utf-8 7 | 8 | =head1 NAME 9 | 10 | Biber::DataLists - Biber::DataLists objects 11 | 12 | =head2 new 13 | 14 | Initialize a Biber::DataLists object 15 | 16 | =cut 17 | 18 | sub new { 19 | my ($class) = @_; 20 | my $self = bless {}, $class; 21 | return $self; 22 | } 23 | 24 | =head2 add_list 25 | 26 | Adds a section list to this section 27 | 28 | =cut 29 | 30 | sub add_list { 31 | my $self = shift; 32 | my $list = shift; 33 | push $self->{lists}->@*, $list; 34 | return; 35 | } 36 | 37 | =head2 get_lists 38 | 39 | Returns an array ref of all sort lists 40 | 41 | =cut 42 | 43 | sub get_lists { 44 | my $self = shift; 45 | return $self->{lists}; 46 | } 47 | 48 | =head2 get_lists_for_section 49 | 50 | Returns an array ref of all sort lists for a given section 51 | Using numeric equals as section identifiers are numbers 52 | 53 | =cut 54 | 55 | sub get_lists_for_section { 56 | my $self = shift; 57 | my $section = shift; 58 | my $lists = []; 59 | my $glist; 60 | foreach my $list ($self->{lists}->@*) { 61 | if ($list->get_section == $section) { 62 | push $lists->@*, $list; 63 | } 64 | } 65 | return $lists; 66 | } 67 | 68 | =head2 get_lists_by_attrs 69 | 70 | Returns an array ref of data lists with certain 71 | attributes 72 | 73 | =cut 74 | 75 | sub get_lists_by_attrs { 76 | my ($self, %attrs) = @_; 77 | my $lists; 78 | LIST: foreach my $list ($self->{lists}->@*) { 79 | foreach my $attr (keys %attrs) { 80 | my $method = "get_$attr"; 81 | unless ($attrs{$attr} eq $list->$method) { 82 | next LIST; 83 | } 84 | } 85 | push $lists->@*, $list; 86 | } 87 | return $lists; 88 | } 89 | 90 | =head2 get_list 91 | 92 | Returns a specific list by list metadata 93 | 94 | =cut 95 | 96 | sub get_list { 97 | my ($self, $name, $section, $type) = @_; 98 | foreach my $list ($self->{lists}->@*) { 99 | next if (defined($section) and ($list->get_section ne $section)); 100 | next if ($type and ($list->get_type ne $type)); 101 | return $list if $list->get_name eq $name; 102 | } 103 | return undef; 104 | } 105 | 106 | =head2 has_lists_of_type_for_section 107 | 108 | Returns boolean saying whether there is a sort list for a section of a 109 | specified type 110 | 111 | =cut 112 | 113 | sub has_lists_of_type_for_section { 114 | my ($self, $section, $type) = @_; 115 | foreach my $list ($self->{lists}->@*) { 116 | if ($list->get_type eq $type and 117 | $list->get_section == $section) { 118 | return 1; 119 | } 120 | } 121 | return 0; 122 | } 123 | 124 | 125 | 1; 126 | 127 | __END__ 128 | 129 | =head1 AUTHORS 130 | 131 | Philip Kime C<< >> 132 | 133 | =head1 BUGS 134 | 135 | Please report any bugs or feature requests on our Github tracker at 136 | L. 137 | 138 | =head1 COPYRIGHT & LICENSE 139 | 140 | Copyright 2012-2025 Philip Kime, all rights reserved. 141 | 142 | This module is free software. You can redistribute it and/or 143 | modify it under the terms of the Artistic License 2.0. 144 | 145 | This program is distributed in the hope that it will be useful, 146 | but without any warranty; without even the implied warranty of 147 | merchantability or fitness for a particular purpose. 148 | 149 | =cut 150 | -------------------------------------------------------------------------------- /lib/Biber/Entries.pm: -------------------------------------------------------------------------------- 1 | package Biber::Entries; 2 | use v5.24; 3 | use strict; 4 | use warnings; 5 | 6 | =encoding utf-8 7 | 8 | =head1 NAME 9 | 10 | Biber::Entries - Biber::Entries objects 11 | 12 | =head2 new 13 | 14 | Initialize a Biber::Entries object 15 | 16 | =cut 17 | 18 | sub new { 19 | my ($class) = @_; 20 | my $self = bless {}, $class; 21 | return $self; 22 | } 23 | 24 | =head2 notnull 25 | 26 | Test for an empty object 27 | 28 | =cut 29 | 30 | sub notnull { 31 | my $self = shift; 32 | my @arr = keys $self->%*; 33 | return $#arr > -1 ? 1 : 0; 34 | } 35 | 36 | =head2 entry_exists 37 | 38 | Boolean values sub to tell if there is an entry 39 | for the passed citation key. 40 | 41 | =cut 42 | 43 | sub entry_exists { 44 | my ($self, $citekey) = @_; 45 | return defined($self->{$citekey}) ? 1 : 0; 46 | } 47 | 48 | =head2 entry 49 | 50 | Returns a Biber::Entry object for a given 51 | citekey 52 | 53 | =cut 54 | 55 | sub entry { 56 | my ($self, $citekey) = @_; 57 | return $self->{$citekey}; 58 | } 59 | 60 | =head2 entries 61 | 62 | Returns an array of all Biber::Entry objects 63 | 64 | =cut 65 | 66 | sub entries { 67 | my $self = shift; 68 | return values $self->%*; 69 | } 70 | 71 | 72 | =head2 del_entries 73 | 74 | Deletes all Biber::Entry objects 75 | 76 | =cut 77 | 78 | sub del_entries { 79 | my $self = shift; 80 | foreach my $e (keys $self->%*) { 81 | delete($self->{$e}); 82 | } 83 | return; 84 | } 85 | 86 | 87 | =head2 add_entry 88 | 89 | Adds a Biber::Entry to the Biber::Entries object 90 | 91 | =cut 92 | 93 | sub add_entry { 94 | my $self = shift; 95 | my ($key, $entry) = @_; 96 | $self->{$key} = $entry; 97 | return; 98 | } 99 | 100 | 101 | =head2 del_entry 102 | 103 | Deletes a Biber::Entry object for a given 104 | citekey. Only used in tests in order to reset 105 | data before regeneration with different options. 106 | 107 | =cut 108 | 109 | sub del_entry { 110 | my ($self, $citekey) = @_; 111 | delete($self->{$citekey}); 112 | return; 113 | } 114 | 115 | 116 | 1; 117 | 118 | __END__ 119 | 120 | =head1 AUTHORS 121 | 122 | Philip Kime C<< >> 123 | 124 | =head1 BUGS 125 | 126 | Please report any bugs or feature requests on our Github tracker at 127 | L. 128 | 129 | =head1 COPYRIGHT & LICENSE 130 | 131 | Copyright 2009-2012 François Charette and Philip Kime, all rights reserved. 132 | Copyright 2012-2025 Philip Kime, all rights reserved. 133 | 134 | This module is free software. You can redistribute it and/or 135 | modify it under the terms of the Artistic License 2.0. 136 | 137 | This program is distributed in the hope that it will be useful, 138 | but without any warranty; without even the implied warranty of 139 | merchantability or fitness for a particular purpose. 140 | 141 | =cut 142 | -------------------------------------------------------------------------------- /lib/Biber/LangTag.pm: -------------------------------------------------------------------------------- 1 | package Biber::LangTag; 2 | use v5.24; 3 | use strict; 4 | use warnings; 5 | use parent qw(Class::Accessor); 6 | __PACKAGE__->follow_best_practice; 7 | 8 | use List::AllUtils qw( first ); 9 | 10 | my %bcp47parts = ('language' => 'single', 11 | 'extlang' => 'multiple', 12 | 'script' => 'single', 13 | 'region' => 'single', 14 | 'variant' => 'multiple', 15 | 'extension' => 'multiple', 16 | 'privateuse' => 'multiple', 17 | 'grandfathered' => 'single'); 18 | 19 | 20 | # Names of simple package accessor attributes for those not created automatically 21 | # by the option scope in the .bcf 22 | __PACKAGE__->mk_accessors(keys %bcp47parts); 23 | 24 | =encoding utf-8 25 | 26 | =head1 NAME 27 | 28 | Biber::LangTag - Biber::LangTag objects 29 | 30 | =head2 new 31 | 32 | Object to manipulate BCP47 language tags 33 | 34 | =cut 35 | 36 | sub new { 37 | my ($class, $parts) = @_; 38 | my $self = bless $parts, $class; 39 | 40 | return $self; 41 | } 42 | 43 | =head2 dump 44 | 45 | Dump the non-null LangTag object parts 46 | 47 | =cut 48 | 49 | sub dump { 50 | my $self = shift; 51 | my $parts = {}; 52 | foreach my $part (keys %bcp47parts) { 53 | $parts->{$part} = $self->{$part} if defined($self->{$part}); 54 | } 55 | return $parts; 56 | } 57 | 58 | 1; 59 | 60 | __END__ 61 | 62 | =head1 AUTHORS 63 | 64 | Philip Kime C<< >> 65 | 66 | =head1 BUGS 67 | 68 | Please report any bugs or feature requests on our Github tracker at 69 | L. 70 | 71 | =head1 COPYRIGHT & LICENSE 72 | 73 | Copyright 2012-2025 Philip Kime, all rights reserved. 74 | 75 | This module is free software. You can redistribute it and/or 76 | modify it under the terms of the Artistic License 2.0. 77 | 78 | This program is distributed in the hope that it will be useful, 79 | but without any warranty; without even the implied warranty of 80 | merchantability or fitness for a particular purpose. 81 | 82 | =cut 83 | -------------------------------------------------------------------------------- /lib/Biber/Sections.pm: -------------------------------------------------------------------------------- 1 | package Biber::Sections; 2 | use v5.24; 3 | use strict; 4 | use warnings; 5 | 6 | =encoding utf-8 7 | 8 | =head1 NAME 9 | 10 | Biber::Sections - Biber::Sections objects 11 | 12 | =head2 new 13 | 14 | Initialize a Biber::Sections object 15 | 16 | =cut 17 | 18 | sub new { 19 | my ($class) = @_; 20 | my $self = bless {}, $class; 21 | return $self; 22 | } 23 | 24 | =head2 get_num_sections 25 | 26 | Gets the number of Biber::Section objects 27 | 28 | =cut 29 | 30 | sub get_num_sections { 31 | my $self = shift; 32 | my @keys = keys $self->%*; 33 | return $#keys + 1; 34 | } 35 | 36 | 37 | =head2 get_section 38 | 39 | Gets a Biber::Section by number from the Biber::Sections object 40 | 41 | =cut 42 | 43 | sub get_section { 44 | my $self = shift; 45 | my $number = shift; 46 | return $self->{$number}; 47 | } 48 | 49 | =head2 get_sections 50 | 51 | Gets an sorted array ref of all Biber::Section objects 52 | 53 | =cut 54 | 55 | sub get_sections { 56 | my $self = shift; 57 | return [ sort {$a->number <=> $b->number} values $self->%* ]; 58 | } 59 | 60 | 61 | =head2 add_section 62 | 63 | Adds a Biber::Section to the Biber::Sections object 64 | 65 | =cut 66 | 67 | sub add_section { 68 | my $self = shift; 69 | my $section = shift; 70 | my $number = $section->number; 71 | $self->{$number} = $section; 72 | return; 73 | } 74 | 75 | =head2 delete_section 76 | 77 | Deletes a section 78 | Mainly used in test scripts 79 | 80 | =cut 81 | 82 | sub delete_section { 83 | my $self = shift; 84 | my $section = shift; 85 | my $number = $section->number; 86 | delete $self->{$number}; 87 | return; 88 | } 89 | 90 | 1; 91 | 92 | __END__ 93 | 94 | =head1 AUTHORS 95 | 96 | Philip Kime C<< >> 97 | 98 | =head1 BUGS 99 | 100 | Please report any bugs or feature requests on our Github tracker at 101 | L. 102 | 103 | =head1 COPYRIGHT & LICENSE 104 | 105 | Copyright 2009-2012 François Charette and Philip Kime, all rights reserved. 106 | Copyright 2012-2025 Philip Kime, all rights reserved. 107 | 108 | This module is free software. You can redistribute it and/or 109 | modify it under the terms of the Artistic License 2.0. 110 | 111 | This program is distributed in the hope that it will be useful, 112 | but without any warranty; without even the implied warranty of 113 | merchantability or fitness for a particular purpose. 114 | 115 | =cut 116 | -------------------------------------------------------------------------------- /lib/Biber/UCollate.pm: -------------------------------------------------------------------------------- 1 | package Biber::UCollate; 2 | use v5.24; 3 | 4 | use strict; 5 | use Carp; 6 | use Data::Dump; 7 | use parent qw(Unicode::Collate::Locale); 8 | 9 | my $logger = Log::Log4perl::get_logger('main'); 10 | 11 | =encoding utf-8 12 | 13 | =head1 NAME 14 | 15 | Biber::UCollate - Biber::UCollate objects 16 | 17 | =head2 new 18 | 19 | Instantiate new Unicode::Collate::Locale object with some extra reporting checks. 20 | We need this also so that we can chain some things during sorting object construction. 21 | Without an object, we would need to call a regular subroutine but due to the special 22 | semantics of Schwartzian transforms, we need to chain all sorting elements so that they return 23 | a boolean value (see Biber.pm). This is much tidier with Foo->new()->change()->cmp than 24 | with something messy like "my $uc = create_uc_object; $uc->change()->cmp()" etc. 25 | 26 | =cut 27 | 28 | sub new { 29 | my $class = shift; 30 | my ($thislocale, %collopts) = @_; 31 | 32 | # Add tailoring locale for Unicode::Collate 33 | # Ignore table as this is not valid for U::C::Locale objects 34 | if ($thislocale and not $collopts{locale}) { 35 | $collopts{locale} = $thislocale; 36 | if ($collopts{table}) { 37 | my $t = delete $collopts{table}; 38 | $logger->info("Ignoring collation table '$t' as locale is set ($thislocale)"); 39 | } 40 | } 41 | 42 | # Remove locale from options as we need this to make the object 43 | my $coll_locale = delete $collopts{locale}; 44 | 45 | # Now create the collator object 46 | my $Collator = $class->SUPER::new(locale => $coll_locale) 47 | or $logger->logcarp("Problem creating Unicode::Collate::Locale object: $@"); 48 | 49 | # Fix the old "alternate" alias otherwise we have problems as U::C->change() always 50 | # returns the new "variable" option and we get confused. 51 | if (my $alt = delete $collopts{alternate}) { 52 | $collopts{variable} = $alt; 53 | } 54 | 55 | # Show the collation options when debugging 56 | if ($logger->is_debug()) {# performance tune 57 | $logger->debug('Collation options: ' . Data::Dump::pp(%collopts)); 58 | } 59 | 60 | # Tailor the collation object and report differences from defaults for locale 61 | # Have to do this in ->change method as ->new can croak with conflicting tailoring 62 | # for locales which enforce certain tailorings 63 | my %coll_changed = $Collator->change( %collopts ); 64 | while (my ($k, $v) = each %coll_changed) { 65 | # If we are changing something that has no override tailoring in the locale, it 66 | # is undef in this hash and we don't care about such things 67 | next unless defined($coll_changed{$k}); 68 | if ($coll_changed{$k} ne $collopts{$k}) { 69 | $logger->info("Overriding locale '$coll_locale' defaults '$k = $v' with '$k = " . $collopts{$k} . "'"); 70 | } 71 | } 72 | 73 | return $Collator; 74 | } 75 | 76 | 1; 77 | 78 | __END__ 79 | 80 | =head1 AUTHORS 81 | 82 | Philip Kime C<< >> 83 | 84 | =head1 BUGS 85 | 86 | Please report any bugs or feature requests on our Github tracker at 87 | L. 88 | 89 | =head1 COPYRIGHT & LICENSE 90 | 91 | Copyright 2012-2025 Philip Kime, all rights reserved. 92 | 93 | This module is free software. You can redistribute it and/or 94 | modify it under the terms of the Artistic License 2.0. 95 | 96 | This program is distributed in the hope that it will be useful, 97 | but without any warranty; without even the implied warranty of 98 | merchantability or fitness for a particular purpose. 99 | 100 | =cut 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /t/bcfvalidation.t: -------------------------------------------------------------------------------- 1 | # -*- cperl -*- 2 | use strict; 3 | use warnings; 4 | use utf8; 5 | no warnings 'utf8'; 6 | 7 | use Test::More tests => 53; 8 | use XML::LibXML; 9 | use Biber; 10 | chdir('t'); 11 | 12 | # Validate all .bcfs used in tests 13 | 14 | # Set up schema 15 | my $CFxmlschema = XML::LibXML::RelaxNG->new(location => '../data/schemata/bcf.rng'); 16 | 17 | foreach my $bcf () { 18 | # Set up XML parser 19 | my $CFxmlparser = XML::LibXML->new(); 20 | 21 | # basic parse and XInclude processing 22 | my $CFxp = $CFxmlparser->parse_file($bcf); 23 | 24 | # XPath context 25 | my $CFxpc = XML::LibXML::XPathContext->new($CFxp); 26 | $CFxpc->registerNs('bcf', 'https://sourceforge.net/projects/biblatex'); 27 | 28 | # Validate against schema. Dies if it fails. 29 | $CFxmlschema->validate($CFxp); 30 | is($@, '', "Validation of $bcf"); 31 | } 32 | -------------------------------------------------------------------------------- /t/bibtex-output.t: -------------------------------------------------------------------------------- 1 | # -*- cperl -*- 2 | use strict; 3 | use warnings; 4 | use Test::More tests => 6; 5 | use Test::Differences; 6 | unified_diff; 7 | 8 | 9 | use Encode; 10 | use Biber; 11 | use Biber::Utils; 12 | use Biber::Output::bibtex; 13 | use Log::Log4perl; 14 | use Unicode::Normalize; 15 | chdir("t/tdata"); 16 | no warnings 'utf8'; 17 | use utf8; 18 | 19 | # Set up Biber object 20 | my $biber = Biber->new(noconf => 1); 21 | my $LEVEL = 'ERROR'; 22 | my $l4pconf = qq| 23 | log4perl.category.main = $LEVEL, Screen 24 | log4perl.category.screen = $LEVEL, Screen 25 | log4perl.appender.Screen = Log::Log4perl::Appender::Screen 26 | log4perl.appender.Screen.utf8 = 1 27 | log4perl.appender.Screen.Threshold = $LEVEL 28 | log4perl.appender.Screen.stderr = 0 29 | log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout 30 | |; 31 | Log::Log4perl->init(\$l4pconf); 32 | 33 | # Options - we could set these in the control file but it's nice to see what we're 34 | # relying on here for tests 35 | 36 | # Biber options 37 | 38 | # THIS IS NOT TOOL MODE 39 | 40 | Biber::Config->setoption('output_resolve_xdata', 1); 41 | Biber::Config->setoption('output_resolve_crossrefs', 1); 42 | Biber::Config->setoption('output_format', 'bibtex'); 43 | Biber::Config->setoption('output_align', '1'); 44 | Biber::Config->setoption('tool', '1'); 45 | Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); 46 | $biber->parse_ctrlfile('bibtex-output.bcf'); 47 | $biber->set_output_obj(Biber::Output::bibtex->new()); 48 | 49 | # Now generate the information 50 | $biber->prepare; 51 | my $main = $biber->datalists->get_list(Biber::Config->getblxoption(undef, 'sortingtemplatename') . '/global//global/global/global', 99999, 'entry'); 52 | 53 | my $out = $biber->get_output_obj; 54 | 55 | my $b1 = q|@ARTICLE{murray, 56 | 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.}, 57 | ANNOTATION = {An \texttt{article} entry with \arabic{author} authors. By default, long author and editor lists are automatically truncated. This is configurable}, 58 | DATE = {1998}, 59 | INDEXTITLE = {Alkanethiolate gold cluster molecules}, 60 | JOURNALTITLE = {Langmuir}, 61 | LANGID = {english}, 62 | LANGIDOPTS = {variant=american}, 63 | NUMBER = {1}, 64 | PAGES = {17--30}, 65 | SHORTTITLE = {Alkanethiolate gold cluster molecules}, 66 | SUBTITLE = {Core and monolayer properties as a function of core size}, 67 | TITLE = {Alkanethiolate gold cluster molecules with core diameters from 1.5 to 5.2~nm}, 68 | VOLUME = {14}, 69 | } 70 | 71 | |; 72 | 73 | my $b2 = q|@BOOK{b1, 74 | LOCATION = {London and Edinburgh}, 75 | LOCATION+an:default = {1=ann1;2=ann2}, 76 | DATE = {1999}, 77 | MAINSUBTITLE = {Mainsubtitle}, 78 | MAINTITLE = {Maintitle}, 79 | MAINTITLEADDON = {Maintitleaddon}, 80 | TITLE = {Booktitle}, 81 | TITLE+an:default = {=ann1, ann2}, 82 | } 83 | 84 | |; 85 | 86 | my $b3 = q|@BOOK{xd1, 87 | AUTHOR = {Ellington, Edward Paul}, 88 | LOCATION = {New York and London}, 89 | PUBLISHER = {Macmillan}, 90 | DATE = {2001}, 91 | NOTE = {A Note}, 92 | } 93 | 94 | |; 95 | 96 | my $bo1 = q|@BOOK{bo1, 97 | AUTHOR = {Smith, Simon}, 98 | IDS = {box1,box2}, 99 | } 100 | 101 | |; 102 | 103 | eq_or_diff($out->get_output_entry('murray',), $b1, 'bibtex output 1'); 104 | eq_or_diff($out->get_output_entry('b1',), $b2, 'bibtex output 2'); 105 | eq_or_diff($out->get_output_entry('xd1',), $b3, 'bibtex output 3'); 106 | eq_or_diff($out->get_output_entry('bo1',), $bo1, 'bibtex output 4'); 107 | ok(is_undef($out->get_output_entry('reese')), 'bibtex output 5'); 108 | is_deeply($main->get_keys, ['murray', 'kant:ku', 'b1', 'xd1', 'bo1', 'mv1'], 'non-tool mode bibtex output sorting'); 109 | -------------------------------------------------------------------------------- /t/extratitle.t: -------------------------------------------------------------------------------- 1 | # -*- cperl -*- 2 | use strict; 3 | use warnings; 4 | use utf8; 5 | no warnings 'utf8'; 6 | 7 | use Test::More tests => 14; 8 | use Test::Differences; 9 | unified_diff; 10 | 11 | use Biber; 12 | use Biber::Utils; 13 | use Biber::Output::bbl; 14 | use Log::Log4perl; 15 | chdir("t/tdata"); 16 | 17 | # Set up Biber object 18 | my $biber = Biber->new(noconf => 1); 19 | my $LEVEL = 'ERROR'; 20 | my $l4pconf = qq| 21 | log4perl.category.main = $LEVEL, Screen 22 | log4perl.category.screen = $LEVEL, Screen 23 | log4perl.appender.Screen = Log::Log4perl::Appender::Screen 24 | log4perl.appender.Screen.utf8 = 1 25 | log4perl.appender.Screen.Threshold = $LEVEL 26 | log4perl.appender.Screen.stderr = 0 27 | log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout 28 | |; 29 | Log::Log4perl->init(\$l4pconf); 30 | 31 | $biber->parse_ctrlfile('extratitle.bcf'); 32 | $biber->set_output_obj(Biber::Output::bbl->new()); 33 | 34 | # Options - we could set these in the control file but it's nice to see what we're 35 | # relying on here for tests 36 | 37 | # Biber options 38 | Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); 39 | 40 | # Biblatex options 41 | Biber::Config->setblxoption(undef,'maxcitenames', 1); 42 | Biber::Config->setblxoption(undef,'maxbibnames', 1); 43 | 44 | # Now generate the information 45 | $biber->prepare; 46 | my $section = $biber->sections->get_section(0); 47 | my $main = $biber->datalists->get_list('custom/global//global/global/global'); 48 | 49 | my $bibentries = $section->bibentries; 50 | 51 | # Don't forget that the extratitle data is inserted after sorting 52 | eq_or_diff($main->get_extratitledata_for_key('L1'), '1', 'Same name, same title - 1'); 53 | eq_or_diff($main->get_extratitledata_for_key('L2'), '2', 'Same name, same title - 2'); 54 | eq_or_diff($main->get_extratitledata_for_key('L3'), '1', 'No name, same title - 1'); 55 | eq_or_diff($main->get_extratitledata_for_key('L4'), '2', 'No name, same title - 2'); 56 | ok(is_undef($main->get_extratitledata_for_key('L5')), 'No name, same title as with name - 1'); 57 | eq_or_diff($main->get_extratitledata_for_key('L6'), '1', 'No name, same shorttitle/title - 1'); 58 | eq_or_diff($main->get_extratitledata_for_key('L7'), '2', 'No name, same shorttitle/title - 2'); 59 | ok(is_undef($main->get_entryfield('L8', 'singletitle')), 'Singletitle test - 1'); 60 | ok(is_undef($main->get_entryfield('L9', 'singletitle')), 'Singletitle test - 2'); 61 | eq_or_diff($main->get_entryfield('L10', 'singletitle'), '1', 'Singletitle test - 3'); 62 | ok(is_undef($main->get_entryfield('L11', 'singletitle')), 'Singletitle test - 4'); 63 | ok(is_undef($main->get_entryfield('L12', 'singletitle')), 'Singletitle test - 5'); 64 | ok(is_undef($main->get_entryfield('L1', 'singletitle')), 'Singletitle test - 6'); 65 | ok(is_undef($main->get_entryfield('L5', 'singletitle')), 'Singletitle test - 7'); 66 | -------------------------------------------------------------------------------- /t/extratitleyear.t: -------------------------------------------------------------------------------- 1 | # -*- cperl -*- 2 | use strict; 3 | use warnings; 4 | use utf8; 5 | no warnings 'utf8'; 6 | 7 | use Test::More tests => 8; 8 | use Test::Differences; 9 | unified_diff; 10 | 11 | use Biber; 12 | use Biber::Utils; 13 | use Biber::Output::bbl; 14 | use Log::Log4perl; 15 | chdir("t/tdata"); 16 | 17 | # Set up Biber object 18 | my $biber = Biber->new(noconf => 1); 19 | my $LEVEL = 'ERROR'; 20 | my $l4pconf = qq| 21 | log4perl.category.main = $LEVEL, Screen 22 | log4perl.category.screen = $LEVEL, Screen 23 | log4perl.appender.Screen = Log::Log4perl::Appender::Screen 24 | log4perl.appender.Screen.utf8 = 1 25 | log4perl.appender.Screen.Threshold = $LEVEL 26 | log4perl.appender.Screen.stderr = 0 27 | log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout 28 | |; 29 | Log::Log4perl->init(\$l4pconf); 30 | 31 | $biber->parse_ctrlfile('extratitleyear.bcf'); 32 | $biber->set_output_obj(Biber::Output::bbl->new()); 33 | 34 | # Options - we could set these in the control file but it's nice to see what we're 35 | # relying on here for tests 36 | 37 | # Biber options 38 | Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); 39 | 40 | # Now generate the information 41 | $biber->prepare; 42 | my $section = $biber->sections->get_section(0); 43 | my $main = $biber->datalists->get_list('custom/global//global/global/global'); 44 | 45 | my $bibentries = $section->bibentries; 46 | 47 | # Don't forget that the extratitleyear data is inserted after sorting 48 | eq_or_diff($main->get_extratitleyeardata_for_key('L1'), '1', 'Same title, same year'); 49 | eq_or_diff($main->get_extratitleyeardata_for_key('L2'), '2', 'Same title, same year'); 50 | ok(is_undef($main->get_extratitledata_for_key('L3')), 'No title, same year'); 51 | ok(is_undef($main->get_extratitleyeardata_for_key('L4')), 'Same title, different year'); 52 | ok(is_undef($main->get_extratitleyeardata_for_key('L5')), 'Different labeltitle, same year'); 53 | ok(is_undef($main->get_extratitleyeardata_for_key('LY1')), 'Different years due to range ends - 1'); 54 | ok(is_undef($main->get_extratitleyeardata_for_key('LY2')), 'Different years due to range ends - 1'); 55 | ok(is_undef($main->get_extratitleyeardata_for_key('LY3')), 'Different years due to range ends - 1'); 56 | 57 | 58 | -------------------------------------------------------------------------------- /t/full-bbl.t: -------------------------------------------------------------------------------- 1 | # -*- cperl -*- 2 | use v5.24; 3 | use strict; 4 | use warnings; 5 | use utf8; 6 | no warnings 'utf8'; 7 | 8 | use Test::More; 9 | 10 | if ($ENV{BIBER_DEV_TESTS}) { 11 | plan tests => 5; 12 | } 13 | else { 14 | plan skip_all => 'BIBER_DEV_TESTS not set'; 15 | } 16 | 17 | use IPC::Run3; 18 | use File::Temp; 19 | use File::Compare; 20 | use File::Which; 21 | 22 | 23 | my $perl = which('perl'); 24 | 25 | my $tmpfile = File::Temp->new(); 26 | # my $tmpfile = File::Temp->new(UNLINK => 0); 27 | my $bbl = $tmpfile->filename; 28 | my $stdout; 29 | my $stderr; 30 | 31 | run3 [ $perl, 'bin/biber', '--noconf', '--nolog', "--output-file=$bbl", 't/tdata/full-bbl.bcf' ], \undef, \$stdout, \$stderr; 32 | # say $stdout; 33 | # say $stderr; 34 | 35 | is($? >> 8, 0, 'Full test has zero exit status'); 36 | ok(compare($bbl, 't/tdata/full-bbl.bbl') == 0, 'Testing lossort case and sortinit for macros'); 37 | like($stdout, qr|WARN - Duplicate entry key: 'F1' in file 't/tdata/full-bbl\.bib', skipping \.\.\.|ms, 'Testing duplicate/case key warnings - 1'); 38 | 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'); 39 | 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'); 40 | -------------------------------------------------------------------------------- /t/full-bibtex.t: -------------------------------------------------------------------------------- 1 | # -*- cperl -*- 2 | use v5.24; 3 | use strict; 4 | use warnings; 5 | use utf8; 6 | no warnings 'utf8'; 7 | 8 | use Test::More; 9 | 10 | if ($ENV{BIBER_DEV_TESTS}) { 11 | plan tests => 2; 12 | } 13 | else { 14 | plan skip_all => 'BIBER_DEV_TESTS not set'; 15 | } 16 | 17 | use IPC::Run3; 18 | use File::Temp; 19 | use File::Compare; 20 | use File::Which; 21 | 22 | 23 | my $perl = which('perl'); 24 | 25 | my $tmpfile = File::Temp->new(); 26 | #my $tmpfile = File::Temp->new(UNLINK => 0); 27 | my $bib = $tmpfile->filename; 28 | my $stdout; 29 | my $stderr; 30 | 31 | run3 [ $perl, 'bin/biber', '--noconf', '--nolog', '--output-format=bibtex', "--output-file=$bib", '--output-align', 't/tdata/full-bibtex.bcf' ], \undef, \$stdout, \$stderr; 32 | # say $stdout; 33 | # say $stderr; 34 | 35 | is($? >> 8, 0, 'Full test has zero exit status'); 36 | 37 | # Now replace the model ref for comparison with the static test file 38 | ok(compare($bib, 't/tdata/full-bibtex_biber.bib') == 0, 'Testing non-toolmode bibtex output'); 39 | 40 | -------------------------------------------------------------------------------- /t/full-dot.t: -------------------------------------------------------------------------------- 1 | # -*- cperl -*- 2 | use v5.24; 3 | use strict; 4 | use warnings; 5 | use utf8; 6 | no warnings 'utf8'; 7 | 8 | use Test::More; 9 | 10 | if ($ENV{BIBER_DEV_TESTS}) { 11 | plan tests => 2; 12 | } 13 | else { 14 | plan skip_all => 'BIBER_DEV_TESTS not set'; 15 | } 16 | 17 | use IPC::Run3; 18 | use File::Temp; 19 | use File::Compare; 20 | use File::Which; 21 | 22 | 23 | my $perl = which('perl'); 24 | 25 | my $tmpfile = File::Temp->new(); 26 | #my $tmpfile = File::Temp->new(UNLINK => 0); 27 | my $dot = $tmpfile->filename; 28 | my $stdout; 29 | my $stderr; 30 | 31 | 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; 32 | #say $stdout; 33 | #say $stderr; 34 | 35 | is($? >> 8, 0, 'Full test has zero exit status'); 36 | ok(compare($dot, 't/tdata/full-dot.dot') == 0, 'Testing dot output'); 37 | 38 | -------------------------------------------------------------------------------- /t/labelalphaname.t: -------------------------------------------------------------------------------- 1 | # -*- cperl -*- 2 | use strict; 3 | use warnings; 4 | use utf8; 5 | no warnings 'utf8'; 6 | 7 | use Test::More tests => 7; 8 | use Test::Differences; 9 | unified_diff; 10 | 11 | use Biber; 12 | use Biber::Utils; 13 | use Biber::Output::bbl; 14 | use Log::Log4perl; 15 | use Unicode::Normalize; 16 | chdir("t/tdata"); 17 | 18 | 19 | # Set up Biber object 20 | my $biber = Biber->new(noconf => 1); 21 | my $LEVEL = 'ERROR'; 22 | my $l4pconf = qq| 23 | log4perl.category.main = $LEVEL, Screen 24 | log4perl.category.screen = $LEVEL, Screen 25 | log4perl.appender.Screen = Log::Log4perl::Appender::Screen 26 | log4perl.appender.Screen.utf8 = 1 27 | log4perl.appender.Screen.Threshold = $LEVEL 28 | log4perl.appender.Screen.stderr = 0 29 | log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout 30 | |; 31 | Log::Log4perl->init(\$l4pconf); 32 | 33 | $biber->parse_ctrlfile('labelalphaname.bcf'); 34 | $biber->set_output_obj(Biber::Output::bbl->new()); 35 | 36 | # Biber options 37 | Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); 38 | 39 | # Biblatex options 40 | 41 | # Now generate the information, saving per-entry options or they are deleted 42 | $biber->prepare; 43 | 44 | my $main = $biber->datalists->get_list('custom/global//global/global/global'); 45 | my $main1 = $biber->datalists->get_list('custom/global//global/test1/global'); 46 | my $main2 = $biber->datalists->get_list('custom/global//global/test5/global'); 47 | 48 | eq_or_diff($main->get_labelalphadata_for_key('lant1'), 'Smi', 'labelalphaname global template'); 49 | eq_or_diff($main1->get_labelalphadata_for_key('lant1'), 'AS', 'labelalphaname dlist template'); 50 | eq_or_diff($main->get_labelalphadata_for_key('lant2'), 'ArSm', 'labelalphaname entry template'); 51 | eq_or_diff($main->get_labelalphadata_for_key('lant3'), 'ArtSmi', 'labelalphaname namelist template'); 52 | eq_or_diff($main->get_labelalphadata_for_key('lant4'), 'ArthSmit', 'labelalphaname name template'); 53 | eq_or_diff($main2->get_labelalphadata_for_key('lant5'), 'GRW', 'labelalphaname name template compound'); 54 | eq_or_diff($main2->get_labelalphadata_for_key('lant6'), 'GRW', 'labelalphaname name template hyphen'); 55 | -------------------------------------------------------------------------------- /t/labelname.t: -------------------------------------------------------------------------------- 1 | # -*- cperl -*- 2 | use strict; 3 | use warnings; 4 | use utf8; 5 | no warnings 'utf8'; 6 | 7 | use Test::More tests => 4; 8 | use Test::Differences; 9 | unified_diff; 10 | 11 | use Biber; 12 | use Biber::Output::bbl; 13 | use Log::Log4perl; 14 | chdir("t/tdata"); 15 | 16 | # Set up Biber object 17 | my $biber = Biber->new(noconf => 1); 18 | my $LEVEL = 'ERROR'; 19 | my $l4pconf = qq| 20 | log4perl.category.main = $LEVEL, Screen 21 | log4perl.category.screen = $LEVEL, Screen 22 | log4perl.appender.Screen = Log::Log4perl::Appender::Screen 23 | log4perl.appender.Screen.utf8 = 1 24 | log4perl.appender.Screen.Threshold = $LEVEL 25 | log4perl.appender.Screen.stderr = 0 26 | log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout 27 | |; 28 | Log::Log4perl->init(\$l4pconf); 29 | 30 | Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); 31 | $biber->parse_ctrlfile("general.bcf"); 32 | $biber->set_output_obj(Biber::Output::bbl->new()); 33 | 34 | # Options - we could set these in the control file but it's nice to see what we're 35 | # relying on here for tests 36 | 37 | # Biblatex options 38 | Biber::Config->setblxoption(undef,'labelnamespec', [ {content => 'shortauthor'}, 39 | {content => 'author'}, 40 | {content => 'shorteditor'}, 41 | {content => 'editor'}, 42 | {content => 'translator'}]); 43 | Biber::Config->setblxoption(undef,'labelnamespec', [ {content => 'editor'}, 44 | {content => 'translator'}], 'ENTRYTYPE', 'book'); 45 | Biber::Config->setblxoption(undef,'labelnamespec', [ {content => 'namea'}, 46 | {content => 'author' }], 'ENTRYTYPE', 'misc'); 47 | 48 | # Now generate the information 49 | $biber->prepare; 50 | my $bibentries = $biber->sections->get_section(0)->bibentries; 51 | 52 | eq_or_diff($bibentries->entry('angenendtsa')->get_labelname_info, 'shortauthor', 'global shortauthor' ); 53 | eq_or_diff($bibentries->entry('stdmodel')->get_labelname_info, 'author', 'global author' ); 54 | eq_or_diff($bibentries->entry('aristotle:anima')->get_labelname_info, 'editor', 'type-specific editor' ); 55 | eq_or_diff($bibentries->entry('lne1')->get_labelname_info, 'namea', 'type-specific exotic name' ); 56 | -------------------------------------------------------------------------------- /t/langtags.t: -------------------------------------------------------------------------------- 1 | # -*- cperl -*- 2 | use strict; 3 | use warnings; 4 | use utf8; 5 | no warnings 'utf8'; 6 | 7 | use Test::More tests => 19; 8 | use Test::Differences; 9 | unified_diff; 10 | 11 | use Biber; 12 | use Biber::Utils; 13 | use Biber::LangTag; 14 | use Log::Log4perl; 15 | chdir("t/tdata"); 16 | 17 | # Set up Biber object 18 | my $biber = Biber->new(); 19 | my $LEVEL = 'ERROR'; 20 | my $l4pconf = qq| 21 | log4perl.category.main = $LEVEL, Screen 22 | log4perl.category.screen = $LEVEL, Screen 23 | log4perl.appender.Screen = Log::Log4perl::Appender::Screen 24 | log4perl.appender.Screen.utf8 = 1 25 | log4perl.appender.Screen.Threshold = $LEVEL 26 | log4perl.appender.Screen.stderr = 0 27 | log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout 28 | |; 29 | Log::Log4perl->init(\$l4pconf); 30 | 31 | is_deeply($biber->langtags->parse('de')->dump, {language => 'de'}, 'BCP47 - 1'); 32 | is_deeply($biber->langtags->parse('i-enochian')->dump, { grandfathered => "i-enochian" }, 'BCP47 - 2'); 33 | is_deeply($biber->langtags->parse('zh-Hant')->dump, { language => 'zh', script => 'Hant' }, 'BCP47 - 3'); 34 | is_deeply($biber->langtags->parse('zh-cmn-Hans-CN')->dump, { language => 'zh', extlang => ['cmn'], script => 'Hans', region => 'CN' }, 'BCP47 - 4'); 35 | is_deeply($biber->langtags->parse('cmn-Hans-CN')->dump, { language => 'cmn', script => 'Hans', region => 'CN' }, 'BCP47 - 5'); 36 | is_deeply($biber->langtags->parse('yue-HK')->dump, { language => 'yue', region => 'HK' }, 'BCP47 - 6'); 37 | is_deeply($biber->langtags->parse('sl-rozaj')->dump, { language => 'sl', variant => ['rozaj'] }, 'BCP47 - 7'); 38 | is_deeply($biber->langtags->parse('sl-rozaj-biske')->dump, { language => 'sl', variant => ['rozaj', 'biske'] }, 'BCP47 - 8'); 39 | is_deeply($biber->langtags->parse('de-CH-1901')->dump, { language => 'de', region => 'CH', variant => ['1901'] }, 'BCP47 - 9'); 40 | is_deeply($biber->langtags->parse('hy-Latn-IT-arevela')->dump, { language => 'hy', region => 'IT', script => 'Latn', variant => ['arevela'] }, 'BCP47 - 10'); 41 | is_deeply($biber->langtags->parse('de-DE')->dump, { language => 'de', region => 'DE' }, 'BCP47 - 11'); 42 | is_deeply($biber->langtags->parse('es-419')->dump, { language => 'es', region => '419' }, 'BCP47 - 12'); 43 | is_deeply($biber->langtags->parse('de-CH-x-phonebk')->dump, { language => 'de', region => 'CH', privateuse => ['phonebk'] }, 'BCP47 - 13'); 44 | is_deeply($biber->langtags->parse('az-Arab-x-AZE-derbend')->dump, { language => 'az', script => 'Arab', privateuse => ['AZE', 'derbend'] }, 'BCP47 - 14'); 45 | is_deeply($biber->langtags->parse('en-US-u-islamcal')->dump, { language => 'en', region => 'US', extension => ['islamcal'] }, 'BCP47 - 15'); 46 | is_deeply($biber->langtags->parse('en-a-myext-b-another')->dump, { language => 'en', extension => ['myext', 'another'] }, 'BCP47 - 16'); 47 | is_deeply($biber->langtags->parse('zh-CN-a-myext-x-private')->dump, { language => 'zh', region => 'CN', extension => ['myext'], privateuse => ['private'] }, 'BCP47 - 17'); 48 | is_deeply($biber->langtags->parse('de-419-DE'), undef, 'BCP47 - 18'); 49 | is_deeply($biber->langtags->parse('a-DE'), undef, 'BCP47 - 19'); 50 | -------------------------------------------------------------------------------- /t/maps.t: -------------------------------------------------------------------------------- 1 | # -*- cperl -*- 2 | use strict; 3 | use warnings; 4 | use utf8; 5 | no warnings 'utf8'; 6 | 7 | use Test::More tests => 8; 8 | use Test::Differences; 9 | unified_diff; 10 | 11 | use Biber; 12 | use Biber::Utils; 13 | use Biber::Output::bbl; 14 | use Log::Log4perl; 15 | use Unicode::Normalize; 16 | chdir("t/tdata"); 17 | 18 | # Set up Biber object 19 | my $biber = Biber->new(noconf => 1); 20 | my $LEVEL = 'ERROR'; 21 | my $l4pconf = qq| 22 | log4perl.category.main = $LEVEL, Screen 23 | log4perl.category.screen = $LEVEL, Screen 24 | log4perl.appender.Screen = Log::Log4perl::Appender::Screen 25 | log4perl.appender.Screen.utf8 = 1 26 | log4perl.appender.Screen.Threshold = $LEVEL 27 | log4perl.appender.Screen.stderr = 0 28 | log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout 29 | |; 30 | Log::Log4perl->init(\$l4pconf); 31 | 32 | $biber->parse_ctrlfile('maps.bcf'); 33 | $biber->set_output_obj(Biber::Output::bbl->new()); 34 | 35 | # Now generate the information 36 | $biber->prepare; 37 | my $out = $biber->get_output_obj; 38 | my $section = $biber->sections->get_section(0); 39 | my $bibentries = $section->bibentries; 40 | 41 | # Explicitly cited ARTICLE, not deleted by map 42 | ok(defined($bibentries->entry('maps1')), 'Maps test - 1' ); 43 | # \nocite{*} ARTICLE, deleted by map 44 | ok(is_undef($bibentries->entry('maps2')), 'Maps test - 2' ); 45 | # \nocite{*} COLLECTION, not deleted by map 46 | ok(defined($bibentries->entry('maps3')), 'Maps test - 3' ); 47 | # \nocited{*} BOOK, deleted by map 48 | ok(is_undef($bibentries->entry('maps4')), 'Maps test - 4' ); 49 | # Specifically cited ARTICLE, field set 50 | eq_or_diff($bibentries->entry('maps1')->get_field('verba'), 'somevalue', 'Maps test - 5' ); 51 | ok(is_undef($bibentries->entry('maps3')->get_field('verba')), 'Maps test - 6' ); 52 | eq_or_diff($bibentries->entry('maps1')->get_field('verbb'), 'somevalue1', 'Maps test - 7' ); 53 | ok(is_undef($bibentries->entry('maps3')->get_field('verbb')), 'Maps test - 8' ); 54 | -------------------------------------------------------------------------------- /t/remote-files.t: -------------------------------------------------------------------------------- 1 | # -*- cperl -*- 2 | use strict; 3 | use warnings; 4 | use utf8; 5 | no warnings 'utf8' ; 6 | 7 | use Test::More; 8 | use Test::Differences; 9 | unified_diff; 10 | 11 | if ($ENV{BIBER_DEV_TESTS}) { 12 | plan tests => 1; 13 | } 14 | else { 15 | plan skip_all => 'BIBER_DEV_TESTS not set'; 16 | } 17 | 18 | use Biber; 19 | use Biber::Output::bbl; 20 | use Log::Log4perl; 21 | chdir("t/tdata") ; 22 | 23 | # Set up Biber object 24 | my $biber = Biber->new(noconf => 1); 25 | my $LEVEL = 'ERROR'; 26 | my $l4pconf = qq| 27 | log4perl.category.main = $LEVEL, Screen 28 | log4perl.category.screen = $LEVEL, Screen 29 | log4perl.appender.Screen = Log::Log4perl::Appender::Screen 30 | log4perl.appender.Screen.utf8 = 1 31 | log4perl.appender.Screen.Threshold = $LEVEL 32 | log4perl.appender.Screen.stderr = 0 33 | log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout 34 | |; 35 | Log::Log4perl->init(\$l4pconf); 36 | 37 | $biber->parse_ctrlfile('remote-files.bcf'); 38 | $biber->set_output_obj(Biber::Output::bbl->new()); 39 | 40 | # Options - we could set these in the control file but it's nice to see what we're 41 | # relying on here for tests 42 | 43 | # Biber options 44 | Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); 45 | Biber::Config->setoption('quiet', 1); 46 | Biber::Config->setoption('nodieonerror', 1); # because the remote bibs might be messy 47 | 48 | # Now generate the information 49 | $biber->prepare; 50 | my $out = $biber->get_output_obj; 51 | my $section = $biber->sections->get_section(0); 52 | my $main = $biber->datalists->get_list('nty/global//global/global/global'); 53 | my $bibentries = $section->bibentries; 54 | 55 | my $dl1 = q| \entry{AbdelbarH98}{article}{}{} 56 | \name{author}{2}{}{% 57 | {{un=0,uniquepart=base,hash=03fb065ad674e2c6269f3542112e30df}{% 58 | family={Abdelbar}, 59 | familyi={A\bibinitperiod}, 60 | given={A.M.}, 61 | giveni={A\bibinitperiod}, 62 | givenun=0}}% 63 | {{un=0,uniquepart=base,hash=6ad6790ec94c4b5195bcac153b20da0e}{% 64 | family={Hedetniemi}, 65 | familyi={H\bibinitperiod}, 66 | given={S.M.}, 67 | giveni={S\bibinitperiod}, 68 | givenun=0}}% 69 | } 70 | \strng{namehash}{bb887c5d0458bfb1f3f7e6afc8d1def4} 71 | \strng{fullhash}{bb887c5d0458bfb1f3f7e6afc8d1def4} 72 | \strng{fullhashraw}{bb887c5d0458bfb1f3f7e6afc8d1def4} 73 | \strng{bibnamehash}{bb887c5d0458bfb1f3f7e6afc8d1def4} 74 | \strng{authorbibnamehash}{bb887c5d0458bfb1f3f7e6afc8d1def4} 75 | \strng{authornamehash}{bb887c5d0458bfb1f3f7e6afc8d1def4} 76 | \strng{authorfullhash}{bb887c5d0458bfb1f3f7e6afc8d1def4} 77 | \strng{authorfullhashraw}{bb887c5d0458bfb1f3f7e6afc8d1def4} 78 | \field{sortinit}{A} 79 | \field{sortinithash}{2f401846e2029bad6b3ecc16d50031e2} 80 | \field{extradatescope}{labelyear} 81 | \field{labeldatesource}{} 82 | \field{labelnamesource}{author} 83 | \field{labeltitlesource}{title} 84 | \field{journaltitle}{Artificial Intelligence} 85 | \field{title}{Approximating {MAP}s for belief networks is {NP}-hard and other theorems} 86 | \field{volume}{102} 87 | \field{year}{1998} 88 | \field{pages}{21\bibrangedash 38} 89 | \range{pages}{18} 90 | \endentry 91 | |; 92 | 93 | eq_or_diff( $out->get_output_entry('AbdelbarH98', $main), $dl1, 'Fetch from plain bib download') ; 94 | -------------------------------------------------------------------------------- /t/sort-case.t: -------------------------------------------------------------------------------- 1 | # -*- cperl -*- 2 | use strict; 3 | use warnings; 4 | use utf8; 5 | no warnings 'utf8'; 6 | 7 | use Test::More tests => 2; 8 | 9 | use Biber; 10 | use Biber::Output::bbl; 11 | use Log::Log4perl; 12 | chdir("t/tdata") ; 13 | my $S; 14 | 15 | # Set up Biber object 16 | my $biber = Biber->new(noconf => 1); 17 | my $LEVEL = 'ERROR'; 18 | my $l4pconf = qq| 19 | log4perl.category.main = $LEVEL, Screen 20 | log4perl.category.screen = $LEVEL, Screen 21 | log4perl.appender.Screen = Log::Log4perl::Appender::Screen 22 | log4perl.appender.Screen.utf8 = 1 23 | log4perl.appender.Screen.Threshold = $LEVEL 24 | log4perl.appender.Screen.stderr = 0 25 | log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout 26 | |; 27 | Log::Log4perl->init(\$l4pconf); 28 | 29 | $biber->parse_ctrlfile('sort-case.bcf'); 30 | $biber->set_output_obj(Biber::Output::bbl->new()); 31 | 32 | # Options - we could set these in the control file but it's nice to see what we're 33 | # relying on here for tests 34 | Biber::Config->setoption('sortcase', 1); 35 | Biber::Config->setoption('sortupper', 1); 36 | Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); 37 | 38 | $S = { spec => [ 39 | [ 40 | {}, 41 | {'author' => {}}, 42 | ], 43 | ]}; 44 | 45 | my $main = $biber->datalists->get_list('custom/global//global/global/global'); 46 | $main->set_sortingtemplate($S); 47 | 48 | $biber->prepare; 49 | is_deeply($main->get_keys, ['CS1','CS3','CS2'], 'U::C case - 1'); 50 | 51 | $biber = Biber->new(noconf => 1); 52 | $biber->parse_ctrlfile('sort-case.bcf'); 53 | 54 | $biber->set_output_obj(Biber::Output::bbl->new()); 55 | 56 | # Global here is sortcase=0, sortupper=1 57 | # title is sortcase=1, sortupper=0 58 | # So, all names are the same and it depends on title 59 | $biber->prepare; 60 | $main = $biber->datalists->get_list('custom/global//global/global/global'); 61 | is_deeply($main->get_keys, ['CS3','CS2','CS1'], 'U::C case - 2'); 62 | 63 | -------------------------------------------------------------------------------- /t/sort-names.t: -------------------------------------------------------------------------------- 1 | # -*- cperl -*- 2 | use strict; 3 | use warnings; 4 | use utf8; 5 | no warnings 'utf8'; 6 | 7 | use Test::More tests => 1; 8 | 9 | use Biber; 10 | use Biber::Output::bbl; 11 | use Log::Log4perl; 12 | chdir("t/tdata"); 13 | 14 | # Set up Biber object 15 | my $biber = Biber->new(noconf => 1); 16 | my $LEVEL = 'ERROR'; 17 | my $l4pconf = qq| 18 | log4perl.category.main = $LEVEL, Screen 19 | log4perl.category.screen = $LEVEL, Screen 20 | log4perl.appender.Screen = Log::Log4perl::Appender::Screen 21 | log4perl.appender.Screen.utf8 = 1 22 | log4perl.appender.Screen.Threshold = $LEVEL 23 | log4perl.appender.Screen.stderr = 0 24 | log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout 25 | |; 26 | Log::Log4perl->init(\$l4pconf); 27 | 28 | $biber->parse_ctrlfile('sort-names.bcf'); 29 | $biber->set_output_obj(Biber::Output::bbl->new()); 30 | 31 | # Options - we could set these in the control file but it's nice to see what we're 32 | # relying on here for tests 33 | Biber::Config->setoption('sortlocale', 'en_GB.UTF-8'); 34 | 35 | # (re)generate information based on option settings 36 | $biber->prepare; 37 | my $section = $biber->sections->get_section(0); 38 | my $main = $biber->datalists->get_list('none/global//global/global/global'); 39 | is_deeply($main->get_keys, ['N4', 'N1', 'N2', 'N3'], 'names order'); 40 | -------------------------------------------------------------------------------- /t/sort-uc.t: -------------------------------------------------------------------------------- 1 | # -*- cperl -*- 2 | use strict; 3 | use warnings; 4 | use utf8; 5 | no warnings 'utf8'; 6 | 7 | use Test::More tests => 6; 8 | 9 | use Biber; 10 | use Biber::Output::bbl; 11 | use Log::Log4perl; 12 | chdir("t/tdata"); 13 | 14 | # Set up Biber object 15 | my $biber = Biber->new(noconf => 1); 16 | my $LEVEL = 'ERROR'; 17 | my $l4pconf = qq| 18 | log4perl.category.main = $LEVEL, Screen 19 | log4perl.category.screen = $LEVEL, Screen 20 | log4perl.appender.Screen = Log::Log4perl::Appender::Screen 21 | log4perl.appender.Screen.utf8 = 1 22 | log4perl.appender.Screen.Threshold = $LEVEL 23 | log4perl.appender.Screen.stderr = 0 24 | log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout 25 | |; 26 | Log::Log4perl->init(\$l4pconf); 27 | 28 | $biber->parse_ctrlfile('sort-uc.bcf'); 29 | $biber->set_output_obj(Biber::Output::bbl->new()); 30 | 31 | # Options - we could set these in the control file but it's nice to see what we're 32 | # relying on here for tests 33 | Biber::Config->setoption('sortlocale', 'sv_SE.UTF-8'); 34 | 35 | # U::C Swedish tailoring 36 | $biber->prepare; 37 | my $section = $biber->sections->get_section(0); 38 | my $main = $biber->datalists->get_list('nty/global//global/global/global'); 39 | my $shs = $biber->datalists->get_list('shorthand/global//global/global/global', 0, 'list'); 40 | 41 | # Shorthands are sorted by shorthand (as per bcf) 42 | is_deeply($main->get_keys, ['LS6','LS5','LS2','LS1','LS3','LS4'], 'U::C tailoring - 1'); 43 | is_deeply($shs->get_keys, ['LS3', 'LS4','LS2','LS1'], 'U::C tailoring - 2'); 44 | 45 | # Set sorting of shorthands to global sorting default 46 | $shs->set_sortingtemplate(Biber::Config->getblxoption(undef,'sortingtemplate')); 47 | $shs->set_sortingtemplatename('global'); 48 | 49 | $biber->prepare; 50 | $section = $biber->sections->get_section(0); 51 | is_deeply($shs->get_keys, ['LS2', 'LS1','LS3','LS4'], 'U::C tailoring - 3'); 52 | 53 | 54 | # Descending name in Swedish collation 55 | $main->set_sortingtemplatename('dswe'); 56 | 57 | $biber->prepare; 58 | $section = $biber->sections->get_section(0); 59 | 60 | is_deeply($main->get_keys, ['LS3','LS4','LS1','LS2','LS5','LS6'], 'U::C tailoring descending - 1'); 61 | 62 | # Local lower before upper setting 63 | $main->set_sortingtemplatename('ll'); 64 | 65 | $biber->prepare; 66 | $section = $biber->sections->get_section(0); 67 | is_deeply($main->get_keys, ['LS5', 'LS6', 'LS4', 'LS3','LS2','LS1'], 'upper_before_lower locally false'); 68 | 69 | # Local case insensitive negates the sortupper being false as this no longer 70 | # means anything so it reverts to bib order for LS3 and LS4 71 | # For this, have to reparse the .bcf otherwise the citekey order from previous 72 | # test is kept for things that are not sort distinguishable 73 | $biber->parse_ctrlfile('sort-uc.bcf'); 74 | $section = $biber->sections->get_section(0); 75 | $main = $biber->datalists->get_list('nty/global//global/global/global'); 76 | $biber->set_output_obj(Biber::Output::bbl->new()); 77 | 78 | $main->set_sortingtemplatename('ci'); 79 | $biber->prepare; 80 | is_deeply($main->get_keys, ['LS5', 'LS6','LS3', 'LS4','LS2','LS1'], 'sortcase locally false, upper_before_lower locally false'); 81 | 82 | -------------------------------------------------------------------------------- /t/tdata/annotations.bib: -------------------------------------------------------------------------------- 1 | @MISC{ann1, 2 | AUTHOR = {Last1, First1 and Last2, First2 and Last3, First3}, 3 | AUTHOR-an = {1:family=student;2=corresponding}, 4 | TITLE = {The Title}, 5 | TITLE-an = {=one, two}, 6 | LANGUAGE = {english and french}, 7 | LANGUAGE-an = {1=ann1; 2=ann2, ann3; =ann4} 8 | } 9 | 10 | @MISC{ann2, 11 | AUTHOR = {Last1, First1 and Last2, First2 and Last3, First3}, 12 | AUTHOR-an = {1:family="student";2=corresponding}, 13 | TITLE = {The Title}, 14 | TITLE-an:default = {="one"}, 15 | TITLE-an:french = {="un"}, 16 | LANGUAGE = {english and french}, 17 | LANGUAGE-an = {1=ann1; 2="ann2"; =ann4}, 18 | LANGUAGE-an:alt = {1=annx; 2="anny"; =annz} 19 | } 20 | -------------------------------------------------------------------------------- /t/tdata/biblatexml.bltxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | useprefix=false 6 | 7 | bltx1a1 8 | bltx1a2 9 | 10 | 11 | 12 | 13 | Павел 14 | Георгиевич 15 | 16 | Булгаков 17 | von 18 | 19 | 20 | 21 | Борис-ZZ 22 | Aбрамович 23 | 24 | Розенфельд 25 | von 26 | 27 | 28 | 29 | Ашраф 30 | Ахмедович 31 | 32 | Aхмедов 33 | 34 | 35 | 36 | 37 | Paul 38 | Smith 39 | 40 | 41 | 42 | 43 | John 44 | Brown 45 | 46 | 47 | 48 | 49 | John 50 | Brown 51 | 52 | 53 | Мухаммад ибн муса ал-Хорезми. Около 783 – около 850 54 | Москва 55 | Наука 56 | 57 | 58 | russian 59 | 60 | 61 | Научно-биографическая литература 62 | usera 63 | userb 64 | userc 65 | userd 66 | a 67 | 198X 68 | -0356 69 | 70 | 1990-05-16 71 | 1990-05-17 72 | 73 | 74 | 1991~ 75 | 76 | 77 | 240 78 | 79 | 80 | 81 | 1 82 | 10 83 | 84 | 85 | 30 86 | 34 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | names-ann 96 | names-ann3 97 | name-ann1 98 | name-ann2 99 | namepart-ann1 100 | namepart-ann2 101 | field-ann1 102 | list-ann1 103 | item-ann1 104 | 105 | 106 | -------------------------------------------------------------------------------- /t/tdata/bibtex-aliases.bib: -------------------------------------------------------------------------------- 1 | @PHDTHESIS{alias1, 2 | AUTHOR = {Sammy Student}, 3 | TITLE = {Four Years Later}, 4 | INSTITUTION = {University of Life}, 5 | ADDRESS = {Ivory Towers}, 6 | DATE = {2003-10-01}, 7 | } 8 | 9 | % driver-defined default map to MISC 10 | @THING{alias2, 11 | AUTHOR = {Samuel Strange}, 12 | TITLE = {Entitled}, 13 | ADDRESS = {Ivory Towers}, 14 | SCHOOL = {University of West Grantham}, 15 | INSTITUTION = {University of East Grantham}, 16 | DATE = {2004-03-03}, 17 | } 18 | 19 | % User-defined map to CUSTOMB 20 | @CHAT{alias3, 21 | AUTHOR = {Samuel Strange}, 22 | TITLE = {Hello}, 23 | } 24 | 25 | % User-defined map to CUSTOMA plus some alsosets (see tests) 26 | @CONVERSATION{alias4, 27 | AUTHOR = {Samuel Strange}, 28 | TITLE = {Hello}, 29 | PARTICIPANT = {Sam Smith}, 30 | VERBC = {sometext}, 31 | PUBMEDID = {anid}, 32 | } 33 | 34 | % User-defined map of string replacements and null maps 35 | @UNPUBLISHED{alias5, 36 | ABSTRACT = {Some abstract %50 of which is useless}, 37 | AUTHOR = {AAA and BBB and CCC and DDD and EEE}, 38 | TITLE = {A title}, 39 | DATE = {2003}, 40 | USERB = {test}, 41 | LISTA = {list test}, 42 | LISTB = {late and early}, 43 | LISTC = {late and early}, 44 | } 45 | 46 | % No target, just field additions 47 | @MISC{alias6, 48 | AUTHOR = {Brian Broom}, 49 | TITLE = {Bristles} 50 | } 51 | 52 | % No regexp match 53 | % Also testing append mode 54 | @REPORT{alias7, 55 | LISTA = {listaval}, 56 | VERBA = {val1}, 57 | VERBB = {val2}, 58 | VERBC = {val3} 59 | } 60 | 61 | @REPORT{alias8, 62 | VERBA = {val2}, 63 | VERBB = {val2} 64 | } 65 | -------------------------------------------------------------------------------- /t/tdata/datalists.bib: -------------------------------------------------------------------------------- 1 | @ARTICLE{K1, 2 | AUTHOR = {Aaron Adamson}, 3 | TITLE = {Artificial Advice}, 4 | PUBLISHER = {Aardvark Press}, 5 | LOCATION = {Arlington}, 6 | YEAR = {1995}, 7 | VERBA = {String} 8 | } 9 | 10 | @BOOK{K2, 11 | AUTHOR = {Brian Bully}, 12 | TITLE = {Lucid Lamas}, 13 | PUBLISHER = {Aardvark Press}, 14 | LOCATION = {Arlington}, 15 | YEAR = {1971}, 16 | } 17 | 18 | @PHDTHESIS{K3, 19 | ENTRYSUBTYPE = {rubbish}, 20 | AUTHOR = {Richard Radiator}, 21 | TITLE = {Zenos Things}, 22 | LOCATION = {Cambridge}, 23 | YEAR = {1953}, 24 | } 25 | 26 | @BOOK{K4, 27 | AUTHOR = {Linda Lucid}, 28 | TITLE = {Collation is cruel}, 29 | PUBLISHER = {Stuff and Nonesense Press}, 30 | LOCATION = {London}, 31 | YEAR = {1999}, 32 | KEYWORDS = {key1, key2} 33 | } 34 | 35 | @BOOK{K5, 36 | AUTHOR = {Slippery Zånny}, 37 | TITLE = {Silent Slippers}, 38 | PUBLISHER = {Footwear Folios}, 39 | LOCATION = {London}, 40 | YEAR = {1932}, 41 | } 42 | 43 | @BOOK{K6, 44 | OPTIONS = {nametemplates=global}, 45 | AUTHOR = {Slippery Zznny}, 46 | TITLE = {People Prefer Packages to Post}, 47 | PUBLISHER = {Terrible Typists}, 48 | LOCATION = {Grimsby}, 49 | YEAR = {1945}, 50 | } 51 | 52 | % In es_ES_trad, title comes after K4 as "ch" sorts between "c" and "d" 53 | @BOOK{K7, 54 | AUTHOR = {Simon Spaniard}, 55 | TITLE = {Collation is chilling}, 56 | YEAR = {1906} 57 | } 58 | 59 | % Testing locales at sortitem level 60 | % K8, K9, K10 all in in en_US 61 | % K9, K8, K10 when NOTE is es_ES_trad 62 | @BOOK{K8, 63 | AUTHOR = {Terrance Tremble}, 64 | TITLE = {Collation is chilling}, 65 | NOTE = {Collation is chilling}, 66 | KEYWORDS = {key1} 67 | } 68 | 69 | @BOOK{K9, 70 | AUTHOR = {Terrance Tremble}, 71 | TITLE = {Collation is chilling}, 72 | NOTE = {Collation is cruel}, 73 | KEYWORDS = {key1} 74 | } 75 | 76 | @BOOK{K10, 77 | AUTHOR = {Terrance Tremble}, 78 | TITLE = {Collation is cruel}, 79 | KEYWORDS = {key1} 80 | } 81 | 82 | % Testing dateparts as ints 83 | @BOOK{D1, 84 | DATE = {-0380} 85 | } 86 | 87 | @BOOK{D2, 88 | DATE = {-0385} 89 | } 90 | 91 | @BOOK{D3, 92 | DATE = {-0388} 93 | } 94 | 95 | @BOOK{D4, 96 | DATE = {2005} 97 | } 98 | 99 | @BOOK{D5, 100 | DATE = {0380} 101 | } 102 | 103 | % 1985 104 | @BOOK{D6, 105 | YEAR = {MCMLXXXV} 106 | } 107 | 108 | % 1987 in Sanskrit 109 | @BOOK{D7, 110 | YEAR = {१९८७} 111 | } 112 | -------------------------------------------------------------------------------- /t/tdata/datalists.bltxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Xavier 8 | Xanax 9 | 10 | 11 | One 12 | Moscow 13 | Publisher 14 | 1983 15 | 16 | 17 | 18 | 19 | Arthur 20 | Allen 21 | 22 | 23 | Two 24 | Moscow 25 | Publisher 26 | 1983 27 | 28 | 29 | -------------------------------------------------------------------------------- /t/tdata/dm-constraints.bib: -------------------------------------------------------------------------------- 1 | % Not a valid type 2 | % Valid gender 3 | @BADTYPE{c1, 4 | AUTHOR = {Clive Constraint}, 5 | TITLE = {Limits of Things}, 6 | DATE = {2003-10-01}, 7 | GENDER = {sm} 8 | } 9 | 10 | % Completely nonexistent field and field (alias) not valid for this type 11 | % Testing a field valid for all entrytypes (ABSTRACT) 12 | % Testing missing mandatory field 13 | @ETA{c2, 14 | TITLE = {Limits of Things}, 15 | DATE = {2003-10-01}, 16 | BADFIELD = {Something}, 17 | JOURNAL = {Some journal}, 18 | ABSTRACT = {Some text} 19 | } 20 | 21 | % Datatype constraint - wrong month format 22 | % Randomly named field 23 | % Invalid gender 24 | @ETB{c3, 25 | AUTHOR = {Clive Constraint}, 26 | TITLE = {Limits of Things}, 27 | JOURNAL = {Some journal}, 28 | YEAR = {2003}, 29 | MONTH = {WRONG FORMAT}, 30 | FIELD1 = {7}, 31 | GENDER = {zz} 32 | } 33 | 34 | % Datatype constraint - wrong month format (range) 35 | % Randomly named field with custom range (integer) 36 | @ETB{c4, 37 | AUTHOR = {Clive Constraint}, 38 | TITLE = {Limits of Things}, 39 | JOURNAL = {Some journal}, 40 | YEAR = {2003}, 41 | MONTH = {14}, 42 | FIELD1 = {4} 43 | } 44 | 45 | % Conditional checks 46 | % XOR mandatory check - DATE and YEAR are both defined 47 | % all 2,3,4 -> none 5,6 (fail) 48 | @ETB{c5, 49 | AUTHOR = {Clive Constraint}, 50 | TITLE = {Limits of Things}, 51 | JOURNAL = {Some journal}, 52 | DATE = {2004-01-02}, 53 | YEAR = {2003}, 54 | FIELD2 = {a}, 55 | FIELD3 = {a}, 56 | FIELD4 = {a}, 57 | FIELD5 = {a}, 58 | FIELD6 = {a}, 59 | } 60 | 61 | % Conditional checks 62 | % all 2,3,4 -> none 5,6 (pass) (because antecedent is not satisfied) 63 | % all 1,2 -> one 7,8 (fail) 64 | % all 5,6 -> all 9,10 (fail) 65 | @ETB{c6, 66 | AUTHOR = {Clive Constraint}, 67 | TITLE = {Limits of Things}, 68 | JOURNAL = {Some journal}, 69 | YEAR = {2003}, 70 | FIELD1 = {8}, 71 | FIELD2 = {a}, 72 | FIELD3 = {a}, 73 | FIELD5 = {a}, 74 | FIELD6 = {a}, 75 | FIELD9 = {a} 76 | } 77 | 78 | % Conditional checks 79 | % one 2,3 -> none 4 (pass) 80 | % one 5,6 -> none 7 (fail) 81 | % one 2,3 -> all 8,9 (pass) 82 | % one 10,11 -> one 5 (pass) 83 | % Mandatory OR check - one of FIELDA or FIELDB must be present (fail) 84 | @ETC{c7, 85 | AUTHOR = {Clive Constraint}, 86 | TITLE = {Limits of Things}, 87 | JOURNAL = {Some journal}, 88 | YEAR = {2003}, 89 | FIELD2 = {a}, 90 | FIELD3 = {a}, 91 | FIELD5 = {a}, 92 | FIELD7 = {a}, 93 | FIELD8 = {a}, 94 | FIELD9 = {a}, 95 | FIELD11 = {a}, 96 | } 97 | 98 | % Conditional checks 99 | % none 2,3 -> none 4 (fail) 100 | % none 7 -> none 5 (pass) as antecedent is false 101 | % none 8,9 -> one 10,11 (fail) 102 | % none 6 -> all 12,13 (fail) 103 | % Mandatory OR check - one of FIELDA or FIELDB must be present 104 | % (both are, testing different from XOR) (pass) 105 | @ETD{c8, 106 | AUTHOR = {Clive Constraint}, 107 | TITLE = {Limits of Things}, 108 | JOURNAL = {Some journal}, 109 | YEAR = {2003}, 110 | FIELD4 = {a}, 111 | FIELD5 = {a}, 112 | FIELD7 = {a}, 113 | FIELD12 = {a}, 114 | FIELDA = {a}, 115 | FIELDB = {a}, 116 | } 117 | 118 | % ISBN and ISSN checks 119 | @MISC{c9, 120 | AUTHOR = {Fred Flummox}, 121 | ISBN = {90-70002-34-5}, 122 | ISSN = {0317-8471}, 123 | } 124 | 125 | @MISC{c10, 126 | AUTHOR = {Fred Flummox}, 127 | ISBN = {90-7002-34-5}, 128 | ISSN = {0317-8470}, 129 | } 130 | -------------------------------------------------------------------------------- /t/tdata/encoding1.bib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plk/biber/5a08af00293def408a373b25fcc3a0d8e7c2b441/t/tdata/encoding1.bib -------------------------------------------------------------------------------- /t/tdata/encoding2.bib: -------------------------------------------------------------------------------- 1 | % This is a UTF-8 encoded file 2 | @BOOK{testŠ, 3 | YEAR = {1999}, 4 | AUTHOR = {Edward Encalcer}, 5 | TITLE = {Šome title}, 6 | PUBLISHER = {A press} 7 | } 8 | -------------------------------------------------------------------------------- /t/tdata/encoding3.bib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plk/biber/5a08af00293def408a373b25fcc3a0d8e7c2b441/t/tdata/encoding3.bib -------------------------------------------------------------------------------- /t/tdata/encoding4.bib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plk/biber/5a08af00293def408a373b25fcc3a0d8e7c2b441/t/tdata/encoding4.bib -------------------------------------------------------------------------------- /t/tdata/encoding5.bib: -------------------------------------------------------------------------------- 1 | % This is a UTF-8 encoded file 2 | @BOOK{test, 3 | AUTHOR = {Edward Encalcer}, 4 | YEAR = {1999}, 5 | TITLE = {à titlé}, 6 | PUBLISHER = {A press} 7 | } 8 | -------------------------------------------------------------------------------- /t/tdata/encoding6.bib: -------------------------------------------------------------------------------- 1 | % This is a UTF-8 encoded file 2 | @BOOK{test, 3 | AUTHOR = {Edward Encalcer}, 4 | YEAR = {1999}, 5 | TITLE = {↑à titlé}, 6 | PUBLISHER = {A press} 7 | } 8 | -------------------------------------------------------------------------------- /t/tdata/extradate.bib: -------------------------------------------------------------------------------- 1 | @BOOK{L1, 2 | AUTHOR = {John Doe}, 3 | TITLE = {Title 1}, 4 | PUBLISHER = {Oxford}, 5 | YEAR = {1995}, 6 | } 7 | 8 | @BOOK{L2, 9 | AUTHOR = {John Doe}, 10 | TITLE = {Title 2}, 11 | PUBLISHER = {Oxford}, 12 | YEAR = {1995}, 13 | } 14 | 15 | @BOOK{L3, 16 | AUTHOR = {John Doe}, 17 | TITLE = {Title 3}, 18 | PUBLISHER = {Oxford}, 19 | YEAR = {1995}, 20 | } 21 | 22 | @BOOK{L4, 23 | AUTHOR = {John Doe and Albert Abrahams}, 24 | TITLE = {Title 1}, 25 | PUBLISHER = {Oxford}, 26 | YEAR = {1995}, 27 | } 28 | 29 | @BOOK{L5, 30 | AUTHOR = {John Doe and Albert Abrahams}, 31 | TITLE = {Title 2}, 32 | PUBLISHER = {Oxford}, 33 | YEAR = {1995}, 34 | } 35 | 36 | @BOOK{L6, 37 | AUTHOR = {John Doe and Albert Abrahams}, 38 | TITLE = {Title 1}, 39 | PUBLISHER = {Oxford}, 40 | YEAR = {1996}, 41 | } 42 | 43 | @BOOK{L7, 44 | AUTHOR = {John Doe and Albert Abrahams}, 45 | TITLE = {Title 2}, 46 | PUBLISHER = {Oxford}, 47 | YEAR = {1996}, 48 | } 49 | 50 | @BOOK{L8, 51 | AUTHOR = {Bill Shakespeare}, 52 | TITLE = {Works}, 53 | PUBLISHER = {Oxford}, 54 | DATE = {1985}, 55 | } 56 | 57 | @BOOK{L9, 58 | TITLE = {Title with no author}, 59 | DATE = {1985}, 60 | } 61 | 62 | @BOOK{L10, 63 | TITLE = {Another title with no author}, 64 | DATE = {1985}, 65 | } 66 | 67 | @BOOK{companion1, 68 | AUTHOR = {Goossens, M. and Mittelbach, F. and Samarin, A.}, 69 | DATE = {1994}, 70 | TITLE = {Some title} 71 | } 72 | 73 | @BOOK{companion2, 74 | AUTHOR = {Goossens, M. and Mittelbach, F.}, 75 | YEAR = {1994}, 76 | TITLE = {Some title} 77 | } 78 | 79 | @BOOK{companion3, 80 | AUTHOR = {Goossens, M.}, 81 | DATE = {1994}, 82 | TITLE = {Some title} 83 | } 84 | 85 | @BOOK{vangennep, 86 | OPTIONS = {useprefix}, 87 | AUTHOR = {van Gennep, Arnold}, 88 | DATE = {1909}, 89 | TITLE = {Some title} 90 | } 91 | 92 | @BOOK{gennep, 93 | AUTHOR = {van Gennep, Arnold}, 94 | DATE = {1909}, 95 | TITLE = {Some title} 96 | } 97 | 98 | @BOOK{LY1, 99 | AUTHOR = {Arthur Example}, 100 | DATE = {2006/2009}, 101 | TITLE = {Some title} 102 | } 103 | 104 | @BOOK{LY2, 105 | AUTHOR = {Arthur Example}, 106 | DATE = {2006}, 107 | TITLE = {Some title} 108 | } 109 | 110 | @BOOK{LY3, 111 | AUTHOR = {Arthur Example}, 112 | DATE = {2006/}, 113 | TITLE = {Some title} 114 | } 115 | 116 | % Testing no date 117 | @BOOK{nodate1, 118 | AUTHOR = {Neil Nodate}, 119 | TITLE = {Testing}, 120 | } 121 | 122 | @BOOK{nodate2, 123 | AUTHOR = {Neil Nodate}, 124 | TITLE = {Testing 2}, 125 | } 126 | 127 | % Testing custom scopes for extradate 128 | @BOOK{ed1, 129 | AUTHOR = {Percival Prudent}, 130 | DATE = {2001-01-03} 131 | } 132 | 133 | @BOOK{ed2, 134 | AUTHOR = {Percival Prudent}, 135 | DATE = {2001-02-03} 136 | } 137 | 138 | @BOOK{ed3, 139 | AUTHOR = {Randolph Reluctant}, 140 | DATE = {2001} 141 | } 142 | 143 | @BOOK{ed4, 144 | AUTHOR = {Randolph Reluctant}, 145 | DATE = {2001} 146 | } 147 | 148 | @BOOK{ed5, 149 | AUTHOR = {Quentin Querulous}, 150 | DATE = {2001-01-03T15:00:00} 151 | } 152 | 153 | @BOOK{ed6, 154 | AUTHOR = {Quentin Querulous}, 155 | DATE = {2001-01-03T15:00:00} 156 | } 157 | 158 | @BOOK{ed7, 159 | AUTHOR = {Stephen Swarve}, 160 | DATE = {2001-01-03} 161 | } 162 | 163 | @BOOK{ed8, 164 | AUTHOR = {Stephen Swarve}, 165 | DATE = {2001-01-03/} 166 | } 167 | 168 | 169 | -------------------------------------------------------------------------------- /t/tdata/extratitle.bib: -------------------------------------------------------------------------------- 1 | @BOOK{L1, 2 | AUTHOR = {John Doe}, 3 | TITLE = {Title 1}, 4 | YEAR = {1995}, 5 | } 6 | 7 | @BOOK{L2, 8 | AUTHOR = {John Doe}, 9 | TITLE = {Title 1}, 10 | YEAR = {1996}, 11 | } 12 | 13 | @BOOK{L3, 14 | TITLE = {Title 2}, 15 | YEAR = {1995}, 16 | } 17 | 18 | @BOOK{L4, 19 | TITLE = {Title 2}, 20 | YEAR = {1995}, 21 | } 22 | 23 | @BOOK{L5, 24 | TITLE = {Title 1}, 25 | YEAR = {1995}, 26 | } 27 | 28 | @BOOK{L6, 29 | SHORTTITLE = {Title A}, 30 | TITLE = {Title 3}, 31 | YEAR = {1995}, 32 | } 33 | 34 | @BOOK{L7, 35 | TITLE = {Title A}, 36 | YEAR = {1995}, 37 | } 38 | 39 | @BOOK{L8, 40 | AUTHOR = {Billy Brown}, 41 | TITLE = {Title A}, 42 | YEAR = {1934} 43 | } 44 | 45 | @BOOK{L9, 46 | AUTHOR = {Billy Brown}, 47 | TITLE = {Title B}, 48 | YEAR = {1932} 49 | } 50 | 51 | @BOOK{L10, 52 | AUTHOR = {Clive Cautious}, 53 | TITLE = {Title A}, 54 | YEAR = {1946} 55 | } 56 | 57 | @BOOK{L11, 58 | TITLE = {Titular Titilation}, 59 | YEAR = {1946} 60 | } 61 | 62 | @BOOK{L12, 63 | YEAR = {1943} 64 | } 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /t/tdata/extratitleyear.bib: -------------------------------------------------------------------------------- 1 | @BOOK{L1, 2 | TITLE = {Title 1}, 3 | YEAR = {1995}, 4 | PUBLISHER = {puba} 5 | } 6 | 7 | @BOOK{L2, 8 | TITLE = {Title 1}, 9 | YEAR = {1995}, 10 | PUBLISHER = {pubb} 11 | } 12 | 13 | @BOOK{L3, 14 | AUTHOR = {Jim Smith}, 15 | YEAR = {1995}, 16 | } 17 | 18 | @BOOK{L4, 19 | TITLE = {Title 1}, 20 | YEAR = {1996}, 21 | } 22 | 23 | @BOOK{L5, 24 | SHORTTITLE = {Title A}, 25 | TITLE = {Title 1}, 26 | YEAR = {1995}, 27 | } 28 | 29 | @BOOK{LY1, 30 | AUTHOR = {Arthur Example}, 31 | DATE = {2006/2009}, 32 | TITLE = {Some title} 33 | } 34 | 35 | @BOOK{LY2, 36 | AUTHOR = {Arthur Example}, 37 | DATE = {2006}, 38 | TITLE = {Some title} 39 | } 40 | 41 | @BOOK{LY3, 42 | AUTHOR = {Arthur Example}, 43 | DATE = {2006/}, 44 | TITLE = {Some title} 45 | } 46 | -------------------------------------------------------------------------------- /t/tdata/full-bbl.bbl: -------------------------------------------------------------------------------- 1 | % $ biblatex auxiliary file $ 2 | % $ biblatex bbl format version 3.3 $ 3 | % Do not modify the above lines! 4 | % 5 | % This is an auxiliary file used by the 'biblatex' package. 6 | % This file may safely be deleted. It will be recreated by 7 | % biber as required. 8 | % 9 | \begingroup 10 | \makeatletter 11 | \@ifundefined{ver@biblatex.sty} 12 | {\@latex@error 13 | {Missing 'biblatex' package} 14 | {The bibliography requires the 'biblatex' package.} 15 | \aftergroup\endinput} 16 | {} 17 | \endgroup 18 | 19 | 20 | \refsection{0} 21 | \datalist[entry]{custom/global//global/global/global} 22 | \entry{F1}{book}{}{} 23 | \name{author}{1}{}{% 24 | {{un=0,uniquepart=base,hash=bd051a2f7a5f377e3a62581b0e0f8577}{% 25 | family={Doe}, 26 | familyi={D\bibinitperiod}, 27 | given={John}, 28 | giveni={J\bibinitperiod}, 29 | givenun=0}}% 30 | } 31 | \strng{namehash}{bd051a2f7a5f377e3a62581b0e0f8577} 32 | \strng{fullhash}{bd051a2f7a5f377e3a62581b0e0f8577} 33 | \strng{fullhashraw}{bd051a2f7a5f377e3a62581b0e0f8577} 34 | \strng{bibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} 35 | \strng{authorbibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} 36 | \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577} 37 | \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577} 38 | \strng{authorfullhashraw}{bd051a2f7a5f377e3a62581b0e0f8577} 39 | \field{labelalpha}{\emph{A}} 40 | \field{sortinit}{A} 41 | \field{sortinithash}{2f401846e2029bad6b3ecc16d50031e2} 42 | \true{singletitle} 43 | \field{labelnamesource}{author} 44 | \field{labeltitlesource}{title} 45 | \field{shorthand}{\emph{A}} 46 | \field{title}{The Fullness of Times} 47 | \field{year}{1995} 48 | \endentry 49 | \enddatalist 50 | \datalist[list]{shorthand/global//global/global/global} 51 | \entry{F1}{book}{}{} 52 | \name{author}{1}{}{% 53 | {{un=0,uniquepart=base,hash=bd051a2f7a5f377e3a62581b0e0f8577}{% 54 | family={Doe}, 55 | familyi={D\bibinitperiod}, 56 | given={John}, 57 | giveni={J\bibinitperiod}, 58 | givenun=0}}% 59 | } 60 | \strng{namehash}{bd051a2f7a5f377e3a62581b0e0f8577} 61 | \strng{fullhash}{bd051a2f7a5f377e3a62581b0e0f8577} 62 | \strng{fullhashraw}{bd051a2f7a5f377e3a62581b0e0f8577} 63 | \strng{bibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} 64 | \strng{authorbibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} 65 | \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577} 66 | \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577} 67 | \strng{authorfullhashraw}{bd051a2f7a5f377e3a62581b0e0f8577} 68 | \field{labelalpha}{\emph{A}} 69 | \field{sortinit}{A} 70 | \field{sortinithash}{2f401846e2029bad6b3ecc16d50031e2} 71 | \true{singletitle} 72 | \field{labelnamesource}{author} 73 | \field{labeltitlesource}{title} 74 | \field{shorthand}{\emph{A}} 75 | \field{title}{The Fullness of Times} 76 | \field{year}{1995} 77 | \endentry 78 | \enddatalist 79 | \datalist[entry]{nty/global//global/global/global} 80 | \entry{F1}{book}{}{} 81 | \name{author}{1}{}{% 82 | {{un=0,uniquepart=base,hash=bd051a2f7a5f377e3a62581b0e0f8577}{% 83 | family={Doe}, 84 | familyi={D\bibinitperiod}, 85 | given={John}, 86 | giveni={J\bibinitperiod}, 87 | givenun=0}}% 88 | } 89 | \strng{namehash}{bd051a2f7a5f377e3a62581b0e0f8577} 90 | \strng{fullhash}{bd051a2f7a5f377e3a62581b0e0f8577} 91 | \strng{fullhashraw}{bd051a2f7a5f377e3a62581b0e0f8577} 92 | \strng{bibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} 93 | \strng{authorbibnamehash}{bd051a2f7a5f377e3a62581b0e0f8577} 94 | \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577} 95 | \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577} 96 | \strng{authorfullhashraw}{bd051a2f7a5f377e3a62581b0e0f8577} 97 | \field{labelalpha}{\emph{A}} 98 | \field{sortinit}{D} 99 | \field{sortinithash}{6f385f66841fb5e82009dc833c761848} 100 | \true{singletitle} 101 | \field{labelnamesource}{author} 102 | \field{labeltitlesource}{title} 103 | \field{shorthand}{\emph{A}} 104 | \field{title}{The Fullness of Times} 105 | \field{year}{1995} 106 | \endentry 107 | \enddatalist 108 | \keyalias{F1a}{F1} 109 | \missing{C1} 110 | \endrefsection 111 | \endinput 112 | 113 | -------------------------------------------------------------------------------- /t/tdata/full-bbl.bib: -------------------------------------------------------------------------------- 1 | @BOOK{F1, 2 | IDS = {F1a}, 3 | SHORTHAND = {\emph{A}}, 4 | SORTSHORTHAND = {A}, 5 | AUTHOR = {John Doe}, 6 | TITLE = {The Fullness of Times}, 7 | YEAR = {1995} 8 | } 9 | 10 | % Duplicate key. Should be reported via a warning 11 | @MISC{F1, 12 | AUTHOR = {Frank Frill}, 13 | TITLE = {Dresses for Gentlemen}, 14 | YEAR = {1997} 15 | } 16 | 17 | % Mismatched cased key. Should be reported via a warning 18 | @BOOK{f1, 19 | AUTHOR = {Someone Else}, 20 | TITLE = {The Case of the Duplicitous Duplicate}, 21 | YEAR = {1996} 22 | } 23 | 24 | @MISC{c1, 25 | AUTHOR = {Benny Balgreen}, 26 | TITLE = {Names We Invent}, 27 | YEAR = {1900} 28 | } -------------------------------------------------------------------------------- /t/tdata/full-bibtex_biber.bib: -------------------------------------------------------------------------------- 1 | @STRING{JCHPH = "J.~Chem. Phys."} 2 | 3 | @INCOLLECTION{westfahl:space, 4 | AUTHOR = {Westfahl, Gary}, 5 | 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}, 6 | CROSSREF = {westfahl:frontier}, 7 | INDEXTITLE = {True Frontier, The}, 8 | LANGID = {english}, 9 | LANGIDOPTS = {variant=american}, 10 | PAGES = {55--65}, 11 | SUBTITLE = {Confronting and Avoiding the Realities of Space in American Science Fiction Films}, 12 | TITLE = {The True Frontier}, 13 | } 14 | 15 | @ARTICLE{kastenholz, 16 | 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).}, 17 | AUTHOR = {Kastenholz, M. A. and Hünenberger, Philippe H.}, 18 | 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}, 19 | DATE = {2006}, 20 | DOI = {10.1063/1.2172593}, 21 | EID = {124106}, 22 | INDEXTITLE = {Computation of ionic solvation free energies}, 23 | JOURNALTITLE = JCHPH, 24 | LANGID = {english}, 25 | LANGIDOPTS = {variant=american}, 26 | SUBTITLE = {I. The electrostatic potential in molecular liquids}, 27 | TITLE = {Computation of methodology\hyphen independent ionic solvation free energies from molecular simulations}, 28 | VOLUME = {124}, 29 | } 30 | 31 | @COLLECTION{westfahl:frontier, 32 | EDITOR = {Westfahl, Gary}, 33 | LOCATION = {Westport, Conn. and London}, 34 | PUBLISHER = {Greenwood}, 35 | 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}, 36 | BOOKSUBTITLE = {The Frontier Theme in Science Fiction}, 37 | BOOKTITLE = {Space and Beyond}, 38 | DATE = {2000}, 39 | LANGID = {english}, 40 | LANGIDOPTS = {variant=american}, 41 | SUBTITLE = {The Frontier Theme in Science Fiction}, 42 | TITLE = {Space and Beyond}, 43 | } 44 | 45 | -------------------------------------------------------------------------------- /t/tdata/labelalphaname.bib: -------------------------------------------------------------------------------- 1 | @BOOK{lant1, 2 | AUTHOR = {Arthur Smith} 3 | } 4 | 5 | % per-entry 6 | @BOOK{lant2, 7 | OPTIONS = {labelalphanametemplatename=test2}, 8 | AUTHOR = {Arthur Smith} 9 | } 10 | 11 | % per-namelist 12 | @BOOK{lant3, 13 | AUTHOR = {labelalphanametemplatename=test3 and given=Arthur, family=Smith} 14 | } 15 | 16 | % per-name 17 | @BOOK{lant4, 18 | AUTHOR = {labelalphanametemplatename=test4, given=Arthur, family=Smith} 19 | } 20 | 21 | @BOOK{lant5, 22 | AUTHOR = {Galatius, Smith and Randal Williams, Oscar} 23 | } 24 | 25 | @BOOK{lant6, 26 | AUTHOR = {Galatius, Smith and Randal-Williams, Oscar} 27 | } 28 | -------------------------------------------------------------------------------- /t/tdata/maps.bib: -------------------------------------------------------------------------------- 1 | @ARTICLE{maps1, 2 | AUTHOR = {John Doe}, 3 | YEAR = {1995} 4 | } 5 | 6 | @ARTICLE{maps2, 7 | AUTHOR = {Bill Bran}, 8 | YEAR = {1996} 9 | } 10 | 11 | @COLLECTION{maps3, 12 | AUTHOR = {Marvin Map}, 13 | YEAR = {1945} 14 | } 15 | 16 | @BOOK{maps4, 17 | AUTHOR = {Alan Allele}, 18 | YEAR = {1995} 19 | } 20 | -------------------------------------------------------------------------------- /t/tdata/names.bib: -------------------------------------------------------------------------------- 1 | @BOOK{L1, 2 | AUTHOR = {Alfred Adler}, 3 | } 4 | 5 | % Testing explicit hash id setting, only possible with extended name format 6 | @BOOK{L1id, 7 | AUTHOR = {id=testid, given=Alfred, family=Adler}, 8 | } 9 | 10 | @BOOK{L2, 11 | AUTHOR = {Bertie B. Bull}, 12 | } 13 | 14 | @BOOK{L3, 15 | AUTHOR = {C. Z. Crop}, 16 | } 17 | 18 | @BOOK{L4, 19 | AUTHOR = {Derek D Decket}, 20 | } 21 | 22 | @BOOK{L5, 23 | AUTHOR = {Egbert von Eel}, 24 | } 25 | 26 | @BOOK{L6, 27 | AUTHOR = {Francis van der valt Frome}, 28 | } 29 | 30 | @BOOK{L7, 31 | AUTHOR = {Gregory R. van Gloom}, 32 | } 33 | 34 | @BOOK{L8, 35 | AUTHOR = {Henry F. van Henkel}, 36 | } 37 | 38 | @BOOK{L9, 39 | AUTHOR = {Ian {Iliad Ipswich}}, 40 | } 41 | 42 | @BOOK{L10, 43 | AUTHOR = {Jolly, III, James}, 44 | } 45 | 46 | @BOOK{L10a, 47 | AUTHOR = {Pimentel, Jr. ,Joseph J.}, 48 | } 49 | 50 | @BOOK{L11, 51 | AUTHOR = {van Kluster, Jr., Kevin}, 52 | } 53 | 54 | @BOOK{L12, 55 | AUTHOR = {Charles Louis Xavier Joseph de la Vall{\'e}e Poussin} 56 | } 57 | 58 | @BOOK{L13, 59 | AUTHOR = {Van de Graaff, R. J.} 60 | } 61 | 62 | @BOOK{L14, 63 | AUTHOR = {St John-Mollusc, Oliver} 64 | } 65 | 66 | @BOOK{L15, 67 | AUTHOR = {Roger P.{\,}G. van Gompel} 68 | } 69 | 70 | @BOOK{L16, 71 | AUTHOR = {Roger {P.\,G.} van Gompel} 72 | } 73 | 74 | @BOOK{L17, 75 | AUTHOR = {Lovecraft, Bill H.{\,}P.}, 76 | } 77 | 78 | @BOOK{L18, 79 | AUTHOR = {Lovecraft, Bill {H.\,P.}}, 80 | } 81 | 82 | @BOOK{L19, 83 | AUTHOR = {Mustermann, Klaus-Peter}, 84 | } 85 | 86 | @BOOK{L19a, 87 | AUTHOR = {Lam, Ho-Pun}, 88 | } 89 | 90 | @BOOK{L20, 91 | AUTHOR = {{John Henry} Ford}, 92 | } 93 | 94 | @BOOK{L21, 95 | AUTHOR = {{\v S}omeone Smith}, 96 | } 97 | 98 | @BOOK{L22, 99 | AUTHOR = {Someone {\v S}mith}, 100 | } 101 | 102 | @BOOK{L23, 103 | AUTHOR = {Šomeone Smith}, 104 | } 105 | 106 | @BOOK{L24, 107 | AUTHOR = {Someone Šmith}, 108 | } 109 | 110 | @BOOK{L25, 111 | AUTHOR = {{American Psychological Association, Task Force on the Sexualization of Girls}}, 112 | } 113 | @BOOK{L26, 114 | AUTHOR = {{Sci-Art Publishers}} 115 | } 116 | 117 | % Should skip the first name as it has too many commas 118 | %@BOOK{L27, 119 | % AUTHOR = {Smith, Jr., Bill, Lee und James Smith} 120 | %} 121 | 122 | % This causes Text::BibTeX <=0.4 to segfault 123 | %@BOOK{L28, 124 | % AUTHOR = {Deux et al.,, O.} 125 | %} 126 | 127 | % Should be ok as escaped. Text::BibTeX < 0.41 has a bug however and replaces 128 | % the third comma with a space. 129 | @BOOK{L29, 130 | AUTHOR = {{U.S. Department of Health and Human Services, National Institute of Mental Health, National Heart, Lung and Blood Institute}} 131 | } 132 | 133 | % The protected {M} causes problems for the btparse library so we strip this in biber 134 | @BOOK{L30, 135 | AUTHOR = {E. S. El-{M}allah} 136 | } 137 | 138 | % Make sure when we replace ties, we don't accidentally strip this ... 139 | @BOOK{L31, 140 | AUTHOR = {{\~ Z}elly, Arthur}, 141 | EDITOR = {{\~Z}elly, Arthur}, 142 | TRANSLATOR = {{\~{Z}}elly, Arthur} 143 | } 144 | 145 | % Checking visibility of "and others" (with custom "and" and "others") 146 | @BOOK{V1, 147 | AUTHOR = {Alan Author und Steven Secondauthor und andere}, 148 | } 149 | 150 | @BOOK{V2, 151 | AUTHOR = {Alan Author und andere}, 152 | } 153 | 154 | % Checking uniqueprimaryauthor 155 | 156 | @BOOK{upa1, 157 | AUTHOR = {Alan Miffed and Russel Beast} 158 | } 159 | 160 | @BOOK{upa2, 161 | AUTHOR = {Russel Beast and Alan Miffed} 162 | } 163 | 164 | @BOOK{upa3, 165 | AUTHOR = {Robert Beast and Brian Scorched} 166 | } 167 | 168 | @BOOK{upa4, 169 | AUTHOR = {Deutsch, J. A. and Deutsch, Diana}, 170 | } 171 | -------------------------------------------------------------------------------- /t/tdata/names_x.bib: -------------------------------------------------------------------------------- 1 | @BOOK{L1, 2 | AUTHOR = {Alfred Adler}, 3 | } 4 | 5 | @BOOK{L2, 6 | AUTHOR = {Bertie B. Bull}, 7 | } 8 | 9 | @BOOK{L3, 10 | AUTHOR = {C. Z. Crop}, 11 | } 12 | 13 | @BOOK{L4, 14 | AUTHOR = {Derek D Decket}, 15 | } 16 | 17 | @BOOK{L5, 18 | AUTHOR = {Egbert von Eel}, 19 | } 20 | 21 | @BOOK{L6, 22 | AUTHOR = {Francis van der valt Frome}, 23 | } 24 | 25 | @BOOK{L7, 26 | AUTHOR = {Gregory R. van Gloom}, 27 | } 28 | 29 | @BOOK{L8, 30 | AUTHOR = {Henry F. van Henkel}, 31 | } 32 | 33 | @BOOK{L9, 34 | AUTHOR = {Ian {Iliad Ipswich}}, 35 | } 36 | 37 | @BOOK{L10, 38 | AUTHOR = {Jolly, III, James}, 39 | } 40 | 41 | @BOOK{L10a, 42 | AUTHOR = {Pimentel, Jr. ,Joseph J.}, 43 | } 44 | 45 | @BOOK{L11, 46 | AUTHOR = {van Kluster, Jr., Kevin}, 47 | } 48 | 49 | @BOOK{L12, 50 | AUTHOR = {Charles Louis Xavier Joseph de la Vall{\'e}e Poussin} 51 | } 52 | 53 | @BOOK{L13, 54 | AUTHOR = {Van de Graaff, R. J.} 55 | } 56 | 57 | @BOOK{L14, 58 | AUTHOR = {St John-Mollusc, Oliver} 59 | } 60 | 61 | @BOOK{L15, 62 | AUTHOR = {Roger P.{\,}G. van Gompel} 63 | } 64 | 65 | @BOOK{L16, 66 | AUTHOR = {Roger {P.\,G.} van Gompel} 67 | } 68 | 69 | @BOOK{L17, 70 | AUTHOR = {Lovecraft, Bill H.{\,}P.}, 71 | } 72 | 73 | @BOOK{L18, 74 | AUTHOR = {Lovecraft, Bill {H.\,P.}}, 75 | } 76 | 77 | @BOOK{L19, 78 | AUTHOR = {Mustermann, Klaus-Peter}, 79 | } 80 | 81 | @BOOK{L19a, 82 | AUTHOR = {Lam, Ho-Pun}, 83 | } 84 | 85 | @BOOK{L20, 86 | AUTHOR = {{John Henry} Ford}, 87 | } 88 | 89 | @BOOK{L21, 90 | AUTHOR = {{\v S}omeone Smith}, 91 | } 92 | 93 | @BOOK{L22, 94 | AUTHOR = {Someone {\v S}mith}, 95 | } 96 | 97 | @BOOK{L23, 98 | AUTHOR = {Šomeone Smith}, 99 | } 100 | 101 | @BOOK{L24, 102 | AUTHOR = {Someone Šmith}, 103 | } 104 | 105 | @BOOK{L25, 106 | AUTHOR = {{American Psychological Association, Task Force on the Sexualization of Girls}}, 107 | } 108 | @BOOK{L26, 109 | AUTHOR = {{Sci-Art Publishers}} 110 | } 111 | -------------------------------------------------------------------------------- /t/tdata/options.bib: -------------------------------------------------------------------------------- 1 | @BOOK{L1, 2 | AUTHOR = {John Doe}, 3 | TITLE = {Title 1}, 4 | PUBLISHER = {Oxford}, 5 | ORIGDATE = {1985-10-30}, 6 | DATE = {1998-04-05}, 7 | KEYWORDS = {one|two|three} 8 | } 9 | 10 | % testing custom xsvsep 11 | @BOOK{L2, 12 | OPTIONS = {maxnames=3|maxitems=2|maxalphanames=10}, 13 | AUTHOR = {Ellison Edwards}, 14 | TITLE = {Title 2}, 15 | PUBLISHER = {Oxford}, 16 | DATE = {1998-04-05}, 17 | } 18 | 19 | @BOOK{L3, 20 | OPTIONS = {blah=10}, 21 | AUTHOR = {Bunty Bluntford}, 22 | TITLE = {Title 3}, 23 | PUBLISHER = {Oxford}, 24 | DATE = {1999-04-05}, 25 | } 26 | -------------------------------------------------------------------------------- /t/tdata/related.bib: -------------------------------------------------------------------------------- 1 | @ARTICLE{key1, 2 | IDS = {key1alias}, 3 | RELATED = {key2,key3,missing1}, 4 | RELATEDTYPE = {reprintas}, 5 | AUTHOR = {Author}, 6 | TITLE = {Original Title}, 7 | JOURNALTITLE = {Journal Title}, 8 | VOLUME = {12}, 9 | NUMBER = {5}, 10 | DATE = {1998}, 11 | PAGES = {125--150}, 12 | SHORTHAND = {RK1} 13 | } 14 | 15 | @INBOOK{key2, 16 | RELATED = {key1alias}, 17 | RELATEDTYPE = {reprintof}, 18 | RELATEDSTRING = {First}, 19 | AUTHOR = {Author}, 20 | TITLE = {Reprint Title}, 21 | BOOKTITLE = {Booktitle}, 22 | LOCATION = {Location}, 23 | PUBLISHER = {Publisher}, 24 | DATE = {2009-02?}, 25 | PAGES = {34--60}, 26 | SHORTHAND = {RK2} 27 | } 28 | 29 | @INBOOK{key3, 30 | RELATED = {key4}, 31 | RELATEDTYPE = {translationof}, 32 | AUTHOR = {Author}, 33 | TITLE = {Reprint Title}, 34 | BOOKTITLE = {Booktitle}, 35 | LOCATION = {Location}, 36 | PUBLISHER = {Publisher2}, 37 | DATE = {-2010-01~}, 38 | PAGES = {33--57}, 39 | SHORTHAND = {RK3} 40 | } 41 | 42 | @INBOOK{key4, 43 | OPTIONS = {useeditor=false,uniquename=false}, 44 | XDATA = {key4xd}, 45 | TITLE = {Orig Language Title}, 46 | BOOKTITLE = {Booktitle}, 47 | LOCATION = {Location}, 48 | PUBLISHER = {Publisher2}, 49 | DATE = {2011-22}, 50 | PAGES = {33--57}, 51 | SHORTHAND = {RK4} 52 | } 53 | 54 | % Make sure XDATA information is inherited by related clones 55 | @XDATA{key4xd, 56 | AUTHOR = {Author} 57 | } 58 | 59 | @BOOK{c1, 60 | RELATED = {c2}, 61 | } 62 | 63 | @BOOK{c2, 64 | RELATED = {c3, missing2}, 65 | } 66 | 67 | @BOOK{c3, 68 | RELATED = {c2, missing3}, 69 | } 70 | 71 | % Test custom relatedoptions 72 | @BOOK{s1, 73 | AUTHOR = {Author}, 74 | title = {Title 1} 75 | } 76 | 77 | @BOOK{s2, 78 | AUTHOR = {Author}, 79 | TITLE = {Title 2}, 80 | RELATED = {s1}, 81 | RELATEDSTRING = {Related Book:}, 82 | RELATEDOPTIONS = {dataonly,skipbib=false,usecustom=false} 83 | } 84 | 85 | @BOOK{kullback, 86 | AUTHOR = {Kullback, Solomon}, 87 | TITLE = {Information Theory and Statistics}, 88 | YEAR = 1959, 89 | PUBLISHER = {John Wiley \& Sons}, 90 | LOCATION = {New York}, 91 | LANGID = {english}, 92 | LANGIDOPTS = {variant=american}, 93 | } 94 | 95 | @BOOK{kullback:related, 96 | AUTHOR = {Kullback, Solomon}, 97 | TITLE = {Information Theory and Statistics}, 98 | YEAR = 1997, 99 | PUBLISHER = {Dover Publications}, 100 | LOCATION = {New York}, 101 | LANGID = {english}, 102 | LANGIDOPTS = {variant=american}, 103 | RELATED = {kullback}, 104 | RELATEDTYPE = {origpubin}, 105 | ANNOTATION = {A reprint of the \texttt{kullback} entry. Note the format of 106 | the \texttt{related} and \texttt{relatedtype} fields}, 107 | } 108 | -------------------------------------------------------------------------------- /t/tdata/sections1.bib: -------------------------------------------------------------------------------- 1 | @PREAMBLE{"Štring for Preamble 1"} 2 | 3 | @STRING{STRING1 = {value1}} 4 | 5 | @ARTICLE{sect1, 6 | SHORTHAND = {AA}, 7 | AUTHOR = {Aaron Adamson}, 8 | TITLE = {Artificial Advice}, 9 | PUBLISHER = {Aardvark Press}, 10 | LOCATION = {Arlington}, 11 | VOLUME = {4}, 12 | YEAR = {1995}, 13 | NOTE = STRING1 14 | } 15 | 16 | @ARTICLE{sect2, 17 | SHORTHAND = {BB}, 18 | AUTHOR = {Brian Britherthwaite}, 19 | TITLE = {Best Barnacled Boat Bottoms}, 20 | PUBLISHER = {British Bulldog Press}, 21 | LOCATION = {Bridlington}, 22 | YEAR = {2004}, 23 | } 24 | 25 | @ARTICLE{sectall1, 26 | AUTHOR = {Alan All}, 27 | TITLE = {Alternative Alternations}, 28 | PUBLISHER = {Average Aunt Press}, 29 | LOCATION = {Allertron}, 30 | YEAR = {2004}, 31 | } 32 | 33 | 34 | @PREAMBLE{"String for Preamble 2"} -------------------------------------------------------------------------------- /t/tdata/sections2.bib: -------------------------------------------------------------------------------- 1 | @ARTICLE{sect3, 2 | AUTHOR = {Clive Clumberton}, 3 | TITLE = {Clumsy Cultural Caveats}, 4 | SUBTITLE = {Counter-cultural Concepts}, 5 | PUBLISHER = {Clapp and Clopp Press}, 6 | LOCATION = {Cambridge}, 7 | YEAR = {1914}, 8 | } 9 | 10 | @ARTICLE{sect8, 11 | SHORTHAND = {JJ}, 12 | AUTHOR = {Jimmy Johnson}, 13 | TITLE = {Jovial Jamborees}, 14 | PUBLISHER = {Jasper and Jiff}, 15 | LOCATION = {Johannesburg}, 16 | YEAR = {1938}, 17 | } 18 | 19 | @PREAMBLE{"String for Preamble 3"} -------------------------------------------------------------------------------- /t/tdata/sections3.bib: -------------------------------------------------------------------------------- 1 | @STRING{STRING1 = {value2}} 2 | 3 | @BOOK{sect4, 4 | SHORTHAND = {DDDD}, 5 | AUTHOR = {Derek Ditherington and David Dumpton}, 6 | TITLE = {Dangerous Dames}, 7 | SUBTITLE = {Don't Dally Dude!}, 8 | PUBLISHER = {Dright and Drought Press}, 9 | LOCATION = {Dunbar}, 10 | YEAR = {2003}, 11 | NOTE = STRING1 12 | } 13 | 14 | @BOOK{sect5, 15 | SHORTHAND = {EE}, 16 | SORTKEY = {aaaaaaa}, 17 | AUTHOR = {Edward E. Ethoxon}, 18 | TITLE = {Eating Evil Enemies}, 19 | PUBLISHER = {Ethical Encouragement Press}, 20 | LOCATION = {Edinburgh}, 21 | YEAR = {2007}, 22 | } 23 | -------------------------------------------------------------------------------- /t/tdata/sections4.bib: -------------------------------------------------------------------------------- 1 | @BOOK{sect6, 2 | SHORTHAND = {MMMM}, 3 | AUTHOR = {Michael Mumford and Millie Mutherington}, 4 | TITLE = {Malodourous Muffins}, 5 | PUBLISHER = {Ming and Mink Press}, 6 | LOCATION = {Manchester}, 7 | YEAR = {2003}, 8 | } 9 | 10 | @PREAMBLE{"String for Preamble 4"} 11 | 12 | @BOOK{sect7, 13 | SHORTHAND = {PP}, 14 | AUTHOR = {Percy Pilkington}, 15 | TITLE = {Perhaps Penguins Prance}, 16 | PUBLISHER = {Possible Prattle Press}, 17 | LOCATION = {Pimlico}, 18 | YEAR = {2007}, 19 | } 20 | -------------------------------------------------------------------------------- /t/tdata/sets.bib: -------------------------------------------------------------------------------- 1 | @SET{Elias1955, 2 | ENTRYSET = {Elias1955aALIAS,Elias1955b}, 3 | CROSSREF = {Elias1955a} 4 | } 5 | 6 | % Also test of month hacking - should be forced to "03" by the bibtex driver 7 | @ARTICLE{Elias1955a, 8 | IDS = {Elias1955aALIAS}, 9 | AUTHOR = {Elias, P.}, 10 | TITLE = {Predictive coding--I}, 11 | JOURNAL = {IRE Transactions on Information Theory}, 12 | YEAR = {1955}, 13 | VOLUME = {1}, 14 | PAGES = {16-24}, 15 | NUMBER = {1}, 16 | MONTH = {March}, 17 | DOI = {10.1109/TIT.1955.1055126}, 18 | ENTRYSET = {Elias1955}, 19 | ISSN = {0096-1000}, 20 | } 21 | 22 | % Also test of month hacking - should be forced to "03" by the bibtex driver 23 | @ARTICLE{Elias1955b, 24 | AUTHOR = {Elias, P.}, 25 | TITLE = {Predictive coding--II}, 26 | JOURNAL = {IRE Transactions on Information Theory}, 27 | YEAR = {1955}, 28 | VOLUME = {1}, 29 | PAGES = {24-33}, 30 | NUMBER = {1}, 31 | MONTH = {Mar.}, 32 | DOI = {10.1109/TIT.1955.1055116}, 33 | ENTRYSET = {Elias1955}, 34 | ISSN = {0096-1000}, 35 | } 36 | 37 | @SET{Static1, 38 | ENTRYSET = {Static2alias, Static3, Static4, missing1}, 39 | SHORTHAND = {STAT1}, 40 | ANNOTATION = {Some notes} 41 | } 42 | 43 | @BOOK{Static2, 44 | IDS = {Somealias, Static2alias}, 45 | AUTHOR = {Brian Bumble}, 46 | TITLE = {Blessed Brains}, 47 | YEAR = {2001}, 48 | ANNOTATION = {Some Blessed Note} 49 | } 50 | 51 | @BOOK{Static3, 52 | AUTHOR = {Derek Dingle}, 53 | TITLE = {Castles and Crime}, 54 | YEAR = {2002} 55 | } 56 | 57 | @BOOK{Static4, 58 | AUTHOR = {Clive Crenellation}, 59 | TITLE = {Dungeons, Dark and Dangerous}, 60 | YEAR = {2005} 61 | } 62 | 63 | @BOOK{Dynamic1, 64 | AUTHOR = {Derek Dynamism}, 65 | TITLE = {Doing Daring Deeds}, 66 | YEAR = {2002}, 67 | ANNOTATION = {Some Dynamic Note}, 68 | SHORTHAND = {d1} 69 | } 70 | 71 | @BOOK{Dynamic2, 72 | AUTHOR = {Brian Bunting}, 73 | TITLE = {Beautiful Birthdays}, 74 | YEAR = {2010}, 75 | SHORTHAND = {d2} 76 | } 77 | 78 | @BOOK{Dynamic3, 79 | IDS = {Dynamic3alias}, 80 | AUTHOR = {Roger Regardless}, 81 | TITLE = {Reckless Ravishings}, 82 | YEAR = {2000}, 83 | SHORTHAND = {d3} 84 | } 85 | -------------------------------------------------------------------------------- /t/tdata/skips.bib: -------------------------------------------------------------------------------- 1 | @ARTICLE{skip1, 2 | OPTIONS = {skipbib}, 3 | AUTHOR = {John Doe}, 4 | SHORTHAND = {AFS}, 5 | TITLE = {Algorithms For Sorting}, 6 | PUBLISHER = {A press}, 7 | LOCATION = {Cambridge}, 8 | YEAR = {1994}, 9 | } 10 | 11 | @ARTICLE{skip2, 12 | OPTIONS = {skipbiblist}, 13 | SHORTHAND = {SA}, 14 | AUTHOR = {John Doe}, 15 | TITLE = {Sorting Algorithms}, 16 | PUBLISHER = {A press}, 17 | LOCATION = {Cambridge}, 18 | YEAR = {1995}, 19 | } 20 | 21 | @ARTICLE{skip3, 22 | OPTIONS = {skipbiblist,skiplab}, 23 | SHORTHAND = {SWA}, 24 | AUTHOR = {John Doe}, 25 | TITLE = {Sorting With Algorithms}, 26 | PUBLISHER = {A press}, 27 | LOCATION = {Cambridge}, 28 | YEAR = {1934}, 29 | } 30 | 31 | @ARTICLE{skip4, 32 | OPTIONS = {dataonly}, 33 | SHORTHAND = {AWS}, 34 | AUTHOR = {John Doe}, 35 | TITLE = {Algorithms Which Sort}, 36 | PUBLISHER = {A press}, 37 | LOCATION = {Cambridge}, 38 | YEAR = {1932}, 39 | } 40 | 41 | @SET{seta, 42 | ENTRYSET = {set:membera,set:memberb,set:memberc} 43 | } 44 | 45 | @BOOK{set:membera, 46 | KEYWORDS = {key1, key2}, 47 | AUTHOR = {Doe, John}, 48 | TITLE = {Set Member A}, 49 | DATE = {2010}, 50 | } 51 | 52 | @BOOK{set:memberb, 53 | AUTHOR = {Doe, John}, 54 | TITLE = {Set Member B}, 55 | DATE = {2010}, 56 | } 57 | 58 | @BOOK{set:memberc, 59 | AUTHOR = {Doe, John}, 60 | TITLE = {Set Member C}, 61 | DATE = {2010}, 62 | } 63 | 64 | @BOOK{noseta, 65 | AUTHOR = {Doe, John}, 66 | TITLE = {Stand-Alone A}, 67 | DATE = {2010}, 68 | } 69 | 70 | @BOOK{nosetb, 71 | AUTHOR = {Doe, John}, 72 | TITLE = {Stand-Alone B}, 73 | DATE = {2010}, 74 | } 75 | 76 | @BOOK{nosetc, 77 | AUTHOR = {Doe, John}, 78 | TITLE = {Stand-Alone C}, 79 | DATE = {2010}, 80 | } 81 | 82 | -------------------------------------------------------------------------------- /t/tdata/skipsg.bib: -------------------------------------------------------------------------------- 1 | @BOOK{S1, 2 | OPTIONS = {dataonly=false}, 3 | AUTHOR = {John Doe and Albert Abrahams}, 4 | TITLE = {Title 1}, 5 | PUBLISHER = {Oxford}, 6 | YEAR = {1995}, 7 | } 8 | 9 | @BOOK{S2, 10 | OPTIONS = {skiplab=false, skipbib=false}, 11 | AUTHOR = {John Doe and Albert Abrahams}, 12 | TITLE = {Title 2}, 13 | PUBLISHER = {Oxford}, 14 | YEAR = {1995}, 15 | } 16 | 17 | @BOOK{S3, 18 | AUTHOR = {John Doe and Albert Abrahams}, 19 | TITLE = {Title 3}, 20 | PUBLISHER = {Oxford}, 21 | YEAR = {1995}, 22 | } 23 | -------------------------------------------------------------------------------- /t/tdata/sort-case.bib: -------------------------------------------------------------------------------- 1 | % Test of U::C case sensitivity and case ordering 2 | @BOOK{CS1, 3 | AUTHOR = {Albert, Edwin}, 4 | TITLE = {TITLE} 5 | } 6 | 7 | @BOOK{CS2, 8 | AUTHOR = {albert, Edwin}, 9 | TITLE = {title} 10 | } 11 | 12 | @BOOK{CS3, 13 | AUTHOR = {Albert, edwin}, 14 | TITLE = {The title} 15 | } 16 | -------------------------------------------------------------------------------- /t/tdata/sort-names.bib: -------------------------------------------------------------------------------- 1 | @ARTICLE{N1, 2 | AUTHOR = {Smith, Z.}, 3 | } 4 | 5 | @ARTICLE{N2, 6 | AUTHOR = {Smith de Jones, Z.}, 7 | } 8 | 9 | @ARTICLE{N3, 10 | AUTHOR = {Smith-Jones, Z.}, 11 | } 12 | 13 | @ARTICLE{N4, 14 | AUTHOR = {de Smith, Z.}, 15 | } 16 | 17 | -------------------------------------------------------------------------------- /t/tdata/sort-order.bib: -------------------------------------------------------------------------------- 1 | @ARTICLE{L1, 2 | AUTHOR = {Aaron Adamson}, 3 | TITLE = {Artificial Advice}, 4 | PUBLISHER = {Aardvark Press}, 5 | LOCATION = {Arlington}, 6 | VOLUME = {4}, 7 | YEAR = {1995}, 8 | } 9 | 10 | @ARTICLE{L1A, 11 | AUTHOR = {Aaron Adamson}, 12 | TITLE = {Anarchic Ambidexstrous Anomalies}, 13 | PUBLISHER = {Aardvark Press}, 14 | LOCATION = {Arlington}, 15 | VOLUME = {40}, 16 | YEAR = {1995}, 17 | } 18 | 19 | @ARTICLE{L1B, 20 | AUTHOR = {Aaron Adazki}, 21 | TITLE = {Average Attitudes Are Awful}, 22 | PUBLISHER = {Aardvark Press}, 23 | LOCATION = {Arlington}, 24 | YEAR = {1984}, 25 | } 26 | 27 | @ARTICLE{L2, 28 | AUTHOR = {Brian Britherthwaite}, 29 | TITLE = {Best Barnacled Boat Bottoms}, 30 | PUBLISHER = {British Bulldog Press}, 31 | LOCATION = {Bridlington}, 32 | YEAR = {2004}, 33 | } 34 | 35 | @ARTICLE{L3, 36 | AUTHOR = {Clive Clumberton}, 37 | TITLE = {Clumsy Cultural Caveats}, 38 | SUBTITLE = {Counter-cultural Concepts}, 39 | PUBLISHER = {Clapp and Clopp Press}, 40 | LOCATION = {Cambridge}, 41 | YEAR = {1914}, 42 | } 43 | 44 | @BOOK{L4, 45 | AUTHOR = {Derek Ditherington and David Dumpton}, 46 | TITLE = {Dangerous Dames}, 47 | SUBTITLE = {Don't Dally Dude!}, 48 | PUBLISHER = {Dright and Drought Press}, 49 | LOCATION = {Dunbar}, 50 | YEAR = {2003}, 51 | } 52 | 53 | @BOOK{L5, 54 | SORTKEY = {aaaaaaa}, 55 | AUTHOR = {Edward E. Ethoxon}, 56 | TITLE = {Eating Evil Enemies}, 57 | PUBLISHER = {Ethical Encouragement Press}, 58 | LOCATION = {Edinburgh}, 59 | YEAR = {2007}, 60 | } 61 | 62 | @BOOK{L6, 63 | AUTHOR = {Richard F. Rank}, 64 | TITLE = {Ruminating on Rhubarb}, 65 | PUBLISHER = {Red, Raw and Raucous}, 66 | LOCATION = {edinburgh}, 67 | YEAR = {2011}, 68 | } 69 | 70 | @BOOK{L7, 71 | AUTHOR = {Peter Pettigrew}, 72 | TITLE = {The Pretending Peanuts Pout}, 73 | PUBLISHER = {Nut Press}, 74 | LOCATION = {Edinburgh}, 75 | YEAR = {2010}, 76 | } 77 | 78 | @BOOK{L8, 79 | AUTHOR = {Lawrence Langour}, 80 | TITLE = {Why Walnuts Won't}, 81 | PUBLISHER = {Nut Press}, 82 | LOCATION = {Edinburgh}, 83 | YEAR = {2009}, 84 | } 85 | 86 | @BOOK{L9, 87 | AUTHOR = {Steven Sensible}, 88 | TITLE = {Sorting Sucks Eggs}, 89 | PUBLISHER = {Yolk Enterprises}, 90 | LOCATION = {London} 91 | } 92 | -------------------------------------------------------------------------------- /t/tdata/sort-uc.bib: -------------------------------------------------------------------------------- 1 | % Test of U::C tailoring - Swedish - in UCA, å and ä are sorted before z but should be after 2 | @BOOK{LS1, 3 | AUTHOR = {Slippery, Zänny}, 4 | TITLE = {Silent Slippers}, 5 | PUBLISHER = {Footwear Folios}, 6 | LOCATION = {London}, 7 | YEAR = {1932}, 8 | SHORTHAND = {SZä} 9 | } 10 | 11 | @BOOK{LS2, 12 | AUTHOR = {Slippery, Zznny}, 13 | TITLE = {People Prefer Packages to Post}, 14 | PUBLISHER = {Terrible Typists}, 15 | LOCATION = {Grimsby}, 16 | YEAR = {1945}, 17 | SHORTHAND = {SZå} 18 | } 19 | 20 | @BOOK{LS3, 21 | AUTHOR = {Slippery, Zönny}, 22 | TITLE = {Last Lingering Lemons}, 23 | PUBLISHER = {Fruit Folios}, 24 | LOCATION = {Catterick}, 25 | YEAR = {1966}, 26 | SHORTHAND = {SZo} 27 | } 28 | 29 | % Upper before lower false 30 | @BOOK{LS4, 31 | AUTHOR = {Slippery, Zönny}, 32 | TITLE = {last lingering lemons}, 33 | PUBLISHER = {Fruit Folios}, 34 | LOCATION = {Catterick}, 35 | YEAR = {1966}, 36 | SHORTHAND = {SZo} 37 | } 38 | 39 | @BOOK{LS5, 40 | AUTHOR = {Slippery, Zanny}, 41 | YEAR = {1989}, 42 | } 43 | 44 | % Surname is substring so should be first 45 | @BOOK{LS6, 46 | AUTHOR = {Slippery, Zan}, 47 | YEAR = {1988}, 48 | } 49 | -------------------------------------------------------------------------------- /t/tdata/sort.bib: -------------------------------------------------------------------------------- 1 | @BOOK{L1, 2 | SHORTHAND = {\emph{A}}, 3 | SORTSHORTHAND = {A}, 4 | AUTHOR = {John Doe}, 5 | TITLE = {Algorithms For Sorting}, 6 | PUBLISHER = {A press}, 7 | LOCATION = {Cambridge}, 8 | YEAR = {1995}, 9 | } 10 | 11 | @BOOK{L2, 12 | SHORTHAND = {B}, 13 | AUTHOR = {John Doe}, 14 | TITLE = {Sorting Algorithms}, 15 | PUBLISHER = {A press}, 16 | LOCATION = {Cambridge}, 17 | YEAR = {1995}, 18 | } 19 | 20 | @BOOK{L3, 21 | SHORTHAND = {C}, 22 | AUTHOR = {John Doe}, 23 | TITLE = {More and More Algorithms}, 24 | PUBLISHER = {A press}, 25 | LOCATION = {Cambridge}, 26 | YEAR = {1995}, 27 | } 28 | 29 | @BOOK{L4, 30 | SHORTHAND = {D}, 31 | AUTHOR = {John Doe and others}, 32 | TITLE = {Some title about sorting}, 33 | PUBLISHER = {Another press}, 34 | LOCATION = {Cambridge}, 35 | YEAR = {1995}, 36 | } 37 | 38 | @BOOK{L5, 39 | SHORTHAND = {E}, 40 | AUTHOR = {John Doe and others}, 41 | TITLE = {Some other title about sorting}, 42 | PUBLISHER = {Another press}, 43 | LOCATION = {Cambridge}, 44 | YEAR = {1995}, 45 | } 46 | -------------------------------------------------------------------------------- /t/tdata/tool-testconfig.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 5 | 6 | 7 | citeorderX 8 | 9 | 10 | 11 | 12 | newliteralfield 13 | month 14 | 15 | 16 | newliteralfield 17 | 18 | 19 | xyz 20 | 21 | 22 | xyz 23 | author 24 | title 25 | 26 | 27 | abc 28 | 29 | 30 | book 31 | bookzzz 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /t/tdata/tool.bib: -------------------------------------------------------------------------------- 1 | @UNPUBLISHED{i3Š, 2 | OPTIONS = {useprefix=false}, 3 | ABSTRACT = {Some abstract %50 of which is useless}, 4 | AUTHOR = {AAA and BBB and CCC and DDD and EEE}, 5 | TITLE = {Š title}, 6 | DATE = {2003}, 7 | USERB = {test}, 8 | LOCATION = {one and two}, 9 | LISTA = {list test}, 10 | LISTB = {late and early}, 11 | LISTC = {late and early}, 12 | KEYWORDS = {keyword, keyword2,keyword3}, 13 | } 14 | 15 | @COMMENT{Comment 1} 16 | 17 | @BOOK{xd1, 18 | AUTHOR = {Edward Paul Ellington}, 19 | XDATA = {macmillanalias, missingxd} 20 | } 21 | 22 | @XDATA{macmillan, 23 | IDS = {macmillanalias}, 24 | YEAR = {2001}, 25 | XDATA = {macmillan:pubALIAS, macmillan:loc} 26 | } 27 | 28 | @COMMENT{ Comment 2 } 29 | 30 | @XDATA{macmillan:pub, 31 | IDS = {macmillan:pubALIAS}, 32 | PUBLISHER = {Macmillan} 33 | } 34 | 35 | @XDATA{macmillan:loc, 36 | LOCATION = {New York and London}, 37 | NOTE = {A Note} 38 | } 39 | 40 | @COMMENT{jabref-meta: groupstree: 41 | 0 AllEntriesGroup:; 42 | 1 ExplicitGroup:Doktorandkurser\;2\;; 43 | 2 KeywordGroup:Från könsroll till genus\;0\;course\;UCGS Från könsrolltill genus\;0\;0\;; 44 | 2 KeywordGroup:Historiska och filosofiska perspektiv på psykologi\;0\;course\;Historiska och filosofiska perspektiv på psykologi\;0\;0\;; 45 | 2 KeywordGroup:Kurs i introduktion\;0\;course\;Kurs i introduktion\;0\;0\;; 46 | 2 KeywordGroup:Fenomenologi, kön och genus\;0\;course\;UCGS Fenomenologi\;0\;0\;; 47 | 2 KeywordGroup:Quantitative Research Methods\;0\;course\;QMR\;0\;0\;; 48 | 2 KeywordGroup:Multivariate Analysis\;0\;course\;MVA\;1\;0\;; 49 | } 50 | 51 | @BOOK{b1, 52 | TITLE = {Booktitle}, 53 | TITLE+an = {=ann1, ann2}, 54 | LOCATION = {London and Edinburgh}, 55 | LOCATION+an = {1=ann1; 2=ann2}, 56 | YEAR = {1999}, 57 | CROSSREF = {mvalias} 58 | } 59 | 60 | @MVBOOK{mv1, 61 | IDS = {mvalias}, 62 | TITLE = {Maintitle}, 63 | SUBTITLE = {Mainsubtitle}, 64 | TITLEADDON = {Maintitleaddon} 65 | } 66 | 67 | % Test reconstructing datetimes 68 | @BOOK{dt1, 69 | DATE = {2004-04-25T14:34:00/2004-04-05T14:37:06}, 70 | ORIGDATE = {2004-04-25T14:34:00Z/2004-04-05T14:34:05Z}, 71 | EVENTDATE = {2004-04-25T14:34:00+05:00/2004-04-05T15:34:00+05:00}, 72 | URLDATE = {2004-04-25T14:34:00/2004-04-05T15:00:00} 73 | } 74 | 75 | @ARTICLE{m1, 76 | DATE = {2017}, 77 | JOURNALTITLE = {A Journal}, 78 | } 79 | 80 | % mincrossrefs is 2 by default and so "baz" would be added automatically 81 | % but it doesn't exist. This shouldn't cause an error as "baz" should be 82 | % weeded out before it is references and this test is to make sure it is 83 | % and that these two entries are processed as normal 84 | @BOOK{badcr1, 85 | AUTHOR = {Foo}, 86 | TITLE = {Foo}, 87 | DATE = {2019}, 88 | CROSSREF = {baz} 89 | } 90 | 91 | @BOOK{badcr2, 92 | AUTHOR = {Bar}, 93 | TITLE = {Bar}, 94 | DATE = {2019}, 95 | CROSSREF = {baz} 96 | } 97 | 98 | % Test of skipping entry due to bad name with consecutive 'and' 99 | @MISC {badname, 100 | AUTHOR = {John Smith and and Terry Brown} 101 | } 102 | 103 | % Granular XDATA tests 104 | @BOOK{gxd1, 105 | AUTHOR = {Simon Smith and xdata=gxd2-author-1}, % Picks name 1 106 | EDITOR = {xdata=gxd2-editor-2}, 107 | TITLE = {xdata=gxd4-title}, 108 | LOCATION = {xdata=gxd3-location-1 and B}, % Picks list element 1 109 | PUBLISHER = {xdata=gxd2}, % malformed (unspecified field)- output literally 110 | NOTE = {xdata=gxd2-note}, % malformed (missing field) - output literally 111 | TRANSLATOR = {xdata=gxd2-author-3}, % malformed (bad position) - output literally 112 | LISTA = {xdata=gxd3-location-5}, % malformed (bad position) - output literally 113 | ADDENDUM = {xdata=missing}, % malformed (missing entry) - output literally 114 | ORGANIZATION = {xdata=gxd2-author-3} % malformed (incompatible types)- output literally 115 | } 116 | 117 | @XDATA{gxd2, 118 | AUTHOR = {Brian Bloom and Arthur Anderson}, 119 | EDITOR = {William Wool and xdata=gxd4-editor-1} 120 | } 121 | 122 | @XDATA{gxd3, 123 | LOCATION = {A and C} 124 | } 125 | 126 | @XDATA{gxd4, 127 | EDITOR = {Frank Frill}, 128 | TITLE = {Some title} 129 | } 130 | 131 | @BOOK{bo1, 132 | IDS = {box1,box2}, 133 | AUTHOR = {Simon Smith} 134 | } 135 | 136 | @STRING{P = "Publisher"} 137 | @STRING{N = "NotUsed"} 138 | 139 | @BOOK{ld1, 140 | AUTHOR = {AAA and BBB and CCC and DDD and EEE}, 141 | TITLE = {A title}, 142 | YEAR = {2003}, 143 | MONTH = {4}, 144 | PUBLISHER = P 145 | } 146 | -------------------------------------------------------------------------------- /t/tdata/translit.bib: -------------------------------------------------------------------------------- 1 | @MISC{kumāra, 2 | LANGID = {sanskrit}, 3 | TITLE = {kumāra} 4 | } 5 | 6 | @MISC{kṣetra, 7 | LANGID = {sanskrit}, 8 | TITLE = {kṣetra} 9 | } 10 | 11 | @MISC{kha, 12 | LANGID = {sanskrit}, 13 | TITLE = {kha} 14 | } 15 | 16 | @MISC{jīvita, 17 | LANGID = {sanskrit}, 18 | TITLE = {jīvita} 19 | } 20 | 21 | @MISC{jñāna, 22 | LANGID = {sanskrit}, 23 | TITLE = {jñāna} 24 | } 25 | 26 | @MISC{jvara, 27 | LANGID = {sanskrit}, 28 | TITLE = {jvara} 29 | } 30 | 31 | @MISC{tyāga, 32 | LANGID = {sanskrit}, 33 | TITLE = {tyāga} 34 | } 35 | 36 | @MISC{tridaśa, 37 | LANGID = {sanskrit}, 38 | TITLE = {tridaśa} 39 | } 40 | 41 | @MISC{tvid, 42 | LANGID = {sanskrit}, 43 | TITLE = {tvid} 44 | } 45 | 46 | @MISC{aachen, 47 | TITLE = {Aachen} 48 | } 49 | 50 | @MISC{augsburg, 51 | TITLE = {Augsburg} 52 | } 53 | 54 | @MISC{arnhem, 55 | TITLE = {Arnhem} 56 | } 57 | 58 | @MISC{avignon, 59 | TITLE = {Avignon} 60 | } 61 | 62 | @MISC{aix-en-provence, 63 | TITLE = {Aix-en-Provence} 64 | } 65 | 66 | @MISC{berlin, 67 | TITLE = {Berlin} 68 | } 69 | 70 | @MISC{utrecht, 71 | TITLE = {Utrecht} 72 | } 73 | 74 | @MISC{zeven, 75 | TITLE = {Zeven} 76 | } 77 | -------------------------------------------------------------------------------- /t/tdata/truncation.bib: -------------------------------------------------------------------------------- 1 | @BOOK{us1, 2 | AUTHOR = {Anne Elk}, 3 | TITLE = {A Theory on Brontosauruses}, 4 | DATE = {1972}, 5 | } 6 | 7 | @BOOK{us2, 8 | AUTHOR = {Anne Elk and others}, 9 | TITLE = {A Theory on Einiosauruses}, 10 | DATE = {1972}, 11 | } 12 | 13 | @BOOK{us3, 14 | AUTHOR = {Anne Uthor}, 15 | TITLE = {Title B}, 16 | DATE = {2000}, 17 | } 18 | 19 | @BOOK{us4, 20 | AUTHOR = {Anne Uthor and Editha Ditor and William Writer 21 | and Jane Doe}, 22 | TITLE = {Title A}, 23 | DATE = {2000}, 24 | } 25 | 26 | @BOOK{us5, 27 | AUTHOR = {Anne Uthor and Editha Ditor and William Writer 28 | and Jane Doe}, 29 | TITLE = {Title C}, 30 | DATE = {2000}, 31 | } 32 | 33 | 34 | 35 | @BOOK{us6, 36 | AUTHOR = {Roger Red}, 37 | TITLE = {Ragged Rubles}, 38 | DATE = {1971} 39 | } 40 | 41 | @MISC{us7, 42 | AUTHOR = {Roger Red and others}, 43 | TITLE = {Ragged Rupees}, 44 | DATE = {1971} 45 | } 46 | 47 | @BOOK{us8, 48 | AUTHOR = {Simon Sly}, 49 | TITLE = {Title B}, 50 | DATE = {2000}, 51 | } 52 | 53 | @BOOK{us9, 54 | OPTIONS = {nohashothers=false}, 55 | AUTHOR = {nosortothers=false and Simon Sly and Terrence Tremble and Mark Miserable 56 | and Jake Jolly}, 57 | TITLE = {Title A}, 58 | DATE = {2000} 59 | } 60 | 61 | @BOOK{us10, 62 | AUTHOR = {Simon Sly and Terrence Tremble and Mark Miserable 63 | and Jake Jolly}, 64 | TITLE = {Title C}, 65 | DATE = {2000} 66 | } -------------------------------------------------------------------------------- /t/tdata/uniqueness-nameparts.bib: -------------------------------------------------------------------------------- 1 | @ARTICLE {un1, 2 | AUTHOR = {given={John}, family={Smith}, middle={Simon}} 3 | } 4 | 5 | @ARTICLE {un2, 6 | AUTHOR = {given={John}, family={Smith}, middle={Alan}} 7 | } 8 | 9 | @ARTICLE {un3, 10 | AUTHOR = {given={John}, family={Smith}, middle={Arthur}} 11 | } 12 | 13 | @ARTICLE {un4, 14 | AUTHOR = {given={Alan}, family={Smith}, middle={Simon}} 15 | } 16 | 17 | % Per-entry 18 | @ARTICLE {un5, 19 | OPTIONS = {uniquenametemplatename=test3}, 20 | AUTHOR = {given={Arthur}, family={Smith}, middle={Simon}} 21 | } 22 | 23 | % Per-namelist 24 | @ARTICLE {un6, 25 | AUTHOR = {uniquenametemplatename=test4 and given={Arthur}, family={Smith}, middle={Smythe}} 26 | } 27 | 28 | % Per-name 29 | @ARTICLE {un7, 30 | AUTHOR = {uniquenametemplatename=test5, given={Arthur}, family={Smith}, middle={Smedley}} 31 | } 32 | -------------------------------------------------------------------------------- /t/tdata/uniqueness1.bib: -------------------------------------------------------------------------------- 1 | @ARTICLE{un1, 2 | AUTHOR = {John AAA}, 3 | YEAR = {1994}, 4 | } 5 | % Always good to have a repeated labelname entry as this is often an edge case 6 | @ARTICLE{un1a, 7 | AUTHOR = {John AAA}, 8 | YEAR = {1999}, 9 | } 10 | 11 | @ARTICLE{un2, 12 | AUTHOR = {J. AAA}, 13 | YEAR = {1999}, 14 | } 15 | 16 | % Per-namelist uniquename 17 | @ARTICLE{un3, 18 | AUTHOR = {uniquename=false and K. AAA}, 19 | YEAR = {1939}, 20 | } 21 | 22 | @ARTICLE{un4, 23 | AUTHOR = {Edward AAA}, 24 | YEAR = {1934}, 25 | } 26 | 27 | @ARTICLE{un4a, 28 | OPTIONS = {uniquename=false}, 29 | AUTHOR = {Edward AAA}, 30 | YEAR = {1934}, 31 | } 32 | 33 | @ARTICLE{un5, 34 | AUTHOR = {Jane AAA}, 35 | YEAR = {1983}, 36 | } 37 | 38 | % uniquelist not set because it's not ambiguous with un1 with max/minnames=1 because 39 | % un1 is "AAA" and un6 is "AAA et al". 40 | @ARTICLE{un6, 41 | AUTHOR = {John AAA and Mike BBB}, 42 | YEAR = {1921}, 43 | } 44 | 45 | @ARTICLE{un7, 46 | SHORTAUTHOR = {Chaps}, 47 | AUTHOR = {John AAA and Mike BBB}, 48 | YEAR = {1921}, 49 | } 50 | 51 | % test2 should have un=0 because minnames makes Brian Jones invisible 52 | @BOOK{test1, 53 | AUTHOR = {Paul Smith and Brian Jones and Peter Brown}, 54 | YEAR = {1900} 55 | } 56 | 57 | % Per-name uniquename 58 | @BOOK{test2, 59 | AUTHOR = {uniquename=false, given={Henry}, family={Jones}}, 60 | YEAR = {1903} 61 | } 62 | 63 | @MISC{test3, 64 | AUTHOR = {John Blether and John Doe}, 65 | DATE = {2011} 66 | } 67 | 68 | @MISC{test4, 69 | AUTHOR = {John Blether and Jane Doe}, 70 | DATE = {2011} 71 | } 72 | 73 | @MISC{test5, 74 | AUTHOR = {John Blether and Edward Doe}, 75 | DATE = {2011} 76 | } 77 | 78 | % Testing repeated entries for un=1 79 | @MISC{unt1, 80 | AUTHOR = {Jeremy Alton and Alan Rattle}, 81 | TITLE = {Title}, 82 | DATE = {2011} 83 | } 84 | 85 | @MISC{unt2, 86 | AUTHOR = {Jeremy Alton and Andrew Rattle}, 87 | TITLE = {Title}, 88 | DATE = {2011} 89 | } 90 | 91 | @MISC{unt3, 92 | AUTHOR = {Jeremy Alton and Edward Rattle}, 93 | TITLE = {Title}, 94 | DATE = {2011} 95 | } 96 | 97 | @MISC{unt4, 98 | AUTHOR = {Meredith Williams}, 99 | TITLE = {Title}, 100 | DATE = {2011} 101 | } 102 | 103 | @MISC{unt5, 104 | AUTHOR = {Michael Williams}, 105 | TITLE = {Title}, 106 | DATE = {2011} 107 | } 108 | 109 | 110 | % Testing repeated entries for un=2 111 | @MISC{untf1, 112 | AUTHOR = {Simon Monocle and Walter Ripple}, 113 | TITLE = {Title}, 114 | DATE = {2011} 115 | } 116 | 117 | @MISC{untf2, 118 | AUTHOR = {Simon Monocle and Walter Ripple}, 119 | TITLE = {Title}, 120 | DATE = {2011} 121 | } 122 | 123 | @MISC{untf3, 124 | AUTHOR = {Simon Monocle and William Ripple}, 125 | TITLE = {Title}, 126 | DATE = {2011} 127 | } 128 | 129 | % Testing prefices/suffices 130 | @MISC{sp1, 131 | AUTHOR = {Greaves, Jr., Percy L.}, 132 | TITLE = {Title}, 133 | DATE = {2011} 134 | } 135 | 136 | @MISC{sp2, 137 | AUTHOR = {Greaves, Jr., Percy L.}, 138 | TITLE = {Title2}, 139 | DATE = {2012} 140 | } 141 | 142 | @MISC{sp3, 143 | AUTHOR = {von Greaves, Jr., Percy L.}, 144 | TITLE = {Title1}, 145 | DATE = {2012} 146 | } 147 | 148 | @MISC{sp4, 149 | AUTHOR = {von Greaves, Jr., Percy L.}, 150 | TITLE = {Title2}, 151 | DATE = {2012} 152 | } 153 | 154 | % This counts as the same as sp1 and sp2 because of the useprefix=false 155 | @MISC{sp5, 156 | OPTIONS = {useprefix=false}, 157 | AUTHOR = {von Greaves, Jr., Percy L.}, 158 | TITLE = {Title2}, 159 | DATE = {2012} 160 | } 161 | 162 | @MISC{sp6, 163 | AUTHOR = {von Mises, Jr., Percy L.}, 164 | TITLE = {Title1}, 165 | DATE = {2010} 166 | } 167 | 168 | @MISC{sp7, 169 | AUTHOR = {von Mises, Jr., Paul L.}, 170 | TITLE = {Title1}, 171 | DATE = {2010} 172 | } 173 | 174 | @MISC{sp8, 175 | AUTHOR = {Ralley, Percy L.}, 176 | TITLE = {Title1}, 177 | DATE = {2010} 178 | } 179 | 180 | @MISC{sp9, 181 | AUTHOR = {Ralley, Jr., Percy L.}, 182 | TITLE = {Title1}, 183 | DATE = {2010} 184 | } 185 | 186 | -------------------------------------------------------------------------------- /t/tdata/uniqueness2.bib: -------------------------------------------------------------------------------- 1 | @ARTICLE{un8, 2 | AUTHOR = {Alan AAA and B. BBB and A. CCC}, 3 | } 4 | 5 | @ARTICLE{un9, 6 | AUTHOR = {Anthon AAA and B. BBB and B. CCC and A. DDD}, 7 | } 8 | 9 | @ARTICLE{un10, 10 | AUTHOR = {B. DDD}, 11 | } 12 | 13 | @ARTICLE{unapa1, 14 | AUTHOR = {Ireys, A. and Chernoff, A. and DeVet, A. and Kim, A.}, 15 | } 16 | 17 | @ARTICLE{unapa2, 18 | AUTHOR = {Ireys, A. and Chernoff, A. and Stein, A. and DeVet, A. and Silver, A.}, 19 | } 20 | 21 | @MISC{others1, 22 | AUTHOR = {NameA and NameB and others}, 23 | YEAR = {2011} 24 | } 25 | 26 | @MISC{others2, 27 | AUTHOR = {NameA and NameB and others}, 28 | YEAR = {2011} 29 | } 30 | 31 | % Two works by the same author list, should be no uniquelist 32 | @BOOK{unall1, 33 | AUTHOR = {Name11 and Name22 and Name33 and Name44 and Name55}, 34 | TITLE = {Title 1}, 35 | YEAR = {2011} 36 | } 37 | 38 | @BOOK{unall2, 39 | AUTHOR = {Name11 and Name22 and Name33 and Name44 and Name55}, 40 | TITLE = {Title 2}, 41 | YEAR = {2011} 42 | } 43 | 44 | % First namelist is subset of second, 45 | % maxnames=5 -> ul=undef and ul=6 respectively 46 | % maxnames=1 -> ul=5 and ul=6 respectively 47 | @BOOK{unall3, 48 | AUTHOR = {A111 and A222 and A333 and A444 and A555}, 49 | YEAR = {2011} 50 | } 51 | 52 | @BOOK{unall4, 53 | AUTHOR = {A111 and A222 and A333 and A444 and A555 and A666}, 54 | YEAR = {2011} 55 | } 56 | 57 | % Two lists with same authors, one differing in last place 58 | % ul=5 59 | @BOOK{unall5, 60 | AUTHOR = {Name1 and Name2 and Name3 and Name4 and Name5}, 61 | TITLE = {Title 3}, 62 | YEAR = {2010} 63 | } 64 | 65 | % ul=5 66 | @BOOK{unall6, 67 | AUTHOR = {Name1 and Name2 and Name3 and Name4 and Name5}, 68 | TITLE = {Title 5}, 69 | YEAR = {2010} 70 | } 71 | 72 | % ul=5 73 | @BOOK{unall7, 74 | AUTHOR = {Name1 and Name2 and Name3 and Name4 and Name6}, 75 | TITLE = {Title 3}, 76 | YEAR = {2010} 77 | } 78 | 79 | % Two lists with same authors, one differing in being a superset. maxnames/minnames=1 80 | % so the truncations are ambiguous, hence uniquelist is needed. 81 | % ul=5 82 | @BOOK{unall8, 83 | AUTHOR = {Name1111 and Name2222 and Name3333 and Name4444 and Name5555}, 84 | TITLE = {Title 3}, 85 | YEAR = {2010} 86 | } 87 | 88 | % ul=5 89 | @BOOK{unall9, 90 | AUTHOR = {Name1111 and Name2222 and Name3333 and Name4444 and Name5555}, 91 | TITLE = {Title 5}, 92 | YEAR = {2010} 93 | } 94 | 95 | % ul=false (per-namelist setting) 96 | @BOOK{unall9a, 97 | AUTHOR = {uniquelist=false and Name1111 and Name2222 and Name3333 and Name4444 and Name5555}, 98 | TITLE = {Title 5}, 99 | YEAR = {2010} 100 | } 101 | 102 | 103 | % ul=6 104 | @BOOK{unall10, 105 | AUTHOR = {Name1111 and Name2222 and Name3333 and Name4444 and Name5555 and Name6666}, 106 | TITLE = {Title 5}, 107 | YEAR = {2010} 108 | } 109 | 110 | % Testing "et al" counting as a uniquelist position 111 | % ul01 = 3 112 | % ul02 = 3 (because it will be "XXX and YYY and ZZZ et al" which disambiguates the list from 113 | % "XXX and YYY and ZZZ" 114 | @ARTICLE{ul01, 115 | AUTHOR = {XXX and YYY and ZZZ}, 116 | } 117 | 118 | @ARTICLE{ul02, 119 | AUTHOR = {XXX and YYY and ZZZ and MMM and NNN}, 120 | } 121 | -------------------------------------------------------------------------------- /t/tdata/uniqueness3.bib: -------------------------------------------------------------------------------- 1 | @ARTICLE{ey1, 2 | AUTHOR = {A. AAA and B. BBB and A. CCC and E. EEE}, 3 | TITLE = {Title1}, 4 | YEAR = {1968} 5 | } 6 | 7 | @ARTICLE{ey1a, 8 | AUTHOR = {A. AAA and B. BBB and A. CCC and E. EEE}, 9 | TITLE = {Title1}, 10 | YEAR = {1969} 11 | } 12 | 13 | @ARTICLE{ey2, 14 | AUTHOR = {A. AAA and B. BBB and A. CCC and D. DDD}, 15 | TITLE = {Title2}, 16 | YEAR = {1968} 17 | } 18 | 19 | @ARTICLE{ey3, 20 | AUTHOR = {A. MMM and B. NNN}, 21 | TITLE = {Title3}, 22 | YEAR = {1968} 23 | } 24 | 25 | @ARTICLE{ey4, 26 | AUTHOR = {A. MMM and B. NNN}, 27 | TITLE = {Title4}, 28 | YEAR = {1968} 29 | } 30 | 31 | @ARTICLE{ey5, 32 | AUTHOR = {Aaa ZZZ and Bbb VVV}, 33 | TITLE = {Title3}, 34 | YEAR = {1968} 35 | } 36 | 37 | @ARTICLE{ey6, 38 | AUTHOR = {Abb ZZZ and Bbb VVV}, 39 | TITLE = {Title6}, 40 | YEAR = {1968} 41 | } 42 | 43 | @ARTICLE{ey7, 44 | TITLE = {Titlea}, 45 | YEAR = {1968} 46 | } 47 | 48 | @ARTICLE{ey8, 49 | TITLE = {Titlea}, 50 | YEAR = {1968} 51 | } 52 | 53 | @ARTICLE{ey9, 54 | TITLE = {Titleb}, 55 | YEAR = {1968} 56 | } 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /t/tdata/uniqueness4.bib: -------------------------------------------------------------------------------- 1 | % Smith and Smith 2 | @ARTICLE{us1, 3 | AUTHOR = {John Smith and Bert Smith}, 4 | YEAR = {1968} 5 | } 6 | 7 | 8 | 9 | % Reynolds and Plumb 10 | @ARTICLE{us2, 11 | AUTHOR = {Bill Reynolds and James Plumb}, 12 | YEAR = {1932} 13 | } 14 | 15 | % Plumb and Reynolds 16 | @ARTICLE{us3, 17 | AUTHOR = {Alan Plumb and Trevor Reynolds}, 18 | YEAR = {1945} 19 | } 20 | 21 | 22 | 23 | % Brown and Heretic 24 | @ARTICLE{us4, 25 | AUTHOR = {Basil Brown and Helen Heretic}, 26 | YEAR = {1984} 27 | } 28 | 29 | % Brown 30 | @ARTICLE{us5, 31 | AUTHOR = {Mary Brown}, 32 | YEAR = {1983} 33 | } 34 | 35 | 36 | 37 | % Prefect, Mangle and Loon 38 | @ARTICLE{us6, 39 | AUTHOR = {Peter Prefect and Martin Mangle and Leigh Loon}, 40 | YEAR = {1982} 41 | } 42 | 43 | % Prefect and Mangle 44 | @ARTICLE{us7, 45 | AUTHOR = {Russ Prefect and Graham Mangle}, 46 | YEAR = {1989} 47 | } 48 | 49 | 50 | 51 | % Jingle and Irate 52 | @ARTICLE{us8, 53 | AUTHOR = {Jeremy Jingle and Otto Irate}, 54 | YEAR = {1982} 55 | } 56 | 57 | % Jingle and Montle 58 | @ARTICLE{us9, 59 | AUTHOR = {Kevin Jingle and Barbara Montle}, 60 | YEAR = {1989} 61 | } 62 | 63 | 64 | 65 | % R. Red and G. Green 66 | @ARTICLE{us10, 67 | AUTHOR = {Richard Red and Graham Green}, 68 | YEAR = {1982} 69 | } 70 | 71 | % V. Red and M. Green 72 | @ARTICLE{us11, 73 | AUTHOR = {Victor Red and Mark Green}, 74 | YEAR = {1989} 75 | } 76 | 77 | 78 | 79 | 80 | % Simon Slip and Brass 81 | @ARTICLE{us12, 82 | AUTHOR = {Simon Slip and Bertie Brass}, 83 | YEAR = {1989} 84 | } 85 | 86 | % Steven Slip and Brass 87 | @ARTICLE{us13, 88 | AUTHOR = {Steven Slip and Bertie Brass}, 89 | YEAR = {1989} 90 | } 91 | 92 | 93 | % With maxnames/minnames=3, don't disambiguate the names in these lists as due to the "et al", 94 | % the lists are different in themselves 95 | % With maxnames=2/minnames=1, the lists are "the same" (Gurgle et al) so do disambiguate the 96 | % lists. 97 | % With maxnames=3/minnames=1, the lists are different (Gurgle et al, Gurgle, Splonk and Remedial) 98 | % so don't disambiguate 99 | % lists. 100 | % Gurgle, Splonk, Remdial et al 101 | @ARTICLE{us14, 102 | AUTHOR = {Peter Gurgle and Martin Splonk and Leigh Remedial and Trevor Argue}, 103 | YEAR = {1989} 104 | } 105 | 106 | % Gurgle, Splonk and Remedial 107 | @ARTICLE{us15, 108 | AUTHOR = {Alan Gurgle and Michael Splonk and Leigh Remedial}, 109 | YEAR = {1989} 110 | } 111 | 112 | 113 | % $ul = 3 and 4 114 | @ARTICLE{us16, 115 | AUTHOR = {AAA and BBB and CCC}, 116 | YEAR = {1902} 117 | } 118 | 119 | @ARTICLE{us17, 120 | AUTHOR = {AAA and BBB and CCC and DDD}, 121 | YEAR = {1906} 122 | } 123 | 124 | % $ul = 3 and 4 125 | % AAAA won't be disambiguated since the lists are therefore different 126 | @ARTICLE{us18, 127 | AUTHOR = {A. AAAA and BBBB and CCCC}, 128 | YEAR = {1902} 129 | } 130 | 131 | @ARTICLE{us19, 132 | AUTHOR = {B. AAAA and BBBB and CCCC and DDDD}, 133 | YEAR = {1906} 134 | } 135 | 136 | @ARTICLE{us20, 137 | AUTHOR = {Ulrich Schmitz}, 138 | YEAR = {1906} 139 | } 140 | 141 | @ARTICLE{us21, 142 | AUTHOR = {Ulrich Schmitz}, 143 | YEAR = {1934} 144 | } 145 | 146 | @ARTICLE{us22, 147 | AUTHOR = {Brian Cambell and Frank Schmitz}, 148 | YEAR = {1936} 149 | } 150 | 151 | @ARTICLE{us23, 152 | AUTHOR = {Oliver Oligarch}, 153 | YEAR = {1906} 154 | } 155 | 156 | @ARTICLE{us24, 157 | AUTHOR = {Otto Oligarch}, 158 | YEAR = {1934} 159 | } 160 | 161 | @ARTICLE{us25, 162 | AUTHOR = {Ian Ink and Peter Oligarch}, 163 | YEAR = {1936} 164 | } 165 | 166 | @ARTICLE{us26, 167 | AUTHOR = {Roger Meredith}, 168 | YEAR = {1936} 169 | } 170 | 171 | @ARTICLE{us27a, 172 | AUTHOR = {Roger Meredith}, 173 | YEAR = {1934} 174 | } 175 | 176 | @ARTICLE{us27, 177 | AUTHOR = {Alan Meredith}, 178 | YEAR = {1936} 179 | } 180 | 181 | @ARTICLE{us28, 182 | AUTHOR = {Andrew Meredith}, 183 | YEAR = {1936} 184 | } 185 | 186 | @ARTICLE{us29, 187 | AUTHOR = {Clive Creation and Peter Patronage}, 188 | YEAR = {1936} 189 | } 190 | 191 | @ARTICLE{us29a, 192 | AUTHOR = {Clive Creation and Peter Patronage}, 193 | YEAR = {1934} 194 | } 195 | 196 | @ARTICLE{us30, 197 | AUTHOR = {Liam Creation and Peter Patronage}, 198 | YEAR = {1932} 199 | } 200 | 201 | -------------------------------------------------------------------------------- /t/tdata/uniqueness5.bib: -------------------------------------------------------------------------------- 1 | % maxnames=1, minnames=1 2 | % both should be uniquelist=undef as the year disambiguates 3 | @ARTICLE{uls1, 4 | AUTHOR = {John Smith and Henry Jones}, 5 | YEAR = {2000} 6 | } 7 | 8 | @ARTICLE{uls2, 9 | AUTHOR = {John Smith and Sam Small}, 10 | YEAR = {2001} 11 | } 12 | 13 | % Should be uniquelist = 2 for both as the year is the same 14 | @ARTICLE{uls3, 15 | AUTHOR = {Henry Helarn and Brian Bonkers}, 16 | YEAR = {2000} 17 | } 18 | 19 | @ARTICLE{uls4, 20 | AUTHOR = {Henry Helarn and Michael Resin}, 21 | YEAR = {2000} 22 | } 23 | 24 | % uls5 and uls6 should all be uniquelist = 2 as same year but uls7 should be undef 25 | @ARTICLE{uls5, 26 | AUTHOR = {Robert Feld and Ian Ink}, 27 | YEAR = {2000} 28 | } 29 | 30 | @ARTICLE{uls6, 31 | AUTHOR = {Robert Feld and Brian Belt}, 32 | YEAR = {2000} 33 | } 34 | 35 | @ARTICLE{uls7, 36 | AUTHOR = {Robert Feld and Stanley Gibbons}, 37 | YEAR = {2001} 38 | } 39 | 40 | % maxnames=3, minnames=2 41 | % uls8 and uls9 should all be undef as the year disambiguates 42 | @ARTICLE{uls8, 43 | AUTHOR = {Patrick Poodle and Robin Vessel and Marvin Eagle and Rupert Trendle}, 44 | YEAR = {2000} 45 | } 46 | 47 | @ARTICLE{uls9, 48 | AUTHOR = {Patrick Poodle and Robin Vessel and Jeremy Idle and Leigh Loog}, 49 | YEAR = {2001} 50 | } 51 | 52 | % uls10 and uls11 should be uniquelist = 3 and uls12 should be undef 53 | @ARTICLE{uls10, 54 | AUTHOR = {Vogel and Beast and Garble and Rook}, 55 | YEAR = {2000} 56 | } 57 | 58 | @ARTICLE{uls11, 59 | AUTHOR = {Vogel and Beast and Tremble and Bite}, 60 | YEAR = {2000} 61 | } 62 | 63 | @ARTICLE{uls12, 64 | AUTHOR = {Vogel and Beast and Acid and Squeeze}, 65 | YEAR = {2001} 66 | } 67 | 68 | % minyear tests 69 | 70 | @ARTICLE{ulmy1, 71 | AUTHOR = {A. Uthor and B. Buthor and G. Guthor and K. Kuthor}, 72 | YEAR = {2016} 73 | } 74 | 75 | @ARTICLE{ulmy2, 76 | AUTHOR = {A. Uthor and G. Guthor and K. Kuthor and B. Buthor}, 77 | YEAR = {2016} 78 | } 79 | 80 | @ARTICLE{ulmy3, 81 | AUTHOR = {A. Uthor and B. Buthor and C. Cuthor and D. Duthor and E. Euthor}, 82 | YEAR = {2014} 83 | } 84 | -------------------------------------------------------------------------------- /t/tdata/uniqueness6.bib: -------------------------------------------------------------------------------- 1 | @article {entry1a, 2 | author = {Smith and Johnson and Doe}, 3 | year = 2005 4 | } 5 | 6 | @article {entry1b, 7 | author = {Smith and Johnson and Doe}, 8 | year = 2005 9 | } 10 | 11 | @article {entry2a, 12 | author = {Smith and Koe and Edwards}, 13 | year = 2005 14 | } 15 | 16 | @article {entry2b, 17 | author = {Smith and Koe and Edwards}, 18 | year = 2005 19 | } 20 | 21 | @article{A, 22 | author={A and B and C and D and E and F and G}, 23 | year={2007}, 24 | } 25 | 26 | @article{B, 27 | author={A and X and Y}, 28 | year={2008}, 29 | } 30 | 31 | @article{C, 32 | author={A and B and C and D and E and F and G}, 33 | year={2009}, 34 | } 35 | -------------------------------------------------------------------------------- /t/tdata/uniqueness7.bib: -------------------------------------------------------------------------------- 1 | @BOOK{po1, 2 | AUTHOR = {Author Red and Author Green and Author Blue and Author Black}, 3 | TITLE = {Title One}, 4 | DATE = {2022} 5 | } 6 | 7 | @BOOK{po2, 8 | AUTHOR = {Author Red and Author Green and Author Blue and Author White}, 9 | TITLE = {Title Two}, 10 | DATE = {2022} 11 | } 12 | 13 | @BOOK{po3, 14 | AUTHOR = {A. Abraham and B. Brown and C. Cuthbert and D. Abraham}, 15 | TITLE = {Title One}, 16 | DATE = {2022} 17 | } 18 | 19 | @BOOK{po4, 20 | AUTHOR = {A. Abraham and B. Brown and C. Cuthbert and D. Darling}, 21 | TITLE = {Title Two}, 22 | DATE = {2022} 23 | } 24 | 25 | @BOOK{un1, 26 | AUTHOR = {Neil Smith}, 27 | TITLE = {Title One}, 28 | DATE = {2022} 29 | } 30 | 31 | @BOOK{un2, 32 | AUTHOR = {Neil Smith}, 33 | TITLE = {Title Two}, 34 | DATE = {2022} 35 | } 36 | 37 | @BOOK{un3, 38 | AUTHOR = {Neil Smith}, 39 | TITLE = {Title Three}, 40 | DATE = {2023} 41 | } 42 | 43 | @BOOK{un4, 44 | AUTHOR = {Arthur Smith}, 45 | TITLE = {Title One}, 46 | DATE = {2000} 47 | } 48 | 49 | @BOOK{un5, 50 | AUTHOR = {Brian Smith}, 51 | TITLE = {Title One}, 52 | DATE = {2000} 53 | } -------------------------------------------------------------------------------- /t/tdata/xdata.bltxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Москва 5 | 6 | 7 | bltxxd2 8 | bltxxd3 9 | 10 | 11 | 12 | 13 | An abstract 14 | 15 | 16 | venue 17 | 18 | 19 | 20 | 21 | Brian 22 | Bell 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | B 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | Clive 61 | Clue 62 | 63 | 64 | Paul 65 | Prune 66 | 67 | 68 | 69 | 70 | Russel 71 | Run 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | A 80 | C 81 | 82 | 83 | 84 | 85 | 86 | 87 | Lee 88 | Lay 89 | 90 | 91 | Some title 92 | 93 | 94 | 95 | 96 | Amor 97 | Alan 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /t/tool-config.t: -------------------------------------------------------------------------------- 1 | # -*- cperl -*- 2 | use strict; 3 | use warnings; 4 | use Test::More tests => 12; 5 | use Test::Differences; 6 | unified_diff; 7 | 8 | use Encode; 9 | use Biber; 10 | use Biber::Utils; 11 | use Biber::Output::bibtex; 12 | use Log::Log4perl; 13 | use Unicode::Normalize; 14 | use XML::LibXML; 15 | use Cwd 'abs_path'; 16 | use List::Util qw( first ); 17 | 18 | no warnings 'utf8'; 19 | use utf8; 20 | 21 | chdir("t/tdata"); 22 | 23 | # Set up Biber object 24 | my $biber = Biber->new(tool => 1, 25 | configtool => abs_path('../../data/biber-tool.conf'), 26 | configfile => 'tool-testconfig.conf'); 27 | 28 | my $LEVEL = 'ERROR'; 29 | my $l4pconf = qq| 30 | log4perl.category.main = $LEVEL, Screen 31 | log4perl.category.screen = $LEVEL, Screen 32 | log4perl.appender.Screen = Log::Log4perl::Appender::Screen 33 | log4perl.appender.Screen.utf8 = 1 34 | log4perl.appender.Screen.Threshold = $LEVEL 35 | log4perl.appender.Screen.stderr = 0 36 | log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout 37 | |; 38 | Log::Log4perl->init(\$l4pconf); 39 | $biber->set_output_obj(Biber::Output::bibtex->new()); 40 | # Options - we could set these in the control file but it's nice to see what we're 41 | # relying on here for tests 42 | 43 | # Biber options 44 | Biber::Config->setoption('tool', 1); 45 | 46 | # THERE IS A CONFIG FILE BEING READ! 47 | 48 | # Now generate the information 49 | $ARGV[0] = 'tool.bib'; # fake this as we are not running through top-level biber program 50 | $biber->tool_mode_setup; 51 | $biber->prepare_tool; 52 | my $dm = Biber::Config->get_dm; 53 | eq_or_diff(Biber::Config->getoption('mincrossrefs'), 5, 'Options 1'); 54 | eq_or_diff(Biber::Config->getoption('listsep'), 'and', 'Options 2'); 55 | is_deeply (Biber::Config->getblxoption(0, 'sortingtemplate'), {tool => { locale => undef, spec => [[{}, { citeorderX => {} }]] }}, 'Options 3'); 56 | # This is only in the user conf datamodel 57 | ok((first {$_ eq 'newliteralfield'} $dm->get_fields_of_type('field', 'literal')->@*), 'Options 4'); 58 | ok($dm->is_field_for_entrytype('article', 'newliteralfield'), 'Options 5'); 59 | ok($dm->is_field_for_entrytype('xyz', 'author'), 'Options 6'); 60 | ok($dm->is_field_for_entrytype('xyz', 'file'), 'Options 7'); 61 | ok($dm->is_field_for_entrytype('xyz', 'abc'), 'Options 8'); 62 | ok($dm->is_field_for_entrytype('article', 'abc'), 'Options 9'); 63 | ok($dm->is_field_for_entrytype('book', 'bookzzz'), 'Options 10'); 64 | ok($dm->is_field_for_entrytype('article', 'bookzzz')==0, 'Options 11'); 65 | ok((first {$_ eq 'month'} $dm->get_fields_of_type('field', 'literal')->@*), 'Options 12'); 66 | -------------------------------------------------------------------------------- /t/translit.t: -------------------------------------------------------------------------------- 1 | # -*- cperl -*- 2 | use strict; 3 | use warnings; 4 | use utf8; 5 | no warnings 'utf8'; 6 | 7 | use Test::More tests => 1; 8 | 9 | use Biber; 10 | use Biber::Output::bbl; 11 | use Log::Log4perl; 12 | use Unicode::Normalize; 13 | chdir("t/tdata"); 14 | 15 | # Set up Biber object 16 | my $biber = Biber->new(noconf => 1); 17 | my $LEVEL = 'ERROR'; 18 | my $l4pconf = qq| 19 | log4perl.category.main = $LEVEL, Screen 20 | log4perl.category.screen = $LEVEL, Screen 21 | log4perl.appender.Screen = Log::Log4perl::Appender::Screen 22 | log4perl.appender.Screen.utf8 = 1 23 | log4perl.appender.Screen.Threshold = $LEVEL 24 | log4perl.appender.Screen.stderr = 0 25 | log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout 26 | |; 27 | Log::Log4perl->init(\$l4pconf); 28 | 29 | $biber->parse_ctrlfile('translit.bcf'); 30 | $biber->set_output_obj(Biber::Output::bbl->new()); 31 | 32 | # (re)generate information based on option settings 33 | $biber->prepare; 34 | my $section = $biber->sections->get_section(0); 35 | my $main = $biber->datalists->get_list('nty/global//global/global/global'); 36 | 37 | is_deeply([map {NFC($_)} $main->get_keys->@*], ['aachen', 'aix-en-provence', 'arnhem', 'augsburg', 'avignon', 'berlin', 'utrecht', 'zeven', 'kumāra', 'kha', 'jīvita', 'jvara', 'tyāga', 'tridaśa', 'tvid', 'kṣetra', 'jñāna'], 'translit sorting - 1'); 38 | 39 | 40 | -------------------------------------------------------------------------------- /testfiles/Unicode-bib-files.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plk/biber/5a08af00293def408a373b25fcc3a0d8e7c2b441/testfiles/Unicode-bib-files.zip -------------------------------------------------------------------------------- /testfiles/Unicode-tests-preserved-NF.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plk/biber/5a08af00293def408a373b25fcc3a0d8e7c2b441/testfiles/Unicode-tests-preserved-NF.zip -------------------------------------------------------------------------------- /testfiles/test.bib: -------------------------------------------------------------------------------- 1 | @BOOK{test1, 2 | AUTHOR = {Terrence Test}, 3 | TITLE = {Testing is Trying and Troubling}, 4 | YEAR = {1987}, 5 | } 6 | -------------------------------------------------------------------------------- /testfiles/test.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \usepackage{biblatex} 3 | \addbibresource{test.bib} 4 | \begin{document} 5 | \nocite{*} 6 | \printbibliography 7 | \end{document} 8 | -------------------------------------------------------------------------------- /testfiles/testCP.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | 3 | use v5.24; 4 | use strict; 5 | use warnings; 6 | use feature qw( say ); 7 | use utf8; 8 | use Encode; 9 | 10 | use FindBin; 11 | use lib $FindBin::RealBin; 12 | 13 | use Biber::CodePage qw( :DEFAULT string_analysis ); 14 | sub analyze_string { 15 | my ( $m, $s, $bytes ) = @_; 16 | print "$m\n", string_analysis( 'PREFIX ', $s, $bytes ); 17 | } 18 | 19 | say "===================\n-----**Demo of package CodePage**"; 20 | 21 | #---------------------- 22 | my $CS_system = get_CS_system(); 23 | say "System CS = $CS_system"; 24 | 25 | #---------------------- 26 | my @ARGU = map { decode_CS_system($_) } @ARGV; 27 | say "===CL argument array is '@ARGU'"; 28 | 29 | #---------------------- 30 | my $s = "Açé∫Δτ"; 31 | say "\n=== Try some Unicode to STDOUT: $s"; 32 | say "=== Same to STDERR: $s"; 33 | analyze_string( "Analyze the string used:\n", $s ); 34 | 35 | 36 | #---------------------- 37 | my $dir = '.'; 38 | say "\n=== Files in '$dir'"; 39 | opendir( my $dh, $dir ) 40 | or die "Cannot read directory '$dir'\n"; 41 | my @files = sort readdir($dh); 42 | closedir( $dh ); 43 | foreach (@files) { 44 | $_ = decode( $CS_system, $_); 45 | if ( /^\.[\.]?\s*$/ ) {next; } 46 | say " '$_'"; 47 | } 48 | 49 | #---------------------- 50 | 51 | say "\n=== Read files given on CL:"; 52 | my $max_lines = 3; 53 | if (@ARGU) { 54 | foreach ( @ARGU ) { 55 | say " --- File = '$_'"; 56 | # The files I've created are known to be UTF-8. 57 | open( my $fh, "<:encoding(UTF-8)", encode_CS_system($_) ) 58 | or die "Cannot read '$_'"; 59 | local $_; 60 | my $count =0; 61 | while ( <$fh> ) { 62 | print " $_"; 63 | $count++; 64 | if ($count >= $max_lines) { last; } 65 | } 66 | close $fh; 67 | } 68 | } 69 | else { say "NONE"; } 70 | -------------------------------------------------------------------------------- /visual.pl: -------------------------------------------------------------------------------- 1 | # Module::Build "Build test" invokes this after all test scripts to provide some user 2 | # feedback. See the manual for Module::Build. The name of this script is not arbitrary. 3 | use Biber; 4 | 5 | BEGIN { 6 | push @INC, 'blib/lib/'; 7 | } 8 | 9 | my $v = $Biber::Config::VERSION; 10 | $v .= ' (beta)' if $Biber::Config::BETA_VERSION; 11 | 12 | print "Finished testing biber $v using Perl $] at $^X\n"; 13 | --------------------------------------------------------------------------------