| name | paper2html |
| description | Use when turning an academic paper PDF/arXiv/OpenReview page/local LaTeX source into a single-file Chinese HTML deep-reading page, especially when the user wants a Cheat-Sheet style explanation, KaTeX formulas, figure/table evidence, validation, or a publishable research page. |
Paper2HTML
Overview
Create one self-contained Chinese index.html that lets the user read the page and understand the paper without reopening the PDF. Default style: clear Cheat-Sheet page, focused evidence, KaTeX formulas, no decorative complexity.
Use scripts first. Keep this skill as workflow/quality gates, not a long prompt.
Scripted Path
cd /path/to/paper2html
python scripts/bootstrap_paper2html.py \
--title "Paper Title" \
--slug paper-slug \
--out /path/to/output/paper-slug-html-YYYYMMDD \
--arxiv 2504.07952 \
--github https://github.com/org/repo \
--publish-to self-evolving-agent/topic/paper-slug
python scripts/tex_inventory.py \
/path/to/output/source/unpacked \
--out /path/to/output/notes/tex-inventory.md \
--json /path/to/output/notes/tex-inventory.json
python scripts/optimize_paper_images.py \
paper_figures/*.pdf paper_figures/*.png \
--out-dir /path/to/output/assets/optimized \
--width 1600 \
--data-uri-json /path/to/output/assets/data-uris.json
scripts/gemini_frontend_pass.sh \
/path/to/output/index.html \
--reference /path/to/good-reference.html \
--timeout 240
scripts/gemini_frontend_pass.sh \
/path/to/output/index.html --dry-run
scripts/validate_paper_html.sh \
/path/to/output/index.html --public
PAPER2HTML_BLOG_ROOT=/path/to/blog \
PAPER2HTML_PUBLIC_BASE_URL=https://example.com/research \
scripts/publish_paper2html.sh \
/path/to/output/index.html \
--to self-evolving-agent/topic/paper-slug \
--title "Paper Title" \
--description "One sentence summary" \
--tags "paper-reading,agent" \
--ship
Workflow
-
Freeze source boundary
- Treat user input as a locator for one paper, then look for public adjacent artifacts: arXiv source/PDF, OpenReview, proceedings, project page, GitHub, appendix, dataset/model cards.
- Run
bootstrap_paper2html.py when starting from a known title/arXiv/GitHub. Otherwise manually create the same notes/source-boundary.md.
- Separate reading sources from public evidence sources. Public pages must not expose local paths, private source filenames, review metadata, private prompts, or run logs.
- If public publishing is requested and no public paper source exists, generate private HTML only and do not publish.
-
Extract material
- Prefer TeX/source packages over PDF-only reading. Run
tex_inventory.py when source exists.
- Build a paper material pack: metadata, outline, claims, notation, equations, algorithms, figure/table map, experiment map, appendix details, public links.
- Use PDF rendering for visual verification and figure/table placement.
pdftotext is only an auxiliary index.
- Before inserting any figure/table, record: original caption, page/source, what the visual/table itself shows, allowed HTML caption, and any nearby callout needed for broader interpretation.
- Extract reproducibility details: datasets, splits, models, baselines, metrics, prompts, tool/prover/solver versions, decoding, timeouts, retries, appendix-only settings.
-
Write the page
- Use a two-stage authoring path when visual quality matters:
- Codex builds the source-faithful content skeleton from the material pack.
- Gemini produces a visual draft on
index.gemini-draft.html with
gemini_frontend_pass.sh, using
prompts/gemini-initial-html.md as the initial prompt. The script
auto-attaches common notes from <output>/notes/: material-pack.md,
tex-inventory.md, figure-table-map.md, and source-boundary.md.
- Codex manually merges the useful layout/style changes back into
index.html, then adds missing paper details, formulas, figures,
tables, evidence boundaries, and reviewer comments.
- Gemini may improve visual hierarchy, spacing, typography, callouts,
responsive behavior, and component composition. It must not become the
source of factual paper content.
Template
assets/cheatsheet-template.html is the fixed visual skeleton. Copy it into the output directory when starting a new page, then fill content and embed images.
- Keep the template simple. Do not turn paper pages into a marketing landing page.