From a7ef56f18421a8ffb9d34c16ff9f017e45e4e6d3 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 7 Sep 2021 03:03:54 +0000 Subject: CTAN sync 202109070303 --- graphics/pgf/contrib/circuitikz/doc/changelog.tex | 15 +++ .../contrib/circuitikz/doc/circuitikz-context.pdf | Bin 17688 -> 17688 bytes .../contrib/circuitikz/doc/circuitikzmanual.pdf | Bin 1440146 -> 1441298 bytes .../contrib/circuitikz/doc/circuitikzmanual.tex | 10 +- graphics/pgf/contrib/circuitikz/tex/circuitikz.sty | 4 +- .../pgf/contrib/circuitikz/tex/pgfcircbipoles.tex | 103 ++++++++++++++------- .../pgf/contrib/circuitikz/tex/pgfcircutils.tex | 20 ++-- .../pgf/contrib/circuitikz/tex/t-circuitikz.tex | 4 +- 8 files changed, 106 insertions(+), 50 deletions(-) (limited to 'graphics/pgf') diff --git a/graphics/pgf/contrib/circuitikz/doc/changelog.tex b/graphics/pgf/contrib/circuitikz/doc/changelog.tex index 508a25d9fe..0ce9902781 100644 --- a/graphics/pgf/contrib/circuitikz/doc/changelog.tex +++ b/graphics/pgf/contrib/circuitikz/doc/changelog.tex @@ -4,6 +4,21 @@ here. See \url{https://github.com/circuitikz/circuitikz/commits} for a full list of changes. \begin{itemize} +\item + Version 1.4.3 (2021-09-06) + + Minor release, mainly a single bugfix. + + \begin{itemize} + \tightlist + \item + added hidden anchors of \texttt{ooosource} to the manual + \item + fix a bug in anchors of \texttt{ooosource} (they did not respect + class scaling) + \item + faster \texttt{use\ fpu\ reciprocal} (thanks to Henri Menke) + \end{itemize} \item Version 1.4.2 (2021-07-26) diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf index 31a4cec4f9..ce5c81d217 100644 Binary files a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf and b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf differ diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf index ce0a14da3f..37b39c62f3 100644 Binary files a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf and b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf differ diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex index 8de6e6209f..b29332aca2 100644 --- a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex +++ b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex @@ -2545,9 +2545,13 @@ Notice that if you choose the dashed style, the noise sources are fillable: \footnotetext{Added by André Alves in \texttt{v1.3.5}} \circuitdescbip*[oosource]{ioosource}{Double Zero style current source}{} \circuitdescbip*[oosource]{voosource}{Double Zero style voltage source}{} - \circuitdescbip*[oosourcetrans]{oosourcetrans}{transformer source\footnotemark}{} + \circuitdescbip*[oosourcetrans]{oosourcetrans}{transformer source\footnotemark}{}(centerprim/90/0.3, centersec/-90/0.3) \footnotetext{The \texttt{oosourcetrans} and \texttt{ooosource} componentes have benn added by \href{https://github.com/circuitikz/circuitikz/pull/397}{user \texttt{@olfline} on GitHub}}. - \circuitdescbip*[ooosource]{ooosource}{transformer with three windings}{}(left/175/0.2, right/5/0.5, prim1/130/.2, prim2/-130/.2, sec1/45/.2, sec2/60/.2, sec3/90/.2, tert1/0/.2, tert2/-45/.2, tert3/-90/.2) + \begingroup + \ctikzset{sources/scale=1.5} + \circuitdescbip*[ooosource]{ooosource}{transformer with three windings\footnotemark}{}(left/175/0.2, right/5/0.7, prim1/130/.2, prim2/-130/.2, sec1/35/.2, sec2/60/.2, sec3/90/.2, tert1/0/.2, tert2/-45/.2, tert3/-90/.2, centerprim/92/0.8, centersec/35/0.9, centertert/-35/0.8) + \footnotetext{The component here is scaled up 1.5 times to better show the anchors.} + \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}. @@ -2582,7 +2586,7 @@ The size of the broken part of the DC current source is configurable by changing \paragraph{Size.} You can change the scale of the batteries by setting the key \texttt{batteries/scale}, for the controlled (dependent) sources with \texttt{csources/scale}, and for all the other independent sources and generators with \texttt{sources/scale}, to something different from the default \texttt{1.0}. -Notice that the size of the double-circle sources (and of the triple-circle one) are tuned so that the full source occupy more or less the same horizontal space than one of the single-circle one; obviously, the circle are much smaller. If you want to have the same circle radius, you have to scale (locally!) those sources by one factor that is \texttt{1.5384} ($1/0.65$) for \texttt{oosource}, \texttt{1.6667} ($1/0.6$) for \texttt{oosourcetrans}, and \texttt{1.8182} ($1/0.55$) for \texttt{ooosource}. +Notice that the size of the double-circle sources (and of the triple-circle one) are tuned so that the full source occupy more or less the same horizontal space than one of the single-circle one; as a consequence, the circles are much smaller. If you want to have the same circle radius, you have to scale (locally!) those sources by one factor that is \texttt{1.5384} ($1/0.65$) for \texttt{oosource}, \texttt{1.6667} ($1/0.6$) for \texttt{oosourcetrans}, and \texttt{1.8182} ($1/0.55$) for \texttt{ooosource}. \begin{LTXexample}[varwidth=true] \begin{circuitikz} diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty index 5a1b983a14..9349fc801d 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.2} -\def\pgfcircversiondate{2021/07/26} +\def\pgfcircversion{1.4.3} +\def\pgfcircversiondate{2021/09/06} \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/pgfcircbipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex index 228c46e935..d2c2dcbb84 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex @@ -2164,7 +2164,18 @@ %% Independent double oo source \pgfcircdeclarebipolescaled{sources} -{} +{ + \anchor{centerprim}{ + \northeast + \pgf@y=0pt\relax + \pgf@x=-\ctikzvalof{bipoles/oosource/circleoffset}\pgf@x + } + \anchor{centersec}{ + \northeast + \pgf@y=0pt\relax + \pgf@x=\ctikzvalof{bipoles/oosource/circleoffset}\pgf@x + } +} {\ctikzvalof{bipoles/oosource/height}} {oosource} {\ctikzvalof{bipoles/oosource/height}} @@ -2248,7 +2259,18 @@ % % % % round three-phase transformer \pgfcircdeclarebipolescaled{sources} -{} +{ + \anchor{centerprim}{ + \northeast + \pgf@y=0pt\relax + \pgf@x=-\ctikzvalof{bipoles/oosourcetrans/circleoffset}\pgf@x + } + \anchor{centersec}{ + \northeast + \pgf@y=0pt\relax + \pgf@x=\ctikzvalof{bipoles/oosourcetrans/circleoffset}\pgf@x + } +} {\ctikzvalof{bipoles/oosourcetrans/height}} {oosourcetrans} {\ctikzvalof{bipoles/oosourcetrans/height}} @@ -2330,18 +2352,20 @@ \pgf@y=0pt } \savedanchor{\centerprim}{ - \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen - \pgf@circ@scaled@Rlen=-\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@scaled@Rlen + \pgf@circ@scaled@Rlen=\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen + \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@scaled@Rlen + \pgf@circ@res@other=-\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@res@other \pgf@y=0pt - \pgf@x=.5\pgf@circ@scaled@Rlen + \pgf@x=.5\pgf@circ@res@other } \anchor{centerprim}{ \centerprim } \savedanchor{\centersec}{ - \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen - \pgf@circ@scaled@Rlen=-\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@scaled@Rlen - \pgfpointpolar{60}{.5\pgf@circ@scaled@Rlen} + \pgf@circ@scaled@Rlen=\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen + \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@scaled@Rlen + \pgf@circ@res@other=-\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@res@other + \pgfpointpolar{60}{.5\pgf@circ@res@other} \pgf@y=-\pgf@y \pgf@x=-\pgf@x } @@ -2349,9 +2373,10 @@ \centersec } \savedanchor{\centertert}{ - \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen - \pgf@circ@scaled@Rlen=-\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@scaled@Rlen - \pgfpointpolar{60}{.5\pgf@circ@scaled@Rlen} + \pgf@circ@scaled@Rlen=\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen + \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@scaled@Rlen + \pgf@circ@res@other=-\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@res@other + \pgfpointpolar{60}{.5\pgf@circ@res@other} \pgf@y=\pgf@y \pgf@x=-\pgf@x } @@ -2361,44 +2386,52 @@ % add some anchors in case the are needed :) \anchor{prim1}{ - \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen - \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen - \pgfpointadd{\centerprim}{\pgfpointpolar{135}{.5\pgf@circ@scaled@Rlen}} + \pgf@circ@scaled@Rlen=\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen + \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@scaled@Rlen + \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@other + \pgfpointadd{\centerprim}{\pgfpointpolar{135}{.5\pgf@circ@res@other}} } \anchor{prim2}{ - \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen - \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen - \pgfpointadd{\centerprim}{\pgfpointpolar{-135}{.5\pgf@circ@scaled@Rlen}} + \pgf@circ@scaled@Rlen=\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen + \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@scaled@Rlen + \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@other + \pgfpointadd{\centerprim}{\pgfpointpolar{-135}{.5\pgf@circ@res@other}} } \anchor{sec1}{ - \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen - \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen - \pgfpointadd{\centersec}{\pgfpointpolar{0}{.5\pgf@circ@scaled@Rlen}} + \pgf@circ@scaled@Rlen=\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen + \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@scaled@Rlen + \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@other + \pgfpointadd{\centersec}{\pgfpointpolar{0}{.5\pgf@circ@res@other}} } \anchor{sec2}{ - \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen - \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen - \pgfpointadd{\centersec}{\pgfpointpolar{45}{.5\pgf@circ@scaled@Rlen}} + \pgf@circ@scaled@Rlen=\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen + \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@scaled@Rlen + \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@other + \pgfpointadd{\centersec}{\pgfpointpolar{45}{.5\pgf@circ@res@other}} } \anchor{sec3}{ - \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen - \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen - \pgfpointadd{\centersec}{\pgfpointpolar{90}{.5\pgf@circ@scaled@Rlen}} + \pgf@circ@scaled@Rlen=\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen + \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@scaled@Rlen + \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@other + \pgfpointadd{\centersec}{\pgfpointpolar{90}{.5\pgf@circ@res@other}} } \anchor{tert1}{ - \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen - \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen - \pgfpointadd{\centertert}{\pgfpointpolar{0}{.5\pgf@circ@scaled@Rlen}} + \pgf@circ@scaled@Rlen=\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen + \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@scaled@Rlen + \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@other + \pgfpointadd{\centertert}{\pgfpointpolar{0}{.5\pgf@circ@res@other}} } \anchor{tert2}{ - \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen - \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen - \pgfpointadd{\centertert}{\pgfpointpolar{-45}{.5\pgf@circ@scaled@Rlen}} + \pgf@circ@scaled@Rlen=\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen + \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@scaled@Rlen + \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@other + \pgfpointadd{\centertert}{\pgfpointpolar{-45}{.5\pgf@circ@res@other}} } \anchor{tert3}{ - \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen - \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen - \pgfpointadd{\centertert}{\pgfpointpolar{-90}{.5\pgf@circ@scaled@Rlen}} + \pgf@circ@scaled@Rlen=\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen + \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@scaled@Rlen + \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@other + \pgfpointadd{\centertert}{\pgfpointpolar{-90}{.5\pgf@circ@res@other}} } } {\ctikzvalof{bipoles/ooosource/height}} diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex index ae5fcf38de..e1d7314931 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex @@ -75,18 +75,22 @@ %% https://github.com/pgf-tikz/pgf/issues/861 %% %% Thanks to "muzimuzhi Z" https://tex.stackexchange.com/a/547085/38080 +%% Thanks to Henri Menke for a faster approach https://github.com/circuitikz/circuitikz/commit/00966c45c42b464fab5429f89f2b7fb414e9b3f7#commitcomment-54592494 %% \pgfkeysifdefined{/pgf/fpu/install only/.@cmd}{% \pgfqkeys{/pgf}{use fpu reciprocal/.code={\pgfkeys{/pgf/fpu/install only={reciprocal}}}}% }{% - \pgfqkeys{/pgf}{use fpu reciprocal/.code={% - \def\pgfmathreciprocal@##1{% - \begingroup - \pgfkeys{/pgf/fpu=true,/pgf/fpu/output format=fixed}% - \pgfmathparse{1/##1}% - \pgfmath@smuggleone\pgfmathresult - \endgroup - }}}% + \pgfkeysifdefined{/pgf/use fpu reciprocal/.@cmd}{% use stock one + }{ + \pgfqkeys{/pgf}{use fpu reciprocal/.code={% + \def\pgfmathreciprocal@##1{% + \begingroup + \pgfmathfloatparsenumber{##1}% + \pgfmathfloatreciprocal@{\pgfmathresult}% + \pgfmathfloattofixed@{\pgfmathresult}% + \pgfmath@smuggleone\pgfmathresult + \endgroup + }}}}% } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex index 50ac5b4f19..e7187f4ab0 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.2} -\def\pgfcircversiondate{2021/07/26} +\def\pgfcircversion{1.4.3} +\def\pgfcircversiondate{2021/09/06} \writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion} \usemodule[tikz] -- cgit v1.2.3