From ead9156f7ddf735b7f81064f55f0a920e76e79c6 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 9 May 2021 20:50:14 +0000 Subject: circuitikz (9may21) git-svn-id: svn://tug.org/texlive/trunk@59147 c570f23f-e606-0410-a88d-b1316a301751 --- .../third/circuitikz/circuitikz-context.pdf | Bin 17727 -> 17727 bytes .../texmf-dist/doc/generic/circuitikz/CHANGELOG.md | 9 +++ .../texmf-dist/doc/latex/circuitikz/changelog.tex | 19 ++++++ .../doc/latex/circuitikz/circuitikzmanual.pdf | Bin 1381312 -> 1383374 bytes .../doc/latex/circuitikz/circuitikzmanual.tex | 54 +++++++++------- .../tex/context/third/circuitikz/t-circuitikz.tex | 4 +- .../tex/generic/circuitikz/pgfcirclabel.tex | 68 ++++++++++++++------- .../tex/generic/circuitikz/pgfcirctripoles.tex | 8 +-- .../texmf-dist/tex/latex/circuitikz/circuitikz.sty | 4 +- 9 files changed, 116 insertions(+), 50 deletions(-) diff --git a/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf b/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf index 2cafb29806e..287f3012f86 100644 Binary files a/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf and b/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf differ diff --git a/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md b/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md index a7401f0f365..a542921ddf3 100644 --- a/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md +++ b/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md @@ -1,6 +1,15 @@ The major changes among the different CircuiTikZ versions are listed here. See for a full list of changes. +* version 1.3.6 (2021-05-09) + + Mainly a bugfix release; fixing a bug in the `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). + + - Added stacked annotations for symmetry with stacked labels. + - Fixed a bug in the plotting of `inst amp ra` terminals. + - Fixed a bug in managing stacked labels (`l2=...`); possibly it will be mildly backward-incompatible (please see the manual about incompatible changes) + * Version 1.3.5 (2021-05-02) Power electronics devices are the main characters in this release: PUT, GTOs, a new style for thyristors, and a photovoltaic module. diff --git a/Master/texmf-dist/doc/latex/circuitikz/changelog.tex b/Master/texmf-dist/doc/latex/circuitikz/changelog.tex index cf46a5674fc..56a39de9a63 100644 --- a/Master/texmf-dist/doc/latex/circuitikz/changelog.tex +++ b/Master/texmf-dist/doc/latex/circuitikz/changelog.tex @@ -4,6 +4,25 @@ here. See \url{https://github.com/circuitikz/circuitikz/commits} for a 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) diff --git a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf index 9769fbe4590..fd639196c7d 100644 Binary files a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf and b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf differ diff --git a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex index 0d71c951568..90e8ee9b9a8 100644 --- a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex +++ b/Master/texmf-dist/doc/latex/circuitikz/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/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex b/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex index a84fd4d95df..6349bd81bee 100644 --- a/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex +++ b/Master/texmf-dist/tex/context/third/circuitikz/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] diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex index 89539ee6e9b..21fc6e8883e 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/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/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex index cccb975f22b..2dd2eee9a90 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/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/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty index bcf532bfe6f..dd8864f6834 100644 --- a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty +++ b/Master/texmf-dist/tex/latex/circuitikz/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] -- cgit v1.2.3