Browse Source

circuitikz 1.2.2

master
Jonathan Spratte 10 months ago
parent
commit
dc80aa9b01
2 changed files with 33 additions and 16 deletions
  1. 5
    0
      Doc/tex/doc_MRTcirc.tex
  2. 28
    16
      MRTcirc/MRTcirc.sty

+ 5
- 0
Doc/tex/doc_MRTcirc.tex View File

@@ -90,6 +90,11 @@ can use in |flipflop def| (or in |\ctikzset{multipoles/flipflop/|\meta{key}|}|):
90 90
   centre, just like they are depicted in the MRT scripts. Initially this is
91 91
   |true|.
92 92
 \end{describeopt}
93
+\begin{describeopt}{not symbol}[\meta{choice}]
94
+  Choices are |circle| and |ieee circle|, the initial value is |ieee circle|. It
95
+  controls which kind of circles are used to negate pins, similar to the
96
+  \pkg{circuitikz} key |tripoles/european not symbol|.
97
+\end{describeopt}
93 98
 
94 99
 A display of the altered flip-flops:
95 100
 

+ 28
- 16
MRTcirc/MRTcirc.sty View File

@@ -88,24 +88,26 @@
88 88
 \patchcmd\MRTcirc@pgfcircdeclareeurologicport
89 89
   {%
90 90
     \ifnum#3=1\relax
91
-        \anchor{in}{\southwest\pgfpoint{\pgf@x}{0pt}}% or \step
92
-        \anchor{in 1}{\southwest\pgfpoint{\pgf@x}{0pt}}% or \step
93
-        \anchor{bin}{\left\pgfpoint{\pgf@x}{0pt}}% or \step
94
-        \anchor{bin 1}{\left\pgfpoint{\pgf@x}{0pt}}% or \step
91
+        \anchor{in}{\southwest\pgfpoint{\pgf@x}{0pt}}%
92
+        \anchor{in 1}{\southwest\pgfpoint{\pgf@x}{0pt}}%
93
+        \anchor{bin}{\left\pgfpoint{\pgf@x}{0pt}}%
94
+        \anchor{bin 1}{\left\pgfpoint{\pgf@x}{0pt}}%
95 95
     \else
96
-        \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@european #1 port\endcsname{%
97
-            \pgfmathloop%
96
+        \expandafter\pgfutil@g@addto@macro
97
+        \csname pgf@sh@s@european #1 port\endcsname{%
98
+            \pgfmathloop
98 99
             \ifnum\pgfmathcounter>#3%
99
-        \else%
100
-            %\pgfutil@ifundefined{pgf@anchor@european #1 port@in \pgfmathcounter}{% redundant
101
-            \expandafter\xdef\csname pgf@anchor@european #1 port@in \pgfmathcounter\endcsname{%
102
-                \noexpand\pgf@circ@logicport@input{\pgfmathcounter}% defined above
100
+        \else
101
+            \expandafter\xdef
102
+            \csname pgf@anchor@european #1 port@in \pgfmathcounter\endcsname{%
103
+                \noexpand\pgf@circ@logicport@input{\pgfmathcounter}%
103 104
             }%
104
-            \expandafter\xdef\csname pgf@anchor@european #1 port@bin \pgfmathcounter\endcsname{%
105
-                \noexpand\pgf@circ@logicport@baseinput{\pgfmathcounter}{4}{#1}% defined above
105
+            \expandafter\xdef
106
+            \csname pgf@anchor@european #1 port@bin \pgfmathcounter\endcsname{%
107
+                \noexpand\pgf@circ@logicport@baseinput{\pgfmathcounter}{4}{#1}%
106 108
             }%
107 109
             %}{}%
108
-            \repeatpgfmathloop%
110
+            \repeatpgfmathloop
109 111
         }
110 112
     \fi
111 113
   }
@@ -165,12 +167,24 @@
165 167
 % new flip-flop options >>=
166 168
 \newif\ifpgfcirc@flipflop@dashed\pgfcirc@flipflop@dashedtrue
167 169
 \newif\ifpgfcirc@flipflop@wedge@stretch\pgfcirc@flipflop@wedge@stretchtrue
170
+\let\MRTcirc@flipflop@notsymbol\pgf@circuit@ieeelogicporttrue
168 171
 \ctikzset{multipoles/flipflop/dashed/.is if=pgfcirc@flipflop@dashed}
169 172
 \ctikzset
170 173
   {%
171 174
     multipoles/flipflop/%
172 175
       clock wedge stretch/.is if=pgfcirc@flipflop@wedge@stretch
173 176
   }
177
+\ctikzset
178
+  {%
179
+    multipoles/flipflop/.cd
180
+    ,not symbol/.is choice
181
+    ,not symbol/circle/.code=%
182
+      \let\MRTcirc@flipflop@notsymbol\pgf@circuit@ieeelogicportfalse
183
+    ,not symbol/ieee circle/.code=%
184
+      \let\MRTcirc@flipflop@notsymbol\pgf@circuit@ieeelogicporttrue
185
+    ,not symbol aux/.code=%
186
+      \MRTcirc@flipflop@notsymbol
187
+  }
174 188
 % =<<
175 189
 % stretch the wedges on flip-flops>>=
176 190
 \patchcmd\pgf@circ@do@wedge@left
@@ -256,9 +270,7 @@
256 270
 % =<<
257 271
 % restyle base flip-flops >>=
258 272
 \protected\def\MRTcirc@flipflop#1#2%
259
-  {%
260
-    \tikzset{flipflop #1/.style={flipflop,flipflop def={#2,##1}}}%
261
-  }
273
+  {\tikzset{flipflop #1/.style={flipflop,flipflop def={#2,##1,not symbol aux}}}}
262 274
 \MRTcirc@flipflop{aSR}{t1=S,t3=R}
263 275
 \MRTcirc@flipflop{SR}{t1=S,t3=R,c2=1}
264 276
 \MRTcirc@flipflop{D}{t1=D,c2=1}

Loading…
Cancel
Save