I'm having some problems with "circuitikz" package. When I try to use it TexStudio gives me the following error Undefined control sequence. \pgfutil@proteced. The code works correctly but when I call "circuitikz" something goes wrong. I use MikTex as compiler and TexMaker as editor. I tryed to install the package many times but nothing.
\documentclass[11pt, titlepage]{article}
\usepackage{textcomp}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage[linktocpage=true]{hyperref}
\usepackage{amsmath}
\usepackage{circuitikz}
\usepackage[output-decimal-marker={.}]{siunitx}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz}
\usepackage{pgfplots}
\usepgfplotslibrary{external}
\tikzexternalize[prefix=tikz/]
\usepackage{booktabs}
\usepackage{pbox}
\begin{document}
Hi all, Hi all !
\end{document}
This code comes from another user who uses it without problems. I ask for some advice because I tryed almost everything I found on the net.
Thanks for any help!!!
\begin{document}for\end{document}which I suppose was a typo). It throws an unrelated warning about the pgfplots compat, btw. – Juan Castaño Nov 06 '21 at 08:43amsmathyou load twice,hyperrefshould be loaded last. You may consider to upgrade your LaTeX installation. – Zarko Nov 06 '21 at 08:57circuitikz. See https://tex.stackexchange.com/questions/524328/i-need-to-use-a-different-version-of-circuitikz-how-can-i-do-that, or a too old version of TikZ. – Rmano Nov 06 '21 at 08:59\begin{circuitikz}...\end{circuitikz}, but\begin{tikzpicture}...\end{tikzpicture}(which really is exactly the same). – Rmano Nov 06 '21 at 10:02circuitikzuse\pgfutil@protected(the PRs done by me), whereas older versions ofpgf/TikZ don't provide it (the switch made there to use\pgfutil@protectedis relatively young, iirc). But anyways, the issue is (or was, as it now seems fixed) certainly mismatched package versions. – Skillmon Nov 06 '21 at 10:56circuitikzand a hopelessly out of date version ofpgf.... :) – Skillmon Nov 06 '21 at 15:01