Two-phase pipeline: Phase 1 deep-reads an academic paper into a structured dual-mode report, Phase 2 transforms the report into a polished, zero-dependency HTML presentation.
pdftotext (from poppler) — install via brew install poppler or apt install poppler-utils if missingDetermine the input type and obtain a local PDF:
InputActionLocal path ( /path/to/paper.pdf)Use directlyarXiv abs URL ( https://arxiv.org/abs/2603.02096)Convert to https://arxiv.org/pdf/2603.02096 and downloadarXiv PDF URL ( https://arxiv.org/pdf/2603.02096)Download directlyOther PDF URLDownload directly
Download command:
bash
curl -L -o /tmp/paper.pdf "<pdf_url>"
Use the arXiv ID or paper title as the filename when possible (e.g., /tmp/2603.02096_FluxMem.pdf).
bash
pdftotext "<paper.pdf>" /tmp/paper_text.txt
Read the extracted text completely. For papers with critical figures, try extracting key pages as images via pdftoppm and analyzing them with the image tool.
Create temp_analysis.md extracting:
This step is mandatory — it ensures report quality through structured thinking.
Generate [PaperName]_研读报告.md containing both parts separated by ---:
Writing standards: Use complete paragraphs over bullet lists. Provide bilingual terms (中英) on first mention. Support every claim with specific data from the paper.
Present the report file and briefly summarize the paper's core innovation, key findings, and theoretical value.
If the user only requested a report, stop after Phase 1.
Ask the user (all at once):
If the user already specified these in the initial request, skip asking and proceed.
Select an appropriate style based on user preferences. Read slide-styles.md for available presets and CSS specifications. Academic presentations generally suit Swiss Modern (light), Notebook Tabs (light), or Bold Signal (dark).
Map the report content to a slide structure. Typical academic paper outline (15-19 slides):
SectionSlidesContentTitle1Paper title, authors, affiliations, dateProblem1-2Background, existing gaps, key insightMethod (divider)1Section divider slideMethod details3-5Core modules, formulas, architectureResults (divider)1Section divider slideQuantitative results2-3Main results tables, metrics, comparisonsEfficiency / Ablation1-2Efficiency gains, ablation studiesDiscussion (divider)1Section divider slideAdvantages & Limitations1-2Key properties, future directionsSummary1One-line takeawayThanks1Links, navigation hints
Read slide-template.md for the mandatory HTML architecture, viewport CSS, JS controller, and inline editing implementation.
Non-negotiable rules:
.slide must have height: 100vh; height: 100dvh; overflow: hiddenclamp() — never fixed px/remprefers-reduced-motion supportIf inline editing is enabled, implement via contentEditable API + localStorage persistence. Use JS-based hover with 400ms delay for the edit button (not CSS ~ sibling selector — it breaks due to pointer-events). See the template for the complete implementation.
bash
open [filename].html
Tell the user: file location, slide count, navigation (arrow keys / space / dots), and editing instructions (press E) if enabled.
When the user requests both report and slides, run Phase 1 fully first, then Phase 2. The report serves as the structured source for slide content — do not re-analyze the paper.