extract-tikz

Convert TikZ source diagrams into scalable SVGs with pdflatex and pdftocairo.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/gerhardriener/EC5230-industrial-organisation --skill extract-tikz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: extract-tikz
Source: https://github.com/gerhardriener/EC5230-industrial-organisation/tree/main/.claude/skills/extract-tikz
Command: npx skills add https://github.com/gerhardriener/EC5230-industrial-organisation --skill extract-tikz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TikZ-based diagrams are common in LaTeX slides but hard to reuse across modern slide formats; this skill streamlines converting TikZ sources into scalable SVGs for easy embedding in Beamer or Quarto slides.

Core Features & Use Cases

  • Source files located in lecture-slides/figs/source/*.tex and are treated as standalone diagrams for conversion.
  • Generated SVGs are saved to lecture-slides/figs/*.svg for direct inclusion in slides.
  • Conversion script is scripts/tikz2pdf.py and handles wrapping, PDF generation with pdflatex, and SVG conversion with pdftocairo.
  • Use cases include updating a TikZ diagram library for course decks and converting new figures for web-friendly slides.

Quick Start

Run the TikZ-to-SVG conversion from the project root to generate SVGs from all TikZ source files.

Frequently Asked Questions about extract-tikz

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

FAQPage Schema
How do I convert TikZ to SVG for use in Beamer or Quarto slides?

This skill converts standalone TikZ source files into scalable SVGs by running a Python conversion script that generates a PDF with pdflatex and then converts the PDF to SVG using pdftocairo. The output SVGs are saved directly into your lecture slides directory for embedding.

What is the best way to batch convert LaTeX TikZ diagrams for web-friendly slides?

The best way to batch convert TikZ diagrams is to store all standalone .tex sources in a dedicated directory like lecture-slides/figs/source. Running the conversion script from the project root processes all files and outputs SVGs to a single folder for easy slide embedding.

Do I need pdflatex and pdftocairo to convert TikZ sources to SVG?

Yes, you need both pdflatex and pdftocairo to convert TikZ sources to SVG. The pipeline uses pdflatex to compile the standalone LaTeX document into a PDF, and then uses pdftocairo to transform that intermediate PDF into the final scalable SVG file.

Can I use this TikZ to SVG conversion pipeline for figures stored in any directory?

This pipeline is specifically configured for standalone .tex figures stored under lecture-slides/figs/source. It processes files from this location and saves the resulting SVG diagrams to lecture-slides/figs/ for direct inclusion in your Beamer or Quarto slide decks.

Why does my TikZ diagram need to be a standalone .tex file for SVG conversion?

Your TikZ diagram needs to be a standalone .tex file because the conversion script wraps each source file individually to compile a separate PDF. This ensures the generated SVG contains only the diagram content, making it scalable and easy to embed in slides.