summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/changelog.tex24
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdfbin17688 -> 17688 bytes
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdfbin1441298 -> 1460564 bytes
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex184
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz.sty4
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex2
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex74
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirccurrent.tex4
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircflow.tex4
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex30
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex17
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex4
-rw-r--r--graphics/pstricks/contrib/pst-func/Changes2
-rw-r--r--graphics/pstricks/contrib/pst-func/doc/pst-func-doc.pdfbin4059910 -> 4063463 bytes
-rw-r--r--graphics/pstricks/contrib/pst-func/doc/pst-func-doc.tex15
-rw-r--r--graphics/pstricks/contrib/pst-func/dvips/pst-func.pro2
-rw-r--r--graphics/pstricks/contrib/pst-func/latex/pst-func.sty6
-rw-r--r--graphics/pstricks/contrib/pst-func/tex/pst-func.tex125
18 files changed, 368 insertions, 129 deletions
diff --git a/graphics/pgf/contrib/circuitikz/doc/changelog.tex b/graphics/pgf/contrib/circuitikz/doc/changelog.tex
index 0ce9902781..b715c12dc0 100644
--- a/graphics/pgf/contrib/circuitikz/doc/changelog.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/changelog.tex
@@ -5,6 +5,30 @@ full list of changes.
\begin{itemize}
\item
+ Version 1.4.4 (2021-10-31)
+
+ Normal maintenance release; minor bugs fixed, a new component and a
+ new option. No Halloween component, sorry\ldots{}
+
+ \begin{itemize}
+ \tightlist
+ \item
+ Added a laser diode component
+ (\href{https://github.com/circuitikz/circuitikz/issues/591}{contributed
+ by André Alves})
+ \item
+ Add the \texttt{override\ source\ vif} option and better describe
+ source's voltage positioning in the manual
+ \item
+ fix \texttt{nobase} option with IGBT family (noticed by
+ \href{https://tex.stackexchange.com/q/619334/38080}{user hinata exc
+ on Stack Eschange})
+ \item
+ fix a problem with
+ \href{https://github.com/circuitikz/circuitikz/issues/584}{legacy
+ open voltage label position}
+ \end{itemize}
+\item
Version 1.4.3 (2021-09-06)
Minor release, mainly a single bugfix.
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
index ce5c81d217..1ca5e368bf 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
index 37b39c62f3..57f2065ef9 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
index b29332aca2..79e6359475 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
@@ -1147,21 +1147,23 @@ Will create the final diagram:
\section{The components: usage}
-Components in \Circuitikz{} come in two forms: path-style, to be used in \texttt{to} path specifications, and node-style, which will be instantiated by a \texttt{node} specification.
+Components in \Circuitikz{} come in two forms: path-style, to be used in a \texttt{to[\emph{component},...} path specifications, and node-style, which will be instantiated by a \texttt{node[\emph{component},...]} specification.
+
+All the shapes defined by Circui\TikZ{} are \texttt{pgf} nodes, so they are usable in both \texttt{pgf} and \TikZ.
\subsection{Path-style components}
The path-style components are used as shown below:
\begin{lstlisting}
\begin{circuitikz}
- \draw (0,0) to[#1=#2, #options] (2,0);
+ \draw (0,0) to[#1=#2, options] (2,0);
\end{circuitikz}
\end{lstlisting}
where \verb|#1| is the name of the component, \verb|#2| is an (optional) label, and \verb|options| are optional labels, annotations, style specifier that will be explained in the rest of the manual.
Transistors and some other node-style components can also be placed using the syntax for bipoles. See section~\ref{sec:transasbip}.
-Most path-style components can be used as a node-style components; to access them, you add a \texttt{shape} to the main name of component (for example, \texttt{diodeshape}). Such a ``node name'' is specified in the description of each component.
+Most path-style components can be used as a node-style components; to access them, you add a \texttt{shape} to the main name of component (for example, \texttt{diodeshape}). Such a ``node-shape name'' is specified in the description of each component.
\subsubsection{Anchors}
@@ -1184,7 +1186,7 @@ Normally, path-style components do not need anchors, although they have them jus
\path (R.\n) \showcoord(\n)<\a:\d>;
\end{circuitikz}
\end{center}
-In the case of bipoles, also shortened geographical anchors exists. In the description, it will be shown when a bipole has additional anchors. To use the anchors, just give a name to the bipole element.
+In the case of bipoles, also shortened geographical anchors exists. In the description, it will be shown when a bipole has additional anchors. To use the anchors, just give a name to the bipole element using the syntax \texttt{name=\emph{myname}}.
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
@@ -1333,7 +1335,7 @@ can be interpreted as the length of a resistor (including reasonable connections
;\end{circuitikz}
\end{LTXexample}
-The changes on \texttt{bipoles/length} should, however, be globally applied to every path, because they affect every element --- including the poles. So you can have artifacts like these:
+The changes on \texttt{bipoles/length} should, however, be globally applied to every path, because they affect every element --- including the poles. So you can have artifacts like the one in the second line below:
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}[
@@ -1399,6 +1401,8 @@ where you have all the needed information about the bipole, with also no-standar
The \emph{Class} of the component (see section~\ref{sec:styling}) is printed at the end of the description.
+Most path-style components can be used as a node-style components; to access them, normally you add a \texttt{shape} to the main name of component (for example, \texttt{diodeshape}). Sometimes though the ``node name'' is different, so it is specified in the description of each component.
+
\subsection{Node-style components}
Node-style components (monopoles, multipoles) can be drawn at a specified point with this syntax, where \verb!#1! is the name of the component:
\begin{lstlisting}
@@ -1413,7 +1417,6 @@ Explanation of the parameters:\\
\texttt{\#3}: name of an anchor (optional)\\
\texttt{\#4}: text written to the text anchor of the component (optional)\\
-Most path-style components can be used as a node-style components; to access them, you add a \texttt{shape} to the main name of component (for example, \texttt{diodeshape}). Such a ``node name'' is specified in the description of each component.
\begin{framed}
\noindent \textbf{Notice:} Nodes must have curly brackets at the end, even when empty. An optional anchor (\texttt{\#3}) can be defined within round brackets to be addressed again later on. And please don't forget the semicolon to terminate the \texttt{\textbackslash draw} command.
@@ -1457,7 +1460,7 @@ In other formats they are undefined; contributions to fill the gap are welcome.
\subsubsection{Anchors}
-Node components anchors are variable across the various kind of components, so they will described better after each category is presented in the manual.
+Node components anchors vary a lot across the various kind of components, so they will described better after each category is presented in the manual. In general all components have geographic anchors (\texttt{north}, \texttt{north west}, \dots), but most of the other anchors are very component-specific.
\subsubsection{Descriptions}
@@ -1467,7 +1470,6 @@ The typical entry in the component list will be like this:
\circuitdesc{npn}{\scshape npn}{}( B/180/0.2,C/0/0.2,E/0/0.2 )
\end{groupdesc}
-All the shapes defined by Circui\TikZ. These are all \texttt{pgf} nodes, so they are usable in both \texttt{pgf} and \TikZ.
If the component can be filled it will be specified in the description. In addition, as an example, the component shown will be filled with the option \texttt{fill=cyan!30!white}:
\begin{groupdesc}
@@ -1584,7 +1586,7 @@ so if will not be colored green!):
\tmpcirc{scale=0.8, transform shape}{\ctikzset{resistors/scale=0.8, capacitors/scale=0.7, diodes/scale=0.6, transistors/scale=1.3,%
amplifiers/fill=cyan, sources/fill=green, diodes/fill=red, resistors/fill=violet,}}
-Please use this option with caution. Although two-color circuits can be nice, using more than that can become rapidly unbearable.
+Please use this option with caution. Although two-colors circuits can be nice, using more than that can become rapidly unbearable.
Old textbooks used the two-color style quite extensively, filling with a kind of light blue like \texttt{blue!30!white} ``closed'' components, but that was largely to hinder black-and-white photocopying\dots
\subsubsection{Line thickness}\label{sec:styling-thickness}
@@ -1968,7 +1970,9 @@ If you want that the arrows behave like the legacy symbols (which are shapes), \
\circuitdescbip*{memristor}{Memristor}{Mr}
\end{groupdesc}
-If \texttt{americanresistors} option is active (or the style \texttt{[american resistors]} is used; this is the default for the package), the resistors are displayed as follows:
+Both \texttt{shortshape} and \texttt{openshape} are not really supposed to be used; they are dummy shapes used as placeholders for the path-drawing routines.
+
+If \texttt{americanresistors} option is active (or the style \texttt{[american resistors]} is used --- this is the default for the package), the resistors are displayed as follows:
\begin{groupdesc}
\ctikzset{resistor=american}
\circuitdescbip[resistor]{R}{Resistor}{american resistor}
@@ -2112,15 +2116,11 @@ ferroelectric capacitors that could be used to show the state of the hysteresis
\end{tikzpicture}
\end{LTXexample}
-There is also the (deprecated\footnote{Thanks to \href{https://tex.stackexchange.com/questions/509594/polar-capacitor-orientation-in-circuitikz-seems-wrong}{Anshul Singhv for noticing}.} --- its polarity is not coherent with the rest of the components) \texttt{polar capacitor}:
-
-\begin{groupdesc}
- \circuitdescbip[pcapacitor]{polar capacitor}{Polar capacitor}{pC}
-\end{groupdesc}
+There is also the (deprecated\footnote{Thanks to \href{https://tex.stackexchange.com/questions/509594/polar-capacitor-orientation-in-circuitikz-seems-wrong}{Anshul Singhv for noticing}.} --- its polarity is not coherent with the rest of the components) \texttt{polar capacitor}; please do not use it.
\subsubsection{Capacitive sensors anchors}
-For capacitive sensors, see section~\ref{sec:sensors-anchors}.
+For capacitive sensors, you have the same anchors than in the case of resistive sensors, see section~\ref{sec:sensors-anchors}.
\subsubsection{Capacitors customizations}\label{sec:capacitors-styling}
@@ -2226,7 +2226,7 @@ Moreover, you can change the number of ``coils'' drawn by setting the key
\subsubsection{Inductors anchors}
-For inductive sensors, see section~\ref{sec:sensors-anchors}.
+For inductive sensors, you have the same anchors than in the case of resistive sensors, see section~\ref{sec:sensors-anchors}.
\paragraph{Taps.}
Inductors have an additional anchor, called \texttt{midtap}, that connects to the center of the coil ``wire''. Notice that this anchor could be on one side or the other of the component, depending on the number of loops of the element; if you need a fixed position, you can use the geographical anchors.
@@ -2285,7 +2285,9 @@ The package options \texttt{fulldiode}, \texttt{strokediode}, and \texttt{emptyd
\circuitdescbip*[emptyzzdiode]{empty ZZener diode}{Empty ZZener diode}{zzDo}
\circuitdescbip*[emptytdiode]{empty tunnel diode}{Empty tunnel diode}{tDo}
\circuitdescbip*[emptypdiode]{empty photodiode}{Empty photodiode}{pDo}
- \circuitdescbip*[emptylediode]{empty led}{Empty led}{leDo}
+ \circuitdescbip*[emptylediode]{empty led}{Empty led}{leDo}
+ \circuitdescbip*[emptylaserdiode]{empty laser diode}{Empty laser diode\footnotemark}{lasD}
+ \footnotetext{Added by André Alves in \texttt{v1.4.4}}
\circuitdescbip*[emptyvarcap]{empty varcap}{Empty varcap}{VCo}
\circuitdescbip*[emptybidirectionaldiode]{empty bidirectionaldiode}{Empty bidirectionaldiode}{biDo}
\circuitdescbip[fulldiode] {full diode}{Full diode}{D*}
@@ -2295,6 +2297,7 @@ The package options \texttt{fulldiode}, \texttt{strokediode}, and \texttt{emptyd
\circuitdescbip[fulltdiode]{full tunnel diode}{Full tunnel diode}{tD*}
\circuitdescbip[fullpdiode]{full photodiode}{Full photodiode}{pD*}
\circuitdescbip[fulllediode]{full led}{Full led}{leD*}
+ \circuitdescbip[fulllaserdiode]{full laser diode}{Full laser diode}{lasD*}
\circuitdescbip[fullvarcap]{full varcap}{Full varcap}{VC*}
\circuitdescbip[fullbidirectionaldiode]{full bidirectionaldiode}{Full bidirectionaldiode}{biD*}
\end{groupdesc}
@@ -2309,6 +2312,7 @@ These shapes have no exact node-style counterpart, because the stroke line is bu
\circuitdescbip*[emptytdiode]{stroke tunnel diode}{Stroke tunnel diode}{tD-}
\circuitdescbip*[emptypdiode]{stroke photodiode}{Stroke photodiode}{pD-}
\circuitdescbip*[emptylediode]{stroke led}{Stroke led}{leD-}
+ \circuitdescbip*[emptylaserdiode]{stroke laser diode}{Stroke laser diode}{lasD-}
\circuitdescbip*[emptyvarcap]{stroke varcap}{Stroke varcap}{VC-}
\end{groupdesc}
@@ -2802,7 +2806,7 @@ So the solution is often changing the structure to keep the meters in horizontal
Since version 0.9.0 you have more options for the measuring instruments. You can use the generic \texttt{rmeterwa} (round meter with arrow), to which you can specify the internal symbol with the option \texttt{t=...} (and is fillable).
\begin{LTXexample}[varwidth=true]
- \begin{circuitikz}[american]
+\begin{circuitikz}[american]
\draw (0,0) -- ++(1,0) to[R] ++(2,0)
to [rmeterwa, t=A, i=$i$] ++(0,-2) node[ground]{};
\draw (1,0) to[rmeterwa, t=V, v=$v$] ++(0,-2)
@@ -2813,7 +2817,7 @@ Since version 0.9.0 you have more options for the measuring instruments. You can
This kind of component will keep the symbol horizontal, whatever the orientation:
\begin{LTXexample}[varwidth=true]
- \begin{circuitikz}[american]
+\begin{circuitikz}[american]
\draw (0,0) -- ++(1,0) to[R] ++(2,0)
to [rmeterwa, t=A, i=$i$] ++(2,0) --
++(0,-1) node[ground]{};
@@ -2833,7 +2837,6 @@ The plain \texttt{rmeter} is the same, without the measuring arrow:
\end{circuitikz}
\end{LTXexample}
-
If you prefer it, you have the option to use square meters, in order to have more visual difference from generators:
\begin{LTXexample}[varwidth=true]
@@ -3015,7 +3018,7 @@ All circuit-drawing standards agree that to show a crossing without electric con
\end{circuitikz}
\end{LTXexample}
-However, sometime it is advisable to mark the non-contact situation more explicitly. To this end, you can use a path-style component called \texttt{crossing}:
+However, sometimes it is advisable to mark the non-contact situation more explicitly. To this end, you can use a path-style component called \texttt{crossing}:
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}[]
@@ -3141,6 +3144,7 @@ The BNC connector is defined so that you can easily connect it as input or outpu
\begin{circuitikz}
\draw (0,0)
node[bnc](B1){$v_i$} to[R=\SI{50}{\ohm}] ++(3,0)
+ % you can also use \ctikzflipx{$v_o$} in LaTeX
node[bnc, xscale=-1](B2){\scalebox{-1}[1]{$v_o$}};
\node [ground] at (B1.shield) {};
\node [eground] at (B2.shield){};
@@ -3251,7 +3255,7 @@ Those components have also \textbf{deprecated} anchors named \texttt{1, 2, 3, 4}
\end{circuitikz}
\end{LTXexample}
-The Wilkinson divider has:
+The Wilkinson divider has (notice that the node text is outside the bounding box, similarly to what happens for transistors!):
\begin{LTXexample}[varwidth=true]
\begin{circuitikz} \draw
@@ -3614,7 +3618,7 @@ The mark will follow the \texttt{transistors} class thickness, but you can adjus
\paragraph{IGBT outer base.}
-Normally, in bipolar IGBTs the outer base is the same size (height) of the inner one, and of the same thickness (which will depend on the class thickness value). You can change this by setting (via \verb|\ctikzset`|) the keys \texttt{tripoles/igbt/outer base height} (default \texttt{0.4}, the same as \texttt{base height}), and \texttt{tripoles/igbt/outer base thickness} (default \texttt{1.0}), which will be relative to the class thickness.
+Normally, in bipolar IGBTs the outer base is the same size (height) of the inner one, and of the same thickness (which will depend on the class thickness value). You can change this by setting (via \verb|\ctikzset|) the keys \texttt{tripoles/igbt/outer base height} (default \texttt{0.4}, the same as \texttt{base height}), and \texttt{tripoles/igbt/outer base thickness} (default \texttt{1.0}), which will be relative to the class thickness.
\begin{LTXexample}[varwidth=true, pos=t]
\begin{circuitikz}
@@ -3682,6 +3686,9 @@ To draw the PMOS circle non-solid, use the option \texttt{emptycircle} or the co
\circuitdesc{pmos, bulk}{pmos}{}
\circuitdesc{nmosd, bulk}{nmos depletion}{}(bulk/45/0.3, nobulk/-30/.4)
\circuitdesc{pmosd, bulk}{pmos depletion}{}
+ \circuitdesc{nigbt}{nigbt}{}(nobase/135/0.3, nobulk/-30/.4)
+ \circuitdesc{pigbt, nobase}{pigbt with no base terminal\footnotemark}{}(nobase/135/0.3, nobulk/-30/.4)
+ \footnotetext{Since \texttt{v1.4.4}, noticed by \href{https://tex.stackexchange.com/q/619334/38080}{user \texttt{hinata exc} on Stack Exchange}.}
\end{groupdesc}
\begin{LTXexample}[varwidth=true]
@@ -4347,6 +4354,7 @@ The first port, to the left, is port \texttt{A}, having the anchors \texttt{A1}
They also expose the \texttt{base} anchor, for labelling, and anchors for setting dots or signs to specify polarity.
The set of anchors, to which the standard ``geographical'' \texttt{north}, \texttt{north east}, etc. is here:
+\medskip
\begin{quote}
\begin{circuitikz}[cute inductors,
]
@@ -4370,6 +4378,7 @@ The set of anchors, to which the standard ``geographical'' \texttt{north}, \text
}
\end{circuitikz}
\end{quote}
+\medskip
Also, the standard ``geographical'' \texttt{north}, \texttt{north east}, etc. are defined.
A couple of examples follow:
@@ -4876,8 +4885,8 @@ These are all of the to-style type:
\circuitdescbip[ncs]{normal closed switch}{Normally closed switch}{ncs}
\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}{nopbc}(tip/0/0.2)
- \circuitdescbip[ncpushbuttono]{normally closed push button open}{Normally closed push button}{ncpbo}(tip/0/0.2)
+ \circuitdescbip[pushbuttonc]{normally open push button closed}{Normally open push button (in closed position)}{nopbc}(tip/0/0.2)
+ \circuitdescbip[ncpushbuttono]{normally closed push button open}{Normally closed push button (in open position)}{ncpbo}(tip/0/0.2)
\circuitdescbip[toggleswitch]{toggle switch}{Toggle switch}{}
\circuitdescbip*{reed}{Reed switch}{}
\end{groupdesc}
@@ -5206,7 +5215,7 @@ There is no ``european'' version of the following symbols; for now they are use
In addition to the legacy ports, since release 1.1.0, logic ports following the recommended geometry of distinctive-shape symbols in IEEE Std 91a-1991 Annex A (Recommended symbol proportions) are also available\footnote{Thanks to Jason for proposing it and digging out the info, see this \href{https://github.com/circuitikz/circuitikz/issues/383}{GitHub issue}.}.
-These ports are completely independent from the legacy set (either \texttt{american} or \texttt{european}); they are not eanbled by default because the relative size of the ports is very different from the legacy ones, and that will disrupt every schematic (especially if drawn with absolute coordinate). If you want to use them as default, you can use the command \verb|\ctikzset{logic ports=ieee}| and by default the shapes \texttt{and port}, \texttt{or port} and so on will be the IEEE standard ones.
+These ports are completely independent from the legacy set (either \texttt{american} or \texttt{european}); they are not enabled by default because the relative size of the ports is very different from the legacy ones, and that will disrupt every schematic (especially if drawn with absolute coordinate). If you want to use them as default, you can use the command \verb|\ctikzset{logic ports=ieee}| and by default the shapes \texttt{and port}, \texttt{or port} and so on will be the IEEE standard ones.
The transmission gate (also known as ``bowtie'') components are not described in the IEEE standard, so they are simply inspired by the other IEEE ports --- this is why their name is prefixed by \texttt{ieee} and not by \texttt{ieeestd}. They are aliased to \texttt{tgate} and \texttt{double tgate} though, and it is recommended to use those names (maybe in the future there will be \texttt{american ports} and/or \texttt{european ports} versions available).
@@ -5539,7 +5548,7 @@ The first one is to scale the port; if you set the port height so that it has th
\end{circuitikz}
\end{LTXexample}
-But then the size of the port is quite ``unusual''. The solution is technical literature is to use what we can call a ``rack'' for the inputs; basically, only a certain number of pins are kept on the port, and the other are put on an extended input line.
+But then the size of the port is quite ``unusual''. The solution in technical literature is to use what we can call a ``rack'' for the inputs; basically, only a certain number of pins are kept on the port, and the other are put on an extended input line.
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
@@ -5872,8 +5881,8 @@ As you can see, in a void flip flop no external pins are drawn: you have to defi
To define a specific flip-flop, you have to set a series of keys under the \verb|\ctikzset| directory \texttt{multipoles/flipflop/}, corresponding to pins \texttt{1}\dots \texttt{6}, \texttt{u} for ``up'' and \texttt{d} for ``down'':
\begin{itemize}
\item a \emph{text} value \texttt{t0}, \texttt{t1}, \dots \texttt{t6}, and \texttt{tu} and \texttt{td} (the last ones for up and down) which will set a label on the pin;
- \item a \emph{clock wedge} flag (\texttt{c0}, \dots \texttt{c6}, \texttt{cu}, \texttt{cd}), with value \texttt{0} or \texttt{1}, which will draw a triangle shape on the border of the correspondig pin;
- \item a \emph{negation} flag (\texttt{n0}, \dots \texttt{n6}, \texttt{nu}, \texttt{nd}), with value \texttt{0} or \texttt{1}, which will put and \texttt{ocirc} shape on the outer border of the correspondig pin.
+ \item a \emph{clock wedge} flag (\texttt{c0}, \dots \texttt{c6}, \texttt{cu}, \texttt{cd}), with value \texttt{0} or \texttt{1}, which will draw a triangle shape on the border of the corresponding pin;
+ \item a \emph{negation} flag (\texttt{n0}, \dots \texttt{n6}, \texttt{nu}, \texttt{nd}), with value \texttt{0} or \texttt{1}, which will put and \texttt{ocirc} shape on the outer border of the corresponding pin.
\end{itemize}
To set all this keys, an auxiliary style \texttt{flipflop def} is defined, so that you can do the following thing:
@@ -6573,15 +6582,17 @@ A couple of examples are shown below.
\section{Labels, voltages and currents}
+You can add ``decorations'' to the path-style components; there are basically five types of them: labels, annotations, voltages, currents, and flows. Let's see an example of all of them\dots
+
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[R, l=$R_1$] (2,0);
+ \draw (0,0) to[R, l=$R_1$, f=$i_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[R=$R_1$] (2,0);
+ \draw (0,0) to[R=$R_1$, a=\SI{1}{\kohm}] (2,0);
\end{circuitikz}
\end{LTXexample}
@@ -6611,11 +6622,12 @@ A couple of examples are shown below.
\end{LTXexample}
-Long names/styles for the bipoles can be used:
+Long names/styles for the bipoles can be used, of course, and there is a special syntax (that works only in simple cases --- use it with caution!) if you load the package with the `siunitx` options:
+
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}\draw
- (0,0) to[resistor=1<\kilo\ohm>] (2,0)
-;\end{circuitikz}
+ (0,0) to[resistor=1<\kilo\ohm>] (2,0);
+\end{circuitikz}
\end{LTXexample}
\subsection{Labels and Annotations}
@@ -6637,7 +6649,7 @@ When drawing a component left-to-right, the label \texttt{l} is by default above
\end{circuitikz}
\end{LTXexample}
-For passive components, you can use \texttt{type=text} as a shortcut for \texttt{type, l=text}:
+For passive components, you can use \texttt{\emph{component type}=text} as a shortcut for \texttt{\emph{component type}, l=text}:
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
@@ -6919,6 +6931,92 @@ Note the \texttt{.initial}; you have to create such key the first time you use i
One common request is to change the style of the arrows (both head and line) of these elements. Voltages, currents and flows are part of the same path of the component, so this is not possible in simple way; you have to drawn your own with \TikZ{} commands using the facilities explained in section~\ref{sec:vif-anchors}.
+\subsubsection{Special treatment for generators}\label{sec:source-vif}
+
+The ``active'' elements (sources and batteries, mainly) are treated differently from passive elements, in the sense that the default current and voltage direction and position could be different\footnote{This, in hindsight, has been a bad feature --- and I'm partly responsible for it. But removing it would create \emph{too small} variations in circuits, easily to go unnoticed, so it stays: nobody wants \emph{wrong} circuits just by recompiling.} following the chosen global voltage direction strategy (see section~\ref{curr-and-volt}). If they change or not depend on both the element and the chosen \texttt{voltage dir} option.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}[]
+ \draw (0,0) to[sV, v=$V_s$] ++(2,0)
+ to[battery, v=$V_B$] ++(2,0)
+ to[R, v=$V_R$] ++(2,0);
+\end{tikzpicture}
+\end{LTXexample}
+
+The consistency between symbols drawings and the default voltage and current directions are designed to work well \emph{when this default is enabled}. If you want, though, you can override this behavior by ``switching off'' the source status of the component by setting the property \texttt{bipole/is voltage} to \texttt{false}:
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}[]
+ \draw (0,0) to[sV, bipole/is voltage=false,
+ v=$V_s$] ++(2,0)
+ to[battery, bipole/is voltage=false,
+ v=$V_B$] ++(2,0)
+ to[R, v=$V_R$] ++(2,0);
+\end{tikzpicture}
+\end{LTXexample}
+
+When you do this, \textbf{be careful} that (as you can see) the direction of the plain \texttt{v=...} option will change (please notice that this does not mean that it is incorrect, given that the voltage and current direction are arbitrary; in the case above, if the battery is a \SI{3}{V} one, $V_B=\SI{-3}{V}$ with the \texttt{RPvoltages} conventions).
+
+Also, notice that there is an ordering problem in the \texttt{to[...]} options: you have to switch the \texttt{is voltage} property off \textbf{before} setting the voltage, otherwise you will have a mix of the source-type and passive positioning:
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}[]
+ % correct way
+ \draw (0,0) to[sV, bipole/is voltage=false, v=$V_s$] ++(2,0)
+ % wrong way, setting voltage before changing type
+ to[sV=$V_B$ , bipole/is voltage=false, ] ++(2,0);
+\end{tikzpicture}
+\end{LTXexample}
+
+In the first \texttt{to[]} command, the voltage is set before changing the type (assigning a value to the name of the element is understood as a \texttt{v=...} command for voltage sources).
+
+A similar switch is present for current generators, called \texttt{bipoles/.is current}, acting in a very similar way.
+
+If you would prefer to switch to the \texttt{is voltage=false, is current=false} behavior by default, you can (since \texttt{v1.4.4}\footnote{Suggested by user \href{https://github.com/circuitikz/circuitikz/issues/590}{\texttt{@judober} on GitHub}.}) by setting the option \texttt{bipole/override source vif} to \texttt{true}. This is \emph{highly} experimental, so use with care.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}[]
+ \draw (0,0) to [battery=vb] ++(2,0)
+ to[sV=sV] ++(2,0) to[R, v=vR] ++(2,0);
+ \ctikzset{bipole/override source vif=true}
+ \draw (0,-2) to [battery=vb] ++(2,0)
+ to[sV=sV] ++(2,0) to[R, v=vR] ++(2,0);
+\end{tikzpicture}
+\end{LTXexample}
+
+Notice that the option \texttt{override source vif} is ``stronger'' than the normal \texttt{is voltage}; so to locally re-set the behavior for just one source, you need to disable that \emph{before} using a voltage designator.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}[american]
+ % dangerous option ahead: USE WITH CARE
+ \ctikzset{bipole/override source vif=true}
+ % ugly output, you should really use V>=va
+ \draw (0,6) to [V=va] ++(2,0);
+ % not working!
+ \draw (0,4) to [V=va, bipole/override source vif=false] ++(2,0);
+ % ok, this one is working --- you need both settings!
+ \draw (0,2) to [V,
+ bipole/override source vif=false,
+ bipole/is voltage=true,
+ v=va] ++(2,0);
+\end{tikzpicture}
+\end{LTXexample}
+
+Clearly, if you find yourself using the last component often, it is better to define a style, which will save you a lot of typing and help readability:
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\tikzset{myV/.style={V, bipole/override source vif=false,
+ bipole/is voltage=true, v={#1}}}%
+\begin{tikzpicture}[american]
+ % dangerous option ahead: USE WITH CARE
+ \ctikzset{bipole/override source vif=true}
+ \draw (0,0) to [V>=va] ++(2,0);
+ \draw (0,-2) to[myV=vb] ++(2,0);
+\end{tikzpicture}
+\end{LTXexample}
+
+On the other way around, you could use styles to set \texttt{is voltage=false} only on the components you use and without using the global switch --- which is the recommended way of doing it.
+
\subsection{Currents}\label{sec:currents}
Inline (along the wire) currents are selected with \verb|i_>|, \verb|i^<|, \verb|i>_|, \verb|i>^|, and various combination; the default position and direction is obtained with the simple key \verb|i=...|.
@@ -6983,7 +7081,7 @@ Also notice that the direction of the path is important:
\end{circuitikz}
\end{LTXexample}
-Default directions can change if the component is active or passive,\footnote{This, in hindsight, has been a bad feature --- and I'm partly responsible for it. But removing it would create \emph{too small} variations in circuits, so it stays.} following the chosen global voltage direction strategy (see section~\ref{curr-and-volt}).
+Default directions can change if the component is active or passive,\footnote{This is better explained in section~\ref{sec:source-vif}} following the chosen global voltage direction strategy (see section~\ref{curr-and-volt}).
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
@@ -7145,7 +7243,7 @@ Moreover, for historical reasons, voltage generators have differently looking ar
\end{circuitikz}
\end{LTXexample}
-You can change this last thing by forcing ``off'' the status of ``voltage generator'' of the component; but now the normal (passive) rule will apply, so, again, be careful.
+You can change this last thing by forcing ``off'' the status of ``voltage generator'' of the component; but now the normal (passive) rule will apply, so, again, be careful and read section~\ref{sec:source-vif}.
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
@@ -7210,12 +7308,12 @@ Again, voltage generators are treated differently:
\end{circuitikz}
\end{LTXexample}
-And you can override that with \texttt{bipole/is voltage} keeping into account that the default direction will be the one of passive components:
+And you can override that with \texttt{bipole/is voltage} keeping into account that the default direction will be the one of passive components (see~\ref{sec:source-vif}):
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}[straight voltages]
- \draw (0,0) to[V=10V, bipole/is voltage=false,
- i_=$i_1$] (3,0);
+ \draw (0,0) to[V, bipole/is voltage=false,
+ v=10V, i_=$i_1$] (3,0);
\end{circuitikz}
\end{LTXexample}
@@ -7346,7 +7444,7 @@ You can fine-tune the position of the \texttt{+} and \texttt{-} symbols and the
Notes that \texttt{american voltage} also affects batteries.
\begin{LTXexample}[varwidth=true]
- \begin{circuitikz}[voltage shift=0.5]
+\begin{circuitikz}[voltage shift=0.5]
\draw (0,0) to[battery,l_=1V, v=$u_1$, i=$i_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
@@ -7537,7 +7635,7 @@ Or, for example, to have a different voltage style; normally you would define a
\end{circuitikz}
\end{LTXexample}
-Since \texttt{v1.4.1} you can also keep the voltage, current and flow labels and suppress the output of the symbols (arrows or plus/minus depending on the style) with the keys \texttt{no v symbols}, \texttt{no i symbols}, \texttt{no f symbols} (there are also the corresponding \texttt{v symbols}, \texttt{i symbols} and \texttt{f symbols} in case you want to switch the behavior off/on globally). This for example simplify an often requested feature, like having all the current in one color and the voltages in another one, which is not possible natively because the arrows are part of the same path One possible implementation is the following one:
+Since \texttt{v1.4.1} you can also keep the voltage, current and flow labels and suppress the output of the symbols (arrows or plus/minus depending on the style) with the keys \texttt{no v symbols}, \texttt{no i symbols}, \texttt{no f symbols} (there are also the corresponding \texttt{v symbols}, \texttt{i symbols} and \texttt{f symbols} in case you want to switch the behavior off/on globally). This for example simplify an often requested feature, like having all the current in one color and the voltages in another one, which is not possible natively because the arrows are part of the same path. One possible implementation of that is the following one:
\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
\newcommand{\iarronly}[1]{% name
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
index 9349fc801d..15540ac36f 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
@@ -16,8 +16,8 @@
\providecommand\DeclareRelease[3]{}
\providecommand\DeclareCurrentRelease[2]{}
-\def\pgfcircversion{1.4.3}
-\def\pgfcircversiondate{2021/09/06}
+\def\pgfcircversion{1.4.4}
+\def\pgfcircversiondate{2021/10/31}
\DeclareRelease{0.4}{2012/12/20}{circuitikz-0.4-body.tex}
\DeclareRelease{v0.4}{2012/12/20}{circuitikz-0.4-body.tex}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
index d32e7d2e2e..51af9705f5 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
@@ -535,6 +535,8 @@
\ctikzset{bipole/name/.initial=}
\newif\ifpgf@circuit@bipole@isvoltage
\ctikzset{bipole/is voltage/.is if=pgf@circuit@bipole@isvoltage}
+\newif\ifpgf@circuit@bipole@override@source@vif
+\ctikzset{bipole/override source vif/.is if=pgf@circuit@bipole@override@source@vif}
\newif\ifpgf@circuit@bipole@voltageoutsideofsymbol
\ctikzset{bipole/is voltageoutsideofsymbol/.is if=pgf@circuit@bipole@voltageoutsideofsymbol}
\newif\ifpgf@circuit@bipole@strokedsymbol
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
index d2c2dcbb84..447c2104fb 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
@@ -3416,6 +3416,19 @@
\pgfusepath{draw}
\fi
}
+%
+% --and laser diode arrows - contributed by Andre Alves
+%
+\def\pgf@circ@draw@laserarrows{%
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \pgfsetarrowsend{latexslim}
+ \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{1.1\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{-0.4\pgf@circ@res@right}{2.1\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{1.1\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0.2\pgf@circ@res@right}{2.1\pgf@circ@res@up}}
+ \pgfusepath{draw}
+}
%% Black light emitting diode
\pgfcircdeclarebipolescaled{diodes}
{% fix the anchor border
@@ -3443,6 +3456,35 @@
\pgf@circ@draw@ledarrows
}
+%% Black laser diode - contributed by Andre Alves
+\pgfcircdeclarebipolescaled{diodes}
+{% fix the anchor border
+ \pgfcirc@border@extend@updown{1.8}{1}
+}
+{\ctikzvalof{bipoles/diode/height}}
+{fulllaserdiode}
+{\ctikzvalof{bipoles/diode/height}}
+{\ctikzvalof{bipoles/diode/width}}
+{
+
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfscope
+ \pgftransformxshift{\pgf@circ@res@left}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
+ \pgfusepath{draw,fill}
+ \endpgfscope
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfusepath{draw}
+
+ \pgf@circ@draw@laserarrows
+}
+
%% Black photodiode
\pgfcircdeclarebipolescaled{diodes}
{% fix the anchor border
@@ -3639,6 +3681,30 @@
\pgf@circ@draw@ledarrows
}
+%% Empty laser diode - contributed by Andre Alves
+\pgfcircdeclarebipolescaled{diodes}
+{% fix the anchor border
+ \pgfcirc@border@extend@updown{1.8}{1}
+}
+{\ctikzvalof{bipoles/diode/height}}
+{emptylaserdiode}
+{\ctikzvalof{bipoles/diode/height}}
+{\ctikzvalof{bipoles/diode/width}}
+{
+
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfscope
+ \pgf@circ@basicdiodeshape
+ \endpgfscope
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfusepath{draw}
+
+ \pgf@circ@draw@laserarrows
+}
+
%% Empty photodiode
\pgfcircdeclarebipolescaled{diodes}
{% fix the anchor border
@@ -4056,6 +4122,8 @@
\pgfcirc@style@to@style{#1 tunnel diode}{tD#2}
\pgfcirc@activate@bipole{l}{#1lediode}{#1lediode}{#1 led}
\pgfcirc@style@to@style{#1 led}{leD#2}
+ \pgfcirc@activate@bipole{l}{#1laserdiode}{#1laserdiode}{#1 laser diode}
+ \pgfcirc@style@to@style{#1 laser diode}{lasD#2}
\pgfcirc@activate@bipole{l}{#1pdiode}{#1pdiode}{#1 photodiode}
\pgfcirc@style@to@style{#1 photodiode}{pD#2}
\pgfcirc@activate@bipole{l}{#1varcap}{#1varcap}{#1 varcap}
@@ -4090,6 +4158,8 @@
\pgfcirc@style@to@style{#1 tunnel diode}{tD#2}
\pgfcirc@node@to@style{l}{emptylediode}{#1 led}{\circuitikzbasekey/bipole/is strokedsymbol=true}
\pgfcirc@style@to@style{#1 led}{leD#2}
+ \pgfcirc@node@to@style{l}{emptylaserdiode}{#1 laser diode}{\circuitikzbasekey/bipole/is strokedsymbol=true}
+ \pgfcirc@style@to@style{#1 laser diode}{lasD#2}
\pgfcirc@node@to@style{l}{emptypdiode}{#1 photodiode}{\circuitikzbasekey/bipole/is strokedsymbol=true}
\pgfcirc@style@to@style{#1 photodiode}{pD#2}
\pgfcirc@node@to@style{l}{emptyvarcap}{#1 varcap}{\circuitikzbasekey/bipole/is strokedsymbol=true}
@@ -4126,6 +4196,10 @@
\pgfcirc@style@to@style{led}{leD}
\pgfcirc@style@to@style{\pgfcircdiodestylemacro photodiode}{photodiode}
\pgfcirc@style@to@style{photodiode}{pD}
+
+\pgfcirc@style@to@style{\pgfcircdiodestylemacro laser diode}{laser diode}
+\pgfcirc@style@to@style{laser diode}{lasD}
+
\pgfcirc@style@to@style{\pgfcircdiodestylemacro varcap}{varcap}
\pgfcirc@style@to@style{varcap}{VC}
\pgfcirc@style@to@style{\pgfcircdiodestylemacro bidirectionaldiode}{bidirectionaldiode}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirccurrent.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirccurrent.tex
index e5c5c760a8..77b02d5319 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirccurrent.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirccurrent.tex
@@ -93,6 +93,10 @@
\ctikzset{i/.code = {
\pgfcirc@has@itrue
+ \ifpgf@circuit@bipole@override@source@vif
+ \pgf@circuit@bipole@isvoltagefalse
+ \pgf@circuit@bipole@iscurrentfalse
+ \fi
\pgfkeys{\circuitikzbasekey/bipole/current/direction = forward,
\circuitikzbasekey/bipole/current/x position = after,
\circuitikzbasekey/bipole/current/y position = above }
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircflow.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircflow.tex
index d59325850d..3d03925b52 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircflow.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircflow.tex
@@ -99,6 +99,10 @@
\ctikzset{f/.code = {
\pgfcirc@has@ftrue
+ \ifpgf@circuit@bipole@override@source@vif
+ \pgf@circuit@bipole@isvoltagefalse
+ \pgf@circuit@bipole@iscurrentfalse
+ \fi
\pgfkeys{\circuitikzbasekey/bipole/flow/direction = forward,
\circuitikzbasekey/bipole/flow/x position = after,
\circuitikzbasekey/bipole/flow/y position = above }
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
index 2dd2eee9a9..6f07d6042f 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
@@ -4403,6 +4403,10 @@
\northeast
\pgf@y=-\ctikzvalof{tripoles/#1/gate height}\pgf@y
}
+ \anchor{nobase}{
+ \left
+ \pgf@x=\ctikzvalof{tripoles/#1/gate width}\pgf@x
+ }
}
{
% add the circle if requested (before everything else, so we can fill it)
@@ -4485,18 +4489,20 @@
\pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
\endpgfscope
%draw gate
- \ifpgf@circuit@trans@ntype
- \pgfpathmoveto{\pgfpoint
- {\ctikzvalof{tripoles/#1/gate width}\pgf@circ@res@left}
- {\ctikzvalof{tripoles/#1/conn height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
- {\ctikzvalof{tripoles/#1/conn height}\pgf@circ@res@down}}
- \else
- \pgfpathmoveto{\pgfpoint
- {\ctikzvalof{tripoles/#1/gate width}\pgf@circ@res@left}
- {\ctikzvalof{tripoles/#1/conn height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
- {\ctikzvalof{tripoles/#1/conn height}\pgf@circ@res@up}}
+ \ifpgf@circuit@bpt@drawgate
+ \ifpgf@circuit@trans@ntype
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/#1/gate width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/#1/conn height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
+ {\ctikzvalof{tripoles/#1/conn height}\pgf@circ@res@down}}
+ \else
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/#1/gate width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/#1/conn height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
+ {\ctikzvalof{tripoles/#1/conn height}\pgf@circ@res@up}}
+ \fi
\fi
\pgfusepath{draw}
}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex
index 855331038d..75543f42a5 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex
@@ -63,6 +63,10 @@
% or not
\ctikzset{v/.code = {
\pgfcirc@has@vtrue
+ \ifpgf@circuit@bipole@override@source@vif
+ \pgf@circuit@bipole@isvoltagefalse
+ \pgf@circuit@bipole@iscurrentfalse
+ \fi
\ifpgf@circuit@bipole@isvoltage
\pgfkeys{\circuitikzbasekey/bipole/voltage/position=above,
\circuitikzbasekey/bipole/voltage/direction=forward}
@@ -533,7 +537,9 @@
% take into account scaling
\setscaledRlenforclass
-
+ % set the macro for detecting open
+ \edef\@@kind{\ctikzvalof{bipole/kind}}\edef\@@open{open}
+ % start voltage label adjustment
\ifpgf@circuit@europeanvoltage
\ifpgf@circuit@bipole@voltage@straight
% check for straight
@@ -543,6 +549,8 @@
% \typeout{ST:ADJUSTED\space for\space \ctikzvalof{bipole/kind} \space at \space \stdist}
}{\edef\labeldist{\ctikzvalof{voltage/straight label distance}}}
\ifpgf@circ@debugv\edef\whichtypeshift{STR}\fi
+ % do not labelshift for legacy straight open; 1.4 makes the shift null
+ \ifx\@@kind\@@open\ifpgf@adjust@open@voltage\else\edef\labeldist{1.4}\fi\fi
\else
% check for european
\edef\pgf@temp{/tikz/circuitikz/bipoles/\ctikzvalof{bipole/kind}/voltage/european label distance}
@@ -572,7 +580,6 @@
{\pgfmathsetmacro{\partheightf}{0.5*\ctikzvalof{bipoles/\ctikzvalof{bipole/kind}/height}}
\edef\partheight{\partheightf\pgf@circ@scaled@Rlen}}
{\edef\partheight{(.5\pgf@circ@scaled@Rlen)}} %fallback to fixed value
-
\ifpgf@circuit@bipole@isvoltage
\pgfmathsetlength{\pgfcirc@labelshift}{(\labeldist-1.2)*\partheight}
\else
@@ -580,8 +587,7 @@
\fi
% the value for the european was by default 1.4
\pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners!
- % set the macro for detecting open
- \edef\@@kind{\ctikzvalof{bipole/kind}}\edef\@@open{open}
+ % stop the detection of open if I do not want special treatment
\ifpgf@adjust@open@voltage\else\edef\@@open{this-will-nEver-match}\fi
% \typeout{KIND\space\@@kind}
}%end pgfextra
@@ -608,7 +614,8 @@
\else
\ifx\@@kind\@@open
% override pgfcirc@Vlab
- coordinate (\pgfcirc@a@prefix-Vlab) at ($(pgfcirc@Vfrom@flat)!0.5!(pgfcirc@Vto@flat)$)\fi
+ coordinate (\pgfcirc@a@prefix-Vlab) at ($(pgfcirc@Vfrom@flat)!0.5!(pgfcirc@Vto@flat)$)
+ \fi
\fi
\ifpgf@circ@debugv
diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
index e7187f4ab0..2e57a795e0 100644
--- a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
@@ -10,8 +10,8 @@
%
% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
-\def\pgfcircversion{1.4.3}
-\def\pgfcircversiondate{2021/09/06}
+\def\pgfcircversion{1.4.4}
+\def\pgfcircversiondate{2021/10/31}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
\usemodule[tikz]
diff --git a/graphics/pstricks/contrib/pst-func/Changes b/graphics/pstricks/contrib/pst-func/Changes
index 47203c52d6..82e56e9c02 100644
--- a/graphics/pstricks/contrib/pst-func/Changes
+++ b/graphics/pstricks/contrib/pst-func/Changes
@@ -1,4 +1,5 @@
..... pst-func.tex
+0.98 2021-10-30 - fix for Gini coefficiant
0.97 2021-10-29 - fix and extension for \psLorenz curve
0.96 2021-04-06 - added start/endAngle for \psLame
0.95 2020-06-07 - another two more polynomial functions
@@ -117,6 +118,7 @@
..... pst-func.pro
+0.18 2021-10-30 - added arraysum and arrayprod
0.17 2018-12-13 - allow algebraic mode for Simpson
0.16 2018-11-15 - new algorithm for Si/si/Ci/ci
0.15 2013-06-10 - fix bug with wrong arrow in psBezier#
diff --git a/graphics/pstricks/contrib/pst-func/doc/pst-func-doc.pdf b/graphics/pstricks/contrib/pst-func/doc/pst-func-doc.pdf
index 368a838f5b..bb11138494 100644
--- a/graphics/pstricks/contrib/pst-func/doc/pst-func-doc.pdf
+++ b/graphics/pstricks/contrib/pst-func/doc/pst-func-doc.pdf
Binary files differ
diff --git a/graphics/pstricks/contrib/pst-func/doc/pst-func-doc.tex b/graphics/pstricks/contrib/pst-func/doc/pst-func-doc.tex
index f47e587290..119d23f317 100644
--- a/graphics/pstricks/contrib/pst-func/doc/pst-func-doc.tex
+++ b/graphics/pstricks/contrib/pst-func/doc/pst-func-doc.tex
@@ -2169,6 +2169,21 @@ origin of the coordinate system.
\endpsgraph
\end{LTXexample}
+
+\begin{LTXexample}[pos=t,preset=\centering]
+\psset{lly=-13mm,llx=-5mm}
+\psgraph[Dx=0.2,Dy=0.2,axesstyle=frame](0,0)(1,1){6cm}{6cm}
+\psline[linestyle=dashed](1,1)
+\psLorenz[Gini,linecolor=red,linewidth=1.5pt]<.2 .2 .2 .2 .2>{.1 .1 .1 .35 .35 }
+\psLorenz[Gini,linecolor=blue,linestyle=dashed,linewidth=1.5pt]{.1 .1 .1 .35 .35 }
+\endpsgraph
+\end{LTXexample}
+
+
+
+
+
+
\clearpage
\section{\nxLcs{psLame} -- Lam\'e Curve, a superellipse}
A superellipse is a curve with Cartesian equation
diff --git a/graphics/pstricks/contrib/pst-func/dvips/pst-func.pro b/graphics/pstricks/contrib/pst-func/dvips/pst-func.pro
index f752442e87..25c4a831d1 100644
--- a/graphics/pstricks/contrib/pst-func/dvips/pst-func.pro
+++ b/graphics/pstricks/contrib/pst-func/dvips/pst-func.pro
@@ -16,7 +16,7 @@
%% `pst-func' is a PSTricks package to plot special math functions
%%
%%
-%% version 0.17 / 2018-12-13 Herbert Voss
+%% version 0.18 / 2021-10-30 Herbert Voss
%
/tx@FuncDict 100 dict def
tx@FuncDict begin
diff --git a/graphics/pstricks/contrib/pst-func/latex/pst-func.sty b/graphics/pstricks/contrib/pst-func/latex/pst-func.sty
index ff1038570d..e70a9ebe55 100644
--- a/graphics/pstricks/contrib/pst-func/latex/pst-func.sty
+++ b/graphics/pstricks/contrib/pst-func/latex/pst-func.sty
@@ -1,5 +1,5 @@
\RequirePackage{pstricks}
-\ProvidesPackage{pst-func}[2018/12/13 package wrapper for pst-func.tex (hv)]
+\ProvidesPackage{pst-func}[2021/10/30 package wrapper for pst-func.tex (hv)]
\RequirePackage{pst-plot}
\RequirePackage{pst-math}
\RequirePackage{pst-tools}
@@ -10,7 +10,7 @@
\ProvidesFile{pst-func.tex}
[\filedate\space v\fileversion\space `PST-func' (hv)]
\IfFileExists{pst-func.pro}{%
- \ProvidesFile{pst-func.pro}[2018/12/13 v. 0.17, PostScript prologue file (hv)]
+ \ProvidesFile{pst-func.pro}[2021/10/30 v. 0.18, PostScript prologue file (hv)]
\@addtofilelist{pst-func.pro}}{}%
\endinput
-%% $Id: pst-func.sty 306 2021-10-29 14:48:08Z herbert $
+%% $Id: pst-func.sty 308 2021-10-30 14:11:45Z herbert $
diff --git a/graphics/pstricks/contrib/pst-func/tex/pst-func.tex b/graphics/pstricks/contrib/pst-func/tex/pst-func.tex
index 3e67c926f9..1f51fba97c 100644
--- a/graphics/pstricks/contrib/pst-func/tex/pst-func.tex
+++ b/graphics/pstricks/contrib/pst-func/tex/pst-func.tex
@@ -1,4 +1,4 @@
-%% $Id: pst-func.tex 306 2021-10-29 14:48:08Z herbert $
+%% $Id: pst-func.tex 308 2021-10-30 14:11:45Z herbert $
%%
%% This is file `pst-func.tex',
%%
@@ -31,8 +31,8 @@
% interface to the `xkeyval' package
\pst@addfams{pst-func}
%
-\def\fileversion{0.97}
-\def\filedate{2021/10/29}
+\def\fileversion{0.98}
+\def\filedate{2021/10/30}
\message{`PST-func' v\fileversion, \filedate\space (hv)}
%
\pstheader{pst-func.pro}
@@ -1326,70 +1326,71 @@ grestore
/Coors [xOld dx sub scx 0] def % speichern der Koordinaten f\"{u}r den Spline
%%----------------------------------------------------------------------------------------------------------------------------------------------------------------
%%-------------------- Code, der \"{u}ber den Logarithmus arbeitet von Manuel Luque ---------------------------------------------
- /SumLog {% log(1) + log(2) + ... + log(n) = log(n!)
- 1 dict begin % Erwartet die Eingabe eines Wertes, n\"{a}mlich bis zu welchem Wert addiert werden soll ---> n
- /nV exch def % der \"{u}bergebene Wert wird in nV abgespeichert
- /iV 1 def % Startwert ist iV=1
- 0 nV { iV log add /iV iV 1 add def } repeat % 0 + log(1) + log(2) + ... + log(n) Die Null ist dazu n\"{o}tig um die erste Addition machen zu k\"{o}nnen
- end
- } def
- /binomial_comb{ % log(N!) - log(k!) - log((n-k)!) = log[N!/(k!*(n-k)!)]
- 2 dict begin
- /nV exch def
- /NV exch def
- NV SumLog nV SumLog sub
- NV nV sub SumLog sub
- end
- } def
- /PnN {
- 3 dict begin
- /pV exch def
- /nV exch def
- /NV exch def
- 10
- NV nV binomial_comb
- nV pV log mul
- NV nV sub 1 pV sub log mul add add
- exp
- end
- } def
+ /SumLog {% log(1) + log(2) + ... + log(n) = log(n!)
+ 2 dict begin % Erwartet die Eingabe eines Wertes, n\"{a}mlich bis zu welchem Wert addiert werden soll ---> n
+ /nV exch def % der \"{u}bergebene Wert wird in nV abgespeichert
+ /iV 1 def % Startwert ist iV=1
+ 0 nV { iV log add /iV iV 1 add def } repeat % 0 + log(1) + log(2) + ... + log(n)
+ %Die Null ist dazu n\"{o}tig um die erste Addition machen zu k\"{o}nnen
+ end
+ } def
+ /binomial_comb{ % log(N!) - log(k!) - log((n-k)!) = log[N!/(k!*(n-k)!)]
+ 2 dict begin
+ /nV exch def
+ /NV exch def
+ NV SumLog nV SumLog sub
+ NV nV sub SumLog sub
+ end
+ } def
+ /PnN {
+ 3 dict begin
+ /pV exch def
+ /nV exch def
+ /NV exch def
+ 10
+ NV nV binomial_comb
+ nV pV log mul
+ NV nV sub 1 pV sub log mul add add
+ exp
+ end
+ } def
%%------------------------------------------------------------------------------------------------
%%------------------------------------------------------------------------------------------------
%------------------------------- 3 Punkte um die Kurve links auf Null zu bringen mit dem weiter oben gew\"{a}hlten Startwert sind es also 4 ------------
- /x -2 dx add def
- /y 0 def
- x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
- /x -0.65 dx add def
- /y N 0 p PnN 10 -1.3 exp mul def
- x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
- /x -0.375 dx add def
- /y N 0 p PnN 3 div def
- x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
+ /x -2 dx add def
+ /y 0 def
+ x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
+ /x -0.65 dx add def
+ /y N 0 p PnN 10 -1.3 exp mul def
+ x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
+ /x -0.375 dx add def
+ /y N 0 p PnN 3 div def
+ x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
%---------------------------- Ende der 3 Punkte und Beginn eigentlicher Code ----------------
- 0 1 N {% % Schleife geht von 0 bis N in 1-er Schritten
- /k exch def % save loop variable
- N k p PnN /Y exch def
- /x k dx add def
- /y Y def
- x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
- /xOld x def
- } for
+ 0 1 N {% % Schleife geht von 0 bis N in 1-er Schritten
+ /k exch def % save loop variable
+ N k p PnN /Y exch def
+ /x k dx add def
+ /y Y def
+ x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
+ /xOld x def
+ } for
%--------------------------- Ende des eigentlichen Codes und Beginn von ---
%------------------------------- 4 Punkte um die Kurve rechts auf Null zu bringen -----------
- /x N 0.375 add dx add def
- /y Y 3 div def
- x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
- /x N 0.65 add dx add def
- /y Y 10 -1.3 exp mul def
- x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
- /x N 2 add dx add def
- /y 0 def
- x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
- /x N 3 add dx add def
- /y 0 def
- x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
+ /x N 0.375 add dx add def
+ /y Y 3 div def
+ x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
+ /x N 0.65 add dx add def
+ /y Y 10 -1.3 exp mul def
+ x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
+ /x N 2 add dx add def
+ /y 0 def
+ x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
+ /x N 3 add dx add def
+ /y 0 def
+ x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
%---------------------------- Ende der 4 Punkte und Laden der Koordinaten des arrays ; L\"{o}schen (pop) von showpoints??----------------------
- [ xEnd 1 add 0 Coors aload pop % showpoints on top of the stack
+ [ xEnd 1 add 0 Coors aload pop % showpoints on top of the stack
}%
\endplot@cspline
\use@pscode
@@ -1610,7 +1611,9 @@ grestore
Yval arraySum /Ysum ED
Yval { Ysum div } forall nVal array astore /YvalRel ED % Pred dist
\if$#1$
- [ 1 1 nVal { nVal div } for ] dup /XvalRel ED /XvalRelCum ED
+ /temp {1 nVal div} bind def
+ [ nVal { temp } repeat ] /XvalRel ED
+ [ 1 1 nVal { nVal div } for ] /XvalRelCum ED
YvalRel bubblesort /YvalRel ED
\else
[ #1 ] /Xval ED