pub async fn paper_tex_source(
base: &Url,
id: &ArxivId,
max_chars: Option<usize>,
ctx: &FetchContext,
) -> Result<PaperTexSource, FetchError>Expand description
Fetch the LaTeX source of an arXiv paper.
base is the arXiv export base URL (production ARXIV_SRC_DEFAULT_BASE;
tests inject a wiremock origin). max_chars caps the returned
tex_source character count (None = no cap); truncation is flagged,
never silent.
§Errors
FetchError::Http— transport / status failure.FetchError::TextUnavailable— PDF-only submission or no.texfiles in the tarball.FetchError::SourceSchema— URL construction or gzip/tar parse error.FetchError::Log— provenance append failed (fail-closed).