[Tex/LaTex] List of available TikZ libraries with a short introduction

big-listtikz-pgf

Quick links:

Summary
Intersections library
Arrow tips library
Decorations libraries
Calc library
Mindmap library
Shapes library
Paper Folding library
Chains library
Shapes library
Miscelaneous contributions to TikZ


Very often I search a special library of TikZ. At the moment there is no package which loads every library.

Is there a list of all available libraries with a short introduction (2-3 sentences)?

Maybe we can collect them here

Best Answer

Summary

Here's the list of libraries, and a brief summary of the purpose of each (any code supplied is for LaTeX and/or Plain TeX, not ConTeXt):

  • Arrow tip library with \usetikzlibrary{arrows.meta} (\usetikzlibrary{arrows} is deprecated). See details below.
  • Automata Drawing Library, accessed by \usetikzlibrary{automata}, and is used for drawing "finite state automata and Turing Machines". To draw these graphs, each node, its name and relative position is defined, as well as the types of path between each.
  • Background Library, accessed by \usetikzlibrary{backgrounds}, and "defines background for pictures". To use this in a Tikzpicture, an option is passed, e.g. \begin{tikzpicture}[show background rectangle], with a background rectangle style defined before the picture. (e.g. \tikzset{background rectangle/.style={<define background rectangle style here>}}
  • Calc library, accessed through \usetikzlibrary{calc} to make complex coordinate calculations. See details below.
  • Calendar Library, accessed through \usetikzlibrary{calendar}. This library is used to display calendars (I guess it's a Ronseal thing). You define a calendar as \calendar[display options and date options](Name (optional)).
  • Chain library to align nodes o chains. See details below.
  • Decorations libraries to decorate paths. See details below.
  • Entity Relationship Diagram Library, accessed by \usetikzlibrary{er}, as in the automata drawing library, each node is defined, as is each edge between each node, as well as any attributes. As a note of warning, underlining should be used for attributes, but this is not used as it is both ugly and difficult to implement. Italics are used instead.
  • Intersection library, accessed through \usetikzlibrary{intersections}, to calculate intersections of paths. See details below.
  • Mind map library, accessed through \usetikzlibrary{mindmap}. See details below.
  • Matrix Library, accessed through \usetikzlibrary{matrix}. Matrices are defined in the same way as in maths mode, however, each item in the matrix as assigned a value as a node, starting from 1. Each node can then be identified and manipulated. Delimiters can also be selected in the matrix options and can be "any delimiter that is acceptable to TeX’s \left command".
  • Paper folding library \usetikzlibrary{folding}. See details below.
  • Pattern Library \usetikzlibrary{patterns}. This package "defines patterns for filling areas". In the documentation, each pattern is named and an example given.
  • Petri-Net Library. This is used to draw Petri Nets, as used for mathematical modelling. As with other similar flowchart style diagrams, each node and edge is defined, as well as their style and position. Tokens can also be embedded within nodes, by treating them as children and child nodes.
  • Plot handler Library, accessed through \usetikzlibrary{plothandlers}. TikZ loads this library automatically. Each point is defined (as a node) for the plot and the each point has a curve placed
    • Plot Mark Library, accessed through \usetikzlibrary{plotmarks} is used to define additional styles for plots as used above. Each point is defined as \pgfuseplotmark{Plot description}.
  • Shape library, used to define shapes other than rectangle, circle and co-ordinate. Accessed through either \usetikzlibrary{shapes} or \usetikzlibrary{shapes.shape type}. The following additional types are available: geometric shapes, either named shapes (star, diamond, etc.) or polygons of specified side numbers; symbol shapes, e.g. "forbidden sign" as used in No Smoking signs; "multipart" shapes, with "multiple (text) parts"; and finally, "misc" shapes which "do not fit in the previous categories", such as strike-through crosses. See details below.
  • Snake library, as accessed through \usetikzlibrary{snakes} and can be best described as curved lines, and are used either between nodes or as a border to a shape , or as independent shapes.
  • To Path library, accessed through \usetikzlibrary{topaths}. This library is used to define paths between two points, and is loaded automatically. Additionally, it can take the form of curved lines between two shapes or as a loop back to a node.
  • Tree library, accessed through \usetikzlibrary{trees}. Each point on the tree is defined as a node, with children, and each child can have its own children. The tree's direction can also be specified, as well as the angle at which children emerge, however, when left to its own devices, the results are acceptable.

Sources: Anything in inverted commas has been lifted from the tikzpgfmanual, as well as the calendar sample.