% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cite.R
\name{cer_cite}
\alias{cer_cite}
\title{Cite a cer_tbl or URL in BibTeX, plain-text, or APA form}
\usage{
cer_cite(x, style = c("text", "bibtex", "apa"), doi = NULL)
}
\arguments{
\item{x}{A \code{cer_tbl} (as returned by any \verb{cer_*} data function)
or a character URL.}

\item{style}{One of \code{"text"} (default), \code{"bibtex"}, or \code{"apa"}.}

\item{doi}{Optional DOI (e.g. from \code{\link[=cer_deposit_zenodo]{cer_deposit_zenodo()}}) to
include in BibTeX output as a \code{doi} field and APA suffix.}
}
\value{
A character string.
}
\description{
Returns a citation suitable for footnotes, papers, and carbon
market analysis reports. Uses the provenance attributes attached
to every \code{cer_tbl}: source URL, licence, retrieval date, title,
snapshot pin (from \code{\link[=cer_snapshot]{cer_snapshot()}}), and SHA-256 digest.
}
\details{
For carbon market research, the BibTeX \code{note} field includes
the snapshot date and first 12 hex characters of the SHA-256,
which are the minimum provenance fields needed to defend a
published figure against a reviewer.
}
\examples{
x <- data.frame(a = 1)
x <- structure(x,
  cer_source = "https://cer.gov.au/markets/reports-and-data/accu-project-and-contract-register",
  cer_licence = "CC BY 4.0",
  cer_retrieved = as.POSIXct("2026-04-24 00:00:00", tz = "UTC"),
  cer_title = "ACCU project register",
  cer_sha256 = "abc123def456",
  cer_snapshot_date = "2026-04-24",
  class = c("cer_tbl", "data.frame"))
cer_cite(x)
cer_cite(x, style = "bibtex")
# DOI style: supply any minted DOI (Zenodo, DataCite, etc.).
# The placeholder below is illustrative only.
cer_cite(x, style = "apa", doi = "10.5281/zenodo.XXXXXXXX")
}
\seealso{
Other reproducibility: 
\code{\link{cer_deposit_zenodo}()},
\code{\link{cer_legislative_instrument}()},
\code{\link{cer_manifest}()},
\code{\link{cer_manifest_clear}()},
\code{\link{cer_manifest_write}()},
\code{\link{cer_sha256}()},
\code{\link{cer_snapshot}()}
}
\concept{reproducibility}
