This is a small demonstration of inline TikZ graphics embedded directly inside ordinary text. A simple horizontal line \tikz \draw (0,0) -- (1,0); can appear inside a sentence without requiring a separate figure. We can similarly draw a small arrow \tikz \draw[->] (0,0) -- (1,0); or an arrow in the opposite direction \tikz \draw[<-] (0,0) -- (1,0); as part of the surrounding paragraph. TikZ can also produce simple geometric objects. Here is a circle \tikz \draw (0,0) circle (0.15); and here is a filled circle \tikz \fill (0,0) circle (0.12); followed by a rectangle \tikz \draw (0,0) rectangle (0.5,0.3); and a filled rectangle \tikz \fill (0,0) rectangle (0.5,0.3);. Even a triangle \tikz \draw (0,0) -- (0.5,0) -- (0.25,0.4) -- cycle; can be inserted directly into the text. Nodes are particularly useful. We can place a boxed value \tikz \node[draw] {42}; inside a sentence, or use a circular node \tikz \node[draw,circle] {A}; to represent a vertex. A filled node \tikz \node[draw,circle,fill=black,text=white] {B}; could represent a black node of a red-black tree, while \tikz \node[draw,circle,fill=red,text=white] {R}; could represent a red node. Small mathematical diagrams can also be inserted inline. For example, the mapping A \tikz[baseline=-0.5ex] \draw[->] (0,0) -- (0.8,0); B can be represented graphically rather than with an ordinary arrow. We can make the arrow curved \tikz[baseline=-0.5ex] \draw[->] (0,0) to[bend left] (0.8,0); or double-headed \tikz[baseline=-0.5ex] \draw[<->] (0,0) -- (0.8,0); when the context calls for it. Coordinates do not have to lie on a straight line. A tiny function-like curve \tikz \draw (0,0) .. controls (0.2,0.3) and (0.4,-0.3) .. (0.6,0); can occur in ordinary prose. We can also draw two intersecting lines \tikz { \draw (0,0) -- (0.5,0.3); \draw (0,0.3) -- (0.5,0); } or coordinate axes \tikz { \draw[->] (-0.1,0) -- (0.6,0); \draw[->] (0,-0.1) -- (0,0.5); } without leaving the paragraph. For data structures, suppose a node contains the value \tikz[baseline=-0.5ex] \node[draw,circle] {8};. Its children might be represented schematically as \tikz[baseline=-0.5ex] { \node[draw,circle] (p) at (0,0) {8}; \node[draw,circle] (l) at (-0.5,-0.6) {4}; \node[draw,circle] (r) at (0.5,-0.6) {12}; \draw (p) -- (l); \draw (p) -- (r); } inside the text itself. We can even show a tiny linked-list fragment \tikz[baseline=-0.5ex] { \node[draw] (a) at (0,0) {1}; \node[draw] (b) at (0.8,0) {2}; \node[draw] (c) at (1.6,0) {3}; \draw[->] (a) -- (b); \draw[->] (b) -- (c); } without introducing a full displayed figure. Styling works in the short form as well. A thick line \tikz \draw[thick] (0,0) -- (0.8,0); a dashed line \tikz \draw[dashed] (0,0) -- (0.8,0); and a dotted line \tikz \draw[dotted] (0,0) -- (0.8,0); are all ordinary TikZ paths. Scaling the entire miniature picture is also possible: \tikz[scale=0.5] \draw (0,0) circle (0.5); or \tikz[scale=1.5] \draw (0,0) circle (0.1);. Consequently, inline TikZ is useful for anything from tiny symbols \tikz \fill (0,0) circle (1.5pt); and annotations \tikz \node[draw,rounded corners] {data}; to miniature graphs \tikz[baseline=-0.5ex] { \node[circle,draw] (a) at (0,0) {}; \node[circle,draw] (b) at (0.5,0.25) {}; \node[circle,draw] (c) at (0.5,-0.25) {}; \draw (a) -- (b) -- (c) -- (a); } embedded directly in a line of prose.