Fixing CircuiTikZ Error: I do not know the key '/tikz/elmech'

Problem:

You want to compile a LaTeX file containing CircuiTikZ code but you get the following error:

circuitikz_error.txt
Error: I do not know the key '/tikz/elmech'

Solution

First, be sure that the circuitikz package is included, i.e. there’s a line like

usepackage_circuitikz.tex
\usepackage{circuitikz}

in your LaTeX file.

If that is the case, you likely have an outdated CircuiTikZ version (elmech is in TeXLive 2016+). \u00a0Depending on your distribution, there are several ways to update CircuiTikZ:

For ubuntu, see this post to update to TeXLive 2016 For other distributions, see this post using tlmgr


Check out similar posts by category: LaTeX