summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.tex
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/contrib/circuitikz/doc/circuitikz-context.tex')
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikz-context.tex26
1 files changed, 18 insertions, 8 deletions
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.tex b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.tex
index 66b2c517ed..59eeb6f8b6 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.tex
@@ -10,23 +10,33 @@
%
% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
-
+% This first line *shouldn't* be needed; it's here to work around a problem
+% in ConTeXt TikZ support when it switch to LMTX (fixed around May 2023)
+% See also https://github.com/circuitikz/circuitikz/issues/706
+% See https://github.com/pgf-tikz/pgf/issues/1248#issuecomment-1486235591
+% If your version of context errors out, try:
+% - update context
+% - or uncomment the following line
+% \usemodule[pgfrcs,pgfmat]
\usemodule[circuitikz]
\starttext
A simple example to test the installation.
-\startcircuitikz[scale=1.2]
+% removed all the "pseudo-SI commands". They were removed by ConTeXt,
+% when it moved to LMTX (March 2023).
+% For units you should use http://www.pragma-ade.nl/general/manuals/units-mkiv.pdf
+\startcircuitikz[scale=1.5]
\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)
+ (0,2) to[I=1~mA] (2,2)
+ to[R, l_=2~kΩ, *-*] (0,0)
+ to[R, l_=2~kΩ] (2,0)
+ to[V, v_=2~V] (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)
+ (0,2) -- (0,-1.5) to[V, v_=4~V] (2,-1.5)
+ to [R, l=1~kΩ] (4,-1.5)
(5,2) node[dipchip, anchor=pin 1]{}
(5,-2) node[flipflop JK, anchor=pin 1]{};