Introduction
The Citation File Format (CFF) is a YAML schema for saying how software should be cited, placed in a repository as CITATION.cff. GitHub reads it to show a “Cite this repository” box with APA and BibTeX. The CFF tool catalogue states that this box uses the ruby-cff library. The CFF project also maintains cffconvert, a Python command-line converter, and citation-js converts CFF in JavaScript through a plugin. Authors, reference managers and, increasingly, agents that draft papers or package metadata reach a citation through one of these tools.
CFF is one schema. Its specification leaves the mapping to BibTeX and other formats to tools: it says “CFF leaves reasonability of use with format users and providers of tooling, such as conversion software”. That is the setting in which differential testing is useful. We ask two questions. For the same valid CITATION.cff, do the three converters produce the same citation fields? Where they differ, which CFF constructs drive the difference, and which outputs are malformed for BibTeX or LaTeX?
Related Work
Software citation principles (Smith, Katz and Niemeyer, PeerJ CS 2016) set out why software should be cited and identified. The CFF project’s documentation and its tool catalogue describe the format and its converters. GitHub’s 2021 launch of CITATION.cff support is described in “A step forward for software citation: GitHub’s enhanced software citation support”.
The closest measurement is “A Multi-Surface Consistency Audit of Software Citation Metadata” (arXiv 2608.17159, 2026). It compares a project’s different self-descriptions, such as CITATION.cff, archive deposits, DOI registry records and package registries, across 117 projects. It finds core-field conflicts in 52 of 62 projects with two comparable surfaces, and that 28 of 32 preferred citations route to a record that disagrees with the software’s own metadata. That audit holds the converter fixed and varies the source. We hold the source fixed and vary the converter.
Individual converter differences are reported in issue trackers. cffconvert issue #397 notes that cffconvert and the GitHub widget choose different URLs and DOIs for the same file. ruby-cff issue #53 reported a missing name-particle in BibTeX output, which version 1.3.0 handles, as our particle case shows. cffconvert’s changelog lists brace protection for entity authors as a change for its next major version (issue #156). It also documents that cffconvert does not convert preferred-citation. We found no study that runs one set of valid CFF files through several converters and compares the outputs field by field. Differential testing itself follows McKeeman (Digital Technical Journal, 1998).
Method
Subjects. All versions were pinned and recorded in results/versions.txt:
- ruby-cff 1.3.0 from RubyGems, on Ruby 3.3.6 from conda-forge. We called CFF::Index#to_bibtex and #to_apalike, and validated with CFF::File.validate.
- cffconvert 2.0.0, the current PyPI release, on CPython 3.13, using -f bibtex, -f apalike and –validate.
- citation-js: @citation-js/core 0.9.0 with plugin-software-formats 0.7.3, plugin-bibtex 0.9.0 and plugin-csl 0.9.0, on Node 24.22.1. We called Cite.async on the file text, then format(“bibtex”) and the APA bibliography template.
Cases. A generator wrote 38 CITATION.cff files. Each varies one construct from a base file with one person author, a title, a quoted version and a release date. Every value is invented. The constructs cover:
- Authors (14): an entity, an entity containing “&”, a person and an entity together, a name-particle, a name-suffix, non-ASCII and CJK names, family-only, given-only and alias-only authors, a two-word family name, an ORCID, and twelve authors.
- DOIs (3): a top-level DOI, a DOI only in identifiers, and two different DOIs in the two places.
- URLs (5): a top-level url, repository-code, repository-artifact, a URL only in identifiers, and all of them together.
- Versions and dates (7): a YAML float version (1.10), a YAML integer version, no version, no date, an unquoted date, 1 January, and cff-version 1.1.0.
- Titles (4): the characters % & _ $, upper-case acronyms, a lower-case title with a colon, and literal braces.
- Other keys (5): type: dataset, license with keywords and abstract, and preferred-citation as an article, a conference paper and software at another version.
Both ruby-cff and cffconvert validated all 38 files against the schema.
Comparison. Each BibTeX output was parsed with bibtexparser 1.4.4. Field values were converted from LaTeX to text with pylatexenc 2.11 and normalised: whitespace collapsed, month names mapped to numbers. Then they were compared across tools. When a tool emitted several entries, the first was compared and the count was recorded.
The semantic fields are author, title, year, DOI and URL. Entry type and version were recorded separately, because the tools choose types by design: ruby-cff uses @software and the other two @misc.
Hazard checks flag four things:
- LaTeX special characters (& % $ # _) left unescaped outside url and doi;
- multi-word entity authors without brace protection;
- empty name parts;
- month values that are neither 1-12 nor a month name.
The whole matrix ran twice.
Results
The two runs were byte-identical across all 228 outputs (38 files × 3 tools × 2 formats). All 38 APA strings differ across the three tools, mostly in punctuation, “[Computer software]” and how DOIs are rendered, so APA is not graded further. On the five semantic BibTeX fields, the three tools disagreed for 16 of 38 files. By pair: ruby-cff and cffconvert differed on 12, ruby-cff and citation-js on 13, and cffconvert and citation-js on 9.
preferred-citation (3 of 3 cases disagree). ruby-cff cited the preferred work: the article’s authors, title, 2023 year, journal and DOI. cffconvert ignored preferred-citation, as its documentation says, and cited the software. citation-js emitted two BibTeX entries, the software first and then the preferred work, and two APA references for the conference and software cases. For the article case its APA formatting crashed with a citeproc TypeError (“num.match is not a function”) and produced no output. A reader copying the first entry therefore gets a different work from each tool.
DOI and URL precedence.
| Case | ruby-cff | cffconvert | citation-js |
|---|---|---|---|
| top-level doi only | top-level | top-level | top-level |
| doi only in identifiers | none | identifiers | identifiers |
| two different DOIs | top-level | identifiers | top-level |
| url, repository-code, identifiers url | repository-code | identifiers url | top-level url |
| repository-code only | repository-code | repository-code | none |
| repository-artifact only | none | repository-artifact | none |
| url only in identifiers | none | identifiers url | identifiers url |
Authors.
- Entities. ruby-cff and citation-js wrapped them in braces. cffconvert 2.0.0 did not, in 3 of 3 entity cases, so a BibTeX name parser reads “Open Demo Consortium” as given names “Open Demo” and family name “Consortium” (checked with bibtexparser’s splitname).
- "&" in an entity name. Only ruby-cff escaped it.
- Name-suffix. cffconvert wrote “Okafor Jr., Chidi”, which BibTeX parses as the family name “Okafor Jr.”. The other two wrote “Okafor, Jr., Chidi”, which BibTeX parses as a jr part.
- CJK name. citation-js wrote the author as “{, }” and the citation key “undefined2024Demo”, although its APA output kept the name. The other two kept the name in BibTeX.
- Given-only and alias-only authors. citation-js wrote “, Quinn” and dropped the alias-only author entirely. The other two kept both names.
- Agreement. All three agreed on the particle, non-ASCII, two-word family-name, ORCID and twelve-author cases.
Titles.
- Special characters. ruby-cff and citation-js escaped % & _ $. cffconvert left all four raw, and bibtexparser read its title as “Fast 100”, treating the rest of the line after % as a comment. LaTeX also treats an unescaped % as starting a comment.
- Capitals. ruby-cff protected the whole title in double braces, citation-js braced each capitalised word, and cffconvert protected nothing, so BibTeX styles that lower-case titles would lower-case “BERT” and “GPU”.
- Literal braces. Only ruby-cff kept the braces in “Set {x}” as text.
Versions and dates.
- YAML numbers. All three printed the YAML float 1.10 as “1.1” in APA, because YAML has already read it as a number before any converter sees it. The CFF schema permits numeric versions.
- version field. Only ruby-cff writes a version field in BibTeX (34 of 38 files). The other two show the version only in APA.
- month field. citation-js wrote “mar 5” in 37 of 38 files, putting the day into a field whose standard values are 1-12 or a three-letter month macro. ruby-cff wrote the macro mar, and cffconvert wrote {3}.
Discussion
The disagreements are not bugs against a shared rule, because CFF does not define a BibTeX mapping. Each tool makes defensible choices, and several follow documented decisions. The consequence is still concrete: the same valid file gives a reader on GitHub, a cffconvert user and a citation-js user different authors, a different work or a different DOI. We state three effects as hypotheses, because no real repository or citing paper was examined:
- Maintainers see the wrong preview. A maintainer who checks the GitHub box sees ruby-cff’s choice, while tools that import with cffconvert or citation-js cite something else. This most likely happens when preferred-citation is set or when DOIs are in identifiers.
- Agents inherit the converter’s choice. Agents that cite software by converting CITATION.cff with whichever library is installed will inherit its precedence rules, so two agents can cite the same repository differently.
- Malformed BibTeX degrades silently. Unbraced entity names and unescaped specials compile with warnings or garbled output rather than failing loudly.
Practical steps that follow from the measurements:
- Put the DOI at the top level and repeat it in identifiers.
- Avoid relying on preferred-citation alone if the software itself should be cited.
- Quote version strings.
- Check the generated BibTeX from more than one converter before publishing.
- Treat this case set as a starting point for a shared CFF-to-BibTeX conformance suite.
Limitations
- The 38 files are synthetic, one construct each. We did not measure how often these constructs occur in real repositories.
- One version of each tool was tested. ruby-cff 1.3.0 was the version RubyGems installed; its documentation site shows a 1.4.0 changelog, and GitHub’s deployed version is not public, so the widget may differ.
- cffconvert’s unreleased 3.x changelog lists entity brace protection, which would remove one of its hazards.
- Only BibTeX and APA-like output were compared. RIS, CodeMeta and Zenodo JSON were not.
- BibTeX hazards were judged with a parser and standard LaTeX rules, not by compiling documents.
Reproducibility
The generator, the three converter wrappers, the analysis script, all raw outputs, the field matrix (results/fields.csv), the hazard list (results/hazards.csv), results/summary.json and the version pins are in the cff-converters/ folder of the supporting repository. To regenerate everything, run gen_cases.py and then run_all.sh with RUBY pointing at a Ruby that has the cff gem and CFFCONVERT at cffconvert, and finally run analyze.py. No accounts or network access are needed after installation.
References
- Citation File Format. Tool catalogue (ruby-cff is used by GitHub’s “Cite this repository”). https://github.com/citation-file-format/citation-file-format/blob/main/tool-catalogue.md
- Citation File Format. CFF-Core specification 1.0.2. https://citation-file-format.github.io/assets/pdf/cff-specifications-1.0.2.pdf
- citation-file-format/cffconvert (README and CHANGELOG). https://github.com/citation-file-format/cffconvert
- cffconvert issue #397. Inconsistency between how cffconvert renders url and the GitHub widget. https://github.com/citation-file-format/cffconvert/issues/397
- ruby-cff issue #53. BibTeX output does not include name-particle. https://github.com/citation-file-format/ruby-cff/issues/53
- ruby-cff CHANGES. https://citation-file-format.github.io/ruby-cff/CHANGES_md.html
- Citation.js. https://citation.js.org/
- A Multi-Surface Consistency Audit of Software Citation Metadata. arXiv 2608.17159, 2026. https://doi.org/10.48550/arxiv.2608.17159
- A. M. Smith, D. S. Katz, K. E. Niemeyer. Software citation principles. PeerJ Computer Science 2:e86, 2016. https://doi.org/10.7717/peerj-cs.86
- A step forward for software citation: GitHub’s enhanced software citation support. 2021. https://doi.org/10.53731/r9531p1-97aq74v-ag78v
- W. M. McKeeman. Differential Testing for Software. Digital Technical Journal 10(1), 1998.