Csv to latex book
Skill Yash-Kavaiya/csv-to-latex-book-skill/csv-to-latex-book
Convert quiz/practice-test CSV files (Udemy practice-test format or similar MCQ data) into professionally typeset, brand-themed LaTeX PDF books. Use this skill whenever the user wants to turn a CSV of questions into a PDF book, exam book, study guide, practice-test book, or question bank PDF — or mentions "LaTeX book from CSV", "themed PDF", or a company brand theme (NVIDIA, Databricks, Google, Microsoft, GitHub, Oracle, AWS, Claude/Anthropic, IBM, Meta, OpenAI, Salesforce, Intel, Hugging Face, or any other company). Trigger even if the user only says "make my quiz CSV into a nice PDF" without mentioning LaTeX.From its SKILL.md
npx -y skills add Yash-Kavaiya/csv-to-latex-book-skill --skill csv-to-latex-bookAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.8 KB, 788 tokens by cl100k_base, as published. Nobody here has run it
CSV → Branded LaTeX PDF Book
Turn a practice-test CSV into an expert-quality PDF book: branded title page, table of contents, one chapter per domain, question cards with options, highlighted correct answers, per-option explanations, and an overall explanation for every question.
Workflow
-
Inspect the CSV (
head -3 file.csv). The script expects the Udemy practice-test format:Question, Question Type, Answer Option 1..6, Explanation 1..6, Correct Answers, Overall Explanation, Domain. Column matching is case-insensitive and tolerant of missing option columns. If the CSV uses different column names, rename/map them first with a small Python snippet. -
Determine the theme. If the user named a company or theme, use it. If the user did NOT specify a theme, always ask which theme they want (list a few built-ins and offer custom). Never silently pick one.
- Built-in themes:
nvidia,databricks,google,microsoft,github,oracle,aws,claude,ibm,meta,openai,salesforce,intel,huggingface. - Any other company: use
--theme custom --brand-name "Spotify" --primary 1DB954 --dark 191414 --accent 1ED760with that brand's real colors (look them up if unsure). This is how the skill supports every company, not just the built-ins.
- Built-in themes:
-
Build the book:
python3 scripts/build_book.py INPUT.csv \ --theme nvidia \ --title "NCP-AAI Practice Test" \ --subtitle "Agentic AI Certification — 65 Questions with Explanations" \ --author "Prepared by ..." \ --layout inline \ --output book.pdf--layout inline(default): answer + explanations directly under each question (study-guide style).--layout examkey: Part I questions only (exam simulation), Part II full answer key with explanations.- The script writes the
.texnext to the PDF and runspdflatextwice (TOC). Requirestexlivewithtcolorbox.
-
Verify. Check the script's summary output (question/domain counts, pages). If compilation fails, read the
.logtail it prints; the usual culprit is an unescaped character — fix the sanitizer map in the script rather than hand-editing the.tex. -
Deliver the PDF (and the
.texif the user wants to tweak it).
Theme system
Each theme defines four colors used consistently across the book:
| Role | Used for |
|---|---|
primary | Chapter numbers, question accents, answer boxes, links |
dark | Title-page background, question title bars, headings |
accent | Secondary highlights, title-page rule, badges |
light | Subtle box tints (auto-derived if omitted) |
Built-in palettes live in the THEMES dict at the top of scripts/build_book.py. To add a permanent theme, add one dict entry — nothing else changes.
Quality bar
The output should read like a published exam-prep book, not a data dump: consistent typography (sans-serif corporate look), a stats table in the "About this book" chapter, correct answers marked with letters (A–F), ✓/✗ per-option explanations, and page headers/footers in brand colors. If the user asks for extras (cover tagline, logo image, different paper size), pass --paper letter or edit the generated .tex preamble.
What ships with it: 1 file
16.5 KB alongside SKILL.md, 1 of them executable
scripts/
- build_book.pyruns16.5 KB