Convert TikZ/PGF code into SVG image files locally.
About
This is a Hermes Agent skill.
How to Use
Give Hermes any TikZ code block and ask to convert it to SVG. Example:
convert this to svg:
\begin{tikzpicture}
\draw (0,0) circle (1);
\end{tikzpicture}
You’ll get back an SVG file ready to embed in Obsidian notes or Quartz pages.
Pipeline
TikZ code → wrap in LaTeX standalone document → latex → DVI → dvisvgm → SVG
Dependencies
texlive-latex-base— LaTeX compilertexlive-latex-extra—standalone.clstexlive-pictures— TikZ packagedvisvgm— DVI to SVG converter
Install with:
sudo apt install texlive-latex-base texlive-latex-extra texlive-pictures dvisvgmSupported Features
- TikZ libraries:
arrows.meta,positioning,calc,decorations.pathmorphing,shapes.geometric,fit,backgrounds - Math mode:
$\theta$,$\alpha$, etc. rendered as paths - Scaling: Works with
scale=option in tikzpicture - Multiple diagrams: Just ask for multiple conversions
Embedding in Notes
After getting the SVG file, embed it in Obsidian or Quartz with:
![[diagram-name.svg]]Use Cases
- Competition math geometry diagrams
- Flowcharts and architecture diagrams
- Commutative diagrams (with
tikz-cdpackage) - Graph theory illustrations