Examples of a CircuiTikz subcircuits demonstrating three-phase (wye) resistive and inductive loads.
This tutorial demonstrates utilizing the CircuiTikz package of LaTeX to create reusable circuits intended to be incorporated as part of a larger document (for example, a paper, poster, or system diagram) or as a standalone vector graphics asset for use in other documentation formats.
Note that a multi-page output is produced since each example is its own figure
environment via the standalone
multi
package option.
For broad compatibility, all tools utilized are constrained to those included
in a standard TeX Live distribution. Therefore, texlive
(linux), MacTeX
(macOS), MikTex
(Windows) or Container thereof is required.
Additionally, it's worth making sure that dvisvgm
successfully locates the GhostScript dynamic library on your system via
dvisvgm -V1
.
The included Makefile contains all commands to render the graphics assets.
Use the tex
target to generate the PDF output and the svg
target to
generate the SVG output. Note that the later command is dependent on the
former. For convenience, the all
target runs both sequential. Additionally,
the clean
removes the TeX artifacts while distclean
removes both artifacts
and outputs.
After considering various options, the most straightforward approach seemed
to be to use latexmk
to delegate latex
to generate DVI->PDF
and dvisvgm
to convert DVI->SVG
using a Makefile. As a more modern alternative, it's
also possible to use xelatex
to generate XDV->PDF
and dvisvgm
to convert
XDV->SVG
.
- Add GitHub Action for continuous integration
- Avoid specifying GhostScript dynamic library path via environmental variable
- Add alternative latexmk configuration for using
xelatex
- Try
dvisvgm
TikZ package option