I am trying to replicate some of the body diode customization into my own circuit and I havent had much success.. The compiler seems not to recognize the style./color= whatevercoloritis ..
As a last resource, I just copied and pasted the example code into my environment and neither did it manage to introduce the colors.
Code shown below (the same as in the manual 1.6.0 page 113)
\begin{tikzpicture}[red solid thin bodydiode/.style={bodydiode,
circuitikz/transistor bodydiode/dash=none,
circuitikz/transistor bodydiode/color=red,
circuitikz/transistor bodydiode/relative thickness=0.3}]
\draw (0,0) node (mosfet1) [nigfete,anchor=D,bodydiode] {$Q_1$};
\draw[densely dashed] (3,0) node (mosfet1) [nigfete,anchor=D,bodydiode] {$Q_2$};
\draw (6,0) node (mosfet1) [nigfete,anchor=D,bodydiode,
circuitikz/transistor bodydiode/color=gray] {$Q_3$};
\draw (0,-2) node (mosfet1) [nigfete,anchor=D,bodydiode,
circuitikz/transistor bodydiode/dash={{2pt}{1pt}}] {$Q_4$};
\draw[densely dashed] (3,-2) node (mosfet1) [nigfete,anchor=D,
red solid thin bodydiode] {$Q_5$};
\ctikzset{transistor bodydiode/relative thickness=.5}% from now on, in scope
\draw[densely dotted] (6,-2) node (mosfet1) [nigfete,anchor=D,bodydiode,
circuitikz/transistor bodydiode/dash=none] {$Q_6$};
\path (7,0); %% adjust bounding box (node text is outside it!)
\end{tikzpicture}
This is what I get when compiling the section shown above:
I also tried to modify the color thru \ctikzset{tripoles/nigfete/bodydiode color./initial=gray}
. Though, it did not change anything even though it did not pop up any warning/error message.
For the sack of whether the \ctikzset...
was working or not.. I tried to change the scale of the bodydiode and it worked just fine as in the example below.
Default values:
\draw (0,0) node[nigfete, anchor=D, bodydiode] (S1) {$S_1$} ;
Modified bodydiode scale:
\ctikzset{tripoles/nigfete/bodydiode scale/.initial=0.8}
\draw (0,0) node[nigfete, anchor=D, bodydiode] (S1) {$S_1$} ;
Is there any specific package that I should load, and I am missing, at the begining of the document in order to activate the style color for bodydiode customization?
Is there anything else that I could introduce to customize the color of the bodydiode without actually introducing a bipole diode component in parallel with the MOSFET?
Thank you!
Best Answer
The first problem is that your version is too old; follow I need to use a different version of circuitikz. How can I do that? to solve that.
For the second question, you can't apply the style just to all the
nigfete
s, but you can apply that manually, and/or use styles: