Debian Codegraph @

texmf-dist/doc/context/third/circuitikz/circuitikz-context.tex

raw
1 % Copyright 2018-2026 by Romano Giannetti
2 % Copyright 2015-2026 by Stefan Lindner
3 % Copyright 2013-2026 by Stefan Erhardt
4 % Copyright 2007-2026 by Massimo Redaelli
5 %
6 % This file may be distributed and/or modified
7 %
8 % 1. under the LaTeX Project Public License and/or
9 % 2. under the GNU Public License.
10 %
11 % See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
12
13 % This first line *shouldn't* be needed; it's here to work around a problem
14 % in ConTeXt TikZ support when it switch to LMTX (fixed around May 2023)
15 % See also https://github.com/circuitikz/circuitikz/issues/706
16 % See https://github.com/pgf-tikz/pgf/issues/1248#issuecomment-1486235591
17 % If your version of context errors out, try:
18 % - update context
19 % - or uncomment the following line
20 % \usemodule[pgfrcs,pgfmat]
21 \usemodule[circuitikz]
22
23 \starttext
24
25 A simple example to test the installation.
26
27 % removed all the "pseudo-SI commands". They were removed by ConTeXt,
28 % when it moved to LMTX (March 2023).
29 % For units you should use http://www.pragma-ade.nl/general/manuals/units-mkiv.pdf
30 \startcircuitikz[scale=1.5]
31 \draw
32 (0,2) to[I=1~mA] (2,2)
33 to[R, l_=2~kΩ, *-*] (0,0)
34 to[R, l_=2~kΩ] (2,0)
35 to[V, v_=2~V] (2,2)
36 to[cspst, l=$t_0$] (4,2) -- (4,1.5)
37 to [generic, i=$i_1$, v=$v_1$] (4,-.5) -- (4,-1.5)
38 (0,2) -- (0,-1.5) to[V, v_=4~V] (2,-1.5)
39 to [R, l=1~kΩ] (4,-1.5)
40 (5,2) node[dipchip, anchor=pin 1]{}
41 (5,-2) node[flipflop JK, anchor=pin 1]{};
42
43 \stopcircuitikz
44
45 \stoptext