← Back to blog

Blog & updates

TikZ cloud, diamond, or right=of errors? tikzlibrary cheat sheet and fixes

2026-05-23

Unknown shape cloud' and undefined right=of usually mean a missing \\usetikzlibrary. Feature-to-library table plus DrawFig export hints.

TikZ cloud, diamond, or right=of errors? tikzlibrary cheat sheet

Published: 2026-05-23 Category: Tutorial / LaTeX figures Reading time: ~5 min Tags: tikzlibrary, TikZ compile errors, shapes.geometric, positioning, drawfig
You copied “working” TikZ and get:
! Package pgf Error: Unknown shape 'cloud' ...
Or Undefined control sequence on right=of A. Searches like “tikz cloud compile error” and “tikzlibrary not loaded” cluster here — the main TikZ package does not include every shape and syntax; you must \usetikzlibrary{...} explicitly.
📌 All 7 compile categories: TikZ won't compile?

Feature → library

Feature / key Load
cloud, burst, symbol shapes shapes.symbols
diamond, trapezium, regular polygon shapes.geometric
chamfered rectangle, etc. shapes.misc
right=of A, below=of B positioning
Coordinate math ($(A)!0.5!(B)$) calc
arrows.meta arrow tips arrows.meta
Some corner styles Often in core tikz — check manual for your TeX version

Suggested one-shot load for paper figures

\usepackage{tikz}
\usetikzlibrary{
  positioning,
  calc,
  arrows.meta,
  shapes.geometric,
  shapes.symbols,
  shapes.misc
}

Minimal example: cloud node

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.symbols}  % required
\begin{document}
\begin{tikzpicture}
  \node[cloud, draw] at (0,0) {Cloud};
\end{tikzpicture}
\end{document}
Remove \usetikzlibrary{shapes.symbols}Unknown shape 'cloud'.

Not the same as graphdrawing

Automatic layout (graphdrawing, \usegdlibrary) is a separate topic — needs LuaLaTeX. See: usegdlibrary and LuaLaTeX.

DrawFig recommendation

Pick cloud, diamond, arrows, etc. by clicking in DrawFig; Export TikZ includes common \usetikzlibrary hints. Merge into your paper preamble instead of memorising the table. If export duplicates libraries already in your journal template, keep one copy and drop redundant \usepackage lines. Pricing: Canvas editing and SVG/PNG/PDF export are free, no sign-in. TikZ export is 3 credits/use (sign-in; 30 credits/day). Credits rules.

Summary