summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-10-10 20:24:20 +0000
committerKarl Berry <karl@freefriends.org>2023-10-10 20:24:20 +0000
commitb3cd1cdbf5aba4dcabafc0ba9a14d6338229b475 (patch)
tree2b6a456ec17d78e82f073fa0f65d42588ae776ad /Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
parent970e6738b9e18ce765141f2d686aed9189736875 (diff)
circuitikz (10oct23)
git-svn-id: svn://tug.org/texlive/trunk@68502 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex')
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex89
1 files changed, 75 insertions, 14 deletions
diff --git a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
index d331f510b5f..1982bca4525 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
+++ b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
@@ -2500,7 +2500,7 @@ Notice that you can set both \texttt{gto gate end arrow} and \texttt{gto gate st
\subsubsection{Diode customizations}\label{sec:tweak-d}
-You can change the scale of the diodes by setting the key \texttt{diodes/scale} to something different from the default \texttt{1.0}. In Romano's opinion, diodes are somewhat big with the default style of the package, so a setting like \verb|\ctikzset{diode/scale=0.6}| is recommended.
+You can change the scale of the diodes by setting the key \texttt{diodes/scale} to something different from the default \texttt{1.0}. In Romano's opinion, diodes are somewhat big with the default style of the package, so a setting like \verb|\ctikzset{diodes/scale=0.6}| is recommended.
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
@@ -2590,6 +2590,8 @@ Notice that source and generators are divided in three classes that can be style
\circuitdescbip{battery}{Battery}{}
\circuitdescbip{battery1}{Single battery cell}{}
\circuitdescbip{battery2}{Single battery cell}{}
+ \circuitdescbip{baertty}{Randall Munroe's baertty\footnotemark}{}
+ \footnotetext{\href{https://xkcd.com/2818}{Mandatory xkcd}}
\end{groupdesc}
\subsubsection{Stationary sources}
@@ -2609,17 +2611,20 @@ Similarly, if (default behavior) \texttt{europeanvoltages} option is active (or
\end{framed}
-\subsubsection{Sinusoidal sources}\label{sec:sinusoidal-vi} These two are basically the same symbol; to distinguish among them, you have to add a label, which will be a voltage or a current.
+\subsubsection{Sinusoidal sources}\label{sec:sinusoidal-vi} These two are basically the same symbol; to distinguish among them, you have to add a label, which will be a voltage or a current. Another option would be to configure the \texttt{sinusoidal current source} as an open shape using \texttt{\textbackslash ctikzset\string{bipoles/isourcesin/angle=80\string}} similar to the \texttt{dcisource} in section~\ref{sec:dc-sources}.
\begin{groupdesc}
\circuitdescbip*[vsourcesin]{sinusoidal voltage source}{Sinusoidal voltage source}{vsourcesin, sV}
- \circuitdescbip*[isourcesin]{sinusoidal current source}{Sinusoidal current source}{isourcesin, sI}
+ \circuitdescbip*[isourcesin]{sinusoidal current source}{Sinusoidal current source\footnotemark}{isourcesin, sI}
+ \footnotetext{The configurable open shape of the \texttt{sinusoidal current source} has been added by \href{https://github.com/circuitikz/circuitikz/pull/737}{Maximilian Martin}}.
\end{groupdesc}
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}[american]
- \draw (0,1) to[sV=$V$] ++(3,0);
- \draw (0,0) to[sI=$I$] ++(3,0);
+ \draw (0,2) to[sV=$V$] ++(3,0);
+ \draw (0,1) to[sI=$I$] ++(3,0);
+ \ctikzset{bipoles/isourcesin/angle=80}
+ \draw (0,0) to[sI] ++(3,0);
\end{circuitikz}
\end{LTXexample}
@@ -2714,13 +2719,13 @@ Notice that if you choose the dashed style, the noise sources are fillable:
\endgroup
\end{groupdesc}
-The transformer shapes vector group options can be specified for the primary (\texttt{prim=\emph{value}}), the secondary (\texttt{sec=\emph{value}}) and tertiary (\texttt{tert=\emph{value}}) three-phase vector groups: the value can be one of \texttt{delta}, \texttt{wye} and \texttt{zig}.
+The transformer shapes vector group options can be specified for the primary (\texttt{prim=\emph{value}}), the secondary (\texttt{sec=\emph{value}}) and tertiary (\texttt{tert=\emph{value}}) three-phase vector groups: the value can be one of \texttt{delta}, \texttt{wye}, \texttt{eyw}\footnote{The \texttt{eyw} symbol was suggested by \href{https://github.com/circuitikz/circuitikz/pull/742}{Jakob «DraUX» on GitHub}} and \texttt{zig}.
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
\draw (0,0) to[oosourcetrans, prim=zig, sec=delta, o-] ++(2,0)
to[oosourcetrans, prim=delta, sec=wye,-o] ++(0,-2)
- to[ooosource, prim=wye, sec=zig, tert=delta] (0,0);
+ to[ooosource, prim=eyw, sec=zig, tert=delta] (0,0);
\end{circuitikz}
\end{LTXexample}
@@ -2731,7 +2736,7 @@ These two ``sources'' have additional anchors that reach the center of the symbo
smalldot/.style={draw, circle,red, inner sep=0.2pt}]
\draw (0,0) to[oosourcetrans, name=A,
prim=delta, sec=wye] ++(1,0)
- to[ooosource, name=B, prim=wye, sec=zig,
+ to[ooosource, name=B, prim=eyw, sec=zig,
tert=delta] ++(1,0)
(A.symbolsec) -- ++(-45:0.5) node[ground]{};
\node [smalldot] at (A.symbolprim) {};
@@ -2778,7 +2783,7 @@ The symbol shapes used here seems to be the most common in publications; if you
\end{tikzpicture}
\end{LTXexample}
-\subsubsection{DC sources}
+\subsubsection{DC sources}\label{sec:dc-sources}
\begin{groupdesc}
\circuitdescbip*{dcvsource}{DC voltage source}{}
\circuitdescbip*{dcisource}{DC current source}{}
@@ -2851,9 +2856,9 @@ You can do the same with the \texttt{american controlled voltage sources}, subst
\end{LTXexample}
\paragraph{Three-phase symbols.}
-The three-phase symbols \texttt{delta}, \texttt{wye}, and \texttt{zig} follows the line thickness exactly as
+The three-phase symbols \texttt{delta}, \texttt{wye}, \texttt{eyw}, and \texttt{zig} follows the line thickness exactly as
the waveform ones (see above). Additionally, you can scale them up and down by changing the value of the keys
-\texttt{sources/symbol/delta scale}, \texttt{.../wye scale}, and \texttt{.../zig scale} (default \texttt{1}).
+\texttt{sources/symbol/delta scale}, \texttt{.../wye scale}, \texttt{.../eyw scale}, and \texttt{.../zig scale} (default \texttt{1}).
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}[scale=1.8, transform shape]
@@ -5728,6 +5733,11 @@ These are all of the to-style type:
\circuitdescbip[ospst]{opening switch}{Opening switch}{ospst}
\circuitdescbip[nos]{normal open switch}{Normally open switch}{nos}
\circuitdescbip[ncs]{normal closed switch}{Normally closed switch}{ncs}
+ \circuitdescbip[oncs]{opening normal closed switch}{Opening normally closed switch}{oncs}
+ \circuitdescbip[cncs]{closing normal closed switch}{Closing normally closed switch}{cncs}
+ \circuitdescbip[onos]{opening normal open switch}{Opening normally open switch}{onos}
+ \circuitdescbip[cnos]{closing normal open switch}{Closing normally open switch\footnotemark}{cnos}
+ \footnotetext{These last four were contributed by \href{https://tex.stackexchange.com/questions/693446/new-switch-components-for-circuitikz}{Jakob «DraUX»}}
\circuitdescbip[pushbutton]{push button}{Normally open push button}{normally open push button, nopb}(tip/0/0.2)
\circuitdescbip[ncpushbutton]{normally closed push button}{Normally closed push button}{ncpb}(tip/0/0.2)
\circuitdescbip[pushbuttonc]{normally open push button closed}{Normally open push button (in closed position)}{nopbc}(tip/0/0.2)
@@ -6035,6 +6045,32 @@ You can change that globally or locally, as ever. The tip specification is the o
\end{circuitikz}
\end{LTXexample}
+You can also have the option to change the color, relative thickness, and dash pattern by setting keys with the \verb!\ctikzset! command under the \texttt{switch arrows} hierarchy. The available keys are:
+
+\begin{center}
+ \begin{tabular}{>{\ttfamily}l>{\ttfamily}lp{0.5\linewidth}}
+ \toprule
+ parameter & default & description \\
+ \midrule
+ relative thickness & 1.0 & multiply the class thickness \\
+ color & default & stroke color: \texttt{default} is the same as the component \\
+ dash & default & dash pattern: \texttt{default} means not to change the setting for the component; \texttt{none} means unbroken line; every other input is a dash pattern.\footnotemark \\
+ \bottomrule
+ \end{tabular}
+ \footnotetext{Follows the syntax of the pattern sequence \texttt{\textbackslash pgfsetdash} --- see \TikZ{} manual for details; phase is always zero. Basically you pass pairs of dash-length -- blank-length dimensions, see the examples.}
+\end{center}
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}
+\draw (0,2) to[spst] ++(1,0) to[cogsw]
+ ++(1,0) to[oncs] ++(1,0);
+\ctikzset{switch arrows/color=red}
+\ctikzset{switch arrows/relative thickness=0.5}
+\ctikzset{switch arrows/dash={{1pt}{1pt}}}
+\draw (0,0) to[spst] ++(1,0) to[cogsw, switch arrows/dash=none]
+ ++(1,0) to[oncs, switch arrows/color=blue] ++(1,0);
+\end{circuitikz}
+\end{LTXexample}
\paragraph{Rotary switch arrows.} You can change the rotary switch arrow shape in the same way as you change the ones in regular switches. Notice however that if you set either \texttt{switch end arrow} or \texttt{switch start arrow} they will be followed only if you have set both arrows with \texttt{<->} or equivalent, otherwise just one will be used.
@@ -6207,6 +6243,8 @@ The transmission gate (also known as ``bowtie'') components are not described in
\circuitdesc*{european xnor port}{European \textsc{xnor} port}{}
\circuitdesc*{european buffer port}{European \textsc{buffer} port}{}
\circuitdesc*{european not port}{European \textsc{not} port}{}
+ \circuitdesc*{european blank port}{European blank port}{A}
+ \circuitdesc*{european blank not port}{European blank not port}{B}
\end{groupdesc}
\begin{framed}
@@ -6767,7 +6805,30 @@ The anchors for the tgate's control point are called \texttt{gate} and \texttt{n
\subsubsection{European logic port usage}
-European logic port are the same class as american and IEEE-style ones, and they obey the same class modifier. Moreover, you can use the \texttt{no inputs pin} as in the other logic ports to suppress input pins.
+European logic port are in the same class as american and IEEE-style ones, and they obey the same class modifier. Moreover, you can use the \texttt{no inputs pin} as in the other logic ports to suppress input pins.
+
+The standard text inside the port does not rotate (not flip) with the component\footnote{since \texttt{1.6.4}, thanks to a suggestion by \href{https://github.com/circuitikz/circuitikz/issues/730}{user \texttt{@sputeanus} on GitHub}.}, but you can change the font (and color and so on) with the key \texttt{european ports font} (default nothing, which means it uses the standard font and color).
+For more complex customization, you can use the two ``blank'' European ports, and add the text you want on them.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}
+ \ctikzset{
+ logic ports=european,
+ logic ports origin=center,
+ logic ports/scale=1.5,
+ tripoles/european not symbol=ieee circle,
+ }
+ % Draw the Nand with big AND symbol
+ \ctikzset{european ports font=\Huge\color{red}}
+ \draw(0,0) node [nand port, rotate=90,
+ number inputs=4]{};
+ \draw(3,0) node [nand port, xscale=-1]{};
+ % the un-rotation is not automatic for node text!
+ \draw(0,-3) node [blank port, rotate=90,
+ ]{\rotatebox{-90}{\Huge ?}};
+ \draw(3,-3) node [blank not port, xscale=-1]{?};
+\end{tikzpicture}
+\end{LTXexample}
\paragraph{European logic port customization} Normally the European-style logic port with inverted output are marked with a small triangle; if you want you can change it with the key \texttt{tripoles/european not symbol}; its default is \texttt{triangle} but you can set it to \texttt{circle} like in the following example. As you can see, the circle size is the same as the circuit poles; if you prefer the size used in the IEEE standard ports, you can use set it to \texttt{ieee circle}.
@@ -8994,7 +9055,7 @@ You can add nodes to the bipoles, positioned at the coordinates surrounding the
\end{circuitikz}
\end{LTXexample}
-These bipole nodes are added after the path is drawn, as every node in \TikZ\ --- this is the reason why they are always filled (with the main color the normal nodes, with white the open ones), in order to ``hide'' the wire below. You can override the fill color if you want; but notice that if you draw things in two different paths, you will have ``strange'' results; notice that in the second line of resistors the second wire is starting from the center of the white \texttt{ocirc} of the previous path.
+These bipole nodes are added \emph{after} any single path is drawn, as every node in \TikZ\ --- this is the reason why they are always filled (with the main color the normal nodes, with white the open ones), in order to ``hide'' the wire below. You can override the fill color if you want; but notice that if you draw things in two different paths, you will have ``strange'' results; notice that in the second line of resistors the second wire is starting from the center of the white \texttt{ocirc} of the previous path.
\begin{LTXexample}[varwidth=true,
pos=t
@@ -9112,7 +9173,7 @@ There are several predefined shorthand as the above; in the following pages you
\subsubsection{Transparent poles}\label{sec:transparent-poles}
-``Open-poles'' terminals (\texttt{ocirc}, \texttt{odiamondpole}, and \texttt{osquarepole}) are normally filled with the background color at full opacity. This is because, for simplicity of operation, the nodes are placed \emph{after} the wires are drawn and have to ``white-out'' the underlying lines.
+``Open-poles'' terminals (\texttt{ocirc}, \texttt{odiamondpole}, and \texttt{osquarepole}) are normally filled with the background color at full opacity. The is reason is that \TikZ{}, when stroking a path, places and draws the nodes \emph{after} the lines are drawn; that way the poles ``white-out'' the underlying lines. Clearly this works if the wires and poles are written \emph{in the same path command}, otherwise the explicit order is respected.
Anyway, \emph{if you know what you are doing}, you can change it with the key \texttt{poles/open fill opacity} (with \verb|\ctikzset|) or the style \texttt{open poles opacity}. Notice that you will have artifacts if you don't use the border anchors of the poles to connect wires, and you need to do that by hand.