LLMpediaThe first transparent, open encyclopedia generated by LLMs

PGF/TikZ

Generated by DeepSeek V3.2
Note: This article was automatically generated by a large language model (LLM) from purely parametric knowledge (no retrieval). It may contain inaccuracies or hallucinations. This encyclopedia is part of a research project currently under review.
Article Genealogy
Parent: LaTeX Hop 4
Expansion Funnel Raw 55 → Dedup 23 → NER 12 → Enqueued 12
1. Extracted55
2. After dedup23 (None)
3. After NER12 (None)
Rejected: 11 (not NE: 11)
4. Enqueued12 (None)
PGF/TikZ
NamePGF/TikZ
DeveloperTill Tantau
Released29 October 2005
Latest release version3.1.10
Latest release date20 December 2023
Programming languageTeX, Lua
Operating systemCross-platform
GenreVector graphics language
LicenseGNU GPL
Websitehttps://pgf-tikz.github.io/

PGF/TikZ is a sophisticated vector graphics language and package for the TeX typesetting system, primarily used with LaTeX and ConTeXt. It provides a comprehensive suite of commands for creating precise, programmatically generated diagrams, charts, and technical illustrations directly within document source code. The system is renowned for its ability to produce high-quality, scalable graphics that integrate seamlessly with the typographic output of TeX engines, making it a standard tool in academic and scientific publishing for fields like mathematics, computer science, and physics.

Overview

The system consists of two main layers: the portable graphics format (PGF) which serves as a low-level foundation, and the more user-friendly TikZ front-end that provides a concise syntax for drawing. It is designed to work natively with major TeX engines like pdfTeX, XeTeX, and LuaTeX, leveraging their typesetting capabilities for text labels and mathematical formulas. Development is led by Till Tantau, a professor at the University of Lübeck, with significant contributions from the broader TeX Users Group community. Its output is typically integrated into documents as PDF or PostScript files, ensuring consistent appearance across different platforms and printers.

Features and capabilities

The package offers an extensive feature set for constructing complex graphics, including the drawing of basic shapes like rectangles, circles, and ellipses, as well as advanced paths using Bézier curves. It supports detailed node-based diagrams, such as trees, graphs, and finite-state machines, with precise control over styling, colors, and transparency. Capabilities extend to plotting mathematical functions, creating bar charts and pie charts, and rendering three-dimensional perspectives. Additional libraries provide specialized functions for drawing circuit diagrams, calendars, mind maps, and automata, often used in textbooks from publishers like Springer Science+Business Media and Cambridge University Press.

Syntax and basic usage

Commands are typically issued within a `tikzpicture` environment, using a syntax that combines declarative path descriptions with imperative programming constructs. A simple line drawing might involve coordinates, control points, and options for arrows or line thickness, while more complex diagrams utilize scopes, loops, and conditional logic. The system integrates deeply with LaTeX, allowing the inclusion of complex mathematical expressions formatted by packages like AMS-LaTeX. For example, labels within a diagram can contain references to equations or variables typeset using the same fonts as the surrounding document, ensuring typographic harmony. The manual, authored by Till Tantau, is famously comprehensive and serves as both reference and tutorial.

While PGF/TikZ is self-contained, it interoperates with other TeX graphics packages such as PSTricks and can import data from external sources for plotting. Tools like GeoGebra and Inkscape offer export filters to generate code, and the gnuplot program can be used to create data files for rendering. The CTAN archive is the primary distribution source, and it is included in all major TeX distributions like TeX Live and MiKTeX. For those preferring a more graphical interface, front-ends like TeXstudio and Overleaf provide editing environments with preview capabilities. Its output is also compatible with presentation software like Beamer for creating slides.

History and development

Initial development began in 2005 by Till Tantau, building upon concepts from earlier systems like MetaPost and PSTricks. The first stable version was announced to the comp.text.tex newsgroup, with its growth closely tied to the LaTeX3 project and the broader TeX community. Major milestones include the introduction of the graph drawing library, which uses algorithms from Graphviz for automatic layout, and increased integration with the Lua scripting engine in LuaTeX for runtime computation. Ongoing maintenance and feature development are collaborative, with discussions frequently occurring on platforms like Stack Exchange and GitHub. The package has become a de facto standard for creating publication-ready graphics in many STEM disciplines.