diff options
author | Karl Berry <karl@freefriends.org> | 2019-12-01 21:35:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-12-01 21:35:44 +0000 |
commit | 9aeb61680aefe61b97bdf89d656819d75cf3fc28 (patch) | |
tree | 288cc5f282e11ee8f17d44a400cc6d60a5f1b8c7 /Master/texmf-dist/tex/generic/circuitikz | |
parent | 439fd717142b2fb747dd37229cd0cfeb47a4a9c6 (diff) |
circuitikz (1dec19)
git-svn-id: svn://tug.org/texlive/trunk@52990 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/circuitikz')
4 files changed, 64 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex index 8f4777543d2..b7df7e324e1 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex @@ -705,6 +705,14 @@ \pgfkeys{/tikz/arrowmos/.add code={}{\pgf@circuit@mos@arrowstrue}} \pgfkeys{/tikz/noarrowmos/.add code={}{\pgf@circuit@mos@arrowsfalse}} +% Fixed label positions +\newif\ifpgf@circuit@transisors@fixlabels +\pgf@circuit@transisors@fixlabelstrue +\pgfkeys{/tikz/center transistors text/.add code={}{\pgf@circuit@transisors@fixlabelstrue}} +\ctikzset{fix transistors text/.add code={}{\pgf@circuit@transisors@fixlabelstrue}} +\pgfkeys{/tikz/legacy transistors text/.add code={}{\pgf@circuit@transisors@fixlabelsfalse}} +\ctikzset{legacy transistors text/.add code={}{\pgf@circuit@transisors@fixlabelsfalse}} + % Option solderdot for fet \newif\ifpgf@circuit@fet@solderdot \pgfkeys{/tikz/solderdot/.add code={}{\pgf@circuit@fet@solderdottrue}} diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex index 07a4a050d41..0e579c18623 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex @@ -825,7 +825,8 @@ } ($(\tikztostart) ! .5 ! (\tikztotarget)$) node[#1, /tikz/rotate=\pgf@circ@direction, xscale=\ctikzvalof{mirror value}] - (\ctikzvalof{bipole/name}) {} node {\ctikzvalof{bipole/label/name}} + (\ctikzvalof{bipole/name}) {} + node {\ctikzvalof{bipole/label/name}} \ifcsname pgf@anchor@#1@pathstart\endcsname%if special path-anchors are defined, use them! (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.pathstart) (\ctikzvalof{bipole/name}.pathend) -- (\ctikzvalof{bipole/name}end.center) diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex index 0f193cedccc..90beddf1533 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex @@ -1349,10 +1349,26 @@ } \anchor{text}{ \northeast - \pgf@y=.7\pgf@y \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen} - \pgf@x= \pgf@circ@scaled@Rlen - \pgf@x=0.1\pgf@x + \ifpgf@circuit@transisors@fixlabels + \ifpgf@circuit@fet@bodydiode + % try to put the text to the right of the flyback diode + \pgfmathsetlength{\pgf@circ@res@other}{( + \ctikzvalof{tripoles/#1/bodydiode distance}* + \ctikzvalof{tripoles/#1/width} + + \ctikzvalof{tripoles/#1/bodydiode scale}* + \ctikzvalof{bipoles/diode/height}/2 + )*\pgf@circ@scaled@Rlen} + \advance\pgf@x by \pgf@circ@res@other + \fi + % add a bit of space to avoid central (substrate) terminal if drawn + \advance\pgf@x by 0.05\pgf@circ@scaled@Rlen\relax + \pgf@y=\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox\relax + \else + \pgf@y=.7\pgf@y + \pgf@x= \pgf@circ@scaled@Rlen + \pgf@x=0.1\pgf@x + \fi } \anchor{pathstart}{ % south \northeast @@ -1475,6 +1491,34 @@ \northeast \pgf@y=\ctikzvalof{tripoles/#1/curr direction}\pgf@y } + \anchor{body C in}{ + \northeast + \pgf@y=\ctikzvalof{tripoles/#1/curr direction}\pgf@y + \pgf@y=\ctikzvalof{tripoles/#1/bodydiode conn}\pgf@y + } + \anchor{body E in}{ + \northeast + \pgf@y=-\ctikzvalof{tripoles/#1/curr direction}\pgf@y + \pgf@y=\ctikzvalof{tripoles/#1/bodydiode conn}\pgf@y + } + \anchor{body C out}{ + \northeast + \pgf@ya=\ctikzvalof{tripoles/#1/curr direction}\pgf@y + \pgf@ya=\ctikzvalof{tripoles/#1/bodydiode conn}\pgf@ya + \pgf@y=\pgf@ya + \left + \pgf@x=-\ctikzvalof{tripoles/#1/bodydiode distance}\pgf@x + \pgf@y=\pgf@ya + } + \anchor{body E out}{ + \northeast + \pgf@ya=-\ctikzvalof{tripoles/#1/curr direction}\pgf@y + \pgf@ya=\ctikzvalof{tripoles/#1/bodydiode conn}\pgf@ya + \pgf@y=\pgf@ya + \left + \pgf@x=-\ctikzvalof{tripoles/#1/bodydiode distance}\pgf@x + \pgf@y=\pgf@ya + } #2 \backgroundpath{ \pgftransformationadjustments diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex index 826ac82bba9..a287f7a7336 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex @@ -57,4 +57,11 @@ \def\pgf@circ@stripdecimals#1.#2\pgf@nil{#1} +%%%%%%% +%% flipping text + +\def\ctikzflipx#1{\scalebox{-1}[1]{#1}} +\def\ctikzflipy#1{\scalebox{1}[-1]{#1}} +\def\ctikzflipxy#1{\scalebox{-1}[-1]{#1}} + \endinput |