Latex Slide Builder
Core idea
Use LaTeX Beamer as the canonical slide source. Generate and maintain a clean .tex file first, compile it with XeLaTeX or LuaLaTeX to produce a PDF deck, and export PPTX only when the user explicitly requests it or provides a PowerPoint template.
Prefer this skill when the user wants academic, research, thesis-defense, seminar, lecture, or paper-reading slides, especially when Chinese text is involved.
Workflow
- Clarify the input and output only when required:
- Input may be a slide outline, notes, Markdown, or a research paper PDF.
- Output defaults to.texplus compiled PDF.
- If PPTX is requested, also generate a PPTX using the companion Markdown/Pandoc route when possible. - If a research paper PDF is provided, extract text with
scripts/extract_paper_text.py, then summarize it into a slide plan before writing LaTeX. - Write a slide plan before writing code:
- Talk goal and audience
- 8-15 slide outline unless the user requests another length
- Core thesis, contributions, method, experiments/results, limitations, and discussion - Generate a Beamer
.texdeck based onassets/academic_beamer_template.tex. - Compile with
scripts/build_deck.pyusing XeLaTeX by default. - Inspect compiler errors, fix the
.tex, and recompile until the PDF is produced or the failure is clearly external, such as missing TeX tooling. - If PPTX is requested, export from a companion Pandoc Markdown file or from the
.texsource. Use the user's.pptxtemplate as a Pandoc reference document when supplied.
Chinese-first LaTeX rules
- Use
ctexbeameror Beamer plusctex; prefer XeLaTeX. - Do not use pdfLaTeX for Chinese decks.
- Keep source encoded as UTF-8.
- Use 16:9 widescreen unless the user requests 4:3.
- Avoid manual line breaks for Chinese paragraphs unless necessary; write concise slide bullets.
- Keep each slide focused: one claim, one diagram/table, or one result.
- Prefer bilingual terminology only when helpful: Chinese main explanation with English technical terms in parentheses.
Academic style defaults
Use a clean academic reporting style:
- Title slide
- Motivation and problem
- Paper/context overview
- Method or framework
- Key theorem/model/algorithm if relevant
- Experiments or evidence
- Results interpretation
- Limitations
- Takeaways and Q&A
For paper PDFs, follow references/paper_to_slides.md. For visual and LaTeX style, follow references/style_guide.md. For PPTX export, follow references/pptx_export.md.
Required project layout for generated decks
Create an output folder like:
project-name/
├── deck.tex
├── deck.md # create when pptx export is requested
├── figures/ # copied or recreated figures, if any
├── build/ # compiler output
├── deck.pdf
└── deck.pptx # optional
Script usage
Extract paper text:
python scripts/extract_paper_text.py paper.pdf --out paper_text.md
Build PDF only:
python scripts/build_deck.py deck.tex --out-dir build
Build PDF and PPTX:
python scripts/build_deck.py deck.tex --out-dir build --pptx --pptx-source auto
Build with a PowerPoint template:
python scripts/build_deck.py deck.tex --out-dir build --pptx --template-pptx template.pptx
Check local tool availability:
python scripts/build_deck.py --check-tools
PPTX template handling
A default academic PowerPoint reference template is bundled at assets/reference_template.pptx, based on a Chinese academic report deck. Use it when the user asks for PPTX export and does not provide another template.
If the user provides a .pptx template:
- Prefer the newly provided template over the bundled default.
- Put it in assets/ or the working deck folder.
- Use it as a Pandoc --reference-doc for PPTX export.
- Explain that Beamer PDF remains the highest-fidelity output, while PPTX export is editable but may need visual cleanup.
- If the template includes strict branding, ask for theme requirements only if not obvious from the template.
Quality checklist
Before final delivery:
- PDF compiles successfully.
- The .tex source is included.
- Chinese text renders correctly.
- Slide count matches the user request or stated default.
- Figures, tables, citations, and math render correctly.
- PPTX is generated when requested, or the reason it could not be generated is clearly stated.
- Do not claim PPTX visual parity with the PDF unless it was manually inspected.