Block diagram to TikZ
Redrawing a control loop or a flowchart in TikZ by hand takes an hour of nudging coordinates. CatchTeX reads the boxes, junctions, arrows and labels from the picture and writes the TikZ for you, laid out like the original.
Updated 2026-10-05
The quick way
- Snip the diagram in the PDF viewer (Ctrl+O) or from the screen (Ctrl+Alt+T).
- Pick the Diagram chip (Auto also recognises most diagrams).
- Check the preview: boxes, summing junctions with their + and − signs, arrows and labels, placed like the original.
- Copy LaTeX and paste it into your document. The copied code includes the packages and TikZ libraries it needs.
\begin{tikzpicture} \node[circle, draw] (s) at (0,0) {}; \node[draw, minimum height=8mm] (g) at (2.2,0) {$G(s)$}; \coordinate (y) at (4.4,0); \draw[->] (s) -- (g); \draw[->] (g) -- node[above] {$y$} (y); \draw[->] (3.6,0) -- (3.6,-1.2) -- (0,-1.2) -- node[left] {$-$} (s); \end{tikzpicture}
What it handles
- Boxes with text or maths labels (transfer functions, block names).
- Summing junctions with their + and − signs.
- Arrows including feedback paths routed around the blocks.
- From PDFs, the vector paths are read directly, which gives the most accurate result.
On our test set of control diagrams every block and junction is found, with the right type and the right signs; 94 % of the connections are found. Small labels on arrows are the weak spot: about half are picked up offline, so check them in the preview.
Dense diagrams: the optional AI assistant
For crowded real-world diagrams you can switch on the AI assistant with your own API key (Anthropic, OpenAI, Google Gemini or OpenRouter). CatchTeX sends the snip together with everything it measured, the model corrects missing feedback paths or arrow directions, and every connection is marked as confirmed or inferred so you know what to check. It is off by default; without it everything still runs offline.
Other ways, compared
| Method | Editable TikZ | Effort |
|---|---|---|
| Redraw by hand in TikZ | Yes | 30–90 minutes per diagram |
| Draw in a visual editor and export | Often messy code | Redraw everything |
| Include the image | No | None, but fonts and style do not match |
| CatchTeX | Yes, readable nodes and paths | One snip, then small fixes |
CatchTeX