summaryrefslogtreecommitdiff
path: root/graphics/pgf
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf')
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/changelog.tex19
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdfbin17727 -> 17727 bytes
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdfbin1381312 -> 1383374 bytes
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex54
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz.sty4
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex68
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex4
8 files changed, 107 insertions, 50 deletions
diff --git a/graphics/pgf/contrib/circuitikz/doc/changelog.tex b/graphics/pgf/contrib/circuitikz/doc/changelog.tex
index cf46a5674f..56a39de9a6 100644
--- a/graphics/pgf/contrib/circuitikz/doc/changelog.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/changelog.tex
@@ -5,6 +5,25 @@ full list of changes.
\begin{itemize}
\item
+ version 1.3.6 (2021-05-09)
+
+ Mainly a bugfix release; fixing a bug in the \texttt{l2} stacked
+ labels means that old constructs that were failing silently can give
+ an error now. Sorry. To compensate, I added stacked annotation (for
+ symmetry).
+
+ \begin{itemize}
+ \tightlist
+ \item
+ Added stacked annotations for symmetry with stacked labels.
+ \item
+ Fixed a bug in the plotting of \texttt{inst\ amp\ ra} terminals.
+ \item
+ Fixed a bug in managing stacked labels (\texttt{l2=...}); possibly
+ it will be mildly backward-incompatible (please see the manual about
+ incompatible changes)
+ \end{itemize}
+\item
Version 1.3.5 (2021-05-02)
Power electronics devices are the main characters in this release:
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
index 2cafb29806..287f3012f8 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 9769fbe459..fd639196c7 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 0d71c95156..90e8ee9b9a 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
@@ -219,8 +219,10 @@ The \texttt{use fpu reciprocal} key seems to have no side effects, but given tha
Here, we will provide a list of incompabilitys between different version of \Circuitikz. We will try to hold this list short, but sometimes it is easier to break with old syntax than including a lot of switches and compatibility layers. In general, changes that would invalidate a circuit (changes of polarity of components and so on) are almost always protected by a flag; the same is not true for purely aesthetic changes.
If unsure, you can check the version at your local installation using the macro \verb!\pgfcircversion{}!.
\begin{itemize}
+ \item Version 1.3.6 fixes several problems with the stacked labels; the most important change is that now the bracing of arguments is respected as in version 1.3.0 for the other labels. The special treatment in stacked labels (and only in stacked labels!) for the (still experimental\footnote{and, really, not advised\dots}) \texttt{siunitx} compact syntax \texttt{<...>} has been removed: it was completely buggy before, and silently ignored, now will throw an error.
\item Version 1.3.3 fixes the direction of the arrows in tunable elements; before this version, they were more or less random, now the arrow goes from bottom left to top right. You have the option to go back to the old behavior with \texttt{\textbackslash ctikzset\{bipoles/fix tunable direction=false\}}. As a compensation for the fuss, now the arrows are configurable. To learn more, see the FAQ:~\ref{faq:tunable-arrow}.
\item Version 1.3.1 removes the warning if you do not specify a voltage direction.
+ \item Version 1.3.0 fixes the buggy stripping of braces from labels and annotations (see~\ref{sec:bracing-of-labels}.
\item After 1.2.7 a big code reorganization (which had the collateral effect of fixing some bug) has been made; no changes should be visible, but a fallback point at 1.2.7 has been added.
\item You \textbf{must} upgrade to v1.2.7 or newer if you use a \TikZ{} 3.1.8 or 3.1.8a (but better upgrade both packages to the current version). You can check the \TikZ{} version installed using the macro \verb|\pgfversion|.
\item After v1.2.1: \textbf{Important:} the routine that implements the \texttt{to[...]} component positioning has been rewritten. That should enhance the line joins in paths, and it's safer, but it can potentially change some old behavior.
@@ -6240,7 +6242,7 @@ you can add\footnote{Since version \texttt{1.3.3}} (or remove, with negative val
\end{circuitikz}
\end{LTXexample}
-\subsubsection{Special symbols in labels and annotations.}
+\subsubsection{Special symbols in labels and annotations.}\label{sec:bracing-of-labels}
When \TikZ{} processes the options, there will be problems if the label (or annotation, voltage, or current) contains one of the characters $=$ (equal) or $,$ (comma) --- because the parser search for those two characters to delimit the arguments, giving unexpected errors and wrong output.
These two characters can be protected from the option parser using an extra set of braces.
@@ -6302,30 +6304,40 @@ The default orientation of labels is controlled by the options \texttt{smartlabe
\end{circuitikz}
\end{LTXexample}
-You also can use stacked (two lines) labels. The example should be self-explanatory: the two lines are specified as \texttt{l2=}\emph{line1}\texttt{ and }\emph{line2}. You can use the keys \texttt{l2 halign} to control horizontal position (\texttt{l}eft, \texttt{c}enter, \texttt{r}ight) and \texttt{l2 valign} to control the vertical one (\texttt{b}ottom, \texttt{c}center, \texttt{t}op).
+\subsubsection{Stacked (two lines) labels.}
+You also can use stacked (two lines) labels. The example should be self-explanatory: the two lines are specified as \texttt{l2=}\emph{line1}\texttt{ and }\emph{line2}. You can use the keys \texttt{l2 halign} to control horizontal position (\texttt{l}eft, \texttt{c}enter, \texttt{r}ight) and \texttt{l2 valign} to control the vertical one (\texttt{b}ottom, \texttt{c}enter, \texttt{t}op). The default values for alignement are thought for vertical components (where the stacke labels are more natural), in other positions you have to force them.
+Notice that you \textbf{can't use} the compact \texttt{<...>} notation for \texttt{siunitx} with stacked labels. Before \texttt{v1.3.6} the label was ignored, but that has been converted into an error.
-\begin{LTXexample}[varwidth=true]
- \begin{circuitikz}[ american, ]
- %
- % default is l2 halign=l, l2 valign=c
- %
- \draw (0,0) to[R, l2_=$R_{CC}$ and \SI{4.7}{k\ohm}, , l2 valign=t] (2,0);
- \draw (0,0) to[R, l2_=$R_{CC}$ and \SI{4.7}{k\ohm}, , ] (0,2);
- \draw (0,0) to[R, l2_=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=c, l2 valign=b] (-2,0);
- \draw (0,0) to[R, l2_=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=r, l2 valign=c] (0, -2);
- \end{circuitikz}
-\end{LTXexample}
+Since \texttt{v1.3.6} you have the same possibility with the \texttt{annotation} (just use \texttt{a2=...}, \verb|a2_=...|, \texttt{a2 valign} and so on. Notice that the default position for stacked annotation is \texttt{v2 halign=l}.
-\begin{LTXexample}[varwidth=true]
- \begin{circuitikz}[ american, ]
- \draw (0,0) to[R, l2^=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=c, l2 valign=b] (2,0);
- \draw (0,0) to[R, l2^=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=c, ] (0,2);
- \draw (0,0) to[R, l2^=$R_{CC}$ and \SI{4.7}{k\ohm}, , l2 valign=t] (-2,0);
- \draw (0,0) to[R, l2^=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=c, l2 valign=t](0, -3);
- \end{circuitikz}
+%
+% This is hacky --- better not to publish it for now
+%
+% \begin{circuitikz}[]
+% \draw (0,2) to [R, l2= {A=B} and X, l2 valign=b, l2 halign=c] ++(2,0) to[L, l2=A and X \\ {C=Z}] ++(0,-2);
+% \end{circuitikz}
+
+\begin{LTXexample}[varwidth=true, pos=t, keepspaces, basicstyle=\footnotesize\ttfamily]
+\begin{circuitikz}[american]
+ %
+ % default for l2 is: l2 halign=l, l2 valign=c. DO NOT USE the <...> notation
+ %
+ \draw (0,0) to[R, l2_=$R_{CC}$ and \SI{4.7}{k\ohm}, , l2 valign=t] ++(2,0);
+ \draw (0,0) to[R, l2_=$R_{CC}$ and \SI{4.7}{k\ohm}, , ] ++(0,2);
+ \draw (0,0) to[R, l2_=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=c, l2 valign=b] ++(-2,0);
+ \draw (0,0) to[R, l2_=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=r, l2 valign=c] ++(0,-2);
+ \draw (5,0) to[R, l2^=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=c, l2 valign=b] ++(2,0);
+ \draw (5,0) to[R, l2^=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=c, ] ++(0,2);
+ \draw (5,0) to[R, l2^=$R_{CC}$ and \SI{4.7}{k\ohm}, , l2 valign=t] ++(-2,0);
+ \draw (5,0) to[R, l2^=$R_{CC}$ and \SI{4.7}{k\ohm}, l2 halign=c, l2 valign=t] ++(0,-2);
+ \draw (10,2) to[R, l2={A=B} and X, a2={C=D} and Y] ++(0,-4);
+\end{circuitikz}
\end{LTXexample}
+For extra options about labels and annotations, please refer to section~\ref{sec:ornament-style}
+
+
\subsection{Currents and voltages}\label{curr-and-volt}
The default direction/sign for currents and voltages in the components is, unfortunately, not standard, and can change across country and sometime across different authors.
@@ -6971,7 +6983,7 @@ This could be especially useful if you define a style, to use like this:
-\subsection{Changing the style of labels and text ornaments}
+\subsection{Changing the style of labels, voltages, and other text ornaments}\label{sec:ornament-style}
Since version \texttt{0.9.5}, it is possible to change the style of bipole text ornaments (labels, annotations, voltages etc) by using the appropriate styles or keys.
The basic style applied to the text are defined in the \texttt{/tikz/circuitikz} key directory and applied to every node that contains the text; you can also change them locally by using the \texttt{tikz} direct keys in local scopes.
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
index bcf532bfe6..dd8864f683 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
@@ -12,8 +12,8 @@
\NeedsTeXFormat{LaTeX2e}
-\def\pgfcircversion{1.3.5}
-\def\pgfcircversiondate{2021/05/02}
+\def\pgfcircversion{1.3.6}
+\def\pgfcircversiondate{2021/05/09}
\ProvidesPackage{circuitikz}%
[\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex
index 89539ee6e9..21fc6e8883 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex
@@ -322,51 +322,77 @@
% syntax is l2_ = line1 and line2 (same for l2^)
%
\ctikzset{%
- l2 valign/.store in=\ltwo@valign, l2 valign=c,
- l2 halign/.store in=\ltwo@halign, l2 halign=l,
+ l2 valign/.store in=\pgfcirc@ltwo@valign, l2 valign=c,
+ l2 halign/.store in=\pgfcirc@ltwo@halign, l2 halign=l,
}
\ctikzset{l2base/.code n args={2}{
\pgfkeys{/tikz/circuitikz/bipole/label/name=%
\bgroup
\setlength{\tabcolsep}{2pt}%
- \def\ltwo@tabu{\tabular[\ltwo@valign]}%
- \expandafter\ltwo@tabu\expandafter{\ltwo@halign}%
+ \def\pgfcirc@ltwo@tabu{\tabular[\pgfcirc@ltwo@valign]}%
+ \expandafter\pgfcirc@ltwo@tabu\expandafter{\pgfcirc@ltwo@halign}%
#1\\ #2%
\endtabular
\egroup
}%
- \ctikzsetvalof{bipole/label/unit}{}
- \ifpgf@circ@siunitx
- \pgf@circ@handleSI{#2}
- \ifpgf@circ@siunitx@res
- \edef\pgf@temp{\pgf@circ@handleSI@val}
- \pgfkeyslet{/tikz/circuitikz/bipole/label/name}{\pgf@temp}
- \edef\pgf@temp{\pgf@circ@handleSI@unit}
- \pgfkeyslet{/tikz/circuitikz/bipole/label/unit}{\pgf@temp}
- \else
- \fi
- \else
- \fi
}}
-\ctikzset{l2/.style args={#1 and #2}{
+\ctikzset{l2/.style args={#1and#2}{
l2base={#1}{#2},
\circuitikzbasekey/bipole/label/position=90 }
}
-\ctikzset{l2 above/.style args={#1 and #2}{
+\ctikzset{l2 above/.style args={#1and#2}{
l2base={#1}{#2},
\circuitikzbasekey/bipole/label/position=90 }
}
-\ctikzset{l2^/.style args={#1 and #2}{
+\ctikzset{l2^/.style args={#1and#2}{
l2base={#1}{#2},
\circuitikzbasekey/bipole/label/position=90 }
}
-\ctikzset{l2 below/.style args={#1 and #2}{
+\ctikzset{l2 below/.style args={#1and#2}{
l2base={#1}{#2},
\circuitikzbasekey/bipole/label/position=-90 }
}
-\ctikzset{l2_/.style args={#1 and #2}{
+\ctikzset{l2_/.style args={#1and#2}{
l2base={#1}{#2},
\circuitikzbasekey/bipole/label/position=-90 }
}
+%
+% the same for annotations
+%
+\ctikzset{%
+ a2 valign/.store in=\pgfcirc@atwo@valign, a2 valign=c,
+ a2 halign/.store in=\pgfcirc@atwo@halign, a2 halign=r,
+}
+\ctikzset{a2base/.code n args={2}{
+ \pgfkeys{/tikz/circuitikz/bipole/annotation/name=%
+ \bgroup
+ \setlength{\tabcolsep}{2pt}%
+ \def\pgfcirc@atwo@tabu{\tabular[\pgfcirc@atwo@valign]}%
+ \expandafter\pgfcirc@atwo@tabu\expandafter{\pgfcirc@atwo@halign}%
+ #1\\ #2%
+ \endtabular
+ \egroup
+ }%
+}}
+\ctikzset{a2/.style args={#1and#2}{
+ a2base={#1}{#2},
+ \circuitikzbasekey/bipole/annotation/position=-90 }
+}
+\ctikzset{a2 above/.style args={#1and#2}{
+ a2base={#1}{#2},
+ \circuitikzbasekey/bipole/annotation/position=-90 }
+}
+\ctikzset{a2^/.style args={#1and#2}{
+ a2base={#1}{#2},
+ \circuitikzbasekey/bipole/annotation/position=-90 }
+}
+\ctikzset{a2 below/.style args={#1and#2}{
+ a2base={#1}{#2},
+ \circuitikzbasekey/bipole/annotation/position=90 }
+}
+\ctikzset{a2_/.style args={#1and#2}{
+ a2base={#1}{#2},
+ \circuitikzbasekey/bipole/annotation/position=90 }
+}
\endinput
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
index cccb975f22..2dd2eee9a9 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
@@ -7513,19 +7513,19 @@
% ra terminal -
\pgfpathmoveto{\pgfpoint
{\pgf@circ@res@left}
- {\ctikzvalof{tripoles/inst amp ra/ra pos}\pgf@circ@Rlen}}
+ {\ctikzvalof{tripoles/inst amp ra/ra pos}\pgf@circ@scaled@Rlen}}
%
\pgfpathlineto{\pgfpoint
{\ctikzvalof{tripoles/inst amp ra/port width}\pgf@circ@res@left}
- {\ctikzvalof{tripoles/inst amp ra/ra pos}\pgf@circ@Rlen}}
+ {\ctikzvalof{tripoles/inst amp ra/ra pos}\pgf@circ@scaled@Rlen}}
% ra terminal +
\pgfpathmoveto{\pgfpoint
{\pgf@circ@res@left}
- {-\ctikzvalof{tripoles/inst amp ra/ra pos}\pgf@circ@Rlen}}
+ {-\ctikzvalof{tripoles/inst amp ra/ra pos}\pgf@circ@scaled@Rlen}}
%
\pgfpathlineto{\pgfpoint
{\ctikzvalof{tripoles/inst amp ra/port width}\pgf@circ@res@left}
- {-\ctikzvalof{tripoles/inst amp ra/ra pos}\pgf@circ@Rlen}}
+ {-\ctikzvalof{tripoles/inst amp ra/ra pos}\pgf@circ@scaled@Rlen}}
% Negative input terminal
\pgfpathmoveto{\pgfpoint
diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
index a84fd4d95d..6349bd81be 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.3.5}
-\def\pgfcircversiondate{2021/05/02}
+\def\pgfcircversion{1.3.6}
+\def\pgfcircversiondate{2021/05/09}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
\usemodule[tikz]