diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex | 98 |
1 files changed, 81 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex index d6c11db0405..9a393d7d098 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex @@ -1,7 +1,7 @@ -% Copyright 2018-2020 by Romano Giannetti -% Copyright 2015-2020 by Stefan Lindner -% Copyright 2013-2020 by Stefan Erhardt -% Copyright 2007-2020 by Massimo Redaelli +% Copyright 2018-2021 by Romano Giannetti +% Copyright 2015-2021 by Stefan Lindner +% Copyright 2013-2021 by Stefan Erhardt +% Copyright 2007-2021 by Massimo Redaelli % % This file may be distributed and/or modified % @@ -13,7 +13,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Voltage management -%% styles +%% styles%<<< \ctikzset{bipole voltage style/.style={}} \tikzset{bipole voltage style/.code={ \ctikzset{bipole voltage style/.style={#1}} @@ -23,37 +23,37 @@ }} \ctikzset{v^>/.style = { - v = #1, + v={#1}, \circuitikzbasekey/bipole/voltage/direction = forward, \circuitikzbasekey/bipole/voltage/position = above } } \ctikzset{v^</.style = { - v = #1, + v={#1}, \circuitikzbasekey/bipole/voltage/direction = backward, \circuitikzbasekey/bipole/voltage/position = above } } \ctikzset{v_>/.style = { - v = #1, + v={#1}, \circuitikzbasekey/bipole/voltage/direction = forward, \circuitikzbasekey/bipole/voltage/position = below } } \ctikzset{v_</.style = { - v = #1, + v={#1}, \circuitikzbasekey/bipole/voltage/direction = backward, \circuitikzbasekey/bipole/voltage/position = below } } -\ctikzset{v_/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position = below} } -\ctikzset{v^/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position = above} } -\ctikzset{v>/.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = forward} } -\ctikzset{v</.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = backward} } +\ctikzset{v_/.style = {v={#1}, \circuitikzbasekey/bipole/voltage/position = below} } +\ctikzset{v^/.style = {v={#1}, \circuitikzbasekey/bipole/voltage/position = above} } +\ctikzset{v>/.style = {v={#1}, \circuitikzbasekey/bipole/voltage/direction = forward} } +\ctikzset{v</.style = {v={#1}, \circuitikzbasekey/bipole/voltage/direction = backward} }% % Default position varies whether the component is a voltage source % or not @@ -85,7 +85,7 @@ \pgfkeys{\circuitikzbasekey/bipole/voltage/position=below, \circuitikzbasekey/bipole/voltage/direction=backward} \fi\fi\fi - \pgfkeys{/tikz/circuitikz/bipole/voltage/label/name=#1} + \pgfkeys{/tikz/circuitikz/bipole/voltage/label/name={#1}} \ctikzsetvalof{bipole/voltage/label/unit}{} \ifpgf@circ@siunitx \pgf@circ@handleSI{#1} @@ -100,6 +100,7 @@ \fi } } +% %>>> % american voltage font selection and symbol definition % the default font command is {} --- nothing @@ -123,7 +124,7 @@ \fi } -%% Output routine for generic bipoles +%% Output routine for generic bipoles%<<< % put this to true to see the voltage label coordinate anchors \newif\ifpgf@circ@debugv\pgf@circ@debugvfalse @@ -342,8 +343,9 @@ \fi \fi % Closing the ...ifempty } +% %>>> -%% Output routine for voltage sources +%% Output routine for voltage sources%<<< \def\pgf@circ@drawvoltagegenerator{ % the following is affected indirectly by voltage/shift, you can move the arrow with voltage/bump a. % it's not perfect, but I can't find the way to do it correctly... @@ -414,8 +416,9 @@ \fi \fi % closes ...ifempty } +% %>>> -%% Output routine +%% Output routine (main entry point) %<<< %% this is the entry point %% %% locally used dimensions @@ -626,4 +629,65 @@ \fi }%end drawvoltages + +% %>>> + +%% these should be arguably moved to every component definition... + +% special cases for voltage positions%<<<1 +% the KIND is the node name without SHAPE +% See the definition above for meaning +% if bipoles/KIND/voltage/straight label distance is not defined, it uses the height +% if bipoles/KIND/voltage/additional shift is not defined, it is 0 (extra distance) +% +\ctikzset{bipoles/generic/voltage/distance from node/.initial=0.4} +\ctikzset{bipoles/generic/voltage/bump b/.initial=2} +% +\ctikzset{bipoles/ageneric/voltage/distance from node/.initial=.4} +\ctikzset{bipoles/ageneric/voltage/bump b/.initial=2} +% +\ctikzset{bipoles/fullgeneric/voltage/distance from node/.initial=.4} +\ctikzset{bipoles/fullgeneric/voltage/bump b/.initial=2} +% +\ctikzset{bipoles/memristor/voltage/distance from node/.initial=.4} +\ctikzset{bipoles/memristor/voltage/bump b/.initial=2} +% +\ctikzset{bipoles/tline/voltage/bump b/.initial=2.4} +% +\ctikzset{bipoles/varistor/voltage/bump b/.initial=2.4} +\ctikzset{bipoles/varistor/voltage/american label distance/.initial=1.8} +% +\ctikzset{bipoles/photoresistor/voltage/bump b/.initial=1.6} +% +\ctikzset{bipoles/thermistor/voltage/bump b/.initial=2.4} +\ctikzset{bipoles/thermistor/voltage/european label distance/.initial=0.8} +\ctikzset{bipoles/thermistorntc/voltage/bump b/.initial=1.6} +\ctikzset{bipoles/thermistorntc/voltage/european label distance/.initial=0.8} +\ctikzset{bipoles/thermistorptc/voltage/bump b/.initial=1.6} +\ctikzset{bipoles/thermistorptc/voltage/european label distance/.initial=0.8} +% +\ctikzset{bipoles/ccapacitor/voltage/bump b/.initial=2.2} +% +\ctikzset{bipoles/emptyzzdiode/voltage/bump b/.initial=2.5} +\ctikzset{bipoles/emptyzzdiode/voltage/european label distance/.initial=1.0} +\ctikzset{bipoles/fullzzdiode/voltage/bump b/.initial=2.5} +\ctikzset{bipoles/fullzzdiode/voltage/european label distance/.initial=1.0} +\ctikzset{bipoles/emptythyristor/voltage/bump b/.initial=2.0} +\ctikzset{bipoles/emptythyristor/voltage/european label distance/.initial=1.2} +\ctikzset{bipoles/fullthyristor/voltage/bump b/.initial=2.0} +\ctikzset{bipoles/fullthyristor/voltage/european label distance/.initial=1.2} +\ctikzset{bipoles/emptytriac/voltage/bump b/.initial=1.8} +\ctikzset{bipoles/emptytriac/voltage/european label distance/.initial=0.8} +\ctikzset{bipoles/fulltriac/voltage/bump b/.initial=1.8} +\ctikzset{bipoles/fulltriac/voltage/european label distance/.initial=0.8} +% +\ctikzset{bipoles/short/voltage/american label distance/.initial=2.8} +\ctikzset{bipoles/open/voltage/distance from node/.initial=0.3} +% +\ctikzset{bipoles/battery/voltage/bump a/.initial=1.4} +\ctikzset{bipoles/vsourceAM/voltage/american label distance/.initial=1.2} +\ctikzset{bipoles/cvsourceAM/voltage/american label distance/.initial=1.2} +%%>>> + \endinput +% vim: set fdm=marker fmr=%<<<,%>>>: |