diff options
author | Norbert Preining <norbert@preining.info> | 2021-07-07 03:03:32 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-07-07 03:03:32 +0000 |
commit | 4747884efc69f5b8ad51cc818467f7bbf428b815 (patch) | |
tree | d05568e0369ce16288bc105806553f717c194a1c /graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex | |
parent | 109a435244c29109322bcd46386301f6c62d4061 (diff) |
CTAN sync 202107070303
Diffstat (limited to 'graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex')
-rw-r--r-- | graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex index 86732077b0..2759f80c9c 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex @@ -93,12 +93,12 @@ %% subcircuits (experimental) %% %% introduced by Romano Giannetti around April 2021 -%% +%% changes suggested by Jonathan P. Spratte %% \newbox\ctikz@scratchbox \long\def\ctikzsubcircuitdef#1#2#3{% - \expandafter\gdef\csname #1@Anchor\endcsname{} - \expandafter\gdef\csname #1@setanchors\endcsname{ + \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}{}; @@ -106,17 +106,12 @@ % 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#1aux\endcsname{##1}{\csname #1@Anchor##2\endcsname}} - \expandafter\gdef\csname#1aux\endcsname##1##2{% - % move to the anchor - ##2 - % reference anchor should be -reference - coordinate (##1-subckt@reference) - #3 - } + \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} |