diff options
Diffstat (limited to 'graphics/pgf/contrib/circuitikz/tex')
15 files changed, 175 insertions, 44 deletions
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty index 40f37add53..162020c387 100644 --- a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty +++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty @@ -1,4 +1,7 @@ -% Copyright 2007-2019 by Massimo Redaelli +% Copyright 2018-2020 by Romano Giannetti +% Copyright 2015-2020 by Stefan Lindner +% Copyright 2013-2020 by Stefan Erhardt +% Copyright 2007-2020 by Massimo Redaelli % % This file may be distributed and/or modified % @@ -9,8 +12,8 @@ \NeedsTeXFormat{LaTeX2e} -\def\pgfcircversion{1.0.0-pre2} -\def\pgfcircversiondate{2020/01/23} +\def\pgfcircversion{1.0} +\def\pgfcircversiondate{2020/02/04} \ProvidesPackage{circuitikz}% [\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion] diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex index e8c27efbee..f550af644b 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex @@ -1,3 +1,16 @@ +% Copyright 2018-2020 by Romano Giannetti +% Copyright 2015-2020 by Stefan Lindner +% Copyright 2013-2020 by Stefan Erhardt +% Copyright 2007-2020 by Massimo Redaelli +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. + +% %% Key managements \long\def\pgf@circ@comment#1{} @@ -254,13 +267,8 @@ % load a style file: search ctikzstyle-NAME.tex in path \def\ctikzloadstyle#1{% - \edef\pgf@temp{#1}% - % guard against re-loading - \expandafter\ifx\csname pgf@circ@style@\pgf@temp @loaded\endcsname\relax% - \expandafter\global\expandafter\let\csname pgf@circ@style@\pgf@temp @loaded\endcsname=\pgfutil@empty \pgfutil@InputIfFileExists{ctikzstyle-#1}{}{% \tikzerror{I did not find the circuitikz style #1}}% - \fi } % load and enact a style @@ -635,6 +643,10 @@ \ctikzset{bipoles/ncs/height/.initial=.35} \ctikzset{bipoles/ncs/width/.initial=.35} \ctikzset{bipoles/ncs/depth/.initial=.2} +%%% reed switch +\ctikzset{bipoles/reed/height/.initial=.4} +\ctikzset{bipoles/reed/width/.initial=.8}% 0.35 in nos +\ctikzset{bipoles/reed/depth/.initial=.4} % misc @@ -675,13 +687,21 @@ \ctikzset{bipoles/voltmeter/width/.initial=.60} \ctikzset{bipoles/smeter/height/.initial=.60} \ctikzset{bipoles/smeter/width/.initial=.60} +\ctikzset{bipoles/smeter/voltage/additional label shift/.initial=1} \ctikzset{bipoles/qmeter/depth/.initial=.40} \ctikzset{bipoles/qmeter/height/.initial=.80} \ctikzset{bipoles/qmeter/width/.initial=.60} +% this must be specified for each one +\ctikzset{bipoles/qvprobe/voltage/additional label shift/.initial=.5} +\ctikzset{bipoles/qiprobe/voltage/additional label shift/.initial=.5} +\ctikzset{bipoles/qpprobe/voltage/additional label shift/.initial=.5} \ctikzset{bipoles/iloop/width/.initial=.40} \ctikzset{bipoles/iloop/height/.initial=.60} + \ctikzset{bipoles/oscope/height/.initial=.60} \ctikzset{bipoles/oscope/width/.initial=.60} +\ctikzset{bipoles/oscope/voltage/additional label shift/.initial=1} + % option to not rotate the new (Romano's) instruments \newif\ifpgf@circuit@straightinstruments\pgf@circuit@straightinstrumentstrue diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex index 5e4cf0e174..cd4b14fcab 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex @@ -1,4 +1,7 @@ -% Copyright 2007-2009 by Massimo Redaelli +% Copyright 2018-2020 by Romano Giannetti +% Copyright 2015-2020 by Stefan Lindner +% Copyright 2013-2020 by Stefan Erhardt +% Copyright 2007-2020 by Massimo Redaelli % % This file may be distributed and/or modified % @@ -2832,6 +2835,41 @@ \pgftransformshift{\pgfpoint{2\pgf@circ@res@right}{0pt}} \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}} } +%%% reed switches +\pgfcircdeclarebipolescaled{switches} +{} +{\ctikzvalof{bipoles/reed/depth}} +{reed} +{\ctikzvalof{bipoles/reed/height}} +{\ctikzvalof{bipoles/reed/width}} +{ + % this is designed to be the same as a "nos". + \pgfmathsetmacro{\@@tmpx}{0.9*\ctikzvalof{bipoles/nos/width}/\ctikzvalof{bipoles/reed/width}} + \pgfmathsetmacro{\@@tmpy}{\ctikzvalof{bipoles/nos/height}/\ctikzvalof{bipoles/reed/height}} + \pgfscope + \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} + % eclosure + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@up}{\pgf@circ@res@up}} + \pgfpatharc{90}{-90}{\pgf@circ@res@up} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@up}{-\pgf@circ@res@up}} + \pgfpatharc{270}{90}{\pgf@circ@res@up} + \pgfpathclose + \pgf@circ@draworfill + % switch + \pgfpathmoveto{\pgfpoint{\@@tmpx\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{\@@tmpx\pgf@circ@res@right}{\@@tmpy\pgf@circ@res@up}} + % connection lines + \pgfsetbuttcap + \pgfusepath{draw} + \endpgfscope + % connection lines + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{\@@tmpx\pgf@circ@res@left}{0pt}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{\@@tmpx\pgf@circ@res@right}{0pt}} + \pgfusepath{draw} +} + % cute switch "to" shapes help function % #1 -> name % #2 -> barposition diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirccurrent.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirccurrent.tex index b0d2a989bd..b8cf055590 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcirccurrent.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirccurrent.tex @@ -1,4 +1,7 @@ -% Copyright 2007-2009 by Massimo Redaelli +% Copyright 2018-2020 by Romano Giannetti +% Copyright 2015-2020 by Stefan Lindner +% Copyright 2013-2020 by Stefan Erhardt +% Copyright 2007-2020 by Massimo Redaelli % % This file may be distributed and/or modified % diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircflow.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircflow.tex index c90b986eba..b7bb8b9767 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircflow.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircflow.tex @@ -1,4 +1,7 @@ -% Copyright 2007-2009 by Massimo Redaelli +% Copyright 2018-2020 by Romano Giannetti +% Copyright 2015-2020 by Stefan Lindner +% Copyright 2013-2020 by Stefan Erhardt +% Copyright 2007-2020 by Massimo Redaelli % % This file may be distributed and/or modified % diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex index 0542e905ef..1aff5b9a06 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex @@ -1,4 +1,7 @@ -% Copyright 2007-2009 by Massimo Redaelli +% Copyright 2018-2020 by Romano Giannetti +% Copyright 2015-2020 by Stefan Lindner +% Copyright 2013-2020 by Stefan Erhardt +% Copyright 2007-2020 by Massimo Redaelli % % This file may be distributed and/or modified % diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircmonopoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircmonopoles.tex index 88ca4711da..2da88c450b 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircmonopoles.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircmonopoles.tex @@ -1,4 +1,7 @@ -% Copyright 2007-2009 by Massimo Redaelli +% Copyright 2018-2020 by Romano Giannetti +% Copyright 2015-2020 by Stefan Lindner +% Copyright 2013-2020 by Stefan Erhardt +% Copyright 2007-2020 by Massimo Redaelli % % This file may be distributed and/or modified % diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex index 6c175c4b73..4c8d6d4e49 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex @@ -1,5 +1,7 @@ -% Copyright 2007-2009 by Massimo Redaelli -% Copyright 2019 by Romano Giannetti +% Copyright 2018-2020 by Romano Giannetti +% Copyright 2015-2020 by Stefan Lindner +% Copyright 2013-2020 by Stefan Erhardt +% Copyright 2007-2020 by Massimo Redaelli % % This file may be distributed and/or modified % @@ -9,7 +11,7 @@ % See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Multipoles +%% Multipoles by Romano Giannetti %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%% diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex index eb319b1ad8..337443da27 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex @@ -1,3 +1,15 @@ +% Copyright 2018-2020 by Romano Giannetti +% Copyright 2015-2020 by Stefan Lindner +% Copyright 2013-2020 by Stefan Erhardt +% Copyright 2007-2020 by Massimo Redaelli +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. + \def\pgf@circ@direction{0.0} @@ -804,6 +816,10 @@ \compattikzset{multiwire/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@multiwire@path, l=#1}} +% reed switches +\def\pgf@circ@reed@path#1{\pgf@circ@bipole@path{reed}{#1}} +\compattikzset{reed/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@reed@path, l=#1}} + % Transistor like bipoles \def\pgf@circ@trans@path#1#2{ diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex index 31890ea44d..68ecb33d4a 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex @@ -1,4 +1,7 @@ -% Copyright 2007-2009 by Massimo Redaelli +% Copyright 2018-2020 by Romano Giannetti +% Copyright 2015-2020 by Stefan Lindner +% Copyright 2013-2020 by Stefan Erhardt +% Copyright 2007-2020 by Massimo Redaelli % % This file may be distributed and/or modified % diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex index 3ccf5abfcb..823ff5b632 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex @@ -1,4 +1,7 @@ -% Copyright 2007-2009 by Massimo Redaelli +% Copyright 2018-2020 by Romano Giannetti +% Copyright 2015-2020 by Stefan Lindner +% Copyright 2013-2020 by Stefan Erhardt +% Copyright 2007-2020 by Massimo Redaelli % % This file may be distributed and/or modified % diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex index 4e8a010fb9..9957fdee5a 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex @@ -1,4 +1,7 @@ -% Copyright 2007-2009 by Massimo Redaelli +% Copyright 2018-2020 by Romano Giannetti +% Copyright 2015-2020 by Stefan Lindner +% Copyright 2013-2020 by Stefan Erhardt +% Copyright 2007-2020 by Massimo Redaelli % % This file may be distributed and/or modified % @@ -3531,9 +3534,12 @@ \pgf@circ@scaled@Rlen=\scaledRlen % Triangle - % Includes output terminals to ensure that diagonal joins are properly displayed + % Includes output terminals in the traingular shape + % to ensure that diagonal joins are properly displayed + % we first draw the main triangle and the leads with normal thickness, + % and the redraw the main triangle with the component shape \pgfscope - \pgf@circ@setlinewidth{quadpoles}{\pgflinewidth} + % shift origin a bit to ease calculations \pgftransformxshift{\ctikzvalof{tripoles/fd op amp/port width}\pgf@circ@res@left} \pgf@circ@res@step=\pgf@circ@res@right \advance\pgf@circ@res@step by -\pgf@circ@res@left @@ -3562,8 +3568,25 @@ \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}} \pgfpathclose - \pgf@circ@draworfill - \endpgfscope + \pgfusepath{stroke} + + % ok, now we'll redraw the triangle with the class specific + % thickness and optionally fill + + \pgfscope + \pgf@circ@setlinewidth{quadpoles}{\pgflinewidth} + + % Initial point (right vertex) + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}} + % Top vertex + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + % Bottom vertex + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + + \pgfpathclose + \pgf@circ@draworfill + \endpgfscope % thick and fill + \endpgfscope % shift % Negative input terminal \pgfpathmoveto{\pgfpoint diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex index 5748009f13..81192ba913 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex @@ -1,4 +1,7 @@ -% Copyright 2007-2009 by Massimo Redaelli +% Copyright 2018-2020 by Romano Giannetti +% Copyright 2015-2020 by Stefan Lindner +% Copyright 2013-2020 by Stefan Erhardt +% Copyright 2007-2020 by Massimo Redaelli % % This file may be distributed and/or modified % @@ -7,22 +10,6 @@ % % See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. -%\def\pgf@circ@handleSI#1{% - % \pgf@circ@siunitx@resfalse -% - % \edef\len{\stringlength[e]{#1}} - %\testmatchingchar[e]{#1}{\len}{>}% - %\ifmatchingchar% - % \ifnum\findchars{#1}{<}=0 - % \def\pgf@circ@handleSI@val{\substring{#1}{1}{\findchars{#1}{<}-1}} - %\def\pgf@circ@handleSI@unit{\substring{#1}{\findchars{#1}{<}-1}+1}{\stringlength{#1}} - %\pgf@circ@siunitx@restrue -% \else -% \fi - %\else - %\fi -%} - \def\pgf@circ@handleSI#1{ \noexpandarg \def\pgf@temp{} diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex index d793320247..0a87b5e6ed 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex @@ -1,4 +1,7 @@ -% Copyright 2007-2009 by Massimo Redaelli +% Copyright 2018-2020 by Romano Giannetti +% Copyright 2015-2020 by Stefan Lindner +% Copyright 2013-2020 by Stefan Erhardt +% Copyright 2007-2020 by Massimo Redaelli % % This file may be distributed and/or modified % @@ -192,8 +195,17 @@ { \edef\bumpb{\ctikzvalof{bipoles/\ctikzvalof{bipole/kind}/voltage/bump b}} } { \edef\bumpb{\ctikzvalof{voltage/bump b}} } \edef\shiftv{\ctikzvalof{voltage/shift}} + % additional per-bipole voltage shift (internal) + \edef\pgf@temp{/tikz/circuitikz/bipoles/\ctikzvalof{bipole/kind}/voltage/additional label shift} + \pgfkeysifdefined{\pgf@temp} + { + \edef\addvshift{\ctikzvalof{bipoles/\ctikzvalof{bipole/kind}/voltage/additional label shift}} + } + { + \edef\addvshift{0} + } \newdimen{\absvshift} - \pgfmathsetlength{\absvshift}{\shiftv*\distfromline+\distfromline} + \pgfmathsetlength{\absvshift}{(1+\shiftv+\addvshift)*(\distfromline)} % put this to true to see the voltage label coordinate anchors \newif\ifpgf@circ@debugv\pgf@circ@debugvfalse } diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex index d2a510866d..03ec7191c5 100644 --- a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex +++ b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex @@ -1,5 +1,17 @@ -\def\pgfcircversion{1.0.0-pre2} -\def\pgfcircversiondate{2020/01/23} +% Copyright 2018-2020 by Romano Giannetti +% Copyright 2015-2020 by Stefan Lindner +% Copyright 2013-2020 by Stefan Erhardt +% Copyright 2007-2020 by Massimo Redaelli +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. + +\def\pgfcircversion{1.0} +\def\pgfcircversiondate{2020/02/04} \writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion} \usemodule[tikz] |