ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Jan-Erik Hägglöf via ntg-context" <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: "Jan-Erik Hägglöf" <skrantajanneman@gmail.com>
Subject: circuitikz module seems broken
Date: Fri, 3 Dec 2021 08:54:45 +0100	[thread overview]
Message-ID: <C28DE88F-532B-45C2-8C8A-E064D3C19BBC@gmail.com> (raw)

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
___________________________________________________________________________________

             reply	other threads:[~2021-12-03  7:54 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03  7:54 Jan-Erik Hägglöf via ntg-context [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C28DE88F-532B-45C2-8C8A-E064D3C19BBC@gmail.com \
    --to=ntg-context@ntg.nl \
    --cc=skrantajanneman@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).