arxiv-latex-source

Parse arXiv LaTeX source bundles into sections, equations, and references for Zotero items.

Updated Mar 20, 2026
One-click install
npx skills add https://github.com/liongkj/zotero-library-bridge-skills --skill arxiv-latex-source
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: arxiv-latex-source
Source: https://github.com/liongkj/zotero-library-bridge-skills/tree/main/skills/arxiv-latex-source
Command: npx skills add https://github.com/liongkj/zotero-library-bridge-skills --skill arxiv-latex-source

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Retrieve arXiv LaTeX source bundles, extract structured sections/equations/references, and attach parsing-ready outputs to Zotero items. Use this whenever a user needs better-than-PDF full text for preprints, equation fidelity, or reproducible section-level extraction.

Core Features & Use Cases

  • Download source bundle: GET https://arxiv.org/e-print/{arxiv_id}
  • Typical response: gzip tarball containing .tex, figures, and bibliography files.
  • Pair metadata when needed: https://export.arxiv.org/api/query?id_list={arxiv_id}.
  • Find main TeX file via \documentclass and \begin{document}.
  • Extract section titles, equation blocks, and bibliography entries.
  • Save parsed artifacts as a Zotero note/attachment summary and keep source provenance (arxiv_id, version, fetch date).

Guardrails

  • Respect arXiv automation guidance: use a descriptive User-Agent.
  • Keep request rate conservative (about 1 req/s; do not exceed published limits).
  • Retain raw archive hash/version where possible for reproducibility.

Output template

{ "arxiv_id": "string", "source_version": "v1|v2|unknown", "main_tex": "path or null", "sections": ["string"], "equation_count": 0, "reference_count": 0, "zotero_actions": [ "create_note", "attach_parsed_summary" ] }

Quick Start

Attach a Zotero item with an arXiv ID or URL and request the LaTeX-source extraction to obtain structured sections, equations, and references.

Frequently Asked Questions about arxiv-latex-source

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract sections and equations from an arXiv LaTeX source file?

Extracting sections and equations from arXiv LaTeX source involves downloading the source bundle, locating the main TeX file via documentclass markers, and parsing the content into structured blocks. This process yields section-aware outputs with provenance metadata for reproducible notes.

Can I attach parsed arXiv LaTeX content directly to Zotero items?

Yes, you can attach parsed arXiv LaTeX content to Zotero items. The parsing process extracts sections, equations, and references, then saves these artifacts as a Zotero note or attachment summary while retaining source provenance like the arxiv_id and fetch date.

What is the best way to parse arXiv preprints for high-fidelity mathematical content?

Parsing arXiv preprints for high-fidelity mathematical content is best achieved by retrieving the raw LaTeX source bundle rather than the PDF. This approach detects tar.gz archives, identifies the main TeX file, and accurately extracts equation blocks and bibliography entries.

Does parsing arXiv LaTeX sources require handling different archive formats?

Yes, parsing arXiv LaTeX sources requires handling different archive formats. The system detects whether the downloaded source bundle is a gzip tarball containing multiple files or a single TeX file before locating the main document and extracting its structured content.

How do I find the main TeX file in an arXiv source bundle?

To find the main TeX file in an arXiv source bundle, scan the extracted files for the documentclass declaration and the begin{document} marker. This identifies the primary TeX file needed to extract sections, equations, and references.

Are there rate limits I should be aware of when downloading arXiv source bundles?

Yes, you must respect arXiv automation guidance when downloading source bundles. Keep request rates conservative at about one request per second, use a descriptive User-Agent, and do not exceed published limits to ensure reliable retrieval of LaTeX source files.