Skip to main content

LaTeX TikZ Diagrams in the Browser

The tikzjax: true flag loads TikzJax, which compiles TikZ code entirely in the browser using WebAssembly. No server-side LaTeX installation required.

Note: TikzJax uses an unversioned CDN — if supply-chain integrity is critical, self-host the script. See tikzjax.com for instructions.

Pythagorean Theorem

A classic geometric proof with a right triangle a2+b2=c2a^2 + b^2 = c^2:

Vector Field

Electric field lines of a dipole (positive and negative charge):

Simple LC Circuit

A series RLC circuit schematic:

Commutative Diagram

A classic commutative square from category theory:

Usage

---
title: My Post With TikZ
tikzjax: true
math: true
---

Write TikZ code inside <script type="text/tikz"> tags. The full TikZ package ecosystem is available — \usetikzlibrary{...} works as expected. Compilation runs client-side via WebAssembly, so diagrams appear without any server-side LaTeX setup.

TikzJax packages supported include: arrows, arrows.meta, decorations.markings, circuits.ee.IEC, positioning, shapes, patterns, calc, fit, matrix, and many more.