Skip to content

About

SymbolConvert is subpart of the Circuit2TikZ project. It provides an export of all currently avaliable components in CircuiTikZ to the CircuiTikZ-Designer GUI

Topics

Resources

Stars

16 stars

Watchers

0 watching

Forks

Repository files navigation

Symbol Convert for Circuit2TikZ

Important

This repository is no longer maintained. The converter is now part of CircuiTikZ-Designer, in the folder tools/symbol-convert/. It was moved there in CircuiTikZ-Designer#115. Please open issues and pull requests in CircuiTikZ-Designer.

The instructions below describe the old version in this repository.

Symbol Convert allows the export of new CircuiTikZ symbols when they are added as an SVG-file. This is how the newest symbols are easily available in Circuit2TikZ-Designer

Dependencies

The output depends on the tool versions. These are the versions in use on Linux:

Tool Version Pinned by
CircuiTikZ 1.8.5 manual installation, see below
TeX Live (lualatex) 2026 (LuaHBTeX 1.24.0) not pinned
dvisvgm 3.6 (from TeX Live) not pinned
svgo 4.0.1 package-lock.json
Node.js 26.13.1 not pinned
Python 3.12 .python-version
Python packages see uv.lock uv.lock

Python and svgo

You need uv and Node.js with npm. In the project folder, run:

uv sync
npm ci

The converter finds the local svgo installation itself, you don't need to add it to your PATH.

TeX Live

Install TeX Live and make sure that lualatex and dvisvgm are on your PATH.

CircuiTikZ 1.8.5

TeX Live may contain another CircuiTikZ version. Newer versions change how some symbols are drawn. To use 1.8.5, install it into your personal TeX folder (TEXMFHOME). It then takes priority for all documents you compile. This overwrites any CircuiTikZ files already in that folder.

src="$(mktemp -d)"
git clone --depth 1 --branch v1.8.5 https://github.com/circuitikz/circuitikz.git "$src"
dest="$(kpsewhich -var-value=TEXMFHOME)/tex"
mkdir -p "$dest/latex/circuitikz" "$dest/generic/circuitikz"
cp "$src"/tex/*.sty "$src"/tex/circuitikz-*-body.tex "$dest/latex/circuitikz/"
cp "$src"/tex/pgfcirc*.tex "$src"/tex/ctikzstyle-*.tex "$dest/generic/circuitikz/"

These are bash commands. Check the result, it should show 1.8.5:

grep 'def\\pgfcircversion{' "$(kpsewhich -progname=lualatex circuitikz.sty)"

Usage

Open converter.ipynb (e.g. in VS Code), select the kernel from .venv and run all cells. The result is written to symbols.svg, an existing file is overwritten.

Files in build/ are not created again if they already exist, even if the code or the tools changed. Remove build/ for a full rebuild, and also after a failed run.

Bugs and Features

see under Issues

About

SymbolConvert is subpart of the Circuit2TikZ project. It provides an export of all currently avaliable components in CircuiTikZ to the CircuiTikZ-Designer GUI

Topics

Resources

Stars

16 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages