Turn an arxiv paper into an Overleaf-ready Beamer project, using an OpenRouter
model to draft the slides from the paper's own LaTeX source — or, when arxiv
has no TeX source, from a Markdown rendering produced by MinerU.
OPENROUTER_API_KEY must be exported in the shell.MINERU_API_TOKEN should be exported when the paper might bePDF-only (used for the MinerU fallback). Get one from
pip install needed).If OPENROUTER_API_KEY is not set, stop and ask the user to export it before
running anything. If a paper turns out to be PDF-only and MINERU_API_TOKEN
is missing, ask the user to export that too (or pass --no-mineru-fallback
to skip the fallback entirely).
Invoke the bundled script with the arxiv id (e.g. 2603.19835) or any
arxiv URL (abs/, pdf/, e-print/). Always prefer the
${CLAUDE_PROJECT_DIR} variable so the path resolves regardless of cwd:
python "${CLAUDE_PROJECT_DIR:-.}/.claude/skills/arxiv-to-beamer/scripts/arxiv_to_beamer.py" <arxiv_id_or_url>
Optional flags:
--output — output zip path (default -beamer.zip in cwd).--model — OpenRouter model id (default anthropic/claude-sonnet-4.5).--language — slide language hint passed to the model (default 中文).--keep-source — also copy the extracted arxiv source (or MinerUmarkdown output) next to the zip.
--max-chars — cap source bytes sent to the model (default 200000).--mineru-timeout — how long to wait for MinerU PDF parsing(default 900s).
--no-mineru-fallback — skip the MinerU fallback when arxiv is PDF-only(script then exits with code 2 instead).
2603.19835, 2603.19835v2, the legacy hep-th/9901001 form, and full URLs).
https://arxiv.org/e-print/. Detects PDF-only submissionsvia magic bytes.
tar, or a single gzipped .tex) into a temp dir and gathers every
.tex / .bib file.
POST https://mineru.net/api/v4/extract/task with {"url": "https://arxiv.org/pdf/.
GET .../extract/task/ until state == "done".full_zip_url), extracts it, and concatenates every .md file as the source text.
2) if MinerU is unreachable, the task fails or times out, or MINERU_API_TOKEN is not set.
--max-chars) and asks the model: "帮我做一个 beamer 来介绍一下这个
研究工作", with formatting instructions so the response is parseable.
===== FILE: ===== blocks (preferred, multi-file). `latex main.tex `).main.tex.main.tex.-beamer.zip . Upload that zip viaOverleaf → New Project → Upload Project.
.zip.2:MINERU_API_TOKEN not set" (ask the user to export the token, or rerun
with --no-mineru-fallback), "MinerU PDF parsing failed" (network /
quota issue — surface the detail), or "no downloadable TeX source"
(paper is withdrawn). Do not blindly retry.
silently more than once.
共 1 个版本