regenerate-study-pdf

Regenerate study and companion-note PDFs from markdown using the repository's verified rendering pipeline.

Updated Jun 12, 2026
One-click install
npx skills add https://github.com/raghavamohan/AnalyticMadhyasthDarshan --skill regenerate-study-pdf-raghavamohan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: regenerate-study-pdf
Source: https://github.com/raghavamohan/AnalyticMadhyasthDarshan/tree/main/.cursor/skills/regenerate-study-pdf
Command: npx skills add https://github.com/raghavamohan/AnalyticMadhyasthDarshan --skill regenerate-study-pdf-raghavamohan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires puppeteer, mermaid, katex.

What problem does it solve? After editing a study or companion-note markdown file, the published PDF and HTML outputs must be rebuilt through a specific internal pipeline with watermarks, Mermaid rendering, KaTeX fonts, and outline verification — manual exports with pandoc or VS Code produce incorrect results. ## Core Features & Use Cases - Study PDF regeneration: Rebuild catalog study PDF/HTML from Studies/<Slug>/<Slug>.md with automatic Draft/Released watermarking based on the markdown Status field. - Companion-note rendering: Generate unwatermarked PDFs for research and technical notes living beside a study. - Built-in verification: Runs SVG, Mermaid, fenced-code, KaTeX-font, and PDF outline verifiers so rendering defects fail loudly instead of shipping. - Use Case: After fixing a Mermaid diagram in a study markdown file, run the regeneration command to produce an updated PDF and HTML with all diagram, math, and bookmark checks passing. ## Quick Start Regenerate the PDF and HTML for the study whose markdown I just edited by running the repository's regeneration script for that slug.

Frequently Asked Questions about regenerate-study-pdf

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

FAQPage Schema
How do I regenerate a study PDF after editing the markdown?

Run python Scripts/_regenerate_pdf.py <Slug> from the repository root. It reads the Status field from the markdown, applies the Draft watermark when appropriate, and runs all output verifiers automatically.

How do I render a companion research note PDF without a watermark?

Pass the note's markdown path to the same script, for example python Scripts/_regenerate_pdf.py Studies/<Slug>/Research-Note-Example.md. Companion notes render without a watermark and do not change the catalog study's timestamps.

Can I use pandoc or VS Code export to build the study PDF?

No. The internal pipeline handles Mermaid-to-SVG rendering, KaTeX fonts, PDF metadata pinning, and watermarking, which pandoc or editor exports do not reproduce. Published PDFs must come from the pinned Puppeteer-based toolchain.

Why does the PDF build fail on SVG figures?

The SVG verifier fails when referenced figures are missing, not UTF-8 encoded, or contain malformed XML, often from raw Windows-1252 bytes in pasted text. Save SVGs as UTF-8 with numeric XML entities and rerun the verifier.

What setup is required before generating PDFs?

Install Python dependencies with pip install -r requirements.txt, then run npm ci and npx puppeteer browsers install chrome inside the Scripts directory. The pinned Node dependencies and Chrome build are required for published PDFs.