- PGF/TikZ
-
PGF/TikZ ("PGF and TikZ") Original author(s) Till Tantau Developer(s) Till Tantau, Christian Feuersaenger Stable release 2.10 / October 25, 2010 Operating system Multiplatform (TeX) Type Vector graphics languages License Dual License: GNU General Public License or LaTeX Project Public License Website pgf/tikz at sourceforge.net PGF/TikZ is a tandem of languages for producing vector graphics from a geometric/algebraic description. PGF is a lower-level language, while TikZ is a set of higher-level macros that use PGF. The top-level PGF and TikZ commands are invoked as TeX macros, but in contrast with PSTricks, the PGF/TikZ graphics themselves are described in a language that resembles MetaPost. Till Tantau is the designer of these languages, and he is also the main developer of the only known interpreter for PGF and TikZ, which is written in TeX. PGF is an acronym for Portable Graphics Format. TikZ was introduced in version 1.10 of PGF, and it is a recursive acronym for “TikZ ist kein Zeichenprogramm” (“TikZ is not a drawing program”).
The PGF/TikZ interpreter can be used from the popular LaTeX and ConTeXt macro packages, but also directly from the original TeX. Since TeX itself is not concerned with graphics, the interpreter supports multiple TeX output backends: dvips, dvipdfm/dvipdfmx/xdvipdfmx, TeX4ht, and pdftex's internal PDF output driver. Unlike PStricks, PGF can thus directly produce either PostScript or PDF output, but it cannot use some of the more advanced PostScript programming features that PStricks can use due to the "least common denominator" effect.[1] PGF/TikZ comes with extensive documentation. The version 2.10 manual has 726 pages.
The standard LaTeX
picture
environment can also be used as a front end for PGF merely by using thepgfpict2e
package.Several graphical editors can produce output for PGF/TikZ like the KDE program Cirkuit.[2] Export to TikZ is also available as extensions for Inkscape,[3] Blender,[4] MATLAB,[5] matplotlib,[6] and R. [7]
The project is still active as of May 2011[update]. Most of the development is done by Christian Feuersaenger.[8]
Basic usage
The preamble of the document for using TikZ is different for LaTeX, ConTeXt and plain TeX. LaTeX users should add
\usepackage{tikz}
ConTeXt users should add
\usemodule[tikz]
and the plain TeX users should add
\input tikz.tex
to the preamble of the document. Again, beginning and ending a TikZ picture is slightly different for TeX flavors. LaTeX users may begin to draw with TikZ commands between
\begin{tikzpicture} ... TikZ code here... \end{tikzpicture}
while ConTeXt users should write their TikZ code between
\starttikzpicture ... TikZ code here ... \stoptikzpicture
and plain TeX users should write their code between
\tikzpicture ... TikZ code here ... \endtikzpicture
Many basic drawing commands and syntax are very similar to MetaPost and Asymptote as will be seen below. Basic line drawing from a cartesian coordinate to another one can be done with
\draw[%options line width= ,color= , etc... ](a,b)--(c,d)
which draws a line from (a,b) to (c,d). Drawing may contain multiple points and if it ends with a
--cycle
it automatically connects (smoothly) the starting point and the end point.
See also
- Asymptote
- PSTricks
- MetaPost
- Beamer (LaTeX)
- KtikZ, PGF/TikZ editor with on-the-fly built-in previewer
- GeoGebra, free Dynamic Mathematics program with PGF/TikZ export
References
- ^ Till Tantau (20 February 2008). "The Tik Z and PGF Packages: Manual for version 2.00" (PDF). p. 17. http://www.ctan.org/tex-archive/graphics/pgf/base/doc/generic/pgf/pgfmanual.pdf. Retrieved 6 May 2010.
- ^ http://wwwu.uni-klu.ac.at/magostin/cirkuit.html
- ^ http://code.google.com/p/inkscape2tikz/
- ^ http://www.fauskes.net/code/blend2tikz/
- ^ http://www.mathworks.com/matlabcentral/fileexchange/22022
- ^ https://github.com/nschloe/matplotlib2tikz
- ^ http://cran.r-project.org/web/packages/tikzDevice/index.html
- ^ TikZ and PGF builds at TeXample.net
Further reading
- Andrew Mertz and William Slough, Graphics with PGF and TikZ, PracTeX Journal, 2007 (1), abstract, full text. Conference talk video based on an earlier version of that paper.
- Claudio Beccari, Graphics in LaTeX (Comparison of several graphics systems in LaTeX), PracTeX Journal, 2007 (1)
External links
- PGF/TikZ on CTAN
- PGF at SourceForge.net
- PGF/TikZ manual
- PGF/TikZ gallery at TeXample.net
- LaTeXPiX. A freeware graphical editor generating (amongst others) PGF code, written for Microsoft Windows.
- TikzEdt. Combined wysiwyg/text editor designed for editing Tikz code, open source, written for Microsoft Windows and .NET 4.0
- TpX. Graphical editor that can generate PGF code and convert graphics in other formats into pgf. Freeware, written for Microsoft Windows.
- kTikz. Tikz code editor with instantaneous preview. Open source, written for Microsoft Windows, Ubuntu and Debian
Categories:- Vector graphics markup languages
- TeX SourceForge projects
- Free TeX software
- Free cross-platform software
Wikimedia Foundation. 2010.