ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* circuitikz module seems broken
@ 2021-12-03  7:54 Jan-Erik Hägglöf via ntg-context
  2021-12-03  9:49 ` [DKIM] " Hans Hagen via ntg-context
  0 siblings, 1 reply; 26+ messages in thread
From: Jan-Erik Hägglöf via ntg-context @ 2021-12-03  7:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Jan-Erik Hägglöf

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2021-12-14 13:14 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-03  7:54 circuitikz module seems broken Jan-Erik Hägglöf via ntg-context
2021-12-03  9:49 ` [DKIM] " Hans Hagen via ntg-context
2021-12-03 13:54   ` [DKIM] " Hans Hagen via ntg-context
2021-12-03 14:17     ` skrantajanneman via ntg-context
2021-12-03 14:40       ` [DKIM] " Hans Hagen via ntg-context
2021-12-03 14:47     ` Aditya Mahajan via ntg-context
2021-12-03 18:16       ` Hans Hagen via ntg-context
2021-12-03 22:39         ` Jan-Erik Hägglöf via ntg-context
2021-12-03 23:27           ` Aditya Mahajan via ntg-context
2021-12-04  9:05             ` Henning Hraban Ramm via ntg-context
2021-12-04 21:37               ` Jan-Erik Hägglöf via ntg-context
2021-12-05 15:35                 ` [DKIM] " Hans Hagen via ntg-context
2021-12-05 20:45                   ` [DKIM] " Jan-Erik Hägglöf via ntg-context
2021-12-06  6:54                   ` [DKIM] " Aditya Mahajan via ntg-context
2021-12-06  9:02                 ` Aditya Mahajan via ntg-context
2021-12-06 17:39                   ` Aditya Mahajan via ntg-context
2021-12-06 19:30                     ` Hans Hagen via ntg-context
2021-12-06 20:49                     ` Jan-Erik Hägglöf via ntg-context
2021-12-07  8:48                       ` [DKIM] " Hans Hagen via ntg-context
2021-12-08  5:30                       ` Aditya Mahajan via ntg-context
2021-12-13 20:08                     ` Aditya Mahajan via ntg-context
2021-12-13 20:14                       ` Jan-Erik Hägglöf via ntg-context
2021-12-13 22:35                         ` Jan-Erik Hägglöf via ntg-context
2021-12-13 23:54                           ` Hans Hagen via ntg-context
2021-12-14  3:57                             ` Aditya Mahajan via ntg-context
2021-12-14 13:14                               ` Jan-Erik Hägglöf via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).