citHeader("To cite lexsync in publications, use:")

# The doi and url fields hold the DOI CRAN assigned on publication and the
# package's canonical CRAN page, the same pair utils::citation() generates for
# a copy installed from CRAN that has no CITATION file. The DOI names the
# package as a whole, so the version in the note identifies the release cited.
# R CMD check --as-cran looks the DOI up in the DOI registry, just as it checks
# the url. CRAN is the publisher: it distributes the package and registered
# the DOI. The text version is the APA 7 reference for software, the form the
# package's own guides and the author's website give.
bibentry(
  bibtype  = "Manual",
  title    = "{lexsync}: Lexical optimisation and hardware-timed experiment generation",
  author   = person("Pablo", "Bernabeu", comment = c(ORCID = "0000-0003-1083-2460")),
  year     = "2026",
  publisher = "CRAN",
  note     = sprintf("R package version %s", meta$Version),
  doi      = "10.32614/CRAN.package.lexsync",
  url      = "https://CRAN.R-project.org/package=lexsync",
  textVersion = paste0(
    "Bernabeu, P. (2026). lexsync: Lexical optimisation and hardware-timed ",
    "experiment generation (Version ", meta$Version, ") [Computer software]. ",
    "CRAN. https://doi.org/10.32614/CRAN.package.lexsync"
  )
)

citFooter(
  "Please cite the corpus as well as the software. The bundled example lexica ",
  "are derived from wordfreq (Speer, 2022) and carry CC BY-SA 4.0; the terms, ",
  "the credit they require and each corpus's retrieval date are in the ",
  "LICENSE.note file of the package sources and at ",
  "https://github.com/pablobernabeu/lexsync/blob/main/corpora/ATTRIBUTION.md. ",
  "Every run's datasheet records the source file it read and its SHA-256."
)
