Dear List!
I’ve been struggeling with the circuitikz module since my upgrade to LMTX.
The following test of installation failed, running file
circuitikz-context.tex in ../modules/t-tikz/ directory
% Copyright 2018-2021 by Romano Giannetti
% Copyright 2015-2021 by Stefan Lindner
% Copyright 2013-2021 by Stefan Erhardt
% Copyright 2007-2021 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
\usemodule[circuitikz]
\starttext
A simple example to test the installation.
\startcircuitikz[scale=1.2]
\draw
(0,2) to[I=1\milli\ampere] (2,2)
to[R, l_=2\kilo\ohm, *-*] (0,0)
to[R, l_=2\kilo\ohm] (2,0)
to[V, v_=2\volt] (2,2)
to[cspst, l=$t_0$] (4,2) -- (4,1.5)
to [generic, i=$i_1$, v=$v_1$] (4,-.5) -- (4,-1.5)
(0,2) -- (0,-1.5) to[V, v_=4\volt] (2,-1.5)
to [R, l=1\kilo\ohm] (4,-1.5)
(5,2) node[dipchip, anchor=pin 1]{}
(5,-2) node[flipflop JK, anchor=pin 1]{};
\stopcircuitikz
\stoptext
with this error message
pgfcircutils.tex|103 error| Undefined control sequence \undefined
Below is a snippet from pgfcircutils.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% subcircuits (experimental)
%%
%% introduced by Romano Giannetti around April 2021
%% changes suggested by Jonathan P. Spratte
%%
\newbox\ctikz@scratchbox
\pgfutil@protected\def\ctikzsubcircuitdef#1#2#3{%
\expandafter\gdef\csname #1@Anchor\endcsname{}%
\expandafter\gdef\csname #1@setanchors\endcsname{%
\setbox\ctikz@scratchbox=\hbox{%
\begin{circuitikz}
\draw (0,0) \csname#1\endcsname{T-#1}{};
\foreach [count=\i] \anchor in {#2}
% reference anchor is -center
\draw (0,{2-\i/2}) let \p1 = ($(T-#1-subckt@reference)-(T-#1-\anchor)$) in
node[right]{\anchor: \x1,\y1 \expandafter\xdef\csname #1@Anchor\anchor\endcsname{++(\x1,\y1)}};
\end{circuitikz}%
}%
}%
\expandafter\gdef\csname#1\endcsname##1##2{%
\csname #1@Anchor##2\endcsname coordinate(##1-subckt@reference)#3%
}%
}
\long\def\ctikzsubcircuitactivate#1{\csname #1@setanchors\endcsname}
My installation info:
context --version
mtx-context | ConTeXt Process Management 1.04
mtx-context |
mtx-context | main context file: /Users/jan-erikhagglof/context/context-osx-64/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2021.10.28 10:19
mtx-context | main context file: /Users/jan-erikhagglof/context/context-osx-64/tex/texmf-context/tex/context/base/mkxl/context.mkxl
mtx-context | current version: 2021.10.28 10:19
Because of my lack of knowledge in this matter, I have no idea what is wrong here.
Many thanks in advance
Jan-Erik Hägglöf