opentikz  by opentikz

AI-driven TikZ diagram generation for research papers

Created 4 months ago
267 stars

Top 96.7% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

OpenTikZ addresses the challenge of creating publication-ready TikZ diagrams for academic papers. It offers a curated library of copyable icons and editable templates, integrated with an AI skill (e.g., Claude Code plugin) that enables users to generate, modify, and compile figures directly from natural language descriptions or existing images. This provides researchers and engineers with a fast, reliable method for producing high-quality, vector-based diagrams that seamlessly integrate with LaTeX documents.

How It Works

The project provides a structured library of TikZ elements, categorized into atomic icons and complex, parametric templates. Its core innovation lies in the integration with AI agents via a dedicated skill. Each template includes an edit_contract that guides the AI, ensuring edits are accurate, adhere to a shared color palette and layout, and result in compilable LaTeX code. This approach contrasts with raw LLM TikZ generation, offering guaranteed compilation, stable node names for re-editing, and consistent styling, significantly improving the reliability and efficiency of diagram creation.

Quick Start & Requirements

The recommended quick start involves installing the OpenTikZ Claude Code plugin: /plugin marketplace add https://github.com/opentikz/opentikz followed by /plugin install opentikz@opentikz. Users then interact with the skill using commands like /opentikz:using-opentikz and natural language prompts. Alternatively, the repository can be cloned, and the skills/using-opentikz/SKILL.md can be used with GitHub-reading agents. Local development and validation require Python 3.x, jsonschema, a LaTeX toolchain (e.g., latexmk), and an SVG backend (dvisvgm or pdf2svg + pdfcrop). Official resources include the website, browse gallery, and contribution guidelines.

Highlighted Details

  • "Flaticon for academic TikZ": A comprehensive, searchable library of standalone TikZ icons and complex templates, all rendered from source.
  • AI-Assisted Workflow: Four primary usage modes: copy/paste icons, AI-driven template editing, PNG-to-TikZ conversion, and text-to-diagram generation.
  • Parametric Templates & Edit Contracts: Ensures AI edits are precise, maintainable, and result in compilable, publication-ready code, unlike ad-hoc LLM TikZ.
  • Vector Graphics & LaTeX Integration: TikZ output offers crisp vector quality, native font/math consistency with LaTeX documents, and version control benefits.

Maintenance & Community

The project is actively maintained via GitHub Actions for CI and site deployment. Community interaction is facilitated through Discussions for Q&A and feature requests, and Issues for bug reports and concrete tasks. Contribution guidelines are detailed in CONTRIBUTING.md and docs/DESIGN_GUIDE.md.

Licensing & Compatibility

The project employs a dual-licensing strategy: the code (scripts, build tooling) is licensed under MIT, permitting broad use and modification. The graphic content (TikZ figures, icons, previews) is dedicated to the public domain via CC0 1.0 Universal. This permissive licensing allows for unrestricted commercial use and integration into closed-source projects without copyleft concerns.

Limitations & Caveats

The README does not explicitly detail limitations such as alpha status or known bugs. However, the reliance on AI agents for advanced features may introduce variability in output quality depending on the agent's capabilities. Furthermore, local setup requires specific LaTeX and SVG toolchain dependencies, which could pose an initial hurdle for users without these environments.

Health Check
Last Commit

3 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
1 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.